summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/settings/launcher/tabconfig.h13
-rw-r--r--core/settings/launcher/tabdialog.cpp45
-rw-r--r--core/settings/launcher/tabdialog.h2
-rw-r--r--core/settings/launcher/tabssettings.cpp69
-rw-r--r--core/settings/launcher/taskbarsettings.cpp3
5 files changed, 86 insertions, 46 deletions
diff --git a/core/settings/launcher/tabconfig.h b/core/settings/launcher/tabconfig.h
index eebfd36..9086341 100644
--- a/core/settings/launcher/tabconfig.h
+++ b/core/settings/launcher/tabconfig.h
@@ -40,12 +40,13 @@ struct TabConfig {
40 40
41 ViewMode m_view; 41 ViewMode m_view;
42 BackgroundType m_bg_type; 42 BackgroundType m_bg_type;
43 QString m_bg_image; 43 QString m_bg_image;
44 QString m_bg_color; 44 QString m_bg_color;
45 QString m_text_color; 45 QString m_text_color;
46 bool m_font_use;
46 QString m_font_family; 47 QString m_font_family;
47 int m_font_size; 48 int m_font_size;
48 int m_font_weight; 49 int m_font_weight;
49 bool m_font_italic; 50 bool m_font_italic;
50 bool m_changed; 51 bool m_changed;
51 52
@@ -53,14 +54,18 @@ struct TabConfig {
53 { 54 {
54 return ( m_view == tc. m_view ) && 55 return ( m_view == tc. m_view ) &&
55 ( m_bg_type == tc. m_bg_type ) && 56 ( m_bg_type == tc. m_bg_type ) &&
56 ( m_bg_image == tc. m_bg_image ) && 57 ( m_bg_image == tc. m_bg_image ) &&
57 ( m_bg_color == tc. m_bg_color ) && 58 ( m_bg_color == tc. m_bg_color ) &&
58 ( m_text_color == tc. m_text_color ) && 59 ( m_text_color == tc. m_text_color ) &&
59 ( m_font_family == tc. m_font_family ) && 60 ( m_font_use == tc. m_font_use ) &&
60 ( m_font_size == tc. m_font_size ) && 61 ( m_font_use ? (
61 ( m_font_weight == tc. m_font_weight ) && 62 ( m_font_family == tc. m_font_family ) &&
62 ( m_font_italic == tc. m_font_italic ); 63 ( m_font_size == tc. m_font_size ) &&
64 ( m_font_weight == tc. m_font_weight ) &&
65 ( m_font_italic == tc. m_font_italic )
66 ) : true );
67
63 } 68 }
64}; 69};
65 70
66#endif 71#endif
diff --git a/core/settings/launcher/tabdialog.cpp b/core/settings/launcher/tabdialog.cpp
index a90ba7d..d20412a 100644
--- a/core/settings/launcher/tabdialog.cpp
+++ b/core/settings/launcher/tabdialog.cpp
@@ -36,12 +36,13 @@
36#include <qapplication.h> 36#include <qapplication.h>
37#include <qlabel.h> 37#include <qlabel.h>
38#include <qradiobutton.h> 38#include <qradiobutton.h>
39#include <qbuttongroup.h> 39#include <qbuttongroup.h>
40#include <qpushbutton.h> 40#include <qpushbutton.h>
41#include <qwhatsthis.h> 41#include <qwhatsthis.h>
42#include <qcheckbox.h>
42 43
43#include <opie/ofontselector.h> 44#include <opie/ofontselector.h>
44#include <opie/otabwidget.h> 45#include <opie/otabwidget.h>
45#include <opie/ocolorbutton.h> 46#include <opie/ocolorbutton.h>
46#include <opie/ofiledialog.h> 47#include <opie/ofiledialog.h>
47 48
@@ -264,13 +265,13 @@ private:
264 265
265TabDialog::TabDialog ( const QPixmap *tabicon, const QString &tabname, TabConfig &tc, QWidget *parent, const char *name, bool modal, WFlags fl ) 266TabDialog::TabDialog ( const QPixmap *tabicon, const QString &tabname, TabConfig &tc, QWidget *parent, const char *name, bool modal, WFlags fl )
266 : QDialog ( parent, name, modal, fl | WStyle_ContextHelp ), m_tc ( tc ) 267 : QDialog ( parent, name, modal, fl | WStyle_ContextHelp ), m_tc ( tc )
267{ 268{
268 setCaption ( tr( "Edit Tab" )); 269 setCaption ( tr( "Edit Tab" ));
269 270
270 QVBoxLayout *lay = new QVBoxLayout ( this, 4, 4 ); 271 QVBoxLayout *lay = new QVBoxLayout ( this, 3, 3 );
271 272
272 OTabWidget *tw = new OTabWidget ( this, "tabwidget", OTabWidget::Global, OTabWidget::Bottom ); 273 OTabWidget *tw = new OTabWidget ( this, "tabwidget", OTabWidget::Global, OTabWidget::Bottom );
273 QWidget *bgtab; 274 QWidget *bgtab;
274 275
275 tw-> addTab ( bgtab = createBgTab ( tw ), "appearance/backgroundtabicon.png", tr( "Background" )); 276 tw-> addTab ( bgtab = createBgTab ( tw ), "appearance/backgroundtabicon.png", tr( "Background" ));
276 tw-> addTab ( createFontTab ( tw ), "appearance/fonttabicon.png", tr( "Font" )); 277 tw-> addTab ( createFontTab ( tw ), "appearance/fonttabicon.png", tr( "Font" ));
@@ -294,37 +295,47 @@ TabDialog::TabDialog ( const QPixmap *tabicon, const QString &tabname, TabConfig
294 m_iconcolor-> setColor ( QColor ( m_tc. m_text_color )); 295 m_iconcolor-> setColor ( QColor ( m_tc. m_text_color ));
295 iconColorClicked ( m_iconcolor-> color ( )); 296 iconColorClicked ( m_iconcolor-> color ( ));
296 m_bgtype-> setButton ( tc. m_bg_type ); 297 m_bgtype-> setButton ( tc. m_bg_type );
297 m_solidcolor-> setColor ( QColor ( tc. m_bg_color )); 298 m_solidcolor-> setColor ( QColor ( tc. m_bg_color ));
298 m_bgimage = tc. m_bg_image; 299 m_bgimage = tc. m_bg_image;
299 bgTypeClicked ( tc. m_bg_type ); 300 bgTypeClicked ( tc. m_bg_type );
301 m_fontuse-> setChecked ( tc. m_font_use );
300 m_fontselect-> setSelectedFont ( QFont ( tc. m_font_family, tc. m_font_size, tc. m_font_weight, tc. m_font_italic )); 302 m_fontselect-> setSelectedFont ( QFont ( tc. m_font_family, tc. m_font_size, tc. m_font_weight, tc. m_font_italic ));
303 m_fontselect-> setEnabled ( m_fontuse-> isChecked ( ));
301 fontClicked ( m_fontselect-> selectedFont ( )); 304 fontClicked ( m_fontselect-> selectedFont ( ));
302 305
303 QWhatsThis::add ( sample, tr( "This is a rough preview of what the currently selected Tab will look like." )); 306 QWhatsThis::add ( sample, tr( "This is a rough preview of what the currently selected Tab will look like." ));
304} 307}
305 308
306 309
307TabDialog::~TabDialog ( ) 310TabDialog::~TabDialog ( )
308{ 311{
309} 312}
310 313
311QWidget *TabDialog::createFontTab ( QWidget *parent ) 314QWidget *TabDialog::createFontTab ( QWidget *parent )
312{ 315{
313 m_fontselect = new OFontSelector ( false, parent, "FontTab" ); 316 QWidget *tab = new QWidget ( parent, "FontTab" );
317 QVBoxLayout *vertLayout = new QVBoxLayout ( tab, 3, 3 );
318
319 m_fontuse = new QCheckBox ( tr( "Use a custom font" ), tab );
320 vertLayout-> addWidget ( m_fontuse );
321
322 m_fontselect = new OFontSelector ( false, tab, "fontsel" );
323 vertLayout-> addWidget ( m_fontselect );
314 324
325 connect ( m_fontuse, SIGNAL( toggled ( bool )), m_fontselect, SLOT( setEnabled ( bool )));
315 connect( m_fontselect, SIGNAL( fontSelected ( const QFont & )), 326 connect( m_fontselect, SIGNAL( fontSelected ( const QFont & )),
316 this, SLOT( fontClicked ( const QFont & ))); 327 this, SLOT( fontClicked ( const QFont & )));
317 328
318 return m_fontselect; 329 return tab;
319} 330}
320 331
321QWidget *TabDialog::createBgTab ( QWidget *parent ) 332QWidget *TabDialog::createBgTab ( QWidget *parent )
322{ 333{
323 QWidget *tab = new QWidget( parent, "AdvancedTab" ); 334 QWidget *tab = new QWidget( parent, "BgTab" );
324 QVBoxLayout *vertLayout = new QVBoxLayout( tab, 4, 4 ); 335 QVBoxLayout *vertLayout = new QVBoxLayout( tab, 3, 3 );
325 336
326 QGridLayout* gridLayout = new QGridLayout ( vertLayout ); 337 QGridLayout* gridLayout = new QGridLayout ( vertLayout );
327 gridLayout-> setColStretch ( 1, 10 ); 338 gridLayout-> setColStretch ( 1, 10 );
328 339
329 QLabel* label = new QLabel( tr( "Type:" ), tab ); 340 QLabel* label = new QLabel( tr( "Type:" ), tab );
330 gridLayout-> addWidget ( label, 0, 0 ); 341 gridLayout-> addWidget ( label, 0, 0 );
@@ -335,13 +346,13 @@ QWidget *TabDialog::createBgTab ( QWidget *parent )
335 QRadioButton *rb; 346 QRadioButton *rb;
336 rb = new QRadioButton( tr( "Ruled" ), tab, "ruled" ); 347 rb = new QRadioButton( tr( "Ruled" ), tab, "ruled" );
337 m_bgtype-> insert ( rb, TabConfig::Ruled ); 348 m_bgtype-> insert ( rb, TabConfig::Ruled );
338 gridLayout-> addWidget( rb, 0, 1 ); 349 gridLayout-> addWidget( rb, 0, 1 );
339 350
340 QHBoxLayout *hb = new QHBoxLayout ( ); 351 QHBoxLayout *hb = new QHBoxLayout ( );
341 hb-> setSpacing ( 4 ); 352 hb-> setSpacing ( 3 );
342 353
343 rb = new QRadioButton( tr( "Solid color" ), tab, "solid" ); 354 rb = new QRadioButton( tr( "Solid color" ), tab, "solid" );
344 m_bgtype-> insert ( rb, TabConfig::SolidColor ); 355 m_bgtype-> insert ( rb, TabConfig::SolidColor );
345 hb-> addWidget ( rb ); 356 hb-> addWidget ( rb );
346 hb-> addSpacing ( 10 ); 357 hb-> addSpacing ( 10 );
347 358
@@ -350,13 +361,13 @@ QWidget *TabDialog::createBgTab ( QWidget *parent )
350 hb-> addWidget ( m_solidcolor ); 361 hb-> addWidget ( m_solidcolor );
351 hb-> addStretch ( 10 ); 362 hb-> addStretch ( 10 );
352 363
353 gridLayout-> addLayout ( hb, 1, 1 ); 364 gridLayout-> addLayout ( hb, 1, 1 );
354 365
355 hb = new QHBoxLayout ( ); 366 hb = new QHBoxLayout ( );
356 hb-> setSpacing ( 4 ); 367 hb-> setSpacing ( 3 );
357 368
358 rb = new QRadioButton( tr( "Image" ), tab, "image" ); 369 rb = new QRadioButton( tr( "Image" ), tab, "image" );
359 m_bgtype-> insert ( rb, TabConfig::Image ); 370 m_bgtype-> insert ( rb, TabConfig::Image );
360 hb-> addWidget( rb ); 371 hb-> addWidget( rb );
361 hb-> addSpacing ( 10 ); 372 hb-> addSpacing ( 10 );
362 373
@@ -377,14 +388,14 @@ QWidget *TabDialog::createBgTab ( QWidget *parent )
377 388
378 return tab; 389 return tab;
379} 390}
380 391
381QWidget *TabDialog::createIconTab ( QWidget *parent ) 392QWidget *TabDialog::createIconTab ( QWidget *parent )
382{ 393{
383 QWidget *tab = new QWidget( parent, "AdvancedTab" ); 394 QWidget *tab = new QWidget( parent, "IconTab" );
384 QVBoxLayout *vertLayout = new QVBoxLayout( tab, 4, 4 ); 395 QVBoxLayout *vertLayout = new QVBoxLayout( tab, 3, 3 );
385 396
386 QGridLayout* gridLayout = new QGridLayout ( vertLayout ); 397 QGridLayout* gridLayout = new QGridLayout ( vertLayout );
387 gridLayout-> setColStretch ( 1, 10 ); 398 gridLayout-> setColStretch ( 1, 10 );
388 399
389 QLabel* label = new QLabel( tr( "Size:" ), tab ); 400 QLabel* label = new QLabel( tr( "Size:" ), tab );
390 gridLayout-> addWidget ( label, 0, 0 ); 401 gridLayout-> addWidget ( label, 0, 0 );
@@ -486,16 +497,20 @@ void TabDialog::accept ( )
486{ 497{
487 m_tc. m_view = (TabConfig::ViewMode) m_iconsize-> id ( m_iconsize-> selected ( )); 498 m_tc. m_view = (TabConfig::ViewMode) m_iconsize-> id ( m_iconsize-> selected ( ));
488 m_tc. m_bg_type = (TabConfig::BackgroundType) m_bgtype-> id ( m_bgtype-> selected ( )); 499 m_tc. m_bg_type = (TabConfig::BackgroundType) m_bgtype-> id ( m_bgtype-> selected ( ));
489 m_tc. m_bg_color = m_solidcolor-> color ( ). name ( ); 500 m_tc. m_bg_color = m_solidcolor-> color ( ). name ( );
490 m_tc. m_bg_image = m_bgimage; 501 m_tc. m_bg_image = m_bgimage;
491 m_tc. m_text_color = m_iconcolor-> color ( ). name ( ); 502 m_tc. m_text_color = m_iconcolor-> color ( ). name ( );
503
504 m_tc. m_font_use = m_fontuse-> isChecked ( );
505
506 if ( m_tc. m_font_use ) {
507 QFont f = m_fontselect-> selectedFont ( );
492 508
493 QFont f = m_fontselect-> selectedFont ( ); 509 m_tc. m_font_family = f. family ( );
494 510 m_tc. m_font_size = f. pointSize ( );
495 m_tc. m_font_family = f. family ( ); 511 m_tc. m_font_weight = f. weight ( );
496 m_tc. m_font_size = f. pointSize ( ); 512 m_tc. m_font_italic = f. italic ( );
497 m_tc. m_font_weight = f. weight ( ); 513 }
498 m_tc. m_font_italic = f. italic ( );
499 514
500 QDialog::accept ( ); 515 QDialog::accept ( );
501} 516}
diff --git a/core/settings/launcher/tabdialog.h b/core/settings/launcher/tabdialog.h
index b0afd47..892a3ad 100644
--- a/core/settings/launcher/tabdialog.h
+++ b/core/settings/launcher/tabdialog.h
@@ -33,12 +33,13 @@
33 33
34class QButtonGroup; 34class QButtonGroup;
35class OFontSelector; 35class OFontSelector;
36class SampleView; 36class SampleView;
37class OColorButton; 37class OColorButton;
38class QPushButton; 38class QPushButton;
39class QCheckBox;
39 40
40 41
41class TabDialog : public QDialog { 42class TabDialog : public QDialog {
42 Q_OBJECT 43 Q_OBJECT
43public: 44public:
44 TabDialog ( const QPixmap *tabicon, const QString &tabname, TabConfig &cfg, QWidget *parent = 0, const char *name = 0, bool modal = false, WFlags = 0 ); 45 TabDialog ( const QPixmap *tabicon, const QString &tabname, TabConfig &cfg, QWidget *parent = 0, const char *name = 0, bool modal = false, WFlags = 0 );
@@ -68,12 +69,13 @@ private:
68 OFontSelector *m_fontselect; 69 OFontSelector *m_fontselect;
69 OColorButton *m_solidcolor; 70 OColorButton *m_solidcolor;
70 OColorButton *m_iconcolor; 71 OColorButton *m_iconcolor;
71 QPushButton *m_imagebrowse; 72 QPushButton *m_imagebrowse;
72 QString m_bgimage; 73 QString m_bgimage;
73 QButtonGroup *m_bgtype; 74 QButtonGroup *m_bgtype;
75 QCheckBox *m_fontuse;
74 76
75 TabConfig &m_tc; 77 TabConfig &m_tc;
76}; 78};
77 79
78 80
79#endif \ No newline at end of file 81#endif \ No newline at end of file
diff --git a/core/settings/launcher/tabssettings.cpp b/core/settings/launcher/tabssettings.cpp
index a5afaf2..9d6e8c1 100644
--- a/core/settings/launcher/tabssettings.cpp
+++ b/core/settings/launcher/tabssettings.cpp
@@ -44,13 +44,13 @@
44#include "tabdialog.h" 44#include "tabdialog.h"
45 45
46#include <stdlib.h> 46#include <stdlib.h>
47#include <qmessagebox.h> 47#include <qmessagebox.h>
48 48
49 49
50 #define GLOBALID "_launchersettings_global_dummy_" 50 #define GLOBALID ".global."
51 51
52 52
53TabsSettings::TabsSettings ( QWidget *parent, const char *name ) 53TabsSettings::TabsSettings ( QWidget *parent, const char *name )
54 : QWidget ( parent, name ) 54 : QWidget ( parent, name )
55{ 55{
56 QGridLayout *lay = new QGridLayout ( this, 0, 0, 4, 4 ); 56 QGridLayout *lay = new QGridLayout ( this, 0, 0, 4, 4 );
@@ -121,48 +121,56 @@ void TabsSettings::init ( )
121 121
122void TabsSettings::readTabSettings ( Config &cfg ) 122void TabsSettings::readTabSettings ( Config &cfg )
123{ 123{
124 QString grp ( "Tab %1" ); // No tr 124 QString grp ( "Tab %1" ); // No tr
125 m_tabs. clear ( ); 125 m_tabs. clear ( );
126 126
127 TabConfig global_def;
128 global_def. m_view = TabConfig::Icon;
129 global_def. m_bg_type = TabConfig::Ruled;
130 global_def. m_bg_image = "launcher/opie-background";
131 global_def. m_bg_color = colorGroup ( ). color ( QColorGroup::Base ). name ( );
132 global_def. m_text_color = colorGroup ( ). color ( QColorGroup::Text ). name ( );
133 global_def. m_font_use = false;
134 global_def. m_font_family = font ( ). family ( );
135 global_def. m_font_size = font ( ). pointSize ( );
136 global_def. m_font_weight = 50;
137 global_def. m_font_italic = false;
138 global_def. m_changed = false;
139
140
127 for ( QStringList::Iterator it = m_ids. begin ( ); it != m_ids. end ( ); ++it ) { 141 for ( QStringList::Iterator it = m_ids. begin ( ); it != m_ids. end ( ); ++it ) {
128 TabConfig tc; 142 TabConfig tc = ( it != m_ids. begin ( )) ? m_tabs [GLOBALID] : global_def;
129 tc. m_view = TabConfig::Icon;
130 tc. m_bg_type = TabConfig::Ruled;
131 tc. m_changed = false;
132 143
133 cfg. setGroup ( grp. arg ( *it )); 144 cfg. setGroup ( grp. arg ( *it ));
134 if ( *it == GLOBALID )
135 cfg. clearGroup ( );
136 145
137 QString view = cfg. readEntry ( "View", "Icon" ); 146 QString view = cfg. readEntry ( "View" );
147 if ( view == "Icon" ) // No tr
148 tc. m_view = TabConfig::Icon;
138 if ( view == "List" ) // No tr 149 if ( view == "List" ) // No tr
139 tc. m_view = TabConfig::List; 150 tc. m_view = TabConfig::List;
140 151
141 QString bgType = cfg. readEntry ( "BackgroundType", "Image" ); 152 QString bgType = cfg. readEntry ( "BackgroundType" );
142 if ( bgType == "SolidColor" ) 153 if ( bgType == "Image" )
154 tc. m_bg_type = TabConfig::Image;
155 else if ( bgType == "SolidColor" )
143 tc. m_bg_type = TabConfig::SolidColor; 156 tc. m_bg_type = TabConfig::SolidColor;
144 else if ( bgType == "Image" ) // No tr 157 else if ( bgType == "Image" ) // No tr
145 tc. m_bg_type = TabConfig::Image; 158 tc. m_bg_type = TabConfig::Image;
146 159
147 tc. m_bg_image = cfg. readEntry ( "BackgroundImage", "launcher/opie-background" ); 160 tc. m_bg_image = cfg. readEntry ( "BackgroundImage", tc. m_bg_image );
148 tc. m_bg_color = cfg. readEntry ( "BackgroundColor", colorGroup ( ). color ( QColorGroup::Base ). name ( )); 161 tc. m_bg_color = cfg. readEntry ( "BackgroundColor", tc. m_bg_color );
149 tc. m_text_color = cfg. readEntry ( "TextColor", colorGroup ( ). color ( QColorGroup::Text ). name ( )); 162 tc. m_text_color = cfg. readEntry ( "TextColor", tc. m_text_color );
150 QStringList f = cfg. readListEntry ( "Font", ',' ); 163 QStringList f = cfg. readListEntry ( "Font", ',' );
151 if ( f. count ( ) == 4 ) { 164 if ( f. count ( ) == 4 ) {
165 tc. m_font_use = true;
152 tc. m_font_family = f [0]; 166 tc. m_font_family = f [0];
153 tc. m_font_size = f [1]. toInt ( ); 167 tc. m_font_size = f [1]. toInt ( );
154 tc. m_font_weight = f [2]. toInt ( ); 168 tc. m_font_weight = f [2]. toInt ( );
155 tc. m_font_italic = ( f [3]. toInt ( )); 169 tc. m_font_italic = ( f [3]. toInt ( ));
156 } else { 170 }
157 tc. m_font_family = font ( ). family ( );
158 tc. m_font_size = font ( ). pointSize ( );
159 tc. m_font_weight = 50;
160 tc. m_font_italic = false;
161 }
162
163 m_tabs [*it] = tc; 171 m_tabs [*it] = tc;
164 } 172 }
165 173
166 // if all tabs have the same config, then initialize the GLOBALID tab to these values 174 // if all tabs have the same config, then initialize the GLOBALID tab to these values
167 175
168 TabConfig *first = 0; 176 TabConfig *first = 0;
@@ -173,14 +181,16 @@ void TabsSettings::readTabSettings ( Config &cfg )
173 continue; 181 continue;
174 else if ( !first ) 182 else if ( !first )
175 first = &m_tabs [*it]; 183 first = &m_tabs [*it];
176 else 184 else
177 same &= ( *first == m_tabs [*it] ); 185 same &= ( *first == m_tabs [*it] );
178 } 186 }
179 if ( same ) 187 if ( same ) {
180 m_tabs [GLOBALID] = *first; 188 m_tabs [GLOBALID] = *first;
189 m_tabs [GLOBALID]. m_changed = true;
190 }
181} 191}
182 192
183 193
184void TabsSettings::accept ( ) 194void TabsSettings::accept ( )
185{ 195{
186 Config cfg ( "Launcher" ); 196 Config cfg ( "Launcher" );
@@ -188,13 +198,13 @@ void TabsSettings::accept ( )
188 // Launcher Tab 198 // Launcher Tab
189 QString grp ( "Tab %1" ); // No tr 199 QString grp ( "Tab %1" ); // No tr
190 200
191 for ( QStringList::Iterator it = m_ids. begin ( ); it != m_ids. end ( ); ++it ) { 201 for ( QStringList::Iterator it = m_ids. begin ( ); it != m_ids. end ( ); ++it ) {
192 TabConfig &tc = m_tabs [*it]; 202 TabConfig &tc = m_tabs [*it];
193 203
194 if ( !tc. m_changed || ( *it == GLOBALID )) 204 if ( !tc. m_changed )
195 continue; 205 continue;
196 206
197 cfg. setGroup ( grp. arg ( *it )); 207 cfg. setGroup ( grp. arg ( *it ));
198 switch ( tc. m_view ) { 208 switch ( tc. m_view ) {
199 case TabConfig::Icon: 209 case TabConfig::Icon:
200 cfg.writeEntry ( "View", "Icon" ); 210 cfg.writeEntry ( "View", "Icon" );
@@ -208,14 +218,19 @@ void TabsSettings::accept ( )
208 e << *it << tc. m_view; 218 e << *it << tc. m_view;
209 219
210 cfg. writeEntry ( "BackgroundImage", tc. m_bg_image ); 220 cfg. writeEntry ( "BackgroundImage", tc. m_bg_image );
211 cfg. writeEntry ( "BackgroundColor", tc. m_bg_color ); 221 cfg. writeEntry ( "BackgroundColor", tc. m_bg_color );
212 cfg. writeEntry ( "TextColor", tc. m_text_color ); 222 cfg. writeEntry ( "TextColor", tc. m_text_color );
213 223
214 QString f = tc. m_font_family + "," + QString::number ( tc. m_font_size ) + "," + QString::number ( tc. m_font_weight ) + "," + ( tc. m_font_italic ? "1" : "0" ); 224 if ( tc. m_font_use ) {
215 cfg. writeEntry ( "Font", f ); 225 QString f = tc. m_font_family + "," + QString::number ( tc. m_font_size ) + "," + QString::number ( tc. m_font_weight ) + "," + ( tc. m_font_italic ? "1" : "0" );
226 cfg. writeEntry ( "Font", f );
227 }
228 else
229 cfg. removeEntry ( "Font" );
230
216 QCopEnvelope be ( "QPE/Launcher", "setTabBackground(QString,int,QString)" ); 231 QCopEnvelope be ( "QPE/Launcher", "setTabBackground(QString,int,QString)" );
217 232
218 switch ( tc. m_bg_type ) { 233 switch ( tc. m_bg_type ) {
219 case TabConfig::Ruled: 234 case TabConfig::Ruled:
220 cfg.writeEntry( "BackgroundType", "Ruled" ); 235 cfg.writeEntry( "BackgroundType", "Ruled" );
221 be << *it << tc. m_bg_type << QString(""); 236 be << *it << tc. m_bg_type << QString("");
@@ -231,15 +246,17 @@ void TabsSettings::accept ( )
231 } 246 }
232 247
233 QCopEnvelope te( "QPE/Launcher", "setTextColor(QString,QString)" ); 248 QCopEnvelope te( "QPE/Launcher", "setTextColor(QString,QString)" );
234 te << *it << tc. m_text_color; 249 te << *it << tc. m_text_color;
235 250
236 QCopEnvelope fe ( "QPE/Launcher", "setFont(QString,QString,int,int,int)" ); 251 QCopEnvelope fe ( "QPE/Launcher", "setFont(QString,QString,int,int,int)" );
237 fe << *it << tc. m_font_family; 252 fe << *it;
253 fe << ( tc. m_font_use ? tc. m_font_family : QString::null );
238 fe << tc. m_font_size; 254 fe << tc. m_font_size;
239 fe << tc. m_font_weight << ( tc. m_font_italic ? 1 : 0 ); 255 fe << tc. m_font_weight;
256 fe << ( tc. m_font_italic ? 1 : 0 );
240 257
241 tc. m_changed = false; 258 tc. m_changed = false;
242 } 259 }
243 cfg. setGroup ( "GUI" ); 260 cfg. setGroup ( "GUI" );
244 QString busytype = QString ( m_busyblink-> isChecked ( ) ? "blink" : "" ); 261 QString busytype = QString ( m_busyblink-> isChecked ( ) ? "blink" : "" );
245 262
diff --git a/core/settings/launcher/taskbarsettings.cpp b/core/settings/launcher/taskbarsettings.cpp
index 5bc5ad2..b3e302a 100644
--- a/core/settings/launcher/taskbarsettings.cpp
+++ b/core/settings/launcher/taskbarsettings.cpp
@@ -132,12 +132,13 @@ void TaskbarSettings::appletChanged()
132} 132}
133 133
134void TaskbarSettings::accept ( ) 134void TaskbarSettings::accept ( )
135{ 135{
136 Config cfg ( "Taskbar" ); 136 Config cfg ( "Taskbar" );
137 cfg. setGroup ( "Applets" ); 137 cfg. setGroup ( "Applets" );
138
138 if ( m_applets_changed ) { 139 if ( m_applets_changed ) {
139 QStringList exclude; 140 QStringList exclude;
140 QMap <QString, QCheckListItem *>::Iterator it; 141 QMap <QString, QCheckListItem *>::Iterator it;
141 for ( it = m_applets. begin ( ); it != m_applets. end ( ); ++it ) { 142 for ( it = m_applets. begin ( ); it != m_applets. end ( ); ++it ) {
142 if ( !(*it)-> isOn ( )) 143 if ( !(*it)-> isOn ( ))
143 exclude << it. key ( ); 144 exclude << it. key ( );
@@ -145,11 +146,11 @@ void TaskbarSettings::accept ( )
145 cfg. writeEntry ( "ExcludeApplets", exclude, ',' ); 146 cfg. writeEntry ( "ExcludeApplets", exclude, ',' );
146 } 147 }
147 cfg. writeEntry ( "SafeMode", false ); 148 cfg. writeEntry ( "SafeMode", false );
148 cfg. write ( ); 149 cfg. write ( );
149 150
150 if ( m_applets_changed ) { 151 if ( m_applets_changed ) {
151 QCopEnvelope ( "QPE/TaskBar", "reloadApplets()" ); 152 QCopEnvelope e ( "QPE/TaskBar", "reloadApplets()" );
152 m_applets_changed = false; 153 m_applets_changed = false;
153 } 154 }
154} 155}
155 156