summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/settings/launcher/tabssettings.cpp52
-rw-r--r--core/settings/launcher/tabssettings.h2
2 files changed, 31 insertions, 23 deletions
diff --git a/core/settings/launcher/tabssettings.cpp b/core/settings/launcher/tabssettings.cpp
index 9d6e8c1..7cd00bd 100644
--- a/core/settings/launcher/tabssettings.cpp
+++ b/core/settings/launcher/tabssettings.cpp
@@ -1,310 +1,318 @@
1/* 1/*
2               =. This file is part of the OPIE Project 2               =. This file is part of the OPIE Project
3             .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> 3             .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org>
4           .>+-= 4           .>+-=
5 _;:,     .>    :=|. This file is free software; you can 5 _;:,     .>    :=|. This file is free software; you can
6.> <`_,   >  .   <= redistribute it and/or modify it under 6.> <`_,   >  .   <= redistribute it and/or modify it under
7:`=1 )Y*s>-.--   : the terms of the GNU General Public 7:`=1 )Y*s>-.--   : the terms of the GNU General Public
8.="- .-=="i,     .._ License as published by the Free Software 8.="- .-=="i,     .._ License as published by the Free Software
9 - .   .-<_>     .<> Foundation; either version 2 of the License, 9 - .   .-<_>     .<> Foundation; either version 2 of the License,
10     ._= =}       : or (at your option) any later version. 10     ._= =}       : or (at your option) any later version.
11    .%`+i>       _;_. 11    .%`+i>       _;_.
12    .i_,=:_.      -<s. This file is distributed in the hope that 12    .i_,=:_.      -<s. This file is distributed in the hope that
13     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY; 13     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
14    : ..    .:,     . . . without even the implied warranty of 14    : ..    .:,     . . . without even the implied warranty of
15    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A 15    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
16  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU General 16  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU General
17..}^=.=       =       ; Public License for more details. 17..}^=.=       =       ; Public License for more details.
18++=   -.     .`     .: 18++=   -.     .`     .:
19 :     =  ...= . :.=- You should have received a copy of the GNU 19 :     =  ...= . :.=- You should have received a copy of the GNU
20 -.   .:....=;==+<; General Public License along with this file; 20 -.   .:....=;==+<; General Public License along with this file;
21  -_. . .   )=.  = see the file COPYING. If not, write to the 21  -_. . .   )=.  = see the file COPYING. If not, write to the
22    --        :-=` Free Software Foundation, Inc., 22    --        :-=` Free Software Foundation, Inc.,
23 59 Temple Place - Suite 330, 23 59 Temple Place - Suite 330,
24 Boston, MA 02111-1307, USA. 24 Boston, MA 02111-1307, USA.
25 25
26*/ 26*/
27 27
28#include "tabssettings.h" 28#include "tabssettings.h"
29 29
30#include <qpe/qpeapplication.h> 30#include <qpe/qpeapplication.h>
31#include <qpe/resource.h> 31#include <qpe/resource.h>
32#include <qpe/applnk.h> 32#include <qpe/applnk.h>
33#include <qpe/mimetype.h> 33#include <qpe/mimetype.h>
34#include <qpe/qcopenvelope_qws.h> 34#include <qpe/qcopenvelope_qws.h>
35#include <qpe/config.h> 35#include <qpe/config.h>
36 36
37#include <qlistbox.h> 37#include <qlistbox.h>
38#include <qpushbutton.h> 38#include <qpushbutton.h>
39#include <qlayout.h> 39#include <qlayout.h>
40#include <qlabel.h> 40#include <qlabel.h>
41#include <qwhatsthis.h> 41#include <qwhatsthis.h>
42#include <qcheckbox.h> 42#include <qcheckbox.h>
43 43
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 ".global." 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 );
57 57
58 QLabel *l = new QLabel ( tr( "Launcher Tabs:" ), this ); 58 QLabel *l = new QLabel ( tr( "Launcher Tabs:" ), this );
59 lay-> addMultiCellWidget ( l, 0, 0, 0, 1 ); 59 lay-> addMultiCellWidget ( l, 0, 0, 0, 1 );
60 60
61 m_list = new QListBox ( this ); 61 m_list = new QListBox ( this );
62 lay-> addMultiCellWidget ( m_list, 1, 4, 0, 0 ); 62 lay-> addMultiCellWidget ( m_list, 1, 4, 0, 0 );
63 63
64 QWhatsThis::add ( m_list, tr( "foobar" )); 64 QWhatsThis::add ( m_list, tr( "foobar" ));
65 65
66 QPushButton *p1, *p2, *p3; 66 QPushButton *p1, *p2, *p3;
67 p1 = new QPushButton ( tr( "New" ), this ); 67 p1 = new QPushButton ( tr( "New" ), this );
68 lay-> addWidget ( p1, 1, 1 ); 68 lay-> addWidget ( p1, 1, 1 );
69 connect ( p1, SIGNAL( clicked ( )), this, SLOT( newClicked ( ))); 69 connect ( p1, SIGNAL( clicked ( )), this, SLOT( newClicked ( )));
70 70
71 p2 = new QPushButton ( tr( "Edit" ), this ); 71 p2 = new QPushButton ( tr( "Edit" ), this );
72 lay-> addWidget ( p2, 2, 1 ); 72 lay-> addWidget ( p2, 2, 1 );
73 connect ( p2, SIGNAL( clicked ( )), this, SLOT( editClicked ( ))); 73 connect ( p2, SIGNAL( clicked ( )), this, SLOT( editClicked ( )));
74 74
75 p3 = new QPushButton ( tr( "Delete" ), this ); 75 p3 = new QPushButton ( tr( "Delete" ), this );
76 lay-> addWidget ( p3, 3, 1 ); 76 lay-> addWidget ( p3, 3, 1 );
77 connect ( p3, SIGNAL( clicked ( )), this, SLOT( deleteClicked ( ))); 77 connect ( p3, SIGNAL( clicked ( )), this, SLOT( deleteClicked ( )));
78 78
79 lay-> setRowStretch ( 4, 10 ); 79 lay-> setRowStretch ( 4, 10 );
80 80
81 m_bigbusy = new QCheckBox( tr( "Enable big busy indicator" ), this );
82 lay-> addMultiCellWidget ( m_bigbusy, 5, 5, 0, 1 );
83
81 m_busyblink = new QCheckBox ( tr( "Enable blinking busy indicator" ), this ); 84 m_busyblink = new QCheckBox ( tr( "Enable blinking busy indicator" ), this );
82 lay-> addMultiCellWidget ( m_busyblink, 5, 5, 0, 1 ); 85 lay-> addMultiCellWidget ( m_busyblink, 6, 6, 0, 1 );
83 86
84 p1-> setEnabled ( false ); 87 p1-> setEnabled ( false );
85 p3-> setEnabled ( false ); 88 p3-> setEnabled ( false );
86 89
87 init ( ); 90 init ( );
88 91
89 QWhatsThis::add ( m_list, tr( "Select the Launcher Tab you want to edit or delete." )); 92 QWhatsThis::add ( m_list, tr( "Select the Launcher Tab you want to edit or delete." ));
90 QWhatsThis::add ( p1, tr( "Adds a new Tab to the Launcher." ) + QString ( "<center><br><i>not yet implemented</i><br>Please use the tabmanager</center>." )); 93 QWhatsThis::add ( p1, tr( "Adds a new Tab to the Launcher." ) + QString ( "<center><br><i>not yet implemented</i><br>Please use the tabmanager</center>." ));
91 QWhatsThis::add ( p2, tr( "Opens a new dialog to customize the select Tab." )); 94 QWhatsThis::add ( p2, tr( "Opens a new dialog to customize the select Tab." ));
92 QWhatsThis::add ( p3, tr( "Deletes a Tab from the Launcher." ) + QString ( "<center><br><i>not yet implemented</i><br>Please use the tabmanager</center>." )); 95 QWhatsThis::add ( p3, tr( "Deletes a Tab from the Launcher." ) + QString ( "<center><br><i>not yet implemented</i><br>Please use the tabmanager</center>." ));
96 QWhatsThis::add ( m_bigbusy, tr( "Activate this, if you want a big busy indicator in the middle of the screen instead of the one in taskbar." ));
93 QWhatsThis::add ( m_busyblink, tr( "Activate this, if you want a blinking busy indicator for starting applications in the Launcher." )); 97 QWhatsThis::add ( m_busyblink, tr( "Activate this, if you want a blinking busy indicator for starting applications in the Launcher." ));
94} 98}
95 99
96void TabsSettings::init ( ) 100void TabsSettings::init ( )
97{ 101{
98 AppLnkSet rootFolder( MimeType::appsFolderName ( )); 102 AppLnkSet rootFolder( MimeType::appsFolderName ( ));
99 QStringList types = rootFolder. types ( ); 103 QStringList types = rootFolder. types ( );
100 104
101 m_list-> insertItem ( tr( "All Tabs" )); 105 m_list-> insertItem ( tr( "All Tabs" ));
102 m_ids << GLOBALID; 106 m_ids << GLOBALID;
103 107
104 for ( QStringList::Iterator it = types. begin ( ); it != types. end ( ); ++it ) { 108 for ( QStringList::Iterator it = types. begin ( ); it != types. end ( ); ++it ) {
105 m_list-> insertItem ( rootFolder. typePixmap ( *it ), rootFolder. typeName ( *it )); 109 m_list-> insertItem ( rootFolder. typePixmap ( *it ), rootFolder. typeName ( *it ));
106 m_ids << *it; 110 m_ids << *it;
107 } 111 }
108 QImage img ( Resource::loadImage ( "DocsIcon" )); 112 QImage img ( Resource::loadImage ( "DocsIcon" ));
109 QPixmap pix; 113 QPixmap pix;
110 pix = img. smoothScale ( AppLnk::smallIconSize ( ), AppLnk::smallIconSize ( )); 114 pix = img. smoothScale ( AppLnk::smallIconSize ( ), AppLnk::smallIconSize ( ));
111 m_list-> insertItem ( pix, tr( "Documents" )); 115 m_list-> insertItem ( pix, tr( "Documents" ));
112 m_ids += "Documents"; // No tr 116 m_ids += "Documents"; // No tr
113 117
114 Config cfg ( "Launcher" ); 118 Config cfg ( "Launcher" );
115 119
116 readTabSettings ( cfg ); 120 readTabSettings ( cfg );
117 121
118 cfg. setGroup ( "GUI" ); 122 cfg. setGroup ( "GUI" );
119 m_busyblink-> setChecked ( cfg. readEntry ( "BusyType" ). lower ( ) == "blink" ); 123 m_busyblink-> setChecked ( cfg. readEntry ( "BusyType" ). lower ( ) == "blink" );
124 m_bigbusy->setChecked( cfg. readBoolEntry ( "BigBusy" ) );
120} 125}
121 126
127
122void TabsSettings::readTabSettings ( Config &cfg ) 128void TabsSettings::readTabSettings ( Config &cfg )
123{ 129{
124 QString grp ( "Tab %1" ); // No tr 130 QString grp ( "Tab %1" ); // No tr
125 m_tabs. clear ( ); 131 m_tabs. clear ( );
126 132
127 TabConfig global_def; 133 TabConfig global_def;
128 global_def. m_view = TabConfig::Icon; 134 global_def. m_view = TabConfig::Icon;
129 global_def. m_bg_type = TabConfig::Ruled; 135 global_def. m_bg_type = TabConfig::Ruled;
130 global_def. m_bg_image = "launcher/opie-background"; 136 global_def. m_bg_image = "launcher/opie-background";
131 global_def. m_bg_color = colorGroup ( ). color ( QColorGroup::Base ). name ( ); 137 global_def. m_bg_color = colorGroup ( ). color ( QColorGroup::Base ). name ( );
132 global_def. m_text_color = colorGroup ( ). color ( QColorGroup::Text ). name ( ); 138 global_def. m_text_color = colorGroup ( ). color ( QColorGroup::Text ). name ( );
133 global_def. m_font_use = false; 139 global_def. m_font_use = false;
134 global_def. m_font_family = font ( ). family ( ); 140 global_def. m_font_family = font ( ). family ( );
135 global_def. m_font_size = font ( ). pointSize ( ); 141 global_def. m_font_size = font ( ). pointSize ( );
136 global_def. m_font_weight = 50; 142 global_def. m_font_weight = 50;
137 global_def. m_font_italic = false; 143 global_def. m_font_italic = false;
138 global_def. m_changed = false; 144 global_def. m_changed = false;
139 145
140 146
141 for ( QStringList::Iterator it = m_ids. begin ( ); it != m_ids. end ( ); ++it ) { 147 for ( QStringList::Iterator it = m_ids. begin ( ); it != m_ids. end ( ); ++it ) {
142 TabConfig tc = ( it != m_ids. begin ( )) ? m_tabs [GLOBALID] : global_def; 148 TabConfig tc = ( it != m_ids. begin ( )) ? m_tabs [GLOBALID] : global_def;
143 149
144 cfg. setGroup ( grp. arg ( *it )); 150 cfg. setGroup ( grp. arg ( *it ));
145 151
146 QString view = cfg. readEntry ( "View" ); 152 QString view = cfg. readEntry ( "View" );
147 if ( view == "Icon" ) // No tr 153 if ( view == "Icon" ) // No tr
148 tc. m_view = TabConfig::Icon; 154 tc. m_view = TabConfig::Icon;
149 if ( view == "List" ) // No tr 155 if ( view == "List" ) // No tr
150 tc. m_view = TabConfig::List; 156 tc. m_view = TabConfig::List;
151 157
152 QString bgType = cfg. readEntry ( "BackgroundType" ); 158 QString bgType = cfg. readEntry ( "BackgroundType" );
153 if ( bgType == "Image" ) 159 if ( bgType == "Image" )
154 tc. m_bg_type = TabConfig::Image; 160 tc. m_bg_type = TabConfig::Image;
155 else if ( bgType == "SolidColor" ) 161 else if ( bgType == "SolidColor" )
156 tc. m_bg_type = TabConfig::SolidColor; 162 tc. m_bg_type = TabConfig::SolidColor;
157 else if ( bgType == "Image" ) // No tr 163 else if ( bgType == "Image" ) // No tr
158 tc. m_bg_type = TabConfig::Image; 164 tc. m_bg_type = TabConfig::Image;
159 165
160 tc. m_bg_image = cfg. readEntry ( "BackgroundImage", tc. m_bg_image ); 166 tc. m_bg_image = cfg. readEntry ( "BackgroundImage", tc. m_bg_image );
161 tc. m_bg_color = cfg. readEntry ( "BackgroundColor", tc. m_bg_color ); 167 tc. m_bg_color = cfg. readEntry ( "BackgroundColor", tc. m_bg_color );
162 tc. m_text_color = cfg. readEntry ( "TextColor", tc. m_text_color ); 168 tc. m_text_color = cfg. readEntry ( "TextColor", tc. m_text_color );
163 QStringList f = cfg. readListEntry ( "Font", ',' ); 169 QStringList f = cfg. readListEntry ( "Font", ',' );
164 if ( f. count ( ) == 4 ) { 170 if ( f. count ( ) == 4 ) {
165 tc. m_font_use = true; 171 tc. m_font_use = true;
166 tc. m_font_family = f [0]; 172 tc. m_font_family = f [0];
167 tc. m_font_size = f [1]. toInt ( ); 173 tc. m_font_size = f [1]. toInt ( );
168 tc. m_font_weight = f [2]. toInt ( ); 174 tc. m_font_weight = f [2]. toInt ( );
169 tc. m_font_italic = ( f [3]. toInt ( )); 175 tc. m_font_italic = ( f [3]. toInt ( ));
170 } 176 }
171 m_tabs [*it] = tc; 177 m_tabs [*it] = tc;
172 } 178 }
173 179
174 // if all tabs have the same config, then initialize the GLOBALID tab to these values 180 // if all tabs have the same config, then initialize the GLOBALID tab to these values
175 181
176 TabConfig *first = 0; 182 TabConfig *first = 0;
177 bool same = true; 183 bool same = true;
178 184
179 for ( QStringList::Iterator it = m_ids. begin ( ); it != m_ids. end ( ); ++it ) { 185 for ( QStringList::Iterator it = m_ids. begin ( ); it != m_ids. end ( ); ++it ) {
180 if ( *it == GLOBALID ) 186 if ( *it == GLOBALID )
181 continue; 187 continue;
182 else if ( !first ) 188 else if ( !first )
183 first = &m_tabs [*it]; 189 first = &m_tabs [*it];
184 else 190 else
185 same &= ( *first == m_tabs [*it] ); 191 same &= ( *first == m_tabs [*it] );
186 } 192 }
187 if ( same ) { 193 if ( same ) {
188 m_tabs [GLOBALID] = *first; 194 m_tabs [GLOBALID] = *first;
189 m_tabs [GLOBALID]. m_changed = true; 195 m_tabs [GLOBALID]. m_changed = true;
190 } 196 }
191} 197}
192 198
193 199
194void TabsSettings::accept ( ) 200void TabsSettings::accept ( )
195{ 201{
196 Config cfg ( "Launcher" ); 202 Config cfg ( "Launcher" );
197 203
198 // Launcher Tab 204 // Launcher Tab
199 QString grp ( "Tab %1" ); // No tr 205 QString grp ( "Tab %1" ); // No tr
200 206
201 for ( QStringList::Iterator it = m_ids. begin ( ); it != m_ids. end ( ); ++it ) { 207 for ( QStringList::Iterator it = m_ids. begin ( ); it != m_ids. end ( ); ++it ) {
202 TabConfig &tc = m_tabs [*it]; 208 TabConfig &tc = m_tabs [*it];
203 209
204 if ( !tc. m_changed ) 210 if ( !tc. m_changed )
205 continue; 211 continue;
206 212
207 cfg. setGroup ( grp. arg ( *it )); 213 cfg. setGroup ( grp. arg ( *it ));
208 switch ( tc. m_view ) { 214 switch ( tc. m_view ) {
209 case TabConfig::Icon: 215 case TabConfig::Icon:
210 cfg.writeEntry ( "View", "Icon" ); 216 cfg.writeEntry ( "View", "Icon" );
211 break; 217 break;
212 case TabConfig::List: 218 case TabConfig::List:
213 cfg.writeEntry ( "View", "List" ); 219 cfg.writeEntry ( "View", "List" );
214 break; 220 break;
215 } 221 }
216 222
217 QCopEnvelope e ( "QPE/Launcher", "setTabView(QString,int)" ); 223 QCopEnvelope e ( "QPE/Launcher", "setTabView(QString,int)" );
218 e << *it << tc. m_view; 224 e << *it << tc. m_view;
219 225
220 cfg. writeEntry ( "BackgroundImage", tc. m_bg_image ); 226 cfg. writeEntry ( "BackgroundImage", tc. m_bg_image );
221 cfg. writeEntry ( "BackgroundColor", tc. m_bg_color ); 227 cfg. writeEntry ( "BackgroundColor", tc. m_bg_color );
222 cfg. writeEntry ( "TextColor", tc. m_text_color ); 228 cfg. writeEntry ( "TextColor", tc. m_text_color );
223 229
224 if ( tc. m_font_use ) { 230 if ( tc. m_font_use ) {
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" ); 231 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 ); 232 cfg. writeEntry ( "Font", f );
227 } 233 }
228 else 234 else
229 cfg. removeEntry ( "Font" ); 235 cfg. removeEntry ( "Font" );
230 236
231 QCopEnvelope be ( "QPE/Launcher", "setTabBackground(QString,int,QString)" ); 237 QCopEnvelope be ( "QPE/Launcher", "setTabBackground(QString,int,QString)" );
232 238
233 switch ( tc. m_bg_type ) { 239 switch ( tc. m_bg_type ) {
234 case TabConfig::Ruled: 240 case TabConfig::Ruled:
235 cfg.writeEntry( "BackgroundType", "Ruled" ); 241 cfg.writeEntry( "BackgroundType", "Ruled" );
236 be << *it << tc. m_bg_type << QString(""); 242 be << *it << tc. m_bg_type << QString("");
237 break; 243 break;
238 case TabConfig::SolidColor: 244 case TabConfig::SolidColor:
239 cfg.writeEntry( "BackgroundType", "SolidColor" ); 245 cfg.writeEntry( "BackgroundType", "SolidColor" );
240 be << *it << tc. m_bg_type << tc. m_bg_color; 246 be << *it << tc. m_bg_type << tc. m_bg_color;
241 break; 247 break;
242 case TabConfig::Image: 248 case TabConfig::Image:
243 cfg.writeEntry( "BackgroundType", "Image" ); 249 cfg.writeEntry( "BackgroundType", "Image" );
244 be << *it << tc. m_bg_type << tc. m_bg_image; 250 be << *it << tc. m_bg_type << tc. m_bg_image;
245 break; 251 break;
246 } 252 }
247 253
248 QCopEnvelope te( "QPE/Launcher", "setTextColor(QString,QString)" ); 254 QCopEnvelope te( "QPE/Launcher", "setTextColor(QString,QString)" );
249 te << *it << tc. m_text_color; 255 te << *it << tc. m_text_color;
250 256
251 QCopEnvelope fe ( "QPE/Launcher", "setFont(QString,QString,int,int,int)" ); 257 QCopEnvelope fe ( "QPE/Launcher", "setFont(QString,QString,int,int,int)" );
252 fe << *it; 258 fe << *it;
253 fe << ( tc. m_font_use ? tc. m_font_family : QString::null ); 259 fe << ( tc. m_font_use ? tc. m_font_family : QString::null );
254 fe << tc. m_font_size; 260 fe << tc. m_font_size;
255 fe << tc. m_font_weight; 261 fe << tc. m_font_weight;
256 fe << ( tc. m_font_italic ? 1 : 0 ); 262 fe << ( tc. m_font_italic ? 1 : 0 );
257 263
258 tc. m_changed = false; 264 tc. m_changed = false;
259 } 265 }
260 cfg. setGroup ( "GUI" ); 266 cfg. setGroup ( "GUI" );
261 QString busytype = QString ( m_busyblink-> isChecked ( ) ? "blink" : "" ); 267 QString busytype = QString ( m_busyblink-> isChecked ( ) ? "blink" : "" );
262
263 cfg. writeEntry ( "BusyType", busytype ); 268 cfg. writeEntry ( "BusyType", busytype );
269
270 cfg. writeEntry ( "BigBusy", m_bigbusy->isChecked( ) );
271
264 { 272 {
265 QCopEnvelope e ( "QPE/Launcher", "setBusyIndicatorType(QString)" ); 273 QCopEnvelope e ( "QPE/Launcher", "setBusyIndicatorType(QString)" );
266 e << busytype; 274 e << busytype;
267 } 275 }
268} 276}
269 277
270void TabsSettings::newClicked ( ) 278void TabsSettings::newClicked ( )
271{ 279{
272 QMessageBox::information ( this, tr( "Error" ), tr( "Not implemented yet" )); 280 QMessageBox::information ( this, tr( "Error" ), tr( "Not implemented yet" ));
273} 281}
274 282
275void TabsSettings::deleteClicked ( ) 283void TabsSettings::deleteClicked ( )
276{ 284{
277 int ind = m_list-> currentItem ( ); 285 int ind = m_list-> currentItem ( );
278 286
279 if ( ind < 0 ) 287 if ( ind < 0 )
280 return; 288 return;
281 289
282 QMessageBox::information ( this, tr( "Error" ), tr( "Not implemented yet" )); 290 QMessageBox::information ( this, tr( "Error" ), tr( "Not implemented yet" ));
283} 291}
284 292
285void TabsSettings::editClicked ( ) 293void TabsSettings::editClicked ( )
286{ 294{
287 int ind = m_list-> currentItem ( ); 295 int ind = m_list-> currentItem ( );
288 296
289 if ( ind < 0 ) 297 if ( ind < 0 )
290 return; 298 return;
291 299
292 TabConfig tc = m_tabs [m_ids [ind]]; 300 TabConfig tc = m_tabs [m_ids [ind]];
293 301
294 TabDialog *d = new TabDialog ( m_list-> pixmap ( ind ), m_list-> text ( ind ), tc, this, "TabDialog", true ); 302 TabDialog *d = new TabDialog ( m_list-> pixmap ( ind ), m_list-> text ( ind ), tc, this, "TabDialog", true );
295 303
296 d-> showMaximized ( ); 304 d-> showMaximized ( );
297 if ( d-> exec ( ) == QDialog::Accepted ) { 305 if ( d-> exec ( ) == QDialog::Accepted ) {
298 tc. m_changed = true; 306 tc. m_changed = true;
299 m_tabs [m_ids [ind]] = tc; 307 m_tabs [m_ids [ind]] = tc;
300 308
301 if ( m_ids [ind] == GLOBALID ) { 309 if ( m_ids [ind] == GLOBALID ) {
302 for ( QStringList::Iterator it = m_ids. begin ( ); it != m_ids. end ( ); ++it ) { 310 for ( QStringList::Iterator it = m_ids. begin ( ); it != m_ids. end ( ); ++it ) {
303 if ( *it != GLOBALID ) 311 if ( *it != GLOBALID )
304 m_tabs [*it] = tc; 312 m_tabs [*it] = tc;
305 } 313 }
306 } 314 }
307 } 315 }
308 316
309 delete d; 317 delete d;
310} 318}
diff --git a/core/settings/launcher/tabssettings.h b/core/settings/launcher/tabssettings.h
index 47fcee2..439def6 100644
--- a/core/settings/launcher/tabssettings.h
+++ b/core/settings/launcher/tabssettings.h
@@ -38,31 +38,31 @@ class Config;
38 38
39 39
40class TabsSettings : public QWidget { 40class TabsSettings : public QWidget {
41 Q_OBJECT 41 Q_OBJECT
42 42
43public: 43public:
44 TabsSettings ( QWidget *parent = 0, const char *name = 0 ); 44 TabsSettings ( QWidget *parent = 0, const char *name = 0 );
45 45
46 void accept ( ); 46 void accept ( );
47 47
48protected slots: 48protected slots:
49 void newClicked ( ); 49 void newClicked ( );
50 void deleteClicked ( ); 50 void deleteClicked ( );
51 void editClicked ( ); 51 void editClicked ( );
52 52
53protected: 53protected:
54 void init ( ); 54 void init ( );
55 void readTabSettings ( Config & ); 55 void readTabSettings ( Config & );
56 56
57private: 57private:
58 QListBox *m_list; 58 QListBox *m_list;
59 //QString currentTab; 59 //QString currentTab;
60 QStringList m_ids; 60 QStringList m_ids;
61 QMap <QString, TabConfig> m_tabs; 61 QMap <QString, TabConfig> m_tabs;
62 QCheckBox *m_busyblink; 62 QCheckBox *m_busyblink, *m_bigbusy;
63}; 63};
64 64
65 65
66 66
67 67
68#endif 68#endif