summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show 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
@@ -37,5 +37,5 @@
-LauncherSettings::LauncherSettings ( ) : QDialog ( 0, "LauncherSettings", false )
+LauncherSettings::LauncherSettings ( ) : QDialog ( 0, "LauncherSettings", false, WStyle_ContextHelp )
{
setCaption ( tr( "Launcher Settings" ));
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
@@ -65,6 +65,6 @@ MenuSettings::MenuSettings ( QWidget *parent, const char *name )
lay-> addWidget ( m_menutabs );
- QWhatsThis::add ( m_list, tr( "Check the applets that you want displayed in the O-Menu." ));
- QWhatsThis::add ( m_menutabs, tr( "Adds the contents of the Launcher as menus in the O-Menu." ));
+ QWhatsThis::add ( m_list, tr( "Check the applets that you want to have included in the O-Menu." ));
+ QWhatsThis::add ( m_menutabs, tr( "Adds the contents of the Launcher Tabs as menus in the O-Menu." ));
connect ( m_list, SIGNAL( clicked ( QListViewItem * )), this, SLOT( appletChanged ( )));
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
@@ -49,4 +49,17 @@ struct TabConfig {
bool m_font_italic;
bool m_changed;
+
+ bool operator == ( const TabConfig &tc )
+ {
+ return ( m_view == tc. m_view ) &&
+ ( m_bg_type == tc. m_bg_type ) &&
+ ( m_bg_image == tc. m_bg_image ) &&
+ ( m_bg_color == tc. m_bg_color ) &&
+ ( m_text_color == tc. m_text_color ) &&
+ ( m_font_family == tc. m_font_family ) &&
+ ( m_font_size == tc. m_font_size ) &&
+ ( m_font_weight == tc. m_font_weight ) &&
+ ( m_font_italic == tc. m_font_italic );
+ }
};
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
@@ -39,4 +39,5 @@
#include <qbuttongroup.h>
#include <qpushbutton.h>
+#include <qwhatsthis.h>
#include <opie/ofontselector.h>
@@ -263,5 +264,5 @@ private:
TabDialog::TabDialog ( const QPixmap *tabicon, const QString &tabname, TabConfig &tc, QWidget *parent, const char *name, bool modal, WFlags fl )
- : QDialog ( parent, name, modal, fl ), m_tc ( tc )
+ : QDialog ( parent, name, modal, fl | WStyle_ContextHelp ), m_tc ( tc )
{
setCaption ( tr( "Edit Tab" ));
@@ -299,4 +300,6 @@ TabDialog::TabDialog ( const QPixmap *tabicon, const QString &tabname, TabConfig
m_fontselect-> setSelectedFont ( QFont ( tc. m_font_family, tc. m_font_size, tc. m_font_weight, tc. m_font_italic ));
fontClicked ( m_fontselect-> selectedFont ( ));
+
+ QWhatsThis::add ( sample, tr( "This is a rough preview of what the currently selected Tab will look like." ));
}
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
@@ -48,4 +48,6 @@
+#define GLOBALID "_launchersettings_global_dummy_"
+
TabsSettings::TabsSettings ( QWidget *parent, const char *name )
@@ -62,16 +64,16 @@ TabsSettings::TabsSettings ( QWidget *parent, const char *name )
QWhatsThis::add ( m_list, tr( "foobar" ));
- QPushButton *p;
- p = new QPushButton ( tr( "New" ), this );
- lay-> addWidget ( p, 1, 1 );
- connect ( p, SIGNAL( clicked ( )), this, SLOT( newClicked ( )));
+ QPushButton *p1, *p2, *p3;
+ p1 = new QPushButton ( tr( "New" ), this );
+ lay-> addWidget ( p1, 1, 1 );
+ connect ( p1, SIGNAL( clicked ( )), this, SLOT( newClicked ( )));
- p = new QPushButton ( tr( "Edit" ), this );
- lay-> addWidget ( p, 2, 1 );
- connect ( p, SIGNAL( clicked ( )), this, SLOT( editClicked ( )));
+ p2 = new QPushButton ( tr( "Edit" ), this );
+ lay-> addWidget ( p2, 2, 1 );
+ connect ( p2, SIGNAL( clicked ( )), this, SLOT( editClicked ( )));
- p = new QPushButton ( tr( "Delete" ), this );
- lay-> addWidget ( p, 3, 1 );
- connect ( p, SIGNAL( clicked ( )), this, SLOT( deleteClicked ( )));
+ p3 = new QPushButton ( tr( "Delete" ), this );
+ lay-> addWidget ( p3, 3, 1 );
+ connect ( p3, SIGNAL( clicked ( )), this, SLOT( deleteClicked ( )));
lay-> setRowStretch ( 4, 10 );
@@ -80,5 +82,14 @@ TabsSettings::TabsSettings ( QWidget *parent, const char *name )
lay-> addMultiCellWidget ( m_busyblink, 5, 5, 0, 1 );
+ p1-> setEnabled ( false );
+ p3-> setEnabled ( false );
+
init ( );
+
+ QWhatsThis::add ( m_list, tr( "Select the Launcher Tab you want to edit or delete." ));
+ 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>." ));
+ QWhatsThis::add ( p2, tr( "Opens a new dialog to customize the select Tab." ));
+ QWhatsThis::add ( p3, tr( "Deletes a Tab from the Launcher." ) + QString ( "<center><br><i>not yet implemented</i><br>Please use the tabmanager</center>." ));
+ QWhatsThis::add ( m_busyblink, tr( "Activate this, if you want a blinking busy indicator for starting applications in the Launcher." ));
}
@@ -88,4 +99,7 @@ void TabsSettings::init ( )
QStringList types = rootFolder. types ( );
+ m_list-> insertItem ( tr( "All Tabs" ));
+ m_ids << GLOBALID;
+
for ( QStringList::Iterator it = types. begin ( ); it != types. end ( ); ++it ) {
m_list-> insertItem ( rootFolder. typePixmap ( *it ), rootFolder. typeName ( *it ));
@@ -118,4 +132,6 @@ void TabsSettings::readTabSettings ( Config &cfg )
cfg. setGroup ( grp. arg ( *it ));
+ if ( *it == GLOBALID )
+ cfg. clearGroup ( );
QString view = cfg. readEntry ( "View", "Icon" );
@@ -144,6 +160,23 @@ void TabsSettings::readTabSettings ( Config &cfg )
tc. m_font_italic = false;
}
+
m_tabs [*it] = tc;
}
+
+ // if all tabs have the same config, then initialize the GLOBALID tab to these values
+
+ TabConfig *first = 0;
+ bool same = true;
+
+ for ( QStringList::Iterator it = m_ids. begin ( ); it != m_ids. end ( ); ++it ) {
+ if ( *it == GLOBALID )
+ continue;
+ else if ( !first )
+ first = &m_tabs [*it];
+ else
+ same &= ( *first == m_tabs [*it] );
+ }
+ if ( same )
+ m_tabs [GLOBALID] = *first;
}
@@ -159,7 +192,8 @@ void TabsSettings::accept ( )
TabConfig &tc = m_tabs [*it];
- cfg. setGroup ( grp. arg ( *it ));
- if ( !tc. m_changed )
+ if ( !tc. m_changed || ( *it == GLOBALID ))
continue;
+
+ cfg. setGroup ( grp. arg ( *it ));
switch ( tc. m_view ) {
case TabConfig::Icon:
@@ -247,4 +281,11 @@ void TabsSettings::editClicked ( )
tc. m_changed = true;
m_tabs [m_ids [ind]] = tc;
+
+ if ( m_ids [ind] == GLOBALID ) {
+ for ( QStringList::Iterator it = m_ids. begin ( ); it != m_ids. end ( ); ++it ) {
+ if ( *it != GLOBALID )
+ m_tabs [*it] = tc;
+ }
+ }
}