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: <ck...@us...> - 2004-02-05 20:33:22
|
Update of /cvsroot/krusader/krusader_kde3/pics In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19799/krusader_kde3/pics Modified Files: Makefile.am Added Files: kr_dependencies.png Log Message: ADDED: konfigurator dependency setting (only for root mode krusader now) --- NEW FILE: kr_dependencies.png --- (This appears to be a binary file; contents omitted.) Index: Makefile.am =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/pics/Makefile.am,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Makefile.am 13 Dec 2003 23:19:59 -0000 1.4 --- Makefile.am 5 Feb 2004 20:30:45 -0000 1.5 *************** *** 2,6 **** ! EXTRA_DIST = about.png arc_pack16x16.png arc_pack22x22.png arc_pack32x32.png arc_test16x16.png arc_test22x22.png arc_test32x32.png arc_unpack16x16.png arc_unpack22x22.png arc_unpack32x32.png calc16x16.png calc22x22.png calc32x32.png compare16x16.png compare22x22.png compare32x32.png comparedirs16x16.png comparedirs22x22.png comparedirs32x32.png ftp_connect16x16.png ftp_connect22x22.png ftp_connect32x32.png ftp_disconnect16x16.png ftp_disconnect22x22.png ftp_disconnect32x32.png ftp_new16x16.png ftp_new22x22.png ftp_new32x32.png konfig_small.jpg kr_addbookmark16x16.png kr_addbookmark22x22.png kr_addbookmark32x32.png kr_bookman16x16.png kr_bookman22x22.png kr_bookman32x32.png kr_bookmark16x16.png kr_bookmark22x22.png kr_bookmark32x32.png kr_fullview16x16.png kr_fullview22x22.png kr_fullview32x32.png kr_hwinfo16x16.png kr_hwinfo22x22.png kr_hwinfo32x32.png kr_invert16x16.png kr_invert22x22.png kr_invert32x32.png kr_treeview16x16.png kr_treeview22x22.png kr_treeview32x32.png kr_unselect16x16.png kr_unselect22x22.png kr_unselect32x32.png Makefile Makefile.am Makefile.in mountman16x16.png mountman22x22.png mountman32x32.png properties16x16.png properties22x22.png properties32x32.png select16x16.png select22x22.png select32x32.png selectall16x16.png selectall22x22.png selectall32x32.png terminal16x16.png terminal22x22.png terminal32x32.png unselectall16x16.png unselectall22x22.png unselectall32x32.png kr_split16x16.png kr_split22x22.png kr_split32x32.png kr_combine16x16.png kr_combine22x22.png kr_combine32x32.png kr_syncdirs16x16.png kr_syncdirs22x22.png kr_syncdirs32x32.png install-data-local: --- 2,6 ---- ! EXTRA_DIST = about.png arc_pack16x16.png arc_pack22x22.png arc_pack32x32.png arc_test16x16.png arc_test22x22.png arc_test32x32.png arc_unpack16x16.png arc_unpack22x22.png arc_unpack32x32.png calc16x16.png calc22x22.png calc32x32.png compare16x16.png compare22x22.png compare32x32.png comparedirs16x16.png comparedirs22x22.png comparedirs32x32.png ftp_connect16x16.png ftp_connect22x22.png ftp_connect32x32.png ftp_disconnect16x16.png ftp_disconnect22x22.png ftp_disconnect32x32.png ftp_new16x16.png ftp_new22x22.png ftp_new32x32.png konfig_small.jpg kr_addbookmark16x16.png kr_addbookmark22x22.png kr_addbookmark32x32.png kr_bookman16x16.png kr_bookman22x22.png kr_bookman32x32.png kr_bookmark16x16.png kr_bookmark22x22.png kr_bookmark32x32.png kr_fullview16x16.png kr_fullview22x22.png kr_fullview32x32.png kr_hwinfo16x16.png kr_hwinfo22x22.png kr_hwinfo32x32.png kr_invert16x16.png kr_invert22x22.png kr_invert32x32.png kr_treeview16x16.png kr_treeview22x22.png kr_treeview32x32.png kr_unselect16x16.png kr_unselect22x22.png kr_unselect32x32.png Makefile Makefile.am Makefile.in mountman16x16.png mountman22x22.png mountman32x32.png properties16x16.png properties22x22.png properties32x32.png select16x16.png select22x22.png select32x32.png selectall16x16.png selectall22x22.png selectall32x32.png terminal16x16.png terminal22x22.png terminal32x32.png unselectall16x16.png unselectall22x22.png unselectall32x32.png kr_split16x16.png kr_split22x22.png kr_split32x32.png kr_combine16x16.png kr_combine22x22.png kr_combine32x32.png kr_dependencies.png kr_syncdirs16x16.png kr_syncdirs22x22.png kr_syncdirs32x32.png install-data-local: *************** *** 159,162 **** --- 159,164 ---- $(mkinstalldirs) $(kde_datadir)/krusader/icons/hicolor/32x32/actions/ $(INSTALL_DATA) $(srcdir)/kr_combine32x32.png $(kde_datadir)/krusader/icons/hicolor/32x32/actions/kr_combine.png + $(mkinstalldirs) $(kde_datadir)/krusader/icons/hicolor/32x32/actions/ + $(INSTALL_DATA) $(srcdir)/kr_dependencies.png $(kde_datadir)/krusader/icons/hicolor/32x32/actions/kr_dependencies.png $(mkinstalldirs) $(kde_datadir)/krusader/icons/hicolor/16x16/actions/ $(INSTALL_DATA) $(srcdir)/kr_syncdirs16x16.png $(kde_datadir)/krusader/icons/hicolor/16x16/actions/kr_syncdirs.png *************** *** 244,247 **** --- 246,250 ---- -rm -f $(kde_datadir)/krusader/icons/hicolor/22x22/actions/kr_combine.png -rm -f $(kde_datadir)/krusader/icons/hicolor/32x32/actions/kr_combine.png + -rm -f $(kde_datadir)/krusader/icons/hicolor/32x32/actions/kr_dependencies.png -rm -f $(kde_datadir)/krusader/icons/hicolor/16x16/actions/kr_syncdirs.png -rm -f $(kde_datadir)/krusader/icons/hicolor/22x22/actions/kr_syncdirs.png |
From: <ck...@us...> - 2004-02-05 20:33:21
|
Update of /cvsroot/krusader/krusader_kde3/krusader In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19799/krusader_kde3/krusader Modified Files: krservices.cpp krservices.h krslots.cpp Log Message: ADDED: konfigurator dependency setting (only for root mode krusader now) Index: krservices.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/krservices.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** krservices.cpp 2 Nov 2002 13:39:02 -0000 1.1 --- krservices.cpp 5 Feb 2004 20:30:44 -0000 1.2 *************** *** 25,38 **** // Krusader includes #include "krservices.h" ! bool KrServices::cmdExist(QString cmdName){ QStringList path = QStringList::split(":",getenv("PATH")); ! for ( QStringList::Iterator it = path.begin(); it != path.end(); ++it ) { ! if( QDir(*it).exists(cmdName) ){ ! return true; ! } ! } ! ! return false; } --- 25,84 ---- // Krusader includes #include "krservices.h" + #include "krusader.h" ! bool KrServices::cmdExist(QString cmdName) ! { ! QString lastGroup = krConfig->group(); ! ! krConfig->setGroup( "Dependencies" ); ! if( QFile( krConfig->readEntry( cmdName, QString::null )).exists() ) ! { ! krConfig->setGroup( lastGroup ); ! return true; ! } ! ! krConfig->setGroup( lastGroup ); ! return !detectFullPathName( cmdName ).isEmpty(); ! } ! ! QString KrServices::detectFullPathName(QString name) ! { QStringList path = QStringList::split(":",getenv("PATH")); ! for ( QStringList::Iterator it = path.begin(); it != path.end(); ++it ) ! { ! if( QDir(*it).exists( name ) ) ! { ! QString dir = *it; ! if( !dir.endsWith( "/" ) ) ! dir+="/"; ! ! return dir+name; ! } ! } ! ! return ""; ! } ! ! QString KrServices::fullPathName( QString name ) ! { ! QString lastGroup = krConfig->group(); ! QString supposedName; ! ! krConfig->setGroup( "Dependencies" ); ! if( QFile( supposedName = krConfig->readEntry( name, "" )).exists() ) ! { ! krConfig->setGroup( lastGroup ); ! return supposedName; ! } ! ! if( ( supposedName = detectFullPathName( name ) ).isEmpty() ) ! { ! krConfig->setGroup( lastGroup ); ! return ""; ! } ! ! krConfig->writeEntry( name, supposedName ); ! krConfig->setGroup( lastGroup ); ! return supposedName; } Index: krservices.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/krservices.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** krservices.h 2 Nov 2002 13:39:02 -0000 1.1 --- krservices.h 5 Feb 2004 20:30:44 -0000 1.2 *************** *** 30,34 **** ~KrServices(){} ! static bool cmdExist(QString cmdName); }; --- 30,36 ---- ~KrServices(){} ! static bool cmdExist(QString cmdName); ! static QString detectFullPathName( QString name ); ! static QString fullPathName( QString name ); }; Index: krslots.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/krslots.cpp,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** krslots.cpp 28 Dec 2003 17:11:47 -0000 1.41 --- krslots.cpp 5 Feb 2004 20:30:44 -0000 1.42 *************** *** 72,75 **** --- 72,76 ---- #include "UserMenu/usermenu.h" #include "Synchronizer/synchronizergui.h" + #include "krservices.h" #define ACTIVE_PANEL (krApp->mainView->activePanel) *************** *** 381,389 **** } ! void KRslots::rootKrusader(){ KShellProcess proc; ! proc << "kdesu" << QString("'") + KCmdLineArgs::appName() + ! " --left=" +MAIN_VIEW->left->func->files()->vfs_getOrigin().url() + ! " --right="+MAIN_VIEW->right->func->files()->vfs_getOrigin().url() + "'"; proc.start(KProcess::DontCare); --- 382,397 ---- } ! void KRslots::rootKrusader() ! { ! if( !KrServices::cmdExist( "krusader" ) || !KrServices::cmdExist( "kdesu" ) ) ! { ! KMessageBox::sorry( krApp, i18n( "Can't start root mode krusader, because krusader or kdesu is missing from the path. Please configure the dependencies in Konfigurator!" ) ); ! return; ! } ! KShellProcess proc; ! proc << KrServices::fullPathName( "kdesu" ) << QString("'") + KrServices::fullPathName( "krusader" ) + ! " --left=\"" +MAIN_VIEW->left->func->files()->vfs_getOrigin().url() + ! "\" --right=\""+MAIN_VIEW->right->func->files()->vfs_getOrigin().url() + "\"'"; proc.start(KProcess::DontCare); |
From: <ck...@us...> - 2004-02-05 20:33:21
|
Update of /cvsroot/krusader/krusader_kde3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19799/krusader_kde3 Modified Files: ChangeLog krusader.kdevprj Log Message: ADDED: konfigurator dependency setting (only for root mode krusader now) Index: ChangeLog =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/ChangeLog,v retrieving revision 1.174 retrieving revision 1.175 diff -C2 -d -r1.174 -r1.175 *** ChangeLog 2 Feb 2004 22:13:24 -0000 1.174 --- ChangeLog 5 Feb 2004 20:30:44 -0000 1.175 *************** *** 1,3 **** ! ADDED: Csaba's new konfigurator is here, boys and girls! ADDED: heiner's quicksearch patch --- 1,3 ---- ! ADDED: application dependency setting in konfigurator (now only for root mode krusader) ADDED: Csaba's new konfigurator is here, boys and girls! ADDED: heiner's quicksearch patch Index: krusader.kdevprj =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader.kdevprj,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** krusader.kdevprj 31 Jan 2004 11:23:46 -0000 1.48 --- krusader.kdevprj 5 Feb 2004 20:30:44 -0000 1.49 *************** *** 602,606 **** [krusader/Konfigurator/Makefile.am] ! files=krusader/Konfigurator/kgadvanced.cpp,krusader/Konfigurator/kgadvanced.h,krusader/Konfigurator/kgarchives.cpp,krusader/Konfigurator/kgarchives.h,krusader/Konfigurator/kggeneral.cpp,krusader/Konfigurator/kggeneral.h,krusader/Konfigurator/kglookfeel.cpp,krusader/Konfigurator/kglookfeel.h,krusader/Konfigurator/kgstartup.cpp,krusader/Konfigurator/kgstartup.h,krusader/Konfigurator/kgwelcome.cpp,krusader/Konfigurator/kgwelcome.h,krusader/Konfigurator/konfigurator.cpp,krusader/Konfigurator/konfigurator.h,krusader/Konfigurator/konfiguratoritems.cpp,krusader/Konfigurator/konfiguratoritems.h,krusader/Konfigurator/konfiguratorpage.cpp,krusader/Konfigurator/konfiguratorpage.h sharedlib_LDFLAGS=-version-info 0:0:0 sharedlib_rootname=Konfigurator --- 602,606 ---- [krusader/Konfigurator/Makefile.am] ! files=krusader/Konfigurator/kgadvanced.cpp,krusader/Konfigurator/kgadvanced.h,krusader/Konfigurator/kgarchives.cpp,krusader/Konfigurator/kgarchives.h,krusader/Konfigurator/kggeneral.cpp,krusader/Konfigurator/kggeneral.h,krusader/Konfigurator/kglookfeel.cpp,krusader/Konfigurator/kglookfeel.h,krusader/Konfigurator/kgstartup.cpp,krusader/Konfigurator/kgstartup.h,krusader/Konfigurator/kgwelcome.cpp,krusader/Konfigurator/kgwelcome.h,krusader/Konfigurator/konfigurator.cpp,krusader/Konfigurator/konfigurator.h,krusader/Konfigurator/konfiguratoritems.cpp,krusader/Konfigurator/konfiguratoritems.h,krusader/Konfigurator/konfiguratorpage.cpp,krusader/Konfigurator/konfiguratorpage.h,krusader/Konfigurator/kgdependencies.h,krusader/Konfigurator/kgdependencies.cpp sharedlib_LDFLAGS=-version-info 0:0:0 sharedlib_rootname=Konfigurator *************** *** 632,635 **** --- 632,647 ---- type=HEADER + [krusader/Konfigurator/kgdependencies.cpp] + dist=true + install=false + install_location= + type=SOURCE + + [krusader/Konfigurator/kgdependencies.h] + dist=true + install=false + install_location= + type=HEADER + [krusader/Konfigurator/kggeneral.cpp] dist=true *************** *** 1352,1356 **** [pics/Makefile.am] dist=true ! files=pics/about.png,pics/arc_pack16x16.png,pics/arc_pack22x22.png,pics/arc_pack32x32.png,pics/arc_test16x16.png,pics/arc_test22x22.png,pics/arc_test32x32.png,pics/arc_unpack16x16.png,pics/arc_unpack22x22.png,pics/arc_unpack32x32.png,pics/calc16x16.png,pics/calc22x22.png,pics/calc32x32.png,pics/compare16x16.png,pics/compare22x22.png,pics/compare32x32.png,pics/comparedirs16x16.png,pics/comparedirs22x22.png,pics/comparedirs32x32.png,pics/ftp_connect16x16.png,pics/ftp_connect22x22.png,pics/ftp_connect32x32.png,pics/ftp_disconnect16x16.png,pics/ftp_disconnect22x22.png,pics/ftp_disconnect32x32.png,pics/ftp_new16x16.png,pics/ftp_new22x22.png,pics/ftp_new32x32.png,pics/konfig_small.jpg,pics/kr_addbookmark16x16.png,pics/kr_addbookmark22x22.png,pics/kr_addbookmark32x32.png,pics/kr_bookman16x16.png,pics/kr_bookman22x22.png,pics/kr_bookman32x32.png,pics/kr_bookmark16x16.png,pics/kr_bookmark22x22.png,pics/kr_bookmark32x32.png,pics/kr_fullview16x16.png,pics/kr_fullview22x22.png,pics/kr_fullview32x32.png,pics/kr_hwinfo16x16.png,pics/kr_hwinfo22x22.png,pics/kr_hwinfo32x32.png,pics/kr_invert16x16.png,pics/kr_invert22x22.png,pics/kr_invert32x32.png,pics/kr_treeview16x16.png,pics/kr_treeview22x22.png,pics/kr_treeview32x32.png,pics/kr_unselect16x16.png,pics/kr_unselect22x22.png,pics/kr_unselect32x32.png,pics/Makefile,pics/Makefile.am,pics/Makefile.in,pics/mountman16x16.png,pics/mountman22x22.png,pics/mountman32x32.png,pics/properties16x16.png,pics/properties22x22.png,pics/properties32x32.png,pics/select16x16.png,pics/select22x22.png,pics/select32x32.png,pics/selectall16x16.png,pics/selectall22x22.png,pics/selectall32x32.png,pics/terminal16x16.png,pics/terminal22x22.png,pics/terminal32x32.png,pics/unselectall16x16.png,pics/unselectall22x22.png,pics/unselectall32x32.png,pics/kr_split16x16.png,pics/kr_split22x22.png,pics/kr_split32x32.png,pics/kr_combine16x16.png,pics/kr_combine22x22.png,pics/kr_combine32x32.png install=false install_location= --- 1364,1368 ---- [pics/Makefile.am] dist=true ! files=pics/about.png,pics/arc_pack16x16.png,pics/arc_pack22x22.png,pics/arc_pack32x32.png,pics/arc_test16x16.png,pics/arc_test22x22.png,pics/arc_test32x32.png,pics/arc_unpack16x16.png,pics/arc_unpack22x22.png,pics/arc_unpack32x32.png,pics/calc16x16.png,pics/calc22x22.png,pics/calc32x32.png,pics/compare16x16.png,pics/compare22x22.png,pics/compare32x32.png,pics/comparedirs16x16.png,pics/comparedirs22x22.png,pics/comparedirs32x32.png,pics/ftp_connect16x16.png,pics/ftp_connect22x22.png,pics/ftp_connect32x32.png,pics/ftp_disconnect16x16.png,pics/ftp_disconnect22x22.png,pics/ftp_disconnect32x32.png,pics/ftp_new16x16.png,pics/ftp_new22x22.png,pics/ftp_new32x32.png,pics/konfig_small.jpg,pics/kr_addbookmark16x16.png,pics/kr_addbookmark22x22.png,pics/kr_addbookmark32x32.png,pics/kr_bookman16x16.png,pics/kr_bookman22x22.png,pics/kr_bookman32x32.png,pics/kr_bookmark16x16.png,pics/kr_bookmark22x22.png,pics/kr_bookmark32x32.png,pics/kr_fullview16x16.png,pics/kr_fullview22x22.png,pics/kr_fullview32x32.png,pics/kr_hwinfo16x16.png,pics/kr_hwinfo22x22.png,pics/kr_hwinfo32x32.png,pics/kr_invert16x16.png,pics/kr_invert22x22.png,pics/kr_invert32x32.png,pics/kr_treeview16x16.png,pics/kr_treeview22x22.png,pics/kr_treeview32x32.png,pics/kr_unselect16x16.png,pics/kr_unselect22x22.png,pics/kr_unselect32x32.png,pics/Makefile,pics/Makefile.am,pics/Makefile.in,pics/mountman16x16.png,pics/mountman22x22.png,pics/mountman32x32.png,pics/properties16x16.png,pics/properties22x22.png,pics/properties32x32.png,pics/select16x16.png,pics/select22x22.png,pics/select32x32.png,pics/selectall16x16.png,pics/selectall22x22.png,pics/selectall32x32.png,pics/terminal16x16.png,pics/terminal22x22.png,pics/terminal32x32.png,pics/unselectall16x16.png,pics/unselectall22x22.png,pics/unselectall32x32.png,pics/kr_split16x16.png,pics/kr_split22x22.png,pics/kr_split32x32.png,pics/kr_combine16x16.png,pics/kr_combine22x22.png,pics/kr_combine32x32.png,pics/kr_dependencies.png,pics/kr_syncdirs16x16.png,pics/kr_syncdirs22x22.png,pics/kr_syncdirs32x32.png install=false install_location= *************** *** 1610,1613 **** --- 1622,1631 ---- type=DATA + [pics/kr_dependencies.png] + dist=true + install=true + install_location=$$(kde_datadir)/krusader/icons/hicolor/32x32/actions/kr_dependencies.png + type=DATA + [pics/kr_fullview16x16.png] dist=true *************** *** 1682,1685 **** --- 1700,1721 ---- type=DATA + [pics/kr_syncdirs16x16.png] + dist=true + install=true + install_location=$$(kde_datadir)/krusader/icons/hicolor/16x16/actions/kr_syncdirs.png + type=DATA + + [pics/kr_syncdirs22x22.png] + dist=true + install=true + install_location=$$(kde_datadir)/krusader/icons/hicolor/22x22/actions/kr_syncdirs.png + type=DATA + + [pics/kr_syncdirs32x32.png] + dist=true + install=true + install_location=$$(kde_datadir)/krusader/icons/hicolor/32x32/actions/kr_syncdirs.png + type=DATA + [pics/kr_treeview16x16.png] dist=true |
From: <er...@us...> - 2004-02-05 16:25:55
|
Update of /cvsroot/krusader/krusader_kde3/krusader In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23115/krusader Modified Files: main.cpp Log Message: fixed: wrong email address Index: main.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/main.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** main.cpp 9 Jan 2004 22:03:53 -0000 1.21 --- main.cpp 5 Feb 2004 16:23:20 -0000 1.22 *************** *** 61,65 **** "kru...@us..."); aboutData.addAuthor("Rafi Yanai","Author", "ya...@us..."); ! aboutData.addAuthor("Shie Erlich","Author", "ma...@us..."); aboutData.addAuthor("Dirk Eschler", "Webmaster and i18n coordinator", "hom...@gm...", 0); aboutData.addAuthor("Karai Csaba", "Developer", "ck...@us...", 0); --- 61,65 ---- "kru...@us..."); aboutData.addAuthor("Rafi Yanai","Author", "ya...@us..."); ! aboutData.addAuthor("Shie Erlich","Author", "er...@us..."); aboutData.addAuthor("Dirk Eschler", "Webmaster and i18n coordinator", "hom...@gm...", 0); aboutData.addAuthor("Karai Csaba", "Developer", "ck...@us...", 0); |
From: <ck...@us...> - 2004-02-05 10:40:44
|
Update of /cvsroot/krusader/krusader_kde3/krusader/Konfigurator In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4550/krusader_kde3/krusader/Konfigurator Modified Files: kglookfeel.cpp Log Message: FIXED: Look & Feel bug Index: kglookfeel.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Konfigurator/kglookfeel.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** kglookfeel.cpp 3 Feb 2004 00:41:04 -0000 1.6 --- kglookfeel.cpp 5 Feb 2004 10:38:10 -0000 1.7 *************** *** 53,57 **** lookAndFeelLayout->setSpacing( 6 ); lookAndFeelLayout->setMargin( 11 ); ! QGroupBox *lookFeelGrp = createFrame( i18n( "Look & Feel" ), tab, "kgLookAndFeelGrp" ); QGridLayout *lookFeelGrid = createGridLayout( lookFeelGrp->layout() ); --- 53,57 ---- lookAndFeelLayout->setSpacing( 6 ); lookAndFeelLayout->setMargin( 11 ); ! QGroupBox *lookFeelGrp = createFrame( i18n( "Look && Feel" ), tab, "kgLookAndFeelGrp" ); QGridLayout *lookFeelGrid = createGridLayout( lookFeelGrp->layout() ); |
From: <ck...@us...> - 2004-02-03 00:43:13
|
Update of /cvsroot/krusader/krusader_kde3/krusader/Konfigurator In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27786/krusader_kde3/krusader/Konfigurator Modified Files: kgadvanced.cpp kgadvanced.h kgarchives.cpp kgarchives.h kggeneral.cpp kglookfeel.cpp kglookfeel.h kgstartup.cpp kgstartup.h konfiguratoritems.cpp konfiguratoritems.h konfiguratorpage.cpp konfiguratorpage.h Log Message: Konfigurator API modification Index: kgadvanced.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Konfigurator/kgadvanced.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** kgadvanced.cpp 31 Jan 2004 20:42:10 -0000 1.5 --- kgadvanced.cpp 3 Feb 2004 00:41:04 -0000 1.6 *************** *** 51,59 **** {{"Advanced","AutoMount", _AutoMount, i18n( "Automount filesystems" ), false, i18n( "If checked, Krusader will mount FSTAB mount-points when needed." )}}; ! QWidget *generals = createCheckBoxGroup( 2, 0, generalSettings, 1, generalCbs, generalGrp ); generalGrid->addWidget( generals, 1, 0 ); #ifdef BSD ! generalCbs.at(0)->setEnabled( false ); /* disable AutoMount on BSD */ #endif --- 51,59 ---- {{"Advanced","AutoMount", _AutoMount, i18n( "Automount filesystems" ), false, i18n( "If checked, Krusader will mount FSTAB mount-points when needed." )}}; ! KonfiguratorCheckBoxGroup *generals = createCheckBoxGroup( 2, 0, generalSettings, 1, generalGrp ); generalGrid->addWidget( generals, 1, 0 ); #ifdef BSD ! generals->find( "AutoMount" )->setEnabled( false ); /* disable AutoMount on BSD */ #endif *************** *** 75,79 **** {"Advanced","Confirm Move", _ConfirmMove, i18n( "Moving file(s)" ), false, ""}}; ! QWidget *confWnd = createCheckBoxGroup( 1, 0, confirmations, 4, confCbs, confirmGrp ); confirmGrid->addWidget( confWnd, 1, 0 ); --- 75,79 ---- {"Advanced","Confirm Move", _ConfirmMove, i18n( "Moving file(s)" ), false, ""}}; ! KonfiguratorCheckBoxGroup *confWnd = createCheckBoxGroup( 1, 0, confirmations, 4, confirmGrp ); confirmGrid->addWidget( confWnd, 1, 0 ); Index: kgadvanced.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Konfigurator/kgadvanced.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** kgadvanced.h 31 Jan 2004 11:22:25 -0000 1.2 --- kgadvanced.h 3 Feb 2004 00:41:04 -0000 1.3 *************** *** 40,47 **** public: KgAdvanced( bool first, QWidget* parent=0, const char* name=0 ); - - protected: - QPtrList<KonfiguratorCheckBox> generalCbs; - QPtrList<KonfiguratorCheckBox> confCbs; }; --- 40,43 ---- Index: kgarchives.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Konfigurator/kgarchives.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** kgarchives.cpp 31 Jan 2004 11:22:25 -0000 1.5 --- kgarchives.cpp 3 Feb 2004 00:41:04 -0000 1.6 *************** *** 68,72 **** {"Archives","Do UnAce", _DoUnAce, i18n( "Ace" ), false, ""}}; ! QWidget *cbs = createCheckBoxGroup( 3, 0, packers, 8, packerCbs, generalGrp ); generalGrid->addWidget( cbs, 1, 0 ); --- 68,72 ---- {"Archives","Do UnAce", _DoUnAce, i18n( "Ace" ), false, ""}}; ! cbs = createCheckBoxGroup( 3, 0, packers, 8, generalGrp ); generalGrid->addWidget( cbs, 1, 0 ); *************** *** 93,97 **** {"Archives","Test Archives", _TestArchives, i18n( "Test archive when finished packing" ), false, i18n( "If checked, Krusader will test the archive's intergrity after packing it." )}}; ! QWidget *finetunes = createCheckBoxGroup( 1, 0, finetuners, 2, tunerCbs, fineTuneGrp ); disableNonExistingPackers(); --- 93,97 ---- {"Archives","Test Archives", _TestArchives, i18n( "Test archive when finished packing" ), false, i18n( "If checked, Krusader will test the archive's intergrity after packing it." )}}; ! KonfiguratorCheckBoxGroup *finetunes = createCheckBoxGroup( 1, 0, finetuners, 2, fineTuneGrp ); disableNonExistingPackers(); *************** *** 143,154 **** QStringList lst=KRarcHandler::supportedPackers(); // get list of availble packers ! packerCbs.at( PK_Tar )->setEnabled(PS("tar")); ! packerCbs.at( PK_GZip )->setEnabled(PS("gzip")); ! packerCbs.at( PK_BZip2 )->setEnabled(PS("bzip2")); ! packerCbs.at( PK_UnZip )->setEnabled(PS("unzip")); ! packerCbs.at( PK_RPM )->setEnabled(PS("rpm") || PS("cpio")); ! packerCbs.at( PK_UnRar )->setEnabled(PS("unrar")); ! packerCbs.at( PK_UnAce )->setEnabled(PS("unace")); ! packerCbs.at( PK_UnArj )->setEnabled(PS("unarj")); } --- 143,154 ---- QStringList lst=KRarcHandler::supportedPackers(); // get list of availble packers ! cbs->find( "Do Tar" )->setEnabled(PS("tar")); ! cbs->find( "Do GZip" )->setEnabled(PS("gzip")); ! cbs->find( "Do BZip2" )->setEnabled(PS("bzip2")); ! cbs->find( "Do UnZip" )->setEnabled(PS("unzip")); ! cbs->find( "Do RPM" )->setEnabled(PS("rpm") || PS("cpio")); ! cbs->find( "Do UnRar" )->setEnabled(PS("unrar")); ! cbs->find( "Do UnAce" )->setEnabled(PS("unace")); ! cbs->find( "Do Unarj" )->setEnabled(PS("unarj")); } Index: kgarchives.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Konfigurator/kgarchives.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** kgarchives.h 31 Jan 2004 11:22:25 -0000 1.2 --- kgarchives.h 3 Feb 2004 00:41:04 -0000 1.3 *************** *** 47,67 **** protected: ! QPtrList<KonfiguratorCheckBox> packerCbs; ! QPtrList<KonfiguratorCheckBox> tunerCbs; void disableNonExistingPackers(); }; - typedef enum - { - PK_Tar = 0, - PK_GZip = 1, - PK_BZip2 = 2, - PK_UnZip = 3, - PK_UnRar = 4, - PK_UnArj = 5, - PK_RPM = 6, - PK_UnAce = 7 - } PACKERS; - #endif /* __KGARCHIVES_H__ */ --- 47,54 ---- protected: ! KonfiguratorCheckBoxGroup *cbs; void disableNonExistingPackers(); }; #endif /* __KGARCHIVES_H__ */ Index: kggeneral.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Konfigurator/kggeneral.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** kggeneral.cpp 31 Jan 2004 11:22:25 -0000 1.3 --- kggeneral.cpp 3 Feb 2004 00:41:04 -0000 1.4 *************** *** 58,62 **** KonfiguratorRadioButtons *trashRadio = createRadioButtonGroup( "General", "Move To Trash", "true", 2, 0, deleteMode, 2, generalGrp, "myRadio", false ); ! generalGrid->addMultiCellWidget( trashRadio->getGroupWidget(), 0, 0, 0, 1 ); KonfiguratorCheckBox *checkBox = createCheckBox( "General", "Mimetype Magic", _MimetypeMagic, --- 58,62 ---- KonfiguratorRadioButtons *trashRadio = createRadioButtonGroup( "General", "Move To Trash", "true", 2, 0, deleteMode, 2, generalGrp, "myRadio", false ); ! generalGrid->addMultiCellWidget( trashRadio, 0, 0, 0, 1 ); KonfiguratorCheckBox *checkBox = createCheckBox( "General", "Mimetype Magic", _MimetypeMagic, Index: kglookfeel.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Konfigurator/kglookfeel.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** kglookfeel.cpp 1 Feb 2004 12:06:55 -0000 1.5 --- kglookfeel.cpp 3 Feb 2004 00:41:04 -0000 1.6 *************** *** 66,72 **** {"Look&Feel","Case Sensitive Quicksearch", _CaseSensitiveQuicksearch, i18n( "Case sensitive quicksearch" ), false, ""}}; ! QWidget *cbs = createCheckBoxGroup( 2, 0, settings, 7, settingCbs, lookFeelGrp ); lookFeelGrid->addWidget( cbs, 0, 0 ); ! connect( settingCbs.at( 5 ), SIGNAL( stateChanged( int ) ), this, SLOT( slotDisable() ) ); lookFeelGrid->addWidget( createLine( lookFeelGrp, "lookSep1" ), 1, 0 ); --- 66,72 ---- {"Look&Feel","Case Sensitive Quicksearch", _CaseSensitiveQuicksearch, i18n( "Case sensitive quicksearch" ), false, ""}}; ! cbs = createCheckBoxGroup( 2, 0, settings, 7, lookFeelGrp ); lookFeelGrid->addWidget( cbs, 0, 0 ); ! connect( cbs->find( "New Style Quicksearch" ), SIGNAL( stateChanged( int ) ), this, SLOT( slotDisable() ) ); lookFeelGrid->addWidget( createLine( lookFeelGrp, "lookSep1" ), 1, 0 ); *************** *** 102,108 **** KonfiguratorRadioButtons *mouseRadio = createRadioButtonGroup( "Look&Feel", "Mouse Selection", "0", 1, 0, mouseSelection, 3, lookFeelGrp, "myLook&FeelRadio", false ); ! lookFeelGrid->addWidget( mouseRadio->getGroupWidget(), 7, 0 ); for( int i=0; i!=3; i++ ) ! mouseRadio->radioButtons.at(i)->setEnabled( false ); /* disable all buttons */ lookAndFeelLayout->addWidget( lookFeelGrp, 0, 0 ); --- 102,108 ---- KonfiguratorRadioButtons *mouseRadio = createRadioButtonGroup( "Look&Feel", "Mouse Selection", "0", 1, 0, mouseSelection, 3, lookFeelGrp, "myLook&FeelRadio", false ); ! lookFeelGrid->addWidget( mouseRadio, 7, 0 ); for( int i=0; i!=3; i++ ) ! mouseRadio->find(i)->setEnabled( false ); /* disable all buttons */ lookAndFeelLayout->addWidget( lookFeelGrp, 0, 0 ); *************** *** 159,164 **** void KgLookFeel::slotDisable() { ! bool isNewStyleQuickSearch = settingCbs.at( 5 )->isChecked(); ! settingCbs.at( 6 )->setEnabled( isNewStyleQuickSearch ); } --- 159,164 ---- void KgLookFeel::slotDisable() { ! bool isNewStyleQuickSearch = cbs->find( "New Style Quicksearch" )->isChecked(); ! cbs->find( "Case Sensitive Quicksearch" )->setEnabled( isNewStyleQuickSearch ); } Index: kglookfeel.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Konfigurator/kglookfeel.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** kglookfeel.h 1 Feb 2004 12:06:55 -0000 1.3 --- kglookfeel.h 3 Feb 2004 00:41:04 -0000 1.4 *************** *** 47,51 **** protected: ! QPtrList<KonfiguratorCheckBox> settingCbs; QGridLayout *toolBarLayout; QWidget *tab_2; --- 47,52 ---- protected: ! KonfiguratorCheckBoxGroup *cbs; ! QGridLayout *toolBarLayout; QWidget *tab_2; Index: kgstartup.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Konfigurator/kgstartup.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** kgstartup.cpp 1 Feb 2004 02:05:41 -0000 1.5 --- kgstartup.cpp 3 Feb 2004 00:41:04 -0000 1.6 *************** *** 52,57 **** saveRadio = createRadioButtonGroup( "Startup", "Panels Save Settings", "false", 1, 0, savePanels, 2, panelsGrp, "mySaveRadio", false ); ! panelsGrid->addMultiCellWidget( saveRadio->getGroupWidget(), 0, 0, 0, 3 ); ! connect( saveRadio->radioButtons.at( 1 ), SIGNAL( stateChanged( int ) ), this, SLOT( slotDisable() ) ); KONFIGURATOR_NAME_VALUE_PAIR opCombo[] = --- 52,57 ---- saveRadio = createRadioButtonGroup( "Startup", "Panels Save Settings", "false", 1, 0, savePanels, 2, panelsGrp, "mySaveRadio", false ); ! panelsGrid->addMultiCellWidget( saveRadio, 0, 0, 0, 3 ); ! connect( saveRadio->find( i18n( "Start with the following settings:" ) ), SIGNAL( stateChanged( int ) ), this, SLOT( slotDisable() ) ); KONFIGURATOR_NAME_VALUE_PAIR opCombo[] = *************** *** 82,87 **** panelsGrid->addWidget( rightHomePage, 2, 3 ); - slotDisable(); - kgStartupLayout->addWidget( panelsGrp, 0, 0 ); --- 82,85 ---- *************** *** 101,107 **** {"Startup","Show FN Keys", _ShowFNkeys, i18n( "Restore last position and size" ), false, ""}}; ! QWidget *uiCbWnd = createCheckBoxGroup( 1, 0, uiCheckBoxes, 7, uiCbs, uiGrp ); ! uiGrid->addWidget( uiCbWnd, 1, 0 ); kgStartupLayout->addWidget( uiGrp, 1, 0 ); --- 99,107 ---- {"Startup","Show FN Keys", _ShowFNkeys, i18n( "Restore last position and size" ), false, ""}}; ! uiCbGroup = createCheckBoxGroup( 1, 0, uiCheckBoxes, 7, uiGrp ); ! uiGrid->addWidget( uiCbGroup, 1, 0 ); ! ! slotDisable(); kgStartupLayout->addWidget( uiGrp, 1, 0 ); *************** *** 110,114 **** void KgStartup::slotDisable() { ! bool isDontSave = saveRadio->radioButtons.at( 1 )->isChecked(); bool isLeftHp = leftOrigin->currentText() ==i18n("homepage"); bool isRightHp = rightOrigin->currentText()==i18n("homepage"); --- 110,114 ---- void KgStartup::slotDisable() { ! bool isDontSave = saveRadio->find( i18n( "Start with the following settings:" ) )->isChecked(); bool isLeftHp = leftOrigin->currentText() ==i18n("homepage"); bool isRightHp = rightOrigin->currentText()==i18n("homepage"); *************** *** 126,135 **** rightHomePage->button()->setEnabled( isDontSave && isRightHp ); ! KonfiguratorCheckBox *cbs = uiCbs.first(); ! while( cbs ) ! { ! cbs->setEnabled( isDontSave ); ! cbs = uiCbs.next(); ! } } --- 126,132 ---- rightHomePage->button()->setEnabled( isDontSave && isRightHp ); ! int i=0; ! while( uiCbGroup->find( i ) ) ! uiCbGroup->find( i++ )->setEnabled( isDontSave ); } Index: kgstartup.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Konfigurator/kgstartup.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** kgstartup.h 31 Jan 2004 11:22:25 -0000 1.2 --- kgstartup.h 3 Feb 2004 00:41:04 -0000 1.3 *************** *** 45,51 **** protected: - QPtrList<KonfiguratorCheckBox> uiCbs; - KonfiguratorRadioButtons *saveRadio; QLabel *leftPanelLbl; --- 45,50 ---- protected: KonfiguratorRadioButtons *saveRadio; + KonfiguratorCheckBoxGroup *uiCbGroup; QLabel *leftPanelLbl; Index: konfiguratoritems.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Konfigurator/konfiguratoritems.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** konfiguratoritems.cpp 1 Feb 2004 02:05:41 -0000 1.3 --- konfiguratoritems.cpp 3 Feb 2004 00:41:04 -0000 1.4 *************** *** 164,175 **** } // KonfiguratorRadioButtons class /////////////////////////////// ! KonfiguratorRadioButtons::KonfiguratorRadioButtons( QString cls, QString name, QString dflt, ! QButtonGroup *grp, bool rst ) : KonfiguratorExtension( this, cls, name, rst ), ! buttonGroup( grp ) { ! defaultValue = dflt; } --- 164,211 ---- } + // KonfiguratorCheckBoxGroup class + /////////////////////////////// + + void KonfiguratorCheckBoxGroup::add( KonfiguratorCheckBox *checkBox ) + { + checkBoxList.append( checkBox ); + } + + KonfiguratorCheckBox * KonfiguratorCheckBoxGroup::find( int index ) + { + return checkBoxList.at( index ); + } + + KonfiguratorCheckBox * KonfiguratorCheckBoxGroup::find( QString name ) + { + KonfiguratorCheckBox *checkBox = checkBoxList.first(); + + while( checkBox ) + { + if( checkBox->extension()->getCfgName() == name ) + return checkBox; + checkBox = checkBoxList.next(); + } + + return 0; + } + + // KonfiguratorRadioButtons class /////////////////////////////// ! KonfiguratorRadioButtons::KonfiguratorRadioButtons( QString cls, QString name, ! QString dflt, QWidget *parent, const char *widgetName, bool rst ) : ! QButtonGroup( parent, widgetName ), defaultValue( dflt ) { ! ext = new KonfiguratorExtension( this, cls, name, rst ); ! connect( ext, SIGNAL( applyAuto(QObject *,QString, QString) ), this, SLOT( slotApply(QObject *,QString, QString) ) ); ! connect( ext, SIGNAL( setDefaultsAuto(QObject *) ), this, SLOT( slotSetDefaults(QObject *) ) ); ! connect( ext, SIGNAL( setInitialValue(QObject *) ), this, SLOT( loadInitialValue() ) ); ! } ! ! KonfiguratorRadioButtons::~KonfiguratorRadioButtons() ! { ! delete ext; } *************** *** 179,183 **** radioValues.push_back( value ); ! connect( radioWidget, SIGNAL( stateChanged(int) ), this, SLOT( setChanged() ) ); } --- 215,238 ---- radioValues.push_back( value ); ! connect( radioWidget, SIGNAL( stateChanged(int) ), ext, SLOT( setChanged() ) ); ! } ! ! QRadioButton * KonfiguratorRadioButtons::find( int index ) ! { ! return radioButtons.at( index ); ! } ! ! QRadioButton * KonfiguratorRadioButtons::find( QString name ) ! { ! QRadioButton *radioButton = radioButtons.first(); ! ! while( radioButton ) ! { ! if( radioButton->text() == name ) ! return radioButton; ! radioButton = radioButtons.next(); ! } ! ! return 0; } *************** *** 205,226 **** void KonfiguratorRadioButtons::loadInitialValue() { ! krConfig->setGroup( configClass ); ! QString initValue = krConfig->readEntry( configName, defaultValue ); selectButton( initValue ); ! setChanged( false ); } ! bool KonfiguratorRadioButtons::apply() { - if( !changed ) - return false; - - if( applyConnected ) - { - emit applyManually( objectPtr, configClass, configName ); - return restartNeeded; - } - QRadioButton *btn = radioButtons.first(); int cnt = 0; --- 260,272 ---- void KonfiguratorRadioButtons::loadInitialValue() { ! krConfig->setGroup( ext->getCfgClass() ); ! QString initValue = krConfig->readEntry( ext->getCfgName(), defaultValue ); selectButton( initValue ); ! ext->setChanged( false ); } ! void KonfiguratorRadioButtons::slotApply(QObject *,QString cls, QString name) { QRadioButton *btn = radioButtons.first(); int cnt = 0; *************** *** 230,235 **** if( btn->isChecked() ) { ! krConfig->setGroup( configClass ); ! krConfig->writeEntry( configName, radioValues[ cnt ] ); break; } --- 276,281 ---- if( btn->isChecked() ) { ! krConfig->setGroup( cls ); ! krConfig->writeEntry( name, radioValues[ cnt ] ); break; } *************** *** 238,254 **** cnt++; } - setChanged( false ); - - return restartNeeded; } ! void KonfiguratorRadioButtons::setDefaults() { - if( setDefaultsConnected ) - { - emit setDefaultsManually( objectPtr ); - return; - } - selectButton( defaultValue ); } --- 284,291 ---- cnt++; } } ! void KonfiguratorRadioButtons::slotSetDefaults(QObject *) { selectButton( defaultValue ); } Index: konfiguratoritems.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Konfigurator/konfiguratoritems.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** konfiguratoritems.h 31 Jan 2004 20:42:10 -0000 1.2 --- konfiguratoritems.h 3 Feb 2004 00:41:04 -0000 1.3 *************** *** 141,170 **** }; // KonfiguratorRadioButtons class /////////////////////////////// ! class KonfiguratorRadioButtons : public KonfiguratorExtension { Q_OBJECT public: ! KonfiguratorRadioButtons( QString cls, QString name, QString dflt, QButtonGroup *grp, bool rst=false ); ! void addRadioButton( QRadioButton *radioWidget, QString value ); ! virtual void loadInitialValue(); ! virtual bool apply(); ! virtual void setDefaults(); ! QButtonGroup* getGroupWidget() { return buttonGroup; } ! void selectButton( QString value ); ! QPtrList<QRadioButton> radioButtons; ! QValueVector<QString> radioValues; protected: QString defaultValue; QButtonGroup *buttonGroup; }; --- 141,195 ---- }; + // KonfiguratorCheckBoxGroup class + /////////////////////////////// + + class KonfiguratorCheckBoxGroup : public QWidget + { + public: + KonfiguratorCheckBoxGroup( QWidget * parent = 0, const char * name = 0 ) : + QWidget( parent, name ) {}; + + void add( KonfiguratorCheckBox * ); + KonfiguratorCheckBox * find( int index ); + KonfiguratorCheckBox * find( QString name ); + + private: + QPtrList<KonfiguratorCheckBox> checkBoxList; + }; + // KonfiguratorRadioButtons class /////////////////////////////// ! class KonfiguratorRadioButtons : public QButtonGroup { Q_OBJECT public: ! KonfiguratorRadioButtons( QString cls, QString name, QString dflt, QWidget *parent=0, ! const char *widgetName=0, bool rst=false ); ! ~KonfiguratorRadioButtons(); ! inline KonfiguratorExtension *extension() {return ext;} ! void addRadioButton( QRadioButton *radioWidget, QString value ); ! void selectButton( QString value ); ! QRadioButton* find( int index ); ! QRadioButton* find( QString name ); ! public slots: ! virtual void loadInitialValue(); ! void slotApply(QObject *,QString, QString); ! void slotSetDefaults(QObject *); protected: + QPtrList<QRadioButton> radioButtons; + QValueVector<QString> radioValues; + QString defaultValue; QButtonGroup *buttonGroup; + + KonfiguratorExtension *ext; }; *************** *** 194,198 **** ! // KonfiguratorEditBox class /////////////////////////////// --- 219,223 ---- ! // KonfiguratorURLRequester class /////////////////////////////// *************** *** 249,252 **** --- 274,280 ---- }; + // KONFIGURATOR_NAME_VALUE_PAIR structure + /////////////////////////////// + struct KONFIGURATOR_NAME_VALUE_PAIR { Index: konfiguratorpage.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Konfigurator/konfiguratorpage.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** konfiguratorpage.cpp 31 Jan 2004 20:42:10 -0000 1.3 --- konfiguratorpage.cpp 3 Feb 2004 00:41:04 -0000 1.4 *************** *** 176,190 **** } ! QWidget* KonfiguratorPage::createCheckBoxGroup( int sizex, int sizey, ! KONFIGURATOR_CHECKBOX_PARAM *params, int paramNum, QPtrList<KonfiguratorCheckBox> &cbList, ! QWidget *parent, const char *widgetName ) { ! QWidget *groupWidget = new QWidget( parent, widgetName ); QGridLayout *layout = new QGridLayout( groupWidget ); layout->setSpacing( 11 ); layout->setMargin( 0 ); - cbList.clear(); - int x = 0, y = 0; --- 176,188 ---- } ! KonfiguratorCheckBoxGroup* KonfiguratorPage::createCheckBoxGroup( int sizex, int sizey, ! KONFIGURATOR_CHECKBOX_PARAM *params, int paramNum, QWidget *parent, ! const char *widgetName ) { ! KonfiguratorCheckBoxGroup *groupWidget = new KonfiguratorCheckBoxGroup( parent, widgetName ); QGridLayout *layout = new QGridLayout( groupWidget ); layout->setSpacing( 11 ); layout->setMargin( 0 ); int x = 0, y = 0; *************** *** 195,199 **** params[i].restart, params[i].toolTip ); ! cbList.append( checkBox ); layout->addWidget( checkBox, y, x ); --- 193,197 ---- params[i].restart, params[i].toolTip ); ! groupWidget->add( checkBox ); layout->addWidget( checkBox, y, x ); *************** *** 217,229 **** int paramNum, QWidget *parent, const char *widgetName, bool rst ) { ! QButtonGroup *groupWidget = new QButtonGroup( parent, widgetName ); ! groupWidget->setFrameShape( QButtonGroup::NoFrame ); ! groupWidget->setFrameShadow( QButtonGroup::Sunken ); ! groupWidget->setTitle( "" ); ! groupWidget->setExclusive( true ); ! groupWidget->setRadioButtonExclusive( true ); ! groupWidget->setColumnLayout(0, Qt::Vertical ); ! QGridLayout *layout = new QGridLayout( groupWidget->layout() ); layout->setAlignment( Qt::AlignTop ); layout->setSpacing( 11 ); --- 215,227 ---- int paramNum, QWidget *parent, const char *widgetName, bool rst ) { ! KonfiguratorRadioButtons *radioWidget = new KonfiguratorRadioButtons( cls, name, dflt, parent, widgetName, rst ); ! radioWidget->setFrameShape( QButtonGroup::NoFrame ); ! radioWidget->setFrameShadow( QButtonGroup::Sunken ); ! radioWidget->setTitle( "" ); ! radioWidget->setExclusive( true ); ! radioWidget->setRadioButtonExclusive( true ); ! radioWidget->setColumnLayout(0, Qt::Vertical ); ! QGridLayout *layout = new QGridLayout( radioWidget->layout() ); layout->setAlignment( Qt::AlignTop ); layout->setSpacing( 11 ); *************** *** 232,240 **** int x = 0, y = 0; - KonfiguratorRadioButtons *radioWidget = new KonfiguratorRadioButtons( cls, name, dflt, groupWidget, rst ); - for( int i=0; i != paramNum; i++ ) { ! QRadioButton *radBtn = new QRadioButton( params[i].text, groupWidget, QString( cls + "/" + name + "/" + params[i].value ).ascii() ); --- 230,236 ---- int x = 0, y = 0; for( int i=0; i != paramNum; i++ ) { ! QRadioButton *radBtn = new QRadioButton( params[i].text, radioWidget, QString( cls + "/" + name + "/" + params[i].value ).ascii() ); *************** *** 256,260 **** radioWidget->loadInitialValue(); ! registerObject( radioWidget ); return radioWidget; } --- 252,256 ---- radioWidget->loadInitialValue(); ! registerObject( radioWidget->extension() ); return radioWidget; } Index: konfiguratorpage.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Konfigurator/konfiguratorpage.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** konfiguratorpage.h 31 Jan 2004 20:42:10 -0000 1.3 --- konfiguratorpage.h 3 Feb 2004 00:41:04 -0000 1.4 *************** *** 326,334 **** * At horizontal placing the sizex integer defines the maximum element number in * one row, sizey is 0. At vertical placing sizex is 0, and sizey defines the ! * maximum row number in one column. The references of the checkboxes are placed ! * into a pointer list, given by the user.<br> * ! * One specific element can be reached by the reference list. The first element is ! * cbList.at(0), the second is cbList.at(1), ... * * Sample:<br><br> --- 326,333 ---- * At horizontal placing the sizex integer defines the maximum element number in * one row, sizey is 0. At vertical placing sizex is 0, and sizey defines the ! * maximum row number in one column. <br> * ! * One specific element can be reached by its name or index with the find methods. ! * The first element is checkBoxGroup->find( 0 ), "myCb" element is checkBoxGroup->find( "myCb" ) ... * * Sample:<br><br> *************** *** 337,343 **** * {"CbClass","CbName2", true, i18n( "name2" ), false, "tooltip2"},<br> * {"CbClass","CbName3", true, i18n( "name3" ), false, "tooltip3"}};<br><br> ! * QPtrList<KonfiguratorCheckBox> myCheckboxes;<br> ! * QFrame *myCheckBoxGroup = createCheckBoxGroup( 1, 0, myCBArray, 3, myCheckboxes, myParent, "myCheckboxGroup" );<br> ! * myCheckboxes.at( 0 )->setEnabled( false );<br><br> * myLayout->addWidget( myCheckBoxGroup, 0, 0 );<br> * --- 336,341 ---- * {"CbClass","CbName2", true, i18n( "name2" ), false, "tooltip2"},<br> * {"CbClass","CbName3", true, i18n( "name3" ), false, "tooltip3"}};<br><br> ! * KonfiguratorCheckBoxGroup *myCheckBoxGroup = createCheckBoxGroup( 1, 0, myCBArray, 3, myParent, "myCheckboxGroup" );<br> ! * myCheckBoxGroup->find( 0 )->setEnabled( false );<br><br> * myLayout->addWidget( myCheckBoxGroup, 0, 0 );<br> * *************** *** 346,350 **** * @param params pointer to the checkbox array * @param paramNum number of the checkbox elements - * @param cbList reference to the pointerlist where the checkboxes will be placed * @param parent Reference to the parent widget * @param widgetName The name of the newly created checkbox group widget --- 344,347 ---- *************** *** 352,358 **** * @return reference to the newly created checkbox group widget */ ! QWidget *createCheckBoxGroup( int sizex, int sizey, KONFIGURATOR_CHECKBOX_PARAM *params, int paramNum, - QPtrList<KonfiguratorCheckBox> &cbList, QWidget *parent=0, const char *widgetName=0 ); /** --- 349,354 ---- * @return reference to the newly created checkbox group widget */ ! KonfiguratorCheckBoxGroup *createCheckBoxGroup( int sizex, int sizey, KONFIGURATOR_CHECKBOX_PARAM *params, int paramNum, QWidget *parent=0, const char *widgetName=0 ); /** *************** *** 364,370 **** * maximum row number in one column.<br> * ! * The references of the buttons can be accessed by the radioButtons fields of the ! * KonfiguratorRadioButtons object. The first element is myRadioGrp->radioButtons.at(0), ! * the second is myRadioGrp->radioButtons.at(1), ... * * Sample:<br><br> --- 360,365 ---- * maximum row number in one column.<br> * ! * The references of the buttons can be accessed by the find methods of KonfiguratorRadioButtons. ! * The first element is myRadioGrp->find( 0 ), "myRadio" element is myRadioGrp->find( "myRadio" ) ... * * Sample:<br><br> *************** *** 374,379 **** * { i18n( "radio text3" ), "value3" }};<br><br> * KonfiguratorRadioButtons *myRadioGroup = createRadioButtonGroup( "class", "name", "value1", 1, 0, radioInfo, 3, myParent, "myRadioGroup" );<br> ! * myRadioGroup->radioButtons.at( 0 )->setEnabled( false );<br> ! * myLayout->addWidget( myRadioGroup->getGroupWidget(), 0, 0 );<br> * * @param cls The class name used in KConfig (ex. "Archives") --- 369,374 ---- * { i18n( "radio text3" ), "value3" }};<br><br> * KonfiguratorRadioButtons *myRadioGroup = createRadioButtonGroup( "class", "name", "value1", 1, 0, radioInfo, 3, myParent, "myRadioGroup" );<br> ! * myRadioGroup->find( i18n( "radio text1" ) )->setEnabled( false );<br> ! * myLayout->addWidget( myRadioGroup, 0, 0 );<br> * * @param cls The class name used in KConfig (ex. "Archives") |
From: <ck...@us...> - 2004-02-02 22:15:33
|
Update of /cvsroot/krusader/krusader_kde3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3156/krusader_kde3 Modified Files: ChangeLog Log Message: FIXED: krusaderui.rc bug, new menuitems does not appear after krusader update Index: ChangeLog =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/ChangeLog,v retrieving revision 1.173 retrieving revision 1.174 diff -C2 -d -r1.173 -r1.174 *** ChangeLog 31 Jan 2004 11:23:46 -0000 1.173 --- ChangeLog 2 Feb 2004 22:13:24 -0000 1.174 *************** *** 1,5 **** ! ADDED: Csaba's new konfigurator is here, boys and girls! ! ADDED: heiner's quicksearch patch ! ADDED: calculate occupied space prints the directory's size (wincmd-style) - thanks heiner! ADDED: current directory in history menu is checked ADDED: a working user menu (try alt+~), but a bit rough on the edges --- 1,6 ---- ! ! ADDED: Csaba's new konfigurator is here, boys and girls! ! ADDED: heiner's quicksearch patch ! ADDED: calculate occupied space prints the directory's size (wincmd-style) - thanks heiner! ADDED: current directory in history menu is checked ADDED: a working user menu (try alt+~), but a bit rough on the edges *************** *** 11,17 **** ADDED: file splitter ADDED: a missing credit for Frank in the about box ! FIXED: sort by EXT did not obey the 'case sensative sort' flag ! FIXED: 2 items on the view menu had the same shortcuts ! FIXED: increased speed of search, by emitting less signals (thanks to Lars) FIXED: statusbar updated only on mouse clicks, not on keyboard FIXED: translation: forcing non-english languages with a strange structure --- 12,19 ---- ADDED: file splitter ADDED: a missing credit for Frank in the about box ! FIXED: krusaderui.rc bug, new menuitems does not appear after a krusader update ! FIXED: sort by EXT did not obey the 'case sensative sort' flag ! FIXED: 2 items on the view menu had the same shortcuts ! FIXED: increased speed of search, by emitting lesssignals (thanks to Lars) FIXED: statusbar updated only on mouse clicks, not on keyboard FIXED: translation: forcing non-english languages with a strange structure |
From: <ck...@us...> - 2004-02-02 22:15:31
|
Update of /cvsroot/krusader/krusader_kde3/krusader In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3156/krusader_kde3/krusader Modified Files: krusaderui.rc Log Message: FIXED: krusaderui.rc bug, new menuitems does not appear after krusader update Index: krusaderui.rc =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/krusaderui.rc,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** krusaderui.rc 6 Dec 2003 13:55:56 -0000 1.16 --- krusaderui.rc 2 Feb 2004 22:13:25 -0000 1.17 *************** *** 1,3 **** ! <!DOCTYPE kpartgui ><kpartgui version="1.01" name="krusader" > <MenuBar> <Menu name="file" > --- 1,3 ---- ! <!DOCTYPE kpartgui ><kpartgui version="2" name="krusader" > <MenuBar> <Menu name="file" > |
From: <ck...@pr...> - 2004-02-01 12:34:19
|
Update of /cvsroot/krusader/krusader_kde3/krusader/Konfigurator In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22847/krusader_kde3/krusader/Konfigurator Modified Files: kglookfeel.cpp kglookfeel.h Log Message: FIXED: Heiner's Quick search modifications Index: kglookfeel.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Konfigurator/kglookfeel.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** kglookfeel.cpp 31 Jan 2004 20:42:10 -0000 1.4 --- kglookfeel.cpp 1 Feb 2004 12:06:55 -0000 1.5 *************** *** 62,69 **** {"Look&Feel","Show Hidden", _ShowHidden, i18n( "Show hidden files" ), false, ""}, {"Look&Feel","Mark Dirs", _MarkDirs, i18n( "Automark directories" ), false, ""}, ! {"Look&Feel","Case Sensative Sort", _CaseSensativeSort, i18n( "Case sensitive sorting" ), false, ""}}; ! QWidget *cbs = createCheckBoxGroup( 2, 0, settings, 5, settingCbs, lookFeelGrp ); lookFeelGrid->addWidget( cbs, 0, 0 ); lookFeelGrid->addWidget( createLine( lookFeelGrp, "lookSep1" ), 1, 0 ); --- 62,72 ---- {"Look&Feel","Show Hidden", _ShowHidden, i18n( "Show hidden files" ), false, ""}, {"Look&Feel","Mark Dirs", _MarkDirs, i18n( "Automark directories" ), false, ""}, ! {"Look&Feel","Case Sensative Sort", _CaseSensativeSort, i18n( "Case sensitive sorting" ), false, ""}, ! {"Look&Feel","New Style Quicksearch", _NewStyleQuicksearch, i18n( "New style quicksearch" ), false, ""}, ! {"Look&Feel","Case Sensitive Quicksearch", _CaseSensitiveQuicksearch, i18n( "Case sensitive quicksearch" ), false, ""}}; ! QWidget *cbs = createCheckBoxGroup( 2, 0, settings, 7, settingCbs, lookFeelGrp ); lookFeelGrid->addWidget( cbs, 0, 0 ); + connect( settingCbs.at( 5 ), SIGNAL( stateChanged( int ) ), this, SLOT( slotDisable() ) ); lookFeelGrid->addWidget( createLine( lookFeelGrp, "lookSep1" ), 1, 0 ); *************** *** 74,78 **** createSpacer ( hbox ); lookFeelGrid->addWidget( hbox, 2, 0 ); ! QHBox *hbox2 = new QHBox( lookFeelGrp, "lookAndFeelHBox2" ); QLabel *lbl1 = new QLabel( i18n( "Filelist icon size:" ), hbox2, "lookAndFeelLabel2" ); --- 77,81 ---- createSpacer ( hbox ); lookFeelGrid->addWidget( hbox, 2, 0 ); ! QHBox *hbox2 = new QHBox( lookFeelGrp, "lookAndFeelHBox2" ); QLabel *lbl1 = new QLabel( i18n( "Filelist icon size:" ), hbox2, "lookAndFeelLabel2" ); *************** *** 124,128 **** keyBindingsLayout->addWidget(keyBindings->keyChooserWidget(),0,0); registerObject( keyBindings ); ! kgLookAndFeelLayout->addWidget( tabWidget, 0, 0 ); } --- 127,133 ---- keyBindingsLayout->addWidget(keyBindings->keyChooserWidget(),0,0); registerObject( keyBindings ); ! ! slotDisable(); ! kgLookAndFeelLayout->addWidget( tabWidget, 0, 0 ); } *************** *** 152,154 **** --- 157,165 ---- } + void KgLookFeel::slotDisable() + { + bool isNewStyleQuickSearch = settingCbs.at( 5 )->isChecked(); + settingCbs.at( 6 )->setEnabled( isNewStyleQuickSearch ); + } + #include "kglookfeel.moc" Index: kglookfeel.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Konfigurator/kglookfeel.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** kglookfeel.h 31 Jan 2004 11:22:25 -0000 1.2 --- kglookfeel.h 1 Feb 2004 12:06:55 -0000 1.3 *************** *** 56,59 **** --- 56,60 ---- void slotReload( KonfiguratorEditToolbarWidget * oldEditToolbar ); void slotReload( KonfiguratorKeyChooser * oldChooser ); + void slotDisable(); }; *************** *** 61,65 **** { Q_OBJECT ! public: KonfiguratorEditToolbarWidget( KXMLGUIFactory *factory, QWidget *parent, bool restart=false ) : --- 62,66 ---- { Q_OBJECT ! public: KonfiguratorEditToolbarWidget( KXMLGUIFactory *factory, QWidget *parent, bool restart=false ) : |
From: <ck...@pr...> - 2004-02-01 12:34:03
|
Update of /cvsroot/krusader/krusader_kde3/krusader In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22847/krusader_kde3/krusader Modified Files: defaults.h Log Message: FIXED: Heiner's Quick search modifications Index: defaults.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/defaults.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** defaults.h 16 Dec 2003 16:35:03 -0000 1.6 --- defaults.h 1 Feb 2004 12:06:54 -0000 1.7 *************** *** 93,96 **** --- 93,100 ---- // Temp Directory ///// #define _TempDirectory "/tmp/krusader.tmp" + // Classic Quicksearch + #define _NewStyleQuicksearch true + // Case Sensitive quick search, if _NewStyleQuicksearch is true + #define _CaseSensitiveQuicksearch false /////////////////////// [Advanced] |
From: <ck...@pr...> - 2004-02-01 12:08:47
|
Update of /cvsroot/krusader/krusader_kde3/krusader/Panel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22847/krusader_kde3/krusader/Panel Modified Files: krdetailedview.cpp Log Message: FIXED: Heiner's Quick search modifications Index: krdetailedview.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Panel/krdetailedview.cpp,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -d -r1.60 -r1.61 *** krdetailedview.cpp 30 Jan 2004 22:59:38 -0000 1.60 --- krdetailedview.cpp 1 Feb 2004 12:06:55 -0000 1.61 *************** *** 54,76 **** // // Ext Column ! #define _ExtColumn true // Mime Column ! #define _MimeColumn false // Size Column ! #define _SizeColumn true // DateTime Column ! #define _DateTimeColumn true // Perm Column ! #define _PermColumn false // KrPerm Column ! #define _KrPermColumn true // Owner Column ! #define _OwnerColumn false // Group Column ! #define _GroupColumn false // Do Quicksearch ! #define _DoQuicksearch true ! // Classic Quicksearch ! #define _ClassicQuicksearch false ////////////////////////////////////////////////////////////////////////// --- 54,74 ---- // // Ext Column ! #define _ExtColumn true // Mime Column ! #define _MimeColumn false // Size Column ! #define _SizeColumn true // DateTime Column ! #define _DateTimeColumn true // Perm Column ! #define _PermColumn false // KrPerm Column ! #define _KrPermColumn true // Owner Column ! #define _OwnerColumn false // Group Column ! #define _GroupColumn false // Do Quicksearch ! #define _DoQuicksearch true ////////////////////////////////////////////////////////////////////////// *************** *** 413,418 **** void KrDetailedView::prepareForPassive() { ! KConfigGroupSaver grpSvr( _config, nameInKConfig() ); ! if ( !_config->readBoolEntry( "Classic Quicksearch", _ClassicQuicksearch ) ) { if ( krApp->mainView ) { if ( krApp->mainView->activePanel ) { --- 411,416 ---- void KrDetailedView::prepareForPassive() { ! KConfigGroupSaver grpSvr( _config, "Look&Feel" ); ! if ( _config->readBoolEntry( "New Style Quicksearch", _NewStyleQuicksearch ) ) { if ( krApp->mainView ) { if ( krApp->mainView->activePanel ) { *************** *** 632,640 **** ( e->key() == Key_Backspace ) || ( e->key() == Key_Down ) || ! ( e->key() == Key_Period ) ) */{ // are we doing quicksearch? if not, send keys to panel if ( _config->readBoolEntry( "Do Quicksearch", _DoQuicksearch ) ) { // are we using krusader's classic quicksearch, or wincmd style? ! if ( _config->readBoolEntry( "Classic Quicksearch", _ClassicQuicksearch ) ) KListView::keyPressEvent( e ); else { --- 630,639 ---- ( e->key() == Key_Backspace ) || ( e->key() == Key_Down ) || ! ( e->key() == Key_Period ) ) */{ // are we doing quicksearch? if not, send keys to panel if ( _config->readBoolEntry( "Do Quicksearch", _DoQuicksearch ) ) { // are we using krusader's classic quicksearch, or wincmd style? ! KConfigGroupSaver grpSvr( _config, "Look&Feel" ); ! if ( !_config->readBoolEntry( "New Style Quicksearch", _NewStyleQuicksearch ) ) KListView::keyPressEvent( e ); else { *************** *** 745,752 **** void KrDetailedView::quickSearch( const QString & str, int direction ) { - bool caseSensitive = true; // make it configurable!!!! KrViewItem * item = getCurrentKrViewItem(); if ( !direction ) { ! if ( item->name().startsWith( str/*, caseSensitive*/ ) ) return ; direction = 1; --- 744,752 ---- void KrDetailedView::quickSearch( const QString & str, int direction ) { KrViewItem * item = getCurrentKrViewItem(); + KConfigGroupSaver grpSvr( _config, "Look&Feel" ); + bool caseSensitive = _config->readBoolEntry( "Case Sensitive Quicksearch", _CaseSensitiveQuicksearch ); if ( !direction ) { ! if ( caseSensitive?item->name().startsWith( str ):item->name().lower().startsWith( str.lower() ) ) return ; direction = 1; *************** *** 759,763 **** if ( item == startItem ) return ; ! if ( item->name().startsWith( str, caseSensitive ) ) { makeItemVisible( item ); setCurrentItem( item->name() ); --- 759,763 ---- if ( item == startItem ) return ; ! if ( caseSensitive?item->name().startsWith( str ):item->name().lower().startsWith( str.lower() ) ) { makeItemVisible( item ); setCurrentItem( item->name() ); |
From: <ck...@pr...> - 2004-02-01 12:08:46
|
Update of /cvsroot/krusader/krusader_kde3/krusader/Dialogs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22847/krusader_kde3/krusader/Dialogs Modified Files: krspecialwidgets.cpp Log Message: FIXED: Heiner's Quick search modifications Index: krspecialwidgets.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Dialogs/krspecialwidgets.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** krspecialwidgets.cpp 28 Jan 2004 22:49:33 -0000 1.7 --- krspecialwidgets.cpp 1 Feb 2004 12:06:54 -0000 1.8 *************** *** 233,237 **** default: - kdWarning()<<"got " << e->ascii() << ":" << e->text() << endl; keyPressEvent(e); } --- 233,236 ---- |
From: <ck...@pr...> - 2004-02-01 12:08:46
|
Update of /cvsroot/krusader/krusader_kde3/krArc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22847/krusader_kde3/krArc Modified Files: krarc.cpp Log Message: FIXED: Heiner's Quick search modifications Index: krarc.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krArc/krarc.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** krarc.cpp 29 Nov 2003 16:52:03 -0000 1.12 --- krarc.cpp 1 Feb 2004 12:06:54 -0000 1.13 *************** *** 19,23 **** #include <fcntl.h> #include <time.h> ! #include <qdir.h> --- 19,23 ---- #include <fcntl.h> #include <time.h> ! #include <stdlib.h> #include <qdir.h> |
From: <ck...@pr...> - 2004-02-01 08:24:23
|
Update of /cvsroot/krusader/krusader_kde3/krusader/Konfigurator In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28312/krusader_kde3/krusader/Konfigurator Modified Files: konfigurator.cpp Log Message: FIXED: Empty Page bug (inherited from the old Konfigurator) Index: konfigurator.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Konfigurator/konfigurator.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** konfigurator.cpp 31 Jan 2004 20:42:10 -0000 1.6 --- konfigurator.cpp 1 Feb 2004 08:22:26 -0000 1.7 *************** *** 81,86 **** // newContent(new KgWelcome(firstTime, widget->addPage(i18n("Welcome"),i18n("Welcome to Konfigurator"), // QPixmap(krLoader->loadIcon("krusader",KIcon::Desktop,32))))); // startup ! newContent(new KgStartup(firstTime, widget->addPage(i18n("Startup"), i18n("Krusader's setting upon startup"),QPixmap(krLoader->loadIcon("gear", KIcon::Desktop,32))))); --- 81,87 ---- // newContent(new KgWelcome(firstTime, widget->addPage(i18n("Welcome"),i18n("Welcome to Konfigurator"), // QPixmap(krLoader->loadIcon("krusader",KIcon::Desktop,32))))); + QFrame *firstPage; // startup ! newContent(new KgStartup(firstTime, firstPage = widget->addPage(i18n("Startup"), i18n("Krusader's setting upon startup"),QPixmap(krLoader->loadIcon("gear", KIcon::Desktop,32))))); *************** *** 99,103 **** QPixmap(krLoader->loadIcon("tgz",KIcon::Desktop,32))))); ! widget->showPage(0); slotApplyEnable(); } --- 100,104 ---- QPixmap(krLoader->loadIcon("tgz",KIcon::Desktop,32))))); ! widget->showPage( widget->pageIndex( firstPage ) ); slotApplyEnable(); } |
From: <ck...@pr...> - 2004-02-01 02:07:29
|
Update of /cvsroot/krusader/krusader_kde3/krusader/Konfigurator In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6193/krusader_kde3/krusader/Konfigurator Modified Files: kgstartup.cpp konfiguratoritems.cpp Log Message: FIXED: combobox requires activated+highlighted signal to detect the change Index: kgstartup.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Konfigurator/kgstartup.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** kgstartup.cpp 31 Jan 2004 20:42:10 -0000 1.4 --- kgstartup.cpp 1 Feb 2004 02:05:41 -0000 1.5 *************** *** 64,67 **** --- 64,68 ---- leftOrigin = createComboBox( "Startup", "Left Panel Origin", i18n( "homepage" ), opCombo, 3, panelsGrp, false ); connect( leftOrigin, SIGNAL( highlighted( int ) ), this, SLOT( slotDisable() ) ); + connect( leftOrigin, SIGNAL( activated( int ) ), this, SLOT( slotDisable() ) ); panelsGrid->addWidget( leftOrigin, 1, 1 ); leftPanelLbl2 = new QLabel( i18n( "Homepage:" ), panelsGrp, "leftPanelLbl2" ); *************** *** 74,77 **** --- 75,79 ---- rightOrigin = createComboBox( "Startup", "Right Panel Origin", i18n( "homepage" ), opCombo, 3, panelsGrp, false ); connect( rightOrigin, SIGNAL( highlighted( int ) ), this, SLOT( slotDisable() ) ); + connect( rightOrigin, SIGNAL( activated( int ) ), this, SLOT( slotDisable() ) ); panelsGrid->addWidget( rightOrigin, 2, 1 ); rightPanelLbl2 = new QLabel( i18n( "Homepage:" ), panelsGrp, "rightPanelLbl2" ); Index: konfiguratoritems.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Konfigurator/konfiguratoritems.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** konfiguratoritems.cpp 31 Jan 2004 20:42:10 -0000 1.2 --- konfiguratoritems.cpp 1 Feb 2004 02:05:41 -0000 1.3 *************** *** 499,502 **** --- 499,503 ---- connect( this, SIGNAL( highlighted(int) ), ext, SLOT( setChanged() ) ); + connect( this, SIGNAL( activated(int) ), ext, SLOT( setChanged() ) ); connect( this, SIGNAL( textChanged ( const QString & ) ), ext, SLOT( setChanged() ) ); |
From: <ck...@pr...> - 2004-01-31 20:43:58
|
Update of /cvsroot/krusader/krusader_kde3/krusader/Konfigurator In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18743/krusader_kde3/krusader/Konfigurator Modified Files: kgadvanced.cpp kglookfeel.cpp kgstartup.cpp konfigurator.cpp konfiguratoritems.cpp konfiguratoritems.h konfiguratorpage.cpp konfiguratorpage.h Log Message: FIXED: a lot of bug fixes Index: kgadvanced.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Konfigurator/kgadvanced.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** kgadvanced.cpp 31 Jan 2004 11:22:25 -0000 1.4 --- kgadvanced.cpp 31 Jan 2004 20:42:10 -0000 1.5 *************** *** 49,59 **** KONFIGURATOR_CHECKBOX_PARAM generalSettings[] = // cfg_class cfg_name default text restart tooltip ! {{"Advanced","Permission Check", false, i18n( "I AM ROOT - use with caution !" ), false, i18n( "Root Switch: if checked, Krusader will try to act as root - thus attempting to perform actions WITHOUT checking permissions !!!" )}, ! {"Advanced","AutoMount", _AutoMount, i18n( "Automount filesystems" ), false, i18n( "If checked, Krusader will mount FSTAB mount-points when needed." )}}; ! QWidget *generals = createCheckBoxGroup( 2, 0, generalSettings, 2, generalCbs, generalGrp ); generalGrid->addWidget( generals, 1, 0 ); ! generalCbs.at(0)->setEnabled( false ); /* disable Permission Check */ kgAdvancedLayout->addWidget( generalGrp, 0 ,0 ); --- 49,60 ---- KONFIGURATOR_CHECKBOX_PARAM generalSettings[] = // cfg_class cfg_name default text restart tooltip ! {{"Advanced","AutoMount", _AutoMount, i18n( "Automount filesystems" ), false, i18n( "If checked, Krusader will mount FSTAB mount-points when needed." )}}; ! QWidget *generals = createCheckBoxGroup( 2, 0, generalSettings, 1, generalCbs, generalGrp ); generalGrid->addWidget( generals, 1, 0 ); ! #ifdef BSD ! generalCbs.at(0)->setEnabled( false ); /* disable AutoMount on BSD */ ! #endif kgAdvancedLayout->addWidget( generalGrp, 0 ,0 ); Index: kglookfeel.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Konfigurator/kglookfeel.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** kglookfeel.cpp 31 Jan 2004 12:53:11 -0000 1.3 --- kglookfeel.cpp 31 Jan 2004 20:42:10 -0000 1.4 *************** *** 35,38 **** --- 35,39 ---- #include <klocale.h> #include <qtooltip.h> + #include <qvalidator.h> KgLookFeel::KgLookFeel( bool first, QWidget* parent, const char* name ) : *************** *** 82,98 **** { i18n( "32" ), "32" }, { i18n( "48" ), "48" }}; ! createComboBox( "Look&Feel", "Filelist Icon Size", _FilelistIconSize, iconSizes, 4, hbox2, true ); createSpacer ( hbox2 ); lookFeelGrid->addWidget( hbox2, 3, 0 ); - QHBox *hbox3 = new QHBox( lookFeelGrp, "lookAndFeelHBox3" ); - QLabel *lbl2 = new QLabel( i18n( "HTML viewer's min font size:" ), hbox3, "lookAndFeelLabel3" ); - lbl2->setMinimumWidth( 230 ); - KonfiguratorSpinBox *spinBox = createSpinBox( "Look&Feel", "Html Min Font Size", _HtmlMinFontSize, - 1, 100, hbox3, false ); - QToolTip::add( spinBox, i18n( "The minimum font size used by the html viewer." ) ); - createSpacer ( hbox3 ); - lookFeelGrid->addWidget( hbox3, 4, 0 ); - lookFeelGrid->addWidget( createLine( lookFeelGrp, "lookSep1" ), 5, 0 ); --- 83,91 ---- { i18n( "32" ), "32" }, { i18n( "48" ), "48" }}; ! KonfiguratorComboBox *iconCombo = createComboBox( "Look&Feel", "Filelist Icon Size", _FilelistIconSize, iconSizes, 4, hbox2, true, true ); ! iconCombo->lineEdit()->setValidator( new QRegExpValidator( QRegExp( "[1-9]\\d{0,1}" ), iconCombo ) ); createSpacer ( hbox2 ); lookFeelGrid->addWidget( hbox2, 3, 0 ); lookFeelGrid->addWidget( createLine( lookFeelGrp, "lookSep1" ), 5, 0 ); Index: kgstartup.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Konfigurator/kgstartup.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** kgstartup.cpp 31 Jan 2004 11:22:25 -0000 1.3 --- kgstartup.cpp 31 Jan 2004 20:42:10 -0000 1.4 *************** *** 53,57 **** "false", 1, 0, savePanels, 2, panelsGrp, "mySaveRadio", false ); panelsGrid->addMultiCellWidget( saveRadio->getGroupWidget(), 0, 0, 0, 3 ); ! connect( saveRadio->radioButtons.at( 1 ), SIGNAL( toggled( bool ) ), this, SLOT( slotDisable() ) ); KONFIGURATOR_NAME_VALUE_PAIR opCombo[] = --- 53,57 ---- "false", 1, 0, savePanels, 2, panelsGrp, "mySaveRadio", false ); panelsGrid->addMultiCellWidget( saveRadio->getGroupWidget(), 0, 0, 0, 3 ); ! connect( saveRadio->radioButtons.at( 1 ), SIGNAL( stateChanged( int ) ), this, SLOT( slotDisable() ) ); KONFIGURATOR_NAME_VALUE_PAIR opCombo[] = *************** *** 62,67 **** leftPanelLbl = new QLabel( i18n( "Left panel starts at" ), panelsGrp, "leftPanelLbl" ); panelsGrid->addWidget( leftPanelLbl, 1, 0 ); ! leftOrigin = createComboBox( "Startup", "Left Panel Origin", _LeftPanelOrigin, opCombo, 3, panelsGrp, false ); ! connect( leftOrigin, SIGNAL( activated( int ) ), this, SLOT( slotDisable() ) ); panelsGrid->addWidget( leftOrigin, 1, 1 ); leftPanelLbl2 = new QLabel( i18n( "Homepage:" ), panelsGrp, "leftPanelLbl2" ); --- 62,67 ---- leftPanelLbl = new QLabel( i18n( "Left panel starts at" ), panelsGrp, "leftPanelLbl" ); panelsGrid->addWidget( leftPanelLbl, 1, 0 ); ! leftOrigin = createComboBox( "Startup", "Left Panel Origin", i18n( "homepage" ), opCombo, 3, panelsGrp, false ); ! connect( leftOrigin, SIGNAL( highlighted( int ) ), this, SLOT( slotDisable() ) ); panelsGrid->addWidget( leftOrigin, 1, 1 ); leftPanelLbl2 = new QLabel( i18n( "Homepage:" ), panelsGrp, "leftPanelLbl2" ); *************** *** 72,77 **** rightPanelLbl = new QLabel( i18n( "Right panel starts at" ), panelsGrp, "rightPanelLbl" ); panelsGrid->addWidget( rightPanelLbl, 2, 0 ); ! rightOrigin = createComboBox( "Startup", "Right Panel Origin", _RightPanelOrigin, opCombo, 3, panelsGrp, false ); ! connect( rightOrigin, SIGNAL( activated( int ) ), this, SLOT( slotDisable() ) ); panelsGrid->addWidget( rightOrigin, 2, 1 ); rightPanelLbl2 = new QLabel( i18n( "Homepage:" ), panelsGrp, "rightPanelLbl2" ); --- 72,77 ---- rightPanelLbl = new QLabel( i18n( "Right panel starts at" ), panelsGrp, "rightPanelLbl" ); panelsGrid->addWidget( rightPanelLbl, 2, 0 ); ! rightOrigin = createComboBox( "Startup", "Right Panel Origin", i18n( "homepage" ), opCombo, 3, panelsGrp, false ); ! connect( rightOrigin, SIGNAL( highlighted( int ) ), this, SLOT( slotDisable() ) ); panelsGrid->addWidget( rightOrigin, 2, 1 ); rightPanelLbl2 = new QLabel( i18n( "Homepage:" ), panelsGrp, "rightPanelLbl2" ); *************** *** 123,126 **** --- 123,133 ---- rightHomePage->lineEdit()->setEnabled( isDontSave && isRightHp ); rightHomePage->button()->setEnabled( isDontSave && isRightHp ); + + KonfiguratorCheckBox *cbs = uiCbs.first(); + while( cbs ) + { + cbs->setEnabled( isDontSave ); + cbs = uiCbs.next(); + } } Index: konfigurator.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Konfigurator/konfigurator.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** konfigurator.cpp 31 Jan 2004 17:26:45 -0000 1.5 --- konfigurator.cpp 31 Jan 2004 20:42:10 -0000 1.6 *************** *** 60,63 **** --- 60,65 ---- widget=new KJanusWidget(this,0,KJanusWidget::IconList); + setButtonCancelText( i18n( "Close" ) ); + connect( widget, SIGNAL( aboutToShowPage(QWidget *) ), this, SLOT( slotPageSwitch() ) ); connect( &restoreTimer, SIGNAL(timeout()), this, SLOT(slotRestorePage())); Index: konfiguratoritems.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Konfigurator/konfiguratoritems.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** konfiguratoritems.cpp 31 Jan 2004 12:53:11 -0000 1.1 --- konfiguratoritems.cpp 31 Jan 2004 20:42:10 -0000 1.2 *************** *** 92,96 **** connect( ext, SIGNAL( setInitialValue(QObject *) ), this, SLOT( loadInitialValue() ) ); ! connect( this, SIGNAL( toggled(bool) ), ext, SLOT( setChanged() ) ); loadInitialValue(); } --- 92,96 ---- connect( ext, SIGNAL( setInitialValue(QObject *) ), this, SLOT( loadInitialValue() ) ); ! connect( this, SIGNAL( stateChanged( int ) ), ext, SLOT( setChanged() ) ); loadInitialValue(); } *************** *** 179,183 **** radioValues.push_back( value ); ! connect( radioWidget, SIGNAL( toggled(bool) ), this, SLOT( setChanged() ) ); } --- 179,183 ---- radioValues.push_back( value ); ! connect( radioWidget, SIGNAL( stateChanged(int) ), this, SLOT( setChanged() ) ); } *************** *** 186,191 **** int cnt = 0; QRadioButton *btn = radioButtons.first(); - if( btn ) - btn->setChecked( true ); while( btn ) --- 186,189 ---- *************** *** 194,198 **** { btn->setChecked( true ); ! break; } --- 192,196 ---- { btn->setChecked( true ); ! return; } *************** *** 200,203 **** --- 198,204 ---- cnt++; } + + if( radioButtons.first() ) + radioButtons.first()->setChecked( true ); } *************** *** 481,485 **** KonfiguratorComboBox::KonfiguratorComboBox( QString cls, QString name, QString dflt, KONFIGURATOR_NAME_VALUE_PAIR *listIn, int listInLen, QWidget *parent, ! const char *widgetName, bool rst ) : QComboBox ( parent, widgetName ), defaultValue( dflt ), listLen( listInLen ) { --- 482,486 ---- KonfiguratorComboBox::KonfiguratorComboBox( QString cls, QString name, QString dflt, KONFIGURATOR_NAME_VALUE_PAIR *listIn, int listInLen, QWidget *parent, ! const char *widgetName, bool rst, bool editable ) : QComboBox ( parent, widgetName ), defaultValue( dflt ), listLen( listInLen ) { *************** *** 497,502 **** connect( ext, SIGNAL( setInitialValue(QObject *) ), this, SLOT( loadInitialValue() ) ); ! connect( this, SIGNAL( activated(int) ), ext, SLOT( setChanged() ) ); ! loadInitialValue(); } --- 498,505 ---- connect( ext, SIGNAL( setInitialValue(QObject *) ), this, SLOT( loadInitialValue() ) ); ! connect( this, SIGNAL( highlighted(int) ), ext, SLOT( setChanged() ) ); ! connect( this, SIGNAL( textChanged ( const QString & ) ), ext, SLOT( setChanged() ) ); ! ! setEditable( editable ); loadInitialValue(); } *************** *** 518,535 **** void KonfiguratorComboBox::slotApply(QObject *,QString cls, QString name) { ! selectEntry( currentText() ); krConfig->setGroup( cls ); ! krConfig->writeEntry( name, list[selected].value ); } void KonfiguratorComboBox::selectEntry( QString entry ) { - selected = 0; - for( int i=0; i != listLen; i++ ) if( list[i].value == entry ) ! selected = i; ! setCurrentItem( selected ); } --- 521,542 ---- void KonfiguratorComboBox::slotApply(QObject *,QString cls, QString name) { ! QString value = editable() ? lineEdit()->text() : currentText(); krConfig->setGroup( cls ); ! krConfig->writeEntry( name, value ); } void KonfiguratorComboBox::selectEntry( QString entry ) { for( int i=0; i != listLen; i++ ) if( list[i].value == entry ) ! { ! setCurrentItem( i ); ! return; ! } ! if( editable() ) ! lineEdit()->setText( entry ); ! else ! setCurrentItem( 0 ); } Index: konfiguratoritems.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Konfigurator/konfiguratoritems.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** konfiguratoritems.h 31 Jan 2004 12:53:11 -0000 1.1 --- konfiguratoritems.h 31 Jan 2004 20:42:10 -0000 1.2 *************** *** 265,269 **** KonfiguratorComboBox( QString cls, QString name, QString dflt, KONFIGURATOR_NAME_VALUE_PAIR *listIn, int listInLen, ! QWidget *parent=0, const char *widgetName=0, bool rst=false ); ~KonfiguratorComboBox(); --- 265,270 ---- KonfiguratorComboBox( QString cls, QString name, QString dflt, KONFIGURATOR_NAME_VALUE_PAIR *listIn, int listInLen, ! QWidget *parent=0, const char *widgetName=0, ! bool rst=false, bool editable=false ); ~KonfiguratorComboBox(); *************** *** 279,283 **** KONFIGURATOR_NAME_VALUE_PAIR *list; int listLen; - int selected; KonfiguratorExtension *ext; --- 280,283 ---- Index: konfiguratorpage.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Konfigurator/konfiguratorpage.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** konfiguratorpage.cpp 31 Jan 2004 17:26:46 -0000 1.2 --- konfiguratorpage.cpp 31 Jan 2004 20:42:10 -0000 1.3 *************** *** 271,279 **** KonfiguratorComboBox *KonfiguratorPage::createComboBox( QString cls, QString name, QString dflt, ! KONFIGURATOR_NAME_VALUE_PAIR *params, int paramNum, QWidget *parent, bool rst ) { KonfiguratorComboBox *comboBox = new KonfiguratorComboBox( cls, name, dflt, params, ! paramNum, parent, ! QString(cls + "/" + name).ascii(), rst ); registerObject( comboBox->extension() ); --- 271,279 ---- KonfiguratorComboBox *KonfiguratorPage::createComboBox( QString cls, QString name, QString dflt, ! KONFIGURATOR_NAME_VALUE_PAIR *params, int paramNum, QWidget *parent, bool rst, bool editable ) { KonfiguratorComboBox *comboBox = new KonfiguratorComboBox( cls, name, dflt, params, ! paramNum, parent, QString(cls + "/" + name).ascii(), ! rst, editable ); registerObject( comboBox->extension() ); Index: konfiguratorpage.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Konfigurator/konfiguratorpage.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** konfiguratorpage.h 31 Jan 2004 17:26:46 -0000 1.2 --- konfiguratorpage.h 31 Jan 2004 20:42:10 -0000 1.3 *************** *** 231,234 **** --- 231,235 ---- * @param parent Reference to the parent widget * @param rst The change of this parameter requires Krusader restart + * @param editable Flag indicates that the combo can be edited * * @return reference to the newly created combobox *************** *** 236,240 **** KonfiguratorComboBox *createComboBox( QString cls, QString name, QString dflt, KONFIGURATOR_NAME_VALUE_PAIR *params, int paramNum, ! QWidget *parent=0, bool rst=false ); /** --- 237,241 ---- KonfiguratorComboBox *createComboBox( QString cls, QString name, QString dflt, KONFIGURATOR_NAME_VALUE_PAIR *params, int paramNum, ! QWidget *parent=0, bool rst=false, bool editable=false ); /** |
From: <ck...@pr...> - 2004-01-31 17:28:32
|
Update of /cvsroot/krusader/krusader_kde3/krusader/Konfigurator In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31347/krusader_kde3/krusader/Konfigurator Modified Files: konfigurator.cpp konfiguratorpage.cpp konfiguratorpage.h Log Message: ADDED: KonfiguratorPage API documentation Index: konfigurator.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Konfigurator/konfigurator.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** konfigurator.cpp 31 Jan 2004 11:35:02 -0000 1.4 --- konfigurator.cpp 31 Jan 2004 17:26:45 -0000 1.5 *************** *** 71,75 **** { kgFrames.append(page); ! connect( page, SIGNAL( sigChanged( bool ) ), this, SLOT( slotApplyEnable() ) ); } --- 71,75 ---- { kgFrames.append(page); ! connect( page, SIGNAL( sigChanged() ), this, SLOT( slotApplyEnable() ) ); } Index: konfiguratorpage.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Konfigurator/konfiguratorpage.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** konfiguratorpage.cpp 31 Jan 2004 12:53:11 -0000 1.1 --- konfiguratorpage.cpp 31 Jan 2004 17:26:46 -0000 1.2 *************** *** 1,3 **** ! /*************************************************************************** konfiguratorpage.cpp - description ------------------- --- 1,3 ---- ! /* ************************************************************************** konfiguratorpage.cpp - description ------------------- *************** *** 33,37 **** #include "../krusader.h" #include <qtooltip.h> ! KonfiguratorPage::KonfiguratorPage( bool firstTime, QWidget* parent, const char* name ) : QFrame( parent, name ), firstCall( firstTime ) --- 33,37 ---- #include "../krusader.h" #include <qtooltip.h> ! KonfiguratorPage::KonfiguratorPage( bool firstTime, QWidget* parent, const char* name ) : QFrame( parent, name ), firstCall( firstTime ) *************** *** 293,297 **** itemList.append( item ); ! connect( item, SIGNAL( sigChanged( bool ) ), this, SIGNAL ( sigChanged( bool ) ) ); itemList.find( currentItem ); --- 293,297 ---- itemList.append( item ); ! connect( item, SIGNAL( sigChanged( bool ) ), this, SIGNAL ( sigChanged( ) ) ); itemList.find( currentItem ); Index: konfiguratorpage.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Konfigurator/konfiguratorpage.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** konfiguratorpage.h 31 Jan 2004 12:53:11 -0000 1.1 --- konfiguratorpage.h 31 Jan 2004 17:26:46 -0000 1.2 *************** *** 1,3 **** ! /*************************************************************************** konfiguratorpage.h - description ------------------- --- 1,3 ---- ! /* ************************************************************************** konfiguratorpage.h - description ------------------- *************** *** 41,45 **** struct KONFIGURATOR_CHECKBOX_PARAM; struct KONFIGURATOR_NAME_VALUE_PAIR; ! class KonfiguratorPage : public QFrame { --- 41,51 ---- struct KONFIGURATOR_CHECKBOX_PARAM; struct KONFIGURATOR_NAME_VALUE_PAIR; ! ! /** ! * KonfiguratorPage is responsible for handling pages in Konfigurator. ! * It provides simple methods for create and manage Konfigurator pages. ! * ! * @short The base class of a page in Konfigurator ! */ class KonfiguratorPage : public QFrame { *************** *** 47,95 **** public: KonfiguratorPage( bool firstTime, QWidget* parent, const char* name ); virtual bool apply(); virtual void setDefaults(); virtual void loadInitialValues(); virtual bool isChanged(); inline bool isFirst() {return firstCall;} KonfiguratorCheckBox *createCheckBox( QString cls, QString name, bool dflt, QString text, QWidget *parent=0, bool rst=false, QString toolTip = QString::null ); KonfiguratorSpinBox *createSpinBox( QString cls, QString name, int dflt, int min, int max, QWidget *parent = 0, bool rst = false ); KonfiguratorEditBox *createEditBox( QString cls, QString name, QString dflt, QWidget *parent=0, bool rst=false ); KonfiguratorURLRequester *createURLRequester( QString cls, QString name, QString dflt, QWidget *parent, bool rst ); KonfiguratorFontChooser *createFontChooser( QString cls, QString name, QFont *dflt, QWidget *parent=0, bool rst=false ); KonfiguratorComboBox *createComboBox( QString cls, QString name, QString dflt, KONFIGURATOR_NAME_VALUE_PAIR *params, int paramNum, QWidget *parent=0, bool rst=false ); QGroupBox *createFrame( QString text = QString::null, QWidget *parent=0, const char *widgetName=0 ); QGridLayout *createGridLayout( QLayout *parent ); QLabel *addLabel( QGridLayout *layout, int x, int y, QString label, QWidget *parent=0, const char *widgetName=0 ); QWidget *createSpacer( QWidget *parent=0, const char *widgetName=0 ); ! QFrame *createLine( QWidget *parent, const char *widgetName ); QWidget *createCheckBoxGroup( int sizex, int sizey, KONFIGURATOR_CHECKBOX_PARAM *params, int paramNum, QPtrList<KonfiguratorCheckBox> &cbList, QWidget *parent=0, const char *widgetName=0 ); KonfiguratorRadioButtons *createRadioButtonGroup( QString cls, QString name, QString dflt, int sizex, int sizey, KONFIGURATOR_NAME_VALUE_PAIR *params, int paramNum, QWidget *parent=0, const char *widgetName=0, bool rst=false ); void registerObject( KonfiguratorExtension *item ); void removeObject( KonfiguratorExtension *item ); signals: ! void sigChanged( bool ); protected: --- 53,429 ---- public: + /** + * The constructor of the KonfiguratorPage class. + * + * @param firstTime this parameter is true if it is the first call of Konfigurator + * @param parent reference to the parent widget + * @param name name of the newly generated Konfigurator page widget + */ KonfiguratorPage( bool firstTime, QWidget* parent, const char* name ); + /** + * Applies the changes in the Konfigurator page. + * + * Writes out all relevent information to the konfiguration object and synchronizes + * it with the file storage (hard disk, krusaderrc file). This function calls the apply() + * method of each konfigurator item and finally performs the synchronization. + * + * @return a boolean value indicates that Krusader restart is needed for the correct change + */ virtual bool apply(); + + /** + * Sets every konfigurator item to its default value on the page. + * + * This method calls the setDefaults() method of each konfigurator item. This function + * doesn't modify the current configuration, only the values of the GUI items. The + * apply() method must be called for finalizing the changes. + */ virtual void setDefaults(); + + /** + * Reloads the original value of each konfigurator item from the configuration object. + * + * This function calls the loadInitialValue() method of each konfigurator item. + * Used to rollback the changes on the konfigurator page. Called if the user + * responds 'No' to the "Apply changes" question. + */ virtual void loadInitialValues(); + + /** + * Checks whether the page was changed. + * + * This function calls the isChanged() method of each konfigurator item and + * performs logical OR operation on them. Actually, this function returns true + * if any of the konfigurator items was changed. + * + * @return true if at least one of the konfigurator items was changed + */ virtual bool isChanged(); + /** + * Flag, indicates the first call of Konfigurator + * @return true if konfigurator was started at the first time + */ inline bool isFirst() {return firstCall;} + /** + * Adds a new checkbox item to the page. + * <br>The checkbox widget's name is QString(cls + "/" + name).ascii()<br> + * + * Sample:<br><br> + * KonfiguratorCheckBox *myCheckBox = createCheckBox( "class", "name", false, parentWidget );<br> + * myLayout->addWidget( myCheckBox, 0, 0 ); + * + * @param cls The class name used in KConfig (ex. "Archives") + * @param name The item name used in KConfig (ex. "Do Tar") + * @param dflt The default value of the checkbox + * @param text The text field of the checkbox + * @param parent Reference to the parent widget + * @param rst The change of this parameter requires Krusader restart + * @param toolTip Tooltip used for this checkbox + * + * @return reference to the newly created checkbox + */ KonfiguratorCheckBox *createCheckBox( QString cls, QString name, bool dflt, QString text, QWidget *parent=0, bool rst=false, QString toolTip = QString::null ); + + /** + * Adds a new spinbox item to the page. + * <br>The spinbox widget's name is QString(cls + "/" + name).ascii()<br> + * + * Sample:<br><br> + * KonfiguratorSpinBox *mySpinBox = createSpinBox( "class", "name", 10, 1, 100, parentWidget );<br> + * myLayout->addWidget( mySpinBox, 0, 0 ); + * + * @param cls The class name used in KConfig (ex. "Archives") + * @param name The item name used in KConfig (ex. "Do Tar") + * @param dflt The default value of the spinbox + * @param min The minimum value of the spinbox + * @param max The maximum value of the spinbox + * @param parent Reference to the parent widget + * @param rst The change of this parameter requires Krusader restart + * + * @return reference to the newly created spinbox + */ KonfiguratorSpinBox *createSpinBox( QString cls, QString name, int dflt, int min, int max, QWidget *parent = 0, bool rst = false ); + + /** + * Adds a new editbox item to the page. + * <br>The editbox widget's name is QString(cls + "/" + name).ascii()<br> + * + * Sample:<br><br> + * KonfiguratorEditBox *myEditBox = createEditBox( "class", "name", "default", parentWidget );<br> + * myLayout->addWidget( myEditBox, 0, 0 ); + * + * @param cls The class name used in KConfig (ex. "Archives") + * @param name The itemname used in KConfig (ex. "Do Tar") + * @param dflt The default value of the editbox + * @param text The text field of the editbox + * @param parent Reference to the parent widget + * @param rst The change of this parameter requires Krusader restart + * + * @return reference to the newly created editbox + */ KonfiguratorEditBox *createEditBox( QString cls, QString name, QString dflt, QWidget *parent=0, bool rst=false ); + + /** + * Adds a new URL requester item to the page. + * <br>The URL requester widget's name is QString(cls + "/" + name).ascii()<br> + * + * Sample:<br><br> + * KonfiguratorURLRequester *myURLRequester = createURLRequester( "class", "name", "default", parentWidget );<br> + * myLayout->addWidget( myURLRequester, 0, 0 ); + * + * @param cls The class name used in KConfig (ex. "Archives") + * @param name The itemname used in KConfig (ex. "Do Tar") + * @param dflt The default value of the URL requester + * @param text The text field of the URL requester + * @param parent Reference to the parent widget + * @param rst The change of this parameter requires Krusader restart + * + * @return reference to the newly created URL requester + */ KonfiguratorURLRequester *createURLRequester( QString cls, QString name, QString dflt, QWidget *parent, bool rst ); + + /** + * Adds a new font chooser item to the page. + * <br>The font chooser widget's name is QString(cls + "/" + name).ascii()<br> + * + * Sample:<br><br> + * KonfiguratorFontChooser *myFontChooser = createFontChooser( "class", "name", new QFont(), parentWidget );<br> + * myLayout->addWidget( myFontChooser, 0, 0 ); + * + * @param cls The class name used in KConfig (ex. "Archives") + * @param name The item name used in KConfig (ex. "Do Tar") + * @param dflt The default value of the font chooser + * @param text The text field of the font chooser + * @param parent Reference to the parent widget + * @param rst The change of this parameter requires Krusader restart + * + * @return reference to the newly created font chooser + */ KonfiguratorFontChooser *createFontChooser( QString cls, QString name, QFont *dflt, QWidget *parent=0, bool rst=false ); + + /** + * Adds a new combobox item to the page. + * <br>The combobox widget's name is QString(cls + "/" + name).ascii()<br> + * + * Sample:<br><br> + * KONFIGURATOR_NAME_VALUE_PAIR comboInfo[] =<br> + * {{ i18n( "combo text1" ), "value1" },<br> + * { i18n( "combo text2" ), "value2" },<br> + * { i18n( "combo text3" ), "value3" }};<br><br> + * KonfiguratorComboBox *myComboBox = createComboBox( "class", "name", "value2", comboInfo, 3, parentWidget );<br> + * myLayout->addWidget( myComboBox, 0, 0 ); + * + * @param cls The class name used in KConfig (ex. "Archives") + * @param name The item name used in KConfig (ex. "Do Tar") + * @param dflt The default value of the combobox + * @param params Pointer to the name-value pair array (combo elements) + * @param paramNum Number of the combobox elements + * @param text The text field of the combobox + * @param parent Reference to the parent widget + * @param rst The change of this parameter requires Krusader restart + * + * @return reference to the newly created combobox + */ KonfiguratorComboBox *createComboBox( QString cls, QString name, QString dflt, KONFIGURATOR_NAME_VALUE_PAIR *params, int paramNum, QWidget *parent=0, bool rst=false ); + /** + * Creates a frame on the page. + * + * Sample:<br><br> + * QGroupBox *myGroup = createFrame( i18n( "MyFrameName" ), parentWidget, "frameName" );<br> + * myLayout->addWidget( myGroup, 0, 0 ); + * + * @param text The text written out onto the frame + * @param parent Reference to the parent widget + * @param widgetName The name of the widget + * + * @return reference to the newly created frame + */ QGroupBox *createFrame( QString text = QString::null, QWidget *parent=0, const char *widgetName=0 ); + /** + * Creates a new QGridLayout element and sets its margins. + * + * Sample:<br><br> + * QGroupBox *myGroup = createFrame( i18n( "MyFrameName" ), parentWidget, "frameName" );<br> + * QGridLayout *myLayout = createGridLayout( myGroup->layout() );<br> + * myLayout->addWidget( myGroup, 0, 0 ); + * + * @param parent Reference to the parent layout + * + * @return reference to the newly created QGridLayout + */ QGridLayout *createGridLayout( QLayout *parent ); + + /** + * Adds a new label to a grid layout. + * + * Sample:<br><br> + * QGroupBox *myGroup = createFrame( i18n( "MyFrameName" ), parentWidget, "frameName" );<br> + * QGridLayout *myLayout = createGridLayout( myGroup->layout() );<br> + * addLabel( myLayout, 0, 0, i18n( "Hello world!" ), myGroup, "myLabel" );<br> + * mainLayout->addWidget( myGroup, 0, 0 ); + * + * @param layout The grid layout on which the item will be placed + * @param x the column to which the label will be placed + * @param y the row to which the label will be placed + * @param label the text of the label + * @param parent Reference to the parent widget + * @param widgetName The name of the newly generated label widget + * + * @return reference to the newly created label + */ QLabel *addLabel( QGridLayout *layout, int x, int y, QString label, QWidget *parent=0, const char *widgetName=0 ); + + /** + * Creates a spacer object (for justifying in QHBox). + * + * Sample:<br><br> + * QHBox *hbox = new QHBox( myParent, "hbox" );<br> + * createSpinBox( "class", "spin", 5, 1, 10, hbox );<br> + * createSpacer( hbox, "mySpacer" );<br> + * myLayout->addWidget( hbox, 0, 0 ); + * + * @param parent Reference to the parent widget + * @param widgetName The name of the newly generated label widget + * + * @return reference to the newly created spacer widget + */ QWidget *createSpacer( QWidget *parent=0, const char *widgetName=0 ); ! ! /** ! * Creates a separator line. ! * ! * Sample:<br><br> ! * QFrame *myLine = createLine( myParent, "myLine" );<br> ! * myLayout->addWidget( myLine, 1, 0 );<br> ! * ! * @param parent Reference to the parent widget ! * @param widgetName The name of the newly generated label widget ! * ! * @return reference to the newly created spacer widget ! */ ! QFrame *createLine( QWidget *parent=0, const char *widgetName=0 ); ! ! /** ! * Creates a checkbox group. A checkbox group contains a lot of checkboxes. ! * The grouped checkboxes are embedded into one widget, which can be placed anywhere ! * on the GUI. The placing of the elements can be horizontal or vertical in the group. ! * At horizontal placing the sizex integer defines the maximum element number in ! * one row, sizey is 0. At vertical placing sizex is 0, and sizey defines the ! * maximum row number in one column. The references of the checkboxes are placed ! * into a pointer list, given by the user.<br> ! * ! * One specific element can be reached by the reference list. The first element is ! * cbList.at(0), the second is cbList.at(1), ... ! * ! * Sample:<br><br> ! * KONFIGURATOR_CHECKBOX_PARAM myCBArray[] =<br> ! * {{"CbClass","CbName1", false, i18n( "name1" ), false, "tooltip1"},<br> ! * {"CbClass","CbName2", true, i18n( "name2" ), false, "tooltip2"},<br> ! * {"CbClass","CbName3", true, i18n( "name3" ), false, "tooltip3"}};<br><br> ! * QPtrList<KonfiguratorCheckBox> myCheckboxes;<br> ! * QFrame *myCheckBoxGroup = createCheckBoxGroup( 1, 0, myCBArray, 3, myCheckboxes, myParent, "myCheckboxGroup" );<br> ! * myCheckboxes.at( 0 )->setEnabled( false );<br><br> ! * myLayout->addWidget( myCheckBoxGroup, 0, 0 );<br> ! * ! * @param sizex the maximum column number at horizontal placing ! * @param sizey the maximum row number at vertical placing ! * @param params pointer to the checkbox array ! * @param paramNum number of the checkbox elements ! * @param cbList reference to the pointerlist where the checkboxes will be placed ! * @param parent Reference to the parent widget ! * @param widgetName The name of the newly created checkbox group widget ! * ! * @return reference to the newly created checkbox group widget ! */ QWidget *createCheckBoxGroup( int sizex, int sizey, KONFIGURATOR_CHECKBOX_PARAM *params, int paramNum, QPtrList<KonfiguratorCheckBox> &cbList, QWidget *parent=0, const char *widgetName=0 ); + /** + * Creates a radio button group. A radio button group contains a lot of radio buttons. + * The grouped buttons are embedded into one widget, which can be placed anywhere + * on the GUI. The placing of the elements can be horizontal or vertical in the group. + * At horizontal placing the sizex integer defines the maximum element number in + * one row, sizey is 0. At vertical placing sizex is 0, and sizey defines the + * maximum row number in one column.<br> + * + * The references of the buttons can be accessed by the radioButtons fields of the + * KonfiguratorRadioButtons object. The first element is myRadioGrp->radioButtons.at(0), + * the second is myRadioGrp->radioButtons.at(1), ... + * + * Sample:<br><br> + * KONFIGURATOR_NAME_VALUE_PAIR radioInfo[] =<br> + * {{ i18n( "radio text1" ), "value1" },<br> + * { i18n( "radio text2" ), "value2" },<br> + * { i18n( "radio text3" ), "value3" }};<br><br> + * KonfiguratorRadioButtons *myRadioGroup = createRadioButtonGroup( "class", "name", "value1", 1, 0, radioInfo, 3, myParent, "myRadioGroup" );<br> + * myRadioGroup->radioButtons.at( 0 )->setEnabled( false );<br> + * myLayout->addWidget( myRadioGroup->getGroupWidget(), 0, 0 );<br> + * + * @param cls The class name used in KConfig (ex. "Archives") + * @param name The item name used in KConfig (ex. "Do Tar") + * @param dflt The default value of the radio buttons + * @param sizex the maximum column number at horizontal placing + * @param sizey the maximum row number at vertical placing + * @param params pointer to the checkbox array + * @param paramNum number of the checkbox elements + * @param parent Reference to the parent widget + * @param widgetName The name of the newly created button group widget + * @param rst The change of this parameter requires Krusader restart + * + * @return reference to the newly created radio button group widget + */ KonfiguratorRadioButtons *createRadioButtonGroup( QString cls, QString name, QString dflt, int sizex, int sizey, KONFIGURATOR_NAME_VALUE_PAIR *params, int paramNum, QWidget *parent=0, const char *widgetName=0, bool rst=false ); + + /** + * This function is used to insert new, unknown items into KonfiguratorPage. The + * item must be derived from KonfiguratorExtension class, which have + * isChanged(), apply(), setDefaults, loadInitialValue() methods. After that, the + * object is properly handled by Konfigurator page. + * + * + * @param item The item to be added to KonfiguratorPage + */ void registerObject( KonfiguratorExtension *item ); + + /** + * This function is used to remove elements from KonfiguratorPage. + * + * Sample:<br><br> + * KonfiguratorEditBox *myEditBox = createEditBox( "class", "name", "default", parentWidget );<br> + * myLayout->addWidget( myEditBox, 0, 0 );<br> + * removeObject( myEditBox->extension() ); + * + * After the removeObject myEditBox will be untouched at apply(), setDefaults(), isChanged(), + * loadInitialValues() methods of the KonfiguratorPage. + * + * @param item The item to be removed from KonfiguratorPage + */ void removeObject( KonfiguratorExtension *item ); signals: ! /** ! * The signal is emitted if the changed flag was modified in any konfigurator item. ! * Used for enabling/disabling the apply button. ! */ ! void sigChanged(); protected: *************** *** 100,110 **** --- 434,466 ---- }; + /** + * KONFIGURATOR_CHECKBOX_PARAM is the basic item of checkbox arrays. It contains + * every information related to a checkbox. + */ struct KONFIGURATOR_CHECKBOX_PARAM { + /** + * The class used in KConfig (ex. "Archives") + */ QString configClass; + /** + * The item name used in KConfig (ex. "Do Tar") + */ QString configName; + /** + * The default value of the checkbox + */ bool defaultValue; + /** + * The text field of the checkbox + */ QString text; + /** + * The change of this parameter requires Krusader restart + */ bool restart; + /** + * The checkbox's tooltip + */ QString toolTip; }; |
Update of /cvsroot/krusader/krusader_kde3/krusader/Konfigurator In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20046 Modified Files: kglookfeel.cpp Added Files: konfiguratoritems.cpp konfiguratoritems.h konfiguratorpage.cpp konfiguratorpage.h Log Message: ADDED: more konfigurator files --- NEW FILE: konfiguratoritems.cpp --- /*************************************************************************** konfiguratoritems.cpp - description ------------------- copyright : (C) 2003 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 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. * * * ***************************************************************************/ #include "konfiguratoritems.h" #include "../krusader.h" KonfiguratorExtension::KonfiguratorExtension( QObject *obj, QString cfgClass, QString cfgName, bool rst) : QObject(), objectPtr( obj ), applyConnected( false ), setDefaultsConnected( false ), changed( false ), restartNeeded( rst ), configClass( cfgClass ), configName( cfgName ) { } void KonfiguratorExtension::connectNotify( const char *signal ) { if( strcmp( signal, SIGNAL( applyManually(QObject *,QString, QString) ) ) == 0 ) applyConnected = true; else if ( strcmp( signal, SIGNAL( setDefaultsManually(QObject *) ) ) == 0 ) setDefaultsConnected = true; QObject::connectNotify( signal ); } bool KonfiguratorExtension::apply() { if( !changed ) return false; if( applyConnected ) emit applyManually( objectPtr, configClass, configName ); else emit applyAuto( objectPtr, configClass, configName ); setChanged( false ); return restartNeeded; } void KonfiguratorExtension::setDefaults() { if( setDefaultsConnected ) emit setDefaultsManually( objectPtr ); else emit setDefaultsAuto( objectPtr ); } void KonfiguratorExtension::loadInitialValue() { emit setInitialValue( objectPtr ); } bool KonfiguratorExtension::isChanged() { return changed; } // KonfiguratorCheckBox class /////////////////////////////// KonfiguratorCheckBox::KonfiguratorCheckBox( QString cls, QString name, bool dflt, QString text, QWidget *parent, const char *widgetName, bool rst ) : QCheckBox( text, parent, widgetName ), defaultValue( dflt ) { ext = new KonfiguratorExtension( this, cls, name, rst ); connect( ext, SIGNAL( applyAuto(QObject *,QString, QString) ), this, SLOT( slotApply(QObject *,QString, QString) ) ); connect( ext, SIGNAL( setDefaultsAuto(QObject *) ), this, SLOT( slotSetDefaults(QObject *) ) ); connect( ext, SIGNAL( setInitialValue(QObject *) ), this, SLOT( loadInitialValue() ) ); connect( this, SIGNAL( toggled(bool) ), ext, SLOT( setChanged() ) ); loadInitialValue(); } KonfiguratorCheckBox::~KonfiguratorCheckBox() { delete ext; } void KonfiguratorCheckBox::loadInitialValue() { krConfig->setGroup( ext->getCfgClass() ); setChecked( krConfig->readBoolEntry( ext->getCfgName(), defaultValue ) ); ext->setChanged( false ); } void KonfiguratorCheckBox::slotApply(QObject *,QString cls, QString name) { krConfig->setGroup( cls ); krConfig->writeEntry( name, isChecked() ); } void KonfiguratorCheckBox::slotSetDefaults(QObject *) { if( isChecked() != defaultValue ) setChecked( defaultValue ); } // KonfiguratorSpinBox class /////////////////////////////// KonfiguratorSpinBox::KonfiguratorSpinBox( QString cls, QString name, int dflt, int min, int max, QWidget *parent, const char *widgetName, bool rst ) : QSpinBox( parent, widgetName ), defaultValue( dflt ) { ext = new KonfiguratorExtension( this, cls, name, rst ); connect( ext, SIGNAL( applyAuto(QObject *,QString, QString) ), this, SLOT( slotApply(QObject *,QString, QString) ) ); connect( ext, SIGNAL( setDefaultsAuto(QObject *) ), this, SLOT( slotSetDefaults(QObject *) ) ); connect( ext, SIGNAL( setInitialValue(QObject *) ), this, SLOT( loadInitialValue() ) ); connect( this, SIGNAL( valueChanged(int) ), ext, SLOT( setChanged() ) ); setMinValue( min ); setMaxValue( max ); loadInitialValue(); } KonfiguratorSpinBox::~KonfiguratorSpinBox() { delete ext; } void KonfiguratorSpinBox::loadInitialValue() { krConfig->setGroup( ext->getCfgClass() ); setValue( krConfig->readNumEntry( ext->getCfgName(), defaultValue ) ); ext->setChanged( false ); } void KonfiguratorSpinBox::slotApply(QObject *,QString cls, QString name) { krConfig->setGroup( cls ); krConfig->writeEntry( name, value() ); } void KonfiguratorSpinBox::slotSetDefaults(QObject *) { if( value() != defaultValue ) setValue( defaultValue ); } // KonfiguratorRadioButtons class /////////////////////////////// KonfiguratorRadioButtons::KonfiguratorRadioButtons( QString cls, QString name, QString dflt, QButtonGroup *grp, bool rst ) : KonfiguratorExtension( this, cls, name, rst ), buttonGroup( grp ) { defaultValue = dflt; } void KonfiguratorRadioButtons::addRadioButton( QRadioButton *radioWidget, QString value ) { radioButtons.append( radioWidget ); radioValues.push_back( value ); connect( radioWidget, SIGNAL( toggled(bool) ), this, SLOT( setChanged() ) ); } void KonfiguratorRadioButtons::selectButton( QString value ) { int cnt = 0; QRadioButton *btn = radioButtons.first(); if( btn ) btn->setChecked( true ); while( btn ) { if( value == radioValues[ cnt ] ) { btn->setChecked( true ); break; } btn = radioButtons.next(); cnt++; } } void KonfiguratorRadioButtons::loadInitialValue() { krConfig->setGroup( configClass ); QString initValue = krConfig->readEntry( configName, defaultValue ); selectButton( initValue ); setChanged( false ); } bool KonfiguratorRadioButtons::apply() { if( !changed ) return false; if( applyConnected ) { emit applyManually( objectPtr, configClass, configName ); return restartNeeded; } QRadioButton *btn = radioButtons.first(); int cnt = 0; while( btn ) { if( btn->isChecked() ) { krConfig->setGroup( configClass ); krConfig->writeEntry( configName, radioValues[ cnt ] ); break; } btn = radioButtons.next(); cnt++; } setChanged( false ); return restartNeeded; } void KonfiguratorRadioButtons::setDefaults() { if( setDefaultsConnected ) { emit setDefaultsManually( objectPtr ); return; } selectButton( defaultValue ); } // KonfiguratorEditBox class /////////////////////////////// KonfiguratorEditBox::KonfiguratorEditBox( QString cls, QString name, QString dflt, QWidget *parent, const char *widgetName, bool rst ) : QLineEdit( parent, widgetName ), defaultValue( dflt ) { ext = new KonfiguratorExtension( this, cls, name, rst ); connect( ext, SIGNAL( applyAuto(QObject *,QString, QString) ), this, SLOT( slotApply(QObject *,QString, QString) ) ); connect( ext, SIGNAL( setDefaultsAuto(QObject *) ), this, SLOT( slotSetDefaults(QObject *) ) ); connect( ext, SIGNAL( setInitialValue(QObject *) ), this, SLOT( loadInitialValue() ) ); connect( this, SIGNAL( textChanged(const QString &) ), ext, SLOT( setChanged() ) ); loadInitialValue(); } KonfiguratorEditBox::~KonfiguratorEditBox() { delete ext; } void KonfiguratorEditBox::loadInitialValue() { krConfig->setGroup( ext->getCfgClass() ); setText( krConfig->readEntry( ext->getCfgName(), defaultValue ) ); ext->setChanged( false ); } void KonfiguratorEditBox::slotApply(QObject *,QString cls, QString name) { krConfig->setGroup( cls ); krConfig->writeEntry( name, text() ); } void KonfiguratorEditBox::slotSetDefaults(QObject *) { if( text() != defaultValue ) setText( defaultValue ); } // KonfiguratorURLRequester class /////////////////////////////// static const char* const image0_data[] = { "16 16 53 1", ". c None", "# c #000000", "R c #080808", "Q c #101010", "Y c #181c18", "K c #202020", "w c #313031", "X c #313431", "W c #414041", "V c #414441", "g c #4a3018", "E c #4a484a", "U c #4a4c4a", "l c #524c4a", "h c #52504a", "j c #525052", "i c #5a5952", "J c #6a6962", "P c #6a6d6a", "T c #8b8d8b", "D c #949594", "S c #9c999c", "O c #9c9d9c", "C c #a4a19c", "M c #a4a1a4", "N c #a4a5a4", "I c #acaaac", "B c #acaeac", "F c #b47d41", "v c #b4b2b4", "u c #b4b6b4", "A c #bdbabd", "t c #bdbebd", "k c #c5854a", "H c #c5c2c5", "s c #c5c6c5", "r c #cdcacd", "L c #cdcecd", "z c #d5d2d5", "q c #d5d6d5", "x c #dedade", "p c #dedede", "a c #e6a562", "G c #e6e2e6", "o c #e6e6e6", "y c #eeeae6", "n c #eeeeee", "m c #f6f6f6", "e c #ffae62", "d c #ffc283", "c c #ffc683", "f c #ffca8b", "b c #ffd29c", "......####......", ".....##.####.#..", "....#.....####..", "...........###..", "..........####..", ".####...........", "#abca#######....", "#bcdeeeeeeee#...", "#fdghhhihhjjh###", "#dklmmnopqrstuvw", "#dgxpyopzsABCDE.", "#FhxxGpqrHuICJK.", "#gLrqqzLHABMDE..", "#jLtssHtuBNOPQ..", "RtNIBBINMSDTE...", "KEEUUUEEVWWXY..."}; KonfiguratorURLRequester::KonfiguratorURLRequester( QString cls, QString name, QString dflt, QWidget *parent, const char *widgetName, bool rst ) : KURLRequester( parent, widgetName ), defaultValue( dflt ) { ext = new KonfiguratorExtension( this, cls, name, rst ); connect( ext, SIGNAL( applyAuto(QObject *,QString, QString) ), this, SLOT( slotApply(QObject *,QString, QString) ) ); connect( ext, SIGNAL( setDefaultsAuto(QObject *) ), this, SLOT( slotSetDefaults(QObject *) ) ); connect( ext, SIGNAL( setInitialValue(QObject *) ), this, SLOT( loadInitialValue() ) ); connect( this, SIGNAL( textChanged(const QString &) ), ext, SLOT( setChanged() ) ); QPixmap pixMap( (const char **)image0_data ); button()->setIconSet( QIconSet() ); button()->setPixmap( pixMap ); loadInitialValue(); } KonfiguratorURLRequester::~KonfiguratorURLRequester() { delete ext; } void KonfiguratorURLRequester::loadInitialValue() { krConfig->setGroup( ext->getCfgClass() ); setURL( krConfig->readEntry( ext->getCfgName(), defaultValue ) ); ext->setChanged( false ); } void KonfiguratorURLRequester::slotApply(QObject *,QString cls, QString name) { krConfig->setGroup( cls ); krConfig->writeEntry( name, url() ); } void KonfiguratorURLRequester::slotSetDefaults(QObject *) { if( url() != defaultValue ) setURL( defaultValue ); } // KonfiguratorFontChooser class /////////////////////////////// KonfiguratorFontChooser::KonfiguratorFontChooser( QString cls, QString name, QFont *dflt, QWidget *parent, const char *widgetName, bool rst ) : QHBox ( parent, widgetName ), defaultValue( dflt ) { ext = new KonfiguratorExtension( this, cls, name, rst ); connect( ext, SIGNAL( applyAuto(QObject *,QString, QString) ), this, SLOT( slotApply(QObject *,QString, QString) ) ); connect( ext, SIGNAL( setDefaultsAuto(QObject *) ), this, SLOT( slotSetDefaults(QObject *) ) ); connect( ext, SIGNAL( setInitialValue(QObject *) ), this, SLOT( loadInitialValue() ) ); pLabel = new QLabel( this ); pLabel->setMinimumWidth( 150 ); pToolButton = new QToolButton( this ); connect( pToolButton, SIGNAL( clicked() ), this, SLOT( slotBrowseFont() ) ); QPixmap pixMap( (const char **)image0_data ); pToolButton->setText( "" ); pToolButton->setPixmap( pixMap ); loadInitialValue(); } KonfiguratorFontChooser::~KonfiguratorFontChooser() { delete ext; } void KonfiguratorFontChooser::loadInitialValue() { krConfig->setGroup( ext->getCfgClass() ); font = krConfig->readFontEntry( ext->getCfgName(), defaultValue ); ext->setChanged( false ); setFont(); } void KonfiguratorFontChooser::setFont() { pLabel->setFont( font ); pLabel->setText( font.family()+QString(", %1").arg(font.pointSize()) ); } void KonfiguratorFontChooser::slotApply(QObject *,QString cls, QString name) { krConfig->setGroup( cls ); krConfig->writeEntry( name, font ); } void KonfiguratorFontChooser::slotSetDefaults(QObject *) { font = *defaultValue; ext->setChanged(); setFont(); } void KonfiguratorFontChooser::slotBrowseFont() { int ok=KFontDialog::getFont( font ); if (ok!=1) return; // cancelled by the user ext->setChanged(); setFont(); } // KonfiguratorComboBox class /////////////////////////////// KonfiguratorComboBox::KonfiguratorComboBox( QString cls, QString name, QString dflt, KONFIGURATOR_NAME_VALUE_PAIR *listIn, int listInLen, QWidget *parent, const char *widgetName, bool rst ) : QComboBox ( parent, widgetName ), defaultValue( dflt ), listLen( listInLen ) { list = new KONFIGURATOR_NAME_VALUE_PAIR[ listInLen ]; for( int i=0; i != listLen; i++ ) { list[i] = listIn[i]; insertItem( list[i].text ); } ext = new KonfiguratorExtension( this, cls, name, rst ); connect( ext, SIGNAL( applyAuto(QObject *,QString, QString) ), this, SLOT( slotApply(QObject *,QString, QString) ) ); connect( ext, SIGNAL( setDefaultsAuto(QObject *) ), this, SLOT( slotSetDefaults(QObject *) ) ); connect( ext, SIGNAL( setInitialValue(QObject *) ), this, SLOT( loadInitialValue() ) ); connect( this, SIGNAL( activated(int) ), ext, SLOT( setChanged() ) ); loadInitialValue(); } KonfiguratorComboBox::~KonfiguratorComboBox() { delete []list; delete ext; } void KonfiguratorComboBox::loadInitialValue() { krConfig->setGroup( ext->getCfgClass() ); QString select = krConfig->readEntry( ext->getCfgName(), defaultValue ); selectEntry( select ); ext->setChanged( false ); } void KonfiguratorComboBox::slotApply(QObject *,QString cls, QString name) { selectEntry( currentText() ); krConfig->setGroup( cls ); krConfig->writeEntry( name, list[selected].value ); } void KonfiguratorComboBox::selectEntry( QString entry ) { selected = 0; for( int i=0; i != listLen; i++ ) if( list[i].value == entry ) selected = i; setCurrentItem( selected ); } void KonfiguratorComboBox::slotSetDefaults(QObject *) { selectEntry( defaultValue ); } #include "konfiguratoritems.moc" --- NEW FILE: konfiguratoritems.h --- /*************************************************************************** konfiguratoritems.h - description ------------------- copyright : (C) 2003 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 __KONFIGURATOR_ITEMS_H__ #define __KONFIGURATOR_ITEMS_H__ #include <qobject.h> #include <qstring.h> #include <qcheckbox.h> #include <qspinbox.h> #include <qradiobutton.h> #include <qptrlist.h> #include <qvaluevector.h> #include <qbuttongroup.h> #include <qlineedit.h> #include <kurlrequester.h> #include <qhbox.h> #include <kfontdialog.h> #include <qlabel.h> #include <qfont.h> #include <qtoolbutton.h> #include <qcombobox.h> class KonfiguratorExtension : public QObject { Q_OBJECT public: KonfiguratorExtension(QObject *obj, QString cfgClass, QString cfgName, bool rst = false ); virtual void loadInitialValue(); virtual bool apply(); virtual void setDefaults(); virtual bool isChanged(); inline QObject *object() {return objectPtr;} inline QString getCfgClass() {return configClass;} inline QString getCfgName() {return configName;} public slots: void setChanged() {emit sigChanged( changed = true);} void setChanged( bool chg ) {emit sigChanged( changed = chg);} signals: void applyManually(QObject *,QString, QString); void applyAuto(QObject *,QString, QString); void setDefaultsManually(QObject *); void setDefaultsAuto(QObject *); void setInitialValue(QObject *); void sigChanged( bool ); protected: QObject *objectPtr; bool applyConnected; bool setDefaultsConnected; bool changed; bool restartNeeded; QString configClass; QString configName; virtual void connectNotify( const char *signal ); }; // KonfiguratorCheckBox class /////////////////////////////// class KonfiguratorCheckBox : public QCheckBox { Q_OBJECT public: KonfiguratorCheckBox( QString cls, QString name, bool dflt, QString text, QWidget *parent=0, const char *widgetName=0, bool rst=false ); ~KonfiguratorCheckBox(); inline KonfiguratorExtension *extension() {return ext;} public slots: virtual void loadInitialValue(); void slotApply(QObject *,QString, QString); void slotSetDefaults(QObject *); protected: bool defaultValue; KonfiguratorExtension *ext; }; // KonfiguratorSpinBox class /////////////////////////////// class KonfiguratorSpinBox : public QSpinBox { Q_OBJECT public: KonfiguratorSpinBox( QString cls, QString name, int dflt, int min, int max, QWidget *parent=0, const char *widgetName=0, bool rst=false ); ~KonfiguratorSpinBox(); inline KonfiguratorExtension *extension() {return ext;} public slots: virtual void loadInitialValue(); void slotApply(QObject *,QString, QString); void slotSetDefaults(QObject *); protected: int defaultValue; KonfiguratorExtension *ext; }; // KonfiguratorRadioButtons class /////////////////////////////// class KonfiguratorRadioButtons : public KonfiguratorExtension { Q_OBJECT public: KonfiguratorRadioButtons( QString cls, QString name, QString dflt, QButtonGroup *grp, bool rst=false ); void addRadioButton( QRadioButton *radioWidget, QString value ); virtual void loadInitialValue(); virtual bool apply(); virtual void setDefaults(); QButtonGroup* getGroupWidget() { return buttonGroup; } void selectButton( QString value ); QPtrList<QRadioButton> radioButtons; QValueVector<QString> radioValues; protected: QString defaultValue; QButtonGroup *buttonGroup; }; // KonfiguratorEditBox class /////////////////////////////// class KonfiguratorEditBox : public QLineEdit { Q_OBJECT public: KonfiguratorEditBox( QString cls, QString name, QString dflt, QWidget *parent=0, const char *widgetName=0, bool rst=false ); ~KonfiguratorEditBox(); inline KonfiguratorExtension *extension() {return ext;} public slots: virtual void loadInitialValue(); void slotApply(QObject *,QString, QString); void slotSetDefaults(QObject *); protected: QString defaultValue; KonfiguratorExtension *ext; }; // KonfiguratorEditBox class /////////////////////////////// class KonfiguratorURLRequester : public KURLRequester { Q_OBJECT public: KonfiguratorURLRequester( QString cls, QString name, QString dflt, QWidget *parent=0, const char *widgetName=0, bool rst=false ); ~KonfiguratorURLRequester(); inline KonfiguratorExtension *extension() {return ext;} public slots: virtual void loadInitialValue(); void slotApply(QObject *,QString, QString); void slotSetDefaults(QObject *); protected: QString defaultValue; KonfiguratorExtension *ext; }; // KonfiguratorFontChooser class /////////////////////////////// class KonfiguratorFontChooser : public QHBox { Q_OBJECT public: KonfiguratorFontChooser( QString cls, QString name, QFont *dflt, QWidget *parent=0, const char *widgetName=0, bool rst=false ); ~KonfiguratorFontChooser(); inline KonfiguratorExtension *extension() {return ext;} public slots: virtual void loadInitialValue(); void slotApply(QObject *,QString, QString); void slotSetDefaults(QObject *); void slotBrowseFont(); protected: QFont * defaultValue; QFont font; KonfiguratorExtension *ext; QLabel * pLabel; QToolButton * pToolButton; void setFont(); }; struct KONFIGURATOR_NAME_VALUE_PAIR { QString text; QString value; }; // KonfiguratorComboBox class /////////////////////////////// class KonfiguratorComboBox : public QComboBox { Q_OBJECT public: KonfiguratorComboBox( QString cls, QString name, QString dflt, KONFIGURATOR_NAME_VALUE_PAIR *listIn, int listInLen, QWidget *parent=0, const char *widgetName=0, bool rst=false ); ~KonfiguratorComboBox(); inline KonfiguratorExtension *extension() {return ext;} public slots: virtual void loadInitialValue(); void slotApply(QObject *,QString, QString); void slotSetDefaults(QObject *); protected: QString defaultValue; KONFIGURATOR_NAME_VALUE_PAIR *list; int listLen; int selected; KonfiguratorExtension *ext; void selectEntry( QString entry ); }; #endif /* __KONFIGURATOR_ITEMS_H__ */ --- NEW FILE: konfiguratorpage.cpp --- /*************************************************************************** konfiguratorpage.cpp - description ------------------- copyright : (C) 2003 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 "konfiguratorpage.h" #include <qlayout.h> #include "../krusader.h" #include <qtooltip.h> KonfiguratorPage::KonfiguratorPage( bool firstTime, QWidget* parent, const char* name ) : QFrame( parent, name ), firstCall( firstTime ) { } bool KonfiguratorPage::apply() { bool restartNeeded = false; KonfiguratorExtension *item = itemList.first(); while( item ) { restartNeeded = restartNeeded || item->apply(); item = itemList.next(); } krConfig->sync(); return restartNeeded; } void KonfiguratorPage::setDefaults() { KonfiguratorExtension *item = itemList.first(); while( item ) { item->setDefaults(); item = itemList.next(); } } void KonfiguratorPage::loadInitialValues() { KonfiguratorExtension *item = itemList.first(); while( item ) { item->loadInitialValue(); item = itemList.next(); } } bool KonfiguratorPage::isChanged() { KonfiguratorExtension *currentItem = itemList.current(); /* save the current pointer */ bool isChanged = false; KonfiguratorExtension *item = itemList.first(); while( item ) { isChanged = isChanged || item->isChanged(); item = itemList.next(); } itemList.find( currentItem ); /* restore the current pointer */ return isChanged; } KonfiguratorCheckBox* KonfiguratorPage::createCheckBox( QString cls, QString name, bool dflt, QString text, QWidget *parent, bool rst, QString toolTip ) { KonfiguratorCheckBox *checkBox = new KonfiguratorCheckBox( cls, name, dflt, text, parent, QString(cls + "/" + name).ascii(), rst ); if( !toolTip.isEmpty() ) QToolTip::add( checkBox, toolTip ); registerObject( checkBox->extension() ); return checkBox; } KonfiguratorSpinBox* KonfiguratorPage::createSpinBox( QString cls, QString name, int dflt, int min, int max, QWidget *parent, bool rst ) { KonfiguratorSpinBox *spinBox = new KonfiguratorSpinBox( cls, name, dflt, min, max, parent, QString(cls + "/" + name).ascii(), rst ); registerObject( spinBox->extension() ); return spinBox; } KonfiguratorEditBox* KonfiguratorPage::createEditBox( QString cls, QString name, QString dflt, QWidget *parent, bool rst ) { KonfiguratorEditBox *editBox = new KonfiguratorEditBox( cls, name, dflt, parent, QString(cls + "/" + name).ascii(), rst ); registerObject( editBox->extension() ); return editBox; } KonfiguratorURLRequester* KonfiguratorPage::createURLRequester( QString cls, QString name, QString dflt, QWidget *parent, bool rst ) { KonfiguratorURLRequester *urlRequester = new KonfiguratorURLRequester( cls, name, dflt, parent, QString(cls + "/" + name).ascii(), rst ); registerObject( urlRequester->extension() ); return urlRequester; } QGroupBox* KonfiguratorPage::createFrame( QString text, QWidget *parent, const char *widgetName ) { QGroupBox *groupBox = new QGroupBox( parent, widgetName ); groupBox->setFrameShape( QGroupBox::Box ); groupBox->setFrameShadow( QGroupBox::Sunken ); if( !text.isNull() ) groupBox->setTitle( text ); groupBox->setColumnLayout(0, Qt::Vertical ); groupBox->layout()->setSpacing( 0 ); groupBox->layout()->setMargin( 0 ); return groupBox; } QGridLayout* KonfiguratorPage::createGridLayout( QLayout *parent ) { QGridLayout *gridLayout = new QGridLayout( parent ); gridLayout->setAlignment( Qt::AlignTop ); gridLayout->setSpacing( 6 ); gridLayout->setMargin( 11 ); return gridLayout; } QLabel* KonfiguratorPage::addLabel( QGridLayout *layout, int x, int y, QString label, QWidget *parent, const char *widgetName ) { QLabel *lbl = new QLabel( label, parent, widgetName ); layout->addWidget( lbl, x, y ); return lbl; } QWidget* KonfiguratorPage::createSpacer( QWidget *parent, const char *widgetName ) { QWidget *widget = new QWidget( parent, widgetName ); QHBoxLayout *hboxlayout = new QHBoxLayout( widget ); QSpacerItem* spacer = new QSpacerItem( 40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); hboxlayout->addItem( spacer ); return widget; } QWidget* KonfiguratorPage::createCheckBoxGroup( int sizex, int sizey, KONFIGURATOR_CHECKBOX_PARAM *params, int paramNum, QPtrList<KonfiguratorCheckBox> &cbList, QWidget *parent, const char *widgetName ) { QWidget *groupWidget = new QWidget( parent, widgetName ); QGridLayout *layout = new QGridLayout( groupWidget ); layout->setSpacing( 11 ); layout->setMargin( 0 ); cbList.clear(); int x = 0, y = 0; for( int i=0; i != paramNum; i++ ) { KonfiguratorCheckBox *checkBox = createCheckBox( params[i].configClass, params[i].configName, params[i].defaultValue, params[i].text, groupWidget, params[i].restart, params[i].toolTip ); cbList.append( checkBox ); layout->addWidget( checkBox, y, x ); if( sizex ) { if( ++x == sizex ) x = 0, y++; } else { if( ++y == sizey ) y = 0, x++; } } return groupWidget; } KonfiguratorRadioButtons* KonfiguratorPage::createRadioButtonGroup( QString cls, QString name, QString dflt, int sizex, int sizey, KONFIGURATOR_NAME_VALUE_PAIR *params, int paramNum, QWidget *parent, const char *widgetName, bool rst ) { QButtonGroup *groupWidget = new QButtonGroup( parent, widgetName ); groupWidget->setFrameShape( QButtonGroup::NoFrame ); groupWidget->setFrameShadow( QButtonGroup::Sunken ); groupWidget->setTitle( "" ); groupWidget->setExclusive( true ); groupWidget->setRadioButtonExclusive( true ); groupWidget->setColumnLayout(0, Qt::Vertical ); QGridLayout *layout = new QGridLayout( groupWidget->layout() ); layout->setAlignment( Qt::AlignTop ); layout->setSpacing( 11 ); layout->setMargin( 0 ); int x = 0, y = 0; KonfiguratorRadioButtons *radioWidget = new KonfiguratorRadioButtons( cls, name, dflt, groupWidget, rst ); for( int i=0; i != paramNum; i++ ) { QRadioButton *radBtn = new QRadioButton( params[i].text, groupWidget, QString( cls + "/" + name + "/" + params[i].value ).ascii() ); layout->addWidget( radBtn, y, x ); radioWidget->addRadioButton( radBtn, params[i].value ); if( sizex ) { if( ++x == sizex ) x = 0, y++; } else { if( ++y == sizey ) y = 0, x++; } } radioWidget->loadInitialValue(); registerObject( radioWidget ); return radioWidget; } KonfiguratorFontChooser *KonfiguratorPage::createFontChooser( QString cls, QString name, QFont *dflt, QWidget *parent, bool rst ) { KonfiguratorFontChooser *fontChooser = new KonfiguratorFontChooser( cls, name, dflt, parent, QString(cls + "/" + name).ascii(), rst ); registerObject( fontChooser->extension() ); return fontChooser; } KonfiguratorComboBox *KonfiguratorPage::createComboBox( QString cls, QString name, QString dflt, KONFIGURATOR_NAME_VALUE_PAIR *params, int paramNum, QWidget *parent, bool rst ) { KonfiguratorComboBox *comboBox = new KonfiguratorComboBox( cls, name, dflt, params, paramNum, parent, QString(cls + "/" + name).ascii(), rst ); registerObject( comboBox->extension() ); return comboBox; } QFrame* KonfiguratorPage::createLine( QWidget *parent, const char *widgetName ) { QFrame *line = new QFrame( parent, widgetName ); line->setFrameStyle( QFrame::HLine | QFrame::Sunken ); return line; } void KonfiguratorPage::registerObject( KonfiguratorExtension *item ) { KonfiguratorExtension *currentItem = itemList.current(); itemList.append( item ); connect( item, SIGNAL( sigChanged( bool ) ), this, SIGNAL ( sigChanged( bool ) ) ); itemList.find( currentItem ); } void KonfiguratorPage::removeObject( KonfiguratorExtension *item ) { if( item == itemList.current() ) { itemList.remove(); if( itemList.current() != itemList.getFirst() ) itemList.prev(); } else itemList.removeRef( item ); } #include "konfiguratorpage.moc" --- NEW FILE: konfiguratorpage.h --- /*************************************************************************** konfiguratorpage.h - description ------------------- copyright : (C) 2003 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 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 __KONFIGURATOR_PAGE_H__ #define __KONFIGURATOR_PAGE_H__ #include "konfiguratoritems.h" #include <qframe.h> #include <qptrlist.h> #include <qgroupbox.h> #include <qlabel.h> #include <qlayout.h> struct KONFIGURATOR_CHECKBOX_PARAM; struct KONFIGURATOR_NAME_VALUE_PAIR; class KonfiguratorPage : public QFrame { Q_OBJECT public: KonfiguratorPage( bool firstTime, QWidget* parent, const char* name ); virtual bool apply(); virtual void setDefaults(); virtual void loadInitialValues(); virtual bool isChanged(); inline bool isFirst() {return firstCall;} KonfiguratorCheckBox *createCheckBox( QString cls, QString name, bool dflt, QString text, QWidget *parent=0, bool rst=false, QString toolTip = QString::null ); KonfiguratorSpinBox *createSpinBox( QString cls, QString name, int dflt, int min, int max, QWidget *parent = 0, bool rst = false ); KonfiguratorEditBox *createEditBox( QString cls, QString name, QString dflt, QWidget *parent=0, bool rst=false ); KonfiguratorURLRequester *createURLRequester( QString cls, QString name, QString dflt, QWidget *parent, bool rst ); KonfiguratorFontChooser *createFontChooser( QString cls, QString name, QFont *dflt, QWidget *parent=0, bool rst=false ); KonfiguratorComboBox *createComboBox( QString cls, QString name, QString dflt, KONFIGURATOR_NAME_VALUE_PAIR *params, int paramNum, QWidget *parent=0, bool rst=false ); QGroupBox *createFrame( QString text = QString::null, QWidget *parent=0, const char *widgetName=0 ); QGridLayout *createGridLayout( QLayout *parent ); QLabel *addLabel( QGridLayout *layout, int x, int y, QString label, QWidget *parent=0, const char *widgetName=0 ); QWidget *createSpacer( QWidget *parent=0, const char *widgetName=0 ); QFrame *createLine( QWidget *parent, const char *widgetName ); QWidget *createCheckBoxGroup( int sizex, int sizey, KONFIGURATOR_CHECKBOX_PARAM *params, int paramNum, QPtrList<KonfiguratorCheckBox> &cbList, QWidget *parent=0, const char *widgetName=0 ); KonfiguratorRadioButtons *createRadioButtonGroup( QString cls, QString name, QString dflt, int sizex, int sizey, KONFIGURATOR_NAME_VALUE_PAIR *params, int paramNum, QWidget *parent=0, const char *widgetName=0, bool rst=false ); void registerObject( KonfiguratorExtension *item ); void removeObject( KonfiguratorExtension *item ); signals: void sigChanged( bool ); protected: QPtrList<KonfiguratorExtension> itemList; private: bool firstCall; }; struct KONFIGURATOR_CHECKBOX_PARAM { QString configClass; QString configName; bool defaultValue; QString text; bool restart; QString toolTip; }; #endif /* __KONFIGURATOR_PAGE_H__ */ Index: kglookfeel.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Konfigurator/kglookfeel.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** kglookfeel.cpp 31 Jan 2004 11:22:25 -0000 1.2 --- kglookfeel.cpp 31 Jan 2004 12:53:11 -0000 1.3 *************** *** 144,147 **** --- 144,148 ---- keyBindingsLayout->addWidget(keyBindings->keyChooserWidget(),0,0); registerObject( keyBindings ); + keyBindings->keyChooserWidget()->show(); } *************** *** 155,158 **** --- 156,160 ---- toolBarLayout->addWidget(editToolbar->editToolbarWidget(),0,0); registerObject( editToolbar ); + editToolbar->editToolbarWidget()->show(); } |
From: <er...@pr...> - 2004-01-31 11:36:43
|
Update of /cvsroot/krusader/krusader_kde3/krusader/Konfigurator In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18627/krusader/Konfigurator Modified Files: konfigurator.cpp Log Message: disabled Welcome page for now. Index: konfigurator.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Konfigurator/konfigurator.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** konfigurator.cpp 31 Jan 2004 11:22:25 -0000 1.3 --- konfigurator.cpp 31 Jan 2004 11:35:02 -0000 1.4 *************** *** 77,82 **** { // welcome ! newContent(new KgWelcome(firstTime, widget->addPage(i18n("Welcome"),i18n("Welcome to Konfigurator"), ! QPixmap(krLoader->loadIcon("krusader",KIcon::Desktop,32))))); // startup newContent(new KgStartup(firstTime, widget->addPage(i18n("Startup"), --- 77,82 ---- { // welcome ! // newContent(new KgWelcome(firstTime, widget->addPage(i18n("Welcome"),i18n("Welcome to Konfigurator"), ! // QPixmap(krLoader->loadIcon("krusader",KIcon::Desktop,32))))); // startup newContent(new KgStartup(firstTime, widget->addPage(i18n("Startup"), |
From: <er...@pr...> - 2004-01-31 11:25:41
|
Update of /cvsroot/krusader/krusader_kde3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8488 Modified Files: Krusader.kdevelop krusader.kdevprj ChangeLog Log Message: new konfigurator! Index: Krusader.kdevelop =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/Krusader.kdevelop,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** Krusader.kdevelop 3 Jan 2004 13:36:24 -0000 1.18 --- Krusader.kdevelop 31 Jan 2004 11:23:46 -0000 1.19 *************** *** 129,139 **** <kdevcvs> <cvsoptions>-f -z3</cvsoptions> ! <commitoptions></commitoptions> <updateoptions>-dP</updateoptions> ! <addoptions></addoptions> <removeoptions>-f</removeoptions> <diffoptions>-u3 -p</diffoptions> ! <logoptions></logoptions> ! <rshoptions></rshoptions> <revertoptions>-C -d -P</revertoptions> </kdevcvs> --- 129,139 ---- <kdevcvs> <cvsoptions>-f -z3</cvsoptions> ! <commitoptions/> <updateoptions>-dP</updateoptions> ! <addoptions/> <removeoptions>-f</removeoptions> <diffoptions>-u3 -p</diffoptions> ! <logoptions/> ! <rshoptions/> <revertoptions>-C -d -P</revertoptions> </kdevcvs> *************** *** 153,157 **** <references> <pcs>Qt</pcs> - <pcs>krusader-source</pcs> <pcs>KDElibs</pcs> </references> --- 153,156 ---- Index: krusader.kdevprj =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader.kdevprj,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** krusader.kdevprj 10 Jan 2004 00:03:24 -0000 1.47 --- krusader.kdevprj 31 Jan 2004 11:23:46 -0000 1.48 *************** *** 27,31 **** [General] ! AMChanged=false author=Shie Erlich & Rafi Yanai configure_args=\s--build=i386-linux --host=i386-linux --target=i386-linux --prefix=/usr\s --- 27,31 ---- [General] ! AMChanged=true author=Shie Erlich & Rafi Yanai configure_args=\s--build=i386-linux --host=i386-linux --target=i386-linux --prefix=/usr\s *************** *** 602,606 **** [krusader/Konfigurator/Makefile.am] ! files=krusader/Konfigurator/kgadvanced.cpp,krusader/Konfigurator/kgadvanced.h,krusader/Konfigurator/kgadvancedimpl.cpp,krusader/Konfigurator/kgadvancedimpl.h,krusader/Konfigurator/kgarchives.cpp,krusader/Konfigurator/kgarchives.h,krusader/Konfigurator/kgarchivesimpl.cpp,krusader/Konfigurator/kgarchivesimpl.h,krusader/Konfigurator/kggeneral.cpp,krusader/Konfigurator/kggeneral.h,krusader/Konfigurator/kggeneralimpl.cpp,krusader/Konfigurator/kggeneralimpl.h,krusader/Konfigurator/kglookfeel.cpp,krusader/Konfigurator/kglookfeel.h,krusader/Konfigurator/kglookfeelimpl.cpp,krusader/Konfigurator/kglookfeelimpl.h,krusader/Konfigurator/kgstartup.cpp,krusader/Konfigurator/kgstartup.h,krusader/Konfigurator/kgstartupimpl.cpp,krusader/Konfigurator/kgstartupimpl.h,krusader/Konfigurator/kgwelcome.cpp,krusader/Konfigurator/kgwelcome.h,krusader/Konfigurator/konfigurator.cpp,krusader/Konfigurator/konfigurator.h sharedlib_LDFLAGS=-version-info 0:0:0 sharedlib_rootname=Konfigurator --- 602,606 ---- [krusader/Konfigurator/Makefile.am] ! files=krusader/Konfigurator/kgadvanced.cpp,krusader/Konfigurator/kgadvanced.h,krusader/Konfigurator/kgarchives.cpp,krusader/Konfigurator/kgarchives.h,krusader/Konfigurator/kggeneral.cpp,krusader/Konfigurator/kggeneral.h,krusader/Konfigurator/kglookfeel.cpp,krusader/Konfigurator/kglookfeel.h,krusader/Konfigurator/kgstartup.cpp,krusader/Konfigurator/kgstartup.h,krusader/Konfigurator/kgwelcome.cpp,krusader/Konfigurator/kgwelcome.h,krusader/Konfigurator/konfigurator.cpp,krusader/Konfigurator/konfigurator.h,krusader/Konfigurator/konfiguratoritems.cpp,krusader/Konfigurator/konfiguratoritems.h,krusader/Konfigurator/konfiguratorpage.cpp,krusader/Konfigurator/konfiguratorpage.h sharedlib_LDFLAGS=-version-info 0:0:0 sharedlib_rootname=Konfigurator *************** *** 620,635 **** type=HEADER - [krusader/Konfigurator/kgadvancedimpl.cpp] - dist=true - install=false - install_location= - type=SOURCE - - [krusader/Konfigurator/kgadvancedimpl.h] - dist=true - install=false - install_location= - type=HEADER - [krusader/Konfigurator/kgarchives.cpp] dist=true --- 620,623 ---- *************** *** 644,659 **** type=HEADER - [krusader/Konfigurator/kgarchivesimpl.cpp] - dist=true - install=false - install_location= - type=SOURCE - - [krusader/Konfigurator/kgarchivesimpl.h] - dist=true - install=false - install_location= - type=HEADER - [krusader/Konfigurator/kggeneral.cpp] dist=true --- 632,635 ---- *************** *** 668,683 **** type=HEADER - [krusader/Konfigurator/kggeneralimpl.cpp] - dist=true - install=false - install_location= - type=SOURCE - - [krusader/Konfigurator/kggeneralimpl.h] - dist=true - install=false - install_location= - type=HEADER - [krusader/Konfigurator/kglookfeel.cpp] dist=true --- 644,647 ---- *************** *** 692,696 **** type=HEADER ! [krusader/Konfigurator/kglookfeelimpl.cpp] dist=true install=false --- 656,660 ---- type=HEADER ! [krusader/Konfigurator/kgstartup.cpp] dist=true install=false *************** *** 698,702 **** type=SOURCE ! [krusader/Konfigurator/kglookfeelimpl.h] dist=true install=false --- 662,666 ---- type=SOURCE ! [krusader/Konfigurator/kgstartup.h] dist=true install=false *************** *** 704,708 **** type=HEADER ! [krusader/Konfigurator/kgstartup.cpp] dist=true install=false --- 668,672 ---- type=HEADER ! [krusader/Konfigurator/kgwelcome.cpp] dist=true install=false *************** *** 710,714 **** type=SOURCE ! [krusader/Konfigurator/kgstartup.h] dist=true install=false --- 674,678 ---- type=SOURCE ! [krusader/Konfigurator/kgwelcome.h] dist=true install=false *************** *** 716,720 **** type=HEADER ! [krusader/Konfigurator/kgstartupimpl.cpp] dist=true install=false --- 680,684 ---- type=HEADER ! [krusader/Konfigurator/konfigurator.cpp] dist=true install=false *************** *** 722,726 **** type=SOURCE ! [krusader/Konfigurator/kgstartupimpl.h] dist=true install=false --- 686,690 ---- type=SOURCE ! [krusader/Konfigurator/konfigurator.h] dist=true install=false *************** *** 728,732 **** type=HEADER ! [krusader/Konfigurator/kgwelcome.cpp] dist=true install=false --- 692,696 ---- type=HEADER ! [krusader/Konfigurator/konfiguratoritems.cpp] dist=true install=false *************** *** 734,738 **** type=SOURCE ! [krusader/Konfigurator/kgwelcome.h] dist=true install=false --- 698,702 ---- type=SOURCE ! [krusader/Konfigurator/konfiguratoritems.h] dist=true install=false *************** *** 740,744 **** type=HEADER ! [krusader/Konfigurator/konfigurator.cpp] dist=true install=false --- 704,708 ---- type=HEADER ! [krusader/Konfigurator/konfiguratorpage.cpp] dist=true install=false *************** *** 746,750 **** type=SOURCE ! [krusader/Konfigurator/konfigurator.h] dist=true install=false --- 710,714 ---- type=SOURCE ! [krusader/Konfigurator/konfiguratorpage.h] dist=true install=false Index: ChangeLog =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/ChangeLog,v retrieving revision 1.172 retrieving revision 1.173 diff -C2 -d -r1.172 -r1.173 *** ChangeLog 30 Jan 2004 23:25:04 -0000 1.172 --- ChangeLog 31 Jan 2004 11:23:46 -0000 1.173 *************** *** 1,3 **** ! ADDED: heiner's quicksearch patch ADDED: calculate occupied space prints the directory's size (wincmd-style) - thanks heiner! ADDED: current directory in history menu is checked --- 1,4 ---- ! ADDED: Csaba's new konfigurator is here, boys and girls! ! ADDED: heiner's quicksearch patch ADDED: calculate occupied space prints the directory's size (wincmd-style) - thanks heiner! ADDED: current directory in history menu is checked |
Update of /cvsroot/krusader/krusader_kde3/krusader/Konfigurator In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7241/krusader/Konfigurator Modified Files: Makefile.am kgadvanced.cpp kgadvanced.h kgarchives.cpp kgarchives.h kggeneral.cpp kggeneral.h kglookfeel.cpp kglookfeel.h kgstartup.cpp kgstartup.h kgwelcome.cpp kgwelcome.h konfigurator.cpp konfigurator.h Removed Files: kgadvancedimpl.cpp kgadvancedimpl.h kgarchivesimpl.cpp kgarchivesimpl.h kggeneralimpl.cpp kggeneralimpl.h kglookfeelimpl.cpp kglookfeelimpl.h kgstartupimpl.cpp kgstartupimpl.h Log Message: new konfigurator! Index: Makefile.am =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Konfigurator/Makefile.am,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Makefile.am 15 Apr 2002 18:48:53 -0000 1.1.1.1 --- Makefile.am 31 Jan 2004 11:22:25 -0000 1.2 *************** *** 6,13 **** libKonfigurator_a_METASOURCES = AUTO ! libKonfigurator_a_SOURCES = konfigurator.cpp kgwelcome.cpp kgstartupimpl.cpp kgstartup.cpp kglookfeelimpl.cpp kglookfeel.cpp kggeneralimpl.cpp kggeneral.cpp kgarchivesimpl.cpp kgarchives.cpp kgadvancedimpl.cpp kgadvanced.cpp ! EXTRA_DIST = kgadvanced.cpp kgadvanced.h kgadvancedimpl.cpp kgadvancedimpl.h kgarchives.cpp kgarchives.h kgarchivesimpl.cpp kgarchivesimpl.h kggeneral.cpp kggeneral.h kggeneralimpl.cpp kggeneralimpl.h kglookfeel.cpp kglookfeel.h kglookfeelimpl.cpp kglookfeelimpl.h kgstartup.cpp kgstartup.h kgstartupimpl.cpp kgstartupimpl.h kgwelcome.cpp kgwelcome.h konfigurator.cpp konfigurator.h ####### kdevelop will overwrite this part!!! (end)############ --- 6,13 ---- libKonfigurator_a_METASOURCES = AUTO ! libKonfigurator_a_SOURCES = konfiguratorpage.cpp konfiguratoritems.cpp konfigurator.cpp kgwelcome.cpp kgstartup.cpp kglookfeel.cpp kggeneral.cpp kgarchives.cpp kgadvanced.cpp ! EXTRA_DIST = kgadvanced.cpp kgadvanced.h kgarchives.cpp kgarchives.h kggeneral.cpp kggeneral.h kglookfeel.cpp kglookfeel.h kgstartup.cpp kgstartup.h kgwelcome.cpp kgwelcome.h konfigurator.cpp konfigurator.h konfiguratoritems.cpp konfiguratoritems.h konfiguratorpage.cpp konfiguratorpage.h ####### kdevelop will overwrite this part!!! (end)############ Index: kgadvanced.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Konfigurator/kgadvanced.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** kgadvanced.cpp 18 Oct 2003 12:48:30 -0000 1.3 --- kgadvanced.cpp 31 Jan 2004 11:22:25 -0000 1.4 *************** *** 1,141 **** ! /**************************************************************************** ! ** Form implementation generated from reading ui file 'kgadvanced.ui' ! ** ! ** Created: Tue Apr 10 01:13:24 2001 ! ** by: The User Interface Compiler (uic) ! ** ! ** WARNING! All changes made in this file will be lost! ! ****************************************************************************/ ! #include "kgadvanced.h" ! #include <sys/param.h> ! #include <qcheckbox.h> ! #include <qgroupbox.h> ! #include <qlabel.h> ! #include <qpushbutton.h> ! #include <qspinbox.h> ! #include <qlayout.h> ! #include <qvariant.h> ! #include <qtooltip.h> ! #include <qwhatsthis.h> ! #include <klocale.h> ! ! /* ! * Constructs a kgAdvanced which is a child of 'parent', with the ! * name 'name'.' ! */ ! kgAdvanced::kgAdvanced( QWidget* parent, const char* name ) ! : QFrame( parent, name ) ! { ! if ( !name ) ! setName( "kgAdvanced" ); ! resize( 430, 354 ); ! setCaption( i18n( "Advanced" ) ); ! setFrameShape( QFrame::NoFrame ); ! setFrameShadow( QFrame::MShadow ); ! kgAdvancedLayout = new QGridLayout( parent ); ! kgAdvancedLayout->setSpacing( 6 ); ! kgAdvancedLayout->setMargin( 11 ); ! ! GroupBox6 = new QGroupBox( parent, "GroupBox6" ); ! GroupBox6->setTitle( i18n( "Confirmations" ) ); ! ! QWidget* privateLayoutWidget = new QWidget( GroupBox6, "Layout6" ); ! privateLayoutWidget->setGeometry( QRect( 11, 21, 420, 140 ) ); ! Layout6 = new QVBoxLayout( privateLayoutWidget ); ! Layout6->setSpacing( 6 ); ! Layout6->setMargin( 0 ); ! ! TextLabel1 = new QLabel( privateLayoutWidget, "TextLabel1" ); ! TextLabel1->setText( i18n( "Krusader will request user confirmation for the following operations:" ) ); ! Layout6->addWidget( TextLabel1 ); ! ! kgNonEmpty = new QCheckBox( privateLayoutWidget, "kgNonEmpty" ); ! kgNonEmpty->setText( i18n( "Deleting non-empty directorie(s)" ) ); ! Layout6->addWidget( kgNonEmpty ); ! kgDelete = new QCheckBox( privateLayoutWidget, "kgDelete" ); ! kgDelete->setText( i18n( "Deleting file(s)" ) ); ! Layout6->addWidget( kgDelete ); ! kgCopy = new QCheckBox( privateLayoutWidget, "kgCopy" ); ! kgCopy->setText( i18n( "Copying file(s)" ) ); ! Layout6->addWidget( kgCopy ); ! kgMove = new QCheckBox( privateLayoutWidget, "kgMove" ); ! kgMove->setText( i18n( "Moving file(s)" ) ); ! Layout6->addWidget( kgMove ); ! kgAdvancedLayout->addWidget( GroupBox6, 1, 0 ); ! GroupBox15 = new QGroupBox( parent, "GroupBox15" ); ! GroupBox15->setTitle( i18n( "Fine-Tuning" ) ); ! QWidget* privateLayoutWidget_2 = new QWidget( GroupBox15, "Layout5" ); ! privateLayoutWidget_2->setGeometry( QRect( 10, 20, 230, 27 ) ); ! Layout5 = new QHBoxLayout( privateLayoutWidget_2 ); ! Layout5->setSpacing( 6 ); ! Layout5->setMargin( 0 ); ! TextLabel2_2 = new QLabel( privateLayoutWidget_2, "TextLabel2_2" ); ! TextLabel2_2->setText( i18n( "Icon cache size (KB):" ) ); ! QToolTip::add( TextLabel2_2, i18n( "Cache size determines how fast Krusader can display the contents of a panel. However too big a cache might consume your memory." ) ); ! Layout5->addWidget( TextLabel2_2 ); ! kgCacheSize = new QSpinBox( privateLayoutWidget_2, "kgCacheSize" ); ! kgCacheSize->setButtonSymbols( QSpinBox::UpDownArrows ); ! kgCacheSize->setMaxValue( 8192 ); ! kgCacheSize->setMinValue( 1 ); ! QToolTip::add( kgCacheSize, i18n( "Cache size determines how fast can Krusader display the contents of a panel. However too big a cache might consume your memory." ) ); ! Layout5->addWidget( kgCacheSize ); ! kgAdvancedLayout->addWidget( GroupBox15, 2, 0 ); ! GroupBox2 = new QGroupBox( parent, "GroupBox2" ); ! GroupBox2->setTitle( i18n( "General" ) ); ! QWidget* privateLayoutWidget_3 = new QWidget( GroupBox2, "Layout3" ); ! privateLayoutWidget_3->setGeometry( QRect( 10, 20, 450, 40 ) ); ! Layout3 = new QGridLayout( privateLayoutWidget_3 ); ! Layout3->setSpacing( 6 ); ! Layout3->setMargin( 0 ); ! kgRootSwitch = new QCheckBox( privateLayoutWidget_3, "kgRootSwitch" ); ! kgRootSwitch->setText( i18n( "I AM ROOT - use with caution !" ) ); ! QToolTip::add( kgRootSwitch, i18n( "Root Switch: if checked, Krusader will try to act as root - thus attempting to perform actions WITHOUT checking permissions !!!" ) ); ! Layout3->addWidget( kgRootSwitch, 0, 0 ); ! kgAutomount = new QCheckBox( privateLayoutWidget_3, "kgAutomount" ); ! kgAutomount->setText( i18n( "Automount filesystems " ) ); ! QToolTip::add( kgAutomount, i18n( "If checked, Krusader will mount FSTAB mount-points when needed." ) ); ! #ifdef BSD ! kgAutomount->hide(); ! #endif ! Layout3->addWidget( kgAutomount, 0, 1 ); ! kgAdvancedLayout->addWidget( GroupBox2, 0, 0 ); - // signals and slots connections - } ! /* ! * Destroys the object and frees any allocated resources ! */ ! kgAdvanced::~kgAdvanced() ! { ! // no need to delete child widgets, Qt does it all for us ! } ! void kgAdvanced::slotApplyChanges() ! { ! qWarning( "kgAdvanced::slotApplyChanges(): Not implemented yet!" ); ! } ! void kgAdvanced::slotDefaultSettings() ! { ! qWarning( "kgAdvanced::slotDefaultSettings(): Not implemented yet!" ); } #include "kgadvanced.moc" - - --- 1,101 ---- ! /*************************************************************************** ! kgadvanced.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 "kgadvanced.h" ! #include "../defaults.h" ! #include <klocale.h> ! #include <qhbox.h> ! #include <qtooltip.h> ! KgAdvanced::KgAdvanced( bool first, QWidget* parent, const char* name ) : ! KonfiguratorPage( first, parent, name ) ! { ! QGridLayout *kgAdvancedLayout = new QGridLayout( parent ); ! kgAdvancedLayout->setSpacing( 6 ); ! kgAdvancedLayout->setMargin( 11 ); ! // -------------------------- GENERAL GROUPBOX ---------------------------------- ! ! QGroupBox *generalGrp = createFrame( i18n( "General" ), parent, "kgAdvGeneralGrp" ); ! QGridLayout *generalGrid = createGridLayout( generalGrp->layout() ); ! KONFIGURATOR_CHECKBOX_PARAM generalSettings[] = ! // cfg_class cfg_name default text restart tooltip ! {{"Advanced","Permission Check", false, i18n( "I AM ROOT - use with caution !" ), false, i18n( "Root Switch: if checked, Krusader will try to act as root - thus attempting to perform actions WITHOUT checking permissions !!!" )}, ! {"Advanced","AutoMount", _AutoMount, i18n( "Automount filesystems" ), false, i18n( "If checked, Krusader will mount FSTAB mount-points when needed." )}}; ! QWidget *generals = createCheckBoxGroup( 2, 0, generalSettings, 2, generalCbs, generalGrp ); ! generalGrid->addWidget( generals, 1, 0 ); ! generalCbs.at(0)->setEnabled( false ); /* disable Permission Check */ ! ! kgAdvancedLayout->addWidget( generalGrp, 0 ,0 ); ! // ----------------------- CONFIRMATIONS GROUPBOX ------------------------------- ! ! QGroupBox *confirmGrp = createFrame( i18n( "Confirmations" ), parent, "confirmGrp" ); ! QGridLayout *confirmGrid = createGridLayout( confirmGrp->layout() ); ! addLabel( confirmGrid, 0, 0, "\n"+i18n( "Krusader will request user confirmation for the following operations:" )+"\n", ! confirmGrp, "KgAdvLabel1" ); ! ! KONFIGURATOR_CHECKBOX_PARAM confirmations[] = ! // cfg_class cfg_name default text restart ToolTip ! {{"Advanced","Confirm Unempty Dir", _ConfirmUnemptyDir, i18n( "Deleting non-empty directorie(s)" ), false, ""}, ! {"Advanced","Confirm Delete", _ConfirmDelete, i18n( "Deleting file(s)" ), false, ""}, ! {"Advanced","Confirm Copy", _ConfirmCopy, i18n( "Copying file(s)" ), false, ""}, ! {"Advanced","Confirm Move", _ConfirmMove, i18n( "Moving file(s)" ), false, ""}}; ! QWidget *confWnd = createCheckBoxGroup( 1, 0, confirmations, 4, confCbs, confirmGrp ); ! confirmGrid->addWidget( confWnd, 1, 0 ); ! kgAdvancedLayout->addWidget( confirmGrp, 1 ,0 ); ! // ------------------------ FINE-TUNING GROUPBOX -------------------------------- ! QGroupBox *fineTuneGrp = createFrame( i18n( "Fine-Tuning" ), parent, "kgFineTuneGrp" ); ! QGridLayout *fineTuneGrid = createGridLayout( fineTuneGrp->layout() ); ! QHBox *hbox = new QHBox( fineTuneGrp, "fineTuneHBox" ); ! QLabel *label = new QLabel( i18n( "Icon cache size (KB):" ), hbox, "iconCacheLabel" ); ! QToolTip::add( label, i18n( "Cache size determines how fast Krusader can display the contents of a panel. However too big a cache might consume your memory." ) ); ! KonfiguratorSpinBox *spinBox = createSpinBox( "Advanced", "Icon Cache Size", _IconCacheSize, ! 1, 8192, hbox, false ); ! QToolTip::add( spinBox, i18n( "Cache size determines how fast Krusader can display the contents of a panel. However too big a cache might consume your memory." ) ); ! createSpacer( hbox, "fineTuneSpacer" ); ! ! fineTuneGrid->addWidget( hbox, 0, 0 ); ! ! kgAdvancedLayout->addWidget( fineTuneGrp, 2 ,0 ); } #include "kgadvanced.moc" Index: kgadvanced.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Konfigurator/kgadvanced.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** kgadvanced.h 15 Apr 2002 18:49:00 -0000 1.1.1.1 --- kgadvanced.h 31 Jan 2004 11:22:25 -0000 1.2 *************** *** 1,54 **** ! /**************************************************************************** ! ** Form interface generated from reading ui file 'kgadvanced.ui' ! ** ! ** Created: Tue Apr 10 01:13:00 2001 ! ** by: The User Interface Compiler (uic) ! ** ! ** WARNING! All changes made in this file will be lost! ! ****************************************************************************/ ! #ifndef KGADVANCED_H ! #define KGADVANCED_H ! #include <qvariant.h> ! #include <qframe.h> ! class QVBoxLayout; ! class QHBoxLayout; ! class QGridLayout; ! class QCheckBox; ! class QGroupBox; ! class QLabel; ! class QSpinBox; ! class kgAdvanced : public QFrame ! { ! Q_OBJECT ! public: ! kgAdvanced( QWidget* parent = 0, const char* name = 0 ); ! ~kgAdvanced(); ! QGroupBox* GroupBox6; ! QLabel* TextLabel1; ! QCheckBox* kgNonEmpty; ! QCheckBox* kgDelete; ! QCheckBox* kgCopy; ! QCheckBox* kgMove; ! QGroupBox* GroupBox15; ! QLabel* TextLabel2_2; ! QSpinBox* kgCacheSize; ! QGroupBox* GroupBox2; ! QCheckBox* kgRootSwitch; ! QCheckBox* kgAutomount; ! public slots: ! virtual void slotApplyChanges(); ! virtual void slotDefaultSettings(); protected: ! QGridLayout* kgAdvancedLayout; ! QVBoxLayout* Layout6; ! QHBoxLayout* Layout5; ! QGridLayout* Layout3; }; ! #endif // KGADVANCED_H --- 1,48 ---- ! /*************************************************************************** ! kgadvanced.h - 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 ! 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 __KGADVANCED_H__ ! #define __KGADVANCED_H__ ! ! #include "konfiguratorpage.h" ! ! class KgAdvanced : public KonfiguratorPage ! { ! Q_OBJECT ! ! public: ! KgAdvanced( bool first, QWidget* parent=0, const char* name=0 ); protected: ! QPtrList<KonfiguratorCheckBox> generalCbs; ! QPtrList<KonfiguratorCheckBox> confCbs; }; ! #endif /* __KGADVANCED_H__ */ Index: kgarchives.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Konfigurator/kgarchives.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** kgarchives.cpp 10 Jul 2003 18:36:57 -0000 1.4 --- kgarchives.cpp 31 Jan 2004 11:22:25 -0000 1.5 *************** *** 1,170 **** /*************************************************************************** ! ** Form implementation generated from reading ui file 'kgarchives.ui' ! ** ! ** Created: Tue Apr 17 20:21:46 2001 ! ** by: The User Interface Compiler (uic) ! ** ! ** WARNING! All changes made in this file will be lost! ! ****************************************************************************/ ! #include "kgarchives.h" ! ! #include <qcheckbox.h> ! #include <qgroupbox.h> ! #include <qlabel.h> ! #include <qpushbutton.h> ! #include <qlayout.h> ! #include <qvariant.h> ! #include <qtooltip.h> ! #include <qwhatsthis.h> ! #include <klocale.h> ! ! /* ! * Constructs a kgArchives which is a child of 'parent', with the ! * name 'name'.' ! */ ! kgArchives::kgArchives( QWidget* parent, const char* name ) ! : QFrame( parent, name ) ! { ! if ( !name ) ! setName( "kgArchives" ); ! resize( 378, 348 ); ! setCaption( i18n( "Archives" ) ); ! setFrameShape( QFrame::NoFrame ); ! setFrameShadow( QFrame::MShadow ); ! QToolTip::add( this, "" ); ! kgArchivesLayout = new QGridLayout( parent ); ! kgArchivesLayout->setSpacing( 6 ); ! kgArchivesLayout->setMargin( 11 ); ! ! GroupBox13 = new QGroupBox( parent, "GroupBox13" ); ! GroupBox13->setFrameShape( QGroupBox::Box ); ! GroupBox13->setFrameShadow( QGroupBox::Sunken ); ! GroupBox13->setTitle( i18n( "General" ) ); ! GroupBox13->setColumnLayout(0, Qt::Vertical ); ! GroupBox13->layout()->setSpacing( 0 ); ! GroupBox13->layout()->setMargin( 0 ); ! GroupBox13Layout = new QGridLayout( GroupBox13->layout() ); ! GroupBox13Layout->setAlignment( Qt::AlignTop ); ! GroupBox13Layout->setSpacing( 6 ); ! GroupBox13Layout->setMargin( 11 ); ! ! kgBZip2 = new QCheckBox( GroupBox13, "kgBZip2" ); ! kgBZip2->setText( i18n( "BZip2" ) ); ! ! GroupBox13Layout->addWidget( kgBZip2, 1, 6 ); ! ! kgGZip = new QCheckBox( GroupBox13, "kgGZip" ); ! kgGZip->setText( i18n( "GZip" ) ); ! ! GroupBox13Layout->addWidget( kgGZip, 1, 3 ); ! ! kgRpm = new QCheckBox( GroupBox13, "kgRpm" ); ! kgRpm->setText( i18n( "Rpm" ) ); ! ! GroupBox13Layout->addWidget( kgRpm, 3, 0 ); ! ! kgZip = new QCheckBox( GroupBox13, "kgZip" ); ! kgZip->setText( i18n( "Zip" ) ); ! ! GroupBox13Layout->addWidget( kgZip, 2, 0 ); ! QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); ! GroupBox13Layout->addMultiCell( spacer, 2, 2, 4, 5 ); ! ! kgTar = new QCheckBox( GroupBox13, "kgTar" ); ! kgTar->setText( i18n( "Tar" ) ); ! GroupBox13Layout->addWidget( kgTar, 1, 0 ); ! QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); ! GroupBox13Layout->addMultiCell( spacer_2, 1, 1, 4, 5 ); ! kgArj = new QCheckBox( GroupBox13, "kgArj" ); ! kgArj->setText( i18n( "Arj" ) ); ! GroupBox13Layout->addWidget( kgArj, 2, 6 ); ! QSpacerItem* spacer_3 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); ! GroupBox13Layout->addMultiCell( spacer_3, 1, 1, 1, 2 ); ! QSpacerItem* spacer_4 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); ! GroupBox13Layout->addMultiCell( spacer_4, 5, 5, 0, 1 ); ! kgAutoConfigure = new QPushButton( GroupBox13, "kgAutoConfigure" ); ! kgAutoConfigure->setText( i18n( "Auto Configure" ) ); ! GroupBox13Layout->addMultiCellWidget( kgAutoConfigure, 5, 5, 2, 4 ); ! QSpacerItem* spacer_5 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); ! GroupBox13Layout->addMultiCell( spacer_5, 5, 5, 5, 6 ); ! TextLabel1_2 = new QLabel( GroupBox13, "TextLabel1_2" ); ! TextLabel1_2->setText( i18n( "Krusader transparently handles the following types of archives:" ) ); ! GroupBox13Layout->addMultiCellWidget( TextLabel1_2, 0, 0, 0, 6 ); ! kgRar = new QCheckBox( GroupBox13, "kgRar" ); ! kgRar->setText( i18n( "Rar" ) ); ! GroupBox13Layout->addWidget( kgRar, 2, 3 ); ! kgAce = new QCheckBox( GroupBox13, "kgAce" ); ! kgAce->setText( i18n( "Ace" ) ); ! GroupBox13Layout->addWidget( kgAce, 3, 3 ); ! TextLabel1 = new QLabel( GroupBox13, "TextLabel1" ); ! TextLabel1->setText( i18n( "The archives that are \"greyed-out\" were unavaible on your\nsystem last time Krusader checked. If you wish Krusader to\nsearch again, click the 'Auto Configure' button." ) ); ! GroupBox13Layout->addMultiCellWidget( TextLabel1, 4, 4, 0, 6 ); ! QSpacerItem* spacer_6 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); ! GroupBox13Layout->addMultiCell( spacer_6, 2, 2, 1, 2 ); ! QSpacerItem* spacer_7 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); ! GroupBox13Layout->addMultiCell( spacer_7, 3, 3, 1, 2 ); ! kgArchivesLayout->addWidget( GroupBox13, 0, 0 ); ! GroupBox2 = new QGroupBox( parent, "GroupBox2" ); ! GroupBox2->setTitle( i18n( "Fine-Tuning" ) ); ! QWidget* privateLayoutWidget = new QWidget( GroupBox2, "Layout4" ); ! privateLayoutWidget->setGeometry( QRect( 10, 20, 430, 60 ) ); ! Layout4 = new QVBoxLayout( privateLayoutWidget ); ! Layout4->setSpacing( 6 ); ! Layout4->setMargin( 0 ); ! kgMoveIntoArchives = new QCheckBox( privateLayoutWidget, "kgMoveIntoArchives" ); ! kgMoveIntoArchives->setText( i18n( "Allow moving into archives" ) ); ! QToolTip::add( kgMoveIntoArchives, i18n( "This action can be tricky, since system failure during the process\nmight result in misplaced files. If this happens,\nthe files are stored in a temp directory inside /tmp." ) ); ! Layout4->addWidget( kgMoveIntoArchives ); ! kgTestArchives = new QCheckBox( privateLayoutWidget, "kgTestArchives" ); ! kgTestArchives->setText( i18n( "Test archive when finished packing " ) ); ! QToolTip::add( kgTestArchives, i18n( "If checked, Krusader will test the archive's intergrity after packing it." ) ); ! Layout4->addWidget( kgTestArchives ); ! kgArchivesLayout->addWidget( GroupBox2, 1, 0 ); ! // signals and slots connections ! connect( kgAutoConfigure, SIGNAL( clicked() ), this, SLOT( slotAutoConfigure() ) ); } ! /* ! * Destroys the object and frees any allocated resources ! */ ! kgArchives::~kgArchives() { ! // no need to delete child widgets, Qt does it all for us ! } ! void kgArchives::slotApplyChanges() ! { ! qWarning( "kgArchives::slotApplyChanges(): Not implemented yet!" ); } ! void kgArchives::slotAutoConfigure() { ! qWarning( "kgArchives::slotAutoConfigure(): Not implemented yet!" ); } ! void kgArchives::slotDefaultSettings() { ! qWarning( "kgArchives::slotDefaultSettings(): Not implemented yet!" ); } #include "kgarchives.moc" --- 1,168 ---- /*************************************************************************** ! kgarchives.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 "kgarchives.h" ! #include "../defaults.h" ! #include "../VFS/krarchandler.h" ! #include "../krusader.h" ! #include <klocale.h> ! #include <qpushbutton.h> ! #include <qhbox.h> ! #include <qstringlist.h> ! #include <kmessagebox.h> ! KgArchives::KgArchives( bool first, QWidget* parent, const char* name ) : ! KonfiguratorPage( first, parent, name ) ! { ! if( first ) ! slotAutoConfigure(); ! ! QGridLayout *kgArchivesLayout = new QGridLayout( parent ); ! kgArchivesLayout->setSpacing( 6 ); ! kgArchivesLayout->setMargin( 11 ); ! // -------------------------- GENERAL GROUPBOX ---------------------------------- ! QGroupBox *generalGrp = createFrame( i18n( "General" ), parent, "generalGrp" ); ! QGridLayout *generalGrid = createGridLayout( generalGrp->layout() ); ! addLabel( generalGrid, 0, 0, i18n( "Krusader transparently handles the following types of archives:" ), ! generalGrp, "KgLabel1" ); ! KONFIGURATOR_CHECKBOX_PARAM packers[] = ! // cfg_class cfg_name default text restart tooltip ! {{"Archives","Do Tar", _DoTar, i18n( "Tar" ), false, ""}, ! {"Archives","Do GZip", _DoGZip, i18n( "GZip" ), false, ""}, ! {"Archives","Do BZip2", _DoBZip2, i18n( "BZip2" ), false, ""}, ! {"Archives","Do UnZip", _DoUnZip, i18n( "Zip" ), false, ""}, ! {"Archives","Do UnRar", _DoUnRar, i18n( "Rar" ), false, ""}, ! {"Archives","Do Unarj", _DoArj, i18n( "Arj" ), false, ""}, ! {"Archives","Do RPM", _DoRPM, i18n( "Rpm" ), false, ""}, ! {"Archives","Do UnAce", _DoUnAce, i18n( "Ace" ), false, ""}}; ! QWidget *cbs = createCheckBoxGroup( 3, 0, packers, 8, packerCbs, generalGrp ); ! generalGrid->addWidget( cbs, 1, 0 ); ! ! addLabel( generalGrid, 2, 0, i18n( "The archives that are \"greyed-out\" were unavaible on your\nsystem last time Krusader checked. If you wish Krusader to\nsearch again, click the 'Auto Configure' button." ), ! generalGrp, "KgLabel2" ); ! QHBox *hbox = new QHBox( generalGrp ); ! createSpacer( hbox, "spacer1" ); ! QPushButton *btnAutoConfigure = new QPushButton( i18n( "Auto Configure" ), hbox, "kgAutoConfigure" ); ! createSpacer( hbox, "spacer2" ); ! generalGrid->addWidget( hbox, 3, 0 ); ! connect( btnAutoConfigure, SIGNAL( clicked() ), this, SLOT( slotAutoConfigure() ) ); ! kgArchivesLayout->addWidget( generalGrp, 0 ,0 ); ! // ------------------------ FINE-TUNING GROUPBOX -------------------------------- ! QGroupBox *fineTuneGrp = createFrame( i18n( "Fine-Tuning" ), parent, "fineTuneGrp" ); ! QGridLayout *fineTuneGrid = createGridLayout( fineTuneGrp->layout() ); ! KONFIGURATOR_CHECKBOX_PARAM finetuners[] = ! // cfg_class cfg_name default text restart ToolTip ! {{"Archives","Allow Move Into Archive", _MoveIntoArchive, i18n( "Allow moving into archives" ), false, i18n( "This action can be tricky, since system failure during the process\nmight result in misplaced files. If this happens,\nthe files are stored in a temp directory inside /tmp." )}, ! {"Archives","Test Archives", _TestArchives, i18n( "Test archive when finished packing" ), false, i18n( "If checked, Krusader will test the archive's intergrity after packing it." )}}; ! QWidget *finetunes = createCheckBoxGroup( 1, 0, finetuners, 2, tunerCbs, fineTuneGrp ); ! ! disableNonExistingPackers(); ! fineTuneGrid->addWidget( finetunes, 1, 0 ); ! ! kgArchivesLayout->addWidget( fineTuneGrp, 1 ,0 ); ! } ! void KgArchives::slotAutoConfigure() ! { ! #define PS(x) lst.contains(x)>0 ! ! QString info; ! QStringList lst=KRarcHandler::supportedPackers(); // get list of availble packers ! info+=i18n("Search results:\n\n"); ! if (PS("tar")) info+=i18n("tar: found, packing and unpacking enabled.\n"); ! else info+=i18n("tar: NOT found, packing and unpacking DISABLED.\n==> tar can be obtained at www.gnu.org\n"); ! if (PS("gzip")) info+=i18n("gzip: found, packing and unpacking enabled.\n"); ! else info+=i18n("gzip: NOT found, packing and unpacking DISABLED.\n==> gzip can be obtained at www.gnu.org\n"); ! if (PS("bzip2")) info+=i18n("bzip2: found, packing and unpacking enabled.\n"); ! else info+=i18n("bzip2: NOT found, packing and unpacking DISABLED.\n==> bzip2 can be obtained at www.gnu.org\n"); ! if (PS("unzip")) info+=i18n("unzip: found, unpacking enabled.\n"); ! else info+=i18n("unzip: NOT found, unpacking DISABLED.\n==> unzip can be obtained at www.info-zip.org\n"); ! if (PS("zip")) info+=i18n("zip: found, packing enabled.\n"); ! else info+=i18n("zip: NOT found, packing DISABLED.\n==> zip can be obtained at www.info-zip.org\n"); ! if (PS("rpm") && PS("cpio")) info+=i18n("rpm: found, unpacking enabled.\n"); ! else if (PS("rpm") && !PS("cpio")) info+=i18n("rpm found but cpio NOT found: unpacking DISABLED.\n==>cpio can be obtained at www.gnu.org\n"); ! else info+=i18n("rpm: NOT found, unpacking is DISABLED.\n==> rpm can be obtained at www.gnu.org\n"); ! if (PS("unrar")) info+=i18n("unrar: found, unpacking is enabled.\n"); ! else info+=i18n("unrar: NOT found, unpacking is DISABLED.\n==> unrar can be obtained at www.rarsoft.com\n"); ! if (PS("rar")) info+=i18n("rar: found, packing is enabled.\n"); ! else info+=i18n("rar: NOT found, packing is DISABLED.\n==> rar can be obtained at www.rarsoft.com\n"); ! if (PS("unarj")) info+=i18n("unarj: found, unpacking is enabled.\n"); ! else info+=i18n("unarj: NOT found, unpacking is DISABLED.\n==> unarj can be obtained at www.arjsoft.com\n"); ! if (PS("unace")) info+=i18n("unace: found, unpacking is enabled.\n"); ! else info+=i18n("unace: NOT found, unpacking is DISABLED.\n==> unace can be obtained at www.winace.com\n"); ! info+=i18n("\nIf you install new packers, please install them"); ! info+=i18n("\nto your path. (ie: /usr/bin, /usr/local/bin etc.)"); ! info+=i18n("\nThanks for flying Krusader :-)"); ! KMessageBox::information(0,info,i18n("Results")); ! disableNonExistingPackers(); } ! void KgArchives::disableNonExistingPackers() { ! #define PS(x) lst.contains(x)>0 ! QStringList lst=KRarcHandler::supportedPackers(); // get list of availble packers ! packerCbs.at( PK_Tar )->setEnabled(PS("tar")); ! packerCbs.at( PK_GZip )->setEnabled(PS("gzip")); ! packerCbs.at( PK_BZip2 )->setEnabled(PS("bzip2")); ! packerCbs.at( PK_UnZip )->setEnabled(PS("unzip")); ! packerCbs.at( PK_RPM )->setEnabled(PS("rpm") || PS("cpio")); ! packerCbs.at( PK_UnRar )->setEnabled(PS("unrar")); ! packerCbs.at( PK_UnAce )->setEnabled(PS("unace")); ! packerCbs.at( PK_UnArj )->setEnabled(PS("unarj")); } ! bool KgArchives::apply() { ! krConfig->writeEntry("Supported Packers",KRarcHandler::supportedPackers()); ! return KonfiguratorPage::apply(); } ! void KgArchives::setDefaults() { ! krConfig->writeEntry("Supported Packers",KRarcHandler::supportedPackers()); ! return KonfiguratorPage::setDefaults(); } #include "kgarchives.moc" + Index: kgarchives.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Konfigurator/kgarchives.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** kgarchives.h 15 Apr 2002 18:49:05 -0000 1.1.1.1 --- kgarchives.h 31 Jan 2004 11:22:25 -0000 1.2 *************** *** 1,57 **** ! /**************************************************************************** ! ** Form interface generated from reading ui file 'kgarchives.ui' ! ** ! ** Created: Tue Apr 17 20:21:41 2001 ! ** by: The User Interface Compiler (uic) ! ** ! ** WARNING! All changes made in this file will be lost! ! ****************************************************************************/ ! #ifndef KGARCHIVES_H ! #define KGARCHIVES_H ! #include <qvariant.h> ! #include <qframe.h> ! class QVBoxLayout; ! class QHBoxLayout; ! class QGridLayout; ! class QCheckBox; ! class QGroupBox; ! class QLabel; ! class QPushButton; ! class kgArchives : public QFrame ! { ! Q_OBJECT ! public: ! kgArchives( QWidget* parent = 0, const char* name = 0 ); ! ~kgArchives(); ! QGroupBox* GroupBox13; ! QCheckBox* kgBZip2; ! QCheckBox* kgGZip; ! QCheckBox* kgRpm; ! QCheckBox* kgZip; ! QCheckBox* kgTar; ! QCheckBox* kgArj; ! QPushButton* kgAutoConfigure; ! QLabel* TextLabel1_2; ! QCheckBox* kgRar; ! QCheckBox* kgAce; ! QLabel* TextLabel1; ! QGroupBox* GroupBox2; ! QCheckBox* kgMoveIntoArchives; ! QCheckBox* kgTestArchives; ! public slots: ! virtual void slotApplyChanges(); ! virtual void slotAutoConfigure(); ! virtual void slotDefaultSettings(); protected: ! QGridLayout* kgArchivesLayout; ! QGridLayout* GroupBox13Layout; ! QVBoxLayout* Layout4; }; ! #endif // KGARCHIVES_H --- 1,67 ---- ! /*************************************************************************** ! kgarchives.h - 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 ! 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 __KGARCHIVES_H__ ! #define __KGARCHIVES_H__ + #include "konfiguratorpage.h" + + class KgArchives : public KonfiguratorPage + { + Q_OBJECT + + public: + KgArchives( bool first, QWidget* parent=0, const char* name=0 ); + virtual bool apply(); + virtual void setDefaults(); + + public slots: + void slotAutoConfigure(); + protected: ! QPtrList<KonfiguratorCheckBox> packerCbs; ! QPtrList<KonfiguratorCheckBox> tunerCbs; ! ! void disableNonExistingPackers(); }; ! typedef enum ! { ! PK_Tar = 0, ! PK_GZip = 1, ! PK_BZip2 = 2, ! PK_UnZip = 3, ! PK_UnRar = 4, ! PK_UnArj = 5, ! PK_RPM = 6, ! PK_UnAce = 7 ! } PACKERS; ! ! #endif /* __KGARCHIVES_H__ */ Index: kggeneral.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Konfigurator/kggeneral.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** kggeneral.cpp 21 Apr 2002 17:46:32 -0000 1.2 --- kggeneral.cpp 31 Jan 2004 11:22:25 -0000 1.3 *************** *** 1,271 **** ! /**************************************************************************** ! ** Form implementation generated from reading ui file 'kggeneral.ui' ! ** ! ** Created: Fri Jun 1 18:20:56 2001 ! ** by: The User Interface Compiler (uic) ! ** ! ** WARNING! All changes made in this file will be lost! ! ****************************************************************************/ ! #include "kggeneral.h" ! ! #include <qbuttongroup.h> ! #include <qcheckbox.h> ! #include <qframe.h> ! #include <qgroupbox.h> ! #include <qlabel.h> ! #include <qlineedit.h> ! #include <qpushbutton.h> ! #include <qradiobutton.h> ! #include <qtoolbutton.h> ! #include <qlayout.h> ! #include <qvariant.h> ! #include <qtooltip.h> ! #include <qwhatsthis.h> ! #include <qimage.h> ! #include <qpixmap.h> ! #include <klocale.h> ! ! static const char* const image0_data[] = { ! "16 16 53 1", ! ". c None", ! "# c #000000", ! "R c #080808", ! "Q c #101010", ! "Y c #181c18", ! "K c #202020", ! "w c #313031", ! "X c #313431", ! "W c #414041", ! "V c #414441", ! "g c #4a3018", ! "E c #4a484a", ! "U c #4a4c4a", ! "l c #524c4a", ! "h c #52504a", ! "j c #525052", ! "i c #5a5952", ! "J c #6a6962", ! "P c #6a6d6a", ! "T c #8b8d8b", ! "D c #949594", ! "S c #9c999c", ! "O c #9c9d9c", ! "C c #a4a19c", ! "M c #a4a1a4", ! "N c #a4a5a4", ! "I c #acaaac", ! "B c #acaeac", ! "F c #b47d41", ! "v c #b4b2b4", ! "u c #b4b6b4", ! "A c #bdbabd", ! "t c #bdbebd", ! "k c #c5854a", ! "H c #c5c2c5", ! "s c #c5c6c5", ! "r c #cdcacd", ! "L c #cdcecd", ! "z c #d5d2d5", ! "q c #d5d6d5", ! "x c #dedade", ! "p c #dedede", ! "a c #e6a562", ! "G c #e6e2e6", ! "o c #e6e6e6", ! "y c #eeeae6", ! "n c #eeeeee", ! "m c #f6f6f6", ! "e c #ffae62", ! "d c #ffc283", ! "c c #ffc683", ! "f c #ffca8b", ! "b c #ffd29c", ! "......####......", ! ".....##.####.#..", ! "....#.....####..", ! "...........###..", ! "..........####..", ! ".####...........", ! "#abca#######....", ! "#bcdeeeeeeee#...", ! "#fdghhhihhjjh###", ! "#dklmmnopqrstuvw", ! "#dgxpyopzsABCDE.", ! "#FhxxGpqrHuICJK.", ! "#gLrqqzLHABMDE..", ! "#jLtssHtuBNOPQ..", ! "RtNIBBINMSDTE...", ! "KEEUUUEEVWWXY..."}; ! ! ! /* ! * Constructs a kgGeneral which is a child of 'parent', with the ! * name 'name'.' ! */ ! kgGeneral::kgGeneral( QWidget* parent, const char* name ) ! : QFrame( parent, name ) ! { ! QPixmap image0( ( const char** ) image0_data ); ! if ( !name ) ! setName( "kgGeneral" ); ! resize( 393, 277 ); ! setCaption( i18n( "General" ) ); ! setFrameShape( QFrame::NoFrame ); ! setFrameShadow( QFrame::MShadow ); ! kgGeneralLayout = new QGridLayout( parent ); ! kgGeneralLayout->setSpacing( 6 ); ! kgGeneralLayout->setMargin( 11 ); ! ! GroupBox2 = new QGroupBox( parent, "GroupBox2" ); ! GroupBox2->setTitle( i18n( "General" ) ); ! GroupBox2->setColumnLayout(0, Qt::Vertical ); ! GroupBox2->layout()->setSpacing( 0 ); ! GroupBox2->layout()->setMargin( 0 ); ! GroupBox2Layout = new QGridLayout( GroupBox2->layout() ); ! GroupBox2Layout->setAlignment( Qt::AlignTop ); ! GroupBox2Layout->setSpacing( 6 ); ! GroupBox2Layout->setMargin( 11 ); ! ! Layout8 = new QGridLayout; ! Layout8->setSpacing( 6 ); ! Layout8->setMargin( 0 ); ! ! kgTerminal = new QLineEdit( GroupBox2, "kgTerminal" ); ! ! Layout8->addWidget( kgTerminal, 2, 1 ); ! ! TextLabel2 = new QLabel( GroupBox2, "TextLabel2" ); ! TextLabel2->setText( i18n( "Terminal:" ) ); ! ! Layout8->addWidget( TextLabel2, 2, 0 ); ! ! QLabel* hint = new QLabel(GroupBox2,"hint"); ! hint->setText(i18n("Hint: use 'internal editor' if you want to use Krusader's fast built-in editor") ); ! Layout8->addMultiCellWidget(hint,1,1,0,2); ! ! kgEditor = new QLineEdit( GroupBox2, "kgEditor" ); ! ! Layout8->addWidget( kgEditor, 0, 1 ); ! ! kgBrowseEditor = new QToolButton( GroupBox2, "kgBrowseEditor" ); ! kgBrowseEditor->setText( "" ); ! kgBrowseEditor->setPixmap( image0 ); ! ! Layout8->addWidget( kgBrowseEditor, 0, 2 ); ! ! TextLabel1_2 = new QLabel( GroupBox2, "TextLabel1_2" ); ! TextLabel1_2->setText( i18n( "Editor:" ) ); ! ! Layout8->addWidget( TextLabel1_2, 0, 0 ); ! ! kgBrowseTerminal = new QToolButton( GroupBox2, "kgBrowseTerminal" ); ! kgBrowseTerminal->setText( "" ); ! kgBrowseTerminal->setPixmap( image0 ); ! ! Layout8->addWidget( kgBrowseTerminal, 2, 2 ); ! ! GroupBox2Layout->addMultiCellLayout( Layout8, 3, 3, 0, 2 ); ! ! Line2_2 = new QFrame( GroupBox2, "Line2_2" ); ! Line2_2->setFrameStyle( QFrame::HLine | QFrame::Sunken ); ! ! GroupBox2Layout->addMultiCellWidget( Line2_2, 4, 4, 0, 2 ); ! ! kgTempDir = new QLineEdit( GroupBox2, "kgTempDir" ); ! ! GroupBox2Layout->addWidget( kgTempDir, 5, 1 ); ! ! kgBrowseTempDir = new QToolButton( GroupBox2, "kgBrowseTempDir" ); ! kgBrowseTempDir->setText( "" ); ! kgBrowseTempDir->setPixmap( image0 ); ! ! GroupBox2Layout->addWidget( kgBrowseTempDir, 5, 2 ); ! TextLabel2_2 = new QLabel( GroupBox2, "TextLabel2_2" ); ! TextLabel2_2->setText( i18n( "Temp Directory:" ) ); ! GroupBox2Layout->addWidget( TextLabel2_2, 5, 0 ); ! TextLabel1 = new QLabel( GroupBox2, "TextLabel1" ); ! TextLabel1->setText( i18n( "Note: you must have full permissions for the temporary directory !" ) ); ! GroupBox2Layout->addMultiCellWidget( TextLabel1, 6, 6, 0, 2 ); ! ButtonGroup1 = new QButtonGroup( GroupBox2, "ButtonGroup1" ); ! ButtonGroup1->setFrameShape( QButtonGroup::NoFrame ); ! ButtonGroup1->setFrameShadow( QButtonGroup::Sunken ); ! ButtonGroup1->setTitle( "" ); ! ButtonGroup1->setExclusive( TRUE ); ! ButtonGroup1->setRadioButtonExclusive( TRUE ); ! ButtonGroup1->setColumnLayout(0, Qt::Vertical ); ! ButtonGroup1->layout()->setSpacing( 0 ); ! ButtonGroup1->layout()->setMargin( 0 ); ! ButtonGroup1Layout = new QGridLayout( ButtonGroup1->layout() ); ! ButtonGroup1Layout->setAlignment( Qt::AlignTop ); ! ButtonGroup1Layout->setSpacing( 6 ); ! ButtonGroup1Layout->setMargin( 11 ); ! kgMoveToTrash = new QRadioButton( ButtonGroup1, "kgMoveToTrash" ); ! kgMoveToTrash->setText( i18n( "Move to trash" ) ); ! ButtonGroup1Layout->addWidget( kgMoveToTrash, 0, 1 ); ! kgDeleteFiles = new QRadioButton( ButtonGroup1, "kgDeleteFiles" ); ! kgDeleteFiles->setText( i18n( "Delete files" ) ); ! ButtonGroup1Layout->addWidget( kgDeleteFiles, 0, 0 ); ! GroupBox2Layout->addMultiCellWidget( ButtonGroup1, 0, 0, 0, 2 ); ! Line2 = new QFrame( GroupBox2, "Line2" ); ! Line2->setFrameStyle( QFrame::HLine | QFrame::Sunken ); ! GroupBox2Layout->addMultiCellWidget( Line2, 2, 2, 0, 2 ); ! kgMimetypeMagic = new QCheckBox( GroupBox2, "kgMimetypeMagic" ); ! kgMimetypeMagic->setText( i18n( "Use mimetype magic" ) ); ! QToolTip::add( kgMimetypeMagic, i18n( "Mimetype magic allows better distinction of file types, but is slower" ) ); ! GroupBox2Layout->addMultiCellWidget( kgMimetypeMagic, 1, 1, 0, 2 ); ! kgGeneralLayout->addWidget( GroupBox2, 0, 0 ); ! // signals and slots connections ! connect( kgBrowseEditor, SIGNAL( clicked() ), this, SLOT( slotBrowseEditor() ) ); ! connect( kgBrowseTerminal, SIGNAL( clicked() ), this, SLOT( slotBrowseTerminal() ) ); ! connect( kgBrowseTempDir, SIGNAL( clicked() ), this, SLOT( slotBrowseTempDir() ) ); } ! /* ! * Destroys the object and frees any allocated resources ! */ ! kgGeneral::~kgGeneral() { ! // no need to delete child widgets, Qt does it all for us } ! void kgGeneral::slotBrowseTempDir() { ! qWarning( "kgGeneral::slotBrowseTempDir(): Not implemented yet!" ); ! } ! void kgGeneral::slotApplyChanges() ! { ! qWarning( "kgGeneral::slotApplyChanges(): Not implemented yet!" ); ! } ! void kgGeneral::slotBrowseEditor() ! { ! qWarning( "kgGeneral::slotBrowseEditor(): Not implemented yet!" ); ! } ! void kgGeneral::slotBrowseTerminal() ! { ! qWarning( "kgGeneral::slotBrowseTerminal(): Not implemented yet!" ); ! } ! void kgGeneral::slotDefaultSettings() ! { ! qWarning( "kgGeneral::slotDefaultSettings(): Not implemented yet!" ); } --- 1,134 ---- ! /*************************************************************************** ! kggeneral.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 "kggeneral.h" ! #include "../defaults.h" ! #include "../krusader.h" ! #include <klocale.h> ! #include <qlabel.h> ! #include <qhbox.h> ! #include <kmessagebox.h> ! KgGeneral::KgGeneral( bool first, QWidget* parent, const char* name ) : ! KonfiguratorPage( first, parent, name ) ! { ! if( first ) ! slotFindTools(); ! QGridLayout *kgGeneralLayout = new QGridLayout( parent ); ! kgGeneralLayout->setSpacing( 6 ); ! kgGeneralLayout->setMargin( 11 ); ! // -------------------------- GENERAL GROUPBOX ---------------------------------- ! QGroupBox *generalGrp = createFrame( i18n( "General" ), parent, "kgGenGeneralGrp" ); ! QGridLayout *generalGrid = createGridLayout( generalGrp->layout() ); ! KONFIGURATOR_NAME_VALUE_PAIR deleteMode[] = ! {{ i18n( "Delete files" ), "false" }, ! { i18n( "Move to trash" ), "true" }}; ! ! KonfiguratorRadioButtons *trashRadio = createRadioButtonGroup( "General", "Move To Trash", ! "true", 2, 0, deleteMode, 2, generalGrp, "myRadio", false ); ! generalGrid->addMultiCellWidget( trashRadio->getGroupWidget(), 0, 0, 0, 1 ); ! KonfiguratorCheckBox *checkBox = createCheckBox( "General", "Mimetype Magic", _MimetypeMagic, ! i18n( "Use mimetype magic" ), generalGrp, false, ! i18n( "Mimetype magic allows better distinction of file types, but is slower" ) ); ! generalGrid->addMultiCellWidget( checkBox, 1, 1, 0, 1 ); ! QFrame *line1 = createLine( generalGrp, "line1" ); ! generalGrid->addMultiCellWidget( line1, 2, 2, 0, 1 ); ! QLabel *label1 = new QLabel( i18n( "Editor:" ), generalGrp, "EditorLabel" ); ! generalGrid->addWidget( label1, 3, 0 ); ! KonfiguratorURLRequester *urlReq = createURLRequester( "General", "Editor", "internal editor", ! generalGrp, false ); ! generalGrid->addWidget( urlReq, 3, 1 ); ! QLabel *label2 = new QLabel( i18n( "Hint: use 'internal editor' if you want to use Krusader's fast built-in editor" ), generalGrp, "EditorLabel" ); ! generalGrid->addMultiCellWidget( label2, 4, 4, 0, 1 ); ! ! QLabel *label3 = new QLabel( i18n( "Terminal:" ), generalGrp, "TerminalLabel" ); ! generalGrid->addWidget( label3, 5, 0 ); ! KonfiguratorURLRequester *urlReq2 = createURLRequester( "General", "Terminal", "konsole", ! generalGrp, false ); ! generalGrid->addWidget( urlReq2, 5, 1 ); ! QFrame *line2 = createLine( generalGrp, "line2" ); ! generalGrid->addMultiCellWidget( line2, 6, 6, 0, 1 ); ! QHBox *hbox = new QHBox( generalGrp, "hbox" ); ! new QLabel( i18n( "Temp Directory:" ), hbox, "TempDirectory" ); ! KonfiguratorURLRequester *urlReq3 = createURLRequester( "General", "Temp Directory", "/tmp/krusader.tmp", ! hbox, false ); ! urlReq3->setMode( KFile::Directory ); ! connect( urlReq3->extension(), SIGNAL( applyManually(QObject *,QString, QString) ), ! this, SLOT( applyTempDir(QObject *,QString, QString) ) ); ! generalGrid->addMultiCellWidget( hbox, 7, 7, 0, 1 ); ! ! QLabel *label4 = new QLabel( i18n( "Note: you must have full permissions for the temporary directory !" ), ! generalGrp, "NoteLabel" ); ! generalGrid->addMultiCellWidget( label4, 8, 8, 0, 1 ); ! ! kgGeneralLayout->addWidget( generalGrp, 0 ,0 ); } ! void KgGeneral::applyTempDir(QObject *obj,QString cls, QString name) { ! KonfiguratorURLRequester *urlReq = (KonfiguratorURLRequester *)obj; ! QString value = QDir(urlReq->url()).path(); ! ! krConfig->setGroup( cls ); ! krConfig->writeEntry( name, value ); } ! void KgGeneral::slotFindTools() { ! #define PS(x) lst.contains(x)>0 ! QString info; ! QStringList lst=Krusader::supportedTools(); // get list of availble tools ! info+=i18n("Searching for tools...\nSearch results:\n\n"); ! if (PS("DIFF")) info+=i18n("diff: found ")+lst[lst.findIndex("DIFF") + 1]+i18n(", compare by content availble.\n"); ! else info+=i18n("diff: no diff frontends found. Compare by content disabled.\nhint: Krusader supports kdiff and xxdiff\n\n"); ! if (PS("MAIL")) info+=i18n("mail: found ")+lst[lst.findIndex("MAIL") + 1]+i18n(", sending files by email enabled.\n"); ! else info+=i18n("mail: no compatible mail-programs found. Sending files by email is disabled.\nhint: Krusader supports kmail\n\n"); ! if (PS("RENAME")) info+=i18n("rename: found ")+lst[lst.findIndex("RENAME") + 1]+i18n(", multipule rename enabled.\n"); ! else info+=i18n("rename: no compatible renamer-programs found. multipule rename is disabled.\nhint: Krusader supports krename\n\n"); ! ! info+=i18n("\nIf you install new tools, please install them"); ! info+=i18n("\nto your path. (ie: /usr/bin, /usr/local/bin etc.)"); ! KMessageBox::information(0,info,i18n("Results")); } Index: kggeneral.h =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Konfigurator/kggeneral.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** kggeneral.h 15 Apr 2002 18:49:09 -0000 1.1.1.1 --- kggeneral.h 31 Jan 2004 11:22:25 -0000 1.2 *************** *** 1,65 **** ! /**************************************************************************** ! ** Form interface generated from reading ui file 'kggeneral.ui' ! ** ! ** Created: Fri Jun 1 18:20:39 2001 ! ** by: The User Interface Compiler (uic) ! ** ! ** WARNING! All changes made in this file will be lost! ! ****************************************************************************/ ! #ifndef KGGENERAL_H ! #define KGGENERAL_H ! #include <qvariant.h> ! #include <qframe.h> ! class QVBoxLayout; ! class QHBoxLayout; ! class QGridLayout; ! class QButtonGroup; ! class QCheckBox; ! class QGroupBox; ! class QLabel; ! class QLineEdit; ! class QRadioButton; ! class QToolButton; ! class kgGeneral : public QFrame ! { ! Q_OBJECT ! public: ! kgGeneral( QWidget* parent = 0, const char* name = 0 ); ! ~kgGeneral(); ! QGroupBox* GroupBox2; ! QLineEdit* kgTerminal; ! QLabel* TextLabel2; ! QLineEdit* kgEditor; ! QToolButton* kgBrowseEditor; ! QLabel* TextLabel1_2; ! QToolButton* kgBrowseTerminal; ! QFrame* Line2_2; ! QLineEdit* kgTempDir; ! QToolButton* kgBrowseTempDir; ! QLabel* TextLabel2_2; ! QLabel* TextLabel1; ! QButtonGroup* ButtonGroup1; ! QRadioButton* kgMoveToTrash; ! QRadioButton* kgDeleteFiles; ! QFrame* Line2; ! QCheckBox* kgMimetypeMagic; ! public slots: ! virtual void slotBrowseTempDir(); ! virtual void slotApplyChanges(); ! virtual void slotBrowseEditor(); ! virtual void slotBrowseTerminal(); ! virtual void slotDefaultSettings(); ! protected: ! QGridLayout* kgGeneralLayout; ! QGridLayout* GroupBox2Layout; ! QGridLayout* Layout8; ! QGridLayout* ButtonGroup1Layout; }; ! #endif // KGGENERAL_H --- 1,48 ---- ! /*************************************************************************** ! kgadvanced.h - 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 ! 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 __KGGENERAL_H__ ! #define __KGGENERAL_H__ ! ! #include "konfiguratorpage.h" ! class KgGeneral : public KonfiguratorPage ! { ! Q_OBJECT ! ! public: ! KgGeneral( bool first, QWidget* parent=0, const char* name=0 ); ! ! public slots: ! void applyTempDir(QObject *,QString, QString); ! void slotFindTools(); }; ! #endif /* __KGGENERAL_H__ */ Index: kglookfeel.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Konfigurator/kglookfeel.cpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** kglookfeel.cpp 15 Apr 2002 18:49:14 -0000 1.1.1.1 --- kglookfeel.cpp 31 Jan 2004 11:22:25 -0000 1.2 *************** *** 1,307 **** ! /**************************************************************************** ! ** Form implementation generated from reading ui file 'kglookfeel.ui' ! ** ! ** Created: Wed Jun 6 14:58:16 2001 ! ** by: The User Interface Compiler (uic) ! ** ! ** WARNING! All changes made in this file will be lost! ! ****************************************************************************/ ! #include "kglookfeel.h" ! ! #include <qbuttongroup.h> ! #include <qcheckbox.h> ! #include <qcombobox.h> ! #include <qframe.h> ! #include <qgroupbox.h> ! #include <qlabel.h> ! #include <qpushbutton.h> ! #include <qradiobutton.h> ! #include <qspinbox.h> ! #include <qtabwidget.h> ! #include <qtoolbutton.h> ! #include <qwidget.h> ! #include <qlayout.h> ! #include <qvariant.h> ! #include <qtooltip.h> ! #include <qwhatsthis.h> ! #include <qimage.h> ! #include <qpixmap.h> ! #include <klocale.h> ! ! static const char* const image0_data[] = { ! "16 16 53 1", ! ". c None", ! "# c #000000", ! "R c #080808", ! "Q c #101010", ! "Y c #181c18", ! "K c #202020", ! "w c #313031", ! "X c #313431", ! "W c #414041", ! "V c #414441", ! "g c #4a3018", ! "E c #4a484a", ! "U c #4a4c4a", ! "l c #524c4a", ! "h c #52504a", ! "j c #525052", ! "i c #5a5952", ! "J c #6a6962", ! "P c #6a6d6a", ! "T c #8b8d8b", ! "D c #949594", ! "S c #9c999c", ! "O c #9c9d9c", ! "C c #a4a19c", ! "M c #a4a1a4", ! "N c #a4a5a4", ! "I c #acaaac", ! "B c #acaeac", ! "F c #b47d41", ! "v c #b4b2b4", ! "u c #b4b6b4", ! "A c #bdbabd", ! "t c #bdbebd", ! "k c #c5854a", ! "H c #c5c2c5", ! "s c #c5c6c5", ! "r c #cdcacd", ! "L c #cdcecd", ! "z c #d5d2d5", ! "q c #d5d6d5", ! "x c #dedade", ! "p c #dedede", ! "a c #e6a562", ! "G c #e6e2e6", ! "o c #e6e6e6", ! "y c #eeeae6", ! "n c #eeeeee", ! "m c #f6f6f6", ! "e c #ffae62", ! "d c #ffc283", ! "c c #ffc683", ! "f c #ffca8b", ! "b c #ffd29c", ! "......####......", ! ".....##.####.#..", ! "....#.....####..", ! "...........###..", ! "..........####..", ! ".####...........", ! "#abca#######....", ! "#bcdeeeeeeee#...", ! "#fdghhhihhjjh###", ! "#dklmmnopqrstuvw", ! "#dgxpyopzsABCDE.", ! "#FhxxGpqrHuICJK.", ! "#gLrqqzLHABMDE..", ! "#jLtssHtuBNOPQ..", ! "RtNIBBINMSDTE...", ! "KEEUUUEEVWWXY..."}; ! ! ! /* ! * Constructs a kgLookFeel which is a child of 'parent', with the ! * name 'name'.' ! */ ! kgLookFeel::kgLookFeel( QWidget* parent, const char* name ) ! : QFrame( parent, name ) ! { ! QPixmap image0( ( const char** ) image0_data ); ! if ( !name ) ! setName( "kgLookFeel" ); ! resize( 404, 414 ); ! setCaption( i18n( "Look & Feel" ) ); ! setFrameShape( QFrame::NoFrame ); ! setFrameShadow( QFrame::MShadow ); ! kgLookFeelLayout... [truncated message content] |
From: <er...@pr...> - 2004-01-31 05:28:19
|
Update of /cvsroot/krusader/krusader_kde3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21048 Modified Files: ChangeLog Log Message: Index: ChangeLog =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/ChangeLog,v retrieving revision 1.167 retrieving revision 1.168 diff -C2 -d -r1.167 -r1.168 *** ChangeLog 27 Jan 2004 23:43:07 -0000 1.167 --- ChangeLog 28 Jan 2004 22:46:23 -0000 1.168 *************** *** 1,2 **** --- 1,3 ---- + ADDED: calculate occupied space prints the directory's size (wincmd-style) - thanks heiner! ADDED: current directory in history menu is checked ADDED: a working user menu (try alt+~), but a bit rough on the edges |
From: <er...@pr...> - 2004-01-31 04:51:23
|
Update of /cvsroot/krusader/krusader_kde3/krusader/Search In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27037/krusader/Search Modified Files: krsearchmod.cpp Log Message: fix: increase speed of search (emit less processEvents) Index: krsearchmod.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Search/krsearchmod.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** krsearchmod.cpp 26 Dec 2003 00:00:56 -0000 1.9 --- krsearchmod.cpp 28 Jan 2004 23:12:12 -0000 1.10 *************** *** 1,31 **** /*************************************************************************** ! krsearchmod.cpp ! ------------------- ! copyright : (C) 2001 by Shie Erlich & Rafi Yanai ! email : 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 "krsearchmod.h" --- 1,31 ---- /*************************************************************************** ! krsearchmod.cpp ! ------------------- ! copyright : (C) 2001 by Shie Erlich & Rafi Yanai ! email : 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 "krsearchmod.h" *************** *** 51,287 **** #include <kmimetype.h> ! KRSearchMod::KRSearchMod(const KRQuery* q) { ! stopSearch = false; /// ===> added ! query = new KRQuery(*q); ! query->normalize(); ! } ! KRSearchMod::~KRSearchMod(){ ! delete query; ! } ! void KRSearchMod::start() { ! // search every dir that needs to be searched ! for(unsigned int i=0; i<query->whereToSearch.count(); ++i) ! scanDir( *(query->whereToSearch.at(i)) ); emit finished(); ! } ! void KRSearchMod::stop() { stopSearch = true; ! } ! bool KRSearchMod::checkPerm(QString perm){ ! QString q_perm=query->perm; ! for( int i=0; i<9; ++i ) ! if( q_perm[i] != '?' && q_perm[i] != perm[i+1]) return false; ! return true; ! } ! bool KRSearchMod::checkType(QString mime){ ! QString type = query->type; ! if( type == mime ) return true; ! if( type == i18n("Archives") ) ! return KRarcHandler::arcSupported(mime.right(4)); ! if( type == i18n("Directories") ) return mime.contains("directory"); ! if( type == i18n("Image Files") ) return mime.contains("image/"); ! if( type == i18n("Text Files") ) return mime.contains("text/"); ! if( type == i18n("Video Files") ) return mime.contains("video/"); ! if( type == i18n("Audio Files") ) return mime.contains("audio/"); ! if( type == i18n("Custom") ) return query->customType.contains(mime); ! return false; ! } ! bool KRSearchMod::fileMatch(const QString name){ ! unsigned int len; ! for(unsigned int i=0; i<query->matches.count(); ++i){ ! QRegExp(*query->matches.at(i),query->matchesCaseSensitive,true).match(name,0,(int*)&len); ! if( len==name.length()) return true; ! } return false; ! } ! void KRSearchMod::scanDir( QString dir){ ! if( stopSearch ) return; ! if( dir.right(1)!="/" && !dir.isEmpty() ) dir=dir+"/"; ! if( query->whereNotToSearch.contains(dir) ) return; ! if( scanedDirs.contains(dir) ) return ; // don't scan dirs twice ! scanedDirs.append( dir ); ! // let the gui know where we are ! emit searching(dir); ! qApp->processEvents(); ! ! DIR* d = opendir(dir.local8Bit()); ! if(!d) return; ! struct dirent* dirEnt; QString name; ! unsigned long size; time_t mtime; KURL url; ! ! while( (dirEnt=readdir(d)) != NULL ){ QString mime = QString::null; name = dirEnt->d_name; ! // we dont scan the ".",".." enteries ! if (name=="." || name == "..") continue; ! ! url.setPath(dir+name); ! KDE_struct_stat stat_p; ! KDE_lstat(dir.local8Bit()+name.local8Bit(),&stat_p); ! if( query->recurse ){ ! if( S_ISLNK(stat_p.st_mode) && query->followLinks ){ ! scanDir( QDir(dir+"/"+name).canonicalPath() ); ! } ! else if( S_ISDIR(stat_p.st_mode) ) scanDir(dir+name); ! } ! if( query->inArchive ){ ! mime = KMimeType::findByURL(url,stat_p.st_mode,true,false)->name(); ! QString type = mime.right(4); ! if( mime.contains("-rar") ) type="-rar"; ! ! if( KRarcHandler::arcSupported(type) ){ ! scanArchive(dir+name,type); ! } ! } // see if the name matches ! if( !fileMatch(name) ) continue; // check that the size fit size = stat_p.st_size; ! if( query->minSize && size < query->minSize ) continue; ! if( query->maxSize && size > query->maxSize ) continue; // check the time frame mtime = stat_p.st_mtime; ! if( query->olderThen && mtime > query->olderThen ) continue; ! if( query->newerThen && mtime < query->newerThen ) continue; // check the type ! if( !query->type.isEmpty() ) { if ( mime.isEmpty() ) ! mime = KMimeType::findByURL(url,stat_p.st_mode,true,false)->name(); ! if ( !checkType(mime) ) continue; ! } ! // check owner name ! if( !query->owner.isEmpty() && ! stat_p.st_uid != KRpermHandler::user2uid(query->owner) ) continue; // check group name ! if( !query->group.isEmpty() && ! stat_p.st_gid != KRpermHandler::group2gid(query->group) ) continue; ! // check permission ! if( !query->perm.isEmpty() && ! !checkPerm(KRpermHandler::mode2QString(stat_p.st_mode)) ) continue; ! // check if it contains the text (avoid the /dev diretory). // grep code from KFind ( the copyright goes with our thanx to the unknown author ) ! if ( !query->contain.isEmpty() && !dir.startsWith("/dev") ){ ! QFile qf(dir+name); ! qf.open(IO_ReadOnly); ! QTextStream text(&qf); ! text.setEncoding(QTextStream::Locale); QString line; bool found = false; ! while(!stopSearch && !text.atEnd() ){ line = text.readLine(); ! if (line.isNull() ) break; if ( query->containWholeWord ) ! { int ndx = 0; ! while( ( ndx = line.find(query->contain, ndx, query->containCaseSensetive) ) != -1) ! { ! QChar before = line.at( ndx-1 ); ! QChar after = line.at( ndx + query->contain.length() ); ! if( !before.isLetterOrNumber() && !after.isLetterOrNumber() && ! after!='_' && before!='_') { ! found = true; ! break; } //qApp->processEvents(); // is that needed ? ndx++; } ! } ! else if (line.find(query->contain, 0, query->containCaseSensetive) != -1) found = true; ! ! if( found ) break; ! //qApp->processEvents(); // is that needed ? ! } if ( !found ) continue; ! } // if we got here - we got a winner ! results.append(dir+name); ! // kdWarning() << "Found: " << (dir+name).local8Bit() << endl; ! emit found(name, dir, (KIO::filesize_t)stat_p.st_size, stat_p.st_mtime,KRpermHandler::mode2QString(stat_p.st_mode) ); ! qApp->processEvents(); } - // clean up - closedir(d); - } ! void KRSearchMod::scanArchive( QString archive, QString type ){ ! if( stopSearch ) return; ! // ace and rar archives are currently not suported ! if (type == "-arj" || type == "-ace" ) return; ! QString url; ! if ( type == "-tbz" || type == "-tgz" || type == "tarz" || type == "-tar" ){ ! url = "tar:"+archive; ! } else { ! url = "krarc:"+archive; ! } ! ftp_vfs *v = new ftp_vfs(0); ! emit searching(archive); ! unScanedUrls.push(url); ! while( !unScanedUrls.isEmpty() ) scanURL(v,unScanedUrls.pop()); ! delete v; ! } ! void KRSearchMod::scanURL( ftp_vfs* v, KURL url){ ! if( !v->vfs_refresh(url) ) return; ! if( scanedDirs.contains(v->vfs_getOrigin().url() ) ) return; // don't re-scan urls.. ! scanedDirs.append(v->vfs_getOrigin().url() ); ! for( vfile* vf=v->vfs_getFirstFile(); vf != 0 ; vf=v->vfs_getNextFile() ){ ! QString name = vf->vfile_getName(); ! if ( vf->vfile_isDir() ){ ! KURL url = v->vfs_getOrigin(); ! url.addPath(name); ! unScanedUrls.push(url); ! } // see if the name matches ! if( !fileMatch(name) ) continue; // check that the size fit KIO::filesize_t size = vf->vfile_getSize(); ! if( query->minSize && size < query->minSize ) continue; ! if( query->maxSize && size > query->maxSize ) continue; ! // check the time frame time_t mtime = vf->vfile_getTime_t(); ! if( query->olderThen && mtime > query->olderThen ) continue; ! if( query->newerThen && mtime < query->newerThen ) continue; // check owner name ! if( !query->owner.isEmpty() && ! vf->vfile_getUid() != KRpermHandler::user2uid(query->owner) ) continue; // check group name ! if( !query->group.isEmpty() && ! vf->vfile_getGid() != KRpermHandler::group2gid(query->group) ) continue; ! //check permission ! if( !query->perm.isEmpty() && !checkPerm(vf->vfile_getPerm()) ) continue; ! // if we got here - we got a winner ! results.append(v->vfs_getOrigin().prettyURL(1)+name); ! emit found(name, v->vfs_getOrigin().prettyURL(-1), size, vf->vfile_getTime_t(),vf->vfile_getPerm()); ! qApp->processEvents(); ! } ! } #include "krsearchmod.moc" --- 51,319 ---- #include <kmimetype.h> ! KRSearchMod::KRSearchMod( const KRQuery* q ) ! { ! stopSearch = false; /// ===> added ! query = new KRQuery( *q ); ! query->normalize(); ! } ! KRSearchMod::~KRSearchMod() ! { ! delete query; ! } ! void KRSearchMod::start() ! { ! // search every dir that needs to be searched ! for ( unsigned int i = 0; i < query->whereToSearch.count(); ++i ) ! scanDir( *( query->whereToSearch.at( i ) ) ); emit finished(); ! } ! void KRSearchMod::stop() ! { stopSearch = true; ! } ! bool KRSearchMod::checkPerm( QString perm ) ! { ! QString q_perm = query->perm; ! for ( int i = 0; i < 9; ++i ) ! if ( q_perm[ i ] != '?' && q_perm[ i ] != perm[ i + 1 ] ) return false; ! return true; ! } ! bool KRSearchMod::checkType( QString mime ) ! { ! QString type = query->type; ! if ( type == mime ) return true; ! if ( type == i18n( "Archives" ) ) ! return KRarcHandler::arcSupported( mime.right( 4 ) ); ! if ( type == i18n( "Directories" ) ) return mime.contains( "directory" ); ! if ( type == i18n( "Image Files" ) ) return mime.contains( "image/" ); ! if ( type == i18n( "Text Files" ) ) return mime.contains( "text/" ); ! if ( type == i18n( "Video Files" ) ) return mime.contains( "video/" ); ! if ( type == i18n( "Audio Files" ) ) return mime.contains( "audio/" ); ! if ( type == i18n( "Custom" ) ) return query->customType.contains( mime ); ! return false; ! } ! bool KRSearchMod::fileMatch( const QString name ) ! { ! unsigned int len; ! for ( unsigned int i = 0; i < query->matches.count(); ++i ) ! { ! QRegExp( *query->matches.at( i ), query->matchesCaseSensitive, true ).match( name, 0, ( int* ) & len ); ! if ( len == name.length() ) return true; ! } return false; ! } ! void KRSearchMod::scanDir( QString dir ) ! { ! int passes = 0; ! const int NO_OF_PASSES = 50; ! if ( stopSearch ) return ; ! if ( dir.right( 1 ) != "/" && !dir.isEmpty() ) dir = dir + "/"; ! if ( query->whereNotToSearch.contains( dir ) ) return ; ! if ( scanedDirs.contains( dir ) ) return ; // don't scan dirs twice ! scanedDirs.append( dir ); ! // let the gui know where we are ! emit searching( dir ); ! if ( passes++ % NO_OF_PASSES == 0 ) qApp->processEvents(); ! ! DIR* d = opendir( dir.local8Bit() ); ! if ( !d ) return ; ! ! struct dirent* dirEnt; QString name; ! unsigned long size; time_t mtime; KURL url; ! ! while ( ( dirEnt = readdir( d ) ) != NULL ) ! { QString mime = QString::null; name = dirEnt->d_name; ! // we dont scan the ".",".." enteries ! if ( name == "." || name == ".." ) continue; ! ! url.setPath( dir + name ); ! KDE_struct_stat stat_p; ! KDE_lstat( dir.local8Bit() + name.local8Bit(), &stat_p ); ! if ( query->recurse ) ! { ! if ( S_ISLNK( stat_p.st_mode ) && query->followLinks ) ! { ! scanDir( QDir( dir + "/" + name ).canonicalPath() ); ! } ! else if ( S_ISDIR( stat_p.st_mode ) ) scanDir( dir + name ); ! } ! if ( query->inArchive ) ! { ! mime = KMimeType::findByURL( url, stat_p.st_mode, true, false ) ->name(); ! QString type = mime.right( 4 ); ! if ( mime.contains( "-rar" ) ) type = "-rar"; ! ! if ( KRarcHandler::arcSupported( type ) ) ! { ! scanArchive( dir + name, type ); ! } ! } // see if the name matches ! if ( !fileMatch( name ) ) continue; // check that the size fit size = stat_p.st_size; ! if ( query->minSize && size < query->minSize ) continue; ! if ( query->maxSize && size > query->maxSize ) continue; // check the time frame mtime = stat_p.st_mtime; ! if ( query->olderThen && mtime > query->olderThen ) continue; ! if ( query->newerThen && mtime < query->newerThen ) continue; // check the type ! if ( !query->type.isEmpty() ) ! { if ( mime.isEmpty() ) ! mime = KMimeType::findByURL( url, stat_p.st_mode, true, false ) ->name(); ! if ( !checkType( mime ) ) continue; ! } ! // check owner name ! if ( !query->owner.isEmpty() && ! stat_p.st_uid != KRpermHandler::user2uid( query->owner ) ) continue; // check group name ! if ( !query->group.isEmpty() && ! stat_p.st_gid != KRpermHandler::group2gid( query->group ) ) continue; ! // check permission ! if ( !query->perm.isEmpty() && ! !checkPerm( KRpermHandler::mode2QString( stat_p.st_mode ) ) ) continue; ! // check if it contains the text (avoid the /dev diretory). // grep code from KFind ( the copyright goes with our thanx to the unknown author ) ! if ( !query->contain.isEmpty() && !dir.startsWith( "/dev" ) ) ! { ! QFile qf( dir + name ); ! qf.open( IO_ReadOnly ); ! QTextStream text( &qf ); ! text.setEncoding( QTextStream::Locale ); QString line; bool found = false; ! while ( !stopSearch && !text.atEnd() ) ! { line = text.readLine(); ! if ( line.isNull() ) break; if ( query->containWholeWord ) ! { int ndx = 0; ! while ( ( ndx = line.find( query->contain, ndx, query->containCaseSensetive ) ) != -1 ) ! { ! QChar before = line.at( ndx - 1 ); ! QChar after = line.at( ndx + query->contain.length() ); ! if ( !before.isLetterOrNumber() && !after.isLetterOrNumber() && ! after != '_' && before != '_' ) { ! found = true; ! break; } //qApp->processEvents(); // is that needed ? ndx++; + } } ! else if ( line.find( query->contain, 0, query->containCaseSensetive ) != -1 ) found = true; ! ! if ( found ) break; ! //qApp->processEvents(); // is that needed ? ! } if ( !found ) continue; ! } // if we got here - we got a winner ! results.append( dir + name ); ! // kdWarning() << "Found: " << (dir+name).local8Bit() << endl; ! emit found( name, dir, ( KIO::filesize_t ) stat_p.st_size, stat_p.st_mtime, KRpermHandler::mode2QString( stat_p.st_mode ) ); ! if ( passes++ % NO_OF_PASSES == 0 ) qApp->processEvents(); ! } ! // clean up ! closedir( d ); ! qApp->processEvents(); // do a last one, in case passes%50 != 0 } ! void KRSearchMod::scanArchive( QString archive, QString type ) ! { ! if ( stopSearch ) return ; ! // ace and rar archives are currently not suported ! if ( type == "-arj" || type == "-ace" ) return ; ! QString url; ! if ( type == "-tbz" || type == "-tgz" || type == "tarz" || type == "-tar" ) ! { ! url = "tar:" + archive; ! } ! else ! { ! url = "krarc:" + archive; ! } ! ftp_vfs *v = new ftp_vfs( 0 ); ! emit searching( archive ); ! unScanedUrls.push( url ); ! while ( !unScanedUrls.isEmpty() ) scanURL( v, unScanedUrls.pop() ); ! delete v; ! } ! void KRSearchMod::scanURL( ftp_vfs* v, KURL url ) ! { ! int passes = 0; ! const int NO_OF_PASSES = 50; ! if ( !v->vfs_refresh( url ) ) return ; ! if ( scanedDirs.contains( v->vfs_getOrigin().url() ) ) return ; // don't re-scan urls.. ! scanedDirs.append( v->vfs_getOrigin().url() ); ! for ( vfile * vf = v->vfs_getFirstFile(); vf != 0 ; vf = v->vfs_getNextFile() ) ! { ! QString name = vf->vfile_getName(); ! ! if ( vf->vfile_isDir() ) ! { ! KURL url = v->vfs_getOrigin(); ! url.addPath( name ); ! unScanedUrls.push( url ); ! } // see if the name matches ! if ( !fileMatch( name ) ) continue; // check that the size fit KIO::filesize_t size = vf->vfile_getSize(); ! if ( query->minSize && size < query->minSize ) continue; ! if ( query->maxSize && size > query->maxSize ) continue; ! // check the time frame time_t mtime = vf->vfile_getTime_t(); ! if ( query->olderThen && mtime > query->olderThen ) continue; ! if ( query->newerThen && mtime < query->newerThen ) continue; // check owner name ! if ( !query->owner.isEmpty() && ! vf->vfile_getUid() != KRpermHandler::user2uid( query->owner ) ) continue; // check group name ! if ( !query->group.isEmpty() && ! vf->vfile_getGid() != KRpermHandler::group2gid( query->group ) ) continue; ! //check permission ! if ( !query->perm.isEmpty() && !checkPerm( vf->vfile_getPerm() ) ) continue; ! // if we got here - we got a winner ! results.append( v->vfs_getOrigin().prettyURL( 1 ) + name ); ! emit found( name, v->vfs_getOrigin().prettyURL( -1 ), size, vf->vfile_getTime_t(), vf->vfile_getPerm() ); ! if ( passes++ % NO_OF_PASSES == 0 ) qApp->processEvents(); ! } ! qApp->processEvents(); // do a last one, in case passes%50 != 0 ! } #include "krsearchmod.moc" |
From: <er...@pr...> - 2004-01-31 04:09:35
|
Update of /cvsroot/krusader/krusader_kde3/krusader/Dialogs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21934/krusader/Dialogs Modified Files: krspecialwidgets.cpp Log Message: heiner's calc-space patch and quicksort cleanups Index: krspecialwidgets.cpp =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/krusader/Dialogs/krspecialwidgets.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** krspecialwidgets.cpp 10 Jan 2004 14:49:50 -0000 1.6 --- krspecialwidgets.cpp 28 Jan 2004 22:49:33 -0000 1.7 *************** *** 222,225 **** --- 222,226 ---- case Key_Enter: case Key_Tab: + case Key_Insert: emit stop(e); break; |
From: <er...@pr...> - 2004-01-30 23:26:40
|
Update of /cvsroot/krusader/krusader_kde3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7009 Modified Files: ChangeLog Log Message: fix: sort by EXT did not obey the 'case sensative sort' flag Index: ChangeLog =================================================================== RCS file: /cvsroot/krusader/krusader_kde3/ChangeLog,v retrieving revision 1.171 retrieving revision 1.172 diff -C2 -d -r1.171 -r1.172 *** ChangeLog 30 Jan 2004 23:13:58 -0000 1.171 --- ChangeLog 30 Jan 2004 23:25:04 -0000 1.172 *************** *** 10,13 **** --- 10,14 ---- ADDED: file splitter ADDED: a missing credit for Frank in the about box + FIXED: sort by EXT did not obey the 'case sensative sort' flag FIXED: 2 items on the view menu had the same shortcuts FIXED: increased speed of search, by emitting less signals (thanks to Lars) |