summaryrefslogtreecommitdiff
authorsandman <sandman>2002-10-08 01:21:52 (UTC)
committer sandman <sandman>2002-10-08 01:21:52 (UTC)
commitc43b5d600a7d1dcaadcba2cb047a60313b37f2f2 (patch) (unidiff)
treedbe1311d34631e7d933aa10b2d6a9dc8f97206ab
parent5e450f24ca13923535754b33a1d1645709a8259d (diff)
downloadopie-c43b5d600a7d1dcaadcba2cb047a60313b37f2f2.zip
opie-c43b5d600a7d1dcaadcba2cb047a60313b37f2f2.tar.gz
opie-c43b5d600a7d1dcaadcba2cb047a60313b37f2f2.tar.bz2
- added an "All Tabs" tab entry, which will affect all tabs
- enabled "What's this" help mode -- many tooltips still missing
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/settings/launcher/launchersettings.cpp2
-rw-r--r--core/settings/launcher/menusettings.cpp4
-rw-r--r--core/settings/launcher/tabconfig.h13
-rw-r--r--core/settings/launcher/tabdialog.cpp5
-rw-r--r--core/settings/launcher/tabssettings.cpp65
5 files changed, 73 insertions, 16 deletions
diff --git a/core/settings/launcher/launchersettings.cpp b/core/settings/launcher/launchersettings.cpp
index c32d998..7b85602 100644
--- a/core/settings/launcher/launchersettings.cpp
+++ b/core/settings/launcher/launchersettings.cpp
@@ -38,3 +38,3 @@
38 38
39LauncherSettings::LauncherSettings ( ) : QDialog ( 0, "LauncherSettings", false ) 39LauncherSettings::LauncherSettings ( ) : QDialog ( 0, "LauncherSettings", false, WStyle_ContextHelp )
40{ 40{
diff --git a/core/settings/launcher/menusettings.cpp b/core/settings/launcher/menusettings.cpp
index 8d363fa..5a9fada 100644
--- a/core/settings/launcher/menusettings.cpp
+++ b/core/settings/launcher/menusettings.cpp
@@ -66,4 +66,4 @@ MenuSettings::MenuSettings ( QWidget *parent, const char *name )
66 66
67 QWhatsThis::add ( m_list, tr( "Check the applets that you want displayed in the O-Menu." )); 67 QWhatsThis::add ( m_list, tr( "Check the applets that you want to have included in the O-Menu." ));
68 QWhatsThis::add ( m_menutabs, tr( "Adds the contents of the Launcher as menus in the O-Menu." )); 68 QWhatsThis::add ( m_menutabs, tr( "Adds the contents of the Launcher Tabs as menus in the O-Menu." ));
69 69
diff --git a/core/settings/launcher/tabconfig.h b/core/settings/launcher/tabconfig.h
index 8b6b103..eebfd36 100644
--- a/core/settings/launcher/tabconfig.h
+++ b/core/settings/launcher/tabconfig.h
@@ -50,2 +50,15 @@ struct TabConfig {
50 bool m_changed; 50 bool m_changed;
51
52 bool operator == ( const TabConfig &tc )
53 {
54 return ( m_view == tc. m_view ) &&
55 ( m_bg_type == tc. m_bg_type ) &&
56 ( m_bg_image == tc. m_bg_image ) &&
57 ( m_bg_color == tc. m_bg_color ) &&
58 ( m_text_color == tc. m_text_color ) &&
59 ( m_font_family == tc. m_font_family ) &&
60 ( m_font_size == tc. m_font_size ) &&
61 ( m_font_weight == tc. m_font_weight ) &&
62 ( m_font_italic == tc. m_font_italic );
63 }
51}; 64};
diff --git a/core/settings/launcher/tabdialog.cpp b/core/settings/launcher/tabdialog.cpp
index 6288f5f..a90ba7d 100644
--- a/core/settings/launcher/tabdialog.cpp
+++ b/core/settings/launcher/tabdialog.cpp
@@ -40,2 +40,3 @@
40#include <qpushbutton.h> 40#include <qpushbutton.h>
41#include <qwhatsthis.h>
41 42
@@ -264,3 +265,3 @@ private:
264TabDialog::TabDialog ( const QPixmap *tabicon, const QString &tabname, TabConfig &tc, QWidget *parent, const char *name, bool modal, WFlags fl ) 265TabDialog::TabDialog ( const QPixmap *tabicon, const QString &tabname, TabConfig &tc, QWidget *parent, const char *name, bool modal, WFlags fl )
265 : QDialog ( parent, name, modal, fl ), m_tc ( tc ) 266 : QDialog ( parent, name, modal, fl | WStyle_ContextHelp ), m_tc ( tc )
266{ 267{
@@ -300,2 +301,4 @@ TabDialog::TabDialog ( const QPixmap *tabicon, const QString &tabname, TabConfig
300 fontClicked ( m_fontselect-> selectedFont ( )); 301 fontClicked ( m_fontselect-> selectedFont ( ));
302
303 QWhatsThis::add ( sample, tr( "This is a rough preview of what the currently selected Tab will look like." ));
301} 304}
diff --git a/core/settings/launcher/tabssettings.cpp b/core/settings/launcher/tabssettings.cpp
index 6cc69c0..a5afaf2 100644
--- a/core/settings/launcher/tabssettings.cpp
+++ b/core/settings/launcher/tabssettings.cpp
@@ -49,2 +49,4 @@
49 49
50 #define GLOBALID "_launchersettings_global_dummy_"
51
50 52
@@ -63,14 +65,14 @@ TabsSettings::TabsSettings ( QWidget *parent, const char *name )
63 65
64 QPushButton *p; 66 QPushButton *p1, *p2, *p3;
65 p = new QPushButton ( tr( "New" ), this ); 67 p1 = new QPushButton ( tr( "New" ), this );
66 lay-> addWidget ( p, 1, 1 ); 68 lay-> addWidget ( p1, 1, 1 );
67 connect ( p, SIGNAL( clicked ( )), this, SLOT( newClicked ( ))); 69 connect ( p1, SIGNAL( clicked ( )), this, SLOT( newClicked ( )));
68 70
69 p = new QPushButton ( tr( "Edit" ), this ); 71 p2 = new QPushButton ( tr( "Edit" ), this );
70 lay-> addWidget ( p, 2, 1 ); 72 lay-> addWidget ( p2, 2, 1 );
71 connect ( p, SIGNAL( clicked ( )), this, SLOT( editClicked ( ))); 73 connect ( p2, SIGNAL( clicked ( )), this, SLOT( editClicked ( )));
72 74
73 p = new QPushButton ( tr( "Delete" ), this ); 75 p3 = new QPushButton ( tr( "Delete" ), this );
74 lay-> addWidget ( p, 3, 1 ); 76 lay-> addWidget ( p3, 3, 1 );
75 connect ( p, SIGNAL( clicked ( )), this, SLOT( deleteClicked ( ))); 77 connect ( p3, SIGNAL( clicked ( )), this, SLOT( deleteClicked ( )));
76 78
@@ -81,3 +83,12 @@ TabsSettings::TabsSettings ( QWidget *parent, const char *name )
81 83
84 p1-> setEnabled ( false );
85 p3-> setEnabled ( false );
86
82 init ( ); 87 init ( );
88
89 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>." ));
91 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>." ));
93 QWhatsThis::add ( m_busyblink, tr( "Activate this, if you want a blinking busy indicator for starting applications in the Launcher." ));
83} 94}
@@ -88,2 +99,5 @@ void TabsSettings::init ( )
88 QStringList types = rootFolder. types ( ); 99 QStringList types = rootFolder. types ( );
100
101 m_list-> insertItem ( tr( "All Tabs" ));
102 m_ids << GLOBALID;
89 103
@@ -119,2 +133,4 @@ void TabsSettings::readTabSettings ( Config &cfg )
119 cfg. setGroup ( grp. arg ( *it )); 133 cfg. setGroup ( grp. arg ( *it ));
134 if ( *it == GLOBALID )
135 cfg. clearGroup ( );
120 136
@@ -145,4 +161,21 @@ void TabsSettings::readTabSettings ( Config &cfg )
145 } 161 }
162
146 m_tabs [*it] = tc; 163 m_tabs [*it] = tc;
147 } 164 }
165
166 // if all tabs have the same config, then initialize the GLOBALID tab to these values
167
168 TabConfig *first = 0;
169 bool same = true;
170
171 for ( QStringList::Iterator it = m_ids. begin ( ); it != m_ids. end ( ); ++it ) {
172 if ( *it == GLOBALID )
173 continue;
174 else if ( !first )
175 first = &m_tabs [*it];
176 else
177 same &= ( *first == m_tabs [*it] );
178 }
179 if ( same )
180 m_tabs [GLOBALID] = *first;
148} 181}
@@ -160,5 +193,6 @@ void TabsSettings::accept ( )
160 193
161 cfg. setGroup ( grp. arg ( *it )); 194 if ( !tc. m_changed || ( *it == GLOBALID ))
162 if ( !tc. m_changed )
163 continue; 195 continue;
196
197 cfg. setGroup ( grp. arg ( *it ));
164 switch ( tc. m_view ) { 198 switch ( tc. m_view ) {
@@ -248,2 +282,9 @@ void TabsSettings::editClicked ( )
248 m_tabs [m_ids [ind]] = tc; 282 m_tabs [m_ids [ind]] = tc;
283
284 if ( m_ids [ind] == GLOBALID ) {
285 for ( QStringList::Iterator it = m_ids. begin ( ); it != m_ids. end ( ); ++it ) {
286 if ( *it != GLOBALID )
287 m_tabs [*it] = tc;
288 }
289 }
249 } 290 }