summaryrefslogtreecommitdiff
path: root/noncore
Unidiff
Diffstat (limited to 'noncore') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/styles/theme/othemebase.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/noncore/styles/theme/othemebase.cpp b/noncore/styles/theme/othemebase.cpp
index 21d16f2..58005b5 100644
--- a/noncore/styles/theme/othemebase.cpp
+++ b/noncore/styles/theme/othemebase.cpp
@@ -31,12 +31,13 @@
31#include <qbitmap.h> 31#include <qbitmap.h>
32#include <stdlib.h> 32#include <stdlib.h>
33#include <qstringlist.h> 33#include <qstringlist.h>
34 34
35#include <stdio.h> 35#include <stdio.h>
36 36
37
37template class QIntCache<OThemePixmap> 38template class QIntCache<OThemePixmap>
38; 39;
39 40
40static const char *widgetEntries[] = 41static const char *widgetEntries[] =
41 { // unsunken widgets (see header) 42 { // unsunken widgets (see header)
42 "PushButton", "ComboBox", "HSBarSlider", "VSBarSlider", "Bevel", "ToolButton", 43 "PushButton", "ComboBox", "HSBarSlider", "VSBarSlider", "Bevel", "ToolButton",
@@ -270,32 +271,32 @@ void OThemeBase::readConfig( Qt::GUIStyle /*style*/ )
270 cfg. setGroup ( "Appearance" ); 271 cfg. setGroup ( "Appearance" );
271 272
272 configFileName = cfg. readEntry ( "Theme", "default" ); 273 configFileName = cfg. readEntry ( "Theme", "default" );
273 } 274 }
274 MyConfig config( configFilePath + "/themes/" + configFileName + ".themerc" , Config::File ); 275 MyConfig config( configFilePath + "/themes/" + configFileName + ".themerc" , Config::File );
275 276
276 printf ( "Opened config file: %s\n", ( configFilePath + "/themes/" + configFileName + ".themerc" ). ascii()); 277 //printf ( "Opened config file: %s\n", ( configFilePath + "/themes/" + configFileName + ".themerc" ). ascii());
277 278
278 // Are we initalized? 279 // Are we initalized?
279 for ( i = 0; i < INHERIT_ITEMS; ++i ) { 280 for ( i = 0; i < INHERIT_ITEMS; ++i ) {
280 applyResourceGroup( &config, i, copyfrom, pixnames, brdnames ); 281 applyResourceGroup( &config, i, copyfrom, pixnames, brdnames );
281 printf ( "%d [%s]: copy=%s, pix=%s, brd=%s\n", i, widgetEntries [i], copyfrom [i].latin1(), pixnames[i].latin1(),brdnames[i].latin1() ); 282 // printf ( "%d [%s]: copy=%s, pix=%s, brd=%s\n", i, widgetEntries [i], copyfrom [i].latin1(), pixnames[i].latin1(),brdnames[i].latin1() );
282 } 283 }
283 for ( ; i < INHERIT_ITEMS*2; ++i ) { 284 for ( ; i < INHERIT_ITEMS*2; ++i ) {
284 if ( config.hasGroup( QString( widgetEntries[ i ] ) ) ) { 285 if ( config.hasGroup( QString( widgetEntries[ i ] ) ) ) {
285 applyResourceGroup( &config, i, copyfrom, pixnames, brdnames ); 286 applyResourceGroup( &config, i, copyfrom, pixnames, brdnames );
286 printf ( "%d [%s]: copy=%s, pix=%s, brd=%s\n", i, widgetEntries [i], copyfrom [i].latin1(), pixnames[i].latin1(),brdnames[i].latin1() ); 287 // printf ( "%d [%s]: copy=%s, pix=%s, brd=%s\n", i, widgetEntries [i], copyfrom [i].latin1(), pixnames[i].latin1(),brdnames[i].latin1() );
287 } 288 }
288 else { 289 else {
289 copyfrom [ i ] = widgetEntries[ i - INHERIT_ITEMS ]; 290 copyfrom [ i ] = widgetEntries[ i - INHERIT_ITEMS ];
290 printf ( "%d [%s]: copy=%s\n", i, widgetEntries [i], copyfrom [i].latin1()); 291 // printf ( "%d [%s]: copy=%s\n", i, widgetEntries [i], copyfrom [i].latin1());
291 } 292 }
292 } 293 }
293 for ( ; i < WIDGETS; ++i ) { 294 for ( ; i < WIDGETS; ++i ) {
294 applyResourceGroup( &config, i, copyfrom, pixnames, brdnames ); 295 applyResourceGroup( &config, i, copyfrom, pixnames, brdnames );
295 printf ( "%d [%s]: copy=%s, pix=%s, brd=%s\n", i, widgetEntries [i], copyfrom [i].latin1(), pixnames[i].latin1(),brdnames[i].latin1() ); 296 // printf ( "%d [%s]: copy=%s, pix=%s, brd=%s\n", i, widgetEntries [i], copyfrom [i].latin1(), pixnames[i].latin1(),brdnames[i].latin1() );
296 } 297 }
297 applyMiscResourceGroup( &config ); 298 applyMiscResourceGroup( &config );
298 299
299 // initalize defaults that may not be read 300 // initalize defaults that may not be read
300 for ( i = 0; i < WIDGETS; ++i ) 301 for ( i = 0; i < WIDGETS; ++i )
301 loaded[ i ] = false; 302 loaded[ i ] = false;
@@ -303,13 +304,13 @@ void OThemeBase::readConfig( Qt::GUIStyle /*style*/ )
303 aTabLine = iTabLine = true; 304 aTabLine = iTabLine = true;
304 roundedButton = roundedCombo = roundedSlider = focus3D = false; 305 roundedButton = roundedCombo = roundedSlider = focus3D = false;
305 splitterWidth = 10; 306 splitterWidth = 10;
306 307
307 for ( i = 0; i < WIDGETS; ++i ) { 308 for ( i = 0; i < WIDGETS; ++i ) {
308 readResourceGroup( i, copyfrom, pixnames, brdnames, loaded ); 309 readResourceGroup( i, copyfrom, pixnames, brdnames, loaded );
309 printf ( "%d [%s]: copy=%s, pix=%s, brd=%s, colors=%s\n", i, widgetEntries [i], copyfrom [i].latin1(), pixnames[i].latin1(),brdnames[i].latin1(), (colors[i]?colors[i]->background().name().latin1():"<none)" )); 310 // printf ( "%d [%s]: copy=%s, pix=%s, brd=%s, colors=%s\n", i, widgetEntries [i], copyfrom [i].latin1(), pixnames[i].latin1(),brdnames[i].latin1(), (colors[i]?colors[i]->background().name().latin1():"<none)" ));
310 } 311 }
311 312
312 // misc items 313 // misc items
313 readMiscResourceGroup(); 314 readMiscResourceGroup();
314 315
315 // Handle preblend items 316 // Handle preblend items