summaryrefslogtreecommitdiff
path: root/core/settings/launcher
authormickeyl <mickeyl>2003-11-06 10:17:45 (UTC)
committer mickeyl <mickeyl>2003-11-06 10:17:45 (UTC)
commit55ea6367fba8a82fbdca74599422717e4b3c3ec6 (patch) (side-by-side diff)
treeb40bb13a1b4f05b4eda61cf0c4a02e32719a70c4 /core/settings/launcher
parent56ad1eb7fb39ddc78026a0df096703fcf42f5a94 (diff)
downloadopie-55ea6367fba8a82fbdca74599422717e4b3c3ec6.zip
opie-55ea6367fba8a82fbdca74599422717e4b3c3ec6.tar.gz
opie-55ea6367fba8a82fbdca74599422717e4b3c3ec6.tar.bz2
merge core/settings/*
- light-and-power and security were a bit ugly, so I recommend someone who actually dealt with these files looking into if I got it right (not to tell about the frustratation about the fact that the ones who dealt with these files didn't do the merge in the first place :(
Diffstat (limited to 'core/settings/launcher') (more/less context) (ignore whitespace changes)
-rw-r--r--core/settings/launcher/launcher.pro4
-rw-r--r--core/settings/launcher/launchersettings.cpp3
-rw-r--r--core/settings/launcher/launchersettings.h3
-rw-r--r--core/settings/launcher/main.cpp12
-rw-r--r--core/settings/launcher/menusettings.cpp18
-rw-r--r--core/settings/launcher/menusettings.h2
-rw-r--r--core/settings/launcher/tabssettings.cpp10
-rw-r--r--core/settings/launcher/tabssettings.h2
8 files changed, 29 insertions, 25 deletions
diff --git a/core/settings/launcher/launcher.pro b/core/settings/launcher/launcher.pro
index cea268d..9d05832 100644
--- a/core/settings/launcher/launcher.pro
+++ b/core/settings/launcher/launcher.pro
@@ -1,15 +1,13 @@
-TEMPLATE = app
-CONFIG += qt warn_on release
-DESTDIR = $(OPIEDIR)/bin
+CONFIG += qt warn_on release quick-app
HEADERS = launchersettings.h \
tabssettings.h \
taskbarsettings.h \
menusettings.h \
inputmethodsettings.h \
tabconfig.h \
tabdialog.h
SOURCES = main.cpp \
launchersettings.cpp \
tabssettings.cpp \
taskbarsettings.cpp \
diff --git a/core/settings/launcher/launchersettings.cpp b/core/settings/launcher/launchersettings.cpp
index 3982194..efc4a86 100644
--- a/core/settings/launcher/launchersettings.cpp
+++ b/core/settings/launcher/launchersettings.cpp
@@ -28,25 +28,26 @@
#include <qlayout.h>
#include <qapplication.h>
#include <opie/otabwidget.h>
#include "launchersettings.h"
#include "tabssettings.h"
#include "menusettings.h"
#include "taskbarsettings.h"
#include "inputmethodsettings.h"
-LauncherSettings::LauncherSettings ( ) : QDialog ( 0, "LauncherSettings", false, WStyle_ContextHelp )
+LauncherSettings::LauncherSettings (QWidget*,const char*, WFlags)
+ : QDialog ( 0, "LauncherSettings", false, WStyle_ContextHelp )
{
setCaption ( tr( "Launcher Settings" ));
QVBoxLayout *lay = new QVBoxLayout ( this, 4, 4 );
OTabWidget *tw = new OTabWidget ( this, "otab" );
lay-> addWidget ( tw );
m_tabs = new TabsSettings ( tw );
m_taskbar = new TaskbarSettings ( tw );
m_menu = new MenuSettings ( tw );
m_imethods = new InputMethodSettings ( tw );
diff --git a/core/settings/launcher/launchersettings.h b/core/settings/launcher/launchersettings.h
index 71165a3..7458d8b 100644
--- a/core/settings/launcher/launchersettings.h
+++ b/core/settings/launcher/launchersettings.h
@@ -30,25 +30,26 @@
#include <qdialog.h>
class TabsSettings;
class TaskbarSettings;
class MenuSettings;
class InputMethodSettings;
class LauncherSettings : public QDialog {
Q_OBJECT
public:
- LauncherSettings ( );
+ static QString appName() { return QString::fromLatin1("launchersettings"); }
+ LauncherSettings (QWidget *parent = 0, const char* name = 0, WFlags fl = 0 );
virtual void accept ( );
virtual void done ( int r );
private:
TabsSettings *m_tabs;
TaskbarSettings *m_taskbar;
MenuSettings *m_menu;
InputMethodSettings* m_imethods;
};
#endif
diff --git a/core/settings/launcher/main.cpp b/core/settings/launcher/main.cpp
index f65dab8..4cc1d35 100644
--- a/core/settings/launcher/main.cpp
+++ b/core/settings/launcher/main.cpp
@@ -19,25 +19,17 @@
 :     =  ...= . :.=- You should have received a copy of the GNU
 -.   .:....=;==+<; General Public License along with this file;
  -_. . .   )=.  = see the file COPYING. If not, write to the
    --        :-=` Free Software Foundation, Inc.,
59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#include "launchersettings.h"
#include <qpe/qpeapplication.h>
+#include <opie/oapplicationfactory.h>
+OPIE_EXPORT_APP( OApplicationFactory<LauncherSettings> )
-int main ( int argc, char** argv )
-{
- QPEApplication a ( argc,argv );
-
- LauncherSettings dlg;
- a. showMainWidget ( &dlg );
- dlg. showMaximized ( );
-
- return a. exec ( );
-}
diff --git a/core/settings/launcher/menusettings.cpp b/core/settings/launcher/menusettings.cpp
index 6fca621..faa7cf4 100644
--- a/core/settings/launcher/menusettings.cpp
+++ b/core/settings/launcher/menusettings.cpp
@@ -7,25 +7,25 @@
.> <`_,   >  .   <= redistribute it and/or modify it under
:`=1 )Y*s>-.--   : the terms of the GNU General Public
.="- .-=="i,     .._ License as published by the Free Software
 - .   .-<_>     .<> Foundation; either version 2 of the License,
     ._= =}       : or (at your option) any later version.
    .%`+i>       _;_.
    .i_,=:_.      -<s. This file is distributed in the hope that
     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
    : ..    .:,     . . . without even the implied warranty of
    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU General
..}^=.=       =       ; Public License for more details.
-++=   -.     .`     .:
+++=   -.     .`     .:
 :     =  ...= . :.=- You should have received a copy of the GNU
 -.   .:....=;==+<; General Public License along with this file;
  -_. . .   )=.  = see the file COPYING. If not, write to the
    --        :-=` Free Software Foundation, Inc.,
59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#include "menusettings.h"
#include <qpe/config.h>
@@ -51,28 +51,31 @@ MenuSettings::MenuSettings ( QWidget *parent, const char *name )
m_applets_changed = false;
QBoxLayout *lay = new QVBoxLayout ( this, 4, 4 );
QLabel *l = new QLabel ( tr( "Load applets in O-Menu:" ), this );
lay-> addWidget ( l );
m_list = new QListView ( this );
m_list-> addColumn ( "foobar" );
m_list-> header ( )-> hide ( );
lay-> addWidget ( m_list );
-
+
m_menutabs = new QCheckBox ( tr( "Show Launcher tabs in O-Menu" ), this );
lay-> addWidget ( m_menutabs );
+ m_menusubpopup = new QCheckBox ( tr( "Show Applications in subpopups" ), this );
+ lay-> addWidget ( m_menusubpopup );
+
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 ( )));
init ( );
}
void MenuSettings::init ( )
{
Config cfg ( "StartMenu" );
cfg. setGroup ( "Applets" );
@@ -110,24 +113,25 @@ void MenuSettings::init ( )
item = new QCheckListItem ( m_list, name, QCheckListItem::CheckBox );
if ( !icon. isNull ( ))
item-> setPixmap ( 0, icon );
item-> setOn ( exclude. find ( *it ) == exclude. end ( ));
m_applets [*it] = item;
} else {
delete lib;
}
}
cfg. setGroup ( "Menu" );
m_menutabs-> setChecked ( cfg. readBoolEntry ( "LauncherTabs", true ));
+ m_menusubpopup-> setChecked ( cfg. readBoolEntry ( "LauncherSubPopup", true ));
}
void MenuSettings::appletChanged()
{
m_applets_changed = true;
}
void MenuSettings::accept ( )
{
bool apps_changed = false;
Config cfg ( "StartMenu" );
@@ -140,24 +144,32 @@ void MenuSettings::accept ( )
exclude << it. key ( );
}
cfg. writeEntry ( "ExcludeApplets", exclude, ',' );
}
cfg. writeEntry ( "SafeMode", false );
cfg. setGroup ( "Menu" );
if ( m_menutabs-> isChecked ( ) != cfg. readBoolEntry ( "LauncherTabs", true )) {
apps_changed = true;
cfg. writeEntry ( "LauncherTabs", m_menutabs-> isChecked ( ));
}
-
+
+ if ( m_menusubpopup-> isChecked ( ) != cfg. readBoolEntry ( "LauncherSubPopup", true )) {
+ apps_changed = true;
+ cfg. writeEntry ( "LauncherSubPopup", m_menusubpopup-> isChecked ( ));
+ }
+
cfg. write ( );
if ( m_applets_changed ) {
QCopEnvelope ( "QPE/TaskBar", "reloadApplets()" );
m_applets_changed = false;
}
if ( apps_changed ) {
+ // currently use reloadApplets() since reloadApps is now used exclusive for server
+ // to refresh the tabs. But what we want here is also a refresh of the startmenu entries
QCopEnvelope ( "QPE/TaskBar", "reloadApps()" );
+ QCopEnvelope ( "QPE/TaskBar", "reloadApplets()" );
}
}
diff --git a/core/settings/launcher/menusettings.h b/core/settings/launcher/menusettings.h
index 5986958..5bb7afa 100644
--- a/core/settings/launcher/menusettings.h
+++ b/core/settings/launcher/menusettings.h
@@ -45,16 +45,16 @@ public:
void accept ( );
protected slots:
void appletChanged ( );
protected:
void init ( );
private:
QListView *m_list;
QMap <QString, QCheckListItem *> m_applets;
bool m_applets_changed;
- QCheckBox *m_menutabs;
+ QCheckBox *m_menutabs, *m_menusubpopup;
};
#endif
diff --git a/core/settings/launcher/tabssettings.cpp b/core/settings/launcher/tabssettings.cpp
index 7cd00bd..3d8b456 100644
--- a/core/settings/launcher/tabssettings.cpp
+++ b/core/settings/launcher/tabssettings.cpp
@@ -72,38 +72,38 @@ TabsSettings::TabsSettings ( QWidget *parent, const char *name )
lay-> addWidget ( p2, 2, 1 );
connect ( p2, SIGNAL( clicked ( )), this, SLOT( editClicked ( )));
p3 = new QPushButton ( tr( "Delete" ), this );
lay-> addWidget ( p3, 3, 1 );
connect ( p3, SIGNAL( clicked ( )), this, SLOT( deleteClicked ( )));
lay-> setRowStretch ( 4, 10 );
m_bigbusy = new QCheckBox( tr( "Enable big busy indicator" ), this );
lay-> addMultiCellWidget ( m_bigbusy, 5, 5, 0, 1 );
- m_busyblink = new QCheckBox ( tr( "Enable blinking busy indicator" ), this );
- lay-> addMultiCellWidget ( m_busyblink, 6, 6, 0, 1 );
+ m_busyani = new QCheckBox ( tr( "Enable animated busy indicator" ), this );
+ lay-> addMultiCellWidget ( m_busyani, 6, 6, 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_bigbusy, tr( "Activate this, if you want a big busy indicator in the middle of the screen instead of the one in taskbar." ));
- QWhatsThis::add ( m_busyblink, tr( "Activate this, if you want a blinking busy indicator for starting applications in the Launcher." ));
+ QWhatsThis::add ( m_busyani, tr( "Activate this, if you want an animatedbusy indicator for starting applications in the Launcher." ));
}
void TabsSettings::init ( )
{
AppLnkSet rootFolder( MimeType::appsFolderName ( ));
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 ));
@@ -111,25 +111,25 @@ void TabsSettings::init ( )
}
QImage img ( Resource::loadImage ( "DocsIcon" ));
QPixmap pix;
pix = img. smoothScale ( AppLnk::smallIconSize ( ), AppLnk::smallIconSize ( ));
m_list-> insertItem ( pix, tr( "Documents" ));
m_ids += "Documents"; // No tr
Config cfg ( "Launcher" );
readTabSettings ( cfg );
cfg. setGroup ( "GUI" );
- m_busyblink-> setChecked ( cfg. readEntry ( "BusyType" ). lower ( ) == "blink" );
+ m_busyani-> setChecked ( cfg. readEntry ( "BusyType" ). lower ( ) == "animated" );
m_bigbusy->setChecked( cfg. readBoolEntry ( "BigBusy" ) );
}
void TabsSettings::readTabSettings ( Config &cfg )
{
QString grp ( "Tab %1" ); // No tr
m_tabs. clear ( );
TabConfig global_def;
global_def. m_view = TabConfig::Icon;
global_def. m_bg_type = TabConfig::Ruled;
@@ -255,25 +255,25 @@ void TabsSettings::accept ( )
te << *it << tc. m_text_color;
QCopEnvelope fe ( "QPE/Launcher", "setFont(QString,QString,int,int,int)" );
fe << *it;
fe << ( tc. m_font_use ? tc. m_font_family : QString::null );
fe << tc. m_font_size;
fe << tc. m_font_weight;
fe << ( tc. m_font_italic ? 1 : 0 );
tc. m_changed = false;
}
cfg. setGroup ( "GUI" );
- QString busytype = QString ( m_busyblink-> isChecked ( ) ? "blink" : "" );
+ QString busytype = QString ( m_busyani-> isChecked ( ) ? "Animated" : "" );
cfg. writeEntry ( "BusyType", busytype );
cfg. writeEntry ( "BigBusy", m_bigbusy->isChecked( ) );
{
QCopEnvelope e ( "QPE/Launcher", "setBusyIndicatorType(QString)" );
e << busytype;
}
}
void TabsSettings::newClicked ( )
{
diff --git a/core/settings/launcher/tabssettings.h b/core/settings/launcher/tabssettings.h
index 439def6..600c65c 100644
--- a/core/settings/launcher/tabssettings.h
+++ b/core/settings/launcher/tabssettings.h
@@ -50,19 +50,19 @@ protected slots:
void deleteClicked ( );
void editClicked ( );
protected:
void init ( );
void readTabSettings ( Config & );
private:
QListBox *m_list;
// QString currentTab;
QStringList m_ids;
QMap <QString, TabConfig> m_tabs;
- QCheckBox *m_busyblink, *m_bigbusy;
+ QCheckBox *m_busyani, *m_bigbusy;
};
#endif