Diffstat (limited to 'core/pim/today/todayconfig.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/today/todayconfig.cpp | 51 |
1 files changed, 28 insertions, 23 deletions
diff --git a/core/pim/today/todayconfig.cpp b/core/pim/today/todayconfig.cpp index 4f23471..532d126 100644 --- a/core/pim/today/todayconfig.cpp +++ b/core/pim/today/todayconfig.cpp | |||
@@ -37,3 +37,2 @@ public: | |||
37 | : QToolButton( parent, name ) { | 37 | : QToolButton( parent, name ) { |
38 | // setTextLabel( name ); | ||
39 | setPixmap( Resource::loadPixmap( icon ) ); | 38 | setPixmap( Resource::loadPixmap( icon ) ); |
@@ -71,2 +70,3 @@ TodayConfig::TodayConfig( QWidget* parent, const char* name, bool modal, WFlags | |||
71 | m_appletListView->header()->hide(); | 70 | m_appletListView->header()->hide(); |
71 | m_appletListView->setSorting( -1 ); | ||
72 | QVBox *vbox1 = new QVBox( hbox1 ); | 72 | QVBox *vbox1 = new QVBox( hbox1 ); |
@@ -75,15 +75,10 @@ TodayConfig::TodayConfig( QWidget* parent, const char* name, bool modal, WFlags | |||
75 | tab2Layout->addWidget( hbox1 ); | 75 | tab2Layout->addWidget( hbox1 ); |
76 | |||
77 | TabWidget3->insertTab( tab_2, tr( "active/order" ) ); | 76 | TabWidget3->insertTab( tab_2, tr( "active/order" ) ); |
77 | |||
78 | tab_3 = new QWidget( TabWidget3, "tab_3" ); | 78 | tab_3 = new QWidget( TabWidget3, "tab_3" ); |
79 | QVBoxLayout *tab3Layout = new QVBoxLayout( tab_3 ); | 79 | QVBoxLayout *tab3Layout = new QVBoxLayout( tab_3 ); |
80 | QHBox *hbox_clip = new QHBox( tab_3 ); | 80 | tab3Layout->setMargin( 20 ); |
81 | TextLabel1 = new QLabel( hbox_clip, "TextLabel1" ); | ||
82 | TextLabel1->setText( tr( "Clip after how\n" | ||
83 | "many letters" ) ); | ||
84 | SpinBox7 = new QSpinBox( hbox_clip, "SpinBox7" ); | ||
85 | SpinBox7->setMaxValue( 80 ); | ||
86 | QHBox *hbox_auto = new QHBox( tab_3 ); | 81 | QHBox *hbox_auto = new QHBox( tab_3 ); |
87 | TextLabel2 = new QLabel( hbox_auto, "AutoStart" ); | 82 | TextLabel2 = new QLabel( hbox_auto, "AutoStart" ); |
88 | TextLabel2->setText( tr( "autostart on \nresume? (Opie only)" ) ); | 83 | TextLabel2->setText( tr( "autostart on \nresume?\n (Opie only)" ) ); |
89 | CheckBoxAuto = new QCheckBox( hbox_auto, "CheckBoxAuto" ); | 84 | CheckBoxAuto = new QCheckBox( hbox_auto, "CheckBoxAuto" ); |
@@ -92,4 +87,3 @@ TodayConfig::TodayConfig( QWidget* parent, const char* name, bool modal, WFlags | |||
92 | TimeLabel->setText( tr( "minutes inactive" ) ); | 87 | TimeLabel->setText( tr( "minutes inactive" ) ); |
93 | SpinBoxTime = new QSpinBox( hbox_inactive, "TimeSpinner"); | 88 | SpinBoxTime = new QSpinBox( hbox_inactive, "TimeSpinner" ); |
94 | tab3Layout->addWidget( hbox_clip ); | ||
95 | tab3Layout->addWidget( hbox_auto ); | 89 | tab3Layout->addWidget( hbox_auto ); |
@@ -114,3 +108,3 @@ void TodayConfig::setAutoStart() { | |||
114 | cfg.setGroup( "Autostart" ); | 108 | cfg.setGroup( "Autostart" ); |
115 | int autostart = cfg.readNumEntry( "autostart", 1); | 109 | int autostart = cfg.readNumEntry( "autostart", 1 ); |
116 | if ( autostart ) { | 110 | if ( autostart ) { |
@@ -138,3 +132,3 @@ void TodayConfig::readConfig() { | |||
138 | 132 | ||
139 | cfg.setGroup( "Applets" ); | 133 | cfg.setGroup( "Plugins" ); |
140 | m_excludeApplets = cfg.readListEntry( "ExcludeApplets", ',' ); | 134 | m_excludeApplets = cfg.readListEntry( "ExcludeApplets", ',' ); |
@@ -147,3 +141,3 @@ void TodayConfig::writeConfig() { | |||
147 | Config cfg( "today" ); | 141 | Config cfg( "today" ); |
148 | cfg. setGroup ( "Applets" ); | 142 | cfg.setGroup( "Plugins" ); |
149 | if ( m_applets_changed ) { | 143 | if ( m_applets_changed ) { |
@@ -151,8 +145,18 @@ void TodayConfig::writeConfig() { | |||
151 | QStringList include; | 145 | QStringList include; |
152 | QMap <QString, QCheckListItem *>::Iterator it; | 146 | QStringList all_applets; |
153 | for ( it = m_applets.begin(); it != m_applets. end (); ++it ) { | 147 | |
154 | if ( !(*it)-> isOn () ) { | 148 | QListViewItemIterator list_it( m_appletListView ); |
155 | exclude << it.key(); | 149 | |
156 | } else { | 150 | // this makes sure the names get saved in the order selected |
157 | include << it.key(); | 151 | for ( ; list_it.current(); ++list_it ) { |
152 | QMap <QString, QCheckListItem *>::Iterator it; | ||
153 | for ( it = m_applets.begin(); it != m_applets. end (); ++it ) { | ||
154 | if ( list_it.current() == (*it) && !(*it)-> isOn () ) { | ||
155 | exclude << it.key(); | ||
156 | } else if ( list_it.current() == (*it) && (*it)-> isOn () ){ | ||
157 | include << it.key(); | ||
158 | } | ||
159 | if ( list_it.current() == (*it) ) { | ||
160 | all_applets << it.key(); | ||
161 | } | ||
158 | } | 162 | } |
@@ -161,2 +165,3 @@ void TodayConfig::writeConfig() { | |||
161 | cfg.writeEntry( "IncludeApplets", include, ',' ); | 165 | cfg.writeEntry( "IncludeApplets", include, ',' ); |
166 | cfg.writeEntry( "AllApplets", all_applets, ',' ); | ||
162 | } | 167 | } |
@@ -165,3 +170,3 @@ void TodayConfig::writeConfig() { | |||
165 | m_autoStart = CheckBoxAuto->isChecked(); | 170 | m_autoStart = CheckBoxAuto->isChecked(); |
166 | cfg.writeEntry( "autostart", m_autoStart ); | 171 | cfg.writeEntry( "autostart", m_autoStart ); |
167 | m_autoStartTimer = SpinBoxTime->value(); | 172 | m_autoStartTimer = SpinBoxTime->value(); |
@@ -173,3 +178,3 @@ void TodayConfig::moveSelectedUp() { | |||
173 | QListViewItem *item = m_appletListView->selectedItem(); | 178 | QListViewItem *item = m_appletListView->selectedItem(); |
174 | if ( item && item->itemAbove() ) { | 179 | if ( item && item->itemAbove() ) { |
175 | item->itemAbove()->moveItem( item ); | 180 | item->itemAbove()->moveItem( item ); |
@@ -199,3 +204,2 @@ void TodayConfig::pluginManagement( QString libName, QString name, QPixmap icon | |||
199 | 204 | ||
200 | qDebug (" SUCHNAME: " + name ); | ||
201 | if ( m_excludeApplets.find( libName ) == m_excludeApplets.end() ) { | 205 | if ( m_excludeApplets.find( libName ) == m_excludeApplets.end() ) { |
@@ -203,2 +207,3 @@ void TodayConfig::pluginManagement( QString libName, QString name, QPixmap icon | |||
203 | } | 207 | } |
208 | |||
204 | m_applets[libName] = item; | 209 | m_applets[libName] = item; |