summaryrefslogtreecommitdiff
authordrw <drw>2002-12-16 00:26:32 (UTC)
committer drw <drw>2002-12-16 00:26:32 (UTC)
commite4057ee7fe74c83e2dc44f8b9870f65da60fc4fa (patch) (unidiff)
tree027cebbca343052e970c90e7eed3447e14b58e39
parenta6a23d1c30e395add577eec261ae728f8d783299 (diff)
downloadopie-e4057ee7fe74c83e2dc44f8b9870f65da60fc4fa.zip
opie-e4057ee7fe74c83e2dc44f8b9870f65da60fc4fa.tar.gz
opie-e4057ee7fe74c83e2dc44f8b9870f65da60fc4fa.tar.bz2
QWhatsThis added
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/appearance2/appearance.cpp69
-rw-r--r--noncore/settings/appearance2/editScheme.cpp7
2 files changed, 62 insertions, 14 deletions
diff --git a/noncore/settings/appearance2/appearance.cpp b/noncore/settings/appearance2/appearance.cpp
index f611799..2f3ba74 100644
--- a/noncore/settings/appearance2/appearance.cpp
+++ b/noncore/settings/appearance2/appearance.cpp
@@ -47,11 +47,13 @@
47#include <qlistview.h> 47#include <qlistview.h>
48#include <qheader.h> 48#include <qheader.h>
49#include <qvbox.h> 49#include <qvbox.h>
50#include <qwhatsthis.h>
50 51
51#include <qpe/config.h> 52#include <qpe/config.h>
52#include <qpe/global.h> 53#include <qpe/global.h>
53#include <qpe/resource.h> 54#include <qpe/resource.h>
54#include <qpe/qpeapplication.h> 55#include <qpe/qpeapplication.h>
56#include <qpe/qpemessagebox.h>
55#include <qpe/qcopenvelope_qws.h> 57#include <qpe/qcopenvelope_qws.h>
56#include <qpe/qpestyle.h> 58#include <qpe/qpestyle.h>
57#include <qpe/lightstyle.h> 59#include <qpe/lightstyle.h>
@@ -115,10 +117,12 @@ QWidget *Appearance::createStyleTab ( QWidget *parent, Config &cfg )
115 117
116 m_style_list = new QListBox( tab, "m_style_list" ); 118 m_style_list = new QListBox( tab, "m_style_list" );
117 vertLayout->addWidget( m_style_list ); 119 vertLayout->addWidget( m_style_list );
120 QWhatsThis::add( m_style_list, tr( "Styles control the way items such as buttons and scroll bars appear in all applications.\n\nClick here to select an available style." ) );
118 121
119 m_style_settings = new QPushButton ( tr( "Settings..." ), tab ); 122 m_style_settings = new QPushButton ( tr( "Settings..." ), tab );
120 connect ( m_style_settings, SIGNAL( clicked ( )), this, SLOT( styleSettingsClicked ( ))); 123 connect ( m_style_settings, SIGNAL( clicked ( )), this, SLOT( styleSettingsClicked ( )));
121 vertLayout-> addWidget ( m_style_settings ); 124 vertLayout-> addWidget ( m_style_settings );
125 QWhatsThis::add( m_style_settings, tr( "Click here to configure the currently selected style.\n\nNote: This option is not available for all styles." ) );
122 126
123 QString s = cfg. readEntry ( "Style", "Light" ); 127 QString s = cfg. readEntry ( "Style", "Light" );
124 128
@@ -131,11 +135,15 @@ QWidget *Appearance::createStyleTab ( QWidget *parent, Config &cfg )
131 m_style_list-> insertItem ( new StyleListItem ( "QPE", new QPEStyle ( ))); 135 m_style_list-> insertItem ( new StyleListItem ( "QPE", new QPEStyle ( )));
132#endif 136#endif
133 { 137 {
134 QString path = QPEApplication::qpeDir ( ) + "/plugins/styles/"; 138 QString path = QPEApplication::qpeDir ( );
139 path.append( "/plugins/styles/" );
135 QStringList sl = QDir ( path, "lib*.so" ). entryList ( ); 140 QStringList sl = QDir ( path, "lib*.so" ). entryList ( );
136 141
137 for ( QStringList::Iterator it = sl. begin ( ); it != sl. end ( ); ++it ) { 142 for ( QStringList::Iterator it = sl. begin ( ); it != sl. end ( ); ++it ) {
138 QLibrary *lib = new QLibrary ( path + "/" + *it ); 143 QString libstr = path;
144 libstr.append( "/" );
145 libstr.append( *it );
146 QLibrary *lib = new QLibrary ( libstr );
139 StyleInterface *iface; 147 StyleInterface *iface;
140 148
141 if (( lib-> queryInterface ( IID_Style, (QUnknownInterface **) &iface ) == QS_OK ) && iface ) { 149 if (( lib-> queryInterface ( IID_Style, (QUnknownInterface **) &iface ) == QS_OK ) && iface ) {
@@ -165,17 +173,22 @@ QWidget *Appearance::createDecoTab ( QWidget *parent, Config &cfg )
165 173
166 m_deco_list = new QListBox( tab, "m_deco_list" ); 174 m_deco_list = new QListBox( tab, "m_deco_list" );
167 vertLayout->addWidget( m_deco_list ); 175 vertLayout->addWidget( m_deco_list );
176 QWhatsThis::add( m_deco_list, tr( "Window decorations control the way the application title bar and its buttons appear.\n\nClick here to select an available decoration." ) );
168 177
169 QString s = cfg. readEntry ( "Decoration" ); 178 QString s = cfg. readEntry ( "Decoration" );
170 179
171 m_deco_list-> insertItem ( new DecoListItem ( "QPE" )); 180 m_deco_list-> insertItem ( new DecoListItem ( "QPE" ));
172 181
173 { 182 {
174 QString path = QPEApplication::qpeDir() + "/plugins/decorations/"; 183 QString path = QPEApplication::qpeDir();
184 path.append( "/plugins/decorations/" );
175 QStringList sl = QDir ( path, "lib*.so" ). entryList ( ); 185 QStringList sl = QDir ( path, "lib*.so" ). entryList ( );
176 186
177 for ( QStringList::Iterator it = sl. begin ( ); it != sl. end ( ); ++it ) { 187 for ( QStringList::Iterator it = sl. begin ( ); it != sl. end ( ); ++it ) {
178 QLibrary *lib = new QLibrary ( path + "/" + *it ); 188 QString libstr = path;
189 libstr.append( "/" );
190 libstr.append( *it );
191 QLibrary *lib = new QLibrary ( libstr );
179 WindowDecorationInterface *iface; 192 WindowDecorationInterface *iface;
180 193
181 if ( lib-> queryInterface ( IID_WindowDecoration, (QUnknownInterface **) &iface ) == QS_OK ) { 194 if ( lib-> queryInterface ( IID_WindowDecoration, (QUnknownInterface **) &iface ) == QS_OK ) {
@@ -208,6 +221,7 @@ QWidget *Appearance::createFontTab ( QWidget *parent, Config &cfg )
208 221
209 m_fontselect = new OFontSelector ( false, parent, "FontTab" ); 222 m_fontselect = new OFontSelector ( false, parent, "FontTab" );
210 m_fontselect-> setSelectedFont ( familyStr, styleStr, size ); 223 m_fontselect-> setSelectedFont ( familyStr, styleStr, size );
224 QWhatsThis::add( m_fontselect, tr( "Select the desired name, style and size of the default font applications will use." ) );
211 225
212 connect( m_fontselect, SIGNAL( fontSelected ( const QFont & )), 226 connect( m_fontselect, SIGNAL( fontSelected ( const QFont & )),
213 this, SLOT( fontClicked ( const QFont & ))); 227 this, SLOT( fontClicked ( const QFont & )));
@@ -224,15 +238,19 @@ QWidget *Appearance::createColorTab ( QWidget *parent, Config &cfg )
224 m_color_list = new QListBox ( tab ); 238 m_color_list = new QListBox ( tab );
225 gridLayout->addMultiCellWidget ( m_color_list, 0, 3, 0, 0 ); 239 gridLayout->addMultiCellWidget ( m_color_list, 0, 3, 0, 0 );
226 connect( m_color_list, SIGNAL( highlighted( int ) ), this, SLOT( colorClicked( int ) ) ); 240 connect( m_color_list, SIGNAL( highlighted( int ) ), this, SLOT( colorClicked( int ) ) );
241 QWhatsThis::add( m_color_list, tr( "Color schemes are a collection of colors which are used for various parts of the display.\n\nClick here to select an available scheme." ) );
227 242
228 m_color_list-> insertItem ( new ColorListItem ( tr( "Current scheme" ), cfg )); 243 m_color_list-> insertItem ( new ColorListItem ( tr( "Current scheme" ), cfg ));
229 244
230 QString path = QPEApplication::qpeDir ( ) + "/etc/colors/"; 245 QString path = QPEApplication::qpeDir ( );
246 path.append( "/etc/colors/" );
231 QStringList sl = QDir ( path ). entryList ( "*.scheme" ); 247 QStringList sl = QDir ( path ). entryList ( "*.scheme" );
232 248
233 for ( QStringList::Iterator it = sl. begin ( ); it != sl. end ( ); ++it ) { 249 for ( QStringList::Iterator it = sl. begin ( ); it != sl. end ( ); ++it ) {
234 QString name = (*it). left ((*it). find ( ".scheme" )); 250 QString name = (*it). left ((*it). find ( ".scheme" ));
235 Config config ( path + *it, Config::File ); 251 QString pathstr = path;
252 pathstr.append( *it );
253 Config config ( pathstr, Config::File );
236 config. setGroup ( "Colors" ); 254 config. setGroup ( "Colors" );
237 255
238 m_color_list-> insertItem ( new ColorListItem ( name, config )); 256 m_color_list-> insertItem ( new ColorListItem ( name, config ));
@@ -244,16 +262,19 @@ QWidget *Appearance::createColorTab ( QWidget *parent, Config &cfg )
244 tempButton->setText( tr( "Edit..." ) ); 262 tempButton->setText( tr( "Edit..." ) );
245 connect( tempButton, SIGNAL( clicked() ), this, SLOT( editSchemeClicked() ) ); 263 connect( tempButton, SIGNAL( clicked() ), this, SLOT( editSchemeClicked() ) );
246 gridLayout->addWidget( tempButton, 0, 1 ); 264 gridLayout->addWidget( tempButton, 0, 1 );
265 QWhatsThis::add( tempButton, tr( "Click here to change the colors in the current color scheme." ) );
247 266
248 tempButton = new QPushButton( tab, "deleteSchemeButton" ); 267 tempButton = new QPushButton( tab, "deleteSchemeButton" );
249 tempButton->setText( tr( "Delete" ) ); 268 tempButton->setText( tr( "Delete" ) );
250 connect( tempButton, SIGNAL( clicked() ), this, SLOT( deleteSchemeClicked() ) ); 269 connect( tempButton, SIGNAL( clicked() ), this, SLOT( deleteSchemeClicked() ) );
251 gridLayout->addWidget( tempButton, 1, 1 ); 270 gridLayout->addWidget( tempButton, 1, 1 );
271 QWhatsThis::add( tempButton, tr( "Click here to delete the color scheme selected in the list to the left." ) );
252 272
253 tempButton = new QPushButton( tab, "saveSchemeButton" ); 273 tempButton = new QPushButton( tab, "saveSchemeButton" );
254 tempButton->setText( tr( "Save" ) ); 274 tempButton->setText( tr( "Save" ) );
255 connect( tempButton, SIGNAL( clicked() ), this, SLOT( saveSchemeClicked() ) ); 275 connect( tempButton, SIGNAL( clicked() ), this, SLOT( saveSchemeClicked() ) );
256 gridLayout->addWidget( tempButton, 2, 1 ); 276 gridLayout->addWidget( tempButton, 2, 1 );
277 QWhatsThis::add( tempButton, tr( "Click here to name and save the current color scheme." ) );
257 278
258 return tab; 279 return tab;
259} 280}
@@ -268,10 +289,12 @@ QWidget *Appearance::createAdvancedTab ( QWidget *parent, Config &cfg )
268 m_force = new QCheckBox ( tr( "Force styling for all applications." ), tab ); 289 m_force = new QCheckBox ( tr( "Force styling for all applications." ), tab );
269 m_force-> setChecked ( cfg. readBoolEntry ( "ForceStyle" )); 290 m_force-> setChecked ( cfg. readBoolEntry ( "ForceStyle" ));
270 lay-> addMultiCellWidget ( m_force, 0, 0, 0, 1 ); 291 lay-> addMultiCellWidget ( m_force, 0, 0, 0, 1 );
292 QWhatsThis::add( m_force, tr( "Click here to allow all applications to use global appearance settings." ) );
271 293
272 QLabel *l = new QLabel ( tab ); 294 QLabel *l = new QLabel ( tab );
273 l-> setText ( QString ( "<p>%1</p>" ). arg ( tr( "Disable styling for these applications ( <b>*</b> can be used as a wildcard):" ))); 295 l-> setText ( QString ( "<p>%1</p>" ). arg ( tr( "Disable styling for these applications ( <b>*</b> can be used as a wildcard):" )));
274 lay-> addMultiCellWidget ( l, 1, 1, 0, 1 ); 296 lay-> addMultiCellWidget ( l, 1, 1, 0, 1 );
297 QWhatsThis::add( l, tr( "If some applications do not display correctly with the global appearance settings, certain features can be turned off for that application.\n\nThis area allows you to select an application and which settings you wish to disable." ) );
275 298
276 m_except = new QListView ( tab ); 299 m_except = new QListView ( tab );
277 m_except-> addColumn ( Resource::loadIconSet ( "appearance/style.png" ), "", 24 ); 300 m_except-> addColumn ( Resource::loadIconSet ( "appearance/style.png" ), "", 24 );
@@ -288,6 +311,7 @@ QWidget *Appearance::createAdvancedTab ( QWidget *parent, Config &cfg )
288 m_except-> header ( )-> setMovingEnabled ( false ); 311 m_except-> header ( )-> setMovingEnabled ( false );
289 m_except-> setSorting ( -1 ); 312 m_except-> setSorting ( -1 );
290 lay-> addMultiCellWidget ( m_except, 2, 6, 0, 0 ); 313 lay-> addMultiCellWidget ( m_except, 2, 6, 0, 0 );
314 QWhatsThis::add( m_except, tr( "If some applications do not display correctly with the global appearance settings, certain features can be turned off for that application.\n\nThis area allows you to select an application and which settings you wish to disable." ) );
291 315
292 connect ( m_except, SIGNAL( clicked ( QListViewItem *, const QPoint &, int )), this, SLOT( clickedExcept ( QListViewItem *, const QPoint &, int ))); 316 connect ( m_except, SIGNAL( clicked ( QListViewItem *, const QPoint &, int )), this, SLOT( clickedExcept ( QListViewItem *, const QPoint &, int )));
293 317
@@ -296,24 +320,28 @@ QWidget *Appearance::createAdvancedTab ( QWidget *parent, Config &cfg )
296 tb-> setFocusPolicy ( QWidget::StrongFocus ); 320 tb-> setFocusPolicy ( QWidget::StrongFocus );
297 lay-> addWidget ( tb, 2, 1 ); 321 lay-> addWidget ( tb, 2, 1 );
298 connect ( tb, SIGNAL( clicked ( )), this, SLOT( addExcept ( ))); 322 connect ( tb, SIGNAL( clicked ( )), this, SLOT( addExcept ( )));
323 QWhatsThis::add( tb, tr( "Click here to add an application to the list above." ) );
299 324
300 tb = new QToolButton ( tab ); 325 tb = new QToolButton ( tab );
301 tb-> setIconSet ( Resource::loadIconSet ( "editdelete" )); 326 tb-> setIconSet ( Resource::loadIconSet ( "editdelete" ));
302 tb-> setFocusPolicy ( QWidget::StrongFocus ); 327 tb-> setFocusPolicy ( QWidget::StrongFocus );
303 lay-> addWidget ( tb, 3, 1 ); 328 lay-> addWidget ( tb, 3, 1 );
304 connect ( tb, SIGNAL( clicked ( )), this, SLOT( delExcept ( ))); 329 connect ( tb, SIGNAL( clicked ( )), this, SLOT( delExcept ( )));
330 QWhatsThis::add( tb, tr( "Click here to delete the currently selected application." ) );
305 331
306 tb = new QToolButton ( tab ); 332 tb = new QToolButton ( tab );
307 tb-> setIconSet ( Resource::loadIconSet ( "up" )); 333 tb-> setIconSet ( Resource::loadIconSet ( "up" ));
308 tb-> setFocusPolicy ( QWidget::StrongFocus ); 334 tb-> setFocusPolicy ( QWidget::StrongFocus );
309 lay-> addWidget ( tb, 4, 1 ); 335 lay-> addWidget ( tb, 4, 1 );
310 connect ( tb, SIGNAL( clicked ( )), this, SLOT( upExcept ( ))); 336 connect ( tb, SIGNAL( clicked ( )), this, SLOT( upExcept ( )));
337 QWhatsThis::add( tb, tr( "Click here to move the currently selected application up in the list." ) );
311 338
312 tb = new QToolButton ( tab ); 339 tb = new QToolButton ( tab );
313 tb-> setIconSet ( Resource::loadIconSet ( "down" )); 340 tb-> setIconSet ( Resource::loadIconSet ( "down" ));
314 tb-> setFocusPolicy ( QWidget::StrongFocus ); 341 tb-> setFocusPolicy ( QWidget::StrongFocus );
315 lay-> addWidget ( tb, 5, 1 ); 342 lay-> addWidget ( tb, 5, 1 );
316 connect ( tb, SIGNAL( clicked ( )), this, SLOT( downExcept ( ))); 343 connect ( tb, SIGNAL( clicked ( )), this, SLOT( downExcept ( )));
344 QWhatsThis::add( tb, tr( "Click here to move the currently selected application down in the list." ) );
317 345
318 lay-> setRowStretch ( 6, 10 ); 346 lay-> setRowStretch ( 6, 10 );
319 lay-> setColStretch ( 0, 10 ); 347 lay-> setColStretch ( 0, 10 );
@@ -341,6 +369,8 @@ QWidget *Appearance::createAdvancedTab ( QWidget *parent, Config &cfg )
341 369
342 QLabel* label = new QLabel( tr( "Tab style:" ), tab ); 370 QLabel* label = new QLabel( tr( "Tab style:" ), tab );
343 gridLayout-> addWidget ( label, 0, 0 ); 371 gridLayout-> addWidget ( label, 0, 0 );
372 QWhatsThis::add( label, tr( "Click here to select a desired style for tabbed dialogs (such as this application). The styles available are:\n\n1. Tabs - normal tabs with text labels only\n2. Tabs w/icons - tabs with icons for each tab, text label only appears on current tab\n3. Drop down list - a vertical listing of tabs\n4. Drop down list w/icons - a vertical listing of tabs with icons" ) );
373
344 QButtonGroup* btngrp = new QButtonGroup( tab, "buttongroup" ); 374 QButtonGroup* btngrp = new QButtonGroup( tab, "buttongroup" );
345 btngrp-> hide ( ); 375 btngrp-> hide ( );
346 btngrp-> setExclusive ( true ); 376 btngrp-> setExclusive ( true );
@@ -352,14 +382,17 @@ QWidget *Appearance::createAdvancedTab ( QWidget *parent, Config &cfg )
352 m_tabstyle_list-> insertItem ( tr( "Drop down list w/icons" )); 382 m_tabstyle_list-> insertItem ( tr( "Drop down list w/icons" ));
353 m_tabstyle_list-> setCurrentItem ( style ); 383 m_tabstyle_list-> setCurrentItem ( style );
354 gridLayout-> addMultiCellWidget ( m_tabstyle_list, 0, 0, 1, 2 ); 384 gridLayout-> addMultiCellWidget ( m_tabstyle_list, 0, 0, 1, 2 );
385 QWhatsThis::add( m_tabstyle_list, tr( "Click here to select a desired style for tabbed dialogs (such as this application). The styles available are:\n\n1. Tabs - normal tabs with text labels only\n2. Tabs w/icons - tabs with icons for each tab, text label only appears on current tab\n3. Drop down list - a vertical listing of tabs\n4. Drop down list w/icons - a vertical listing of tabs with icons" ) );
355 386
356 m_tabstyle_top = new QRadioButton( tr( "Top" ), tab, "tabpostop" ); 387 m_tabstyle_top = new QRadioButton( tr( "Top" ), tab, "tabpostop" );
357 btngrp-> insert ( m_tabstyle_top ); 388 btngrp-> insert ( m_tabstyle_top );
358 gridLayout-> addWidget( m_tabstyle_top, 1, 1 ); 389 gridLayout-> addWidget( m_tabstyle_top, 1, 1 );
390 QWhatsThis::add( m_tabstyle_top, tr( "Click here so that tabs appear at the top of the window." ) );
359 391
360 m_tabstyle_bottom = new QRadioButton( tr( "Bottom" ), tab, "tabposbottom" ); 392 m_tabstyle_bottom = new QRadioButton( tr( "Bottom" ), tab, "tabposbottom" );
361 btngrp-> insert ( m_tabstyle_bottom ); 393 btngrp-> insert ( m_tabstyle_bottom );
362 gridLayout-> addWidget( m_tabstyle_bottom, 1, 2 ); 394 gridLayout-> addWidget( m_tabstyle_bottom, 1, 2 );
395 QWhatsThis::add( m_tabstyle_bottom, tr( "Click here so that tabs appear at the bottom of the window." ) );
363 396
364 m_tabstyle_top-> setChecked ( tabtop ); 397 m_tabstyle_top-> setChecked ( tabtop );
365 m_tabstyle_bottom-> setChecked ( !tabtop ); 398 m_tabstyle_bottom-> setChecked ( !tabtop );
@@ -372,7 +405,7 @@ QWidget *Appearance::createAdvancedTab ( QWidget *parent, Config &cfg )
372 405
373 406
374Appearance::Appearance( QWidget* parent, const char* name, WFlags ) 407Appearance::Appearance( QWidget* parent, const char* name, WFlags )
375 : QDialog ( parent, name, true ) 408 : QDialog ( parent, name, true, WStyle_ContextHelp )
376{ 409{
377 setCaption( tr( "Appearance" ) ); 410 setCaption( tr( "Appearance" ) );
378 411
@@ -383,6 +416,7 @@ Appearance::Appearance( QWidget* parent, const char* name, WFlags )
383 416
384 m_sample = new SampleWindow ( this ); 417 m_sample = new SampleWindow ( this );
385 m_sample-> setDecoration ( new DefaultWindowDecoration ( )); 418 m_sample-> setDecoration ( new DefaultWindowDecoration ( ));
419 QWhatsThis::add( m_sample, tr( "This is a preview window. Look here to see your new appearance as options are changed." ) );
386 420
387 OTabWidget* tw = new OTabWidget ( this, "tabwidget", OTabWidget::Global, OTabWidget::Bottom ); 421 OTabWidget* tw = new OTabWidget ( this, "tabwidget", OTabWidget::Global, OTabWidget::Bottom );
388 QWidget *styletab; 422 QWidget *styletab;
@@ -460,12 +494,15 @@ void Appearance::accept ( )
460 m_except-> setFocus ( ); // if the focus was on the embedded line-edit, we have to move it away first, so the contents are updated 494 m_except-> setFocus ( ); // if the focus was on the embedded line-edit, we have to move it away first, so the contents are updated
461 495
462 QStringList sl; 496 QStringList sl;
497 QString exceptstr;
463 for ( ExceptListItem *it = (ExceptListItem *) m_except-> firstChild ( ); it; it = (ExceptListItem *) it-> nextSibling ( )) { 498 for ( ExceptListItem *it = (ExceptListItem *) m_except-> firstChild ( ); it; it = (ExceptListItem *) it-> nextSibling ( )) {
464 int fl = 0; 499 int fl = 0;
465 fl |= ( it-> noStyle ( ) ? 0x01 : 0 ); 500 fl |= ( it-> noStyle ( ) ? 0x01 : 0 );
466 fl |= ( it-> noFont ( ) ? 0x02 : 0 ); 501 fl |= ( it-> noFont ( ) ? 0x02 : 0 );
467 fl |= ( it-> noDeco ( ) ? 0x04 : 0 ); 502 fl |= ( it-> noDeco ( ) ? 0x04 : 0 );
468 sl << ( QString::number ( fl, 32 ) + it-> pattern ( )); 503 exceptstr = QString::number ( fl, 32 );
504 exceptstr.append( it-> pattern ( ));
505 sl << exceptstr;
469 } 506 }
470 config. writeEntry ( "NoStyle", sl, ';' ); 507 config. writeEntry ( "NoStyle", sl, ';' );
471 config. writeEntry ( "ForceStyle", m_force-> isChecked ( )); 508 config. writeEntry ( "ForceStyle", m_force-> isChecked ( ));
@@ -610,7 +647,11 @@ void Appearance::saveSchemeClicked()
610 647
611 if ( d-> exec ( ) == QDialog::Accepted ) { 648 if ( d-> exec ( ) == QDialog::Accepted ) {
612 QString schemename = ed-> text ( ); 649 QString schemename = ed-> text ( );
613 QFile file ( QPEApplication::qpeDir() + "/etc/colors/" + schemename + ".scheme" ); 650 QString filestr = QPEApplication::qpeDir();
651 filestr.append( "/etc/colors/" );
652 filestr.append( schemename );
653 filestr.append( ".scheme" );
654 QFile file ( filestr );
614 if ( !file. exists ( )) 655 if ( !file. exists ( ))
615 { 656 {
616 QPalette p = item-> palette ( ); 657 QPalette p = item-> palette ( );
@@ -641,9 +682,13 @@ void Appearance::deleteSchemeClicked()
641 682
642 if ( m_color_list-> currentItem ( ) > 0 ) 683 if ( m_color_list-> currentItem ( ) > 0 )
643 { 684 {
644 if ( QMessageBox::warning ( this, tr( "Delete scheme" ), tr( "Do you really want to delete\n" ) + item-> text ( ) + "?", 685 if ( QPEMessageBox::confirmDelete ( this, tr( "Delete scheme" ), item-> text ( ) ) )
645 tr( "Yes" ), tr( "No" ), 0, 0, 1 ) == 0 ) { 686 {
646 QFile::remove ( QPEApplication::qpeDir ( ) + "/etc/colors/" + item-> text ( ) + ".scheme" ); 687 QString filestr = QPEApplication::qpeDir ( );
688 filestr.append( "/etc/colors/" );
689 filestr.append( item-> text ( ) );
690 filestr.append( ".scheme" );
691 QFile::remove ( filestr );
647 delete item; 692 delete item;
648 } 693 }
649 } 694 }
diff --git a/noncore/settings/appearance2/editScheme.cpp b/noncore/settings/appearance2/editScheme.cpp
index eefeccc..7e5225f 100644
--- a/noncore/settings/appearance2/editScheme.cpp
+++ b/noncore/settings/appearance2/editScheme.cpp
@@ -36,9 +36,10 @@
36#include <qpopupmenu.h> 36#include <qpopupmenu.h>
37#include <qscrollview.h> 37#include <qscrollview.h>
38#include <qtoolbutton.h> 38#include <qtoolbutton.h>
39#include <qwhatsthis.h>
39 40
40EditScheme::EditScheme ( int cnt, const QString *labels, QColor *colors, QWidget* parent, const char* name, bool modal, WFlags fl ) 41EditScheme::EditScheme ( int cnt, const QString *labels, QColor *colors, QWidget* parent, const char* name, bool modal, WFlags )
41 : QDialog ( parent, name, modal, fl ) 42 : QDialog ( parent, name, modal, WStyle_ContextHelp )
42{ 43{
43 setCaption ( tr( "Edit scheme" ) ); 44 setCaption ( tr( "Edit scheme" ) );
44 QGridLayout *layout = new QGridLayout ( this, 0, 0, 4, 4 ); 45 QGridLayout *layout = new QGridLayout ( this, 0, 0, 4, 4 );
@@ -51,9 +52,11 @@ EditScheme::EditScheme ( int cnt, const QString *labels, QColor *colors, QWidget
51 { 52 {
52 QLabel *l = new QLabel ( labels [i], this ); 53 QLabel *l = new QLabel ( labels [i], this );
53 layout-> addWidget ( l, i, 0 ); 54 layout-> addWidget ( l, i, 0 );
55 QWhatsThis::add( l, tr( "Click here to select a color for: " ).arg( labels [i] ) );
54 56
55 m_buttons [i] = new OColorButton ( this, colors [i] ); 57 m_buttons [i] = new OColorButton ( this, colors [i] );
56 layout-> addWidget ( m_buttons [i], i, 1 ); 58 layout-> addWidget ( m_buttons [i], i, 1 );
59 QWhatsThis::add( m_buttons [i], tr( "Click here to select a color for: " ).arg( labels [i] ) );
57 } 60 }
58} 61}
59 62