You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(98) |
Sep
(138) |
Oct
(100) |
Nov
(49) |
Dec
(131) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(94) |
Feb
(65) |
Mar
(100) |
Apr
(83) |
May
(72) |
Jun
(29) |
Jul
(167) |
Aug
(127) |
Sep
(131) |
Oct
(269) |
Nov
(122) |
Dec
(100) |
2005 |
Jan
(228) |
Feb
(266) |
Mar
(63) |
Apr
(135) |
May
(157) |
Jun
(52) |
Jul
(25) |
Aug
(49) |
Sep
(184) |
Oct
(159) |
Nov
(75) |
Dec
(37) |
2006 |
Jan
(60) |
Feb
(129) |
Mar
(110) |
Apr
(34) |
May
(31) |
Jun
(42) |
Jul
(72) |
Aug
(90) |
Sep
(57) |
Oct
(66) |
Nov
(42) |
Dec
(90) |
2007 |
Jan
(106) |
Feb
(54) |
Mar
(93) |
Apr
(27) |
May
(21) |
Jun
(17) |
Jul
(19) |
Aug
(22) |
Sep
(25) |
Oct
(2) |
Nov
(1) |
Dec
(1) |
2008 |
Jan
(65) |
Feb
(70) |
Mar
(29) |
Apr
(45) |
May
(91) |
Jun
(20) |
Jul
(11) |
Aug
(24) |
Sep
(23) |
Oct
(13) |
Nov
(23) |
Dec
(39) |
2009 |
Jan
(23) |
Feb
(39) |
Mar
(15) |
Apr
(56) |
May
(5) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Karai C. <ck...@us...> - 2004-10-05 00:39:58
|
Update of /cvsroot/krusader/krusader_kde3/krusader/Panel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21080/krusader_kde3/krusader/Panel Modified Files: listpanel.h Log Message: ADDED: panel profiles, initial version (no tab delete, because of crash) Index: listpanel.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Panel/listpanel.h,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** listpanel.h 4 Oct 2004 22:50:26 -0000 1.27 --- listpanel.h 5 Oct 2004 00:39:47 -0000 1.28 *************** *** 88,91 **** --- 88,92 ---- } void setPanelToolbar(); + bool isLeft() {return _left;} public slots: |
From: Shie E. <er...@us...> - 2004-10-04 22:50:52
|
Update of /cvsroot/krusader/krusader_kde3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26786 Modified Files: Krusader.kdevelop Log Message: some infrastructure for bookman2. don't try to play with it - doesn't work yet. Index: Krusader.kdevelop =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/Krusader.kdevelop,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** Krusader.kdevelop 30 Jul 2004 14:16:18 -0000 1.22 --- Krusader.kdevelop 4 Oct 2004 22:50:25 -0000 1.23 *************** *** 57,62 **** <f77compilerbinary/> <cflags/> ! <cxxflags>-DQT_THREAD_SUPPORT</cxxflags> <f77flags/> </default> </configurations> --- 57,63 ---- <f77compilerbinary/> <cflags/> ! <cxxflags>-DQT_THREAD_SUPPORT </cxxflags> <f77flags/> + <envvars/> </default> </configurations> *************** *** 78,81 **** --- 79,83 ---- <staticmembers>false</staticmembers> <demanglenames>true</demanglenames> + <outputradix>10</outputradix> </display> </kdevdebugger> |
From: Shie E. <er...@us...> - 2004-10-04 22:50:37
|
Update of /cvsroot/krusader/krusader_kde3/krusader/Panel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26786/krusader/Panel Modified Files: listpanel.cpp listpanel.h Log Message: some infrastructure for bookman2. don't try to play with it - doesn't work yet. Index: listpanel.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Panel/listpanel.h,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** listpanel.h 30 Aug 2004 20:37:38 -0000 1.26 --- listpanel.h 4 Oct 2004 22:50:26 -0000 1.27 *************** *** 68,71 **** --- 68,72 ---- class PanelPopup; class SyncBrowseButton; + class KrBookmarkButton; class ListPanel : public QWidget { *************** *** 158,161 **** --- 159,163 ---- PanelPopup *popup; BookmarksButton *bookmarksButton; + KrBookmarkButton *bmb; DirHistoryQueue* dirHistoryQueue; DirHistoryButton* historyButton; Index: listpanel.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Panel/listpanel.cpp,v retrieving revision 1.92 retrieving revision 1.93 diff -C2 -d -r1.92 -r1.93 *** listpanel.cpp 28 Sep 2004 23:14:20 -0000 1.92 --- listpanel.cpp 4 Oct 2004 22:50:26 -0000 1.93 *************** *** 96,99 **** --- 96,100 ---- #ifdef BOOKMAN2 #include "../BookMan/krbookmarkbutton.h" + #endif // BOOKMAN2 *************** *** 141,147 **** "or add subfolder to the list." ) ); #ifdef BOOKMAN2 ! KrBookmarkButton *bmb = new KrBookmarkButton(this); connect( bmb, SIGNAL( pressed() ), this, SLOT( slotFocusOnMe() ) ); ! connect( bmb->handler(), SIGNAL( openUrl( const KURL& ) ), func, SLOT( delayedOpenUrl( const KURL& ) ) ); #endif // BOOKMAN2 --- 142,148 ---- "or add subfolder to the list." ) ); #ifdef BOOKMAN2 ! bmb = new KrBookmarkButton(this); connect( bmb, SIGNAL( pressed() ), this, SLOT( slotFocusOnMe() ) ); ! connect( bmb, SIGNAL( openUrl( const KURL& ) ), func, SLOT( delayedOpenUrl( const KURL& ) ) ); #endif // BOOKMAN2 |
From: Shie E. <er...@us...> - 2004-10-04 22:50:37
|
Update of /cvsroot/krusader/krusader_kde3/krusader/BookMan In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26786/krusader/BookMan Modified Files: krbookmarkbutton.cpp krbookmarkbutton.h krbookmarkhandler.cpp krbookmarkhandler.h Log Message: some infrastructure for bookman2. don't try to play with it - doesn't work yet. Index: krbookmarkhandler.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/BookMan/krbookmarkhandler.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** krbookmarkhandler.cpp 1 Oct 2004 00:20:58 -0000 1.5 --- krbookmarkhandler.cpp 4 Oct 2004 22:50:26 -0000 1.6 *************** *** 19,27 **** #define TOP_OF_MENU 0 #define BOTTOM_OF_MENU _menu->indexOf(Border) ! #define CONNECT_BM(X) connect(X, SIGNAL(activated(KrBookmark *)), \ ! this, SLOT(bookmarkActivated(KrBookmark *))); #define STOPWATCH _dirwatch->stopDirScan(_filename) #define STARTWATCH _dirwatch->restartDirScan(_filename) KrBookmarkHandler::KrBookmarkHandler(QWidget *parent, KPopupMenu *menu): QObject(parent), _menu(menu) { // create our own action collection and make the shortcuts apply only to parent --- 19,37 ---- #define TOP_OF_MENU 0 #define BOTTOM_OF_MENU _menu->indexOf(Border) ! #define CONNECT_BM(X) connect(X, SIGNAL(activated(KrBookmark *)), this, SLOT(bookmarkActivated(KrBookmark *))); #define STOPWATCH _dirwatch->stopDirScan(_filename) #define STARTWATCH _dirwatch->restartDirScan(_filename) + KrBookmarkHandler::KrBookmarkHandler(QObject *parent): QObject(parent) { + // create our own action collection and make the shortcuts apply only to parent + _collection = new KActionCollection(0, parent, "bookmark collection"); + + // create _root: father of all bookmarks. it is a dummy bookmark and never shown + _root = new KrBookmark("root"); + + // load bookmarks and populate the menu + importFromFile(); + } + KrBookmarkHandler::KrBookmarkHandler(QWidget *parent, KPopupMenu *menu): QObject(parent), _menu(menu) { // create our own action collection and make the shortcuts apply only to parent *************** *** 34,38 **** _filename = locateLocal( "data", BOOKMARKS_FILE ); _dirwatch = new KDirWatch(this); ! _dirwatch->addFile(locateLocal("data", BOOKMARKS_FILE)); connect(_dirwatch, SIGNAL(dirty(const QString &)), this, SLOT(bookmarksUpdated(const QString &))); connect(_dirwatch, SIGNAL(created(const QString &)), this, SLOT(bookmarksUpdated(const QString &))); --- 44,48 ---- _filename = locateLocal( "data", BOOKMARKS_FILE ); _dirwatch = new KDirWatch(this); ! //_dirwatch->addFile(locateLocal("data", BOOKMARKS_FILE)); connect(_dirwatch, SIGNAL(dirty(const QString &)), this, SLOT(bookmarksUpdated(const QString &))); connect(_dirwatch, SIGNAL(created(const QString &)), this, SLOT(bookmarksUpdated(const QString &))); *************** *** 98,102 **** // add to menu ! bm->plug(_menu, BOTTOM_OF_MENU); // add on top CONNECT_BM(bm); --- 108,112 ---- // add to menu ! bm->plug(_menu, BOTTOM_OF_MENU); CONNECT_BM(bm); *************** *** 119,122 **** --- 129,147 ---- } + void KrBookmarkHandler::exportToFileFolder(QDomDocument &doc, QDomElement &parent, KrBookmark *folder) { + for (KrBookmark *bm = folder->children().first(); bm; bm = folder->children().next()) { + if (bm->isFolder()) { + QDomElement newFolder = doc.createElement("folder"); + parent.appendChild(newFolder); + QDomElement title = doc.createElement("title"); + title.appendChild(doc.createTextNode(bm->text())); + newFolder.appendChild(title); + exportToFileFolder(doc, newFolder, bm); + } else { + exportToFileBookmark(doc, parent, bm); + } + } + } + // export to file using the xbel standard // *************** *** 135,139 **** // </xbel> void KrBookmarkHandler::exportToFile() { - #if 0 // disable the dirwatch while saving the file STOPWATCH; --- 160,163 ---- *************** *** 143,151 **** doc.appendChild( root ); ! // iterate through the bookmark list ! for (KrBookmark *bm = _bookmarks.first(); bm; bm = _bookmarks.next()) { ! // TODO: support for folder ! exportToFileBookmark(doc, root, bm); ! } QFile file(_filename); --- 167,171 ---- doc.appendChild( root ); ! exportToFileFolder(doc, root, _root); QFile file(_filename); *************** *** 160,164 **** // re-enable the dirwatch STARTWATCH; - #endif } --- 180,183 ---- *************** *** 218,222 **** void KrBookmarkHandler::importFromFile() { STOPWATCH; - QFile file( _filename ); if ( !file.open(IO_ReadOnly)) --- 237,240 ---- *************** *** 230,234 **** goto ERROR; } - // iterate through the document: first child should be "xbel" (skip all until we find it) n = doc.firstChild(); --- 248,251 ---- *************** *** 240,244 **** goto ERROR; } else n = n.firstChild(); // skip the xbel part - importFromFileFolder(n, _root, &errorMsg); goto SUCCESS; --- 257,260 ---- *************** *** 250,254 **** file.close(); buildMenu(_root, _menu); - STARTWATCH; } --- 266,269 ---- Index: krbookmarkbutton.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/BookMan/krbookmarkbutton.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** krbookmarkbutton.cpp 28 Sep 2004 23:15:09 -0000 1.3 --- krbookmarkbutton.cpp 4 Oct 2004 22:50:26 -0000 1.4 *************** *** 16,23 **** setAcceptDrops(false); ! KActionMenu *acmBookmarks = new KActionMenu(i18n("Bookmarks"), "bookmark", 0, 0); acmBookmarks->setDelayed(false); ! _handler = new KrBookmarkHandler(this, acmBookmarks->popupMenu()); setPopup(acmBookmarks->popupMenu()); } --- 16,23 ---- setAcceptDrops(false); ! acmBookmarks = new KActionMenu(i18n("Bookmarks"), "bookmark", 0, 0); acmBookmarks->setDelayed(false); ! //_handler = new KrBookmarkHandler(this, acmBookmarks->popupMenu()); setPopup(acmBookmarks->popupMenu()); } Index: krbookmarkhandler.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/BookMan/krbookmarkhandler.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** krbookmarkhandler.h 1 Oct 2004 00:20:58 -0000 1.5 --- krbookmarkhandler.h 4 Oct 2004 22:50:26 -0000 1.6 *************** *** 17,20 **** --- 17,21 ---- enum Actions { Border, BookmarkCurrent, ManageBookmarks }; public: + KrBookmarkHandler(QObject *parent); KrBookmarkHandler(QWidget *parent, KPopupMenu *menu); *************** *** 27,30 **** --- 28,32 ---- bool importFromFileFolder(QDomNode &first, KrBookmark *parent, QString *errorMsg); void exportToFile(); + void exportToFileFolder(QDomDocument &doc, QDomElement &parent, KrBookmark *folder); void exportToFileBookmark(QDomDocument &doc, QDomElement &where, KrBookmark *bm); void clearBookmarks(KrBookmark *root); Index: krbookmarkbutton.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/BookMan/krbookmarkbutton.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** krbookmarkbutton.h 28 Sep 2004 23:15:33 -0000 1.2 --- krbookmarkbutton.h 4 Oct 2004 22:50:26 -0000 1.3 *************** *** 6,15 **** --- 6,20 ---- class KrBookmarkButton: public QToolButton { + Q_OBJECT public: KrBookmarkButton(QWidget *parent); KrBookmarkHandler *handler() const { return _handler; } + + signals: + void openUrl(const KURL &url); private: KrBookmarkHandler *_handler; + KActionMenu *acmBookmarks; }; |
From: Shie E. <er...@us...> - 2004-10-04 22:50:36
|
Update of /cvsroot/krusader/krusader_kde3/krusader In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26786/krusader Modified Files: krusader.cpp krusader.h Log Message: some infrastructure for bookman2. don't try to play with it - doesn't work yet. Index: krusader.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/krusader.h,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** krusader.h 26 Sep 2004 21:57:57 -0000 1.29 --- krusader.h 4 Oct 2004 22:50:26 -0000 1.30 *************** *** 58,61 **** --- 58,62 ---- class Expander; class KMountMan; + class KrBookmarkHandler; class Krusader : public KParts::MainWindow { *************** *** 130,133 **** --- 131,135 ---- static UserAction *userAction; static Expander *expander; + static KrBookmarkHandler *bookman; signals: *************** *** 145,148 **** --- 147,151 ---- #define krConfig Krusader::App->config #define krMtMan (*(Krusader::App->mountMan)) + #define krBookMan Krusader::App->bookman #define SLOTS Krusader::App->slot #define krLoader Krusader::App->iconLoader *************** *** 193,198 **** #define krCombine Krusader::App->actCombine #define krUserMenu Krusader::App->actUserMenu ! #define krUserAction Krusader::App->userAction ! #define krExpander Krusader::App->expander #endif --- 196,201 ---- #define krCombine Krusader::App->actCombine #define krUserMenu Krusader::App->actUserMenu ! #define krUserAction Krusader::App->userAction ! #define krExpander Krusader::App->expander #endif Index: krusader.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/krusader.cpp,v retrieving revision 1.90 retrieving revision 1.91 diff -C2 -d -r1.90 -r1.91 *** krusader.cpp 26 Sep 2004 21:57:57 -0000 1.90 --- krusader.cpp 4 Oct 2004 22:50:26 -0000 1.91 *************** *** 87,90 **** --- 87,91 ---- #include "panelmanager.h" #include "MountMan/kmountman.h" + #include "BookMan/krbookmarkhandler.h" // define the static members *************** *** 147,150 **** --- 148,152 ---- Expander *Krusader::expander = 0; UserMenu *Krusader::userMenu = 0; + KrBookmarkHandler *Krusader::bookman = 0; // construct the views, statusbar and menu bars and prepare Krusader to start *************** *** 206,209 **** --- 208,214 ---- mountMan = new KMountMan(); + // create bookman + bookman = new KrBookmarkHandler(this); + // setup all the krusader's actions setupActions(); |
From: Karai C. <ck...@us...> - 2004-10-04 20:36:25
|
Update of /cvsroot/krusader/krusader_kde3/krusader/Search In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27425/krusader_kde3/krusader/Search Modified Files: krsearchdialog.cpp Log Message: FIXED: new searcher freezes at exiting with ESC Index: krsearchdialog.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Search/krsearchdialog.cpp,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** krsearchdialog.cpp 2 Oct 2004 16:05:42 -0000 1.29 --- krsearchdialog.cpp 4 Oct 2004 20:36:06 -0000 1.30 *************** *** 262,270 **** krFind->setEnabled(true); if( isAccept ) ! accept(); else ! reject(); ! delete this; } --- 262,270 ---- krFind->setEnabled(true); if( isAccept ) ! QDialog::accept(); else ! QDialog::reject(); ! this->deleteLater(); } |
From: Karai C. <ck...@us...> - 2004-10-03 10:52:42
|
Update of /cvsroot/krusader/krusader_kde3/krusader/Synchronizer In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16297/krusader_kde3/krusader/Synchronizer Modified Files: synchronizergui.cpp Log Message: FIXED: switching to the main tab at comparing Index: synchronizergui.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Synchronizer/synchronizergui.cpp,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** synchronizergui.cpp 27 Sep 2004 19:58:18 -0000 1.24 --- synchronizergui.cpp 3 Oct 2004 10:52:31 -0000 1.25 *************** *** 1614,1617 **** --- 1614,1618 ---- } query.setFilter( fileFilter->currentText() ); + synchronizerTabs->setCurrentPage(0); bool autoScrolling = cbAutoScroll->isChecked(); |
From: Karai C. <ck...@us...> - 2004-10-03 08:37:33
|
Update of /cvsroot/krusader/krusader_kde3/krusader/Locate In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21958/krusader_kde3/krusader/Locate Modified Files: locate.cpp locate.h Log Message: ADDED: locate, don't search in path Index: locate.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Locate/locate.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** locate.h 26 Aug 2004 15:21:01 -0000 1.3 --- locate.h 3 Oct 2004 08:36:01 -0000 1.4 *************** *** 66,71 **** --- 66,76 ---- bool stopping; + + bool dontSearchPath; bool onlyExist; + bool isCs; + QString pattern; + KHistoryCombo *locateSearchFor; KListView *resultList; *************** *** 79,82 **** --- 84,88 ---- KListViewItem *findCurrentItem; + QCheckBox *dontSearchInPath; QCheckBox *existingFiles; QCheckBox *caseSensitive; Index: locate.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Locate/locate.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** locate.cpp 3 Sep 2004 16:19:14 -0000 1.8 --- locate.cpp 3 Oct 2004 08:35:50 -0000 1.9 *************** *** 87,90 **** --- 87,92 ---- QSpacerItem* spacer = new QSpacerItem( 40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); hbox2->layout()->addItem( spacer ); + dontSearchInPath = new QCheckBox( i18n( "Don't search in path" ), hbox2, "dontSearchInPath" ); + dontSearchInPath->setChecked( krConfig->readBoolEntry("Dont Search In Path") ); existingFiles = new QCheckBox( i18n( "Show only the existing files" ), hbox2, "existingFiles" ); existingFiles->setChecked( krConfig->readBoolEntry("Existing Files") ); *************** *** 177,186 **** void LocateDlg::slotUser3() /* The locate button */ { - bool isCs; - locateSearchFor->addToHistory(locateSearchFor->currentText()); QStringList list = locateSearchFor->historyItems(); krConfig->setGroup("Locate"); krConfig->writeEntry("Search For", list); krConfig->writeEntry("Existing Files", onlyExist = existingFiles->isChecked() ); krConfig->writeEntry("Case Sensitive", isCs = caseSensitive->isChecked() ); --- 179,187 ---- void LocateDlg::slotUser3() /* The locate button */ { locateSearchFor->addToHistory(locateSearchFor->currentText()); QStringList list = locateSearchFor->historyItems(); krConfig->setGroup("Locate"); krConfig->writeEntry("Search For", list); + krConfig->writeEntry("Dont Search In Path", dontSearchPath = dontSearchInPath->isChecked() ); krConfig->writeEntry("Existing Files", onlyExist = existingFiles->isChecked() ); krConfig->writeEntry("Case Sensitive", isCs = caseSensitive->isChecked() ); *************** *** 213,217 **** if( !isCs ) locateProc << "-i"; ! locateProc << locateSearchFor->currentText(); collectedErr = ""; --- 214,223 ---- if( !isCs ) locateProc << "-i"; ! locateProc << (pattern = locateSearchFor->currentText()); ! ! if( !pattern.startsWith( "*" ) ) ! pattern = "*" + pattern; ! if( !pattern.endsWith( "*" ) ) ! pattern = pattern + "*"; collectedErr = ""; *************** *** 246,249 **** --- 252,266 ---- else { + if( dontSearchPath ) + { + QRegExp regExp( pattern, isCs, true ); + QString fileName = (*it).stripWhiteSpace(); + if( fileName.endsWith( "/" ) && fileName != "/" ) + fileName.truncate( fileName.length() -1 ); + fileName = fileName.mid( fileName.findRev( '/' ) + 1 ); + + if( !regExp.exactMatch( fileName ) ) + continue; + } if( onlyExist ) { *************** *** 266,270 **** } ! void LocateDlg::processStderr(KProcess *proc, char *buffer, int length) { char *buf = new char[ length+1 ]; --- 283,287 ---- } ! void LocateDlg::processStderr(KProcess *, char *buffer, int length) { char *buf = new char[ length+1 ]; |
From: Dirk E. <des...@us...> - 2004-10-02 16:24:09
|
Update of /cvsroot/krusader/krusader_kde3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32281 Modified Files: ChangeLog Log Message: Index: ChangeLog =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/ChangeLog,v retrieving revision 1.311 retrieving revision 1.312 diff -C2 -d -r1.311 -r1.312 *** ChangeLog 1 Oct 2004 15:21:13 -0000 1.311 --- ChangeLog 2 Oct 2004 16:22:44 -0000 1.312 *************** *** 68,72 **** --- 68,75 ---- FIXED: mountman changes... read the email ;-) + UPDATED: Hungarian translation + UPDATED: German translation + 1.40 ====================== |
From: Karai C. <ck...@us...> - 2004-10-02 16:08:15
|
Update of /cvsroot/krusader/krusader_kde3/krusader/Search In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28056/krusader_kde3/krusader/Search Modified Files: krsearchdialog.cpp krsearchdialog.h Log Message: ADDED: keeping the most important searcher window settings Index: krsearchdialog.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Search/krsearchdialog.cpp,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** krsearchdialog.cpp 2 Oct 2004 10:17:34 -0000 1.28 --- krsearchdialog.cpp 2 Oct 2004 16:05:42 -0000 1.29 *************** *** 51,54 **** --- 51,63 ---- #include <qheader.h> + QString KrSearchDialog::lastSearchText = ""; + int KrSearchDialog::lastSearchType = 0; + bool KrSearchDialog::lastSearchForCase = false; + bool KrSearchDialog::lastContainsWholeWord = false; + bool KrSearchDialog::lastContainsWithCase = true; + bool KrSearchDialog::lastSearchInSubDirs = true; + bool KrSearchDialog::lastSearchInArchives = false; + bool KrSearchDialog::lastFollowSymLinks = false; + // class starts here ///////////////////////////////////////// KrSearchDialog::KrSearchDialog( QWidget* parent, const char* name, bool modal, WFlags fl ) *************** *** 98,102 **** advancedFilter = new AdvancedFilter( searcherTabs, "advancedFilter" ); searcherTabs->insertTab( advancedFilter, i18n( "&Advanced" ) ); ! resultTab = new QWidget( searcherTabs, "resultTab" ); resultLayout = new QGridLayout( resultTab ); --- 107,122 ---- advancedFilter = new AdvancedFilter( searcherTabs, "advancedFilter" ); searcherTabs->insertTab( advancedFilter, i18n( "&Advanced" ) ); ! ! // load the last used values ! generalFilter->searchFor->setEditText( lastSearchText ); ! generalFilter->searchFor->lineEdit()->selectAll(); ! generalFilter->ofType->setCurrentItem( lastSearchType ); ! generalFilter->searchForCase->setChecked( lastSearchForCase ); ! generalFilter->containsWholeWord->setChecked( lastContainsWholeWord ); ! generalFilter->containsTextCase->setChecked( lastContainsWithCase ); ! generalFilter->searchInDirs->setChecked( lastSearchInSubDirs ); ! generalFilter->searchInArchives->setChecked( lastSearchInArchives ); ! generalFilter->followLinks->setChecked( lastFollowSymLinks ); ! resultTab = new QWidget( searcherTabs, "resultTab" ); resultLayout = new QGridLayout( resultTab ); *************** *** 208,212 **** } ! void KrSearchDialog::closeDialog() { // stop the search if it's on-going --- 228,232 ---- } ! void KrSearchDialog::closeDialog( bool isAccept ) { // stop the search if it's on-going *************** *** 216,219 **** --- 236,241 ---- } + // saving the searcher state + krConfig->setGroup( "Search" ); *************** *** 228,240 **** krConfig->writeEntry("Perm Width", resultsList->columnWidth( 4 ) ); hide(); // re-enable the search action krFind->setEnabled(true); ! accept(); } void KrSearchDialog::reject() { ! closeDialog(); ! QDialog::reject(); } --- 250,274 ---- krConfig->writeEntry("Perm Width", resultsList->columnWidth( 4 ) ); + lastSearchText = generalFilter->searchFor->currentText(); + lastSearchType = generalFilter->ofType->currentItem(); + lastSearchForCase = generalFilter->searchForCase->isChecked(); + lastContainsWholeWord = generalFilter->containsWholeWord->isChecked(); + lastContainsWithCase = generalFilter->containsTextCase->isChecked(); + lastSearchInSubDirs = generalFilter->searchInDirs->isChecked(); + lastSearchInArchives = generalFilter->searchInArchives->isChecked(); + lastFollowSymLinks = generalFilter->followLinks->isChecked(); hide(); // re-enable the search action krFind->setEnabled(true); ! if( isAccept ) ! accept(); ! else ! reject(); ! ! delete this; } void KrSearchDialog::reject() { ! closeDialog( false ); } Index: krsearchdialog.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Search/krsearchdialog.h,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** krsearchdialog.h 2 Oct 2004 10:17:35 -0000 1.13 --- krsearchdialog.h 2 Oct 2004 16:05:42 -0000 1.14 *************** *** 61,65 **** void stopSearch(); void found(QString what, QString where, KIO::filesize_t size, time_t mtime, QString perm); ! void closeDialog(); void resultClicked(QListViewItem*); --- 61,65 ---- void stopSearch(); void found(QString what, QString where, KIO::filesize_t size, time_t mtime, QString perm); ! void closeDialog( bool isAccept = true ); void resultClicked(QListViewItem*); *************** *** 101,104 **** --- 101,113 ---- bool closed; + static QString lastSearchText; + static int lastSearchType; + static bool lastSearchForCase; + static bool lastContainsWholeWord; + static bool lastContainsWithCase; + static bool lastSearchInSubDirs; + static bool lastSearchInArchives; + static bool lastFollowSymLinks; + int sizeX; int sizeY; |
From: Dirk E. <des...@us...> - 2004-10-02 12:16:51
|
Update of /cvsroot/krusader/krusader_kde3/po In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17339/po Modified Files: hu.po Log Message: krusader-1.50-cvs Index: hu.po =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/po/hu.po,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** hu.po 21 Sep 2004 21:44:57 -0000 1.11 --- hu.po 2 Oct 2004 12:16:28 -0000 1.12 *************** *** 12,18 **** "Project-Id-Version: krusader-1.50-cvs\n" "Report-Msgid-Bugs-To: \n" ! "POT-Creation-Date: 2004-09-21 23:25+0200\n" ! "PO-Revision-Date: 2004-08-28 14:08+0200\n" ! "Last-Translator: Zoltán Kukk<kuk...@fr...>\n" "Language-Team: Hungarian\n" "MIME-Version: 1.0\n" --- 12,18 ---- "Project-Id-Version: krusader-1.50-cvs\n" "Report-Msgid-Bugs-To: \n" [...3817 lines suppressed...] - - #~ msgid "Newer files (compare mode)" - #~ msgstr "Ãjabb fájlok (összehasonlÃtó mód)" - - #~ msgid "Older files (compare mode)" - #~ msgstr "Régebbi fájlok (összehasonlÃtó mód)" - - #~ msgid "Identical files (compare mode)" - #~ msgstr "Egyedi fájlok (összehasonlÃtó mód)" - - #~ msgid "Exclusive files (compare mode)" - #~ msgstr "Kizárólagos fájlok (összehasonlÃtó mód)" - - #~ msgid "Compare mode is temporarily disabled. sorry" - #~ msgstr "Sajnálom, de az összehasonlÃtó mód átmenetileg nem érhetÅ el" - - #~ msgid "Failed to run 'df', MountMan cannot be started." - #~ msgstr "" - #~ "Nem sikerült futtatni a 'df'-et, nem lehet elindÃtani a CsatoláskezelÅt." --- 4294,4295 ---- |
From: Karai C. <ck...@us...> - 2004-10-02 10:17:51
|
Update of /cvsroot/krusader/krusader_kde3/krusader/Search In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29549/krusader_kde3/krusader/Search Modified Files: krsearchdialog.cpp krsearchdialog.h Log Message: ADDED: saving / restoring the last window size / field sizes Index: krsearchdialog.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Search/krsearchdialog.cpp,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** krsearchdialog.cpp 27 Sep 2004 19:58:18 -0000 1.27 --- krsearchdialog.cpp 2 Oct 2004 10:17:34 -0000 1.28 *************** *** 49,52 **** --- 49,53 ---- #include <qcursor.h> #include <qclipboard.h> + #include <qheader.h> // class starts here ///////////////////////////////////////// *************** *** 148,158 **** int j=QFontMetrics(resultsList->font()).width("0"); j=(i>j ? i : j); ! resultsList->setColumnWidth(0, j*14); ! resultsList->setColumnWidth(1, j*25); ! resultsList->setColumnWidth(2, j*6); ! resultsList->setColumnWidth(3, j*7); ! resultsList->setColumnWidth(4, j*7); resultsList->setColumnAlignment( 2, AlignRight ); resultLayout->addWidget( resultsList, 0, 0 ); searcherTabs->insertTab( resultTab, i18n( "&Results" ) ); --- 149,162 ---- int j=QFontMetrics(resultsList->font()).width("0"); j=(i>j ? i : j); ! ! resultsList->setColumnWidth(0, krConfig->readNumEntry("Name Width", j*14) ); ! resultsList->setColumnWidth(1, krConfig->readNumEntry("Path Width", j*25) ); ! resultsList->setColumnWidth(2, krConfig->readNumEntry("Size Width", j*6) ); ! resultsList->setColumnWidth(3, krConfig->readNumEntry("Date Width", j*7) ); ! resultsList->setColumnWidth(4, krConfig->readNumEntry("Perm Width", j*7) ); resultsList->setColumnAlignment( 2, AlignRight ); + resultsList->header()->setStretchEnabled( true, 1 ); + resultLayout->addWidget( resultsList, 0, 0 ); searcherTabs->insertTab( resultTab, i18n( "&Results" ) ); *************** *** 185,189 **** generalFilter->searchInEdit->setText(path); ! show(); // disable the search action ... no 2 searchers ! --- 189,203 ---- generalFilter->searchInEdit->setText(path); ! krConfig->setGroup( "Search" ); ! int sx = krConfig->readNumEntry( "Window Width", -1 ); ! int sy = krConfig->readNumEntry( "Window Height", -1 ); ! ! if( sx != -1 && sy != -1 ) ! resize( sx, sy ); ! ! if( krConfig->readBoolEntry( "Window Maximized", false ) ) ! showMaximized(); ! else ! show(); // disable the search action ... no 2 searchers ! *************** *** 201,205 **** searcher = 0; } ! hide(); // re-enable the search action krFind->setEnabled(true); --- 215,232 ---- searcher = 0; } ! ! krConfig->setGroup( "Search" ); ! ! krConfig->writeEntry("Window Width", sizeX ); ! krConfig->writeEntry("Window Height", sizeY ); ! krConfig->writeEntry("Window Maximized", isMaximized() ); ! ! krConfig->writeEntry("Name Width", resultsList->columnWidth( 0 ) ); ! krConfig->writeEntry("Path Width", resultsList->columnWidth( 1 ) ); ! krConfig->writeEntry("Size Width", resultsList->columnWidth( 2 ) ); ! krConfig->writeEntry("Date Width", resultsList->columnWidth( 3 ) ); ! krConfig->writeEntry("Perm Width", resultsList->columnWidth( 4 ) ); ! ! hide(); // re-enable the search action krFind->setEnabled(true); *************** *** 212,215 **** --- 239,251 ---- } + void KrSearchDialog::resizeEvent( QResizeEvent *e ) + { + if( !isMaximized() ) + { + sizeX = e->size().width(); + sizeY = e->size().height(); + } + } + void KrSearchDialog::found(QString what, QString where, KIO::filesize_t size, time_t mtime, QString perm){ // convert the time_t to struct tm Index: krsearchdialog.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Search/krsearchdialog.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** krsearchdialog.h 27 Sep 2004 17:18:54 -0000 1.12 --- krsearchdialog.h 2 Oct 2004 10:17:35 -0000 1.13 *************** *** 67,70 **** --- 67,71 ---- virtual void closeEvent(QCloseEvent *e); virtual void rightClickMenu(QListViewItem*, const QPoint&, int); + virtual void resizeEvent( QResizeEvent *e ); protected slots: *************** *** 99,102 **** --- 100,106 ---- bool isSearching; bool closed; + + int sizeX; + int sizeY; }; |
From: Jonas B. <jb...@us...> - 2004-10-01 15:21:23
|
Update of /cvsroot/krusader/krusader_kde3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28066 Modified Files: ChangeLog Log Message: ADDED: mkdir (F7) can now create whole trees on the fly ("foo/bar/test") Index: ChangeLog =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/ChangeLog,v retrieving revision 1.310 retrieving revision 1.311 diff -C2 -d -r1.310 -r1.311 *** ChangeLog 27 Sep 2004 19:58:17 -0000 1.310 --- ChangeLog 1 Oct 2004 15:21:13 -0000 1.311 *************** *** 1,3 **** --- 1,4 ---- ====================== + ADDED: mkdir (F7) can now create whole trees on the fly ("foo/bar/test") ADDED: synchronizer uses the search filters ADDED: search profiles |
From: Jonas B. <jb...@us...> - 2004-10-01 15:21:23
|
Update of /cvsroot/krusader/krusader_kde3/krusader/Panel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28066/krusader/Panel Modified Files: panelfunc.cpp Log Message: ADDED: mkdir (F7) can now create whole trees on the fly ("foo/bar/test") Index: panelfunc.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Panel/panelfunc.cpp,v retrieving revision 1.90 retrieving revision 1.91 diff -C2 -d -r1.90 -r1.91 *** panelfunc.cpp 30 Sep 2004 16:18:31 -0000 1.90 --- panelfunc.cpp 1 Oct 2004 15:21:12 -0000 1.91 *************** *** 427,439 **** return ; ! // if the name is already taken - quit ! if ( files()->vfs_search(dirName) ) { ! KMessageBox::sorry( krApp, i18n( "A directory or a file with this name already exists." ) ); ! return ; ! } ! panel->view->setNameToMakeCurrent( dirName ); ! // as always - the vfs do the job ! files() ->vfs_mkdir( dirName ); } --- 427,453 ---- return ; ! QStringList dirTree = QStringList::split( "/", dirName ); ! ! for ( QStringList::Iterator it = dirTree.begin(); it != dirTree.end(); ++it ) { ! // check if the name is already taken ! if ( files()->vfs_search( *it ) ) { ! // if it is the last dir to be created - quit ! if ( *it == dirTree.last() ) { ! KMessageBox::sorry( krApp, i18n( "A directory or a file with this name already exists." ) ); ! return; ! } ! // else go into this dir ! else { ! openUrl( *it ); ! continue; ! } ! } ! panel->view->setNameToMakeCurrent( *it ); ! // as always - the vfs do the job ! files() ->vfs_mkdir( *it ); ! if ( dirTree.count() > 1) ! openUrl( *it ); ! } // for } |
From: Karai C. <ck...@us...> - 2004-10-01 06:41:23
|
Update of /cvsroot/krusader/krusader_kde3/krusader/Search In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26490/krusader_kde3/krusader/Search Modified Files: generalfilter.cpp Log Message: CHANGED: searcher icons to kde themeable ones Index: generalfilter.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Search/generalfilter.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** generalfilter.cpp 27 Sep 2004 19:58:18 -0000 1.3 --- generalfilter.cpp 1 Oct 2004 06:41:09 -0000 1.4 *************** *** 36,147 **** #include <kfiledialog.h> #include <kmessagebox.h> ! ! static const char* const image1_data[] = { ! "16 16 52 1", ! ". c None", ! "# c #000000", ! "Q c #101010", ! "X c #181c18", ! "K c #202020", ! "w c #313031", ! "W c #313431", ! "V c #414041", ! "U c #414441", ! "a c #4a3018", ! "E c #4a484a", ! "T c #4a4c4a", ! "l c #524c4a", ! "h c #52504a", ! "j c #525052", ! "i c #5a5952", ! "J c #6a6962", ! "P c #6a6d6a", ! "S c #8b8d8b", ! "D c #949594", ! "R c #9c999c", ! "O c #9c9d9c", ! "C c #a4a19c", ! "M c #a4a1a4", ! "N c #a4a5a4", ! "I c #acaaac", ! "B c #acaeac", ! "F c #b47d41", ! "v c #b4b2b4", ! "u c #b4b6b4", ! "A c #bdbabd", ! "t c #bdbebd", ! "k c #c5854a", ! "H c #c5c2c5", ! "s c #c5c6c5", ! "r c #cdcacd", ! "L c #cdcecd", ! "z c #d5d2d5", ! "q c #d5d6d5", ! "x c #dedade", ! "p c #dedede", ! "b c #e6a562", ! "G c #e6e2e6", ! "o c #e6e6e6", ! "y c #eeeae6", ! "n c #eeeeee", ! "m c #f6f6f6", ! "f c #ffae62", ! "e c #ffc283", ! "d c #ffc683", ! "g c #ffca8b", ! "c c #ffd29c", ! "......####......", ! ".....##.####.#..", ! "....#.....####..", ! "...........###..", ! "..........####..", ! ".aaaa...........", ! "abcdbaaaaaaa....", ! "acdeffffffff#...", ! "ageahhhihhjjh###", ! "aeklmmnopqrstuvw", ! "aeaxpyopzsABCDE.", ! "aFhxxGpqrHuICJK.", ! "aaLrqqzLHABMDE..", ! "ajLtssHtuBNOPQ..", ! "atNIBBINMRDSE...", ! "KEETTTEEUVVWX..."}; ! ! static const char * const image2_data[] = { ! "16 16 17 1", ! " c None", ! ". c #704A13", ! "+ c #8A6E3C", ! "@ c #997E52", ! "# c #2C1D06", ! "$ c #EAD9B9", ! "% c #E0CBA7", ! "& c #C8A15E", ! "* c #DAB579", ! "= c #F8F5F0", ! "- c #BF9346", ! "; c #AB6503", ! "> c #C1892B", ! ", c #B6710C", ! "' c #965702", ! ") c #5A3202", ! "! c #0D0702", ! " ", ! " .+@@@+# ", ! " +$$$%$$&# ", ! " .$%**%**$&# ", ! " .$*&*$=***%&# ", ! " .%*&**==**&&%-#", ! " .-&&&*$=%&&&-+#", ! " #;>$$$==$$$*,.#", ! " #;>========$,.#", ! " #;,-&*$=*&-,,.#", ! " #.;,,-%=&>,,')#", ! " !)';,,%=>,,')# ", ! " !).;,&%>;;)# ", ! " !).;;;;;)# ", ! " !#).)))# ", ! " ###### "}; ! GeneralFilter::GeneralFilter( bool hasDirOptions, QWidget *parent, const char *name ) : QWidget( parent, name ) --- 36,40 ---- #include <kfiledialog.h> #include <kmessagebox.h> ! #include <kiconloader.h> GeneralFilter::GeneralFilter( bool hasDirOptions, QWidget *parent, const char *name ) : QWidget( parent, name ) *************** *** 201,204 **** --- 94,101 ---- if( hasDirOptions ) { + KIconLoader *iconLoader = new KIconLoader(); + QPixmap imageAdd = iconLoader->loadIcon( "1downarrow", KIcon::Panel, 16 ); + QPixmap imageFolder = iconLoader->loadIcon( "folder", KIcon::Panel, 16 ); + // Options for search in *************** *** 222,231 **** searchInBtnAdd = new QToolButton( searchInGroup, "searchInBtnAdd" ); searchInBtnAdd->setText( "" ); ! searchInBtnAdd->setPixmap( QPixmap( ( const char** ) image2_data ) ); searchInLayout->addWidget( searchInBtnAdd, 0, 1 ); searchInBtn = new QToolButton( searchInGroup, "searchInBtn" ); searchInBtn->setText( "" ); ! searchInBtn->setPixmap( QPixmap( ( const char** ) image1_data ) ); searchInLayout->addWidget( searchInBtn, 0, 2 ); --- 119,128 ---- searchInBtnAdd = new QToolButton( searchInGroup, "searchInBtnAdd" ); searchInBtnAdd->setText( "" ); ! searchInBtnAdd->setPixmap( imageAdd ); searchInLayout->addWidget( searchInBtnAdd, 0, 1 ); searchInBtn = new QToolButton( searchInGroup, "searchInBtn" ); searchInBtn->setText( "" ); ! searchInBtn->setPixmap( imageFolder ); searchInLayout->addWidget( searchInBtn, 0, 2 ); *************** *** 249,258 **** dontSearchInBtnAdd = new QToolButton( dontSearchInGroup, "dontSearchInBtnAdd" ); dontSearchInBtnAdd->setText( "" ); ! dontSearchInBtnAdd->setPixmap( QPixmap( ( const char** ) image2_data ) ); dontSearchInLayout->addWidget( dontSearchInBtnAdd, 0, 1 ); dontSearchInBtn = new QToolButton( dontSearchInGroup, "dontSearchInBtn" ); dontSearchInBtn->setText( "" ); ! dontSearchInBtn->setPixmap( QPixmap( ( const char** ) image1_data ) ); dontSearchInLayout->addWidget( dontSearchInBtn, 0, 2 ); --- 146,155 ---- dontSearchInBtnAdd = new QToolButton( dontSearchInGroup, "dontSearchInBtnAdd" ); dontSearchInBtnAdd->setText( "" ); ! dontSearchInBtnAdd->setPixmap( imageAdd ); dontSearchInLayout->addWidget( dontSearchInBtnAdd, 0, 1 ); dontSearchInBtn = new QToolButton( dontSearchInGroup, "dontSearchInBtn" ); dontSearchInBtn->setText( "" ); ! dontSearchInBtn->setPixmap( imageFolder ); dontSearchInLayout->addWidget( dontSearchInBtn, 0, 2 ); |
From: Shie E. <er...@us...> - 2004-10-01 00:21:09
|
Update of /cvsroot/krusader/krusader_kde3/krusader/BookMan In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1919 Modified Files: kraddbookmarkdlg.cpp krbookmark.cpp krbookmark.h krbookmarkhandler.cpp krbookmarkhandler.h Log Message: import is 100% no-brainer support for folders (no export yet) Index: krbookmarkhandler.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/BookMan/krbookmarkhandler.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** krbookmarkhandler.cpp 29 Sep 2004 13:53:14 -0000 1.4 --- krbookmarkhandler.cpp 1 Oct 2004 00:20:58 -0000 1.5 *************** *** 5,8 **** --- 5,9 ---- #include <kiconloader.h> #include <kmessagebox.h> + #include <qptrlist.h> #include <kactioncollection.h> #include <klocale.h> *************** *** 14,17 **** --- 15,19 ---- #define SPECIAL_BOOKMARKS true + // ------------------------ for internal use #define BOOKMARKS_FILE "krusader/bookman2.xml" #define TOP_OF_MENU 0 *************** *** 23,31 **** KrBookmarkHandler::KrBookmarkHandler(QWidget *parent, KPopupMenu *menu): QObject(parent), _menu(menu) { ! _filename = locateLocal( "data", BOOKMARKS_FILE ); ! ! // create our own action collection and make the shortcuts apply only to parent _collection = new KActionCollection(0, parent); _menu->setKeyboardShortcutsEnabled(true); _menu->setKeyboardShortcutsExecute(true); --- 25,42 ---- KrBookmarkHandler::KrBookmarkHandler(QWidget *parent, KPopupMenu *menu): QObject(parent), _menu(menu) { ! // create our own action collection and make the shortcuts apply only to parent _collection = new KActionCollection(0, parent); + + // create _root: father of all bookmarks. it is a dummy bookmark and never shown + _root = new KrBookmark("root"); + + // start watching the bookmarks file for updates + _filename = locateLocal( "data", BOOKMARKS_FILE ); + _dirwatch = new KDirWatch(this); + _dirwatch->addFile(locateLocal("data", BOOKMARKS_FILE)); + connect(_dirwatch, SIGNAL(dirty(const QString &)), this, SLOT(bookmarksUpdated(const QString &))); + connect(_dirwatch, SIGNAL(created(const QString &)), this, SLOT(bookmarksUpdated(const QString &))); + // add quick navigation _menu->setKeyboardShortcutsEnabled(true); _menu->setKeyboardShortcutsExecute(true); *************** *** 54,61 **** _menu->insertItem(krLoader->loadIcon("bookmark", KIcon::Small), i18n("Manage Bookmarks"), ManageBookmarks); - - _dirwatch = new KDirWatch(this); - _dirwatch->addFile(locateLocal("data", BOOKMARKS_FILE)); - connect(_dirwatch, SIGNAL(dirty(const QString &)), this, SLOT(bookmarksUpdated(const QString &))); } --- 65,68 ---- *************** *** 83,89 **** } ! void KrBookmarkHandler::addBookmark(KrBookmark *bm, bool saveData) { // add to the list (bottom) ! _bookmarks.append(bm); // add to menu --- 90,99 ---- } ! void KrBookmarkHandler::addBookmark(KrBookmark *bm, bool saveData, KrBookmark *folder) { ! if (folder == 0) ! folder = _root; ! // add to the list (bottom) ! folder->children().append(bm); // add to menu *************** *** 125,128 **** --- 135,139 ---- // </xbel> void KrBookmarkHandler::exportToFile() { + #if 0 // disable the dirwatch while saving the file STOPWATCH; *************** *** 149,155 **** // re-enable the dirwatch STARTWATCH; } ! bool KrBookmarkHandler::importFromFileBookmark(QDomElement &e, QString *errorMsg) { QString url, name; // verify tag --- 160,167 ---- // re-enable the dirwatch STARTWATCH; + #endif } ! bool KrBookmarkHandler::importFromFileBookmark(QDomElement &e, KrBookmark *parent, QString *errorMsg) { QString url, name; // verify tag *************** *** 171,181 **** // ok: got name and url, let's add a bookmark ! addBookmark(new KrBookmark(name, url, _collection), false); return true; } void KrBookmarkHandler::importFromFile() { - clearBookmarks(); STOPWATCH; --- 183,220 ---- // ok: got name and url, let's add a bookmark ! KrBookmark *bm = new KrBookmark(name, url, _collection); ! parent->children().append(bm); ! ! return true; ! } ! ! bool KrBookmarkHandler::importFromFileFolder(QDomNode &first, KrBookmark *parent, QString *errorMsg) { ! QString name; ! QDomNode n = first; ! while (!n.isNull()) { ! QDomElement e = n.toElement(); ! if (e.tagName() == "bookmark") { ! if (!importFromFileBookmark(e, parent, errorMsg)) ! return false; ! } else if (e.tagName() == "folder") { ! // the title is the first child of the folder ! QDomElement tmp = e.firstChild().toElement(); ! if (tmp.tagName() != "title") { ! *errorMsg = i18n("missing tag ")+"title"; ! return false; ! } else name = tmp.text(); ! KrBookmark *folder = new KrBookmark(name); ! parent->children().append(folder); + QDomNode nextOne = tmp.nextSibling(); + if (!importFromFileFolder(nextOne, folder, errorMsg)) + return false; + } + n = n.nextSibling(); + } return true; } void KrBookmarkHandler::importFromFile() { STOPWATCH; *************** *** 192,229 **** } ! // iterate through the document: first child should be "xbel" ! n = doc.firstChild(); if (n.isNull() || n.toElement().tagName()!="xbel") { errorMsg = _filename+i18n(" doesn't seem to be a valid Bookmarks file"); goto ERROR; ! } else n = n.firstChild(); // skip the 'xbel' root ! ! while (!n.isNull()) { ! e = n.toElement(); ! if (!importFromFileBookmark(e, &errorMsg)) ! goto ERROR; ! n = n.nextSibling(); ! } ! goto SUCCESS; ERROR: KMessageBox::error(krApp, "Error", i18n("Error reading bookmarks file: ")+errorMsg); SUCCESS: file.close(); ! STARTWATCH; } void KrBookmarkHandler::bookmarksUpdated(const QString &) { importFromFile(); } ! void KrBookmarkHandler::clearBookmarks() { ! KrBookmark *tmp, *bm = _bookmarks.first(); while (bm) { tmp = bm; delete tmp; - bm = _bookmarks.next(); } } --- 231,287 ---- } ! // iterate through the document: first child should be "xbel" (skip all until we find it) ! n = doc.firstChild(); ! while (!n.isNull() && n.toElement().tagName()!="xbel") ! n = n.nextSibling(); ! if (n.isNull() || n.toElement().tagName()!="xbel") { errorMsg = _filename+i18n(" doesn't seem to be a valid Bookmarks file"); goto ERROR; ! } else n = n.firstChild(); // skip the xbel part ! ! importFromFileFolder(n, _root, &errorMsg); goto SUCCESS; ERROR: KMessageBox::error(krApp, "Error", i18n("Error reading bookmarks file: ")+errorMsg); + SUCCESS: file.close(); ! buildMenu(_root, _menu); ! STARTWATCH; } + void KrBookmarkHandler::buildMenu(KrBookmark *parent, KPopupMenu *menu) { + for (KrBookmark *bm = parent->children().first(); bm; bm = parent->children().next()) { + if (bm->isFolder()) { + KPopupMenu *newMenu = new KPopupMenu(menu); + menu->insertItem(QIconSet(krLoader->loadIcon("bookmark_folder", KIcon::Small)), + bm->text(), newMenu, BOTTOM_OF_MENU); + buildMenu(bm, newMenu); + } else { + bm->plug(menu, BOTTOM_OF_MENU); // add on top + CONNECT_BM(bm); + } + } + } + void KrBookmarkHandler::bookmarksUpdated(const QString &) { + clearBookmarks(_root); importFromFile(); } ! void KrBookmarkHandler::clearBookmarks(KrBookmark *root) { ! KrBookmark *tmp, *bm = root->children().first(); while (bm) { + if (bm->isFolder()) + clearBookmarks(bm); tmp = bm; + bm = root->children().next(); + + // TODO: clear all subfolders too + tmp->unplugAll(); delete tmp; } } Index: krbookmark.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/BookMan/krbookmark.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** krbookmark.h 29 Sep 2004 13:53:14 -0000 1.3 --- krbookmark.h 1 Oct 2004 00:20:58 -0000 1.4 *************** *** 3,6 **** --- 3,7 ---- #include <kaction.h> + #include <qptrlist.h> #include <kurl.h> *************** *** 11,21 **** public: KrBookmark(QString name, KURL url, KActionCollection *parent); ! // use text() and setText() to change the name of the bookmark ! // use icon() and setIcon() to change icons (by name) ! const KURL& url() const; ! ! void setURL(const KURL& url); ! ! // special bookmarks static KrBookmark* devices(KActionCollection *collection); --- 12,23 ---- public: KrBookmark(QString name, KURL url, KActionCollection *parent); ! KrBookmark(QString name); // creates a folder ! // text() and setText() to change the name of the bookmark ! // icon() and setIcon() to change icons (by name) ! const KURL& url() const { return _url; } ! void setURL(const KURL& url) { _url = url; } ! bool isFolder() const { return _folder; } ! QPtrList<KrBookmark>& children() { return _children; } ! // ----- special bookmarks static KrBookmark* devices(KActionCollection *collection); *************** *** 29,32 **** --- 31,36 ---- KURL _url; QString _icon; + bool _folder; + QPtrList<KrBookmark> _children; }; Index: kraddbookmarkdlg.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/BookMan/kraddbookmarkdlg.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** kraddbookmarkdlg.cpp 29 Sep 2004 00:33:25 -0000 1.1 --- kraddbookmarkdlg.cpp 1 Oct 2004 00:20:58 -0000 1.2 *************** *** 14,26 **** QGridLayout *layout = new QGridLayout(page, 1, 1, 0, spacingHint()); // expanding QLabel *lb1 = new QLabel(i18n("Name:"), page); - layout->addWidget(lb1, 0, 0); _name = new KLineEdit(page); layout->addWidget(_name, 0, 1); QLabel *lb2 = new QLabel(i18n("URL:"), page); - layout->addWidget(lb2, 1, 0); _url = new KLineEdit(page); layout->addWidget(_url, 1, 1); ! _url->setText(url.url()); } --- 14,29 ---- QGridLayout *layout = new QGridLayout(page, 1, 1, 0, spacingHint()); // expanding + // name and url QLabel *lb1 = new QLabel(i18n("Name:"), page); _name = new KLineEdit(page); + layout->addWidget(lb1, 0, 0); layout->addWidget(_name, 0, 1); QLabel *lb2 = new QLabel(i18n("URL:"), page); _url = new KLineEdit(page); + layout->addWidget(lb2, 1, 0); layout->addWidget(_url, 1, 1); ! _url->setText(url.url()); // set the url in the field ! ! _name->setFocus(); } Index: krbookmark.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/BookMan/krbookmark.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** krbookmark.cpp 29 Sep 2004 13:53:13 -0000 1.3 --- krbookmark.cpp 1 Oct 2004 00:20:58 -0000 1.4 *************** *** 8,12 **** KrBookmark::KrBookmark(QString name, KURL url, KActionCollection *parent): ! KAction(name, 0, 0, 0, parent), _url(url) { connect(this, SIGNAL(activated()), this, SLOT(activatedProxy())); --- 8,12 ---- KrBookmark::KrBookmark(QString name, KURL url, KActionCollection *parent): ! KAction(name, 0, 0, 0, parent), _url(url), _folder(false) { connect(this, SIGNAL(activated()), this, SLOT(activatedProxy())); *************** *** 21,31 **** } ! const KURL& KrBookmark::url() const { ! return _url; } - void KrBookmark::setURL(const KURL& url) { - _url = url; - } KrBookmark* KrBookmark::devices(KActionCollection *collection) { --- 21,29 ---- } ! KrBookmark::KrBookmark(QString name): ! KAction(name, 0, 0, 0, 0), _folder(true) { ! setIcon("folder"); } KrBookmark* KrBookmark::devices(KActionCollection *collection) { Index: krbookmarkhandler.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/BookMan/krbookmarkhandler.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** krbookmarkhandler.h 29 Sep 2004 13:53:14 -0000 1.4 --- krbookmarkhandler.h 1 Oct 2004 00:20:58 -0000 1.5 *************** *** 21,31 **** protected: void bookmarkCurrent(KURL url); ! void addBookmark(KrBookmark *bm, bool saveData = true); void deleteBookmark(KrBookmark *bm); void importFromFile(); ! bool importFromFileBookmark(QDomElement &e, QString *errorMsg); void exportToFile(); void exportToFileBookmark(QDomDocument &doc, QDomElement &where, KrBookmark *bm); ! void clearBookmarks(); signals: --- 21,33 ---- protected: void bookmarkCurrent(KURL url); ! void addBookmark(KrBookmark *bm, bool saveData = true, KrBookmark *parent = 0); void deleteBookmark(KrBookmark *bm); void importFromFile(); ! bool importFromFileBookmark(QDomElement &e, KrBookmark *parent, QString *errorMsg); ! bool importFromFileFolder(QDomNode &first, KrBookmark *parent, QString *errorMsg); void exportToFile(); void exportToFileBookmark(QDomDocument &doc, QDomElement &where, KrBookmark *bm); ! void clearBookmarks(KrBookmark *root); ! void buildMenu(KrBookmark *parent, KPopupMenu *menu); signals: *************** *** 40,44 **** KPopupMenu *_menu; KActionCollection *_collection; ! QPtrList<KrBookmark> _bookmarks; KDirWatch *_dirwatch; QString _filename; --- 42,46 ---- KPopupMenu *_menu; KActionCollection *_collection; ! KrBookmark *_root; KDirWatch *_dirwatch; QString _filename; |
From: Karai C. <ck...@us...> - 2004-09-30 16:18:41
|
Update of /cvsroot/krusader/krusader_kde3/krusader/VFS In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29657/krusader_kde3/krusader/VFS Modified Files: vfs.cpp vfs.h Log Message: FIXED: quiet mode if necessary Index: vfs.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/VFS/vfs.h,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** vfs.h 16 Sep 2004 19:15:25 -0000 1.17 --- vfs.h 30 Sep 2004 16:18:32 -0000 1.18 *************** *** 55,59 **** * Creates a vfs. * @param panel the panel father. the VFS will connect it's signals to this object. ! * @param quiet if true, the VFS will not display error messages or emit signals */ vfs(QObject* panel, bool quiet=false); --- 55,59 ---- * Creates a vfs. * @param panel the panel father. the VFS will connect it's signals to this object. ! * @param quiet if true, the VFS will not display error messages */ vfs(QObject* panel, bool quiet=false); *************** *** 106,109 **** --- 106,110 ---- virtual bool vfs_refresh(); virtual void vfs_setQuiet(bool beQuiet){ quietMode=beQuiet; } + virtual void vfs_disableSignals(bool disable){ disableSignals=disable; } signals: *************** *** 129,132 **** --- 130,134 ---- KURL vfs_origin; //< the path or file the VFS originates from. bool quietMode; //< if true the vfs won't display error messages or emit signals + bool disableSignals; //< if true the signals emission is disabled bool isWritable; //< true if it's writable Index: vfs.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/VFS/vfs.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** vfs.cpp 16 Sep 2004 19:15:25 -0000 1.15 --- vfs.cpp 30 Sep 2004 16:18:32 -0000 1.16 *************** *** 39,43 **** #include "../defaults.h" ! vfs::vfs(QObject* panel, bool quiet): quietMode(quiet),vfileIterator(0){ if ( panel ){ connect(this,SIGNAL(startUpdate()),panel,SLOT(slotStartUpdate())); --- 39,43 ---- #include "../defaults.h" ! vfs::vfs(QObject* panel, bool quiet): quietMode(quiet),disableSignals(false),vfileIterator(0){ if ( panel ){ connect(this,SIGNAL(startUpdate()),panel,SLOT(slotStartUpdate())); *************** *** 179,183 **** if (!populateVfsList(origin,showHidden) ) return false; ! if (!quietMode) emit startUpdate(); return true; } --- 179,183 ---- if (!populateVfsList(origin,showHidden) ) return false; ! if (!disableSignals) emit startUpdate(); return true; } |
From: Karai C. <ck...@us...> - 2004-09-30 16:18:41
|
Update of /cvsroot/krusader/krusader_kde3/krusader/Panel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29657/krusader_kde3/krusader/Panel Modified Files: panelfunc.cpp Log Message: FIXED: quiet mode if necessary Index: panelfunc.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Panel/panelfunc.cpp,v retrieving revision 1.89 retrieving revision 1.90 diff -C2 -d -r1.89 -r1.90 *** panelfunc.cpp 20 Sep 2004 13:23:56 -0000 1.89 --- panelfunc.cpp 30 Sep 2004 16:18:31 -0000 1.90 *************** *** 103,107 **** --- 103,109 ---- //kdDebug() << "Sync: from: " << panel->getPath()+"/" << " to: " << url.url() << " -> relativeURL: " << relative_path << endl; //OTHER_FUNC->openUrl( relative_path ); + OTHER_FUNC->files()->vfs_setQuiet( true ); OTHER_FUNC->openUrl( KURL::relativeURL( panel->getPath()+"/", url.url() ) ); // the trailing slash is nessesary because krusader provides Dir's without it + OTHER_FUNC->files()->vfs_setQuiet( false ); bMaster = true; } *************** *** 148,152 **** --- 150,157 ---- } if( vfsP->vfs_refresh(u) ) break; // we have a valid refreshed URL now + vfsP->vfs_setQuiet( true ); } + vfsP->vfs_setQuiet( false ); + // update the urls stack if( !files()->vfs_getOrigin().equals(urlStack.top()) ){ |
From: Shie E. <er...@us...> - 2004-09-29 13:53:35
|
Update of /cvsroot/krusader/krusader_kde3/krusader/BookMan In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4082 Modified Files: krbookmark.cpp krbookmark.h krbookmarkhandler.cpp krbookmarkhandler.h Log Message: Index: krbookmarkhandler.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/BookMan/krbookmarkhandler.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** krbookmarkhandler.cpp 29 Sep 2004 12:05:32 -0000 1.3 --- krbookmarkhandler.cpp 29 Sep 2004 13:53:14 -0000 1.4 *************** *** 10,14 **** #include <kstandarddirs.h> #include <qfile.h> ! #define SPECIAL_BOOKMARKS true --- 10,14 ---- #include <kstandarddirs.h> #include <qfile.h> ! #include <kdirwatch.h> #define SPECIAL_BOOKMARKS true *************** *** 19,24 **** #define CONNECT_BM(X) connect(X, SIGNAL(activated(KrBookmark *)), \ this, SLOT(bookmarkActivated(KrBookmark *))); ! KrBookmarkHandler::KrBookmarkHandler(QWidget *parent, KPopupMenu *menu): QObject(parent), _menu(menu) { // create our own action collection and make the shortcuts apply only to parent _collection = new KActionCollection(0, parent); --- 19,28 ---- #define CONNECT_BM(X) connect(X, SIGNAL(activated(KrBookmark *)), \ this, SLOT(bookmarkActivated(KrBookmark *))); ! #define STOPWATCH _dirwatch->stopDirScan(_filename) ! #define STARTWATCH _dirwatch->restartDirScan(_filename) ! KrBookmarkHandler::KrBookmarkHandler(QWidget *parent, KPopupMenu *menu): QObject(parent), _menu(menu) { + _filename = locateLocal( "data", BOOKMARKS_FILE ); + // create our own action collection and make the shortcuts apply only to parent _collection = new KActionCollection(0, parent); *************** *** 50,53 **** --- 54,61 ---- _menu->insertItem(krLoader->loadIcon("bookmark", KIcon::Small), i18n("Manage Bookmarks"), ManageBookmarks); + + _dirwatch = new KDirWatch(this); + _dirwatch->addFile(locateLocal("data", BOOKMARKS_FILE)); + connect(_dirwatch, SIGNAL(dirty(const QString &)), this, SLOT(bookmarksUpdated(const QString &))); } *************** *** 75,79 **** } ! void KrBookmarkHandler::addBookmark(KrBookmark *bm) { // add to the list (bottom) _bookmarks.append(bm); --- 83,87 ---- } ! void KrBookmarkHandler::addBookmark(KrBookmark *bm, bool saveData) { // add to the list (bottom) _bookmarks.append(bm); *************** *** 83,88 **** CONNECT_BM(bm); ! // save ! exportToFile(); } --- 91,96 ---- CONNECT_BM(bm); ! if (saveData) // save ! exportToFile(); } *************** *** 93,101 **** QDomElement bookmark = doc.createElement("bookmark"); bookmark.setAttribute("href", bm->url().url()); - where.appendChild(bookmark); // title QDomElement title = doc.createElement("title"); title.appendChild(doc.createTextNode(bm->text())); bookmark.appendChild(title); } --- 101,110 ---- QDomElement bookmark = doc.createElement("bookmark"); bookmark.setAttribute("href", bm->url().url()); // title QDomElement title = doc.createElement("title"); title.appendChild(doc.createTextNode(bm->text())); bookmark.appendChild(title); + + where.appendChild(bookmark); } *************** *** 116,121 **** // </xbel> void KrBookmarkHandler::exportToFile() { ! // use the local file ! QString filename = locateLocal( "data", BOOKMARKS_FILE ); QDomDocument doc( "xbel" ); --- 125,130 ---- // </xbel> void KrBookmarkHandler::exportToFile() { ! // disable the dirwatch while saving the file ! STOPWATCH; QDomDocument doc( "xbel" ); *************** *** 129,133 **** } ! QFile file(filename); if ( file.open( IO_WriteOnly ) ) { QTextStream stream( &file ); --- 138,142 ---- } ! QFile file(_filename); if ( file.open( IO_WriteOnly ) ) { QTextStream stream( &file ); *************** *** 135,140 **** file.close(); } else { ! KMessageBox::error(krApp, i18n("Error"), i18n("Unable to write to ") + filename); } } --- 144,152 ---- file.close(); } else { ! KMessageBox::error(krApp, i18n("Error"), i18n("Unable to write to ") + _filename); } + + // re-enable the dirwatch + STARTWATCH; } *************** *** 152,169 **** } else url = e.attribute("href"); // verify title ! if (e.firstChild().toElement().tagName() != "title") { *errorMsg = i18n("missing tag ")+"title"; return false; ! } else name = e.firstChild().toElement().toText().nodeValue(); ! if (e.firstChild().toElement().isText()) { ! kdWarning() <<"text" << endl; ! QDomText d = e.firstChild().toElement().toText(); ! kdWarning() << d.nodeName() << ":" << d.nodeValue() << endl; ! } else kdWarning() << "not text" << endl; ! ! ! kdWarning() << name << ";" << url << endl; ! return true; --- 164,175 ---- } else url = e.attribute("href"); // verify title ! QDomElement te = e.firstChild().toElement(); ! if (te.tagName() != "title") { *errorMsg = i18n("missing tag ")+"title"; return false; ! } else name = te.text(); + // ok: got name and url, let's add a bookmark + addBookmark(new KrBookmark(name, url, _collection), false); return true; *************** *** 171,176 **** void KrBookmarkHandler::importFromFile() { ! QString filename = locateLocal( "data", BOOKMARKS_FILE ); ! QFile file( filename ); if ( !file.open(IO_ReadOnly)) return; // no bookmarks file --- 177,184 ---- void KrBookmarkHandler::importFromFile() { ! clearBookmarks(); ! STOPWATCH; ! ! QFile file( _filename ); if ( !file.open(IO_ReadOnly)) return; // no bookmarks file *************** *** 183,190 **** goto ERROR; } // iterate through the document: first child should be "xbel" n = doc.firstChild(); if (n.isNull() || n.toElement().tagName()!="xbel") { ! errorMsg = filename+i18n(" doesn't seem to be a valid Bookmarks file"); goto ERROR; } else n = n.firstChild(); // skip the 'xbel' root --- 191,199 ---- goto ERROR; } + // iterate through the document: first child should be "xbel" n = doc.firstChild(); if (n.isNull() || n.toElement().tagName()!="xbel") { ! errorMsg = _filename+i18n(" doesn't seem to be a valid Bookmarks file"); goto ERROR; } else n = n.firstChild(); // skip the 'xbel' root *************** *** 196,200 **** n = n.nextSibling(); } - goto SUCCESS; --- 205,208 ---- *************** *** 204,218 **** SUCCESS: file.close(); } ! #if 0 ! QDomNode n = docElem.firstChild(); ! while( !n.isNull() ) { ! QDomElement e = n.toElement(); // try to convert the node to an element. ! if( !e.isNull() ) { ! cout << e.tagName() << endl; // the node really is an element. ! } ! n = n.nextSibling(); ! } ! #endif \ No newline at end of file --- 212,229 ---- SUCCESS: file.close(); + + STARTWATCH; } + void KrBookmarkHandler::bookmarksUpdated(const QString &) { + importFromFile(); + } ! void KrBookmarkHandler::clearBookmarks() { ! KrBookmark *tmp, *bm = _bookmarks.first(); ! while (bm) { ! tmp = bm; ! delete tmp; ! bm = _bookmarks.next(); ! } ! } Index: krbookmarkhandler.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/BookMan/krbookmarkhandler.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** krbookmarkhandler.h 29 Sep 2004 12:05:32 -0000 1.3 --- krbookmarkhandler.h 29 Sep 2004 13:53:14 -0000 1.4 *************** *** 10,13 **** --- 10,14 ---- class KActionCollection; + class KDirWatch; class KrBookmarkHandler: public QObject { *************** *** 20,24 **** protected: void bookmarkCurrent(KURL url); ! void addBookmark(KrBookmark *bm); void deleteBookmark(KrBookmark *bm); void importFromFile(); --- 21,25 ---- protected: void bookmarkCurrent(KURL url); ! void addBookmark(KrBookmark *bm, bool saveData = true); void deleteBookmark(KrBookmark *bm); void importFromFile(); *************** *** 26,29 **** --- 27,31 ---- void exportToFile(); void exportToFileBookmark(QDomDocument &doc, QDomElement &where, KrBookmark *bm); + void clearBookmarks(); signals: *************** *** 33,36 **** --- 35,39 ---- void bookmarkActivated(KrBookmark *bm); void menuOperation(int id); + void bookmarksUpdated(const QString &); private: *************** *** 38,41 **** --- 41,46 ---- KActionCollection *_collection; QPtrList<KrBookmark> _bookmarks; + KDirWatch *_dirwatch; + QString _filename; }; Index: krbookmark.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/BookMan/krbookmark.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** krbookmark.h 26 Sep 2004 23:49:37 -0000 1.2 --- krbookmark.h 29 Sep 2004 13:53:14 -0000 1.3 *************** *** 12,19 **** KrBookmark(QString name, KURL url, KActionCollection *parent); // use text() and setText() to change the name of the bookmark ! // use setIconSet() for changing icons const KURL& url() const; void setURL(const KURL& url); ! // special bookmarks static KrBookmark* devices(KActionCollection *collection); --- 12,20 ---- KrBookmark(QString name, KURL url, KActionCollection *parent); // use text() and setText() to change the name of the bookmark ! // use icon() and setIcon() to change icons (by name) const KURL& url() const; + void setURL(const KURL& url); ! // special bookmarks static KrBookmark* devices(KActionCollection *collection); *************** *** 27,30 **** --- 28,32 ---- private: KURL _url; + QString _icon; }; Index: krbookmark.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/BookMan/krbookmark.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** krbookmark.cpp 26 Sep 2004 23:49:37 -0000 1.2 --- krbookmark.cpp 29 Sep 2004 13:53:13 -0000 1.3 *************** *** 1,11 **** --- 1,22 ---- #include "krbookmark.h" #include "../krusader.h" + #include "../VFS/krarchandler.h" #include <kactioncollection.h> #include <kiconloader.h> #include <klocale.h> + #include <kdebug.h> KrBookmark::KrBookmark(QString name, KURL url, KActionCollection *parent): KAction(name, 0, 0, 0, parent), _url(url) { connect(this, SIGNAL(activated()), this, SLOT(activatedProxy())); + + // what kind of a url is it? + if (_url.isLocalFile()) { + setIcon("folder"); + } else { // is it an archive? + if (KRarcHandler::isArchive(_url)) + setIcon("tar"); + else setIcon("folder_html"); + } } |
From: Dirk E. <des...@us...> - 2004-09-29 13:22:46
|
Update of /cvsroot/krusader/krusader_kde3/po In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30881/po Modified Files: de.po krusader.pot Log Message: krusader-1.50-cvs Index: krusader.pot =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/po/krusader.pot,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** krusader.pot 21 Sep 2004 21:44:58 -0000 1.21 --- krusader.pot 29 Sep 2004 13:22:33 -0000 1.22 *************** *** 11,15 **** "Project-Id-Version: krusader-1.50-cvs\n" "Report-Msgid-Bugs-To: \n" ! "POT-Creation-Date: 2004-09-21 23:25+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" --- 11,15 ---- "Project-Id-Version: krusader-1.50-cvs\n" "Report-Msgid-Bugs-To: \n" ! "POT-Creation-Date: 2004-09-29 15:12+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" [...2786 lines suppressed...] ! #: Synchronizer/synchronizer.cpp:1138 ! msgid "Krusader::Synchronizer" ! msgstr "" ! ! #: Synchronizer/synchronizer.cpp:1184 krslots.cpp:104 krslots.cpp:186 msgid "Error executing " msgstr "" *************** *** 2976,2980 **** #: Konfigurator/konfigurator.cpp:107 ! msgid "Costumize the way Krusader deals with archives" msgstr "" --- 3043,3047 ---- #: Konfigurator/konfigurator.cpp:107 ! msgid "Customize the way Krusader deals with archives" msgstr "" Index: de.po =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/po/de.po,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** de.po 21 Sep 2004 21:44:56 -0000 1.22 --- de.po 29 Sep 2004 13:22:33 -0000 1.23 *************** *** 11,16 **** "Project-Id-Version: krusader-1.50-cvs\n" "Report-Msgid-Bugs-To: \n" ! "POT-Creation-Date: 2004-09-21 23:25+0200\n" ! "PO-Revision-Date: 2004-09-21 23:34+0200\n" "Last-Translator: Dirk Eschler <des...@us...>\n" "Language-Team: German\n" --- 11,16 ---- "Project-Id-Version: krusader-1.50-cvs\n" "Report-Msgid-Bugs-To: \n" ! "POT-Creation-Date: 2004-09-29 15:12+0200\n" [...3007 lines suppressed...] *************** *** 4217,4222 **** #: Splitter/combiner.cpp:138 ! msgid "" ! "Validity checking is impossible without a good CRC file. Continue combining?" msgstr "" "Eine Gültigkeitsüberprüfung ist ohne eine gültige CRC-Datei unmöglich. Mit " --- 4267,4271 ---- #: Splitter/combiner.cpp:138 ! msgid "Validity checking is impossible without a good CRC file. Continue combining?" msgstr "" "Eine Gültigkeitsüberprüfung ist ohne eine gültige CRC-Datei unmöglich. Mit " *************** *** 4259,4260 **** --- 4308,4310 ---- msgid "Error at reading file %1!" msgstr "Fehler beim Lesen der Datei %1!" + |
From: Shie E. <er...@us...> - 2004-09-29 13:14:01
|
Update of /cvsroot/krusader/krusader_kde3/krusader/VFS In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29147/krusader/VFS Modified Files: krarchandler.cpp Log Message: add: isArchive to check if a url is pointing to an archive Index: krarchandler.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/VFS/krarchandler.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** krarchandler.cpp 13 Sep 2004 19:13:12 -0000 1.13 --- krarchandler.cpp 29 Sep 2004 13:13:51 -0000 1.14 *************** *** 43,46 **** --- 43,48 ---- #include "../krservices.h" + static QStringList arcProtocols = QStringList::split(";", "tar;bzip;bzip2;gzip;krarc;zip"); + QStringList KRarcHandler::supportedPackers() { QStringList packers; *************** *** 411,413 **** --- 413,423 ---- } + bool KRarcHandler::isArchive(const KURL& url) { + QString protocol = url.protocol(); + if (arcProtocols.find(protocol) != arcProtocols.end()) + return true; + else return false; + } + #include "krarchandler.moc" + |
From: Shie E. <er...@us...> - 2004-09-29 13:13:42
|
Update of /cvsroot/krusader/krusader_kde3/krusader/VFS In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29051/krusader/VFS Modified Files: krarchandler.h Log Message: add: isArchive to check if a url is pointing to an archive Index: krarchandler.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/VFS/krarchandler.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** krarchandler.h 13 Sep 2004 19:13:32 -0000 1.2 --- krarchandler.h 29 Sep 2004 13:13:32 -0000 1.3 *************** *** 34,37 **** --- 34,38 ---- #include <qobject.h> #include <kprocess.h> + #include <kurl.h> class KRarcHandler: public QObject { *************** *** 54,57 **** --- 55,60 ---- // removes the alias names for a packer static void removeAliases( QString &type ); + // true - if the url is an archive (ie: tar:/home/test/file.tar.bz2) + static bool isArchive(const KURL& url); // used to store the current archive password QString password; |
From: Shie E. <er...@us...> - 2004-09-29 12:05:44
|
Update of /cvsroot/krusader/krusader_kde3/krusader/BookMan In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14720 Modified Files: krbookmarkhandler.cpp krbookmarkhandler.h Log Message: Index: krbookmarkhandler.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/BookMan/krbookmarkhandler.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** krbookmarkhandler.cpp 29 Sep 2004 00:33:25 -0000 1.2 --- krbookmarkhandler.cpp 29 Sep 2004 12:05:32 -0000 1.3 *************** *** 1,14 **** #include "krbookmarkhandler.h" - #include "krbookmark.h" #include "kraddbookmarkdlg.h" #include "../krusader.h" #include "../krslots.h" #include <kiconloader.h> #include <kactioncollection.h> #include <klocale.h> #include <kdebug.h> #define SPECIAL_BOOKMARKS true #define CONNECT_BM(X) connect(X, SIGNAL(activated(KrBookmark *)), \ this, SLOT(bookmarkActivated(KrBookmark *))); --- 1,20 ---- #include "krbookmarkhandler.h" #include "kraddbookmarkdlg.h" #include "../krusader.h" #include "../krslots.h" #include <kiconloader.h> + #include <kmessagebox.h> #include <kactioncollection.h> #include <klocale.h> #include <kdebug.h> + #include <kstandarddirs.h> + #include <qfile.h> + #define SPECIAL_BOOKMARKS true + #define BOOKMARKS_FILE "krusader/bookman2.xml" + #define TOP_OF_MENU 0 + #define BOTTOM_OF_MENU _menu->indexOf(Border) #define CONNECT_BM(X) connect(X, SIGNAL(activated(KrBookmark *)), \ this, SLOT(bookmarkActivated(KrBookmark *))); *************** *** 22,34 **** connect(_menu, SIGNAL(activated(int)), this, SLOT(menuOperation(int))); // do we need to add special bookmarks? if (SPECIAL_BOOKMARKS) { _menu->insertSeparator(); KrBookmark *bm = KrBookmark::devices(_collection); bm->plug(_menu); CONNECT_BM(bm); - - _menu->insertSeparator(); } _menu->insertItem(krLoader->loadIcon("bookmark_add", KIcon::Small), i18n("Bookmark Current"), BookmarkCurrent); --- 28,49 ---- connect(_menu, SIGNAL(activated(int)), this, SLOT(menuOperation(int))); + // load bookmarks and populate the menu + importFromFile(); + + + // border: a dummy item used to separate normal bookmarks from special ones, + // operations etc. we use it later when inserting bookmarks at the bottom + _menu->insertItem("border-dummy", Border); + _menu->setItemVisible(Border, false); + // do we need to add special bookmarks? if (SPECIAL_BOOKMARKS) { + // note: special bookmarks are not kept inside the _bookmarks list and added ad-hoc _menu->insertSeparator(); KrBookmark *bm = KrBookmark::devices(_collection); bm->plug(_menu); CONNECT_BM(bm); } + _menu->insertSeparator(); _menu->insertItem(krLoader->loadIcon("bookmark_add", KIcon::Small), i18n("Bookmark Current"), BookmarkCurrent); *************** *** 56,63 **** if (dlg.exec() == KDialog::Accepted) { KrBookmark *bm = new KrBookmark(dlg.name(), dlg.url(), _collection); ! bm->plug(_menu, 0); // add on top ! CONNECT_BM(bm); } } --- 71,218 ---- if (dlg.exec() == KDialog::Accepted) { KrBookmark *bm = new KrBookmark(dlg.name(), dlg.url(), _collection); ! addBookmark(bm); } } + void KrBookmarkHandler::addBookmark(KrBookmark *bm) { + // add to the list (bottom) + _bookmarks.append(bm); + // add to menu + bm->plug(_menu, BOTTOM_OF_MENU); // add on top + CONNECT_BM(bm); + + // save + exportToFile(); + } + + void KrBookmarkHandler::deleteBookmark(KrBookmark *bm) { + } + + void KrBookmarkHandler::exportToFileBookmark(QDomDocument &doc, QDomElement &where, KrBookmark *bm) { + QDomElement bookmark = doc.createElement("bookmark"); + bookmark.setAttribute("href", bm->url().url()); + where.appendChild(bookmark); + // title + QDomElement title = doc.createElement("title"); + title.appendChild(doc.createTextNode(bm->text())); + bookmark.appendChild(title); + } + + // export to file using the xbel standard + // + // <xbel> + // <bookmark href="http://developer.kde.org"><title>Developer Web Site</title></bookmark> + // <folder folded="no"> + // <title>Title of this folder</title> + // <bookmark icon="kde" href="http://www.kde.org"><title>KDE Web Site</title></bookmark> + // <folder toolbar="yes"> + // <title>My own bookmarks</title> + // <bookmark href="http://www.koffice.org"><title>KOffice Web Site</title></bookmark> + // <separator/> + // <bookmark href="http://www.kdevelop.org"><title>KDevelop Web Site</title></bookmark> + // </folder> + // </folder> + // </xbel> + void KrBookmarkHandler::exportToFile() { + // use the local file + QString filename = locateLocal( "data", BOOKMARKS_FILE ); + + QDomDocument doc( "xbel" ); + QDomElement root = doc.createElement( "xbel" ); + doc.appendChild( root ); + + // iterate through the bookmark list + for (KrBookmark *bm = _bookmarks.first(); bm; bm = _bookmarks.next()) { + // TODO: support for folder + exportToFileBookmark(doc, root, bm); + } + + QFile file(filename); + if ( file.open( IO_WriteOnly ) ) { + QTextStream stream( &file ); + stream << doc.toString(); + file.close(); + } else { + KMessageBox::error(krApp, i18n("Error"), i18n("Unable to write to ") + filename); + } + } + + bool KrBookmarkHandler::importFromFileBookmark(QDomElement &e, QString *errorMsg) { + QString url, name; + // verify tag + if (e.tagName() != "bookmark") { + *errorMsg = e.tagName() + i18n(" instead of ")+"bookmark"; + return false; + } + // verify href + if (!e.hasAttribute("href")) { + *errorMsg = i18n("missing tag ")+ "href"; + return false; + } else url = e.attribute("href"); + // verify title + if (e.firstChild().toElement().tagName() != "title") { + *errorMsg = i18n("missing tag ")+"title"; + return false; + } else name = e.firstChild().toElement().toText().nodeValue(); + if (e.firstChild().toElement().isText()) { + kdWarning() <<"text" << endl; + QDomText d = e.firstChild().toElement().toText(); + kdWarning() << d.nodeName() << ":" << d.nodeValue() << endl; + } else kdWarning() << "not text" << endl; + + + kdWarning() << name << ";" << url << endl; + + + + return true; + } + + void KrBookmarkHandler::importFromFile() { + QString filename = locateLocal( "data", BOOKMARKS_FILE ); + QFile file( filename ); + if ( !file.open(IO_ReadOnly)) + return; // no bookmarks file + + QString errorMsg; + QDomNode n; + QDomElement e; + QDomDocument doc( "xbel" ); + if ( !doc.setContent( &file, &errorMsg ) ) { + goto ERROR; + } + // iterate through the document: first child should be "xbel" + n = doc.firstChild(); + if (n.isNull() || n.toElement().tagName()!="xbel") { + errorMsg = filename+i18n(" doesn't seem to be a valid Bookmarks file"); + goto ERROR; + } else n = n.firstChild(); // skip the 'xbel' root + + while (!n.isNull()) { + e = n.toElement(); + if (!importFromFileBookmark(e, &errorMsg)) + goto ERROR; + n = n.nextSibling(); + } + + + goto SUCCESS; + + ERROR: + KMessageBox::error(krApp, "Error", i18n("Error reading bookmarks file: ")+errorMsg); + SUCCESS: + file.close(); + } + + + #if 0 + QDomNode n = docElem.firstChild(); + while( !n.isNull() ) { + QDomElement e = n.toElement(); // try to convert the node to an element. + if( !e.isNull() ) { + cout << e.tagName() << endl; // the node really is an element. + } + n = n.nextSibling(); + } + #endif \ No newline at end of file Index: krbookmarkhandler.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/BookMan/krbookmarkhandler.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** krbookmarkhandler.h 29 Sep 2004 00:33:25 -0000 1.2 --- krbookmarkhandler.h 29 Sep 2004 12:05:32 -0000 1.3 *************** *** 2,16 **** #define KRBOOKMARK_HANDLER_H #include <qobject.h> #include <kpopupmenu.h> #include <kurl.h> class KActionCollection; - class KrBookmark; class KrBookmarkHandler: public QObject { Q_OBJECT ! enum Actions { BookmarkCurrent, ManageBookmarks }; public: KrBookmarkHandler(QWidget *parent, KPopupMenu *menu); --- 2,18 ---- #define KRBOOKMARK_HANDLER_H + #include "krbookmark.h" #include <qobject.h> #include <kpopupmenu.h> #include <kurl.h> + #include <qptrlist.h> + #include <qdom.h> class KActionCollection; class KrBookmarkHandler: public QObject { Q_OBJECT ! enum Actions { Border, BookmarkCurrent, ManageBookmarks }; public: KrBookmarkHandler(QWidget *parent, KPopupMenu *menu); *************** *** 18,22 **** protected: void bookmarkCurrent(KURL url); ! signals: void openUrl(const KURL& url); --- 20,30 ---- protected: void bookmarkCurrent(KURL url); ! void addBookmark(KrBookmark *bm); ! void deleteBookmark(KrBookmark *bm); ! void importFromFile(); ! bool importFromFileBookmark(QDomElement &e, QString *errorMsg); ! void exportToFile(); ! void exportToFileBookmark(QDomDocument &doc, QDomElement &where, KrBookmark *bm); ! signals: void openUrl(const KURL& url); *************** *** 29,32 **** --- 37,41 ---- KPopupMenu *_menu; KActionCollection *_collection; + QPtrList<KrBookmark> _bookmarks; }; |
From: Shie E. <er...@us...> - 2004-09-29 00:36:09
|
Update of /cvsroot/krusader/krusader_kde3/krusader/BookMan In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27635/krusader/BookMan Modified Files: bookmarksbutton.cpp Log Message: fix: faster navigation in bookmarks Index: bookmarksbutton.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/BookMan/bookmarksbutton.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** bookmarksbutton.cpp 9 Dec 2003 23:05:57 -0000 1.3 --- bookmarksbutton.cpp 29 Sep 2004 00:35:59 -0000 1.4 *************** *** 36,39 **** --- 36,40 ---- KActionMenu *acmBookmarks = new KActionMenu(i18n("Bookmarks"), "bookmark", 0, "bookmarks"); acmBookmarks->setDelayed(false); + acmBookmarks->popupMenu()->setKeyboardShortcutsExecute(true); bookmarkHandler = new KBookmarkHandler(this, acmBookmarks->popupMenu()); |
From: Shie E. <er...@us...> - 2004-09-29 00:33:37
|
Update of /cvsroot/krusader/krusader_kde3/krusader/BookMan In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27121 Modified Files: Makefile.am krbookmarkhandler.cpp krbookmarkhandler.h Added Files: kraddbookmarkdlg.cpp kraddbookmarkdlg.h Log Message: Index: krbookmarkhandler.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/BookMan/krbookmarkhandler.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** krbookmarkhandler.cpp 26 Sep 2004 23:49:37 -0000 1.1 --- krbookmarkhandler.cpp 29 Sep 2004 00:33:25 -0000 1.2 *************** *** 1,30 **** #include "krbookmarkhandler.h" #include "krbookmark.h" #include "../krusader.h" #include <kiconloader.h> #include <kactioncollection.h> #include <klocale.h> #define SPECIAL_BOOKMARKS true KrBookmarkHandler::KrBookmarkHandler(QWidget *parent, KPopupMenu *menu): QObject(parent), _menu(menu) { // create our own action collection and make the shortcuts apply only to parent _collection = new KActionCollection(0, parent); // do we need to add special bookmarks? if (SPECIAL_BOOKMARKS) { _menu->insertSeparator(); ! KrBookmark::devices(_collection)->plug(_menu); _menu->insertSeparator(); } _menu->insertItem(krLoader->loadIcon("bookmark_add", KIcon::Small), i18n("Bookmark Current"), BookmarkCurrent); - KPopupMenu *newBookmarkMenu = new KPopupMenu(_menu); - newBookmarkMenu->insertItem(krLoader->loadIcon("hdd_mount", KIcon::Small), "Local Bookmark", NewLocal); - newBookmarkMenu->insertItem(krLoader->loadIcon("network", KIcon::Small), "Remote Bookmark", NewRemote); - _menu->insertItem("Add New Bookmark", newBookmarkMenu); _menu->insertItem(krLoader->loadIcon("bookmark", KIcon::Small), ! i18n("Edit Bookmarks"), EditBookmarks); ! _menu->insertItem(krLoader->loadIcon("folder_new", KIcon::Small), ! i18n("New Folder ..."), NewFolder); } --- 1,63 ---- #include "krbookmarkhandler.h" #include "krbookmark.h" + #include "kraddbookmarkdlg.h" #include "../krusader.h" + #include "../krslots.h" #include <kiconloader.h> #include <kactioncollection.h> #include <klocale.h> + #include <kdebug.h> #define SPECIAL_BOOKMARKS true + #define CONNECT_BM(X) connect(X, SIGNAL(activated(KrBookmark *)), \ + this, SLOT(bookmarkActivated(KrBookmark *))); + KrBookmarkHandler::KrBookmarkHandler(QWidget *parent, KPopupMenu *menu): QObject(parent), _menu(menu) { // create our own action collection and make the shortcuts apply only to parent _collection = new KActionCollection(0, parent); + + _menu->setKeyboardShortcutsEnabled(true); + _menu->setKeyboardShortcutsExecute(true); + connect(_menu, SIGNAL(activated(int)), this, SLOT(menuOperation(int))); + // do we need to add special bookmarks? if (SPECIAL_BOOKMARKS) { _menu->insertSeparator(); ! KrBookmark *bm = KrBookmark::devices(_collection); ! bm->plug(_menu); ! CONNECT_BM(bm); ! _menu->insertSeparator(); } _menu->insertItem(krLoader->loadIcon("bookmark_add", KIcon::Small), i18n("Bookmark Current"), BookmarkCurrent); _menu->insertItem(krLoader->loadIcon("bookmark", KIcon::Small), ! i18n("Manage Bookmarks"), ManageBookmarks); } + void KrBookmarkHandler::bookmarkActivated(KrBookmark *bm) { + emit openUrl(bm->url()); + } + + void KrBookmarkHandler::menuOperation(int id) { + switch (id) { + case BookmarkCurrent: + bookmarkCurrent(ACTIVE_PANEL->virtualPath); + break; + case ManageBookmarks: + kdWarning() << "manage not implemented yet" << endl; + break; + } + } + + void KrBookmarkHandler::bookmarkCurrent(KURL url) { + KrAddBookmarkDlg dlg(krApp, url); + if (dlg.exec() == KDialog::Accepted) { + KrBookmark *bm = new KrBookmark(dlg.name(), dlg.url(), _collection); + bm->plug(_menu, 0); // add on top + CONNECT_BM(bm); + } + } + + Index: Makefile.am =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/BookMan/Makefile.am,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Makefile.am 26 Sep 2004 23:49:37 -0000 1.4 --- Makefile.am 29 Sep 2004 00:33:25 -0000 1.5 *************** *** 7,12 **** libBookMan_a_SOURCES = kbookmarkmenu.cpp kbookmarkhandler.cpp \ ! bookmarksbutton.cpp addbookmarkform.ui addbookmarkdlg.cpp krbookmark.cpp \ ! krbookmarkbutton.cpp krbookmarkhandler.cpp --- 7,12 ---- libBookMan_a_SOURCES = kbookmarkmenu.cpp kbookmarkhandler.cpp \ ! bookmarksbutton.cpp addbookmarkform.ui addbookmarkdlg.cpp krbookmark.cpp \ ! krbookmarkbutton.cpp krbookmarkhandler.cpp kraddbookmarkdlg.cpp *************** *** 14,16 **** ####### kdevelop will overwrite this part!!! (end)############ ! noinst_HEADERS = krbookmark.h krbookmarkbutton.h krbookmarkhandler.h --- 14,17 ---- ####### kdevelop will overwrite this part!!! (end)############ ! noinst_HEADERS = krbookmark.h krbookmarkbutton.h krbookmarkhandler.h \ ! kraddbookmarkdlg.h --- NEW FILE: kraddbookmarkdlg.cpp --- #include "kraddbookmarkdlg.h" #include <klocale.h> #include <qlayout.h> #include <qlabel.h> KrAddBookmarkDlg::KrAddBookmarkDlg(QWidget *parent, KURL url): KDialogBase(KDialogBase::Swallow, i18n("Add Bookmark"), KDialogBase::Details | KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, parent) { setButtonText(KDialogBase::Details, i18n("Create in"));; // create the main widget QWidget *page = new QWidget(this); setMainWidget(page); QGridLayout *layout = new QGridLayout(page, 1, 1, 0, spacingHint()); // expanding QLabel *lb1 = new QLabel(i18n("Name:"), page); layout->addWidget(lb1, 0, 0); _name = new KLineEdit(page); layout->addWidget(_name, 0, 1); QLabel *lb2 = new QLabel(i18n("URL:"), page); layout->addWidget(lb2, 1, 0); _url = new KLineEdit(page); layout->addWidget(_url, 1, 1); _url->setText(url.url()); } --- NEW FILE: kraddbookmarkdlg.h --- #ifndef KRADDBOOKMARKDLG_H #define KRADDBOOKMARKDLG_H #include <kdialogbase.h> #include <kurl.h> #include <klineedit.h> class KrAddBookmarkDlg: public KDialogBase { public: KrAddBookmarkDlg(QWidget *parent, KURL url = 0); QString url() const { return _url->text(); } QString name() const { return _name->text(); } private: KLineEdit *_name; KLineEdit *_url; }; #endif // KRADDBOOKMARKDLG_H Index: krbookmarkhandler.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/BookMan/krbookmarkhandler.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** krbookmarkhandler.h 26 Sep 2004 23:49:37 -0000 1.1 --- krbookmarkhandler.h 29 Sep 2004 00:33:25 -0000 1.2 *************** *** 4,15 **** #include <qobject.h> #include <kpopupmenu.h> class KActionCollection; class KrBookmarkHandler: public QObject { ! enum Actions { NewFolder=10, BookmarkCurrent, EditBookmarks, NewLocal, NewRemote }; ! public: KrBookmarkHandler(QWidget *parent, KPopupMenu *menu); private: KPopupMenu *_menu; --- 4,29 ---- #include <qobject.h> #include <kpopupmenu.h> + #include <kurl.h> class KActionCollection; + class KrBookmark; class KrBookmarkHandler: public QObject { ! Q_OBJECT ! ! enum Actions { BookmarkCurrent, ManageBookmarks }; ! public: KrBookmarkHandler(QWidget *parent, KPopupMenu *menu); + protected: + void bookmarkCurrent(KURL url); + + signals: + void openUrl(const KURL& url); + + protected slots: + void bookmarkActivated(KrBookmark *bm); + void menuOperation(int id); + private: KPopupMenu *_menu; |