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: Shie E. <er...@us...> - 2004-09-28 23:15:44
|
Update of /cvsroot/krusader/krusader_kde3/krusader/BookMan In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10202/krusader/BookMan Modified Files: krbookmarkbutton.h Log Message: bookman2 opens urls ;-) Index: krbookmarkbutton.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/BookMan/krbookmarkbutton.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** krbookmarkbutton.h 25 Sep 2004 22:12:16 -0000 1.1 --- krbookmarkbutton.h 28 Sep 2004 23:15:33 -0000 1.2 *************** *** 3,10 **** --- 3,15 ---- #include <qtoolbutton.h> + #include "krbookmarkhandler.h" class KrBookmarkButton: public QToolButton { public: KrBookmarkButton(QWidget *parent); + KrBookmarkHandler *handler() const { return _handler; } + + private: + KrBookmarkHandler *_handler; }; |
From: Shie E. <er...@us...> - 2004-09-28 23:15:18
|
Update of /cvsroot/krusader/krusader_kde3/krusader/BookMan In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10013/krusader/BookMan Modified Files: krbookmarkbutton.cpp Log Message: bookman2 now opens urls ;-) Index: krbookmarkbutton.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/BookMan/krbookmarkbutton.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** krbookmarkbutton.cpp 26 Sep 2004 23:49:37 -0000 1.2 --- krbookmarkbutton.cpp 28 Sep 2004 23:15:09 -0000 1.3 *************** *** 19,24 **** acmBookmarks->setDelayed(false); ! KrBookmarkHandler *handler = new KrBookmarkHandler(this, acmBookmarks->popupMenu()); ! setPopup(acmBookmarks->popupMenu()); } --- 19,23 ---- acmBookmarks->setDelayed(false); ! _handler = new KrBookmarkHandler(this, acmBookmarks->popupMenu()); setPopup(acmBookmarks->popupMenu()); } |
From: Shie E. <er...@us...> - 2004-09-28 23:14:32
|
Update of /cvsroot/krusader/krusader_kde3/krusader/Panel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9700/krusader/Panel Modified Files: listpanel.cpp Log Message: more bookman 2 Index: listpanel.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Panel/listpanel.cpp,v retrieving revision 1.91 retrieving revision 1.92 diff -C2 -d -r1.91 -r1.92 *** listpanel.cpp 25 Sep 2004 22:12:16 -0000 1.91 --- listpanel.cpp 28 Sep 2004 23:14:20 -0000 1.92 *************** *** 142,145 **** --- 142,147 ---- #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 |
From: Karai C. <ck...@us...> - 2004-09-28 18:43:36
|
Update of /cvsroot/krusader/krusader_kde3/krArc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13895/krusader_kde3/krArc Modified Files: krarc.cpp Log Message: FIXED: overwrite doesn't work with krarc ( excuse me :=( ) Index: krarc.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krArc/krarc.cpp,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** krarc.cpp 14 Sep 2004 21:05:01 -0000 1.27 --- krarc.cpp 28 Sep 2004 18:43:25 -0000 1.28 *************** *** 434,438 **** } ! void kio_krarcProtocol::copy (const KURL &url, const KURL &dest, int, bool) { KRDEBUG(url.path()); --- 434,438 ---- } ! void kio_krarcProtocol::copy (const KURL &url, const KURL &dest, int, bool overwrite) { KRDEBUG(url.path()); *************** *** 442,445 **** --- 442,452 ---- if( url.fileName() != dest.fileName() ) break; + + //the file exists and we don't want to overwrite + if ((!overwrite) && ( QFile( dest.path() ).exists() ) ) + { + error(ERR_FILE_ALREADY_EXIST, QFile::encodeName(dest.path()) ); + return; + }; setArcFile(url.path()); *************** *** 1062,1066 **** listCmd = fullPathName( "unzip" ) + " -ZTs-z-t-h "; getCmd = fullPathName( "unzip" ) + " -p "; ! copyCmd = fullPathName( "unzip" ) + " -j "; if( KStandardDirs::findExe( "zip" ).isEmpty() ) { --- 1069,1073 ---- listCmd = fullPathName( "unzip" ) + " -ZTs-z-t-h "; getCmd = fullPathName( "unzip" ) + " -p "; ! copyCmd = fullPathName( "unzip" ) + " -jo "; if( KStandardDirs::findExe( "zip" ).isEmpty() ) { *************** *** 1084,1088 **** listCmd = fullPathName( "unrar" ) + " -c- v "; getCmd = fullPathName( "unrar" ) + " p -ierr -idp -c- -y "; ! copyCmd = fullPathName( "unrar" ) + " e "; delCmd = QString::null; putCmd = QString::null; --- 1091,1095 ---- listCmd = fullPathName( "unrar" ) + " -c- v "; getCmd = fullPathName( "unrar" ) + " p -ierr -idp -c- -y "; ! copyCmd = fullPathName( "unrar" ) + " e -y "; delCmd = QString::null; putCmd = QString::null; *************** *** 1093,1097 **** listCmd = fullPathName( "rar" ) + " -c- v "; getCmd = fullPathName( "rar" ) + " p -ierr -idp -c- -y "; ! copyCmd = fullPathName( "rar" ) + " e "; delCmd = fullPathName( "rar" ) + " d "; putCmd = fullPathName( "rar" ) + " -r a "; --- 1100,1104 ---- listCmd = fullPathName( "rar" ) + " -c- v "; getCmd = fullPathName( "rar" ) + " p -ierr -idp -c- -y "; ! copyCmd = fullPathName( "rar" ) + " e -y "; delCmd = fullPathName( "rar" ) + " d "; putCmd = fullPathName( "rar" ) + " -r a "; *************** *** 1129,1133 **** listCmd = fullPathName( "lha" ) + " l "; getCmd = fullPathName( "lha" ) + " pq "; ! copyCmd = fullPathName( "lha" ) + " ei "; delCmd = fullPathName( "lha" ) + " d "; putCmd = fullPathName( "lha" ) + " a "; --- 1136,1140 ---- listCmd = fullPathName( "lha" ) + " l "; getCmd = fullPathName( "lha" ) + " pq "; ! copyCmd = fullPathName( "lha" ) + " eif "; delCmd = fullPathName( "lha" ) + " d "; putCmd = fullPathName( "lha" ) + " a "; *************** *** 1135,1140 **** cmd = fullPathName( "unace" ); listCmd = fullPathName( "unace" ) + " v"; ! getCmd = fullPathName( "unace" ) + " e"; ! copyCmd = fullPathName( "unace" ) + " e"; delCmd = QString::null; putCmd = QString::null; --- 1142,1147 ---- cmd = fullPathName( "unace" ); listCmd = fullPathName( "unace" ) + " v"; ! getCmd = fullPathName( "unace" ) + " e -o "; ! copyCmd = fullPathName( "unace" ) + " e -o "; delCmd = QString::null; putCmd = QString::null; |
From: Karai C. <ck...@us...> - 2004-09-27 19:58:32
|
Update of /cvsroot/krusader/krusader_kde3/krusader/Search In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28061/krusader_kde3/krusader/Search Modified Files: generalfilter.cpp generalfilter.h krsearchdialog.cpp Log Message: ADDED: synchronizer uses the filters of searcher :-))) Index: generalfilter.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Search/generalfilter.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** generalfilter.h 26 Sep 2004 23:08:20 -0000 1.3 --- generalfilter.h 27 Sep 2004 19:58:18 -0000 1.4 *************** *** 50,54 **** public: ! GeneralFilter( QWidget *parent = 0, const char *name = 0 ); ~GeneralFilter(); --- 50,54 ---- public: ! GeneralFilter( bool hasDirOptions, QWidget *parent = 0, const char *name = 0 ); ~GeneralFilter(); *************** *** 93,96 **** --- 93,98 ---- KShellCompletion completion; + + bool hasDirOptions; }; Index: krsearchdialog.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Search/krsearchdialog.cpp,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** krsearchdialog.cpp 26 Sep 2004 23:08:20 -0000 1.26 --- krsearchdialog.cpp 27 Sep 2004 19:58:18 -0000 1.27 *************** *** 92,96 **** searcherTabs = new QTabWidget( this, "searcherTabs" ); ! generalFilter = new GeneralFilter( searcherTabs, "generalFilter" ); searcherTabs->insertTab( generalFilter, i18n( "&General" ) ); --- 92,96 ---- searcherTabs = new QTabWidget( this, "searcherTabs" ); ! generalFilter = new GeneralFilter( true, searcherTabs, "generalFilter" ); searcherTabs->insertTab( generalFilter, i18n( "&General" ) ); Index: generalfilter.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Search/generalfilter.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** generalfilter.cpp 26 Sep 2004 23:08:20 -0000 1.2 --- generalfilter.cpp 27 Sep 2004 19:58:18 -0000 1.3 *************** *** 145,149 **** ! GeneralFilter::GeneralFilter( QWidget *parent, const char *name ) : QWidget( parent, name ) { QGridLayout *filterLayout = new QGridLayout( this ); --- 145,149 ---- ! GeneralFilter::GeneralFilter( bool hasDirOptions, QWidget *parent, const char *name ) : QWidget( parent, name ) { QGridLayout *filterLayout = new QGridLayout( this ); *************** *** 151,154 **** --- 151,156 ---- filterLayout->setMargin( 11 ); + this->hasDirOptions = hasDirOptions; + // Options for name filtering *************** *** 197,267 **** filterLayout->addMultiCellWidget( nameGroup, 0, 0, 0, 1 ); ! // Options for search in ! QGroupBox *searchInGroup = new QGroupBox( this, "searchInGroup" ); ! searchInGroup->setTitle( i18n( "&Search in" ) ); ! searchInGroup->setColumnLayout(0, Qt::Vertical ); ! searchInGroup->layout()->setSpacing( 0 ); ! searchInGroup->layout()->setMargin( 0 ); ! QGridLayout *searchInLayout = new QGridLayout( searchInGroup->layout() ); ! searchInLayout->setAlignment( Qt::AlignTop ); ! searchInLayout->setSpacing( 6 ); ! searchInLayout->setMargin( 11 ); ! searchInEdit = new KLineEdit( searchInGroup, "searchInEdit" ); ! searchInLayout->addWidget( searchInEdit, 0, 0 ); ! searchIn = new QListBox( searchInGroup, "searchIn" ); ! searchIn->setSelectionMode( QListBox::Extended ); ! searchInLayout->addMultiCellWidget( searchIn, 1, 1, 0, 2 ); ! 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 ); ! filterLayout->addWidget( searchInGroup, 1, 0 ); ! // Options for don't search in ! QGroupBox *dontSearchInGroup = new QGroupBox( this, "dontSearchInGroup" ); ! dontSearchInGroup->setTitle( i18n( "&Don't search in" ) ); ! dontSearchInGroup->setColumnLayout(0, Qt::Vertical ); ! dontSearchInGroup->layout()->setSpacing( 0 ); ! dontSearchInGroup->layout()->setMargin( 0 ); ! QGridLayout *dontSearchInLayout = new QGridLayout( dontSearchInGroup->layout() ); ! dontSearchInLayout->setAlignment( Qt::AlignTop ); ! dontSearchInLayout->setSpacing( 6 ); ! dontSearchInLayout->setMargin( 11 ); ! dontSearchInEdit = new KLineEdit( dontSearchInGroup, "dontSearchInEdit" ); ! dontSearchInLayout->addWidget( dontSearchInEdit, 0, 0 ); ! 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 ); ! dontSearchIn = new QListBox( dontSearchInGroup, "dontSearchIn" ); ! dontSearchIn->setSelectionMode( QListBox::Extended ); ! dontSearchInLayout->addMultiCellWidget( dontSearchIn, 1, 1, 0, 2 ); ! filterLayout->addWidget( dontSearchInGroup, 1, 1 ); ! // add shell completion ! completion.setMode( KURLCompletion::FileCompletion ); ! searchInEdit->setCompletionObject( &completion ); ! dontSearchInEdit->setCompletionObject( &completion ); // Options for containing text --- 199,272 ---- filterLayout->addMultiCellWidget( nameGroup, 0, 0, 0, 1 ); ! if( hasDirOptions ) ! { ! // Options for search in ! QGroupBox *searchInGroup = new QGroupBox( this, "searchInGroup" ); ! searchInGroup->setTitle( i18n( "&Search in" ) ); ! searchInGroup->setColumnLayout(0, Qt::Vertical ); ! searchInGroup->layout()->setSpacing( 0 ); ! searchInGroup->layout()->setMargin( 0 ); ! QGridLayout *searchInLayout = new QGridLayout( searchInGroup->layout() ); ! searchInLayout->setAlignment( Qt::AlignTop ); ! searchInLayout->setSpacing( 6 ); ! searchInLayout->setMargin( 11 ); ! searchInEdit = new KLineEdit( searchInGroup, "searchInEdit" ); ! searchInLayout->addWidget( searchInEdit, 0, 0 ); ! searchIn = new QListBox( searchInGroup, "searchIn" ); ! searchIn->setSelectionMode( QListBox::Extended ); ! searchInLayout->addMultiCellWidget( searchIn, 1, 1, 0, 2 ); ! 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 ); ! filterLayout->addWidget( searchInGroup, 1, 0 ); ! // Options for don't search in ! QGroupBox *dontSearchInGroup = new QGroupBox( this, "dontSearchInGroup" ); ! dontSearchInGroup->setTitle( i18n( "&Don't search in" ) ); ! dontSearchInGroup->setColumnLayout(0, Qt::Vertical ); ! dontSearchInGroup->layout()->setSpacing( 0 ); ! dontSearchInGroup->layout()->setMargin( 0 ); ! QGridLayout *dontSearchInLayout = new QGridLayout( dontSearchInGroup->layout() ); ! dontSearchInLayout->setAlignment( Qt::AlignTop ); ! dontSearchInLayout->setSpacing( 6 ); ! dontSearchInLayout->setMargin( 11 ); ! dontSearchInEdit = new KLineEdit( dontSearchInGroup, "dontSearchInEdit" ); ! dontSearchInLayout->addWidget( dontSearchInEdit, 0, 0 ); ! 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 ); ! dontSearchIn = new QListBox( dontSearchInGroup, "dontSearchIn" ); ! dontSearchIn->setSelectionMode( QListBox::Extended ); ! dontSearchInLayout->addMultiCellWidget( dontSearchIn, 1, 1, 0, 2 ); ! filterLayout->addWidget( dontSearchInGroup, 1, 1 ); ! // add shell completion ! completion.setMode( KURLCompletion::FileCompletion ); ! searchInEdit->setCompletionObject( &completion ); ! dontSearchInEdit->setCompletionObject( &completion ); ! } // Options for containing text *************** *** 313,352 **** containsLayout->addLayout( containsCbsLayout, 1, 0 ); ! filterLayout->addMultiCellWidget( containsGroup, 2, 2, 0, 1 ); ! // Options for recursive searching ! QHBoxLayout *recurseLayout = new QHBoxLayout(); ! recurseLayout->setSpacing( 6 ); ! recurseLayout->setMargin( 0 ); ! QSpacerItem* recurseSpacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); ! recurseLayout->addItem( recurseSpacer ); ! searchInDirs = new QCheckBox( this, "searchInDirs" ); ! searchInDirs->setText( i18n( "Search in s&ubdirectories" ) ); ! searchInDirs->setChecked( true ); ! recurseLayout->addWidget( searchInDirs ); ! searchInArchives = new QCheckBox( this, "searchInArchives" ); ! searchInArchives->setText( i18n( "Search in arch&ives" ) ); ! recurseLayout->addWidget( searchInArchives ); ! followLinks = new QCheckBox( this, "followLinks" ); ! followLinks->setText( i18n( "Follow &links" ) ); ! recurseLayout->addWidget( followLinks ); ! filterLayout->addMultiCellLayout( recurseLayout, 3, 3, 0, 1 ); // Connection table ! ! connect( searchInBtn, SIGNAL( clicked() ), this, SLOT( addToSearchIn() ) ); ! connect( searchInBtnAdd, SIGNAL( clicked() ), this, SLOT( addToSearchInManually() ) ); ! connect( searchInEdit, SIGNAL( returnPressed(const QString&) ), this, SLOT( addToSearchInManually() ) ); ! connect( dontSearchInBtn, SIGNAL( clicked() ), this, SLOT( addToDontSearchIn() ) ); ! connect( dontSearchInBtnAdd, SIGNAL( clicked() ), this, SLOT( addToDontSearchInManually() ) ); ! connect( dontSearchInEdit, SIGNAL( returnPressed(const QString&) ), this, SLOT( addToDontSearchInManually() ) ); ! connect( searchInArchives, SIGNAL(toggled(bool)), containsText, SLOT(setDisabled(bool))); ! connect( searchInArchives, SIGNAL(toggled(bool)), containsTextCase, SLOT(setDisabled(bool))); ! connect( searchInArchives, SIGNAL(toggled(bool)), containsWholeWord, SLOT(setDisabled(bool))); connect( searchFor, SIGNAL(activated(const QString&)), searchFor, SLOT(addToHistory(const QString&))); connect( containsText, SIGNAL(activated(const QString&)), containsText, SLOT(addToHistory(const QString&))); --- 318,364 ---- containsLayout->addLayout( containsCbsLayout, 1, 0 ); ! int position = hasDirOptions ? 2 : 1; ! filterLayout->addMultiCellWidget( containsGroup, position, position, 0, 1 ); ! if( hasDirOptions ) ! { ! // Options for recursive searching ! QHBoxLayout *recurseLayout = new QHBoxLayout(); ! recurseLayout->setSpacing( 6 ); ! recurseLayout->setMargin( 0 ); ! QSpacerItem* recurseSpacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); ! recurseLayout->addItem( recurseSpacer ); ! searchInDirs = new QCheckBox( this, "searchInDirs" ); ! searchInDirs->setText( i18n( "Search in s&ubdirectories" ) ); ! searchInDirs->setChecked( true ); ! recurseLayout->addWidget( searchInDirs ); ! searchInArchives = new QCheckBox( this, "searchInArchives" ); ! searchInArchives->setText( i18n( "Search in arch&ives" ) ); ! recurseLayout->addWidget( searchInArchives ); ! followLinks = new QCheckBox( this, "followLinks" ); ! followLinks->setText( i18n( "Follow &links" ) ); ! recurseLayout->addWidget( followLinks ); ! filterLayout->addMultiCellLayout( recurseLayout, 3, 3, 0, 1 ); ! } // Connection table ! ! if( hasDirOptions ) ! { ! connect( searchInBtn, SIGNAL( clicked() ), this, SLOT( addToSearchIn() ) ); ! connect( searchInBtnAdd, SIGNAL( clicked() ), this, SLOT( addToSearchInManually() ) ); ! connect( searchInEdit, SIGNAL( returnPressed(const QString&) ), this, SLOT( addToSearchInManually() ) ); ! connect( dontSearchInBtn, SIGNAL( clicked() ), this, SLOT( addToDontSearchIn() ) ); ! connect( dontSearchInBtnAdd, SIGNAL( clicked() ), this, SLOT( addToDontSearchInManually() ) ); ! connect( dontSearchInEdit, SIGNAL( returnPressed(const QString&) ), this, SLOT( addToDontSearchInManually() ) ); ! connect( searchInArchives, SIGNAL(toggled(bool)), containsText, SLOT(setDisabled(bool))); ! connect( searchInArchives, SIGNAL(toggled(bool)), containsTextCase, SLOT(setDisabled(bool))); ! connect( searchInArchives, SIGNAL(toggled(bool)), containsWholeWord, SLOT(setDisabled(bool))); ! } connect( searchFor, SIGNAL(activated(const QString&)), searchFor, SLOT(addToHistory(const QString&))); connect( containsText, SIGNAL(activated(const QString&)), containsText, SLOT(addToHistory(const QString&))); *************** *** 354,368 **** // tab order ! setTabOrder( searchFor, ofType ); ! setTabOrder( ofType, searchInEdit ); ! setTabOrder( searchInEdit, dontSearchInEdit ); ! setTabOrder( dontSearchInEdit, containsText ); ! setTabOrder( containsText, dontSearchIn ); ! setTabOrder( dontSearchIn, searchIn ); ! setTabOrder( searchIn, containsTextCase ); ! setTabOrder( containsTextCase, searchForCase ); ! setTabOrder( searchForCase, searchInDirs ); ! setTabOrder( searchInDirs, searchInArchives ); ! setTabOrder( searchInArchives, followLinks ); // load the completion and history lists --- 366,383 ---- // tab order ! if( hasDirOptions ) ! { ! setTabOrder( searchFor, ofType ); ! setTabOrder( ofType, searchInEdit ); ! setTabOrder( searchInEdit, dontSearchInEdit ); ! setTabOrder( dontSearchInEdit, containsText ); ! setTabOrder( containsText, dontSearchIn ); ! setTabOrder( dontSearchIn, searchIn ); ! setTabOrder( searchIn, containsTextCase ); ! setTabOrder( containsTextCase, searchForCase ); ! setTabOrder( searchForCase, searchInDirs ); ! setTabOrder( searchInDirs, searchInArchives ); ! setTabOrder( searchInArchives, followLinks ); ! } // load the completion and history lists *************** *** 451,490 **** query->containCaseSensetive = containsTextCase->isChecked(); query->containWholeWord = containsWholeWord->isChecked(); - query->inArchive = searchInArchives->isChecked(); - query->recurse = searchInDirs->isChecked(); - query->followLinks = followLinks->isChecked(); if (ofType->currentText()!=i18n("All Files")) query->type = ofType->currentText(); else query->type = QString::null; ! // create the lists ! query->whereToSearch.clear(); ! QListBoxItem *item = searchIn->firstItem(); ! while ( item ) ! { ! query->whereToSearch.append( vfs::fromPathOrURL( item->text().simplifyWhiteSpace() ) ); ! item = item->next(); ! } ! if (!searchInEdit->text().simplifyWhiteSpace().isEmpty()) ! query->whereToSearch.append( vfs::fromPathOrURL( searchInEdit->text().simplifyWhiteSpace() ) ); ! query->whereNotToSearch.clear(); ! item = dontSearchIn->firstItem(); ! while ( item ) ! { ! query->whereNotToSearch.append( vfs::fromPathOrURL( item->text().simplifyWhiteSpace() ) ); ! item = item->next(); ! } ! if (!dontSearchInEdit->text().simplifyWhiteSpace().isEmpty()) ! query->whereNotToSearch.append( vfs::fromPathOrURL( dontSearchInEdit->text().simplifyWhiteSpace() ) ); ! // checking the lists ! if (query->whereToSearch.isEmpty() ) { // we need a place to search in ! KMessageBox::error(0,i18n("Please specify a location to search in.")); ! searchInEdit->setFocus(); ! return false; } --- 466,509 ---- query->containCaseSensetive = containsTextCase->isChecked(); query->containWholeWord = containsWholeWord->isChecked(); if (ofType->currentText()!=i18n("All Files")) query->type = ofType->currentText(); else query->type = QString::null; ! if ( hasDirOptions ) ! { ! query->inArchive = searchInArchives->isChecked(); ! query->recurse = searchInDirs->isChecked(); ! query->followLinks = followLinks->isChecked(); ! ! // create the lists ! query->whereToSearch.clear(); ! QListBoxItem *item = searchIn->firstItem(); ! while ( item ) ! { ! query->whereToSearch.append( vfs::fromPathOrURL( item->text().simplifyWhiteSpace() ) ); ! item = item->next(); ! } ! if (!searchInEdit->text().simplifyWhiteSpace().isEmpty()) ! query->whereToSearch.append( vfs::fromPathOrURL( searchInEdit->text().simplifyWhiteSpace() ) ); ! query->whereNotToSearch.clear(); ! item = dontSearchIn->firstItem(); ! while ( item ) ! { ! query->whereNotToSearch.append( vfs::fromPathOrURL( item->text().simplifyWhiteSpace() ) ); ! item = item->next(); ! } ! if (!dontSearchInEdit->text().simplifyWhiteSpace().isEmpty()) ! query->whereNotToSearch.append( vfs::fromPathOrURL( dontSearchInEdit->text().simplifyWhiteSpace() ) ); ! // checking the lists ! if (query->whereToSearch.isEmpty() ) { // we need a place to search in ! KMessageBox::error(0,i18n("Please specify a location to search in.")); ! searchInEdit->setFocus(); ! return false; ! } } *************** *** 516,520 **** void GeneralFilter::keyPressEvent(QKeyEvent *e) { ! if( e->key() == Key_Delete ) { if( searchIn->hasFocus() ) --- 535,539 ---- void GeneralFilter::keyPressEvent(QKeyEvent *e) { ! if( hasDirOptions && e->key() == Key_Delete ) { if( searchIn->hasFocus() ) *************** *** 540,550 **** containsTextCase->setChecked( krConfig->readBoolEntry( "Case Sensitive Content", false ) ); containsWholeWord->setChecked( krConfig->readBoolEntry( "Match Whole Word Only", false ) ); - searchInDirs->setChecked( krConfig->readBoolEntry( "Search In Subdirectories", true ) ); - searchInArchives->setChecked( krConfig->readBoolEntry( "Search In Archives", false ) ); - followLinks->setChecked( krConfig->readBoolEntry( "Follow Symlinks", false ) ); - searchFor->setEditText( krConfig->readEntry( "Search For", "" ) ); containsText->setEditText( krConfig->readEntry( "Contains Text", "" ) ); ! QString mime = krConfig->readEntry( "Mime Type", "" ); for( int i = ofType->count(); i >= 0; i-- ) --- 559,565 ---- containsTextCase->setChecked( krConfig->readBoolEntry( "Case Sensitive Content", false ) ); containsWholeWord->setChecked( krConfig->readBoolEntry( "Match Whole Word Only", false ) ); searchFor->setEditText( krConfig->readEntry( "Search For", "" ) ); containsText->setEditText( krConfig->readEntry( "Contains Text", "" ) ); ! QString mime = krConfig->readEntry( "Mime Type", "" ); for( int i = ofType->count(); i >= 0; i-- ) *************** *** 555,570 **** } ! searchInEdit->setText( krConfig->readEntry( "Search In Edit", "" ) ); ! dontSearchInEdit->setText( krConfig->readEntry( "Dont Search In Edit", "" ) ); ! searchIn->clear(); ! QStringList searchInList = krConfig->readListEntry( "Search In List" ); ! if( !searchInList.isEmpty() ) ! searchIn->insertStringList( searchInList ); ! dontSearchIn->clear(); ! QStringList dontSearchInList = krConfig->readListEntry( "Dont Search In List" ); ! if( !dontSearchInList.isEmpty() ) ! dontSearchIn->insertStringList( dontSearchInList ); } --- 570,592 ---- } ! if( hasDirOptions ) ! { ! searchInDirs->setChecked( krConfig->readBoolEntry( "Search In Subdirectories", true ) ); ! searchInArchives->setChecked( krConfig->readBoolEntry( "Search In Archives", false ) ); ! followLinks->setChecked( krConfig->readBoolEntry( "Follow Symlinks", false ) ); ! searchInEdit->setText( krConfig->readEntry( "Search In Edit", "" ) ); ! dontSearchInEdit->setText( krConfig->readEntry( "Dont Search In Edit", "" ) ); ! searchIn->clear(); ! QStringList searchInList = krConfig->readListEntry( "Search In List" ); ! if( !searchInList.isEmpty() ) ! searchIn->insertStringList( searchInList ); ! ! dontSearchIn->clear(); ! QStringList dontSearchInList = krConfig->readListEntry( "Dont Search In List" ); ! if( !dontSearchInList.isEmpty() ) ! dontSearchIn->insertStringList( dontSearchInList ); ! } } *************** *** 576,601 **** krConfig->writeEntry( "Case Sensitive Content", containsTextCase->isChecked() ); krConfig->writeEntry( "Match Whole Word Only", containsWholeWord->isChecked() ); - krConfig->writeEntry( "Search In Subdirectories", searchInDirs->isChecked() ); - krConfig->writeEntry( "Search In Archives", searchInArchives->isChecked() ); - krConfig->writeEntry( "Follow Symlinks", followLinks->isChecked() ); - krConfig->writeEntry( "Search For", searchFor->currentText() ); krConfig->writeEntry( "Contains Text", containsText->currentText() ); krConfig->writeEntry( "Mime Type", ofType->currentText() ); ! krConfig->writeEntry( "Search In Edit", searchInEdit->text() ); ! krConfig->writeEntry( "Dont Search In Edit", dontSearchInEdit->text() ); ! ! QStringList searchInList; ! QListBoxItem *item; ! for ( item = searchIn->firstItem(); item != 0; item = item->next() ) ! searchInList.append( item->text().simplifyWhiteSpace() ); ! krConfig->writeEntry( "Search In List", searchInList ); ! QStringList dontSearchInList; ! for ( item = dontSearchIn->firstItem(); item != 0; item = item->next() ) ! dontSearchInList.append( item->text().simplifyWhiteSpace() ); ! krConfig->writeEntry( "Dont Search In List", dontSearchInList ); } --- 598,626 ---- krConfig->writeEntry( "Case Sensitive Content", containsTextCase->isChecked() ); krConfig->writeEntry( "Match Whole Word Only", containsWholeWord->isChecked() ); krConfig->writeEntry( "Search For", searchFor->currentText() ); krConfig->writeEntry( "Contains Text", containsText->currentText() ); krConfig->writeEntry( "Mime Type", ofType->currentText() ); + + if( hasDirOptions ) + { + krConfig->writeEntry( "Search In Subdirectories", searchInDirs->isChecked() ); + krConfig->writeEntry( "Search In Archives", searchInArchives->isChecked() ); + krConfig->writeEntry( "Follow Symlinks", followLinks->isChecked() ); + + krConfig->writeEntry( "Search In Edit", searchInEdit->text() ); + krConfig->writeEntry( "Dont Search In Edit", dontSearchInEdit->text() ); ! QStringList searchInList; ! QListBoxItem *item; ! for ( item = searchIn->firstItem(); item != 0; item = item->next() ) ! searchInList.append( item->text().simplifyWhiteSpace() ); ! krConfig->writeEntry( "Search In List", searchInList ); ! QStringList dontSearchInList; ! for ( item = dontSearchIn->firstItem(); item != 0; item = item->next() ) ! dontSearchInList.append( item->text().simplifyWhiteSpace() ); ! krConfig->writeEntry( "Dont Search In List", dontSearchInList ); ! } } |
From: Karai C. <ck...@us...> - 2004-09-27 19:58:32
|
Update of /cvsroot/krusader/krusader_kde3/krusader/Synchronizer In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28061/krusader_kde3/krusader/Synchronizer Modified Files: synchronizergui.cpp synchronizergui.h Log Message: ADDED: synchronizer uses the filters of searcher :-))) Index: synchronizergui.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Synchronizer/synchronizergui.h,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** synchronizergui.h 27 Sep 2004 17:18:55 -0000 1.13 --- synchronizergui.h 27 Sep 2004 19:58:18 -0000 1.14 *************** *** 34,37 **** --- 34,39 ---- #include "synchronizer.h" #include "../GUI/profilemanager.h" + #include "../Search/advancedfilter.h" + #include "../Search/generalfilter.h" #include <qdialog.h> #include <qlistview.h> *************** *** 41,44 **** --- 43,47 ---- #include <qmap.h> #include <qlabel.h> + #include <qtabwidget.h> class SynchronizerGUI : QDialog *************** *** 109,112 **** --- 112,116 ---- void subdirsChecked( bool ); void setPanelLabels(); + void connectFilters( const QString & ); private: *************** *** 121,124 **** --- 125,132 ---- ProfileManager *profileManager; + AdvancedFilter *advancedFilter; + GeneralFilter *generalFilter; + + QTabWidget *synchronizerTabs; KHistoryCombo *leftLocation; Index: synchronizergui.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Synchronizer/synchronizergui.cpp,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** synchronizergui.cpp 27 Sep 2004 18:17:27 -0000 1.23 --- synchronizergui.cpp 27 Sep 2004 19:58:18 -0000 1.24 *************** *** 1025,1032 **** folderIcon = QPixmap( ( const char** ) folder_data ); fileIcon = QPixmap( ( const char** ) file_data ); /* ============================== Compare groupbox ============================== */ ! QGroupBox *compareDirs = new QGroupBox( this, "SyncCompareDirectories" ); compareDirs->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed); compareDirs->setTitle( i18n( "Directory Comparation" ) ); --- 1025,1039 ---- folderIcon = QPixmap( ( const char** ) folder_data ); fileIcon = QPixmap( ( const char** ) file_data ); + + synchronizerTabs = new QTabWidget( this, "synchronizerTabs" ); /* ============================== Compare groupbox ============================== */ ! QWidget *synchronizerTab = new QWidget( this, "syncronizerTab" ); ! QGridLayout *synchronizerGrid = new QGridLayout( synchronizerTab ); ! synchronizerGrid->setSpacing( 6 ); ! synchronizerGrid->setMargin( 11 ); ! ! QGroupBox *compareDirs = new QGroupBox( synchronizerTab, "SyncCompareDirectories" ); compareDirs->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed); compareDirs->setTitle( i18n( "Directory Comparation" ) ); *************** *** 1194,1202 **** grid->addMultiCellWidget( optionBox, 2, 2, 0, 2 ); ! synchGrid->addWidget( compareDirs, 0, 0 ); /* ========================= Synchronization list view ========================== */ ! syncList=new QListView( this ); // create the main container krConfig->setGroup("Look&Feel"); --- 1201,1209 ---- grid->addMultiCellWidget( optionBox, 2, 2, 0, 2 ); ! synchronizerGrid->addWidget( compareDirs, 0, 0 ); /* ========================= Synchronization list view ========================== */ ! syncList=new QListView( synchronizerTab ); // create the main container krConfig->setGroup("Look&Feel"); *************** *** 1247,1252 **** syncList->header()->setStretchEnabled( true, 0 ); ! synchGrid->addWidget(syncList,1,0); ! /* ================================== Buttons =================================== */ --- 1254,1270 ---- syncList->header()->setStretchEnabled( true, 0 ); ! synchronizerGrid->addWidget(syncList,1,0); ! ! synchronizerTabs->insertTab( synchronizerTab, i18n( "&Synchronizer" ) ); ! synchGrid->addWidget( synchronizerTabs, 0, 0 ); ! ! generalFilter = new GeneralFilter( false, synchronizerTabs, "generalFilter" ); ! generalFilter->searchFor->setEditText( fileFilter->currentText() ); ! generalFilter->searchForCase->setChecked( true ); ! synchronizerTabs->insertTab( generalFilter, i18n( "&General Filters" ) ); ! ! advancedFilter = new AdvancedFilter( synchronizerTabs, "advancedFilter" ); ! synchronizerTabs->insertTab( advancedFilter, i18n( "&Advanced Filters" ) ); ! /* ================================== Buttons =================================== */ *************** *** 1289,1293 **** buttons->addWidget( btnCloseSync ); ! synchGrid->addLayout( buttons, 2, 0 ); /* =============================== Connect table ================================ */ --- 1307,1311 ---- buttons->addWidget( btnCloseSync ); ! synchGrid->addLayout( buttons, 1, 0 ); /* =============================== Connect table ================================ */ *************** *** 1322,1325 **** --- 1340,1351 ---- connect( btnSingles, SIGNAL( toggled(bool) ), this, SLOT( refresh() ) ); + connect( fileFilter, SIGNAL( textChanged( const QString & ) ), this, SLOT( connectFilters( const QString & ) ) ); + connect( generalFilter->searchFor, SIGNAL( textChanged( const QString & ) ), this, SLOT( connectFilters( const QString & ) ) ); + + connect( profileManager, SIGNAL( loadFromProfile( QString ) ), generalFilter, SLOT( loadFromProfile( QString ) ) ); + connect( profileManager, SIGNAL( saveToProfile( QString ) ), generalFilter, SLOT( saveToProfile( QString ) ) ); + connect( profileManager, SIGNAL( loadFromProfile( QString ) ), advancedFilter, SLOT( loadFromProfile( QString ) ) ); + connect( profileManager, SIGNAL( saveToProfile( QString ) ), advancedFilter, SLOT( saveToProfile( QString ) ) ); + setPanelLabels(); *************** *** 1576,1579 **** --- 1602,1618 ---- void SynchronizerGUI::compare() { + KRQuery query; + if( !generalFilter->fillQuery( &query ) ) + { + synchronizerTabs->setCurrentPage(1); // set page to advanced + return; + } + if( !advancedFilter->fillQuery( &query ) ) + { + synchronizerTabs->setCurrentPage(2); // set page to advanced + return; + } + query.setFilter( fileFilter->currentText() ); + bool autoScrolling = cbAutoScroll->isChecked(); *************** *** 1593,1600 **** btnSynchronize->setEnabled( false ); disableMarkButtons(); ! ! KRQuery query; ! query.setFilter( fileFilter->currentText() ); ! int fileCount = synchronizer.compare(leftLocation->currentText(), rightLocation->currentText(), &query, cbSubdirs->isChecked(), cbSymlinks->isChecked(), --- 1632,1636 ---- btnSynchronize->setEnabled( false ); disableMarkButtons(); ! int fileCount = synchronizer.compare(leftLocation->currentText(), rightLocation->currentText(), &query, cbSubdirs->isChecked(), cbSymlinks->isChecked(), *************** *** 1888,1892 **** leftLocation->setCurrentText( krConfig->readEntry( "Left Location" ) ); ! fileFilter->setCurrentText( krConfig->readEntry( "File Filter" ) ); rightLocation->setCurrentText( krConfig->readEntry( "Right Location" ) ); --- 1924,1928 ---- leftLocation->setCurrentText( krConfig->readEntry( "Left Location" ) ); ! fileFilter->setCurrentText( krConfig->readEntry( "Search For" ) ); rightLocation->setCurrentText( krConfig->readEntry( "Right Location" ) ); *************** *** 1914,1918 **** krConfig->writeEntry( "Left Location", leftLocation->currentText() ); ! krConfig->writeEntry( "File Filter", fileFilter->currentText() ); krConfig->writeEntry( "Right Location", rightLocation->currentText() ); --- 1950,1954 ---- krConfig->writeEntry( "Left Location", leftLocation->currentText() ); ! krConfig->writeEntry( "Search For", fileFilter->currentText() ); krConfig->writeEntry( "Right Location", rightLocation->currentText() ); *************** *** 1932,1933 **** --- 1968,1977 ---- krConfig->writeEntry( "Show Singles", btnSingles->isOn() ); } + + void SynchronizerGUI::connectFilters( const QString &newString ) + { + if( synchronizerTabs->currentPageIndex() ) + fileFilter->setEditText( newString ); + else + generalFilter->searchFor->setEditText( newString ); + } |
From: Karai C. <ck...@us...> - 2004-09-27 19:58:32
|
Update of /cvsroot/krusader/krusader_kde3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28061/krusader_kde3 Modified Files: CVSNEWS ChangeLog Log Message: ADDED: synchronizer uses the filters of searcher :-))) Index: CVSNEWS =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/CVSNEWS,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** CVSNEWS 26 Sep 2004 21:57:57 -0000 1.18 --- CVSNEWS 27 Sep 2004 19:58:17 -0000 1.19 *************** *** 4,7 **** --- 4,9 ---- ------------------------------------------------------ + Synchronizer: from now you can use the search filters in the synchronizer + Useraction: removed placeholder 'Bookmark'. It is deprecated now since the new bookmark-system can be accessed directly like an useraction. If you need it anyway Index: ChangeLog =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/ChangeLog,v retrieving revision 1.309 retrieving revision 1.310 diff -C2 -d -r1.309 -r1.310 *** ChangeLog 26 Sep 2004 23:08:19 -0000 1.309 --- ChangeLog 27 Sep 2004 19:58:17 -0000 1.310 *************** *** 1,3 **** --- 1,4 ---- ====================== + ADDED: synchronizer uses the search filters ADDED: search profiles ADDED: searcher: TC like search ( 'text' == '*text*' ) |
From: Karai C. <ck...@us...> - 2004-09-27 18:17:39
|
Update of /cvsroot/krusader/krusader_kde3/krusader/Synchronizer In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7285/krusader_kde3/krusader/Synchronizer Modified Files: synchronizer.cpp synchronizer.h synchronizergui.cpp Log Message: ARCHITECTURE: synchronizer uses KRQuery Index: synchronizer.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Synchronizer/synchronizer.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** synchronizer.h 17 Aug 2004 12:31:17 -0000 1.12 --- synchronizer.h 27 Sep 2004 18:17:27 -0000 1.13 *************** *** 33,36 **** --- 33,37 ---- #include "../VFS/vfs.h" + #include "../Search/krquery.h" #include <qobject.h> #include <qptrvector.h> *************** *** 136,140 **** public: Synchronizer(); ! int compare( QString leftURL, QString rightURL, QString filter, bool subDirs, bool symLinks, bool igDate, bool asymm, bool cmpByCnt, bool autoSc ); void stop() {stopped = true;} --- 137,141 ---- public: Synchronizer(); ! int compare( QString leftURL, QString rightURL, KRQuery *query, bool subDirs, bool symLinks, bool igDate, bool asymm, bool cmpByCnt, bool autoSc ); void stop() {stopped = true;} *************** *** 183,188 **** void compareDirectory( SynchronizerFileItem *,QString leftURL, QString rightURL, QString dir, QString addName=QString::null, ! QString addDir=QString::null, time_t addLTime=0, time_t addRTime=0 ); ! void addSingleDirectory( SynchronizerFileItem *, QString, QString, time_t, bool ); SynchronizerFileItem * addItem( SynchronizerFileItem *, QString, QString, bool, bool, KIO::filesize_t, KIO::filesize_t, --- 184,190 ---- void compareDirectory( SynchronizerFileItem *,QString leftURL, QString rightURL, QString dir, QString addName=QString::null, ! QString addDir=QString::null, time_t addLTime=0, time_t addRTime=0, ! bool isTemp = false ); ! void addSingleDirectory( SynchronizerFileItem *, QString, QString, time_t, bool, bool ); SynchronizerFileItem * addItem( SynchronizerFileItem *, QString, QString, bool, bool, KIO::filesize_t, KIO::filesize_t, *************** *** 195,199 **** KIO::filesize_t, KIO::filesize_t, time_t, time_t, bool isDir = false, bool isTemp = false ); - bool checkName( QString name ); bool isMarked( TaskType task, bool dupl ); bool markParentDirectories( SynchronizerFileItem * ); --- 197,200 ---- *************** *** 221,226 **** QString leftBaseDir; // the left-side base directory QString rightBaseDir; // the right-side base directory ! QStringList inclusionFilter;// the file selection filter for inclusion ! QStringList exclusionFilter;// the file selection filter for inclusion bool stopped; // 'Stop' button was pressed --- 222,226 ---- QString leftBaseDir; // the left-side base directory QString rightBaseDir; // the right-side base directory ! KRQuery *query; // the filter used for the query bool stopped; // 'Stop' button was pressed Index: synchronizergui.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Synchronizer/synchronizergui.cpp,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** synchronizergui.cpp 27 Sep 2004 17:18:55 -0000 1.22 --- synchronizergui.cpp 27 Sep 2004 18:17:27 -0000 1.23 *************** *** 35,38 **** --- 35,39 ---- #include "../KViewer/krviewer.h" #include "../Dialogs/krspwidgets.h" + #include "../Search/krquery.h" #include "../krservices.h" #include "../krslots.h" *************** *** 1592,1597 **** btnSynchronize->setEnabled( false ); disableMarkButtons(); int fileCount = synchronizer.compare(leftLocation->currentText(), rightLocation->currentText(), ! fileFilter->currentText(), cbSubdirs->isChecked(), cbSymlinks->isChecked(), cbIgnoreDate->isChecked(), cbAsymmetric->isChecked(), cbByContent->isChecked(), autoScrolling ); --- 1593,1602 ---- btnSynchronize->setEnabled( false ); disableMarkButtons(); + + KRQuery query; + query.setFilter( fileFilter->currentText() ); + int fileCount = synchronizer.compare(leftLocation->currentText(), rightLocation->currentText(), ! &query, cbSubdirs->isChecked(), cbSymlinks->isChecked(), cbIgnoreDate->isChecked(), cbAsymmetric->isChecked(), cbByContent->isChecked(), autoScrolling ); Index: synchronizer.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Synchronizer/synchronizer.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** synchronizer.cpp 17 Sep 2004 12:59:22 -0000 1.18 --- synchronizer.cpp 27 Sep 2004 18:17:26 -0000 1.19 *************** *** 72,81 **** scannedDirs = fileCount = 0; leftBaseDir = rightBaseDir = QString::null; - inclusionFilter.clear(); - exclusionFilter.clear(); resultList.clear(); } ! int Synchronizer::compare( QString leftURL, QString rightURL, QString filter, bool subDirs, bool symLinks, bool igDate, bool asymm, bool cmpByCnt, bool autoSc ) { --- 72,79 ---- scannedDirs = fileCount = 0; leftBaseDir = rightBaseDir = QString::null; resultList.clear(); } ! int Synchronizer::compare( QString leftURL, QString rightURL, KRQuery *query, bool subDirs, bool symLinks, bool igDate, bool asymm, bool cmpByCnt, bool autoSc ) { *************** *** 90,107 **** stopped = false; ! int exclusionIndex = filter.find('|'); ! if( exclusionIndex > -1 ) ! { ! QString inclusionExp = filter.left( exclusionIndex ); ! QString exclusionExp = filter.mid( exclusionIndex+1 ); ! ! inclusionFilter = QStringList::split(" ",inclusionExp); ! exclusionFilter = QStringList::split(" ",exclusionExp); ! ! if( inclusionFilter.count() == 0 ) ! inclusionFilter.push_back( QString("*") ); ! } ! else ! inclusionFilter = QStringList::split(" ",filter); if( !leftURL.endsWith("/" )) leftURL+="/"; --- 88,92 ---- stopped = false; ! this->query = query; if( !leftURL.endsWith("/" )) leftURL+="/"; *************** *** 118,122 **** void Synchronizer::compareDirectory( SynchronizerFileItem *parent, QString leftURL, QString rightURL, QString dir, QString addName, ! QString addDir, time_t addLTime, time_t addRTime ) { vfs * left_directory = getDirectory( leftURL ); --- 103,108 ---- void Synchronizer::compareDirectory( SynchronizerFileItem *parent, QString leftURL, QString rightURL, QString dir, QString addName, ! QString addDir, time_t addLTime, time_t addRTime, ! bool isTemp ) { vfs * left_directory = getDirectory( leftURL ); *************** *** 136,140 **** if( !dir.isEmpty() ) ! parent = addDuplicateItem( parent, addName, addDir, 0, 0, addLTime, addRTime, true, !checkName( addName ) ); /* walking through in the left directory */ --- 122,126 ---- if( !dir.isEmpty() ) ! parent = addDuplicateItem( parent, addName, addDir, 0, 0, addLTime, addRTime, true, isTemp ); /* walking through in the left directory */ *************** *** 147,151 **** file_name = left_file->vfile_getName(); ! if( !checkName( file_name ) ) continue; --- 133,137 ---- file_name = left_file->vfile_getName(); ! if( !query->match( left_file ) ) continue; *************** *** 171,175 **** file_name = right_file->vfile_getName(); ! if( !checkName( file_name ) ) continue; --- 157,161 ---- file_name = right_file->vfile_getName(); ! if( !query->match( right_file ) ) continue; *************** *** 189,197 **** if( (right_file = right_directory->vfs_search( file_name )) == 0 ) ! addSingleDirectory( parent, file_name, dir, left_file->vfile_getTime_t(), true ); else compareDirectory( parent, leftURL+file_name+"/", rightURL+file_name+"/", dir.isEmpty() ? file_name : dir+"/"+file_name, file_name, ! dir, left_file->vfile_getTime_t(), right_file->vfile_getTime_t() ); } } --- 175,184 ---- if( (right_file = right_directory->vfs_search( file_name )) == 0 ) ! addSingleDirectory( parent, file_name, dir, left_file->vfile_getTime_t(), true, !query->match( left_file ) ); else compareDirectory( parent, leftURL+file_name+"/", rightURL+file_name+"/", dir.isEmpty() ? file_name : dir+"/"+file_name, file_name, ! dir, left_file->vfile_getTime_t(), right_file->vfile_getTime_t(), ! !query->match( left_file ) ); } } *************** *** 206,210 **** if( left_directory->vfs_search( file_name ) == 0 ) ! addSingleDirectory( parent, file_name, dir, right_file->vfile_getTime_t(), false ); } } --- 193,197 ---- if( left_directory->vfs_search( file_name ) == 0 ) ! addSingleDirectory( parent, file_name, dir, right_file->vfile_getTime_t(), false, !query->match( right_file ) ); } } *************** *** 361,365 **** void Synchronizer::addSingleDirectory( SynchronizerFileItem *parent, QString name, ! QString dir , time_t date, bool isLeft ) { QString baseDir = (isLeft ? leftBaseDir : rightBaseDir ); --- 348,352 ---- void Synchronizer::addSingleDirectory( SynchronizerFileItem *parent, QString name, ! QString dir , time_t date, bool isLeft, bool isTemp ) { QString baseDir = (isLeft ? leftBaseDir : rightBaseDir ); *************** *** 374,380 **** if( isLeft ) ! parent = addLeftOnlyItem( parent, name, dir, 0, date, true, !checkName( name ) ); else ! parent = addRightOnlyItem( parent, name, dir, 0, date, true, !checkName( name ) ); /* walking through the directory files */ --- 361,367 ---- if( isLeft ) ! parent = addLeftOnlyItem( parent, name, dir, 0, date, true, isTemp ); else ! parent = addRightOnlyItem( parent, name, dir, 0, date, true, isTemp ); /* walking through the directory files */ *************** *** 386,390 **** file_name = file->vfile_getName(); ! if( !checkName( file_name ) ) continue; --- 373,377 ---- file_name = file->vfile_getName(); ! if( !query->match( file ) ) continue; *************** *** 401,405 **** { file_name = file->vfile_getName(); ! addSingleDirectory( parent, file_name, dirName, file->vfile_getTime_t(), isLeft ); } } --- 388,392 ---- { file_name = file->vfile_getName(); ! addSingleDirectory( parent, file_name, dirName, file->vfile_getTime_t(), isLeft, !query->match( file ) ); } } *************** *** 411,428 **** } - bool Synchronizer::checkName( QString name ) - { - for ( QStringList::Iterator it = inclusionFilter.begin(); it != inclusionFilter.end(); ++it ) - if( QRegExp(*it,true,true).exactMatch( name ) ) - { - for ( QStringList::Iterator it2 = exclusionFilter.begin(); it2 != exclusionFilter.end(); ++it2 ) - if( QRegExp(*it2,true,true).exactMatch( name ) ) - return false; - - return true; - } - return false; - } - void Synchronizer::setMarkFlags( bool left, bool equal, bool differs, bool right, bool dup, bool sing, bool del ) --- 398,401 ---- |
From: Karai C. <ck...@us...> - 2004-09-27 18:17:36
|
Update of /cvsroot/krusader/krusader_kde3/krusader/Search In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7285/krusader_kde3/krusader/Search Modified Files: krquery.cpp Log Message: ARCHITECTURE: synchronizer uses KRQuery Index: krquery.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Search/krquery.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** krquery.cpp 24 Sep 2004 20:40:04 -0000 1.7 --- krquery.cpp 27 Sep 2004 18:17:26 -0000 1.8 *************** *** 44,48 **** // set the defaults ! KRQuery::KRQuery(): matches(""),matchesCaseSensitive(true), contain(QString::null),containCaseSensetive(true), containWholeWord(false), --- 44,48 ---- // set the defaults ! KRQuery::KRQuery(): matchesCaseSensitive(true), contain(QString::null),containCaseSensetive(true), containWholeWord(false), |
From: Karai C. <ck...@us...> - 2004-09-27 17:19:08
|
Update of /cvsroot/krusader/krusader_kde3/krusader/Synchronizer In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27196/krusader_kde3/krusader/Synchronizer Modified Files: synchronizergui.cpp synchronizergui.h Log Message: ARCHITECTURE: synchronizer uses the common profile manager Index: synchronizergui.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Synchronizer/synchronizergui.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** synchronizergui.h 31 Aug 2004 20:51:29 -0000 1.12 --- synchronizergui.h 27 Sep 2004 17:18:55 -0000 1.13 *************** *** 33,36 **** --- 33,37 ---- #include "synchronizer.h" + #include "../GUI/profilemanager.h" #include <qdialog.h> #include <qlistview.h> *************** *** 98,102 **** void refresh(); void swapSides(); ! void profiles(); protected slots: --- 99,104 ---- void refresh(); void swapSides(); ! void loadFromProfile( QString ); ! void saveToProfile( QString ); protected slots: *************** *** 113,120 **** void disableMarkButtons(); void enableMarkButtons(); - QString encodeName( QString ); - QString decodeName( QString ); - void loadProfile( QString ); - void saveProfile( QString, int ); protected: --- 115,118 ---- *************** *** 122,125 **** --- 120,125 ---- virtual void resizeEvent( QResizeEvent *e ); + ProfileManager *profileManager; + KHistoryCombo *leftLocation; KHistoryCombo *rightLocation; *************** *** 136,140 **** QCheckBox *cbAutoScroll; - QPushButton *btnProfiles; QPushButton *btnSwapSides; QPushButton *btnCompareDirs; --- 136,139 ---- Index: synchronizergui.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Synchronizer/synchronizergui.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** synchronizergui.cpp 31 Aug 2004 20:51:29 -0000 1.21 --- synchronizergui.cpp 27 Sep 2004 17:18:55 -0000 1.22 *************** *** 1005,1142 **** " "}; - static const char * const profiles_data[] = { - "20 20 111 2", - " g None", - ". g #B9B9B9", - "+ g #BEBEBE", - "@ g #C7C7C7", - "# g #C4C4C4", - "$ g #CECECE", - "% g #B7B7B7", - "& g #A1A1A1", - "* g #C1C1C1", - "= g #ADADAD", - "- g #A5A5A5", - "; g #AAAAAA", - "> g #CACACA", - ", g #B0B0B0", - "' g #ACACAC", - ") g #CCCCCC", - "! g #ABABAB", - "~ g #B3B3B3", - "{ g #AFAFAF", - "] g #CDCDCD", - "^ g #B6B6B6", - "/ g #A9A9A9", - "( g #B4B4B4", - "_ g #888888", - ": g #7A7A7A", - "< g #858585", - "[ g #9B9B9B", - "} g #898989", - "| g #9C9C9C", - "1 g #A8A8A8", - "2 g #B1B1B1", - "3 g #989898", - "4 g #959595", - "5 g #8B8B8B", - "6 g #8E8E8E", - "7 g #9D9D9D", - "8 g #8C8C8C", - "9 g #808080", - "0 g #7F7F7F", - "a g #B5B5B5", - "b g #848484", - "c g #5C5C5C", - "d g #565656", - "e g #656565", - "f g #999999", - "g g #9E9E9E", - "h g #8A8A8A", - "i g #B8B8B8", - "j g #C8C8C8", - "k g #A4A4A4", - "l g #868686", - "m g #B2B2B2", - "n g #111111", - "o g #000000", - "p g #020202", - "q g #353535", - "r g #9F9F9F", - "s g #969696", - "t g #8D8D8D", - "u g #919191", - "v g #9A9A9A", - "w g #090909", - "x g #212121", - "y g #A6A6A6", - "z g #646464", - "A g #929292", - "B g #4F4F4F", - "C g #181818", - "D g #C5C5C5", - "E g #7C7C7C", - "F g #191919", - "G g #0F0F0F", - "H g #BDBDBD", - "I g #909090", - "J g #C0C0C0", - "K g #BABABA", - "L g #333333", - "M g #1A1A1A", - "N g #AEAEAE", - "O g #D1D1D1", - "P g #555555", - "Q g #585858", - "R g #A7A7A7", - "S g #626262", - "T g #242424", - "U g #C3C3C3", - "V g #A2A2A2", - "W g #7E7E7E", - "X g #151515", - "Y g #CBCBCB", - "Z g #7D7D7D", - "` g #040404", - " . g #010101", - ".. g #CFCFCF", - "+. g #A3A3A3", - "@. g #979797", - "#. g #030303", - "$. g #939393", - "%. g #8F8F8F", - "&. g #C9C9C9", - "*. g #7B7B7B", - "=. g #878787", - "-. g #414141", - ";. g #3E3E3E", - ">. g #3F3F3F", - ",. g #949494", - "'. g #838383", - "). g #C6C6C6", - "!. g #D4D4D4", - "~. g #D2D2D2", - "{. g #BCBCBC", - " . + @ # ", - "$ % & * = - ; > , ' ; ) ! ~ { ] ^ / ' ", - " ( _ : < [ } | 1 % / 2 3 & _ [ 4 5 6 ) ", - " 7 8 9 0 5 1 a b c d e f + g h } 6 i ", - "j k l h } m h n o o o o p q ( r l < s # ", - " [ t u v 1 w o o o o o o o x ^ 7 : y ", - " ; 5 b ; z o o o o o o o o o d , 9 A j ", - " y < l ^ B o o o o o o o o o C a t a ", - "D y E & . F o o o o o o o o o G H I | J ", - " A h K L o o o o o o o o o o M J I N ", - "O ( 4 K P o o o o o o o o o o Q ^ 6 - j ", - " R t 2 S o o o o o o o o o T H 7 5 K ", - "U V W y W o o o o o o o o X , R l s u Y ", - " | I N Z ` .o o o o o o < ; < h I g ", - "..+.Z @.i ( t X o o o o #.; $.b _ %.@.&.", - " 3 *.9 %.u { Z o o o o o =.V u 6 t ~ ", - "* f _ 0 9 %.f 2 -.;.>.;.;.: ~ ,.t A V &.", - " $.l ,.'.< ,.J % a ( U K i ' f : < +. ", - "..{ 8 + - | 9 + V 3 u ).{ k %.H +.g 1 ", - " + ..# U !.) D ~.] {.] .. "}; - SynchronizerGUI::SynchronizerGUI(QWidget* parent, QString leftDirectory, QString rightDirectory ) : QDialog( parent, "Krusader::SynchronizerGUI", false, 0 ), isComparing( false ), wasClosed( false ), --- 1005,1008 ---- *************** *** 1387,1397 **** buttons->setSpacing( 6 ); buttons->setMargin( 0 ); - - QPixmap profiles( ( const char** ) profiles_data ); - btnProfiles = new QPushButton( this, "btnProfiles" ); - btnProfiles->setPixmap( profiles ); - QToolTip::add( btnProfiles, i18n( "Profiles" ) ); - buttons->addWidget( btnProfiles ); QPixmap swapSides( ( const char** ) swap_sides_data ); btnSwapSides = new QPushButton( this, "btnSwapSides" ); --- 1253,1260 ---- buttons->setSpacing( 6 ); buttons->setMargin( 0 ); + profileManager = new ProfileManager( "SynchronizerProfile", this, "profileManager" ); + buttons->addWidget( profileManager ); + QPixmap swapSides( ( const char** ) swap_sides_data ); btnSwapSides = new QPushButton( this, "btnSwapSides" ); *************** *** 1432,1436 **** this, SLOT(rightMouseClicked(QListViewItem *))); ! connect( btnProfiles, SIGNAL( clicked() ), this, SLOT( profiles() ) ); connect( btnSwapSides, SIGNAL( clicked() ), this, SLOT( swapSides() ) ); connect( btnCompareDirs, SIGNAL( clicked() ), this, SLOT( compare() ) ); --- 1295,1301 ---- this, SLOT(rightMouseClicked(QListViewItem *))); ! connect( profileManager, SIGNAL( loadFromProfile( QString ) ), this, SLOT( loadFromProfile( QString ) ) ); ! connect( profileManager, SIGNAL( saveToProfile( QString ) ), this, SLOT( saveToProfile( QString ) ) ); ! connect( btnSwapSides, SIGNAL( clicked() ), this, SLOT( swapSides() ) ); connect( btnCompareDirs, SIGNAL( clicked() ), this, SLOT( compare() ) ); *************** *** 1470,1487 **** if( !profileName.isNull() ) ! { ! krConfig->setGroup("Synchronize"); ! int profileNum = krConfig->readNumEntry( "Profile Number", 0 ); ! for( int i = 0; i != profileNum; i++ ) ! { ! QString profileData = krConfig->readEntry( QString( "Profile%1" ).arg( i + 1 ) ); ! if( decodeName(profileData.left( profileData.find( ',' ) )) == profileName ) ! { ! loadProfile( profileData ); ! break; ! } ! } ! } ! exec(); } --- 1335,1340 ---- if( !profileName.isNull() ) ! profileManager->loadByName( profileName ); ! exec(); } *************** *** 1734,1738 **** btnCompareDirs->setEnabled( false ); ! btnProfiles->setEnabled( false ); btnSwapSides->setEnabled( false ); btnStopComparing->setEnabled( isComparing = true ); --- 1587,1591 ---- btnCompareDirs->setEnabled( false ); ! profileManager->setEnabled( false ); btnSwapSides->setEnabled( false ); btnStopComparing->setEnabled( isComparing = true ); *************** *** 1746,1750 **** btnStopComparing->setEnabled( isComparing = false ); btnCompareDirs->setEnabled( true ); ! btnProfiles->setEnabled( true ); btnSwapSides->setEnabled( true ); if( fileCount ) --- 1599,1603 ---- btnStopComparing->setEnabled( isComparing = false ); btnCompareDirs->setEnabled( true ); ! profileManager->setEnabled( true ); btnSwapSides->setEnabled( true ); if( fileCount ) *************** *** 1903,1907 **** setMarkFlags(); btnCompareDirs->setEnabled( false ); ! btnProfiles->setEnabled( false ); btnSwapSides->setEnabled( false ); btnSynchronize->setEnabled( false ); --- 1756,1760 ---- setMarkFlags(); btnCompareDirs->setEnabled( false ); ! profileManager->setEnabled( false ); btnSwapSides->setEnabled( false ); btnSynchronize->setEnabled( false ); *************** *** 1910,1914 **** enableMarkButtons(); btnCompareDirs->setEnabled( true ); ! btnProfiles->setEnabled( true ); btnSwapSides->setEnabled( true ); if( fileCount ) --- 1763,1767 ---- enableMarkButtons(); btnCompareDirs->setEnabled( true ); ! profileManager->setEnabled( true ); btnSwapSides->setEnabled( true ); if( fileCount ) *************** *** 2020,2038 **** } ! QString SynchronizerGUI::encodeName( QString name ) ! { ! name.replace( "\\", "\\\\" ); ! name.replace( ",","\\_" ); ! return name; ! } ! ! QString SynchronizerGUI::decodeName( QString name ) ! { ! name.replace( "\\_","," ); ! name.replace( "\\\\", "\\" ); ! return name; ! } ! ! void SynchronizerGUI::loadProfile( QString profileData ) { synchronizer.reset(); --- 1873,1877 ---- } ! void SynchronizerGUI::loadFromProfile( QString profile ) { synchronizer.reset(); *************** *** 2041,2163 **** btnSynchronize->setEnabled( false ); ! QStringList datas = QStringList::split( ",", profileData ); ! ! leftLocation->setCurrentText( decodeName( datas[1] ) ); ! fileFilter->setCurrentText( decodeName( datas[2] ) ); ! rightLocation->setCurrentText( decodeName( datas[3] ) ); ! int checkboxes = datas[4].toInt(); ! int showoptions = datas[5].toInt(); ! cbSubdirs-> setChecked( !!(checkboxes & 32) ); ! cbSymlinks-> setChecked( !!(checkboxes & 16) ); ! cbByContent-> setChecked( !!(checkboxes & 8) ); ! cbIgnoreDate->setChecked( !!(checkboxes & 4) ); ! cbAsymmetric->setChecked( !!(checkboxes & 2) ); ! cbAutoScroll->setChecked( !!(checkboxes & 1) ); ! btnLeftToRight->setOn( !!(showoptions & 64) ); ! btnEquals ->setOn( !!(showoptions & 32) ); ! btnDifferents ->setOn( !!(showoptions & 16) ); ! btnRightToLeft->setOn( !!(showoptions & 8) ); ! btnDeletable ->setOn( !!(showoptions & 4) ); ! btnDuplicates ->setOn( !!(showoptions & 2) ); ! btnSingles ->setOn( !!(showoptions & 1) ); refresh(); } ! void SynchronizerGUI::saveProfile( QString name, int profileNum ) ! { ! krConfig->setGroup("Synchronize"); ! ! int checkboxes = ( cbSubdirs->isChecked() ? 32 : 0 ) | ! ( cbSymlinks->isChecked() ? 16 : 0 ) | ! ( cbByContent->isChecked() ? 8 : 0 ) | ! ( cbIgnoreDate->isChecked() ? 4 : 0 ) | ! ( cbAsymmetric->isChecked() ? 2 : 0 ) | ! ( cbAutoScroll->isChecked() ? 1 : 0 ); ! int showoptions = ( btnLeftToRight->isOn() ? 64 : 0 ) | ! ( btnEquals->isOn() ? 32 : 0 ) | ! ( btnDifferents->isOn() ? 16 : 0 ) | ! ( btnRightToLeft->isOn() ? 8 : 0 ) | ! ( btnDeletable->isOn() ? 4 : 0 ) | ! ( btnDuplicates->isOn() ? 2 : 0 ) | ! ( btnSingles->isOn() ? 1 : 0 ); ! ! krConfig->writeEntry( QString( "Profile%1" ).arg( profileNum ), ! encodeName( name ) + "," + ! encodeName( leftLocation->currentText() ) + "," + ! encodeName( fileFilter->currentText() ) + "," + ! encodeName( rightLocation->currentText() ) + "," + ! QString( "%1,%1" ).arg( checkboxes ).arg( showoptions ) ); ! krConfig->sync(); ! } ! ! void SynchronizerGUI::profiles() { ! krConfig->setGroup("Synchronize"); ! ! int profileNum = krConfig->readNumEntry( "Profile Number", 0 ); ! int i; ! QStringList profileList; ! ! for( i = 0; i != profileNum; i++ ) ! profileList.push_back( krConfig->readEntry( QString( "Profile%1" ).arg( i + 1 ) ) ); ! ! // profile menu identifiers ! #define ADD_NEW_ENTRY_ID 1000 ! #define LOAD_ENTRY_ID 2000 ! #define REMOVE_ENTRY_ID 3000 ! #define OVERWRITE_ENTRY_ID 4000 ! ! // create the menu ! KPopupMenu popup, removePopup, overwritePopup; ! popup.insertTitle(i18n("Synchronizer Profiles")); ! for( i=0; i != profileNum ; i++ ) ! { ! QString name = decodeName(profileList[i].left( profileList[i].find( ',' ) )); ! popup.insertItem( name, LOAD_ENTRY_ID + i ); ! removePopup.insertItem( name, REMOVE_ENTRY_ID + i ); ! overwritePopup.insertItem( name, OVERWRITE_ENTRY_ID + i ); ! } ! ! popup.insertSeparator(); ! if( profileNum ) ! { ! popup.insertItem( i18n("Remove entry"), &removePopup ); ! popup.insertItem( i18n("Overwrite entry"), &overwritePopup ); ! } ! popup.insertItem(i18n("Add new entry"),ADD_NEW_ENTRY_ID); ! ! int result=popup.exec(QCursor::pos()); ! ! // check out the user's selection ! if( result == ADD_NEW_ENTRY_ID ) ! { ! QString profile = KInputDialog::getText( i18n( "Krusader::Synchronizer" ), i18n( "Enter the profile name:" ) ); ! if( !profile.isEmpty() ) ! { ! krConfig->writeEntry( "Profile Number", ++profileNum ); ! saveProfile( profile, profileNum ); ! } ! }else if( result >= LOAD_ENTRY_ID && result < LOAD_ENTRY_ID + profileNum ) ! { ! loadProfile( profileList[ result - LOAD_ENTRY_ID ] ); ! }else if( result >= REMOVE_ENTRY_ID && result < REMOVE_ENTRY_ID + profileNum ) ! { ! krConfig->writeEntry( "Profile Number", --profileNum ); ! for( i = result - REMOVE_ENTRY_ID; i != profileNum; i++ ) ! krConfig->writeEntry( QString( "Profile%1" ).arg( i+1 ), profileList[ i + 1 ] ); ! krConfig->deleteEntry( QString( "Profile%1" ).arg( profileNum + 1 ) ); ! krConfig->sync(); ! }else if( result >= OVERWRITE_ENTRY_ID && result < OVERWRITE_ENTRY_ID + profileNum ) ! { ! i = result - OVERWRITE_ENTRY_ID; ! QString name = decodeName(profileList[i].left( profileList[i].find( ',' ) )); ! saveProfile( name, i + 1); ! } } --- 1880,1928 ---- btnSynchronize->setEnabled( false ); ! krConfig->setGroup( profile ); ! leftLocation->setCurrentText( krConfig->readEntry( "Left Location" ) ); ! fileFilter->setCurrentText( krConfig->readEntry( "File Filter" ) ); ! rightLocation->setCurrentText( krConfig->readEntry( "Right Location" ) ); ! cbSubdirs-> setChecked( krConfig->readBoolEntry( "Recurse Subdirectories", true ) ); ! cbSymlinks-> setChecked( krConfig->readBoolEntry( "Follow Symlinks", false ) ); ! cbByContent-> setChecked( krConfig->readBoolEntry( "Compare By Content", false ) ); ! cbIgnoreDate->setChecked( krConfig->readBoolEntry( "Ignore Date", false ) ); ! cbAsymmetric->setChecked( krConfig->readBoolEntry( "Asymmetric", false ) ); ! cbAutoScroll->setChecked( krConfig->readBoolEntry( "Auto Scrolling", false ) ); ! btnLeftToRight->setOn( krConfig->readBoolEntry( "Show Left To Right", true ) ); ! btnEquals ->setOn( krConfig->readBoolEntry( "Show Equals", true ) ); ! btnDifferents ->setOn( krConfig->readBoolEntry( "Show Differents", true ) ); ! btnRightToLeft->setOn( krConfig->readBoolEntry( "Show Right To Left", true ) ); ! btnDeletable ->setOn( krConfig->readBoolEntry( "Show Deletable", true ) ); ! btnDuplicates ->setOn( krConfig->readBoolEntry( "Show Duplicates", true ) ); ! btnSingles ->setOn( krConfig->readBoolEntry( "Show Singles", true ) ); refresh(); } ! void SynchronizerGUI::saveToProfile( QString profile ) { ! krConfig->setGroup( profile ); ! krConfig->writeEntry( "Left Location", leftLocation->currentText() ); ! krConfig->writeEntry( "File Filter", fileFilter->currentText() ); ! krConfig->writeEntry( "Right Location", rightLocation->currentText() ); ! krConfig->writeEntry( "Recurse Subdirectories", cbSubdirs->isChecked() ); ! krConfig->writeEntry( "Follow Symlinks", cbSymlinks->isChecked() ); ! krConfig->writeEntry( "Compare By Content", cbByContent->isChecked() ); ! krConfig->writeEntry( "Ignore Date", cbIgnoreDate->isChecked() ); ! krConfig->writeEntry( "Asymmetric", cbAsymmetric->isChecked() ); ! krConfig->writeEntry( "Auto Scrolling", cbAutoScroll->isChecked() ); ! krConfig->writeEntry( "Show Left To Right", btnLeftToRight->isOn() ); ! krConfig->writeEntry( "Show Equals", btnEquals->isOn() ); ! krConfig->writeEntry( "Show Differents", btnDifferents->isOn() ); ! krConfig->writeEntry( "Show Right To Left", btnRightToLeft->isOn() ); ! krConfig->writeEntry( "Show Deletable", btnDeletable->isOn() ); ! krConfig->writeEntry( "Show Duplicates", btnDuplicates->isOn() ); ! krConfig->writeEntry( "Show Singles", btnSingles->isOn() ); } |
From: Karai C. <ck...@us...> - 2004-09-27 17:19:05
|
Update of /cvsroot/krusader/krusader_kde3/krusader/Search In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27196/krusader_kde3/krusader/Search Modified Files: Makefile.am krsearchdialog.h Removed Files: profilemanager.cpp profilemanager.h Log Message: ARCHITECTURE: synchronizer uses the common profile manager Index: Makefile.am =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Search/Makefile.am,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Makefile.am 26 Sep 2004 23:08:20 -0000 1.5 --- Makefile.am 27 Sep 2004 17:18:54 -0000 1.6 *************** *** 6,10 **** libSearch_a_METASOURCES = AUTO ! libSearch_a_SOURCES = krsearchmod.cpp krsearchdialog.cpp krquery.cpp generalfilter.cpp advancedfilter.cpp profilemanager.cpp --- 6,10 ---- libSearch_a_METASOURCES = AUTO ! libSearch_a_SOURCES = krsearchmod.cpp krsearchdialog.cpp krquery.cpp generalfilter.cpp advancedfilter.cpp *************** *** 12,14 **** ####### kdevelop will overwrite this part!!! (end)############ ! noinst_HEADERS = advancedfilter.h profilemanager.h --- 12,14 ---- ####### kdevelop will overwrite this part!!! (end)############ ! noinst_HEADERS = advancedfilter.h Index: krsearchdialog.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Search/krsearchdialog.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** krsearchdialog.h 26 Sep 2004 23:08:20 -0000 1.11 --- krsearchdialog.h 27 Sep 2004 17:18:54 -0000 1.12 *************** *** 38,42 **** #include "krquery.h" #include "krsearchmod.h" ! #include "profilemanager.h" #include <qwidget.h> --- 38,42 ---- #include "krquery.h" #include "krsearchmod.h" ! #include "../GUI/profilemanager.h" #include <qwidget.h> --- profilemanager.h DELETED --- --- profilemanager.cpp DELETED --- |
From: Karai C. <ck...@us...> - 2004-09-27 17:19:04
|
Update of /cvsroot/krusader/krusader_kde3/krusader/GUI In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27196/krusader_kde3/krusader/GUI Modified Files: Makefile.am Added Files: profilemanager.cpp profilemanager.h Log Message: ARCHITECTURE: synchronizer uses the common profile manager Index: Makefile.am =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/GUI/Makefile.am,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Makefile.am 26 Jul 2004 22:21:16 -0000 1.6 --- Makefile.am 27 Sep 2004 17:18:54 -0000 1.7 *************** *** 6,13 **** libGUI_a_METASOURCES = AUTO ! libGUI_a_SOURCES = dirhistoryqueue.cpp dirhistorybutton.cpp krusaderstatus.cpp \ ! kfnkeys.cpp kcmdline.cpp actionproperty.cpp actionpropertybase.ui \ ! addplaceholderpopup.cpp \ ! syncbrowsebutton.cpp --- 6,10 ---- libGUI_a_METASOURCES = AUTO ! libGUI_a_SOURCES = dirhistoryqueue.cpp dirhistorybutton.cpp krusaderstatus.cpp kfnkeys.cpp kcmdline.cpp actionproperty.cpp actionpropertybase.ui addplaceholderpopup.cpp syncbrowsebutton.cpp profilemanager.cpp *************** *** 15,16 **** --- 12,14 ---- ####### kdevelop will overwrite this part!!! (end)############ + noinst_HEADERS = profilemanager.h --- NEW FILE: profilemanager.h --- /*************************************************************************** profilemanager.cpp - description ------------------- copyright : (C) 2004 by Csaba Karai e-mail : kru...@us... web site : http://krusader.sourceforge.net --------------------------------------------------------------------------- Description *************************************************************************** A db dD d8888b. db db .d8888. .d8b. d8888b. d88888b d8888b. 88 ,8P' 88 `8D 88 88 88' YP d8' `8b 88 `8D 88' 88 `8D 88,8P 88oobY' 88 88 `8bo. 88ooo88 88 88 88ooooo 88oobY' 88`8b 88`8b 88 88 `Y8b. 88~~~88 88 88 88~~~~~ 88`8b 88 `88. 88 `88. 88b d88 db 8D 88 88 88 .8D 88. 88 `88. YP YD 88 YD ~Y8888P' `8888Y' YP YP Y8888D' Y88888P 88 YD S o u r c e F i l e *************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef PROFILEMANAGER_H #define PROFILEMANAGER_H #include <qpushbutton.h> #include <qstring.h> class ProfileManager : public QPushButton { Q_OBJECT public: ProfileManager( QString profileType, QWidget * parent = 0, const char * name = 0 ); bool loadByName( QString name ); public slots: void profilePopup(); signals: void saveToProfile( QString profileName ); void loadFromProfile( QString profileName ); private: QString profileType; QStringList profileList; }; #endif /* PROFILEMANAGER_H */ --- NEW FILE: profilemanager.cpp --- /*************************************************************************** profilemanager.cpp - description ------------------- copyright : (C) 2004 by Csaba Karai e-mail : kru...@us... web site : http://krusader.sourceforge.net --------------------------------------------------------------------------- Description *************************************************************************** A db dD d8888b. db db .d8888. .d8b. d8888b. d88888b d8888b. 88 ,8P' 88 `8D 88 88 88' YP d8' `8b 88 `8D 88' 88 `8D 88,8P 88oobY' 88 88 `8bo. 88ooo88 88 88 88ooooo 88oobY' 88`8b 88`8b 88 88 `Y8b. 88~~~88 88 88 88~~~~~ 88`8b 88 `88. 88 `88. 88b d88 db 8D 88 88 88 .8D 88. 88 `88. YP YD 88 YD ~Y8888P' `8888Y' YP YP Y8888D' Y88888P 88 YD S o u r c e F i l e *************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "../krusader.h" #include "profilemanager.h" #include <klocale.h> #include <qtooltip.h> #include <kpopupmenu.h> #include <qcursor.h> #include <kinputdialog.h> static const char * const profiles_data[] = { "20 20 111 2", " g None", ". g #B9B9B9", "+ g #BEBEBE", "@ g #C7C7C7", "# g #C4C4C4", "$ g #CECECE", "% g #B7B7B7", "& g #A1A1A1", "* g #C1C1C1", "= g #ADADAD", "- g #A5A5A5", "; g #AAAAAA", "> g #CACACA", ", g #B0B0B0", "' g #ACACAC", ") g #CCCCCC", "! g #ABABAB", "~ g #B3B3B3", "{ g #AFAFAF", "] g #CDCDCD", "^ g #B6B6B6", "/ g #A9A9A9", "( g #B4B4B4", "_ g #888888", ": g #7A7A7A", "< g #858585", "[ g #9B9B9B", "} g #898989", "| g #9C9C9C", "1 g #A8A8A8", "2 g #B1B1B1", "3 g #989898", "4 g #959595", "5 g #8B8B8B", "6 g #8E8E8E", "7 g #9D9D9D", "8 g #8C8C8C", "9 g #808080", "0 g #7F7F7F", "a g #B5B5B5", "b g #848484", "c g #5C5C5C", "d g #565656", "e g #656565", "f g #999999", "g g #9E9E9E", "h g #8A8A8A", "i g #B8B8B8", "j g #C8C8C8", "k g #A4A4A4", "l g #868686", "m g #B2B2B2", "n g #111111", "o g #000000", "p g #020202", "q g #353535", "r g #9F9F9F", "s g #969696", "t g #8D8D8D", "u g #919191", "v g #9A9A9A", "w g #090909", "x g #212121", "y g #A6A6A6", "z g #646464", "A g #929292", "B g #4F4F4F", "C g #181818", "D g #C5C5C5", "E g #7C7C7C", "F g #191919", "G g #0F0F0F", "H g #BDBDBD", "I g #909090", "J g #C0C0C0", "K g #BABABA", "L g #333333", "M g #1A1A1A", "N g #AEAEAE", "O g #D1D1D1", "P g #555555", "Q g #585858", "R g #A7A7A7", "S g #626262", "T g #242424", "U g #C3C3C3", "V g #A2A2A2", "W g #7E7E7E", "X g #151515", "Y g #CBCBCB", "Z g #7D7D7D", "` g #040404", " . g #010101", ".. g #CFCFCF", "+. g #A3A3A3", "@. g #979797", "#. g #030303", "$. g #939393", "%. g #8F8F8F", "&. g #C9C9C9", "*. g #7B7B7B", "=. g #878787", "-. g #414141", ";. g #3E3E3E", ">. g #3F3F3F", ",. g #949494", "'. g #838383", "). g #C6C6C6", "!. g #D4D4D4", "~. g #D2D2D2", "{. g #BCBCBC", " . + @ # ", "$ % & * = - ; > , ' ; ) ! ~ { ] ^ / ' ", " ( _ : < [ } | 1 % / 2 3 & _ [ 4 5 6 ) ", " 7 8 9 0 5 1 a b c d e f + g h } 6 i ", "j k l h } m h n o o o o p q ( r l < s # ", " [ t u v 1 w o o o o o o o x ^ 7 : y ", " ; 5 b ; z o o o o o o o o o d , 9 A j ", " y < l ^ B o o o o o o o o o C a t a ", "D y E & . F o o o o o o o o o G H I | J ", " A h K L o o o o o o o o o o M J I N ", "O ( 4 K P o o o o o o o o o o Q ^ 6 - j ", " R t 2 S o o o o o o o o o T H 7 5 K ", "U V W y W o o o o o o o o X , R l s u Y ", " | I N Z ` .o o o o o o < ; < h I g ", "..+.Z @.i ( t X o o o o #.; $.b _ %.@.&.", " 3 *.9 %.u { Z o o o o o =.V u 6 t ~ ", "* f _ 0 9 %.f 2 -.;.>.;.;.: ~ ,.t A V &.", " $.l ,.'.< ,.J % a ( U K i ' f : < +. ", "..{ 8 + - | 9 + V 3 u ).{ k %.H +.g 1 ", " + ..# U !.) D ~.] {.] .. "}; ProfileManager::ProfileManager( QString profileType, QWidget * parent, const char * name ) : QPushButton( parent, name ) { QPixmap profiles( ( const char** ) profiles_data ); setText( "" ); setPixmap( profiles ); QToolTip::add( this, i18n( "Profiles" ) ); this->profileType = profileType; connect( this, SIGNAL( clicked() ), this, SLOT( profilePopup() ) ); krConfig->setGroup("Private"); profileList = krConfig->readListEntry( profileType ); } void ProfileManager::profilePopup() { // profile menu identifiers #define ADD_NEW_ENTRY_ID 1000 #define LOAD_ENTRY_ID 2000 #define REMOVE_ENTRY_ID 3000 #define OVERWRITE_ENTRY_ID 4000 // create the menu KPopupMenu popup, removePopup, overwritePopup; popup.insertTitle(i18n("Profiles")); for( unsigned i=0; i != profileList.count() ; i++ ) { krConfig->setGroup( profileType + " - " + profileList[i] ); QString name = krConfig->readEntry( "Name" ); popup.insertItem( name, LOAD_ENTRY_ID + i ); removePopup.insertItem( name, REMOVE_ENTRY_ID + i ); overwritePopup.insertItem( name, OVERWRITE_ENTRY_ID + i ); } popup.insertSeparator(); if( profileList.count() ) { popup.insertItem( i18n("Remove entry"), &removePopup ); popup.insertItem( i18n("Overwrite entry"), &overwritePopup ); } popup.insertItem(i18n("Add new entry"),ADD_NEW_ENTRY_ID); unsigned result=popup.exec(QCursor::pos()); // check out the user's selection if( result == ADD_NEW_ENTRY_ID ) { QString profile = KInputDialog::getText( i18n( "Krusader::ProfileManager" ), i18n( "Enter the profile name:" ) ); if( !profile.isEmpty() ) { int profileNum = 1; while( profileList.contains( QString( "%1" ).arg( profileNum ) ) ) profileNum++; QString profileString = QString( "%1" ).arg( profileNum ); QString profileName = profileType + " - " + profileString; profileList.append( QString( "%1" ).arg( profileString ) ); krConfig->setGroup("Private"); krConfig->writeEntry( profileType, profileList ); krConfig->setGroup( profileName ); krConfig->writeEntry( "Name", profile ); emit saveToProfile( profileName ); krConfig->sync(); } }else if( result >= LOAD_ENTRY_ID && result < LOAD_ENTRY_ID + profileList.count() ) { emit loadFromProfile( profileType + " - " + profileList[ result - LOAD_ENTRY_ID ] ); }else if( result >= REMOVE_ENTRY_ID && result < REMOVE_ENTRY_ID + profileList.count() ) { krConfig->deleteGroup( profileType + " - " + profileList[ result - REMOVE_ENTRY_ID ] ); profileList.remove( profileList[ result - REMOVE_ENTRY_ID ] ); krConfig->setGroup("Private"); krConfig->writeEntry( profileType, profileList ); krConfig->sync(); }else if( result >= OVERWRITE_ENTRY_ID && result < OVERWRITE_ENTRY_ID + profileList.count() ) { emit saveToProfile( profileType + " - " + profileList[ result - OVERWRITE_ENTRY_ID ] ); } } bool ProfileManager::loadByName( QString name ) { for( unsigned i=0; i != profileList.count() ; i++ ) { krConfig->setGroup( profileType + " - " + profileList[i] ); QString currentName = krConfig->readEntry( "Name" ); if( name == currentName ) { emit loadFromProfile( profileType + " - " + profileList[ i ] ); return true; } } return false; } #include "profilemanager.moc" |
From: Jonas B. <jb...@us...> - 2004-09-27 00:51:43
|
Update of /cvsroot/krusader/krusader_kde3/krusader/UserAction In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27980/krusader/UserAction Modified Files: useractionxml.cpp Log Message: If no local useractions.xml exists, $KDEDIR/share/apps/krusader/useractions.xml is read. Saving is alway local. Index: useractionxml.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/UserAction/useractionxml.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** useractionxml.cpp 23 Jul 2004 00:03:19 -0000 1.1 --- useractionxml.cpp 27 Sep 2004 00:51:26 -0000 1.2 *************** *** 27,36 **** // in well formed XML the root-element has to have the same name then the doctype: #define ACTION_ROOT ACTION_DOCTYPE - // #define ACTION_ROOT "actions" UserActionXML::UserActionXML() { ! _filename = locateLocal( "data", ACTION_XML ); getActionDom(); // kdDebug() << "UserActionXML: _dom = " << _doc << endl; } --- 27,38 ---- // in well formed XML the root-element has to have the same name then the doctype: #define ACTION_ROOT ACTION_DOCTYPE UserActionXML::UserActionXML() { ! // this return the local version of the file if this exists. else the global one is returnd ! _filename = locate( "data", ACTION_XML ); getActionDom(); + // for further writing use only the local version! + _filename = locateLocal( "data", ACTION_XML ); // kdDebug() << "UserActionXML: _dom = " << _doc << endl; } |
Update of /cvsroot/krusader/krusader_kde3/krusader/BookMan In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13531 Modified Files: Makefile.am krbookmark.cpp krbookmark.h krbookmarkbutton.cpp Added Files: krbookmarkhandler.cpp krbookmarkhandler.h Log Message: --- NEW FILE: krbookmarkhandler.cpp --- #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); } Index: Makefile.am =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/BookMan/Makefile.am,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Makefile.am 25 Sep 2004 22:12:16 -0000 1.3 --- Makefile.am 26 Sep 2004 23:49:37 -0000 1.4 *************** *** 7,12 **** libBookMan_a_SOURCES = kbookmarkmenu.cpp kbookmarkhandler.cpp \ ! bookmarksbutton.cpp addbookmarkform.ui addbookmarkdlg.cpp krbookmark.cpp \ ! krbookmarkbutton.cpp --- 7,12 ---- libBookMan_a_SOURCES = kbookmarkmenu.cpp kbookmarkhandler.cpp \ ! bookmarksbutton.cpp addbookmarkform.ui addbookmarkdlg.cpp krbookmark.cpp \ ! krbookmarkbutton.cpp krbookmarkhandler.cpp *************** *** 14,16 **** ####### kdevelop will overwrite this part!!! (end)############ ! noinst_HEADERS = krbookmark.h krbookmarkbutton.h --- 14,16 ---- ####### kdevelop will overwrite this part!!! (end)############ ! noinst_HEADERS = krbookmark.h krbookmarkbutton.h krbookmarkhandler.h Index: krbookmark.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/BookMan/krbookmark.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** krbookmark.h 25 Sep 2004 22:12:16 -0000 1.1 --- krbookmark.h 26 Sep 2004 23:49:37 -0000 1.2 *************** *** 8,24 **** class KrBookmark: public KAction { public: KrBookmark(QString name, KURL url, KActionCollection *parent); // use text() and setText() to change the name of the bookmark ! const KURL& url() const; ! bool isGroup() const; ! void setURL(const KURL& url); ! void setGroup(bool group); ! private: KURL _url; - bool _group; }; --- 8,30 ---- class KrBookmark: public KAction { + Q_OBJECT public: 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); ! ! signals: ! void activated(KrBookmark *bookmark); ! ! protected slots: ! void activatedProxy(); private: KURL _url; }; Index: krbookmark.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/BookMan/krbookmark.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** krbookmark.cpp 25 Sep 2004 22:12:16 -0000 1.1 --- krbookmark.cpp 26 Sep 2004 23:49:37 -0000 1.2 *************** *** 1,7 **** #include "krbookmark.h" #include <kactioncollection.h> KrBookmark::KrBookmark(QString name, KURL url, KActionCollection *parent): ! KAction(name, 0, 0, 0, parent), _url(url), _group(false) { } --- 1,11 ---- #include "krbookmark.h" + #include "../krusader.h" #include <kactioncollection.h> + #include <kiconloader.h> + #include <klocale.h> KrBookmark::KrBookmark(QString name, KURL url, KActionCollection *parent): ! KAction(name, 0, 0, 0, parent), _url(url) { ! connect(this, SIGNAL(activated()), this, SLOT(activatedProxy())); } *************** *** 10,23 **** } - bool KrBookmark::isGroup() const { - return _group; - } - void KrBookmark::setURL(const KURL& url) { _url = url; } ! void KrBookmark::setGroup(bool group) { ! _group = group; } --- 14,28 ---- } void KrBookmark::setURL(const KURL& url) { _url = url; } ! KrBookmark* KrBookmark::devices(KActionCollection *collection) { ! KrBookmark *bm = new KrBookmark(I18N_NOOP("Devices"), "devices:/", collection); ! bm->setIconSet(krLoader->loadIcon("blockdevice", KIcon::Small)); ! return bm; } + void KrBookmark::activatedProxy() { + emit activated(this); + } Index: krbookmarkbutton.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/BookMan/krbookmarkbutton.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** krbookmarkbutton.cpp 25 Sep 2004 22:12:16 -0000 1.1 --- krbookmarkbutton.cpp 26 Sep 2004 23:49:37 -0000 1.2 *************** *** 1,7 **** --- 1,10 ---- #include "krbookmarkbutton.h" + #include "krbookmarkhandler.h" #include "../krusader.h" #include <qpixmap.h> #include <kiconloader.h> + #include <kaction.h> #include <klocale.h> + #include <kpopupmenu.h> KrBookmarkButton::KrBookmarkButton(QWidget *parent): QToolButton(parent) { *************** *** 12,15 **** --- 15,25 ---- setPopupDelay(10); // 0.01 seconds press setAcceptDrops(false); + + KActionMenu *acmBookmarks = new KActionMenu(i18n("Bookmarks"), "bookmark", 0, 0); + acmBookmarks->setDelayed(false); + + KrBookmarkHandler *handler = new KrBookmarkHandler(this, acmBookmarks->popupMenu()); + + setPopup(acmBookmarks->popupMenu()); } --- NEW FILE: krbookmarkhandler.h --- #ifndef KRBOOKMARK_HANDLER_H #define KRBOOKMARK_HANDLER_H #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; KActionCollection *_collection; }; #endif // KRBOOKMARK_HANDLER_H |
From: Karai C. <ck...@us...> - 2004-09-26 23:08:44
|
Update of /cvsroot/krusader/krusader_kde3/krusader/Search In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4402/krusader_kde3/krusader/Search Modified Files: Makefile.am advancedfilter.cpp advancedfilter.h generalfilter.cpp generalfilter.h krsearchdialog.cpp krsearchdialog.h Added Files: profilemanager.cpp profilemanager.h Log Message: ADDED: search profiles Index: Makefile.am =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Search/Makefile.am,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Makefile.am 25 Sep 2004 12:56:21 -0000 1.4 --- Makefile.am 26 Sep 2004 23:08:20 -0000 1.5 *************** *** 6,10 **** libSearch_a_METASOURCES = AUTO ! libSearch_a_SOURCES = krsearchmod.cpp krsearchdialog.cpp krquery.cpp generalfilter.cpp advancedfilter.cpp --- 6,10 ---- libSearch_a_METASOURCES = AUTO ! libSearch_a_SOURCES = krsearchmod.cpp krsearchdialog.cpp krquery.cpp generalfilter.cpp advancedfilter.cpp profilemanager.cpp *************** *** 12,14 **** ####### kdevelop will overwrite this part!!! (end)############ ! noinst_HEADERS = advancedfilter.h --- 12,14 ---- ####### kdevelop will overwrite this part!!! (end)############ ! noinst_HEADERS = advancedfilter.h profilemanager.h Index: krsearchdialog.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Search/krsearchdialog.cpp,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** krsearchdialog.cpp 25 Sep 2004 12:56:21 -0000 1.25 --- krsearchdialog.cpp 26 Sep 2004 23:08:20 -0000 1.26 *************** *** 66,69 **** --- 66,72 ---- buttonsLayout->setMargin( 0 ); + profileManager = new ProfileManager( "SearcherProfile", this, "profileManager" ); + buttonsLayout->addWidget( profileManager ); + QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); buttonsLayout->addItem( spacer ); *************** *** 165,168 **** --- 168,176 ---- connect( resultsList, SIGNAL( rightButtonClicked(QListViewItem*,const QPoint&,int) ), this, SLOT( rightClickMenu(QListViewItem*, const QPoint&, int) ) ); connect( mainCloseBtn, SIGNAL( clicked() ), this, SLOT( closeDialog() ) ); + + connect( profileManager, SIGNAL( loadFromProfile( QString ) ), generalFilter, SLOT( loadFromProfile( QString ) ) ); + connect( profileManager, SIGNAL( saveToProfile( QString ) ), generalFilter, SLOT( saveToProfile( QString ) ) ); + connect( profileManager, SIGNAL( loadFromProfile( QString ) ), advancedFilter, SLOT( loadFromProfile( QString ) ) ); + connect( profileManager, SIGNAL( saveToProfile( QString ) ), advancedFilter, SLOT( saveToProfile( QString ) ) ); // tab order Index: advancedfilter.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Search/advancedfilter.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** advancedfilter.h 25 Sep 2004 11:10:37 -0000 1.1 --- advancedfilter.h 26 Sep 2004 23:08:20 -0000 1.2 *************** *** 55,58 **** --- 55,61 ---- void notModifiedAfterSetDate(); + void loadFromProfile( QString name ); + void saveToProfile( QString name ); + public: QCheckBox* smallerThanEnabled; Index: generalfilter.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Search/generalfilter.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** generalfilter.cpp 24 Sep 2004 20:40:04 -0000 1.1 --- generalfilter.cpp 26 Sep 2004 23:08:20 -0000 1.2 *************** *** 533,535 **** --- 533,602 ---- } + void GeneralFilter::loadFromProfile( QString name ) + { + krConfig->setGroup( name ); + + searchForCase->setChecked( krConfig->readBoolEntry( "Case Sensitive Search", false ) ); + containsTextCase->setChecked( krConfig->readBoolEntry( "Case Sensitive Content", false ) ); + containsWholeWord->setChecked( krConfig->readBoolEntry( "Match Whole Word Only", false ) ); + searchInDirs->setChecked( krConfig->readBoolEntry( "Search In Subdirectories", true ) ); + searchInArchives->setChecked( krConfig->readBoolEntry( "Search In Archives", false ) ); + followLinks->setChecked( krConfig->readBoolEntry( "Follow Symlinks", false ) ); + + searchFor->setEditText( krConfig->readEntry( "Search For", "" ) ); + containsText->setEditText( krConfig->readEntry( "Contains Text", "" ) ); + + QString mime = krConfig->readEntry( "Mime Type", "" ); + for( int i = ofType->count(); i >= 0; i-- ) + { + ofType->setCurrentItem( i ); + if( ofType->currentText() == mime ) + break; + } + + searchInEdit->setText( krConfig->readEntry( "Search In Edit", "" ) ); + dontSearchInEdit->setText( krConfig->readEntry( "Dont Search In Edit", "" ) ); + + searchIn->clear(); + QStringList searchInList = krConfig->readListEntry( "Search In List" ); + if( !searchInList.isEmpty() ) + searchIn->insertStringList( searchInList ); + + dontSearchIn->clear(); + QStringList dontSearchInList = krConfig->readListEntry( "Dont Search In List" ); + if( !dontSearchInList.isEmpty() ) + dontSearchIn->insertStringList( dontSearchInList ); + } + + void GeneralFilter::saveToProfile( QString name ) + { + krConfig->setGroup( name ); + + krConfig->writeEntry( "Case Sensitive Search", searchForCase->isChecked() ); + krConfig->writeEntry( "Case Sensitive Content", containsTextCase->isChecked() ); + krConfig->writeEntry( "Match Whole Word Only", containsWholeWord->isChecked() ); + krConfig->writeEntry( "Search In Subdirectories", searchInDirs->isChecked() ); + krConfig->writeEntry( "Search In Archives", searchInArchives->isChecked() ); + krConfig->writeEntry( "Follow Symlinks", followLinks->isChecked() ); + + krConfig->writeEntry( "Search For", searchFor->currentText() ); + krConfig->writeEntry( "Contains Text", containsText->currentText() ); + + krConfig->writeEntry( "Mime Type", ofType->currentText() ); + + krConfig->writeEntry( "Search In Edit", searchInEdit->text() ); + krConfig->writeEntry( "Dont Search In Edit", dontSearchInEdit->text() ); + + QStringList searchInList; + QListBoxItem *item; + for ( item = searchIn->firstItem(); item != 0; item = item->next() ) + searchInList.append( item->text().simplifyWhiteSpace() ); + krConfig->writeEntry( "Search In List", searchInList ); + + QStringList dontSearchInList; + for ( item = dontSearchIn->firstItem(); item != 0; item = item->next() ) + dontSearchInList.append( item->text().simplifyWhiteSpace() ); + krConfig->writeEntry( "Dont Search In List", dontSearchInList ); + } + #include "generalfilter.moc" Index: advancedfilter.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Search/advancedfilter.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** advancedfilter.cpp 25 Sep 2004 11:10:37 -0000 1.1 --- advancedfilter.cpp 26 Sep 2004 23:08:20 -0000 1.2 *************** *** 29,32 **** --- 29,33 ---- ***************************************************************************/ + #include "../krusader.h" #include "advancedfilter.h" #include "../Dialogs/krdialogs.h" *************** *** 630,632 **** --- 631,737 ---- } + void AdvancedFilter::loadFromProfile( QString name ) + { + krConfig->setGroup( name ); + + smallerThanEnabled->setChecked( krConfig->readBoolEntry( "Smaller Than Enabled", false ) ); + smallerThanAmount->setText( krConfig->readEntry( "Smaller Than Amount", "" ) ); + smallerThanType->setCurrentItem( krConfig->readNumEntry( "Smaller Than Type", 0 ) ); + + biggerThanEnabled->setChecked( krConfig->readBoolEntry( "Bigger Than Enabled", false ) ); + biggerThanAmount->setText( krConfig->readEntry( "Bigger Than Amount", "" ) ); + biggerThanType->setCurrentItem( krConfig->readNumEntry( "Bigger Than Type", 0 ) ); + + modifiedBetweenEnabled->setChecked( krConfig->readBoolEntry( "Modified Between Enabled", false ) ); + notModifiedAfterEnabled->setChecked( krConfig->readBoolEntry( "Not Modified After Enabled", false ) ); + modifiedInTheLastEnabled->setChecked( krConfig->readBoolEntry( "Modified In The Last Enabled", false ) ); + + modifiedBetweenData1->setText( krConfig->readEntry( "Modified Between 1", "" ) ); + modifiedBetweenData2->setText( krConfig->readEntry( "Modified Between 2", "" ) ); + + notModifiedAfterData->setText( krConfig->readEntry( "Not Modified After", "" ) ); + modifiedInTheLastData->setText( krConfig->readEntry( "Modified In The Last", "" ) ); + notModifiedInTheLastData->setText( krConfig->readEntry( "Not Modified In The Last", "" ) ); + + modifiedInTheLastType->setCurrentItem( krConfig->readNumEntry( "Modified In The Last Type", 0 ) ); + notModifiedInTheLastType->setCurrentItem( krConfig->readNumEntry( "Not Modified In The Last Type", 0 ) ); + + belongsToUserEnabled->setChecked( krConfig->readBoolEntry( "Belongs To User Enabled", false ) ); + belongsToGroupEnabled->setChecked( krConfig->readBoolEntry( "Belongs To Group Enabled", false ) ); + + QString user = krConfig->readEntry( "Belongs To User", "" ); + for( int i = belongsToUserData->count(); i >= 0; i-- ) + { + belongsToUserData->setCurrentItem( i ); + if( belongsToUserData->currentText() == user ) + break; + } + + QString group = krConfig->readEntry( "Belongs To Group", "" ); + for( int i = belongsToGroupData->count(); i >= 0; i-- ) + { + belongsToGroupData->setCurrentItem( i ); + if( belongsToGroupData->currentText() == group ) + break; + } + + permissionsEnabled->setChecked( krConfig->readBoolEntry( "Permissions Enabled", false ) ); + + ownerW->setCurrentItem( krConfig->readNumEntry( "Owner Write", 0 ) ); + ownerR->setCurrentItem( krConfig->readNumEntry( "Owner Read", 0 ) ); + ownerX->setCurrentItem( krConfig->readNumEntry( "Owner Execute", 0 ) ); + groupW->setCurrentItem( krConfig->readNumEntry( "Group Write", 0 ) ); + groupR->setCurrentItem( krConfig->readNumEntry( "Group Read", 0 ) ); + groupX->setCurrentItem( krConfig->readNumEntry( "Group Execute", 0 ) ); + allW->setCurrentItem( krConfig->readNumEntry( "All Write", 0 ) ); + allR->setCurrentItem( krConfig->readNumEntry( "All Read", 0 ) ); + allX->setCurrentItem( krConfig->readNumEntry( "All Execute", 0 ) ); + } + + void AdvancedFilter::saveToProfile( QString name ) + { + krConfig->setGroup( name ); + + krConfig->writeEntry( "Smaller Than Enabled", smallerThanEnabled->isChecked() ); + krConfig->writeEntry( "Smaller Than Amount", smallerThanAmount->text() ); + krConfig->writeEntry( "Smaller Than Type", smallerThanType->currentItem() ); + + krConfig->writeEntry( "Bigger Than Enabled", biggerThanEnabled->isChecked() ); + krConfig->writeEntry( "Bigger Than Amount", biggerThanAmount->text() ); + krConfig->writeEntry( "Bigger Than Type", biggerThanType->currentItem() ); + + krConfig->writeEntry( "Modified Between Enabled", modifiedBetweenEnabled->isChecked() ); + krConfig->writeEntry( "Not Modified After Enabled", notModifiedAfterEnabled->isChecked() ); + krConfig->writeEntry( "Modified In The Last Enabled", modifiedInTheLastEnabled->isChecked() ); + + krConfig->writeEntry( "Modified Between 1", modifiedBetweenData1->text() ); + krConfig->writeEntry( "Modified Between 2", modifiedBetweenData2->text() ); + + krConfig->writeEntry( "Not Modified After", notModifiedAfterData->text() ); + krConfig->writeEntry( "Modified In The Last", modifiedInTheLastData->text() ); + krConfig->writeEntry( "Not Modified In The Last", notModifiedInTheLastData->text() ); + + krConfig->writeEntry( "Modified In The Last Type", modifiedInTheLastType->currentItem() ); + krConfig->writeEntry( "Not Modified In The Last Type", notModifiedInTheLastType->currentItem() ); + + krConfig->writeEntry( "Belongs To User Enabled", belongsToUserEnabled->isChecked() ); + krConfig->writeEntry( "Belongs To Group Enabled", belongsToGroupEnabled->isChecked() ); + + krConfig->writeEntry( "Belongs To User", belongsToUserData->currentText() ); + krConfig->writeEntry( "Belongs To Group", belongsToGroupData->currentText() ); + + krConfig->writeEntry( "Permissions Enabled", permissionsEnabled->isChecked() ); + + krConfig->writeEntry( "Owner Write", ownerW->currentItem() ); + krConfig->writeEntry( "Owner Read", ownerR->currentItem() ); + krConfig->writeEntry( "Owner Execute", ownerX->currentItem() ); + krConfig->writeEntry( "Group Write", groupW->currentItem() ); + krConfig->writeEntry( "Group Read", groupR->currentItem() ); + krConfig->writeEntry( "Group Execute", groupX->currentItem() ); + krConfig->writeEntry( "All Write", allW->currentItem() ); + krConfig->writeEntry( "All Read", allR->currentItem() ); + krConfig->writeEntry( "All Execute", allX->currentItem() ); + } + + #include "advancedfilter.moc" Index: generalfilter.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Search/generalfilter.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** generalfilter.h 25 Sep 2004 11:10:37 -0000 1.2 --- generalfilter.h 26 Sep 2004 23:08:20 -0000 1.3 *************** *** 56,60 **** void queryAccepted(); ! public slots: void addToDontSearchIn(); void addToDontSearchInManually(); --- 56,63 ---- void queryAccepted(); ! public slots: ! void loadFromProfile( QString name ); ! void saveToProfile( QString name ); ! void addToDontSearchIn(); void addToDontSearchInManually(); Index: krsearchdialog.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Search/krsearchdialog.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** krsearchdialog.h 25 Sep 2004 12:56:21 -0000 1.10 --- krsearchdialog.h 26 Sep 2004 23:08:20 -0000 1.11 *************** *** 38,41 **** --- 38,42 ---- #include "krquery.h" #include "krsearchmod.h" + #include "profilemanager.h" #include <qwidget.h> *************** *** 78,81 **** --- 79,83 ---- GeneralFilter *generalFilter; AdvancedFilter *advancedFilter; + ProfileManager *profileManager; QPushButton* mainHelpBtn; --- NEW FILE: profilemanager.h --- /*************************************************************************** profilemanager.cpp - description ------------------- copyright : (C) 2004 by Csaba Karai e-mail : kru...@us... web site : http://krusader.sourceforge.net --------------------------------------------------------------------------- Description *************************************************************************** A db dD d8888b. db db .d8888. .d8b. d8888b. d88888b d8888b. 88 ,8P' 88 `8D 88 88 88' YP d8' `8b 88 `8D 88' 88 `8D 88,8P 88oobY' 88 88 `8bo. 88ooo88 88 88 88ooooo 88oobY' 88`8b 88`8b 88 88 `Y8b. 88~~~88 88 88 88~~~~~ 88`8b 88 `88. 88 `88. 88b d88 db 8D 88 88 88 .8D 88. 88 `88. YP YD 88 YD ~Y8888P' `8888Y' YP YP Y8888D' Y88888P 88 YD S o u r c e F i l e *************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef PROFILEMANAGER_H #define PROFILEMANAGER_H #include <qpushbutton.h> #include <qstring.h> class ProfileManager : public QPushButton { Q_OBJECT public: ProfileManager( QString profileType, QWidget * parent = 0, const char * name = 0 ); public slots: void profilePopup(); signals: void saveToProfile( QString profileName ); void loadFromProfile( QString profileName ); private: QString profileType; QStringList profileList; }; #endif /* PROFILEMANAGER_H */ --- NEW FILE: profilemanager.cpp --- /*************************************************************************** profilemanager.cpp - description ------------------- copyright : (C) 2004 by Csaba Karai e-mail : kru...@us... web site : http://krusader.sourceforge.net --------------------------------------------------------------------------- Description *************************************************************************** A db dD d8888b. db db .d8888. .d8b. d8888b. d88888b d8888b. 88 ,8P' 88 `8D 88 88 88' YP d8' `8b 88 `8D 88' 88 `8D 88,8P 88oobY' 88 88 `8bo. 88ooo88 88 88 88ooooo 88oobY' 88`8b 88`8b 88 88 `Y8b. 88~~~88 88 88 88~~~~~ 88`8b 88 `88. 88 `88. 88b d88 db 8D 88 88 88 .8D 88. 88 `88. YP YD 88 YD ~Y8888P' `8888Y' YP YP Y8888D' Y88888P 88 YD S o u r c e F i l e *************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "../krusader.h" #include "profilemanager.h" #include <klocale.h> #include <qtooltip.h> #include <kpopupmenu.h> #include <qcursor.h> #include <kinputdialog.h> static const char * const profiles_data[] = { "20 20 111 2", " g None", ". g #B9B9B9", "+ g #BEBEBE", "@ g #C7C7C7", "# g #C4C4C4", "$ g #CECECE", "% g #B7B7B7", "& g #A1A1A1", "* g #C1C1C1", "= g #ADADAD", "- g #A5A5A5", "; g #AAAAAA", "> g #CACACA", ", g #B0B0B0", "' g #ACACAC", ") g #CCCCCC", "! g #ABABAB", "~ g #B3B3B3", "{ g #AFAFAF", "] g #CDCDCD", "^ g #B6B6B6", "/ g #A9A9A9", "( g #B4B4B4", "_ g #888888", ": g #7A7A7A", "< g #858585", "[ g #9B9B9B", "} g #898989", "| g #9C9C9C", "1 g #A8A8A8", "2 g #B1B1B1", "3 g #989898", "4 g #959595", "5 g #8B8B8B", "6 g #8E8E8E", "7 g #9D9D9D", "8 g #8C8C8C", "9 g #808080", "0 g #7F7F7F", "a g #B5B5B5", "b g #848484", "c g #5C5C5C", "d g #565656", "e g #656565", "f g #999999", "g g #9E9E9E", "h g #8A8A8A", "i g #B8B8B8", "j g #C8C8C8", "k g #A4A4A4", "l g #868686", "m g #B2B2B2", "n g #111111", "o g #000000", "p g #020202", "q g #353535", "r g #9F9F9F", "s g #969696", "t g #8D8D8D", "u g #919191", "v g #9A9A9A", "w g #090909", "x g #212121", "y g #A6A6A6", "z g #646464", "A g #929292", "B g #4F4F4F", "C g #181818", "D g #C5C5C5", "E g #7C7C7C", "F g #191919", "G g #0F0F0F", "H g #BDBDBD", "I g #909090", "J g #C0C0C0", "K g #BABABA", "L g #333333", "M g #1A1A1A", "N g #AEAEAE", "O g #D1D1D1", "P g #555555", "Q g #585858", "R g #A7A7A7", "S g #626262", "T g #242424", "U g #C3C3C3", "V g #A2A2A2", "W g #7E7E7E", "X g #151515", "Y g #CBCBCB", "Z g #7D7D7D", "` g #040404", " . g #010101", ".. g #CFCFCF", "+. g #A3A3A3", "@. g #979797", "#. g #030303", "$. g #939393", "%. g #8F8F8F", "&. g #C9C9C9", "*. g #7B7B7B", "=. g #878787", "-. g #414141", ";. g #3E3E3E", ">. g #3F3F3F", ",. g #949494", "'. g #838383", "). g #C6C6C6", "!. g #D4D4D4", "~. g #D2D2D2", "{. g #BCBCBC", " . + @ # ", "$ % & * = - ; > , ' ; ) ! ~ { ] ^ / ' ", " ( _ : < [ } | 1 % / 2 3 & _ [ 4 5 6 ) ", " 7 8 9 0 5 1 a b c d e f + g h } 6 i ", "j k l h } m h n o o o o p q ( r l < s # ", " [ t u v 1 w o o o o o o o x ^ 7 : y ", " ; 5 b ; z o o o o o o o o o d , 9 A j ", " y < l ^ B o o o o o o o o o C a t a ", "D y E & . F o o o o o o o o o G H I | J ", " A h K L o o o o o o o o o o M J I N ", "O ( 4 K P o o o o o o o o o o Q ^ 6 - j ", " R t 2 S o o o o o o o o o T H 7 5 K ", "U V W y W o o o o o o o o X , R l s u Y ", " | I N Z ` .o o o o o o < ; < h I g ", "..+.Z @.i ( t X o o o o #.; $.b _ %.@.&.", " 3 *.9 %.u { Z o o o o o =.V u 6 t ~ ", "* f _ 0 9 %.f 2 -.;.>.;.;.: ~ ,.t A V &.", " $.l ,.'.< ,.J % a ( U K i ' f : < +. ", "..{ 8 + - | 9 + V 3 u ).{ k %.H +.g 1 ", " + ..# U !.) D ~.] {.] .. "}; ProfileManager::ProfileManager( QString profileType, QWidget * parent, const char * name ) : QPushButton( parent, name ) { QPixmap profiles( ( const char** ) profiles_data ); setText( "" ); setPixmap( profiles ); QToolTip::add( this, i18n( "Profiles" ) ); this->profileType = profileType; connect( this, SIGNAL( clicked() ), this, SLOT( profilePopup() ) ); krConfig->setGroup("Private"); profileList = krConfig->readListEntry( profileType ); } void ProfileManager::profilePopup() { // profile menu identifiers #define ADD_NEW_ENTRY_ID 1000 #define LOAD_ENTRY_ID 2000 #define REMOVE_ENTRY_ID 3000 #define OVERWRITE_ENTRY_ID 4000 // create the menu KPopupMenu popup, removePopup, overwritePopup; popup.insertTitle(i18n("Profiles")); for( unsigned i=0; i != profileList.count() ; i++ ) { krConfig->setGroup( profileType + " - " + profileList[i] ); QString name = krConfig->readEntry( "Name" ); popup.insertItem( name, LOAD_ENTRY_ID + i ); removePopup.insertItem( name, REMOVE_ENTRY_ID + i ); overwritePopup.insertItem( name, OVERWRITE_ENTRY_ID + i ); } popup.insertSeparator(); if( profileList.count() ) { popup.insertItem( i18n("Remove entry"), &removePopup ); popup.insertItem( i18n("Overwrite entry"), &overwritePopup ); } popup.insertItem(i18n("Add new entry"),ADD_NEW_ENTRY_ID); unsigned result=popup.exec(QCursor::pos()); // check out the user's selection if( result == ADD_NEW_ENTRY_ID ) { QString profile = KInputDialog::getText( i18n( "Krusader::ProfileManager" ), i18n( "Enter the profile name:" ) ); if( !profile.isEmpty() ) { int profileNum = 1; while( profileList.contains( QString( "%1" ).arg( profileNum ) ) ) profileNum++; QString profileString = QString( "%1" ).arg( profileNum ); QString profileName = profileType + " - " + profileString; profileList.append( QString( "%1" ).arg( profileString ) ); krConfig->setGroup("Private"); krConfig->writeEntry( profileType, profileList ); krConfig->setGroup( profileName ); krConfig->writeEntry( "Name", profile ); emit saveToProfile( profileName ); krConfig->sync(); } }else if( result >= LOAD_ENTRY_ID && result < LOAD_ENTRY_ID + profileList.count() ) { emit loadFromProfile( profileType + " - " + profileList[ result - LOAD_ENTRY_ID ] ); }else if( result >= REMOVE_ENTRY_ID && result < REMOVE_ENTRY_ID + profileList.count() ) { krConfig->deleteGroup( profileType + " - " + profileList[ result - REMOVE_ENTRY_ID ] ); profileList.remove( profileList[ result - REMOVE_ENTRY_ID ] ); krConfig->setGroup("Private"); krConfig->writeEntry( profileType, profileList ); krConfig->sync(); }else if( result >= OVERWRITE_ENTRY_ID && result < OVERWRITE_ENTRY_ID + profileList.count() ) { emit saveToProfile( profileType + " - " + profileList[ result - OVERWRITE_ENTRY_ID ] ); } } #include "profilemanager.moc" |
From: Karai C. <ck...@us...> - 2004-09-26 23:08:43
|
Update of /cvsroot/krusader/krusader_kde3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4402/krusader_kde3 Modified Files: ChangeLog Log Message: ADDED: search profiles Index: ChangeLog =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/ChangeLog,v retrieving revision 1.308 retrieving revision 1.309 diff -C2 -d -r1.308 -r1.309 *** ChangeLog 26 Sep 2004 21:57:57 -0000 1.308 --- ChangeLog 26 Sep 2004 23:08:19 -0000 1.309 *************** *** 1,3 **** --- 1,4 ---- ====================== + ADDED: search profiles ADDED: searcher: TC like search ( 'text' == '*text*' ) excluding files with '|' (ex. '*.cpp *.h | *.moc.cpp' ) |
From: Jonas B. <jb...@us...> - 2004-09-26 21:58:07
|
Update of /cvsroot/krusader/krusader_kde3/krusader/UserAction In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18985/krusader/UserAction Modified Files: expander.cpp expander.h kraction.cpp Log Message: FIXED: useraction: i18n is now working in the add-placeholder-menu Index: kraction.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/UserAction/kraction.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** kraction.cpp 26 Aug 2004 00:38:37 -0000 1.4 --- kraction.cpp 26 Sep 2004 21:57:57 -0000 1.5 *************** *** 24,27 **** --- 24,28 ---- #include "expander.h" #include "useractionproperties.h" + #include "../krusader.h" *************** *** 189,193 **** // replace %% and prepare string ! QStringList commandList = Expander::expand( *_properties->command(), _properties->acceptURLs(), _properties->callEach() ); if ( _properties->confirmExecution() ) { --- 190,195 ---- // replace %% and prepare string ! // QStringList commandList = Expander::expand( *_properties->command(), _properties->acceptURLs(), _properties->callEach() ); ! QStringList commandList = krExpander->expand( *_properties->command(), _properties->acceptURLs(), _properties->callEach() ); if ( _properties->confirmExecution() ) { Index: expander.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/UserAction/expander.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** expander.h 18 Aug 2004 11:50:15 -0000 1.3 --- expander.h 26 Sep 2004 21:57:57 -0000 1.4 *************** *** 17,24 **** --- 17,182 ---- #include <qstring.h> class QStringList; + #include <qvaluelist.h> // #include <qstringlist.h> class ListPanel; /** + * This holds informations about each parameter + */ + class exp_parameter { + public: + inline exp_parameter( QString desc, QString pre, bool ness) + { _description = desc; _preset = pre; _nessesary = ness; } + inline QString description() ///< A description of the parameter + { return _description; } + inline QString preset() ///< the default of the parameter + { return _preset; } + inline bool nessesary() ///< false if the parameter is optional + { return _nessesary; } + + private: + QString _description; + QString _preset; + bool _nessesary; + }; + + #define EXP_FUNC QString expFunc ( const ListPanel*, const QStringList&, const bool&, const int& ) + /** + * Abstract baseclass for all expander-functions (which replace placeholder). + * A Placeholder is an entry containing the expression, its expanding function and Parameter. + * + * @author Jonas Bähr (http://www.jonas-baehr.de) + */ + class exp_placeholder { + public: + inline QString expression() ///< The placeholder (without '%' or panel-prefix) + { return _expression; } + inline QString description() ///< A description of the placeholder + { return _description; } + inline bool needPanel() ///< true if the placeholder needs a panel to operate on + { return _needPanel; } + inline void addParameter( exp_parameter* parameter ) ///< adds parameter to the placeholder + { _parameter.append(parameter); } + inline int parameterCount() ///< returns the number of placeholders + { return _parameter.count(); } + inline exp_parameter* parameter( int id ) + { return _parameter[ id ]; } + + virtual EXP_FUNC = 0; + protected: + QString _expression; + QString _description; + QValueList <exp_parameter*> _parameter; + bool _needPanel; + }; + + class exp_separator : public exp_placeholder { + public: + inline exp_separator( bool needPanel ) + { _needPanel = needPanel; } + inline EXP_FUNC {} + }; + + /** + * expands %_Path% ('_' is replaced by 'a', 'o', 'r' or 'l' to indicate the active, other, right or left panel) with the path of the specified panel + */ + class exp_Path : public exp_placeholder { + public: + exp_Path(); + EXP_FUNC; + }; + + /** + * expands %_Count% ('_' is replaced by 'a', 'o', 'r' or 'l' to indicate the active, other, right or left panel) with the number of items, which type is specified by the first Parameter + */ + class exp_Count : public exp_placeholder { + public: + exp_Count(); + EXP_FUNC; + }; + + /** + * expands %_Filter% ('_' is replaced by 'a', 'o', 'r' or 'l' to indicate the active, other, right or left panel) with the correspondend filter (ie: "*.cpp") + */ + class exp_Filter : public exp_placeholder { + public: + exp_Filter(); + EXP_FUNC; + }; + + /** + * expands %_Current% ('_' is replaced by 'a', 'o', 'r' or 'l' to indicate the active, other, right or left panel) with the current item ( != the selected onec) + */ + class exp_Current : public exp_placeholder { + public: + exp_Current(); + EXP_FUNC; + }; + + /** + * expands %_List% ('_' is replaced by 'a', 'o', 'r' or 'l' to indicate the active, other, right or left panel) with a list of items, which type is specified by the first Parameter + */ + class exp_List : public exp_placeholder { + public: + exp_List(); + EXP_FUNC; + }; + + /** + * expands %_Ask% ('_' is nessesary because there is no panel needed) with the return of an input-dialog + */ + class exp_Ask : public exp_placeholder { + public: + exp_Ask(); + EXP_FUNC; + }; + + /** + * This copies it's first Parameter to the clipboard + */ + class exp_Clipboard : public exp_placeholder { + public: + exp_Clipboard(); + EXP_FUNC; + }; + + /** + * This selects all items by the mask given with the first Parameter + */ + class exp_Select : public exp_placeholder { + public: + exp_Select(); + EXP_FUNC; + }; + + /** + * This changes the panel'spath to the value given with the first Parameter. + */ + class exp_Goto : public exp_placeholder { + public: + exp_Goto(); + EXP_FUNC; + }; + + /** + * This is equal to 'cp <first Parameter> <second Parameter>'. + */ + class exp_Copy : public exp_placeholder { + public: + exp_Copy(); + EXP_FUNC; + }; + + /** + * This opens the synchronizer with a given profile + */ + class exp_Sync : public exp_placeholder { + public: + exp_Sync(); + EXP_FUNC; + }; + + + /** * The Expander expands the command of an UserAction by replacing all placeholders by thier current values.@n * Each placeholder begins with a '%'-sign, followed by one char indicating the panel, followed by a command which may have some paramenter enclosed in brackets and also ends with a '%'-sign. *************** *** 71,163 **** class Expander { public: ! /** an expander is a function that receives a QString input, expands ! * it and returns a new QString output containing the expanded expression. ! */ ! typedef QString ( *EXPANDER ) ( const ListPanel*, const QStringList&, const bool&, const int& ); ! ! /** ! * This holds informations about each parameter ! */ ! typedef struct Parameter { ! QString description; ///< A description of the parameter ! QString preset; ///< the default of the parameter ! bool nessesary; ///< false if the parameter is optional ! }; ! ! /** ! * a Placeholder is an entry containing the expression, its expanding function and Parameter ! */ ! typedef struct Placeholder { ! QString expression; ///< The placeholder (without '%' or panel-prefix) ! QString description; ///< A description of the placeholder ! EXPANDER expFunc; ///< The function used to expand it ! Parameter parameter[5]; ///< All Parameter of this placeholder (WARNING: max 4; if needed more, change it in the header) ! int parameterCount; ///< How many parameter are realy defined ! bool needPanel; ///< true if the placeholder needs a panel to operate on ! }; ! ! /** ! * This expands a whole commandline by calling (if callEach is true) expandCurrent for each selected item (else only once) ! * ! * @param stringToExpand the commandline with the placeholder ! * @param useUrl true if the path's should be expanded to an URL instead of an local path ! * @param callEach true if %_Current% should be expanded once for every selected item ! * @return a list of all commands (one if callEach is false or one for every selectet item if true) ! */ ! static QStringList expand( const QString& stringToExpand, bool useUrl, bool callEach ); ! static const int numOfPlaceholder = 13; ///< How many Placeholder are realy defined ! /** ! * A List of all Placeholder and thier Parameter. This is used to generate the AddPlaceholderPopup as well as by the expand function ! */ ! static Placeholder placeholder[ numOfPlaceholder ]; ! protected: ! /** ! * expands %_Path% ('_' is replaced by 'a', 'o', 'r' or 'l' to indicate the active, other, right or left panel) with the path of the specified panel ! */ ! static QString exp_Path( const ListPanel* panel, const QStringList& parameter, const bool& useUrl, const int& currentItem ); ! /** ! * expands %_Count% ('_' is replaced by 'a', 'o', 'r' or 'l' to indicate the active, other, right or left panel) with the number of items, which type is specified by the first Parameter ! */ ! static QString exp_Count( const ListPanel* panel, const QStringList& parameter, const bool& useUrl, const int& currentItem ); ! /** ! * expands %_Filter% ('_' is replaced by 'a', 'o', 'r' or 'l' to indicate the active, other, right or left panel) with the correspondend filter (ie: "*.cpp") ! */ ! static QString exp_Filter( const ListPanel* panel, const QStringList& parameter, const bool& useUrl, const int& currentItem ); ! /** ! * expands %_Current% ('_' is replaced by 'a', 'o', 'r' or 'l' to indicate the active, other, right or left panel) with the current item ( != the selected onec) ! */ ! static QString exp_Current( const ListPanel* panel, const QStringList& parameter, const bool& useUrl, const int& currentItem ); ! /** ! * expands %_List% ('_' is replaced by 'a', 'o', 'r' or 'l' to indicate the active, other, right or left panel) with a list of items, which type is specified by the first Parameter ! */ ! static QString exp_List( const ListPanel* panel, const QStringList& parameter, const bool& useUrl, const int& currentItem ); ! /** ! * expands %_Ask% ('_' is nessesary because there is no panel needed) with the return of an input-dialog ! */ ! static QString exp_Ask( const ListPanel* panel, const QStringList& parameter, const bool& useUrl, const int& currentItem ); ! /** ! * This copies it's first Parameter to the clipboard ! */ ! static QString exp_Clipboard( const ListPanel* panel, const QStringList& parameter, const bool& useUrl, const int& currentItem ); ! /** ! * This selects all items by the mask given with the first Parameter ! */ ! static QString exp_Select( const ListPanel* panel, const QStringList& parameter, const bool& useUrl, const int& currentItem ); ! /** ! * This changes the panel'spath to the value given with the first Parameter. ! */ ! static QString exp_Bookmark( const ListPanel* panel, const QStringList& parameter, const bool& useUrl, const int& currentItem ); ! /** ! * This is equal to 'cp <first Parameter> <second Parameter>'. ! */ ! static QString exp_Copy( const ListPanel* panel, const QStringList& parameter, const bool& useUrl, const int& currentItem ); ! /** ! * This opens the synchronizer with a given profile ! */ ! static QString exp_Sync( const ListPanel* panel, const QStringList& parameter, const bool& useUrl, const int& currentItem ); ! /** * This expands a whole commandline by calling for each Placeholder the correspondend expander --- 229,252 ---- class Expander { public: ! Expander(); ! inline void addPlaceholder( exp_placeholder* placeholder ) ///< adds placeholder to the expander. ! { _placeholder.append(placeholder); } ! inline int placeholderCount() ///< returns the number of placeholders ! { return _placeholder.count(); } ! inline exp_placeholder* placeholder( int id ) ! { return _placeholder[ id ]; } ! /** ! * This expands a whole commandline by calling (if callEach is true) expandCurrent for each selected item (else only once) ! * ! * @param stringToExpand the commandline with the placeholder ! * @param useUrl true if the path's should be expanded to an URL instead of an local path ! * @param callEach true if %_Current% should be expanded once for every selected item ! * @return a list of all commands (one if callEach is false or one for every selectet item if true) ! */ ! QStringList expand( const QString& stringToExpand, bool useUrl, bool callEach ); ! protected: /** * This expands a whole commandline by calling for each Placeholder the correspondend expander *************** *** 168,177 **** * @return the expanded commanline for the current item */ ! static QString expandCurrent( const QString& stringToExpand, bool useUrl, int currentItem ); /** * @param panelIndicator either '_' for panel-independent placeholders, 'a', 'o', 'r', or 'l' for the active, other (inactive), right or left panel * @return a pointer to the right panel or NULL if no panel is needed. */ ! static ListPanel* getPanel( const char& panelIndicator ); /** * This splits the parameter-string into separate parameter and expands each --- 257,266 ---- * @return the expanded commanline for the current item */ ! QString expandCurrent( const QString& stringToExpand, bool useUrl, int currentItem ); /** * @param panelIndicator either '_' for panel-independent placeholders, 'a', 'o', 'r', or 'l' for the active, other (inactive), right or left panel * @return a pointer to the right panel or NULL if no panel is needed. */ ! ListPanel* getPanel( const char& panelIndicator ); /** * This splits the parameter-string into separate parameter and expands each *************** *** 180,190 **** * @return a list of all parameter */ ! static QStringList separateParameter( QString* exp, bool useUrl ); /** * This finds the end of a placeholder, taking care of the parameter * @return the position where the placeholder ends */ ! static int findEnd( const QString& str, int start ); }; --- 269,281 ---- * @return a list of all parameter */ ! QStringList separateParameter( QString* exp, bool useUrl ); /** * This finds the end of a placeholder, taking care of the parameter * @return the position where the placeholder ends */ ! int findEnd( const QString& str, int start ); + private: + QValueList <exp_placeholder*> _placeholder; }; Index: expander.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/UserAction/expander.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** expander.cpp 24 Sep 2004 23:11:53 -0000 1.6 --- expander.cpp 26 Sep 2004 21:57:57 -0000 1.7 *************** *** 26,119 **** #define ACTIVE krApp->mainView->activePanel ! ! ListPanel* Expander::getPanel( const char& panelIndicator ) { ! switch ( panelIndicator ) { ! case 'a': ! return krApp->mainView->activePanel; ! case 'o': ! return krApp->mainView->activePanel->otherPanel; ! case 'l': ! return krApp->mainView->left; ! case 'r': ! return krApp->mainView->right; ! case '_': ! return 0; ! default: ! kdWarning() << "Expander: unknown Panel " << panelIndicator << endl; ! return 0; ! } ! } ! ! ! Expander::Placeholder Expander::placeholder[ Expander::numOfPlaceholder ] = { ! // { "expression", "description", expander_func, {parameter}, no. of parameters, need a panel } ! // if "expression" == "" => instertSeparator() ! // parameter: { "description", "default", nessesary }, ... (max 5, see .h) ! {"Path", i18n("panel's path"), exp_Path, { ! {i18n("Automatic escape spaces"), "__yes", false} ! }, 1, true}, ! {"Count", i18n("number of ..."), exp_Count, { ! {i18n("count all:"), "__choose:All;Files;Dirs;Selected", false} ! }, 1, true}, ! {"Filter", i18n("filter mask (*.h, *.cpp ...)"), exp_Filter, { ! }, 0, true}, ! {"Current", i18n("current file (!= selected file)"), exp_Current, { ! {i18n("Ommit the current path (optional)"), "__no", false}, ! {i18n("Automatic escape spaces"), "__yes", false} ! }, 2, true}, ! {"List", i18n("Item list of ..."), exp_List, { ! {i18n("Which items"), "__choose:All;Files;Dirs;Selected", false}, ! {i18n("Separator between the items (optional)"), " ", false}, ! {i18n("Ommit the current path (optional)"), "__no", false}, ! {i18n("Mask (optional, all but 'Selected')"), "__select", false}, ! {i18n("Automatic escape spaces"), "__yes", false} ! }, 5, true}, ! //--------- Internals -------------- ! {"", "", 0, {}, 0, true}, // Separator ! {"Select", i18n("Manipulate the selection"), exp_Select, { ! {i18n("Selectionmask"), "__select", true}, ! {i18n("Manipulate in which way"), "__choose:Set;Add;Remove", false} ! }, 2, true}, ! {"Bookmark", i18n("Jump to a bookmark"), exp_Bookmark, { ! {i18n("please choose the bookmark"), "__bookmark", true}, ! {i18n("open the bookmark in a new tab"), "__no", false} ! }, 2, true}, ! // {"Search", i18n("Search for files using"),0, { ! // {i18n("please choose the setting"), "__search", true}, //TODO: add this action as soon as the search supports saving search-settings ! // {i18n("open the search in a new tab"), "__yes", false} //TODO: add this also to panel-dependent as soon as vfs support the display of search-results ! // }, 1, true}, ! //--------- Panel independent -------------- ! {"Ask", i18n("Question the user for a parameter"), exp_Ask, { ! {i18n("Question"), "Where do you want do go today?", true}, ! {i18n("Preset (optional)"), "", false}, ! {i18n("Caption (optional)"), "", false} ! }, 3, false}, ! {"Clipboard", i18n("Copy to clipboard"), exp_Clipboard, { ! {i18n("What should be copied"), "__placeholder", true}, ! {i18n("Append to the current clipboard-content with this seperator (optional)"), "", false} ! }, 2, false}, ! {"Copy", i18n("Copy a file/folder"), exp_Copy, { ! {i18n("What should be copied"), "__placeholder", true}, ! {i18n("Where it should be copied"), "__placeholder", true}, ! }, 2, false}, ! {"Sync", i18n("Opens a synchronizer-profile"), exp_Sync, { ! {i18n("Choose a profile"), "__syncprofile", true}, ! }, 1, false}, ! {"Run", i18n("Execute a script"), 0, { ! {i18n("Script"), "__file", true}, ! }, 1, false} ! // {"Search", i18n("Search for files using"),0, { ! // {i18n("please choose the setting"), "__search", true}, //TODO: add this action as soon as the search supports saving search-settings ! // }, 1, false}, ! }; ! ///////// expander functions ////////////////////////////////////////////////////////// ! QString Expander::exp_Path( const ListPanel* panel, const QStringList& parameter, const bool& useUrl, const int& ) { ! if ( panel == 0 ) { ! kdWarning() << "Expander: no panel specified for %_Path%; ignoring..." << endl; ! return QString::null; ! } QString result; --- 26,48 ---- #define ACTIVE krApp->mainView->activePanel ! #define NEED_PANEL if ( panel == 0 ) { \ ! kdWarning() << "Expander: no panel specified for %_" << _expression << "%; ignoring..." << endl; \ ! return QString::null; \ ! } ! ///////////////////////////////////////////////////////////////////////////////////////////////// ! /////////////////////////////////// expander classes //////////////////////////////////// ! ///////////////////////////////////////////////////////////////////////////////////////////////// ! exp_Path::exp_Path() { ! _expression = "Path"; ! _description = i18n("panel's path"); ! _needPanel = true; ! ! addParameter( new exp_parameter( i18n("Automatic escape spaces"), "__yes", false ) ); ! } ! QString exp_Path::expFunc( const ListPanel* panel, const QStringList& parameter, const bool& useUrl, const int& ) { ! NEED_PANEL QString result; *************** *** 130,138 **** } ! QString Expander::exp_Count( const ListPanel* panel, const QStringList& parameter, const bool&, const int& ) { ! if ( panel == 0 ) { ! kdWarning() << "Expander: no panel specified for %_Count%; ignoring..." << endl; ! return QString::null; ! } int n = -1; --- 59,71 ---- } ! exp_Count::exp_Count() { ! _expression = "Count"; ! _description = i18n("number of ..."); ! _needPanel = true; ! ! addParameter( new exp_parameter( i18n("count all:"), "__choose:All;Files;Dirs;Selected", false ) ); ! } ! QString exp_Count::expFunc( const ListPanel* panel, const QStringList& parameter, const bool&, const int& ) { ! NEED_PANEL int n = -1; *************** *** 153,169 **** } ! QString Expander::exp_Filter( const ListPanel* panel, const QStringList&, const bool&, const int& ) { ! if ( panel == 0 ) { ! kdWarning() << "Expander: no panel specified for %_Filter%; ignoring..." << endl; ! return QString::null; ! } return panel->view->filterMask(); } ! QString Expander::exp_Current( const ListPanel* panel, const QStringList& parameter, const bool& useUrl, const int& currentItem ) { ! if ( panel == 0 ) { ! kdWarning() << "Expander: no panel specified for %_Current%; ignoring..." << endl; ! return QString::null; ! } QString item; if ( currentItem >= 0) { // in a callEach-cycle --- 86,111 ---- } ! exp_Filter::exp_Filter() { ! _expression = "Filter"; ! _description = i18n("filter mask (*.h, *.cpp ...)"); ! _needPanel = true; ! } ! QString exp_Filter::expFunc( const ListPanel* panel, const QStringList&, const bool&, const int& ) { ! NEED_PANEL ! return panel->view->filterMask(); } ! exp_Current::exp_Current() { ! _expression = "Current"; ! _description = i18n("current file (!= selected file)"); ! _needPanel = true; ! ! addParameter( new exp_parameter( i18n("Ommit the current path (optional)"), "__no", false ) ); ! addParameter( new exp_parameter( i18n("Automatic escape spaces"), "__yes", false ) ); ! } ! QString exp_Current::expFunc( const ListPanel* panel, const QStringList& parameter, const bool& useUrl, const int& currentItem ) { ! NEED_PANEL ! QString item; if ( currentItem >= 0) { // in a callEach-cycle *************** *** 198,207 **** } ! // items are separated by the second parameter ! QString Expander::exp_List( const ListPanel* panel, const QStringList& parameter, const bool& useUrl, const int& ) { ! if ( panel == 0 ) { ! kdWarning() << "Expander: no panel specified for %_List%; ignoring..." << endl; ! return QString::null; ! } // get selected items from view QStringList items; --- 140,157 ---- } ! exp_List::exp_List() { ! _expression = "List"; ! _description = i18n("Item list of ..."); ! _needPanel = true; ! ! addParameter( new exp_parameter( i18n("Which items"), "__choose:All;Files;Dirs;Selected", false ) ); ! addParameter( new exp_parameter( i18n("Separator between the items (optional)"), " ", false ) ); ! addParameter( new exp_parameter( i18n("Ommit the current path (optional)"), "__no", false ) ); ! addParameter( new exp_parameter( i18n("Mask (optional, all but 'Selected')"), "__select", false ) ); ! addParameter( new exp_parameter( i18n("Automatic escape spaces"), "__yes", false ) ); ! } ! QString exp_List::expFunc( const ListPanel* panel, const QStringList& parameter, const bool& useUrl, const int& ) { ! NEED_PANEL ! // get selected items from view QStringList items; *************** *** 259,268 **** } ! // select in the panel using parameter[0] as mask ! QString Expander::exp_Select( const ListPanel* panel, const QStringList& parameter, const bool&, const int& ) { ! if ( panel == 0 ) { ! kdWarning() << "Expander: no panel specified for %_Select%; ignoring..." << endl; ! return QString::null; ! } QString mask; --- 209,222 ---- } ! exp_Select::exp_Select() { ! _expression = "Select"; ! _description = i18n("Manipulate the selection"); ! _needPanel = true; ! ! addParameter( new exp_parameter( i18n("Selectionmask"), "__select", true ) ); ! addParameter( new exp_parameter( i18n("Manipulate in which way"), "__choose:Set;Add;Remove", false ) ); ! } ! QString exp_Select::expFunc( const ListPanel* panel, const QStringList& parameter, const bool&, const int& ) { ! NEED_PANEL QString mask; *************** *** 284,290 **** } ! // asks the user for an input ! QString Expander::exp_Ask( const ListPanel*, const QStringList& parameter, const bool&, const int& ) { QString caption, preset; if ( parameter.count() <= 2 || parameter[2].isEmpty() ) --- 238,289 ---- } + exp_Goto::exp_Goto() { + _expression = "Goto"; + _description = i18n("Jump to a location"); + _needPanel = true; + + addParameter( new exp_parameter( i18n("please choose the bookmark"), "__bookmark", true ) ); + addParameter( new exp_parameter( i18n("open the bookmark in a new tab"), "__no", false ) ); + } + QString exp_Goto::expFunc( const ListPanel* panel, const QStringList& parameter, const bool&, const int& ) { + NEED_PANEL + + bool newTab = false; + if ( parameter[1].lower() == "yes" ) + newTab = true; + + if ( newTab ) { + if ( panel == krApp->mainView->left ) + krApp->mainView->leftMng->slotNewTab( parameter[0] ); + else + krApp->mainView->rightMng->slotNewTab( parameter[0] ); + } + else + panel->func->openUrl( parameter[0], "" ); + + return QString::null; // this doesn't return everything, that's normal! + } ! /* ! exp_Search::exp_Search() { ! _expression = "Search"; ! _description = i18n("Search for files"); ! _needPanel = true; ! ! addParameter( new exp_parameter( i18n("please choose the setting"), "__search", true ) ); //TODO: add this action as soon as the search supports saving search-settings ! addParameter( new exp_parameter( i18n("open the search in a new tab"), "__yes", false ) ); //TODO: add this also to panel-dependent as soon as vfs support the display of search-results ! } ! */ ! ! exp_Ask::exp_Ask() { ! _expression = "Ask"; ! _description = i18n("Question the user for a parameter"); ! _needPanel = false; ! ! addParameter( new exp_parameter( i18n("Question"), "Where do you want do go today?", true ) ); ! addParameter( new exp_parameter( i18n("Preset (optional)"), "", false ) ); ! addParameter( new exp_parameter( i18n("Caption (optional)"), "", false ) ); ! } ! QString exp_Ask::expFunc( const ListPanel*, const QStringList& parameter, const bool&, const int& ) { QString caption, preset; if ( parameter.count() <= 2 || parameter[2].isEmpty() ) *************** *** 302,307 **** } ! // copies parameter[0] to clipboard ! QString Expander::exp_Clipboard( const ListPanel*, const QStringList& parameter, const bool&, const int& ) { // kdDebug() << "Expander::exp_Clipboard, parameter[0]: '" << parameter[0] << "', Clipboard: " << KApplication::clipboard()->text() << endl; if ( parameter.count() <= 1 || parameter[1].isEmpty() || KApplication::clipboard()->text().isEmpty() ) --- 301,313 ---- } ! exp_Clipboard::exp_Clipboard() { ! _expression = "Clipboard"; ! _description = i18n("Copy to clipboard"); ! _needPanel = false; ! ! addParameter( new exp_parameter( i18n("What should be copied"), "__placeholder", true ) ); ! addParameter( new exp_parameter( i18n("Append to the current clipboard-content with this seperator (optional)"), "", false ) ); ! } ! QString exp_Clipboard::expFunc( const ListPanel*, const QStringList& parameter, const bool&, const int& ) { // kdDebug() << "Expander::exp_Clipboard, parameter[0]: '" << parameter[0] << "', Clipboard: " << KApplication::clipboard()->text() << endl; if ( parameter.count() <= 1 || parameter[1].isEmpty() || KApplication::clipboard()->text().isEmpty() ) *************** *** 313,340 **** } ! // changes the path to parameter[0] ! QString Expander::exp_Bookmark( const ListPanel* panel, const QStringList& parameter, const bool&, const int& ) { ! if ( panel == 0 ) { ! kdWarning() << "Expander: no panel specified for %_Bookmark%; ignoring..." << endl; ! return QString::null; ! } ! ! bool newTab = false; ! if ( parameter[1].lower() == "yes" ) ! newTab = true; ! ! if ( newTab ) { ! if ( panel == krApp->mainView->left ) ! krApp->mainView->leftMng->slotNewTab( parameter[0] ); ! else ! krApp->mainView->rightMng->slotNewTab( parameter[0] ); ! } ! else ! panel->func->openUrl( parameter[0], "" ); ! ! return QString::null; // this doesn't return everything, that's normal! ! } ! QString Expander::exp_Copy( const ListPanel*, const QStringList& parameter, const bool&, const int& ) { KURL src = parameter[0]; --- 319,331 ---- } ! exp_Copy::exp_Copy() { ! _expression = "Copy"; ! _description = i18n("Copy a file/folder"); ! _needPanel = false; ! addParameter( new exp_parameter( i18n("What should be copied"), "__placeholder", true ) ); ! addParameter( new exp_parameter( i18n("Where it should be copied"), "__placeholder", true ) ); ! } ! QString exp_Copy::expFunc( const ListPanel*, const QStringList& parameter, const bool&, const int& ) { KURL src = parameter[0]; *************** *** 349,353 **** } ! QString Expander::exp_Sync( const ListPanel*, const QStringList& parameter, const bool&, const int& ) { if ( parameter[0].isEmpty() ) { kdWarning() << "Expander: no profile specified for %_Sync(profile)%; ignoring..." << endl; --- 340,351 ---- } ! exp_Sync::exp_Sync() { ! _expression = "Sync"; ! _description = i18n("Opens a synchronizer-profile"); ! _needPanel = false; ! ! addParameter( new exp_parameter( i18n("Choose a profile"), "__syncprofile", true ) ); ! } ! QString exp_Sync::expFunc( const ListPanel*, const QStringList& parameter, const bool&, const int& ) { if ( parameter[0].isEmpty() ) { kdWarning() << "Expander: no profile specified for %_Sync(profile)%; ignoring..." << endl; *************** *** 356,370 **** SynchronizerGUI *sync = new SynchronizerGUI( krApp->mainView, parameter[0] ); ! ! bool refresh = sync->wasSynchronization(); delete sync; - // refresh both panels: - if( refresh ) { - // first the other, then the active; else the focus would change - getPanel( 'o' )->func->refresh(); - getPanel( 'a' )->func->refresh(); - } - return QString::null; // this doesn't return everything, that's normal! } --- 354,361 ---- SynchronizerGUI *sync = new SynchronizerGUI( krApp->mainView, parameter[0] ); ! // do the sync: ! sync->wasSynchronization(); delete sync; return QString::null; // this doesn't return everything, that's normal! } *************** *** 372,378 **** ///////////////////////////////////////////////////////////////////////////////////////////////// ! ////////////////////////////// end of expander functions ////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////// QStringList Expander::expand( const QString& stringToExpand, bool useUrl, bool callEach ) { QStringList result; --- 363,408 ---- ///////////////////////////////////////////////////////////////////////////////////////////////// ! ////////////////////////////// end of expander classes //////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////// + Expander::Expander() { + kdDebug() << "new Expander" << endl; + //Penel-dependent: + addPlaceholder( new exp_Path() ); + addPlaceholder( new exp_Count() ); + addPlaceholder( new exp_Filter() ); + addPlaceholder( new exp_Current() ); + addPlaceholder( new exp_List() ); + addPlaceholder( new exp_separator( true ) ); + addPlaceholder( new exp_Select() ); + addPlaceholder( new exp_Goto() ); + // addPlaceholder( new exp_Search() ); + //Panel-independent: + addPlaceholder( new exp_Ask() ); + addPlaceholder( new exp_Clipboard() ); + addPlaceholder( new exp_Copy() ); + addPlaceholder( new exp_Sync() ); + // addPlaceholder( new exp_Run() ); + // addPlaceholder( new exp_SearchExt() ); + } + + ListPanel* Expander::getPanel( const char& panelIndicator ) { + switch ( panelIndicator ) { + case 'a': + return krApp->mainView->activePanel; + case 'o': + return krApp->mainView->activePanel->otherPanel; + case 'l': + return krApp->mainView->left; + case 'r': + return krApp->mainView->right; + case '_': + return 0; + default: + kdWarning() << "Expander: unknown Panel " << panelIndicator << endl; + return 0; + } + } + QStringList Expander::expand( const QString& stringToExpand, bool useUrl, bool callEach ) { QStringList result; *************** *** 413,424 **** char panelIndicator = exp.lower()[0].latin1(); exp.replace( 0, 1, "" ); ! for ( i = 0; i < numOfPlaceholder; ++i ) ! if ( exp == placeholder[ i ].expression ) { // kdDebug() << "---------------------------------------" << endl; ! result += ( placeholder[ i ].expFunc ) ( getPanel( panelIndicator ), parameter, useUrl, currentItem ); // kdDebug() << "---------------------------------------" << endl; break; } ! if ( i == numOfPlaceholder ) { // didn't find an expander kdWarning() << "Error: unrecognized %" << panelIndicator << exp << "% in Expander::expand" << endl; return QString::null; --- 443,454 ---- char panelIndicator = exp.lower()[0].latin1(); exp.replace( 0, 1, "" ); ! for ( i = 0; i < placeholderCount(); ++i ) ! if ( exp == placeholder( i )->expression() ) { // kdDebug() << "---------------------------------------" << endl; ! result += placeholder( i )->expFunc( getPanel( panelIndicator ), parameter, useUrl, currentItem ); // kdDebug() << "---------------------------------------" << endl; break; } ! if ( i == placeholderCount() ) { // didn't find an expander kdWarning() << "Error: unrecognized %" << panelIndicator << exp << "% in Expander::expand" << endl; return QString::null; |
From: Jonas B. <jb...@us...> - 2004-09-26 21:58:07
|
Update of /cvsroot/krusader/krusader_kde3/krusader In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18985/krusader Modified Files: krusader.cpp krusader.h Log Message: FIXED: useraction: i18n is now working in the add-placeholder-menu Index: krusader.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/krusader.h,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** krusader.h 17 Sep 2004 13:03:16 -0000 1.28 --- krusader.h 26 Sep 2004 21:57:57 -0000 1.29 *************** *** 56,59 **** --- 56,60 ---- class UserMenu; class UserAction; + class Expander; class KMountMan; *************** *** 128,131 **** --- 129,133 ---- static UserMenu *userMenu; static UserAction *userAction; + static Expander *expander; signals: *************** *** 192,195 **** --- 194,198 ---- #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.89 retrieving revision 1.90 diff -C2 -d -r1.89 -r1.90 *** krusader.cpp 19 Sep 2004 11:47:45 -0000 1.89 --- krusader.cpp 26 Sep 2004 21:57:57 -0000 1.90 *************** *** 83,86 **** --- 83,87 ---- #include "krservices.h" #include "UserAction/useraction.h" + #include "UserAction/expander.h" #include "UserMenu/usermenu.h" #include "panelmanager.h" *************** *** 144,147 **** --- 145,149 ---- &actMarkDifferentAndSingle, &actMarkDifferent, 0}; UserAction *Krusader::userAction = 0; + Expander *Krusader::expander = 0; UserMenu *Krusader::userMenu = 0; *************** *** 559,562 **** --- 561,565 ---- // setup all UserActions + expander = new Expander(); userAction = new UserAction(); } |
From: Jonas B. <jb...@us...> - 2004-09-26 21:58:07
|
Update of /cvsroot/krusader/krusader_kde3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18985 Modified Files: CVSNEWS ChangeLog Log Message: FIXED: useraction: i18n is now working in the add-placeholder-menu Index: CVSNEWS =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/CVSNEWS,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** CVSNEWS 24 Sep 2004 20:43:58 -0000 1.17 --- CVSNEWS 26 Sep 2004 21:57:57 -0000 1.18 *************** *** 3,6 **** --- 3,11 ---- in some way an extension to the changelog. ------------------------------------------------------ + + Useraction: removed placeholder 'Bookmark'. It is deprecated now since the new + bookmark-system can be accessed directly like an useraction. If you need it anyway + use 'Goto' instead. + TC like searching: if you type 'text' -> results the same as '*text*' You can exclude files from the search with '|' (ex. '*.cpp *.h | *.moc.cpp' ) *************** *** 65,69 **** List replaced by a list of all <first paremeter> Select manipulates the selection in a panel ! Bookmark changes the panels's path to <first parameter> Ask asks the user for a some text and is replaced by the answer Clipboard manipulates the clipboard --- 70,74 ---- List replaced by a list of all <first paremeter> Select manipulates the selection in a panel ! Goto changes the panels's path to <first parameter> Ask asks the user for a some text and is replaced by the answer Clipboard manipulates the clipboard Index: ChangeLog =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/ChangeLog,v retrieving revision 1.307 retrieving revision 1.308 diff -C2 -d -r1.307 -r1.308 *** ChangeLog 23 Sep 2004 16:43:03 -0000 1.307 --- ChangeLog 26 Sep 2004 21:57:57 -0000 1.308 *************** *** 42,45 **** --- 42,46 ---- REACTIVATED: usermenu (now using the new useraction-system) + FIXED: useraction: i18n is now working in the add-placeholder-menu FIXED: searcher corrupts international characters FIXED: searcher cannot open remote URL-s for editing/viewing (archives) |
From: Jonas B. <jb...@us...> - 2004-09-26 21:58:07
|
Update of /cvsroot/krusader/krusader_kde3/krusader/GUI In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18985/krusader/GUI Modified Files: addplaceholderpopup.cpp addplaceholderpopup.h Log Message: FIXED: useraction: i18n is now working in the add-placeholder-menu Index: addplaceholderpopup.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/GUI/addplaceholderpopup.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** addplaceholderpopup.cpp 18 Aug 2004 12:28:23 -0000 1.3 --- addplaceholderpopup.cpp 26 Sep 2004 21:57:56 -0000 1.4 *************** *** 60,66 **** // read the expressions array from the user menu and populate menus ! for ( int i = 0; i < Expander::numOfPlaceholder; ++i ) { ! if ( Expander::placeholder[ i ].expression.isEmpty() ) { ! if ( Expander::placeholder[ i ].needPanel ) { _activeSub->insertSeparator(); _otherSub->insertSeparator(); --- 60,66 ---- // read the expressions array from the user menu and populate menus ! for ( int i = 0; i < krExpander->placeholderCount(); ++i ) { ! if ( krExpander->placeholder( i )->expression().isEmpty() ) { ! if ( krExpander->placeholder( i )->needPanel() ) { _activeSub->insertSeparator(); _otherSub->insertSeparator(); *************** *** 72,83 **** } else { ! if ( Expander::placeholder[ i ].needPanel ) { ! _activeSub->insertItem( Expander::placeholder[ i ].description, ( i | ACTIVE_MASK ) ); ! _otherSub->insertItem( Expander::placeholder[ i ].description, ( i | OTHER_MASK ) ); ! _leftSub->insertItem( Expander::placeholder[ i ].description, ( i | LEFT_MASK ) ); ! _rightSub->insertItem( Expander::placeholder[ i ].description, ( i | RIGHT_MASK ) ); } else ! _independentSub->insertItem( Expander::placeholder[ i ].description, ( i | INDEPENDENT_MASK ) ); } } --- 72,83 ---- } else { ! if ( krExpander->placeholder( i )->needPanel() ) { ! _activeSub->insertItem( krExpander->placeholder( i )->description(), ( i | ACTIVE_MASK ) ); ! _otherSub->insertItem( krExpander->placeholder( i )->description(), ( i | OTHER_MASK ) ); ! _leftSub->insertItem( krExpander->placeholder( i )->description(), ( i | LEFT_MASK ) ); ! _rightSub->insertItem( krExpander->placeholder( i )->description(), ( i | RIGHT_MASK ) ); } else ! _independentSub->insertItem( krExpander->placeholder( i )->description(), ( i | INDEPENDENT_MASK ) ); } } *************** *** 98,106 **** return filename + " "; // with extra space } else { // user selected something from the menus ! Expander::Placeholder* currentPlaceholder = &Expander::placeholder[ res & ~( ACTIVE_MASK | OTHER_MASK | LEFT_MASK | RIGHT_MASK | INDEPENDENT_MASK ) ]; ! if ( currentPlaceholder->expFunc == 0 ) { ! KMessageBox::sorry( this, "BOFH Excuse #93:\nFeature not yet implemented" ); ! return QString::null; ! } ParameterDialog* parameterDialog = new ParameterDialog( currentPlaceholder, this ); QString panel, parameter = parameterDialog->getParameter(); --- 98,106 ---- return filename + " "; // with extra space } else { // user selected something from the menus ! exp_placeholder* currentPlaceholder = krExpander->placeholder( res & ~( ACTIVE_MASK | OTHER_MASK | LEFT_MASK | RIGHT_MASK | INDEPENDENT_MASK ) ); ! // if ( ¤tPlaceholder->expFunc == 0 ) { ! // KMessageBox::sorry( this, "BOFH Excuse #93:\nFeature not yet implemented" ); ! // return QString::null; ! // } ParameterDialog* parameterDialog = new ParameterDialog( currentPlaceholder, this ); QString panel, parameter = parameterDialog->getParameter(); *************** *** 117,121 **** else if ( res & INDEPENDENT_MASK ) panel = "_"; ! return "%" + panel + currentPlaceholder->expression + parameter + "% "; // with extra space } return QString::null; --- 117,121 ---- else if ( res & INDEPENDENT_MASK ) panel = "_"; ! return "%" + panel + currentPlaceholder->expression() + parameter + "% "; // with extra space } return QString::null; *************** *** 127,133 **** //////////////////////////////////////////////////////////////////////////////////////////// ! ParameterDialog::ParameterDialog( Expander::Placeholder* currentPlaceholder, QWidget *parent ) : KDialogBase( Plain, i18n("User Action Parameter Dialog"), Default | Ok, Ok, parent ) { _parameter.clear(); ! _parameterCount = currentPlaceholder->parameterCount; QVBoxLayout* layout = new QVBoxLayout( plainPage() ); --- 127,133 ---- //////////////////////////////////////////////////////////////////////////////////////////// ! ParameterDialog::ParameterDialog( exp_placeholder* currentPlaceholder, QWidget *parent ) : KDialogBase( Plain, i18n("User Action Parameter Dialog"), Default | Ok, Ok, parent ) { _parameter.clear(); ! _parameterCount = currentPlaceholder->parameterCount(); QVBoxLayout* layout = new QVBoxLayout( plainPage() ); *************** *** 138,159 **** for (int i = 0; i < _parameterCount; ++i ) { ! if ( currentPlaceholder->parameter[ i ].preset == "__placeholder" ) ! _parameter.append( new ParameterPlaceholder( ¤tPlaceholder->parameter[ i ], plainPage() ) ); ! else if ( currentPlaceholder->parameter[ i ].preset == "__yes" ) ! _parameter.append( new ParameterYes( ¤tPlaceholder->parameter[ i ], plainPage() ) ); ! else if ( currentPlaceholder->parameter[ i ].preset == "__no" ) ! _parameter.append( new ParameterNo( ¤tPlaceholder->parameter[ i ], plainPage() ) ); ! else if ( currentPlaceholder->parameter[ i ].preset == "__file" ) ! _parameter.append( new ParameterFile( ¤tPlaceholder->parameter[ i ], plainPage() ) ); ! else if ( currentPlaceholder->parameter[ i ].preset.find( "__choose" ) != -1 ) ! _parameter.append( new ParameterChoose( ¤tPlaceholder->parameter[ i ], plainPage() ) ); ! else if ( currentPlaceholder->parameter[ i ].preset == "__select" ) ! _parameter.append( new ParameterSelect( ¤tPlaceholder->parameter[ i ], plainPage() ) ); ! else if ( currentPlaceholder->parameter[ i ].preset == "__bookmark" ) ! _parameter.append( new ParameterBookmark( ¤tPlaceholder->parameter[ i ], plainPage() ) ); ! else if ( currentPlaceholder->parameter[ i ].preset == "__syncprofile" ) ! _parameter.append( new ParameterSyncprofile( ¤tPlaceholder->parameter[ i ], plainPage() ) ); else ! _parameter.append( new ParameterText( ¤tPlaceholder->parameter[ i ], plainPage() ) ); } --- 138,159 ---- for (int i = 0; i < _parameterCount; ++i ) { ! if ( currentPlaceholder->parameter( i )->preset() == "__placeholder" ) ! _parameter.append( new ParameterPlaceholder( currentPlaceholder->parameter( i ), plainPage() ) ); ! else if ( currentPlaceholder->parameter( i )->preset() == "__yes" ) ! _parameter.append( new ParameterYes( currentPlaceholder->parameter( i ), plainPage() ) ); ! else if ( currentPlaceholder->parameter( i )->preset() == "__no" ) ! _parameter.append( new ParameterNo( currentPlaceholder->parameter( i ), plainPage() ) ); ! else if ( currentPlaceholder->parameter( i )->preset() == "__file" ) ! _parameter.append( new ParameterFile( currentPlaceholder->parameter( i ), plainPage() ) ); ! else if ( currentPlaceholder->parameter( i )->preset().find( "__choose" ) != -1 ) ! _parameter.append( new ParameterChoose( currentPlaceholder->parameter( i ), plainPage() ) ); ! else if ( currentPlaceholder->parameter( i )->preset() == "__select" ) ! _parameter.append( new ParameterSelect( currentPlaceholder->parameter( i ), plainPage() ) ); ! else if ( currentPlaceholder->parameter( i )->preset() == "__bookmark" ) ! _parameter.append( new ParameterBookmark( currentPlaceholder->parameter( i ), plainPage() ) ); ! else if ( currentPlaceholder->parameter( i )->preset() == "__syncprofile" ) ! _parameter.append( new ParameterSyncprofile( currentPlaceholder->parameter( i ), plainPage() ) ); else ! _parameter.append( new ParameterText( currentPlaceholder->parameter( i ), plainPage() ) ); } *************** *** 208,219 **** ///////////// ParameterText ! ParameterText::ParameterText( Expander::Parameter* parameter, QWidget* parent ) : ParameterBase( parameter, parent ) { QVBoxLayout* layout = new QVBoxLayout( this ); layout->setAutoAdd( true ); layout->setSpacing( 6 ); ! new QLabel( parameter->description, this ); ! _lineEdit = new KLineEdit( parameter->preset, this ); ! _preset = parameter->preset; } --- 208,219 ---- ///////////// ParameterText ! ParameterText::ParameterText( exp_parameter* parameter, QWidget* parent ) : ParameterBase( parameter, parent ) { QVBoxLayout* layout = new QVBoxLayout( this ); layout->setAutoAdd( true ); layout->setSpacing( 6 ); ! new QLabel( parameter->description(), this ); ! _lineEdit = new KLineEdit( parameter->preset(), this ); ! _preset = parameter->preset(); } *************** *** 235,244 **** ///////////// ParameterPlaceholder ! ParameterPlaceholder::ParameterPlaceholder( Expander::Parameter* parameter, QWidget* parent ) : ParameterBase( parameter, parent ) { QVBoxLayout* layout = new QVBoxLayout( this ); layout->setAutoAdd( true ); layout->setSpacing( 6 ); ! new QLabel( parameter->description, this ); QHBox * hbox = new QHBox( this ); hbox->setSpacing( 6 ); --- 235,244 ---- ///////////// ParameterPlaceholder ! ParameterPlaceholder::ParameterPlaceholder( exp_parameter* parameter, QWidget* parent ) : ParameterBase( parameter, parent ) { QVBoxLayout* layout = new QVBoxLayout( this ); layout->setAutoAdd( true ); layout->setSpacing( 6 ); ! new QLabel( parameter->description(), this ); QHBox * hbox = new QHBox( this ); hbox->setSpacing( 6 ); *************** *** 272,281 **** ///////////// ParameterYes ! ParameterYes::ParameterYes( Expander::Parameter* parameter, QWidget* parent ) : ParameterBase( parameter, parent ) { QVBoxLayout* layout = new QVBoxLayout( this ); layout->setAutoAdd( true ); layout->setSpacing( 6 ); ! _checkBox = new QCheckBox( parameter->description, this ); _checkBox->setChecked( true ); } --- 272,281 ---- ///////////// ParameterYes ! ParameterYes::ParameterYes( exp_parameter* parameter, QWidget* parent ) : ParameterBase( parameter, parent ) { QVBoxLayout* layout = new QVBoxLayout( this ); layout->setAutoAdd( true ); layout->setSpacing( 6 ); ! _checkBox = new QCheckBox( parameter->description(), this ); _checkBox->setChecked( true ); } *************** *** 298,307 **** ///////////// ParameterNo ! ParameterNo::ParameterNo( Expander::Parameter* parameter, QWidget* parent ) : ParameterBase( parameter, parent ) { QVBoxLayout* layout = new QVBoxLayout( this ); layout->setAutoAdd( true ); layout->setSpacing( 6 ); ! _checkBox = new QCheckBox( parameter->description, this ); _checkBox->setChecked( false ); } --- 298,307 ---- ///////////// ParameterNo ! ParameterNo::ParameterNo( exp_parameter* parameter, QWidget* parent ) : ParameterBase( parameter, parent ) { QVBoxLayout* layout = new QVBoxLayout( this ); layout->setAutoAdd( true ); layout->setSpacing( 6 ); ! _checkBox = new QCheckBox( parameter->description(), this ); _checkBox->setChecked( false ); } *************** *** 324,333 **** ///////////// ParameterFile ! ParameterFile::ParameterFile( Expander::Parameter* parameter, QWidget* parent ) : ParameterBase( parameter, parent ) { QVBoxLayout* layout = new QVBoxLayout( this ); layout->setAutoAdd( true ); layout->setSpacing( 6 ); ! new QLabel( parameter->description, this ); QHBox * hbox = new QHBox( this ); hbox->setSpacing( 6 ); --- 324,333 ---- ///////////// ParameterFile ! ParameterFile::ParameterFile( exp_parameter* parameter, QWidget* parent ) : ParameterBase( parameter, parent ) { QVBoxLayout* layout = new QVBoxLayout( this ); layout->setAutoAdd( true ); layout->setSpacing( 6 ); ! new QLabel( parameter->description(), this ); QHBox * hbox = new QHBox( this ); hbox->setSpacing( 6 ); *************** *** 360,371 **** ///////////// ParameterChoose ! ParameterChoose::ParameterChoose( Expander::Parameter* parameter, QWidget* parent ) : ParameterBase( parameter, parent ) { QVBoxLayout* layout = new QVBoxLayout( this ); layout->setAutoAdd( true ); layout->setSpacing( 6 ); ! new QLabel( parameter->description, this ); _combobox = new KComboBox( this ); ! _combobox->insertStringList( QStringList::split( ";", parameter->preset.section(":", 1) ) ); } --- 360,371 ---- ///////////// ParameterChoose ! ParameterChoose::ParameterChoose( exp_parameter* parameter, QWidget* parent ) : ParameterBase( parameter, parent ) { QVBoxLayout* layout = new QVBoxLayout( this ); layout->setAutoAdd( true ); layout->setSpacing( 6 ); ! new QLabel( parameter->description(), this ); _combobox = new KComboBox( this ); ! _combobox->insertStringList( QStringList::split( ";", parameter->preset().section(":", 1) ) ); } *************** *** 384,393 **** ///////////// ParameterSelect ! ParameterSelect::ParameterSelect( Expander::Parameter* parameter, QWidget* parent ) : ParameterBase( parameter, parent ) { QVBoxLayout* layout = new QVBoxLayout( this ); layout->setAutoAdd( true ); layout->setSpacing( 6 ); ! new QLabel( parameter->description, this ); _combobox = new KComboBox( this ); _combobox->setEditable( true ); --- 384,393 ---- ///////////// ParameterSelect ! ParameterSelect::ParameterSelect( exp_parameter* parameter, QWidget* parent ) : ParameterBase( parameter, parent ) { QVBoxLayout* layout = new QVBoxLayout( this ); layout->setAutoAdd( true ); layout->setSpacing( 6 ); ! new QLabel( parameter->description(), this ); _combobox = new KComboBox( this ); _combobox->setEditable( true ); *************** *** 416,425 **** ///////////// ParameterBookmark ! ParameterBookmark::ParameterBookmark( Expander::Parameter* parameter, QWidget* parent ) : ParameterBase( parameter, parent ) { QVBoxLayout* layout = new QVBoxLayout( this ); layout->setAutoAdd( true ); layout->setSpacing( 6 ); ! new QLabel( parameter->description, this ); QHBox * hbox = new QHBox( this ); hbox->setSpacing( 6 ); --- 416,425 ---- ///////////// ParameterBookmark ! ParameterBookmark::ParameterBookmark( exp_parameter* parameter, QWidget* parent ) : ParameterBase( parameter, parent ) { QVBoxLayout* layout = new QVBoxLayout( this ); layout->setAutoAdd( true ); layout->setSpacing( 6 ); ! new QLabel( parameter->description(), this ); QHBox * hbox = new QHBox( this ); hbox->setSpacing( 6 ); *************** *** 458,467 **** ///////////// ParameterSyncprofile ! ParameterSyncprofile::ParameterSyncprofile( Expander::Parameter* parameter, QWidget* parent ) : ParameterBase( parameter, parent ) { QVBoxLayout* layout = new QVBoxLayout( this ); layout->setAutoAdd( true ); layout->setSpacing( 6 ); ! new QLabel( parameter->description, this ); _combobox = new KComboBox( this ); --- 458,467 ---- ///////////// ParameterSyncprofile ! ParameterSyncprofile::ParameterSyncprofile( exp_parameter* parameter, QWidget* parent ) : ParameterBase( parameter, parent ) { QVBoxLayout* layout = new QVBoxLayout( this ); layout->setAutoAdd( true ); layout->setSpacing( 6 ); ! new QLabel( parameter->description(), this ); _combobox = new KComboBox( this ); Index: addplaceholderpopup.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/GUI/addplaceholderpopup.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** addplaceholderpopup.h 18 Aug 2004 12:28:23 -0000 1.2 --- addplaceholderpopup.h 26 Sep 2004 21:57:56 -0000 1.3 *************** *** 49,53 **** * @return a parameter-string */ ! QString getParameter( Expander::Placeholder* currentPlaceholder ); private: --- 49,53 ---- * @return a parameter-string */ ! QString getParameter( exp_placeholder* currentPlaceholder ); private: *************** *** 66,70 **** class ParameterBase : public QWidget { public: ! inline ParameterBase( Expander::Parameter* parameter, QWidget* parent ) : QWidget( parent ) { _nessesary = parameter->nessesary; } /** * @return the text for the parameter --- 66,70 ---- class ParameterBase : public QWidget { public: ! inline ParameterBase( exp_parameter* parameter, QWidget* parent ) : QWidget( parent ) { _nessesary = parameter->nessesary(); } /** * @return the text for the parameter *************** *** 97,101 **** class ParameterText : public ParameterBase { public: ! ParameterText( Expander::Parameter* parameter, QWidget* parent ); QString text(); QString preset(); --- 97,101 ---- class ParameterText : public ParameterBase { public: ! ParameterText( exp_parameter* parameter, QWidget* parent ); QString text(); QString preset(); *************** *** 114,118 **** Q_OBJECT public: ! ParameterPlaceholder( Expander::Parameter* parameter, QWidget* parent ); QString text(); QString preset(); --- 114,118 ---- Q_OBJECT public: ! ParameterPlaceholder( exp_parameter* parameter, QWidget* parent ); QString text(); QString preset(); *************** *** 132,136 **** class ParameterYes : public ParameterBase { public: ! ParameterYes( Expander::Parameter* parameter, QWidget* parent ); QString text(); QString preset(); --- 132,136 ---- class ParameterYes : public ParameterBase { public: ! ParameterYes( exp_parameter* parameter, QWidget* parent ); QString text(); QString preset(); *************** *** 147,151 **** class ParameterNo : public ParameterBase { public: ! ParameterNo( Expander::Parameter* parameter, QWidget* parent ); QString text(); QString preset(); --- 147,151 ---- class ParameterNo : public ParameterBase { public: ! ParameterNo( exp_parameter* parameter, QWidget* parent ); QString text(); QString preset(); *************** *** 163,167 **** Q_OBJECT public: ! ParameterFile( Expander::Parameter* parameter, QWidget* parent ); QString text(); QString preset(); --- 163,167 ---- Q_OBJECT public: ! ParameterFile( exp_parameter* parameter, QWidget* parent ); QString text(); QString preset(); *************** *** 181,185 **** class ParameterChoose : public ParameterBase { public: ! ParameterChoose( Expander::Parameter* parameter, QWidget* parent ); QString text(); QString preset(); --- 181,185 ---- class ParameterChoose : public ParameterBase { public: ! ParameterChoose( exp_parameter* parameter, QWidget* parent ); QString text(); QString preset(); *************** *** 196,200 **** class ParameterSelect : public ParameterBase { public: ! ParameterSelect( Expander::Parameter* parameter, QWidget* parent ); QString text(); QString preset(); --- 196,200 ---- class ParameterSelect : public ParameterBase { public: ! ParameterSelect( exp_parameter* parameter, QWidget* parent ); QString text(); QString preset(); *************** *** 212,216 **** Q_OBJECT public: ! ParameterBookmark( Expander::Parameter* parameter, QWidget* parent ); QString text(); QString preset(); --- 212,216 ---- Q_OBJECT public: ! ParameterBookmark( exp_parameter* parameter, QWidget* parent ); QString text(); QString preset(); *************** *** 232,236 **** class ParameterSyncprofile : public ParameterBase { public: ! ParameterSyncprofile( Expander::Parameter* parameter, QWidget* parent ); QString text(); QString preset(); --- 232,236 ---- class ParameterSyncprofile : public ParameterBase { public: ! ParameterSyncprofile( exp_parameter* parameter, QWidget* parent ); QString text(); QString preset(); *************** *** 252,256 **** Q_OBJECT public: ! ParameterDialog( Expander::Placeholder* currentPlaceholder, QWidget *parent ); /** --- 252,256 ---- Q_OBJECT public: ! ParameterDialog( exp_placeholder* currentPlaceholder, QWidget *parent ); /** |
From: Shie E. <er...@us...> - 2004-09-25 22:12:27
|
Update of /cvsroot/krusader/krusader_kde3/krusader/BookMan In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9270/BookMan Modified Files: Makefile.am Added Files: krbookmark.cpp krbookmark.h krbookmarkbutton.cpp krbookmarkbutton.h Log Message: starting to work on bookman2 --- NEW FILE: krbookmarkbutton.cpp --- #include "krbookmarkbutton.h" #include "../krusader.h" #include <qpixmap.h> #include <kiconloader.h> #include <klocale.h> KrBookmarkButton::KrBookmarkButton(QWidget *parent): QToolButton(parent) { QPixmap icon = krLoader->loadIcon("bookmark", KIcon::Toolbar, 16); setFixedSize(icon.width() + 4, icon.height() + 4); setPixmap(icon); setTextLabel(i18n("BookMan II"), true); setPopupDelay(10); // 0.01 seconds press setAcceptDrops(false); } Index: Makefile.am =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/BookMan/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Makefile.am 2 Aug 2003 21:06:01 -0000 1.2 --- Makefile.am 25 Sep 2004 22:12:16 -0000 1.3 *************** *** 6,10 **** libBookMan_a_METASOURCES = AUTO ! libBookMan_a_SOURCES = kbookmarkmenu.cpp kbookmarkhandler.cpp bookmarksbutton.cpp addbookmarkform.ui addbookmarkdlg.cpp --- 6,12 ---- libBookMan_a_METASOURCES = AUTO ! libBookMan_a_SOURCES = kbookmarkmenu.cpp kbookmarkhandler.cpp \ ! bookmarksbutton.cpp addbookmarkform.ui addbookmarkdlg.cpp krbookmark.cpp \ ! krbookmarkbutton.cpp *************** *** 12,13 **** --- 14,16 ---- ####### kdevelop will overwrite this part!!! (end)############ + noinst_HEADERS = krbookmark.h krbookmarkbutton.h --- NEW FILE: krbookmark.cpp --- #include "krbookmark.h" #include <kactioncollection.h> KrBookmark::KrBookmark(QString name, KURL url, KActionCollection *parent): KAction(name, 0, 0, 0, parent), _url(url), _group(false) { } const KURL& KrBookmark::url() const { return _url; } bool KrBookmark::isGroup() const { return _group; } void KrBookmark::setURL(const KURL& url) { _url = url; } void KrBookmark::setGroup(bool group) { _group = group; } --- NEW FILE: krbookmark.h --- #ifndef KRBOOKMARK_H #define KRBOOKMARK_H #include <kaction.h> #include <kurl.h> class KActionCollection; class KrBookmark: public KAction { public: KrBookmark(QString name, KURL url, KActionCollection *parent); // use text() and setText() to change the name of the bookmark const KURL& url() const; bool isGroup() const; void setURL(const KURL& url); void setGroup(bool group); private: KURL _url; bool _group; }; #endif // KRBOOKMARK_H --- NEW FILE: krbookmarkbutton.h --- #ifndef KRBOOKMARK_BUTTON_H #define KRBOOKMARK_BUTTON_H #include <qtoolbutton.h> class KrBookmarkButton: public QToolButton { public: KrBookmarkButton(QWidget *parent); }; #endif // KRBOOKMARK_BUTTON_H |
From: Shie E. <er...@us...> - 2004-09-25 22:12:27
|
Update of /cvsroot/krusader/krusader_kde3/krusader/Panel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9270/Panel Modified Files: listpanel.cpp Log Message: starting to work on bookman2 Index: listpanel.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Panel/listpanel.cpp,v retrieving revision 1.90 retrieving revision 1.91 diff -C2 -d -r1.90 -r1.91 *** listpanel.cpp 24 Sep 2004 14:46:22 -0000 1.90 --- listpanel.cpp 25 Sep 2004 22:12:16 -0000 1.91 *************** *** 92,95 **** --- 92,101 ---- typedef QValueList<KServiceOffer> OfferList; + + //#define BOOKMAN2 + #ifdef BOOKMAN2 + #include "../BookMan/krbookmarkbutton.h" + #endif // BOOKMAN2 + ///////////////////////////////////////////////////// // The list panel constructor // *************** *** 134,138 **** "current location to the list, edit bookmarks " "or add subfolder to the list." ) ); ! QHBoxLayout *totalsLayout = new QHBoxLayout(this); totals = new KrSqueezedTextLabel( this ); --- 140,147 ---- "current location to the list, edit bookmarks " "or add subfolder to the list." ) ); ! #ifdef BOOKMAN2 ! KrBookmarkButton *bmb = new KrBookmarkButton(this); ! #endif // BOOKMAN2 ! QHBoxLayout *totalsLayout = new QHBoxLayout(this); totals = new KrSqueezedTextLabel( this ); *************** *** 237,241 **** // finish the layout ! layout->addMultiCellWidget( hbox, 0, 0, 0, 2 ); layout->addWidget( status, 1, 0 ); layout->addWidget( historyButton, 1, 1 ); --- 246,261 ---- // finish the layout ! #ifdef BOOKMAN2 ! layout->addMultiCellWidget( hbox, 0, 0, 0, 3 ); ! layout->addWidget( status, 1, 0 ); ! layout->addWidget( historyButton, 1, 1 ); ! layout->addWidget( bookmarksButton, 1, 2 ); ! layout->addWidget( bmb, 1, 3 ); ! layout->addMultiCellWidget( splt, 2, 2, 0, 3 ); ! layout->addMultiCellWidget( quickSearch, 3, 3, 0, 3 ); ! quickSearch->hide(); ! layout->addMultiCellLayout( totalsLayout, 4, 4, 0, 3 ); ! #else ! layout->addMultiCellWidget( hbox, 0, 0, 0, 2 ); layout->addWidget( status, 1, 0 ); layout->addWidget( historyButton, 1, 1 ); *************** *** 245,249 **** quickSearch->hide(); layout->addMultiCellLayout( totalsLayout, 4, 4, 0, 2 ); ! //filter = ALL; } --- 265,269 ---- quickSearch->hide(); layout->addMultiCellLayout( totalsLayout, 4, 4, 0, 2 ); ! #endif // BOOKMAN2 //filter = ALL; } |
From: Karai C. <ck...@us...> - 2004-09-25 12:56:32
|
Update of /cvsroot/krusader/krusader_kde3/krusader/Search In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12558/krusader_kde3/krusader/Search Modified Files: Makefile.am krsearchdialog.cpp krsearchdialog.h Removed Files: krsearchdialogbase.cpp krsearchdialogbase.h Log Message: ARCHITECTURE: unify krsearchdialog and krsearchdialogbase --- krsearchdialogbase.h DELETED --- --- krsearchdialogbase.cpp DELETED --- Index: krsearchdialog.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Search/krsearchdialog.cpp,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** krsearchdialog.cpp 25 Sep 2004 11:10:37 -0000 1.24 --- krsearchdialog.cpp 25 Sep 2004 12:56:21 -0000 1.25 *************** *** 29,36 **** ***************************************************************************/ - #define USERSFILE QString("/etc/passwd") - #define GROUPSFILE QString("/etc/group") - - #include "../krusader.h" #include "../VFS/vfs.h" --- 29,32 ---- *************** *** 38,43 **** #include "../Panel/listpanel.h" #include "../Panel/panelfunc.h" - #include "../resources.h" - #include "../defaults.h" #include "../Dialogs/krdialogs.h" #include "../VFS/krpermhandler.h" --- 34,37 ---- *************** *** 45,71 **** #include "krsearchmod.h" #include "krsearchdialog.h" #include <time.h> - #include <pwd.h> - #include <sys/types.h> #include <kglobal.h> - #include <qtabwidget.h> - #include <qstring.h> - #include <qradiobutton.h> - #include <qstringlist.h> #include <qregexp.h> - #include <qmultilineedit.h> - #include <qdatetime.h> - #include <qcheckbox.h> - #include <qfile.h> - #include <qtextstream.h> - #include <qlistview.h> #include <qfontmetrics.h> - #include <klineedit.h> #include <kmessagebox.h> - #include <kcombobox.h> - #include <kfiledialog.h> - #include <kdatetbl.h> #include <klocale.h> - #include <kdeversion.h> #include <kpopupmenu.h> #include <qcursor.h> --- 39,49 ---- #include "krsearchmod.h" #include "krsearchdialog.h" + #include <time.h> #include <kglobal.h> #include <qregexp.h> #include <qfontmetrics.h> #include <kmessagebox.h> #include <klocale.h> #include <kpopupmenu.h> #include <qcursor.h> *************** *** 73,97 **** // class starts here ///////////////////////////////////////// ! KrSearchDialog::KrSearchDialog(QWidget *parent, const char *name ) : ! KrSearchBase(parent,name), query(0), searcher(0) { ! prepareGUI(); ! show(); ! // disable the search action ... no 2 searchers ! ! krFind->setEnabled(false); ! generalFilter->searchFor->setFocus(); ! resultsList->setColumnAlignment(2, AlignRight); ! isSearching = closed = false; ! } ! KrSearchDialog::~KrSearchDialog(){ ! } ! void KrSearchDialog::prepareGUI() { ! //=======> to be moved ... ! resultsList->setSorting(1); // sort by location ! // ======================================== // fix the results list // => make the results font smaller --- 51,135 ---- // class starts here ///////////////////////////////////////// ! KrSearchDialog::KrSearchDialog( QWidget* parent, const char* name, bool modal, WFlags fl ) ! : QDialog( parent, name, modal, fl ), query(0), searcher(0) ! { ! setCaption( i18n( "Krusader::Search" ) ); ! ! QGridLayout* searchBaseLayout = new QGridLayout( this ); ! searchBaseLayout->setSpacing( 6 ); ! searchBaseLayout->setMargin( 11 ); ! // creating the dialog buttons ( Search, Stop, Close ) ! ! QHBoxLayout* buttonsLayout = new QHBoxLayout(); ! buttonsLayout->setSpacing( 6 ); ! buttonsLayout->setMargin( 0 ); ! QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); ! buttonsLayout->addItem( spacer ); ! mainSearchBtn = new QPushButton( this, "mainSearchBtn" ); ! mainSearchBtn->setText( i18n( "Search" ) ); ! mainSearchBtn->setDefault(true); ! buttonsLayout->addWidget( mainSearchBtn ); ! ! mainStopBtn = new QPushButton( this, "mainStopBtn" ); ! mainStopBtn->setEnabled( false ); ! mainStopBtn->setText( i18n( "Stop" ) ); ! buttonsLayout->addWidget( mainStopBtn ); ! ! mainCloseBtn = new QPushButton( this, "mainCloseBtn" ); ! mainCloseBtn->setText( i18n( "Close" ) ); ! buttonsLayout->addWidget( mainCloseBtn ); ! ! searchBaseLayout->addLayout( buttonsLayout, 1, 0 ); ! ! // creating the searcher tabs ! ! searcherTabs = new QTabWidget( this, "searcherTabs" ); + generalFilter = new GeneralFilter( searcherTabs, "generalFilter" ); + searcherTabs->insertTab( generalFilter, i18n( "&General" ) ); + advancedFilter = new AdvancedFilter( searcherTabs, "advancedFilter" ); + searcherTabs->insertTab( advancedFilter, i18n( "&Advanced" ) ); + + resultTab = new QWidget( searcherTabs, "resultTab" ); + resultLayout = new QGridLayout( resultTab ); + resultLayout->setSpacing( 6 ); + resultLayout->setMargin( 11 ); + + // creating the result tab + + QHBoxLayout* resultLabelLayout = new QHBoxLayout(); + resultLabelLayout->setSpacing( 6 ); + resultLabelLayout->setMargin( 0 ); + + foundLabel = new QLabel( resultTab, "foundLabel" ); + foundLabel->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, foundLabel->sizePolicy().hasHeightForWidth() ) ); + foundLabel->setFrameShape( QLabel::StyledPanel ); + foundLabel->setFrameShadow( QLabel::Sunken ); + foundLabel->setText( i18n( "Found 0 matches." ) ); + resultLabelLayout->addWidget( foundLabel ); + + searchingLabel = new KSqueezedTextLabel( resultTab, "searchingLabel" ); + searchingLabel->setFrameShape( QLabel::StyledPanel ); + searchingLabel->setFrameShadow( QLabel::Sunken ); + searchingLabel->setText( "" ); + resultLabelLayout->addWidget( searchingLabel ); + + resultLayout->addLayout( resultLabelLayout, 1, 0 ); + + // creating the result list view + + resultsList = new QListView( resultTab, "resultsList" ); + resultsList->addColumn( i18n( "Name" ) ); + resultsList->addColumn( i18n( "Location" ) ); + resultsList->addColumn( i18n( "Size" ) ); + resultsList->addColumn( i18n( "Date" ) ); + resultsList->addColumn( i18n( "Permissions" ) ); + + resultsList->setSorting(1); // sort by location + // fix the results list // => make the results font smaller *************** *** 103,127 **** for (int i=0; i<5; ++i) // don't let it resize automatically resultsList->setColumnWidthMode(i, QListView::Manual); int i=QFontMetrics(resultsList->font()).width("W"); ! 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); // the path in the active panel should be the default search location QString path = krApp->mainView->activePanel->getPath(); generalFilter->searchInEdit->setText(path); ! // fill the saved searches list ! refreshSavedSearches(); ! } ! ! void KrSearchDialog::refreshSavedSearches() { } ! void KrSearchDialog::closeDialog() { // stop the search if it's on-going if (searcher!=0) { --- 141,191 ---- for (int i=0; i<5; ++i) // don't let it resize automatically resultsList->setColumnWidthMode(i, QListView::Manual); + int i=QFontMetrics(resultsList->font()).width("W"); ! 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" ) ); + searchBaseLayout->addWidget( searcherTabs, 0, 0 ); + + // signals and slots connections + + connect( mainSearchBtn, SIGNAL( clicked() ), this, SLOT( startSearch() ) ); + connect( mainStopBtn, SIGNAL( clicked() ), this, SLOT( stopSearch() ) ); + connect( resultsList, SIGNAL( returnPressed(QListViewItem*) ), this, SLOT( resultClicked(QListViewItem*) ) ); + connect( resultsList, SIGNAL( doubleClicked(QListViewItem*) ), this, SLOT( resultClicked(QListViewItem*) ) ); + connect( resultsList, SIGNAL( rightButtonClicked(QListViewItem*,const QPoint&,int) ), this, SLOT( rightClickMenu(QListViewItem*, const QPoint&, int) ) ); + connect( mainCloseBtn, SIGNAL( clicked() ), this, SLOT( closeDialog() ) ); + + // tab order + + setTabOrder( mainSearchBtn, mainCloseBtn ); + setTabOrder( mainCloseBtn, mainStopBtn ); + setTabOrder( mainStopBtn, searcherTabs ); + setTabOrder( searcherTabs, resultsList ); + // the path in the active panel should be the default search location QString path = krApp->mainView->activePanel->getPath(); generalFilter->searchInEdit->setText(path); + + show(); + + // disable the search action ... no 2 searchers ! + krFind->setEnabled(false); + generalFilter->searchFor->setFocus(); ! isSearching = closed = false; } ! void KrSearchDialog::closeDialog() ! { // stop the search if it's on-going if (searcher!=0) { *************** *** 137,141 **** void KrSearchDialog::reject() { closeDialog(); ! KrSearchBase::reject(); } --- 201,205 ---- void KrSearchDialog::reject() { closeDialog(); ! QDialog::reject(); } *************** *** 158,162 **** if( !generalFilter->fillQuery( query ) ) { ! TabWidget2->setCurrentPage(0); // set page to general return false; } --- 222,226 ---- if( !generalFilter->fillQuery( query ) ) { ! searcherTabs->setCurrentPage(0); // set page to general return false; } *************** *** 164,168 **** if( !advancedFilter->fillQuery( query ) ) { ! TabWidget2->setCurrentPage(1); // set page to general return false; } --- 228,232 ---- if( !advancedFilter->fillQuery( query ) ) { ! searcherTabs->setCurrentPage(1); // set page to general return false; } *************** *** 191,195 **** resultsList->clear(); searchingLabel->setText(""); foundLabel->setText(i18n("Found 0 matches.")); ! TabWidget2->setCurrentPage(2); // show the results page qApp->processEvents(); --- 255,259 ---- resultsList->clear(); searchingLabel->setText(""); foundLabel->setText(i18n("Found 0 matches.")); ! searcherTabs->setCurrentPage(2); // show the results page qApp->processEvents(); *************** *** 233,245 **** } - void KrSearchDialog::saveSearch() { - } - - void KrSearchDialog::loadSearch() { - } - - void KrSearchDialog::loadSearch(QListViewItem *) { - } - void KrSearchDialog::closeEvent(QCloseEvent *e) { /* if searching is in progress we must not close the window */ --- 297,300 ---- Index: krsearchdialog.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Search/krsearchdialog.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** krsearchdialog.h 25 Sep 2004 11:10:37 -0000 1.9 --- krsearchdialog.h 25 Sep 2004 12:56:21 -0000 1.10 *************** *** 34,58 **** #define KRSEARCHDIALOG_H ! #include <qwidget.h> ! #include <qstringlist.h> ! #include "krsearchdialogbase.h" #include "krquery.h" #include "krsearchmod.h" #include <sys/types.h> #include <time.h> ! ! class KrSearchDialog : public KrSearchBase { Q_OBJECT public: ! KrSearchDialog(QWidget *parent=0, const char *name=0); ! ~KrSearchDialog(); ! ! void prepareGUI(); ! public slots: - void saveSearch(); - void loadSearch(); - void loadSearch(QListViewItem *); void startSearch(); void stopSearch(); --- 34,60 ---- #define KRSEARCHDIALOG_H ! #include "generalfilter.h" ! #include "advancedfilter.h" #include "krquery.h" #include "krsearchmod.h" + + #include <qwidget.h> + #include <ksqueezedtextlabel.h> + #include <qstringlist.h> #include <sys/types.h> #include <time.h> + #include <qstring.h> + #include <qtabwidget.h> + #include <qlistview.h> + #include <qstringlist.h> ! class KrSearchDialog : public QDialog { Q_OBJECT public: ! KrSearchDialog(QWidget* parent = 0, const char* name = 0, bool modal = false, WFlags fl = 0 ); ! ! void prepareGUI(); ! public slots: void startSearch(); void stopSearch(); *************** *** 69,73 **** private: - void refreshSavedSearches(); bool gui2query(); void editCurrent(); --- 71,74 ---- *************** *** 75,78 **** --- 76,95 ---- private: + GeneralFilter *generalFilter; + AdvancedFilter *advancedFilter; + + QPushButton* mainHelpBtn; + QPushButton* mainSearchBtn; + QPushButton* mainStopBtn; + QPushButton* mainCloseBtn; + + QTabWidget* searcherTabs; + QWidget* resultTab; + QGridLayout* resultLayout; + QLabel* foundLabel; + KSqueezedTextLabel* searchingLabel; + + QListView* resultsList; + KRQuery *query; KRSearchMod *searcher; Index: Makefile.am =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Search/Makefile.am,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Makefile.am 25 Sep 2004 11:10:37 -0000 1.3 --- Makefile.am 25 Sep 2004 12:56:21 -0000 1.4 *************** *** 6,10 **** libSearch_a_METASOURCES = AUTO ! libSearch_a_SOURCES = krsearchmod.cpp krsearchdialog.cpp krsearchdialogbase.cpp krquery.cpp generalfilter.cpp advancedfilter.cpp --- 6,10 ---- libSearch_a_METASOURCES = AUTO ! libSearch_a_SOURCES = krsearchmod.cpp krsearchdialog.cpp krquery.cpp generalfilter.cpp advancedfilter.cpp *************** *** 12,14 **** ####### kdevelop will overwrite this part!!! (end)############ ! noinst_HEADERS = advancedfilter.h --- 12,14 ---- ####### kdevelop will overwrite this part!!! (end)############ ! noinst_HEADERS = advancedfilter.h |
From: Karai C. <ck...@us...> - 2004-09-25 11:10:49
|
Update of /cvsroot/krusader/krusader_kde3/krusader/Search In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22637/krusader_kde3/krusader/Search Modified Files: Makefile.am generalfilter.h krsearchdialog.cpp krsearchdialog.h krsearchdialogbase.cpp krsearchdialogbase.h Added Files: advancedfilter.cpp advancedfilter.h Log Message: ARCHITECTURE: separating the advanced filter from the searcher Index: krsearchdialogbase.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Search/krsearchdialogbase.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** krsearchdialogbase.h 24 Sep 2004 20:40:04 -0000 1.5 --- krsearchdialogbase.h 25 Sep 2004 11:10:37 -0000 1.6 *************** *** 11,14 **** --- 11,15 ---- #include "generalfilter.h" + #include "advancedfilter.h" #include <qvariant.h> *************** *** 46,50 **** ~KrSearchBase(); ! GeneralFilter *generalFilter; QPushButton* mainHelpBtn; QPushButton* mainSearchBtn; --- 47,53 ---- ~KrSearchBase(); ! GeneralFilter *generalFilter; ! AdvancedFilter *advancedFilter; ! QPushButton* mainHelpBtn; QPushButton* mainSearchBtn; *************** *** 52,99 **** QPushButton* mainCloseBtn; QTabWidget* TabWidget2; - QWidget* tab_2; - QGroupBox* GroupBox29; - QCheckBox* smallerThanEnabled; - QLineEdit* smallerThanAmount; - KComboBox* smallerThanType; - QCheckBox* biggerThanEnabled; - KComboBox* biggerThanType; - QLineEdit* biggerThanAmount; - QButtonGroup* ButtonGroup2; - QLineEdit* modifiedBetweenData1; - QToolButton* modifiedBetweenBtn1; - QLabel* TextLabel2_2; - QLineEdit* modifiedBetweenData2; - QToolButton* modifiedBetweenBtn2; - QToolButton* notModifiedAfterBtn; - QLineEdit* notModifiedAfterData; - QRadioButton* modifiedInTheLastEnabled; - QLineEdit* modifiedInTheLastData; - QComboBox* modifiedInTheLastType; - QComboBox* notModifiedInTheLastType; - QLineEdit* notModifiedInTheLastData; - QLabel* TextLabel3_2; - QRadioButton* notModifiedAfterEnabled; - QLabel* modifiedInTheLast; - QRadioButton* modifiedBetweenEnabled; - QGroupBox* GroupBox181; - QCheckBox* belongsToUserEnabled; - QComboBox* belongsToUserData; - QCheckBox* belongsToGroupEnabled; - QComboBox* belongsToGroupData; - QGroupBox* GroupBox206; - QComboBox* ownerW; - QComboBox* ownerR; - QComboBox* ownerX; - QCheckBox* permissionsEnabled; - QGroupBox* GroupBox206_2; - QComboBox* groupW; - QComboBox* groupR; - QComboBox* groupX; - QGroupBox* GroupBox206_3; - QComboBox* allW; - QComboBox* allX; - QComboBox* allR; - QLabel* TextLabel4; QWidget* tab_3; QLabel* foundLabel; --- 55,58 ---- *************** *** 103,109 **** public slots: virtual void closeDialog(); - virtual void modifiedBetweenSetDate1(); - virtual void modifiedBetweenSetDate2(); - virtual void notModifiedAfterSetDate(); virtual void resultClicked(QListViewItem*); virtual void rightClickMenu(QListViewItem*, const QPoint&, int); --- 62,65 ---- *************** *** 114,120 **** QGridLayout* KrSearchBaseLayout; QHBoxLayout* Layout9; - QGridLayout* tabLayout_2; - QGridLayout* ButtonGroup2Layout; - QGridLayout* GroupBox181Layout; QHBoxLayout* Layout10; QGridLayout* tabLayout_3; --- 70,73 ---- Index: krsearchdialogbase.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Search/krsearchdialogbase.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** krsearchdialogbase.cpp 24 Sep 2004 20:40:04 -0000 1.12 --- krsearchdialogbase.cpp 25 Sep 2004 11:10:37 -0000 1.13 *************** *** 122,415 **** TabWidget2->insertTab( generalFilter, i18n( "&General" ) ); ! tab_2 = new QWidget( TabWidget2, "tab_2" ); ! tabLayout_2 = new QGridLayout( tab_2 ); ! tabLayout_2->setSpacing( 6 ); ! tabLayout_2->setMargin( 11 ); ! ! GroupBox29 = new QGroupBox( tab_2, "GroupBox29" ); ! GroupBox29->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)1, GroupBox29->sizePolicy().hasHeightForWidth() ) ); ! GroupBox29->setTitle( i18n( "Size" ) ); ! ! smallerThanEnabled = new QCheckBox( GroupBox29, "smallerThanEnabled" ); ! smallerThanEnabled->setGeometry( QRect( 270, 20, 100, 21 ) ); ! smallerThanEnabled->setText( i18n( "&Smaller than" ) ); ! ! smallerThanAmount = new QLineEdit( GroupBox29, "smallerThanAmount" ); ! smallerThanAmount->setEnabled( FALSE ); ! smallerThanAmount->setGeometry( QRect( 370, 20, 71, 22 ) ); ! smallerThanAmount->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, smallerThanAmount->sizePolicy().hasHeightForWidth() ) ); ! ! smallerThanType = new KComboBox( FALSE, GroupBox29, "smallerThanType" ); ! smallerThanType->insertItem( i18n( "Bytes" ) ); ! smallerThanType->insertItem( i18n( "KB" ) ); ! smallerThanType->insertItem( i18n( "MB" ) ); ! smallerThanType->setEnabled( FALSE ); ! smallerThanType->setGeometry( QRect( 450, 20, 70, 21 ) ); ! ! biggerThanEnabled = new QCheckBox( GroupBox29, "biggerThanEnabled" ); ! biggerThanEnabled->setGeometry( QRect( 10, 20, 100, 21 ) ); ! biggerThanEnabled->setText( i18n( "&Bigger than" ) ); ! ! biggerThanType = new KComboBox( FALSE, GroupBox29, "biggerThanType" ); ! biggerThanType->insertItem( i18n( "Bytes" ) ); ! biggerThanType->insertItem( i18n( "KB" ) ); ! biggerThanType->insertItem( i18n( "MB" ) ); ! biggerThanType->setEnabled( FALSE ); ! biggerThanType->setGeometry( QRect( 190, 20, 70, 21 ) ); ! ! biggerThanAmount = new QLineEdit( GroupBox29, "biggerThanAmount" ); ! biggerThanAmount->setEnabled( FALSE ); ! biggerThanAmount->setGeometry( QRect( 110, 20, 71, 22 ) ); ! biggerThanAmount->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, biggerThanAmount->sizePolicy().hasHeightForWidth() ) ); ! ! tabLayout_2->addWidget( GroupBox29, 0, 0 ); ! ! ButtonGroup2 = new QButtonGroup( tab_2, "ButtonGroup2" ); ! ButtonGroup2->setTitle( i18n( "Date" ) ); ! ButtonGroup2->setExclusive( TRUE ); ! ButtonGroup2->setColumnLayout(0, Qt::Vertical ); ! ButtonGroup2->layout()->setSpacing( 0 ); ! ButtonGroup2->layout()->setMargin( 0 ); ! ButtonGroup2Layout = new QGridLayout( ButtonGroup2->layout() ); ! ButtonGroup2Layout->setAlignment( Qt::AlignTop ); ! ButtonGroup2Layout->setSpacing( 6 ); ! ButtonGroup2Layout->setMargin( 11 ); ! ! modifiedBetweenData1 = new QLineEdit( ButtonGroup2, "modifiedBetweenData1" ); ! modifiedBetweenData1->setEnabled( FALSE ); ! modifiedBetweenData1->setText( "" ); ! ! ButtonGroup2Layout->addMultiCellWidget( modifiedBetweenData1, 0, 0, 2, 3 ); ! ! modifiedBetweenBtn1 = new QToolButton( ButtonGroup2, "modifiedBetweenBtn1" ); ! modifiedBetweenBtn1->setEnabled( FALSE ); ! modifiedBetweenBtn1->setText( "" ); ! modifiedBetweenBtn1->setPixmap( image1 ); ! ! ButtonGroup2Layout->addWidget( modifiedBetweenBtn1, 0, 4 ); ! ! TextLabel2_2 = new QLabel( ButtonGroup2, "TextLabel2_2" ); ! TextLabel2_2->setText( i18n( "an&d" ) ); ! ! ButtonGroup2Layout->addWidget( TextLabel2_2, 0, 5 ); ! ! modifiedBetweenData2 = new QLineEdit( ButtonGroup2, "modifiedBetweenData2" ); ! modifiedBetweenData2->setEnabled( FALSE ); ! modifiedBetweenData2->setText( "" ); ! TextLabel2_2->setBuddy(modifiedBetweenData2); ! ! ButtonGroup2Layout->addWidget( modifiedBetweenData2, 0, 6 ); ! ! modifiedBetweenBtn2 = new QToolButton( ButtonGroup2, "modifiedBetweenBtn2" ); ! modifiedBetweenBtn2->setEnabled( FALSE ); ! modifiedBetweenBtn2->setText( "" ); ! modifiedBetweenBtn2->setPixmap( image1 ); ! ! ButtonGroup2Layout->addWidget( modifiedBetweenBtn2, 0, 7 ); ! ! notModifiedAfterBtn = new QToolButton( ButtonGroup2, "notModifiedAfterBtn" ); ! notModifiedAfterBtn->setEnabled( FALSE ); ! notModifiedAfterBtn->setText( "" ); ! notModifiedAfterBtn->setPixmap( image1 ); ! ! ButtonGroup2Layout->addWidget( notModifiedAfterBtn, 1, 4 ); ! ! notModifiedAfterData = new QLineEdit( ButtonGroup2, "notModifiedAfterData" ); ! notModifiedAfterData->setEnabled( FALSE ); ! notModifiedAfterData->setText( "" ); ! ! ButtonGroup2Layout->addMultiCellWidget( notModifiedAfterData, 1, 1, 2, 3 ); ! ! modifiedInTheLastEnabled = new QRadioButton( ButtonGroup2, "modifiedInTheLastEnabled" ); ! modifiedInTheLastEnabled->setText( i18n("Mod&ified in the last") ); ! ButtonGroup2->insert( modifiedInTheLastEnabled, 0 ); ! ! ButtonGroup2Layout->addWidget( modifiedInTheLastEnabled, 2, 0 ); ! ! modifiedInTheLastData = new QLineEdit( ButtonGroup2, "modifiedInTheLastData" ); ! modifiedInTheLastData->setEnabled( FALSE ); ! modifiedInTheLastData->setText( "" ); ! ! ButtonGroup2Layout->addWidget( modifiedInTheLastData, 2, 2 ); ! ! modifiedInTheLastType = new QComboBox( FALSE, ButtonGroup2, "modifiedInTheLastType" ); ! modifiedInTheLastType->insertItem( i18n( "days" ) ); ! modifiedInTheLastType->insertItem( i18n( "weeks" ) ); ! modifiedInTheLastType->insertItem( i18n( "months" ) ); ! modifiedInTheLastType->insertItem( i18n( "years" ) ); ! modifiedInTheLastType->setEnabled( FALSE ); ! ! ButtonGroup2Layout->addMultiCellWidget( modifiedInTheLastType, 2, 2, 3, 4 ); ! ! notModifiedInTheLastType = new QComboBox( FALSE, ButtonGroup2, "notModifiedInTheLastType" ); ! notModifiedInTheLastType->insertItem( i18n( "days" ) ); ! notModifiedInTheLastType->insertItem( i18n( "weeks" ) ); ! notModifiedInTheLastType->insertItem( i18n( "months" ) ); ! notModifiedInTheLastType->insertItem( i18n( "years" ) ); ! notModifiedInTheLastType->setEnabled( FALSE ); ! ! ButtonGroup2Layout->addMultiCellWidget( notModifiedInTheLastType, 3, 3, 3, 4 ); ! ! notModifiedInTheLastData = new QLineEdit( ButtonGroup2, "notModifiedInTheLastData" ); ! notModifiedInTheLastData->setEnabled( FALSE ); ! notModifiedInTheLastData->setText( "" ); ! ! ButtonGroup2Layout->addWidget( notModifiedInTheLastData, 3, 2 ); ! ! TextLabel3_2 = new QLabel( ButtonGroup2, "TextLabel3_2" ); ! TextLabel3_2->setText( i18n( "No&t modified in the last" ) ); ! TextLabel3_2->setBuddy(notModifiedInTheLastData); ! ! ButtonGroup2Layout->addWidget( TextLabel3_2, 3, 0 ); ! ! notModifiedAfterEnabled = new QRadioButton( ButtonGroup2, "notModifiedAfterEnabled" ); ! notModifiedAfterEnabled->setText( i18n( "&Not modified after" ) ); ! ButtonGroup2->insert( notModifiedAfterEnabled, 0 ); ! ! ButtonGroup2Layout->addMultiCellWidget( notModifiedAfterEnabled, 1, 1, 0, 1 ); ! ! modifiedInTheLast = new QLabel( ButtonGroup2, "modifiedInTheLast" ); ! modifiedInTheLast->setText( i18n( "" ) ); ! ! ButtonGroup2Layout->addWidget( modifiedInTheLast, 2, 1 ); ! ! modifiedBetweenEnabled = new QRadioButton( ButtonGroup2, "modifiedBetweenEnabled" ); ! modifiedBetweenEnabled->setText( i18n( "&Modified between" ) ); ! modifiedInTheLast->setBuddy(modifiedBetweenEnabled); ! ButtonGroup2->insert( modifiedBetweenEnabled, 0 ); ! ! ButtonGroup2Layout->addMultiCellWidget( modifiedBetweenEnabled, 0, 0, 0, 1 ); ! ! tabLayout_2->addWidget( ButtonGroup2, 1, 0 ); ! ! GroupBox181 = new QGroupBox( tab_2, "GroupBox181" ); ! GroupBox181->setTitle( i18n( "Ownership" ) ); ! GroupBox181->setColumnLayout(0, Qt::Vertical ); ! GroupBox181->layout()->setSpacing( 0 ); ! GroupBox181->layout()->setMargin( 0 ); ! GroupBox181Layout = new QGridLayout( GroupBox181->layout() ); ! GroupBox181Layout->setAlignment( Qt::AlignTop ); ! GroupBox181Layout->setSpacing( 6 ); ! GroupBox181Layout->setMargin( 11 ); ! ! Layout10 = new QHBoxLayout; ! Layout10->setSpacing( 6 ); ! Layout10->setMargin( 0 ); ! ! belongsToUserEnabled = new QCheckBox( GroupBox181, "belongsToUserEnabled" ); ! belongsToUserEnabled->setText( i18n( "Belongs to &user" ) ); ! Layout10->addWidget( belongsToUserEnabled ); ! ! belongsToUserData = new QComboBox( FALSE, GroupBox181, "belongsToUserData" ); ! belongsToUserData->setEnabled( FALSE ); ! belongsToUserData->setEditable( FALSE ); ! Layout10->addWidget( belongsToUserData ); ! ! belongsToGroupEnabled = new QCheckBox( GroupBox181, "belongsToGroupEnabled" ); ! belongsToGroupEnabled->setText( i18n( "Belongs to gr&oup" ) ); ! Layout10->addWidget( belongsToGroupEnabled ); ! ! belongsToGroupData = new QComboBox( FALSE, GroupBox181, "belongsToGroupData" ); ! belongsToGroupData->setEnabled( FALSE ); ! belongsToGroupData->setEditable( FALSE ); ! Layout10->addWidget( belongsToGroupData ); ! ! GroupBox181Layout->addMultiCellLayout( Layout10, 0, 0, 0, 3 ); ! ! GroupBox206 = new QGroupBox( GroupBox181, "GroupBox206" ); ! GroupBox206->setTitle( i18n( "O&wner" ) ); ! ! ownerW = new QComboBox( FALSE, GroupBox206, "ownerW" ); ! ownerW->insertItem( i18n( "?" ) ); ! ownerW->insertItem( i18n( "w" ) ); ! ownerW->insertItem( i18n( "-" ) ); ! ownerW->setEnabled( FALSE ); ! ownerW->setGeometry( QRect( 50, 20, 40, 22 ) ); ! ! ownerR = new QComboBox( FALSE, GroupBox206, "ownerR" ); ! ownerR->insertItem( i18n( "?" ) ); ! ownerR->insertItem( i18n( "r" ) ); ! ownerR->insertItem( i18n( "-" ) ); ! ownerR->setEnabled( FALSE ); ! ownerR->setGeometry( QRect( 10, 20, 40, 22 ) ); ! ! ownerX = new QComboBox( FALSE, GroupBox206, "ownerX" ); ! ownerX->insertItem( i18n( "?" ) ); ! ownerX->insertItem( i18n( "x" ) ); ! ownerX->insertItem( i18n( "-" ) ); ! ownerX->setEnabled( FALSE ); ! ownerX->setGeometry( QRect( 90, 20, 40, 22 ) ); ! ! GroupBox181Layout->addWidget( GroupBox206, 1, 1 ); ! ! permissionsEnabled = new QCheckBox( GroupBox181, "permissionsEnabled" ); ! permissionsEnabled->setText( i18n( "P&ermissions" ) ); ! ! GroupBox181Layout->addWidget( permissionsEnabled, 1, 0 ); ! ! GroupBox206_2 = new QGroupBox( GroupBox181, "GroupBox206_2" ); ! GroupBox206_2->setTitle( i18n( "Grou&p" ) ); ! ! groupW = new QComboBox( FALSE, GroupBox206_2, "groupW" ); ! groupW->insertItem( i18n( "?" ) ); ! groupW->insertItem( i18n( "w" ) ); ! groupW->insertItem( i18n( "-" ) ); ! groupW->setEnabled( FALSE ); ! groupW->setGeometry( QRect( 50, 20, 40, 22 ) ); ! ! groupR = new QComboBox( FALSE, GroupBox206_2, "groupR" ); ! groupR->insertItem( i18n( "?" ) ); ! groupR->insertItem( i18n( "r" ) ); ! groupR->insertItem( i18n( "-" ) ); ! groupR->setEnabled( FALSE ); ! groupR->setGeometry( QRect( 10, 20, 40, 22 ) ); ! ! groupX = new QComboBox( FALSE, GroupBox206_2, "groupX" ); ! groupX->insertItem( i18n( "?" ) ); ! groupX->insertItem( i18n( "x" ) ); ! groupX->insertItem( i18n( "-" ) ); ! groupX->setEnabled( FALSE ); ! groupX->setGeometry( QRect( 90, 20, 40, 22 ) ); ! ! GroupBox181Layout->addWidget( GroupBox206_2, 1, 2 ); ! ! GroupBox206_3 = new QGroupBox( GroupBox181, "GroupBox206_3" ); ! GroupBox206_3->setTitle( i18n( "A&ll" ) ); ! ! allW = new QComboBox( FALSE, GroupBox206_3, "allW" ); ! allW->insertItem( i18n( "?" ) ); ! allW->insertItem( i18n( "w" ) ); ! allW->insertItem( i18n( "-" ) ); ! allW->setEnabled( FALSE ); ! allW->setGeometry( QRect( 50, 20, 40, 22 ) ); ! ! allX = new QComboBox( FALSE, GroupBox206_3, "allX" ); ! allX->insertItem( i18n( "?" ) ); ! allX->insertItem( i18n( "x" ) ); ! allX->insertItem( i18n( "-" ) ); ! allX->setEnabled( FALSE ); ! allX->setGeometry( QRect( 90, 20, 40, 22 ) ); ! ! allR = new QComboBox( FALSE, GroupBox206_3, "allR" ); ! allR->insertItem( i18n( "?" ) ); ! allR->insertItem( i18n( "r" ) ); ! allR->insertItem( i18n( "-" ) ); ! allR->setEnabled( FALSE ); ! allR->setGeometry( QRect( 10, 20, 40, 22 ) ); ! ! GroupBox181Layout->addWidget( GroupBox206_3, 1, 3 ); ! ! TextLabel4 = new QLabel( GroupBox181, "TextLabel4" ); ! QFont TextLabel4_font( TextLabel4->font() ); ! TextLabel4_font.setFamily( "adobe-helvetica" ); ! TextLabel4_font.setItalic( TRUE ); ! TextLabel4->setFont( TextLabel4_font ); ! TextLabel4->setText( i18n( "Note: a '?' is a wildcard" ) ); ! ! GroupBox181Layout->addMultiCellWidget( TextLabel4, 2, 2, 0, 3, Qt::AlignRight ); ! ! tabLayout_2->addWidget( GroupBox181, 2, 0 ); ! TabWidget2->insertTab( tab_2, i18n( "&Advanced" ) ); ! tab_3 = new QWidget( TabWidget2, "tab_3" ); tabLayout_3 = new QGridLayout( tab_3 ); --- 122,128 ---- TabWidget2->insertTab( generalFilter, i18n( "&General" ) ); ! advancedFilter = new AdvancedFilter( TabWidget2, "advancedFilter" ); ! TabWidget2->insertTab( advancedFilter, i18n( "&Advanced" ) ); ! tab_3 = new QWidget( TabWidget2, "tab_3" ); tabLayout_3 = new QGridLayout( tab_3 ); *************** *** 452,523 **** connect( mainSearchBtn, SIGNAL( clicked() ), this, SLOT( startSearch() ) ); connect( mainStopBtn, SIGNAL( clicked() ), this, SLOT( stopSearch() ) ); - connect( biggerThanEnabled, SIGNAL( toggled(bool) ), biggerThanAmount, SLOT( setEnabled(bool) ) ); - connect( biggerThanEnabled, SIGNAL( toggled(bool) ), biggerThanType, SLOT( setEnabled(bool) ) ); - connect( smallerThanEnabled, SIGNAL( toggled(bool) ), smallerThanAmount, SLOT( setEnabled(bool) ) ); - connect( smallerThanEnabled, SIGNAL( toggled(bool) ), smallerThanType, SLOT( setEnabled(bool) ) ); - connect( modifiedBetweenEnabled, SIGNAL( toggled(bool) ), modifiedBetweenData1, SLOT( setEnabled(bool) ) ); - connect( modifiedBetweenEnabled, SIGNAL( toggled(bool) ), modifiedBetweenBtn1, SLOT( setEnabled(bool) ) ); - connect( modifiedBetweenEnabled, SIGNAL( toggled(bool) ), modifiedBetweenData2, SLOT( setEnabled(bool) ) ); - connect( modifiedBetweenEnabled, SIGNAL( toggled(bool) ), modifiedBetweenBtn2, SLOT( setEnabled(bool) ) ); - connect( notModifiedAfterEnabled, SIGNAL( toggled(bool) ), notModifiedAfterData, SLOT( setEnabled(bool) ) ); - connect( notModifiedAfterEnabled, SIGNAL( toggled(bool) ), notModifiedAfterBtn, SLOT( setEnabled(bool) ) ); - connect( modifiedInTheLastEnabled, SIGNAL( toggled(bool) ), modifiedInTheLastData, SLOT( setEnabled(bool) ) ); - connect( modifiedInTheLastEnabled, SIGNAL( toggled(bool) ), modifiedInTheLastType, SLOT( setEnabled(bool) ) ); - connect( modifiedInTheLastEnabled, SIGNAL( toggled(bool) ), notModifiedInTheLastData, SLOT( setEnabled(bool) ) ); - connect( modifiedInTheLastEnabled, SIGNAL( toggled(bool) ), notModifiedInTheLastType, SLOT( setEnabled(bool) ) ); - connect( belongsToUserEnabled, SIGNAL( toggled(bool) ), belongsToUserData, SLOT( setEnabled(bool) ) ); - connect( belongsToGroupEnabled, SIGNAL( toggled(bool) ), belongsToGroupData, SLOT( setEnabled(bool) ) ); - connect( permissionsEnabled, SIGNAL( toggled(bool) ), ownerR, SLOT( setEnabled(bool) ) ); - connect( permissionsEnabled, SIGNAL( toggled(bool) ), ownerW, SLOT( setEnabled(bool) ) ); - connect( permissionsEnabled, SIGNAL( toggled(bool) ), ownerX, SLOT( setEnabled(bool) ) ); - connect( permissionsEnabled, SIGNAL( toggled(bool) ), groupR, SLOT( setEnabled(bool) ) ); - connect( permissionsEnabled, SIGNAL( toggled(bool) ), groupW, SLOT( setEnabled(bool) ) ); - connect( permissionsEnabled, SIGNAL( toggled(bool) ), groupX, SLOT( setEnabled(bool) ) ); - connect( permissionsEnabled, SIGNAL( toggled(bool) ), allR, SLOT( setEnabled(bool) ) ); - connect( permissionsEnabled, SIGNAL( toggled(bool) ), allW, SLOT( setEnabled(bool) ) ); - connect( permissionsEnabled, SIGNAL( toggled(bool) ), allX, SLOT( setEnabled(bool) ) ); connect( resultsList, SIGNAL( returnPressed(QListViewItem*) ), this, SLOT( resultClicked(QListViewItem*) ) ); connect( resultsList, SIGNAL( doubleClicked(QListViewItem*) ), this, SLOT( resultClicked(QListViewItem*) ) ); connect( resultsList, SIGNAL( rightButtonClicked(QListViewItem*,const QPoint&,int) ), this, SLOT( rightClickMenu(QListViewItem*, const QPoint&, int) ) ); connect( mainCloseBtn, SIGNAL( clicked() ), this, SLOT( closeDialog() ) ); - connect( modifiedBetweenBtn1, SIGNAL( clicked() ), this, SLOT( modifiedBetweenSetDate1() ) ); - connect( modifiedBetweenBtn2, SIGNAL( clicked() ), this, SLOT( modifiedBetweenSetDate2() ) ); - connect( notModifiedAfterBtn, SIGNAL( clicked() ), this, SLOT( notModifiedAfterSetDate() ) ); // tab order setTabOrder( mainSearchBtn, mainCloseBtn ); ! setTabOrder( mainCloseBtn, biggerThanEnabled ); ! setTabOrder( biggerThanEnabled, biggerThanAmount ); ! setTabOrder( biggerThanAmount, smallerThanEnabled ); ! setTabOrder( smallerThanEnabled, smallerThanAmount ); ! setTabOrder( smallerThanAmount, modifiedBetweenEnabled ); ! setTabOrder( modifiedBetweenEnabled, modifiedBetweenData1 ); ! setTabOrder( modifiedBetweenData1, modifiedBetweenData2 ); ! setTabOrder( modifiedBetweenData2, notModifiedAfterEnabled ); ! setTabOrder( notModifiedAfterEnabled, notModifiedAfterData ); ! setTabOrder( notModifiedAfterData, modifiedInTheLastEnabled ); ! setTabOrder( modifiedInTheLastEnabled, modifiedInTheLastData ); ! setTabOrder( modifiedInTheLastData, notModifiedInTheLastData ); ! setTabOrder( notModifiedInTheLastData, belongsToUserEnabled ); ! setTabOrder( belongsToUserEnabled, belongsToUserData ); ! setTabOrder( belongsToUserData, belongsToGroupEnabled ); ! setTabOrder( belongsToGroupEnabled, belongsToGroupData ); ! setTabOrder( belongsToGroupData, permissionsEnabled ); ! setTabOrder( permissionsEnabled, ownerR ); ! setTabOrder( ownerR, ownerW ); ! setTabOrder( ownerW, ownerX ); ! setTabOrder( ownerX, groupR ); ! setTabOrder( groupR, groupW ); ! setTabOrder( groupW, groupX ); ! setTabOrder( groupX, allR ); ! setTabOrder( allR, allW ); ! setTabOrder( allW, allX ); ! setTabOrder( allX, mainStopBtn ); setTabOrder( mainStopBtn, TabWidget2 ); ! setTabOrder( TabWidget2, biggerThanType ); ! setTabOrder( biggerThanType, smallerThanType ); ! setTabOrder( smallerThanType, modifiedInTheLastType ); ! setTabOrder( modifiedInTheLastType, notModifiedInTheLastType ); ! setTabOrder( notModifiedInTheLastType, resultsList ); } --- 165,178 ---- connect( mainSearchBtn, SIGNAL( clicked() ), this, SLOT( startSearch() ) ); connect( mainStopBtn, SIGNAL( clicked() ), this, SLOT( stopSearch() ) ); connect( resultsList, SIGNAL( returnPressed(QListViewItem*) ), this, SLOT( resultClicked(QListViewItem*) ) ); connect( resultsList, SIGNAL( doubleClicked(QListViewItem*) ), this, SLOT( resultClicked(QListViewItem*) ) ); connect( resultsList, SIGNAL( rightButtonClicked(QListViewItem*,const QPoint&,int) ), this, SLOT( rightClickMenu(QListViewItem*, const QPoint&, int) ) ); connect( mainCloseBtn, SIGNAL( clicked() ), this, SLOT( closeDialog() ) ); // tab order setTabOrder( mainSearchBtn, mainCloseBtn ); ! setTabOrder( mainCloseBtn, mainStopBtn ); setTabOrder( mainStopBtn, TabWidget2 ); ! setTabOrder( TabWidget2, resultsList ); } *************** *** 537,546 **** { bool ret = QDialog::event( ev ); ! if ( ev->type() == QEvent::ApplicationFontChange ) { ! QFont TextLabel4_font( TextLabel4->font() ); ! TextLabel4_font.setFamily( "adobe-helvetica" ); ! TextLabel4_font.setItalic( TRUE ); ! TextLabel4->setFont( TextLabel4_font ); ! } return ret; } --- 192,201 ---- { bool ret = QDialog::event( ev ); ! // if ( ev->type() == QEvent::ApplicationFontChange ) { ! // QFont TextLabel4_font( TextLabel4->font() ); ! // TextLabel4_font.setFamily( "adobe-helvetica" ); ! // TextLabel4_font.setItalic( TRUE ); ! // TextLabel4->setFont( TextLabel4_font ); ! // } return ret; } *************** *** 551,569 **** } - void KrSearchBase::modifiedBetweenSetDate1() - { - qWarning( "KrSearchBase::modifiedBetweenSetDate1(): Not implemented yet!" ); - } - - void KrSearchBase::modifiedBetweenSetDate2() - { - qWarning( "KrSearchBase::modifiedBetweenSetDate2(): Not implemented yet!" ); - } - - void KrSearchBase::notModifiedAfterSetDate() - { - qWarning( "KrSearchBase::notModifiedAfterSetDate(): Not implemented yet!" ); - } - void KrSearchBase::resultClicked(QListViewItem*) { --- 206,209 ---- Index: krsearchdialog.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Search/krsearchdialog.cpp,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** krsearchdialog.cpp 24 Sep 2004 20:40:04 -0000 1.23 --- krsearchdialog.cpp 25 Sep 2004 11:10:37 -0000 1.24 *************** *** 72,106 **** #include <qclipboard.h> - // private functions - used as services ///////////////////// - void changeDate(QLineEdit *p) { - // check if the current date is valid - QDate d = KGlobal::locale()->readDate(p->text()); - if (!d.isValid()) d = QDate::currentDate(); - - KRGetDate *gd = new KRGetDate(d); - d = gd->getDate(); - // if a user pressed ESC or closed the dialog, we'll return an invalid date - if (d.isValid()) - p->setText(KGlobal::locale()->formatDate(d, true)); - delete gd; - } - - // bool start: set it to true if this date is the beginning of the search, - // if it's the end, set it to false - void qdate2time_t(time_t *dest, QDate d, bool start) { - struct tm t; - t.tm_sec = (start ? 0 : 59); - t.tm_min = (start ? 0 : 59); - t.tm_hour = (start ? 0 : 23); - t.tm_mday = d.day(); - t.tm_mon = d.month() - 1; - t.tm_year = d.year() - 1900; - t.tm_wday = d.dayOfWeek() - 1; // actually ignored by mktime - t.tm_yday = d.dayOfYear() - 1; // actually ignored by mktime - t.tm_isdst = -1; // daylight saving time information isn't availble - - (*dest) = mktime( &t ); - } - // class starts here ///////////////////////////////////////// KrSearchDialog::KrSearchDialog(QWidget *parent, const char *name ) : --- 72,75 ---- *************** *** 119,135 **** } - void KrSearchDialog::invalidDateMessage(QLineEdit *p) { - KMessageBox::detailedError(0, i18n("Invalid date entered."), - i18n("The date '") + p->text() + i18n("' is not valid according to your locale.\n" - "Please re-enter a valid date (use the date button of easy access).")); - - TabWidget2->setCurrentPage(1); // set page to advanced - p->setFocus(); - } - void KrSearchDialog::prepareGUI() { //=======> to be moved ... resultsList->setSorting(1); // sort by location - belongsToUserData->setEditable(false); belongsToGroupData->setEditable(false); // ======================================== --- 88,94 ---- *************** *** 157,164 **** generalFilter->searchInEdit->setText(path); - // fill the users and groups list - fillList(belongsToUserData, USERSFILE); - fillList(belongsToGroupData, GROUPSFILE); - // fill the saved searches list refreshSavedSearches(); --- 116,119 ---- *************** *** 207,328 **** } ! // size calculations //////////////////////////////////////////////// ! if ( biggerThanEnabled->isChecked() && ! !(biggerThanAmount->text().simplifyWhiteSpace()).isEmpty() ) { ! query->minSize = biggerThanAmount->text().toULong(); ! switch (biggerThanType->currentItem()) { ! case 1 : query->minSize *= 1024; ! break; ! case 2 : query->minSize *= (1024*1024); ! break; ! } ! } ! if ( smallerThanEnabled->isChecked() && ! !(smallerThanAmount->text().simplifyWhiteSpace()).isEmpty()) { ! query->maxSize = smallerThanAmount->text().toULong(); ! switch (smallerThanType->currentItem()) { ! case 1 : query->maxSize *= 1024; ! break; ! case 2 : query->maxSize *= (1024*1024); ! break; ! } ! } ! // check that minSize is smaller than maxSize ! if ((query->minSize > 0) && (query->maxSize > 0) && (query->maxSize < query->minSize)) { ! KMessageBox::detailedError(0, i18n("Specified sizes are inconsistent !"), ! i18n("Please re-enter the values, so that the leftmost size will\n" ! "be smaller (or equal) to the right size.")); ! TabWidget2->setCurrentPage(1); // set page to advanced ! biggerThanAmount->setFocus(); return false; } ! ! // date calculations //////////////////////////////////////////////////// ! if (modifiedBetweenEnabled->isChecked()) { ! // first, if both dates are empty, than don't use them ! if ( !(modifiedBetweenData1->text().simplifyWhiteSpace().isEmpty() && ! modifiedBetweenData2->text().simplifyWhiteSpace().isEmpty()) ) { ! // check if date is valid ! QDate d1 = KGlobal::locale()->readDate(modifiedBetweenData1->text()); ! if (!d1.isValid()) { invalidDateMessage(modifiedBetweenData1); return false; } ! QDate d2 = KGlobal::locale()->readDate(modifiedBetweenData2->text()); ! if (!d2.isValid()) { invalidDateMessage(modifiedBetweenData2); return false; } ! ! if (d1 > d2) { ! KMessageBox::detailedError(0, i18n("Dates are inconsistent !"), ! i18n("The date on the left side is later than the date on the right.\n" ! "Please re-enter the dates, so that the leftmost date will be\n" ! "earlier than the right one.")); ! TabWidget2->setCurrentPage(1); // set page to advanced ! modifiedBetweenData1->setFocus(); ! return false; ! } ! // all seems to be ok, create time_t ! qdate2time_t(&(query->newerThen), d1, true); ! qdate2time_t(&(query->olderThen), d2, false); ! } ! } else if (notModifiedAfterEnabled->isChecked()) { ! if ( !notModifiedAfterData->text().simplifyWhiteSpace().isEmpty() ) { ! QDate d = KGlobal::locale()->readDate(notModifiedAfterData->text()); ! if (!d.isValid()) { invalidDateMessage(notModifiedAfterData); return false; } ! qdate2time_t(&(query->olderThen), d, false); ! } ! } else if (modifiedInTheLastEnabled->isChecked()) { ! if ( !(modifiedInTheLastData->text().simplifyWhiteSpace().isEmpty() && ! notModifiedInTheLastData->text().simplifyWhiteSpace().isEmpty()) ) { ! QDate d1 = QDate::currentDate(); QDate d2 = QDate::currentDate(); ! if (!modifiedInTheLastData->text().simplifyWhiteSpace().isEmpty()) { ! int tmp1 = modifiedInTheLastData->text().simplifyWhiteSpace().toInt(); ! switch (modifiedInTheLastType->currentItem()) { ! case 1 : tmp1 *= 7; ! break; ! case 2 : tmp1 *= 30; ! break; ! case 3 : tmp1 *= 365; ! break; ! } ! d1 = d1.addDays((-1) * tmp1); ! qdate2time_t(&(query->newerThen), d1, true); ! } ! if (!notModifiedInTheLastData->text().simplifyWhiteSpace().isEmpty()) { ! int tmp2 = notModifiedInTheLastData->text().simplifyWhiteSpace().toInt(); ! switch (notModifiedInTheLastType->currentItem()) { ! case 1 : tmp2 *= 7; ! break; ! case 2 : tmp2 *= 30; ! break; ! case 3 : tmp2 *= 365; ! break; ! } ! d2 = d2.addDays((-1) * tmp2); ! qdate2time_t(&(query->olderThen), d2, true); ! } ! if ( !modifiedInTheLastData->text().simplifyWhiteSpace().isEmpty() && ! !notModifiedInTheLastData->text().simplifyWhiteSpace().isEmpty() ) { ! if (d1 > d2) { ! KMessageBox::detailedError(0, i18n("Dates are inconsistent !"), ! i18n("The date on the top is later than the date on the bottom.\n" ! "Please re-enter the dates, so that the top date will be\n" ! "earlier than the bottom one.")); ! TabWidget2->setCurrentPage(1); // set page to advanced ! modifiedInTheLastData->setFocus(); ! return false; ! } ! } ! } ! } ! ! // permissions and ownership ///////////////////////////////////// ! if (permissionsEnabled->isChecked()) { ! QString perm = ownerR->currentText() + ownerW->currentText() + ownerX->currentText() + ! groupR->currentText() + groupW->currentText() + groupX->currentText() + ! allR->currentText() + allW->currentText() + allX->currentText(); ! query->perm = perm; ! } ! if (belongsToUserEnabled->isChecked()) ! query->owner = belongsToUserData->currentText(); ! if (belongsToGroupEnabled->isChecked()) ! query->group = belongsToGroupData->currentText(); ! return true; } --- 162,171 ---- } ! if( !advancedFilter->fillQuery( query ) ) ! { ! TabWidget2->setCurrentPage(1); // set page to general return false; } ! return true; } *************** *** 385,415 **** } - void KrSearchDialog::modifiedBetweenSetDate1() { - changeDate(modifiedBetweenData1); - } - - void KrSearchDialog::modifiedBetweenSetDate2() { - changeDate(modifiedBetweenData2); - } - - void KrSearchDialog::notModifiedAfterSetDate() { - changeDate(notModifiedAfterData); - } - - void KrSearchDialog::fillList(QComboBox *list, QString filename) { - QFile data(filename); - if (!data.open(IO_ReadOnly)) { - kdWarning() << "Search: Unable to read " << filename << " !!!" << endl; - return; - } - // and read it into the temporary array - QTextStream t(&data); - while (!data.atEnd()) { - QString s = t.readLine(); - QString name = s.left(s.find(':')); - list->insertItem(name); - } - } - void KrSearchDialog::resultClicked(QListViewItem* i) { krApp->mainView->activePanel->func->openUrl(vfs::fromPathOrURL(i->text(1)),i->text(0)); --- 228,231 ---- Index: Makefile.am =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Search/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Makefile.am 24 Sep 2004 20:40:04 -0000 1.2 --- Makefile.am 25 Sep 2004 11:10:37 -0000 1.3 *************** *** 6,10 **** libSearch_a_METASOURCES = AUTO ! libSearch_a_SOURCES = krsearchmod.cpp krsearchdialog.cpp krsearchdialogbase.cpp krquery.cpp generalfilter.cpp --- 6,10 ---- libSearch_a_METASOURCES = AUTO ! libSearch_a_SOURCES = krsearchmod.cpp krsearchdialog.cpp krsearchdialogbase.cpp krquery.cpp generalfilter.cpp advancedfilter.cpp *************** *** 12,13 **** --- 12,14 ---- ####### kdevelop will overwrite this part!!! (end)############ + noinst_HEADERS = advancedfilter.h Index: generalfilter.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Search/generalfilter.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** generalfilter.h 24 Sep 2004 20:40:04 -0000 1.1 --- generalfilter.h 25 Sep 2004 11:10:37 -0000 1.2 *************** *** 18,22 **** YP YD 88 YD ~Y8888P' `8888Y' YP YP Y8888D' Y88888P 88 YD ! S o u r c e F i l e *************************************************************************** --- 18,22 ---- YP YD 88 YD ~Y8888P' `8888Y' YP YP Y8888D' Y88888P 88 YD ! H e a d e r F i l e *************************************************************************** Index: krsearchdialog.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Search/krsearchdialog.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** krsearchdialog.h 24 Sep 2004 20:40:04 -0000 1.8 --- krsearchdialog.h 25 Sep 2004 11:10:37 -0000 1.9 *************** *** 59,65 **** void found(QString what, QString where, KIO::filesize_t size, time_t mtime, QString perm); void closeDialog(); - void modifiedBetweenSetDate1(); - void modifiedBetweenSetDate2(); - void notModifiedAfterSetDate(); void resultClicked(QListViewItem*); --- 59,62 ---- *************** *** 73,78 **** private: void refreshSavedSearches(); - void invalidDateMessage(QLineEdit *p); - void fillList(QComboBox *list, QString filename); bool gui2query(); void editCurrent(); --- 70,73 ---- --- NEW FILE: advancedfilter.h --- /*************************************************************************** advancedfilter.cpp - description ------------------- copyright : (C) 2003 by Shie Erlich & Rafi Yanai & Csaba Karai e-mail : kru...@us... web site : http://krusader.sourceforge.net --------------------------------------------------------------------------- Description *************************************************************************** A db dD d8888b. db db .d8888. .d8b. d8888b. d88888b d8888b. 88 ,8P' 88 `8D 88 88 88' YP d8' `8b 88 `8D 88' 88 `8D 88,8P 88oobY' 88 88 `8bo. 88ooo88 88 88 88ooooo 88oobY' 88`8b 88`8b 88 88 `Y8b. 88~~~88 88 88 88~~~~~ 88`8b 88 `88. 88 `88. 88b d88 db 8D 88 88 88 .8D 88. 88 `88. YP YD 88 YD ~Y8888P' `8888Y' YP YP Y8888D' Y88888P 88 YD H e a d e r F i l e *************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef ADVANCEDFILTER_H #define ADVANCEDFILTER_H #include "krquery.h" #include <qwidget.h> #include <qcheckbox.h> #include <kcombobox.h> #include <klineedit.h> #include <qradiobutton.h> #include <qtoolbutton.h> class AdvancedFilter : public QWidget { Q_OBJECT public: AdvancedFilter( QWidget *parent = 0, const char *name = 0 ); bool fillQuery( KRQuery *query ); public slots: void modifiedBetweenSetDate1(); void modifiedBetweenSetDate2(); void notModifiedAfterSetDate(); public: QCheckBox* smallerThanEnabled; QLineEdit* smallerThanAmount; KComboBox* smallerThanType; QCheckBox* biggerThanEnabled; KComboBox* biggerThanType; QLineEdit* biggerThanAmount; QRadioButton* modifiedBetweenEnabled; QRadioButton* notModifiedAfterEnabled; QRadioButton* modifiedInTheLastEnabled; QLineEdit* modifiedBetweenData1; QLineEdit* modifiedBetweenData2; QToolButton* modifiedBetweenBtn1; QToolButton* modifiedBetweenBtn2; QToolButton* notModifiedAfterBtn; QLineEdit* notModifiedAfterData; QLineEdit* modifiedInTheLastData; QLineEdit* notModifiedInTheLastData; QComboBox* modifiedInTheLastType; QComboBox* notModifiedInTheLastType; QCheckBox* belongsToUserEnabled; QComboBox* belongsToUserData; QCheckBox* belongsToGroupEnabled; QComboBox* belongsToGroupData; QCheckBox* permissionsEnabled; QComboBox* ownerW; QComboBox* ownerR; QComboBox* ownerX; QComboBox* groupW; QComboBox* groupR; QComboBox* groupX; QComboBox* allW; QComboBox* allX; QComboBox* allR; private: void changeDate(QLineEdit *p); void fillList(QComboBox *list, QString filename); void qdate2time_t(time_t *dest, QDate d, bool start); void invalidDateMessage(QLineEdit *p); }; #endif /* ADVANCEDFILTER_H */ --- NEW FILE: advancedfilter.cpp --- /*************************************************************************** advancedfilter.cpp - description ------------------- copyright : (C) 2003 by Shie Erlich & Rafi Yanai & Csaba Karai e-mail : kru...@us... web site : http://krusader.sourceforge.net --------------------------------------------------------------------------- Description *************************************************************************** A db dD d8888b. db db .d8888. .d8b. d8888b. d88888b d8888b. 88 ,8P' 88 `8D 88 88 88' YP d8' `8b 88 `8D 88' 88 `8D 88,8P 88oobY' 88 88 `8bo. 88ooo88 88 88 88ooooo 88oobY' 88`8b 88`8b 88 88 `Y8b. 88~~~88 88 88 88~~~~~ 88`8b 88 `88. 88 `88. 88b d88 db 8D 88 88 88 .8D 88. 88 `88. YP YD 88 YD ~Y8888P' `8888Y' YP YP Y8888D' Y88888P 88 YD S o u r c e F i l e *************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "advancedfilter.h" #include "../Dialogs/krdialogs.h" #include <qgroupbox.h> #include <klocale.h> #include <qlayout.h> #include <qlabel.h> #include <qbuttongroup.h> #include <qfile.h> #include <kdebug.h> #include <kmessagebox.h> #include <time.h> #define USERSFILE QString("/etc/passwd") #define GROUPSFILE QString("/etc/group") static const char* const image1_data[] = { "16 16 17 1", ". c None", "# c #000000", "d c #830000", "o c #838100", "e c #838183", "g c #a4a1a4", "n c #c50000", "c c #c55900", "j c #c5c200", "h c #c5c2c5", "k c #ff0000", "b c #ffaa5a", "m c #ffc2c5", "a c #ffdeac", "i c #ffff00", "l c #ffffc5", "f c #ffffff", ".......########.", "......#abccccdd#", "......#cceffecc#", ".......#cffffc#.", ".#######cffffc#.", "#ggggggechffhc#.", "#ggggggec#ij#c#.", "#ffffffhc#ij#c#.", "#fkkkkfhc#lh#c#.", "#fkfmkfhc#lh#c#.", "#ffmkkfhchijhn#.", "#fkfmkfhciijoc#.", "#fkkkkfhbiijod#.", "#ffffffhceijecc#", "#hhhhhhebbcccdd#", ".##############."}; AdvancedFilter::AdvancedFilter( QWidget *parent, const char *name ) : QWidget( parent, name ) { QGridLayout *filterLayout = new QGridLayout( this ); filterLayout->setSpacing( 6 ); filterLayout->setMargin( 11 ); // Options for size QGroupBox *sizeGroup = new QGroupBox( this, "sizeGroup" ); sizeGroup->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)1, sizeGroup->sizePolicy().hasHeightForWidth() ) ); sizeGroup->setTitle( i18n( "Size" ) ); sizeGroup->setColumnLayout(0, Qt::Vertical ); sizeGroup->layout()->setSpacing( 0 ); sizeGroup->layout()->setMargin( 0 ); QGridLayout *sizeLayout = new QGridLayout( sizeGroup->layout() ); sizeLayout->setAlignment( Qt::AlignTop ); sizeLayout->setSpacing( 6 ); sizeLayout->setMargin( 11 ); biggerThanEnabled = new QCheckBox( sizeGroup, "biggerThanEnabled" ); biggerThanEnabled->setText( i18n( "&Bigger than" ) ); sizeLayout->addWidget( biggerThanEnabled, 0, 0 ); biggerThanAmount = new QLineEdit( sizeGroup, "biggerThanAmount" ); biggerThanAmount->setEnabled( false ); biggerThanAmount->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed, biggerThanAmount->sizePolicy().hasHeightForWidth() ) ); sizeLayout->addWidget( biggerThanAmount, 0, 1 ); biggerThanType = new KComboBox( false, sizeGroup, "biggerThanType" ); biggerThanType->insertItem( i18n( "Bytes" ) ); biggerThanType->insertItem( i18n( "KB" ) ); biggerThanType->insertItem( i18n( "MB" ) ); biggerThanType->setEnabled( false ); sizeLayout->addWidget( biggerThanType, 0, 2 ); smallerThanEnabled = new QCheckBox( sizeGroup, "smallerThanEnabled" ); smallerThanEnabled->setText( i18n( "&Smaller than" ) ); sizeLayout->addWidget( smallerThanEnabled, 0, 3 ); smallerThanAmount = new QLineEdit( sizeGroup, "smallerThanAmount" ); smallerThanAmount->setEnabled( false ); smallerThanAmount->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed, smallerThanAmount->sizePolicy().hasHeightForWidth() ) ); sizeLayout->addWidget( smallerThanAmount, 0, 4 ); smallerThanType = new KComboBox( false, sizeGroup, "smallerThanType" ); smallerThanType->insertItem( i18n( "Bytes" ) ); smallerThanType->insertItem( i18n( "KB" ) ); smallerThanType->insertItem( i18n( "MB" ) ); smallerThanType->setEnabled( false ); sizeLayout->addWidget( smallerThanType, 0, 5 ); // set a tighter box around the type box int height = QFontMetrics(biggerThanType->font()).height()+2; biggerThanType->setMaximumHeight(height); smallerThanType->setMaximumHeight(height); filterLayout->addWidget( sizeGroup, 0, 0 ); // Options for date QPixmap image1( ( const char** ) image1_data ); QButtonGroup *dateGroup = new QButtonGroup( this, "dateGroup" ); dateGroup->setTitle( i18n( "Date" ) ); dateGroup->setExclusive( true ); dateGroup->setColumnLayout(0, Qt::Vertical ); dateGroup->layout()->setSpacing( 0 ); dateGroup->layout()->setMargin( 0 ); QGridLayout *dateLayout = new QGridLayout( dateGroup->layout() ); dateLayout->setAlignment( Qt::AlignTop ); dateLayout->setSpacing( 6 ); dateLayout->setMargin( 11 ); modifiedBetweenEnabled = new QRadioButton( dateGroup, "modifiedBetweenEnabled" ); modifiedBetweenEnabled->setText( i18n( "&Modified between" ) ); dateGroup->insert( modifiedBetweenEnabled, 0 ); dateLayout->addMultiCellWidget( modifiedBetweenEnabled, 0, 0, 0, 1 ); modifiedBetweenData1 = new QLineEdit( dateGroup, "modifiedBetweenData1" ); modifiedBetweenData1->setEnabled( false ); modifiedBetweenData1->setText( "" ); dateLayout->addMultiCellWidget( modifiedBetweenData1, 0, 0, 2, 3 ); modifiedBetweenBtn1 = new QToolButton( dateGroup, "modifiedBetweenBtn1" ); modifiedBetweenBtn1->setEnabled( false ); modifiedBetweenBtn1->setText( "" ); modifiedBetweenBtn1->setPixmap( image1 ); dateLayout->addWidget( modifiedBetweenBtn1, 0, 4 ); QLabel *andLabel = new QLabel( dateGroup, "andLabel" ); andLabel->setText( i18n( "an&d" ) ); dateLayout->addWidget( andLabel, 0, 5 ); modifiedBetweenData2 = new QLineEdit( dateGroup, "modifiedBetweenData2" ); modifiedBetweenData2->setEnabled( false ); modifiedBetweenData2->setText( "" ); andLabel->setBuddy(modifiedBetweenData2); dateLayout->addWidget( modifiedBetweenData2, 0, 6 ); modifiedBetweenBtn2 = new QToolButton( dateGroup, "modifiedBetweenBtn2" ); modifiedBetweenBtn2->setEnabled( false ); modifiedBetweenBtn2->setText( "" ); modifiedBetweenBtn2->setPixmap( image1 ); dateLayout->addWidget( modifiedBetweenBtn2, 0, 7 ); notModifiedAfterEnabled = new QRadioButton( dateGroup, "notModifiedAfterEnabled" ); notModifiedAfterEnabled->setText( i18n( "&Not modified after" ) ); dateGroup->insert( notModifiedAfterEnabled, 0 ); dateLayout->addMultiCellWidget( notModifiedAfterEnabled, 1, 1, 0, 1 ); notModifiedAfterData = new QLineEdit( dateGroup, "notModifiedAfterData" ); notModifiedAfterData->setEnabled( false ); notModifiedAfterData->setText( "" ); dateLayout->addMultiCellWidget( notModifiedAfterData, 1, 1, 2, 3 ); notModifiedAfterBtn = new QToolButton( dateGroup, "notModifiedAfterBtn" ); notModifiedAfterBtn->setEnabled( false ); notModifiedAfterBtn->setText( "" ); notModifiedAfterBtn->setPixmap( image1 ); dateLayout->addWidget( notModifiedAfterBtn, 1, 4 ); modifiedInTheLastEnabled = new QRadioButton( dateGroup, "modifiedInTheLastEnabled" ); modifiedInTheLastEnabled->setText( i18n("Mod&ified in the last") ); dateGroup->insert( modifiedInTheLastEnabled, 0 ); dateLayout->addWidget( modifiedInTheLastEnabled, 2, 0 ); modifiedInTheLastData = new QLineEdit( dateGroup, "modifiedInTheLastData" ); modifiedInTheLastData->setEnabled( false ); modifiedInTheLastData->setText( "" ); dateLayout->addWidget( modifiedInTheLastData, 2, 2 ); modifiedInTheLastType = new QComboBox( false, dateGroup, "modifiedInTheLastType" ); modifiedInTheLastType->insertItem( i18n( "days" ) ); modifiedInTheLastType->insertItem( i18n( "weeks" ) ); modifiedInTheLastType->insertItem( i18n( "months" ) ); modifiedInTheLastType->insertItem( i18n( "years" ) ); modifiedInTheLastType->setEnabled( false ); dateLayout->addMultiCellWidget( modifiedInTheLastType, 2, 2, 3, 4 ); notModifiedInTheLastData = new QLineEdit( dateGroup, "notModifiedInTheLastData" ); notModifiedInTheLastData->setEnabled( false ); notModifiedInTheLastData->setText( "" ); dateLayout->addWidget( notModifiedInTheLastData, 3, 2 ); QLabel *notModifiedInTheLastLbl = new QLabel( dateGroup, "notModifiedInTheLastLbl" ); notModifiedInTheLastLbl->setText( i18n( "No&t modified in the last" ) ); notModifiedInTheLastLbl->setBuddy(notModifiedInTheLastData); dateLayout->addWidget( notModifiedInTheLastLbl, 3, 0 ); notModifiedInTheLastType = new QComboBox( false, dateGroup, "notModifiedInTheLastType" ); notModifiedInTheLastType->insertItem( i18n( "days" ) ); notModifiedInTheLastType->insertItem( i18n( "weeks" ) ); notModifiedInTheLastType->insertItem( i18n( "months" ) ); notModifiedInTheLastType->insertItem( i18n( "years" ) ); notModifiedInTheLastType->setEnabled( false ); dateLayout->addMultiCellWidget( notModifiedInTheLastType, 3, 3, 3, 4 ); filterLayout->addWidget( dateGroup, 1, 0 ); // Options for ownership QGroupBox *ownershipGroup = new QGroupBox( this, "ownershipGroup" ); ownershipGroup->setTitle( i18n( "Ownership" ) ); ownershipGroup->setColumnLayout(0, Qt::Vertical ); ownershipGroup->layout()->setSpacing( 0 ); ownershipGroup->layout()->setMargin( 0 ); QGridLayout *ownershipLayout = new QGridLayout( ownershipGroup->layout() ); ownershipLayout->setAlignment( Qt::AlignTop ); ownershipLayout->setSpacing( 6 ); ownershipLayout->setMargin( 11 ); QHBoxLayout *hboxLayout = new QHBoxLayout(); hboxLayout->setSpacing( 6 ); hboxLayout->setMargin( 0 ); belongsToUserEnabled = new QCheckBox( ownershipGroup, "belongsToUserEnabled" ); belongsToUserEnabled->setText( i18n( "Belongs to &user" ) ); hboxLayout->addWidget( belongsToUserEnabled ); belongsToUserData = new QComboBox( false, ownershipGroup, "belongsToUserData" ); belongsToUserData->setEnabled( false ); belongsToUserData->setEditable( false ); hboxLayout->addWidget( belongsToUserData ); belongsToGroupEnabled = new QCheckBox( ownershipGroup, "belongsToGroupEnabled" ); belongsToGroupEnabled->setText( i18n( "Belongs to gr&oup" ) ); hboxLayout->addWidget( belongsToGroupEnabled ); belongsToGroupData = new QComboBox( false, ownershipGroup, "belongsToGroupData" ); belongsToGroupData->setEnabled( false ); belongsToGroupData->setEditable( false ); hboxLayout->addWidget( belongsToGroupData ); ownershipLayout->addMultiCellLayout( hboxLayout, 0, 0, 0, 3 ); permissionsEnabled = new QCheckBox( ownershipGroup, "permissionsEnabled" ); permissionsEnabled->setText( i18n( "P&ermissions" ) ); ownershipLayout->addWidget( permissionsEnabled, 1, 0 ); QGroupBox *ownerGroup = new QGroupBox( ownershipGroup, "ownerGroup" ); ownerGroup->setTitle( i18n( "O&wner" ) ); int width = 2*height + height / 2; ownerR = new QComboBox( false, ownerGroup, "ownerR" ); ownerR->insertItem( i18n( "?" ) ); ownerR->insertItem( i18n( "r" ) ); ownerR->insertItem( i18n( "-" ) ); ownerR->setEnabled( false ); ownerR->setGeometry( QRect( 10, 20, width, height+6 ) ); ownerW = new QComboBox( false, ownerGroup, "ownerW" ); ownerW->insertItem( i18n( "?" ) ); ownerW->insertItem( i18n( "w" ) ); ownerW->insertItem( i18n( "-" ) ); ownerW->setEnabled( false ); ownerW->setGeometry( QRect( 10 + width, 20, width, height+6 ) ); ownerX = new QComboBox( false, ownerGroup, "ownerX" ); ownerX->insertItem( i18n( "?" ) ); ownerX->insertItem( i18n( "x" ) ); ownerX->insertItem( i18n( "-" ) ); ownerX->setEnabled( false ); ownerX->setGeometry( QRect( 10 + 2*width, 20, width, height+6 ) ); ownershipLayout->addWidget( ownerGroup, 1, 1 ); QGroupBox *groupGroup = new QGroupBox( ownershipGroup, "groupGroup" ); groupGroup->setTitle( i18n( "Grou&p" ) ); groupR = new QComboBox( false, groupGroup, "groupR" ); groupR->insertItem( i18n( "?" ) ); groupR->insertItem( i18n( "r" ) ); groupR->insertItem( i18n( "-" ) ); groupR->setEnabled( false ); groupR->setGeometry( QRect( 10, 20, width, height+6 ) ); groupW = new QComboBox( false, groupGroup, "groupW" ); groupW->insertItem( i18n( "?" ) ); groupW->insertItem( i18n( "w" ) ); groupW->insertItem( i18n( "-" ) ); groupW->setEnabled( false ); groupW->setGeometry( QRect( 10 + width, 20, width, height+6 ) ); groupX = new QComboBox( false, groupGroup, "groupX" ); groupX->insertItem( i18n( "?" ) ); groupX->insertItem( i18n( "x" ) ); groupX->insertItem( i18n( "-" ) ); groupX->setEnabled( false ); groupX->setGeometry( QRect( 10 + 2*width, 20, width, height+6 ) ); ownershipLayout->addWidget( groupGroup, 1, 2 ); QGroupBox *allGroup = new QGroupBox( ownershipGroup, "allGroup" ); allGroup->setTitle( i18n( "A&ll" ) ); allR = new QComboBox( false, allGroup, "allR" ); allR->insertItem( i18n( "?" ) ); allR->insertItem( i18n( "r" ) ); allR->insertItem( i18n( "-" ) ); allR->setEnabled( false ); allR->setGeometry( QRect( 10, 20, width, height+6 ) ); allW = new QComboBox( false, allGroup, "allW" ); allW->insertItem( i18n( "?" ) ); allW->insertItem( i18n( "w" ) ); allW->insertItem( i18n( "-" ) ); allW->setEnabled( false ); allW->setGeometry( QRect( 10 + width, 20, width, height+6 ) ); allX = new QComboBox( false, allGroup, "allX" ); allX->insertItem( i18n( "?" ) ); allX->insertItem( i18n( "x" ) ); allX->insertItem( i18n( "-" ) ); allX->setEnabled( false ); allX->setGeometry( QRect( 10 + 2*width, 20, width, height+6 ) ); ownershipLayout->addWidget( allGroup, 1, 3 ); QLabel *infoLabel = new QLabel( ownershipGroup, "TextLabel4" ); QFont infoLabel_font( infoLabel->font() ); infoLabel_font.setFamily( "adobe-helvetica" ); infoLabel_font.setItalic( true ); infoLabel->setFont( infoLabel_font ); infoLabel->setText( i18n( "Note: a '?' is a wildcard" ) ); ownershipLayout->addMultiCellWidget( infoLabel, 2, 2, 0, 3, Qt::AlignRight ); filterLayout->addWidget( ownershipGroup, 2, 0 ); // Connection table connect( biggerThanEnabled, SIGNAL( toggled(bool) ), biggerThanAmount, SLOT( setEnabled(bool) ) ); connect( biggerThanEnabled, SIGNAL( toggled(bool) ), biggerThanType, SLOT( setEnabled(bool) ) ); connect( smallerThanEnabled, SIGNAL( toggled(bool) ), smallerThanAmount, SLOT( setEnabled(bool) ) ); connect( smallerThanEnabled, SIGNAL( toggled(bool) ), smallerThanType, SLOT( setEnabled(bool) ) ); connect( modifiedBetweenEnabled, SIGNAL( toggled(bool) ), modifiedBetweenData1, SLOT( setEnabled(bool) ) ); connect( modifiedBetweenEnabled, SIGNAL( toggled(bool) ), modifiedBetweenBtn1, SLOT( setEnabled(bool) ) ); connect( modifiedBetweenEnabled, SIGNAL( toggled(bool) ), modifiedBetweenData2, SLOT( setEnabled(bool) ) ); connect( modifiedBetweenEnabled, SIGNAL( toggled(bool) ), modifiedBetweenBtn2, SLOT( setEnabled(bool) ) ); connect( notModifiedAfterEnabled, SIGNAL( toggled(bool) ), notModifiedAfterData, SLOT( setEnabled(bool) ) ); connect( notModifiedAfterEnabled, SIGNAL( toggled(bool) ), notModifiedAfterBtn, SLOT( setEnabled(bool) ) ); connect( modifiedInTheLastEnabled, SIGNAL( toggled(bool) ), modifiedInTheLastData, SLOT( setEnabled(bool) ) ); connect( modifiedInTheLastEnabled, SIGNAL( toggled(bool) ), modifiedInTheLastType, SLOT( setEnabled(bool) ) ); connect( modifiedInTheLastEnabled, SIGNAL( toggled(bool) ), notModifiedInTheLastData, SLOT( setEnabled(bool) ) ); connect( modifiedInTheLastEnabled, SIGNAL( toggled(bool) ), notModifiedInTheLastType, SLOT( setEnabled(bool) ) ); connect( belongsToUserEnabled, SIGNAL( toggled(bool) ), belongsToUserData, SLOT( setEnabled(bool) ) ); connect( belongsToGroupEnabled, SIGNAL( toggled(bool) ), belongsToGroupData, SLOT( setEnabled(bool) ) ); connect( permissionsEnabled, SIGNAL( toggled(bool) ), ownerR, SLOT( setEnabled(bool) ) ); connect( permissionsEnabled, SIGNAL( toggled(bool) ), ownerW, SLOT( setEnabled(bool) ) ); connect( permissionsEnabled, SIGNAL( toggled(bool) ), ownerX, SLOT( setEnabled(bool) ) ); connect( permissionsEnabled, SIGNAL( toggled(bool) ), groupR, SLOT( setEnabled(bool) ) ); connect( permissionsEnabled, SIGNAL( toggled(bool) ), groupW, SLOT( setEnabled(bool) ) ); connect( permissionsEnabled, SIGNAL( toggled(bool) ), groupX, SLOT( setEnabled(bool) ) ); connect( permissionsEnabled, SIGNAL( toggled(bool) ), allR, SLOT( setEnabled(bool) ) ); connect( permissionsEnabled, SIGNAL( toggled(bool) ), allW, SLOT( setEnabled(bool) ) ); connect( permissionsEnabled, SIGNAL( toggled(bool) ), allX, SLOT( setEnabled(bool) ) ); connect( modifiedBetweenBtn1, SIGNAL( clicked() ), this, SLOT( modifiedBetweenSetDate1() ) ); connect( modifiedBetweenBtn2, SIGNAL( clicked() ), this, SLOT( modifiedBetweenSetDate2() ) ); connect( notModifiedAfterBtn, SIGNAL( clicked() ), this, SLOT( notModifiedAfterSetDate() ) ); // fill the users and groups list fillList(belongsToUserData, USERSFILE); fillList(belongsToGroupData, GROUPSFILE); // tab order setTabOrder( biggerThanEnabled, biggerThanAmount ); setTabOrder( biggerThanAmount, smallerThanEnabled ); setTabOrder( smallerThanEnabled, smallerThanAmount ); setTabOrder( smallerThanAmount, modifiedBetweenEnabled ); setTabOrder( modifiedBetweenEnabled, modifiedBetweenData1 ); setTabOrder( modifiedBetweenData1, modifiedBetweenData2 ); setTabOrder( modifiedBetweenData2, notModifiedAfterEnabled ); setTabOrder( notModifiedAfterEnabled, notModifiedAfterData ); setTabOrder( notModifiedAfterData, modifiedInTheLastEnabled ); setTabOrder( modifiedInTheLastEnabled, modifiedInTheLastData ); setTabOrder( modifiedInTheLastData, notModifiedInTheLastData ); setTabOrder( notModifiedInTheLastData, belongsToUserEnabled ); setTabOrder( belongsToUserEnabled, belongsToUserData ); setTabOrder( belongsToUserData, belongsToGroupEnabled ); setTabOrder( belongsToGroupEnabled, belongsToGroupData ); setTabOrder( belongsToGroupData, permissionsEnabled ); setTabOrder( permissionsEnabled, ownerR ); setTabOrder( ownerR, ownerW ); setTabOrder( ownerW, ownerX ); setTabOrder( ownerX, groupR ); setTabOrder( groupR, groupW ); setTabOrder( groupW, groupX ); setTabOrder( groupX, allR ); setTabOrder( allR, allW ); setTabOrder( allW, allX ); setTabOrder( allX, biggerThanType ); setTabOrder( biggerThanType, smallerThanType ); setTabOrder( smallerThanType, modifiedInTheLastType ); setTabOrder( modifiedInTheLastType, notModifiedInTheLastType ); } void AdvancedFilter::modifiedBetweenSetDate1() { changeDate(modifiedBetweenData1); } void AdvancedFilter::modifiedBetweenSetDate2() { changeDate(modifiedBetweenData2); } void AdvancedFilter::notModifiedAfterSetDate() { changeDate(notModifiedAfterData); } void AdvancedFilter::changeDate(QLineEdit *p) { // check if the current date is valid QDate d = KGlobal::locale()->readDate(p->text()); if (!d.isValid()) d = QDate::currentDate(); KRGetDate *gd = new KRGetDate(d); d = gd->getDate(); // if a user pressed ESC or closed the dialog, we'll return an invalid date if (d.isValid()) p->setText(KGlobal::locale()->formatDat... [truncated message content] |
From: Shie E. <er...@us...> - 2004-09-24 23:12:03
|
Update of /cvsroot/krusader/krusader_kde3/krusader/Konfigurator In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23688/Konfigurator Modified Files: konfigurator.cpp Log Message: fixed typos Index: konfigurator.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Konfigurator/konfigurator.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** konfigurator.cpp 4 Sep 2004 08:12:08 -0000 1.15 --- konfigurator.cpp 24 Sep 2004 23:11:42 -0000 1.16 *************** *** 105,109 **** QPixmap(krLoader->loadIcon("messagebox_warning",KIcon::Desktop,32))))); // archives ! newContent(new KgArchives(firstTime, widget->addPage(i18n("Archives"),i18n("Costumize the way Krusader deals with archives"), QPixmap(krLoader->loadIcon("tgz",KIcon::Desktop,32))))); // dependencies --- 105,109 ---- QPixmap(krLoader->loadIcon("messagebox_warning",KIcon::Desktop,32))))); // archives ! newContent(new KgArchives(firstTime, widget->addPage(i18n("Archives"),i18n("Customize the way Krusader deals with archives"), QPixmap(krLoader->loadIcon("tgz",KIcon::Desktop,32))))); // dependencies |