1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
/****************************************************************************
** ui.h extension file, included from the uic-generated form implementation.
**
** If you want to add, delete, or rename functions or slots, use
** TQt Designer to update this file, preserving your code.
**
** You should not define a constructor or destructor in this file.
** Instead, write your code in functions called init() and destroy().
** These will automatically be called by the form's constructor and
** destructor.
*****************************************************************************/
#include "directorylist.h"
#include <kdialogbase.h>
#include <tdeconfig.h>
#include <tdeglobal.h>
void KlamOnAccConfig::reconfigurePaths() {
// Borrowed from amaroK (collectionbrowser.cpp)
KDialogBase dialog( this, 0, false );
// kapp->setTopWidget( &dialog );
dialog.setCaption( "Configure Directories Watchlist" );
TDEConfig *config = TDEGlobal::config();
config->setGroup("OnAccess");
TQStringList dirs = config->readListEntry("Watchlist");
CollectionSetup *setup = new CollectionSetup( &dialog, true, false, dirs );
dialog.setMainWidget( setup );
dialog.showButtonApply( false );
dialog.adjustSize();
// Make the dialog a bit bigger, default is too small to be useful
dialog.resize( dialog.width() + 50, dialog.height() + 150 );
if ( dialog.exec() != TQDialog::Rejected ) {
setup->writeConfig("OnAccess","Watchlist");
}
restart = true;
}
void KlamOnAccConfig::slotSettingsChanged() {
restart = true;
}
void KlamOnAccConfig::slotSettingsApplied() {
restart = false;
}
bool KlamOnAccConfig::needsRestart() {
return restart;
}
|