Add GUI check box for controlling the display of archives as folders in Konqueror navigator side pane.

This resolves bug report 1268.
(cherry picked from commit 7255491dc1)
v3.5.13-sru
Darrell Anderson 12 years ago committed by Slávek Banko
parent feec97bdf1
commit ad594443d8

@ -80,6 +80,15 @@ KBehaviourOptions::KBehaviourOptions(KConfig *config, TQString group, TQWidget *
" separate window.") ); " separate window.") );
// ----
cbShowArchivesAsFolders = new TQCheckBox( i18n( "Show archived &files as folders" ), vbox );
connect(cbShowArchivesAsFolders, TQT_SIGNAL(clicked()), this, TQT_SLOT(changed()));
TQWhatsThis::add( cbShowArchivesAsFolders, i18n("Checking this option will list archived"
" files as folders when using tree view.") );
// -- // --
cbShowTips = new TQCheckBox( i18n( "Show file &tips" ), vbox ); cbShowTips = new TQCheckBox( i18n( "Show file &tips" ), vbox );
@ -202,7 +211,7 @@ void KBehaviourOptions::load( bool useDefaults )
cbShowPreviewsInTips->setChecked( showPreviewsIntips ); cbShowPreviewsInTips->setChecked( showPreviewsIntips );
cbRenameDirectlyIcon->setChecked( g_pConfig->readBoolEntry("RenameIconDirectly", DEFAULT_RENAMEICONDIRECTLY ) ); cbRenameDirectlyIcon->setChecked( g_pConfig->readBoolEntry("RenameIconDirectly", DEFAULT_RENAMEICONDIRECTLY ) );
KConfig globalconfig("kdeglobals", true, false); KConfig globalconfig("kdeglobals", true, false);
globalconfig.setGroup( "KDE" ); globalconfig.setGroup( "KDE" );
cbShowDeleteCommand->setChecked( globalconfig.readBoolEntry("ShowDeleteCommand", false) ); cbShowDeleteCommand->setChecked( globalconfig.readBoolEntry("ShowDeleteCommand", false) );
@ -214,13 +223,16 @@ void KBehaviourOptions::load( bool useDefaults )
KConfig config("uiserverrc"); KConfig config("uiserverrc");
config.setGroup( "UIServer" ); config.setGroup( "UIServer" );
cbListProgress->setChecked( config.readBoolEntry( "ShowList", false ) ); cbListProgress->setChecked( config.readBoolEntry( "ShowList", false ) );
g_pConfig->setGroup( "Trash" ); g_pConfig->setGroup( "Trash" );
cbMoveToTrash->setChecked( g_pConfig->readBoolEntry("ConfirmTrash", DEFAULT_CONFIRMTRASH) ); cbMoveToTrash->setChecked( g_pConfig->readBoolEntry("ConfirmTrash", DEFAULT_CONFIRMTRASH) );
cbDelete->setChecked( g_pConfig->readBoolEntry("ConfirmDelete", DEFAULT_CONFIRMDELETE) ); cbDelete->setChecked( g_pConfig->readBoolEntry("ConfirmDelete", DEFAULT_CONFIRMDELETE) );
KConfig sidebarconfig("konqsidebartng.rc");
sidebarconfig.setGroup( "" );
cbShowArchivesAsFolders->setChecked( sidebarconfig.readBoolEntry( "ShowArchivesAsFolders", false ) );
emit changed( useDefaults ); emit changed( useDefaults );
} }
@ -241,12 +253,17 @@ void KBehaviourOptions::save()
// g_pConfig->writeEntry( "FileTipsItems", sbToolTip->value() ); // g_pConfig->writeEntry( "FileTipsItems", sbToolTip->value() );
g_pConfig->writeEntry( "RenameIconDirectly", cbRenameDirectlyIcon->isChecked()); g_pConfig->writeEntry( "RenameIconDirectly", cbRenameDirectlyIcon->isChecked());
KConfig sidebarconfig("konqsidebartng.rc");
sidebarconfig.setGroup( "" );
sidebarconfig.writeEntry( "ShowArchivesAsFolders", cbShowArchivesAsFolders->isChecked() );
sidebarconfig.sync();
KConfig globalconfig("kdeglobals", false, false); KConfig globalconfig("kdeglobals", false, false);
globalconfig.setGroup( "KDE" ); globalconfig.setGroup( "KDE" );
globalconfig.writeEntry( "ShowDeleteCommand", cbShowDeleteCommand->isChecked()); globalconfig.writeEntry( "ShowDeleteCommand", cbShowDeleteCommand->isChecked());
globalconfig.sync(); globalconfig.sync();
g_pConfig->setGroup( "Trash" ); g_pConfig->setGroup( "Trash" );
g_pConfig->writeEntry( "ConfirmTrash", cbMoveToTrash->isChecked()); g_pConfig->writeEntry( "ConfirmTrash", cbMoveToTrash->isChecked());
g_pConfig->writeEntry( "ConfirmDelete", cbDelete->isChecked()); g_pConfig->writeEntry( "ConfirmDelete", cbDelete->isChecked());
@ -257,6 +274,7 @@ void KBehaviourOptions::save()
config.setGroup( "UIServer" ); config.setGroup( "UIServer" );
config.writeEntry( "ShowList", cbListProgress->isChecked() ); config.writeEntry( "ShowList", cbListProgress->isChecked() );
config.sync(); config.sync();
// Tell the running server // Tell the running server
if ( kapp->dcopClient()->isApplicationRegistered( "kio_uiserver" ) ) if ( kapp->dcopClient()->isApplicationRegistered( "kio_uiserver" ) )
{ {

@ -55,6 +55,7 @@ private:
TQCheckBox *cbNewWin; TQCheckBox *cbNewWin;
TQCheckBox *cbListProgress; TQCheckBox *cbListProgress;
TQCheckBox *cbShowArchivesAsFolders;
TQLabel *winPixmap; TQLabel *winPixmap;

Loading…
Cancel
Save