summaryrefslogtreecommitdiff
path: root/noncore/styles/theme/themeset.cpp
Unidiff
Diffstat (limited to 'noncore/styles/theme/themeset.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/styles/theme/themeset.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/styles/theme/themeset.cpp b/noncore/styles/theme/themeset.cpp
index d4005bc..3205106 100644
--- a/noncore/styles/theme/themeset.cpp
+++ b/noncore/styles/theme/themeset.cpp
@@ -65,49 +65,49 @@ ThemeSettings::ThemeSettings ( QWidget* parent, const char *name, WFlags fl )
65 setCaption ( tr( "Theme Style" ) ); 65 setCaption ( tr( "Theme Style" ) );
66 66
67 Config config ( "qpe" ); 67 Config config ( "qpe" );
68 config. setGroup ( "Appearance" ); 68 config. setGroup ( "Appearance" );
69 69
70 QString active = config. readEntry ( "Theme", "default" ); 70 QString active = config. readEntry ( "Theme", "default" );
71 71
72 QVBoxLayout *vbox = new QVBoxLayout ( this ); 72 QVBoxLayout *vbox = new QVBoxLayout ( this );
73 vbox-> setSpacing ( 3 ); 73 vbox-> setSpacing ( 3 );
74 vbox-> setMargin ( 6 ); 74 vbox-> setMargin ( 6 );
75 75
76 vbox-> addWidget ( new QLabel ( tr( "Select the theme to be used" ), this )); 76 vbox-> addWidget ( new QLabel ( tr( "Select the theme to be used" ), this ));
77 77
78 m_list = new QListView ( this ); 78 m_list = new QListView ( this );
79 m_list-> addColumn ( tr( "Name" )); 79 m_list-> addColumn ( tr( "Name" ));
80 m_list-> addColumn ( tr( "Description" )); 80 m_list-> addColumn ( tr( "Description" ));
81 m_list-> setSelectionMode ( QListView::Single ); 81 m_list-> setSelectionMode ( QListView::Single );
82 m_list-> setAllColumnsShowFocus ( true ); 82 m_list-> setAllColumnsShowFocus ( true );
83 m_list-> setSorting ( -1 ); 83 m_list-> setSorting ( -1 );
84 vbox-> addWidget ( m_list, 10 ); 84 vbox-> addWidget ( m_list, 10 );
85 85
86 QListViewItem *item = new MyItem ( m_list, 0, tr( "[No theme]" ), "", "" ); 86 QListViewItem *item = new MyItem ( m_list, 0, tr( "[No theme]" ), "", "" );
87 m_list-> setSelected ( item, true ); 87 m_list-> setSelected ( item, true );
88 88
89 QString path = QPEApplication::qpeDir() + "/plugins/styles/themes"; 89 QString path = QPEApplication::qpeDir() + "plugins/styles/themes";
90 QStringList list = QDir ( path, "*.themerc" ). entryList ( ); 90 QStringList list = QDir ( path, "*.themerc" ). entryList ( );
91 91
92 for ( QStringList::Iterator it = list. begin(); it != list. end ( ); ++it ) { 92 for ( QStringList::Iterator it = list. begin(); it != list. end ( ); ++it ) {
93 MyConfig cfg ( path + "/" + *it, Config::File ); 93 MyConfig cfg ( path + "/" + *it, Config::File );
94 94
95 if ( cfg. hasGroup ( "Misc" )) { 95 if ( cfg. hasGroup ( "Misc" )) {
96 cfg. setGroup ( "Misc" ); 96 cfg. setGroup ( "Misc" );
97 97
98 QString name = cfg. readEntry ( "Name" ); 98 QString name = cfg. readEntry ( "Name" );
99 QString comm = cfg. readEntry ( "Comment" ); 99 QString comm = cfg. readEntry ( "Comment" );
100 100
101 if ( !name. isEmpty ( )) { 101 if ( !name. isEmpty ( )) {
102 QString fname = (*it). left ((*it). length ( ) - 8 ); 102 QString fname = (*it). left ((*it). length ( ) - 8 );
103 103
104 item = new MyItem ( m_list, item, name, comm, fname ); 104 item = new MyItem ( m_list, item, name, comm, fname );
105 if ( active == fname ) { 105 if ( active == fname ) {
106 m_list-> setSelected ( item, true ); 106 m_list-> setSelected ( item, true );
107 } 107 }
108 } 108 }
109 } 109 }
110 } 110 }
111} 111}
112 112
113bool ThemeSettings::writeConfig ( ) 113bool ThemeSettings::writeConfig ( )