summaryrefslogtreecommitdiff
path: root/core/settings/launcher/tabssettings.cpp
authorsandman <sandman>2002-10-02 22:15:33 (UTC)
committer sandman <sandman>2002-10-02 22:15:33 (UTC)
commit7e864eb22b5663ad9771b562fbe901042dc68657 (patch) (unidiff)
treec7cc270012ff2aba51308088b51022b2056f9721 /core/settings/launcher/tabssettings.cpp
parentc8d4ed632ac27261219e5824f988a320b96b8ae2 (diff)
downloadopie-7e864eb22b5663ad9771b562fbe901042dc68657.zip
opie-7e864eb22b5663ad9771b562fbe901042dc68657.tar.gz
opie-7e864eb22b5663ad9771b562fbe901042dc68657.tar.bz2
Launcher settings now also supports the new menu applets interface
Diffstat (limited to 'core/settings/launcher/tabssettings.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/settings/launcher/tabssettings.cpp22
1 files changed, 19 insertions, 3 deletions
diff --git a/core/settings/launcher/tabssettings.cpp b/core/settings/launcher/tabssettings.cpp
index 8f5f7fa..6cc69c0 100644
--- a/core/settings/launcher/tabssettings.cpp
+++ b/core/settings/launcher/tabssettings.cpp
@@ -36,12 +36,13 @@
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 43
43#include "tabdialog.h" 44#include "tabdialog.h"
44 45
45#include <stdlib.h> 46#include <stdlib.h>
46#include <qmessagebox.h> 47#include <qmessagebox.h>
47 48
@@ -72,12 +73,15 @@ TabsSettings::TabsSettings ( QWidget *parent, const char *name )
72 p = new QPushButton ( tr( "Delete" ), this ); 73 p = new QPushButton ( tr( "Delete" ), this );
73 lay-> addWidget ( p, 3, 1 ); 74 lay-> addWidget ( p, 3, 1 );
74 connect ( p, SIGNAL( clicked ( )), this, SLOT( deleteClicked ( ))); 75 connect ( p, SIGNAL( clicked ( )), this, SLOT( deleteClicked ( )));
75 76
76 lay-> setRowStretch ( 4, 10 ); 77 lay-> setRowStretch ( 4, 10 );
77 78
79 m_busyblink = new QCheckBox ( tr( "Enable blinking busy indicator" ), this );
80 lay-> addMultiCellWidget ( m_busyblink, 5, 5, 0, 1 );
81
78 init ( ); 82 init ( );
79} 83}
80 84
81void TabsSettings::init ( ) 85void TabsSettings::init ( )
82{ 86{
83 AppLnkSet rootFolder( MimeType::appsFolderName ( )); 87 AppLnkSet rootFolder( MimeType::appsFolderName ( ));
@@ -90,18 +94,22 @@ void TabsSettings::init ( )
90 QImage img ( Resource::loadImage ( "DocsIcon" )); 94 QImage img ( Resource::loadImage ( "DocsIcon" ));
91 QPixmap pix; 95 QPixmap pix;
92 pix = img. smoothScale ( AppLnk::smallIconSize ( ), AppLnk::smallIconSize ( )); 96 pix = img. smoothScale ( AppLnk::smallIconSize ( ), AppLnk::smallIconSize ( ));
93 m_list-> insertItem ( pix, tr( "Documents" )); 97 m_list-> insertItem ( pix, tr( "Documents" ));
94 m_ids += "Documents"; // No tr 98 m_ids += "Documents"; // No tr
95 99
96 readTabSettings ( ); 100 Config cfg ( "Launcher" );
101
102 readTabSettings ( cfg );
103
104 cfg. setGroup ( "GUI" );
105 m_busyblink-> setChecked ( cfg. readEntry ( "BusyType" ). lower ( ) == "blink" );
97} 106}
98 107
99void TabsSettings::readTabSettings ( ) 108void TabsSettings::readTabSettings ( Config &cfg )
100{ 109{
101 Config cfg ( "Launcher" );
102 QString grp ( "Tab %1" ); // No tr 110 QString grp ( "Tab %1" ); // No tr
103 m_tabs. clear ( ); 111 m_tabs. clear ( );
104 112
105 for ( QStringList::Iterator it = m_ids. begin ( ); it != m_ids. end ( ); ++it ) { 113 for ( QStringList::Iterator it = m_ids. begin ( ); it != m_ids. end ( ); ++it ) {
106 TabConfig tc; 114 TabConfig tc;
107 tc. m_view = TabConfig::Icon; 115 tc. m_view = TabConfig::Icon;
@@ -195,12 +203,20 @@ void TabsSettings::accept ( )
195 fe << *it << tc. m_font_family; 203 fe << *it << tc. m_font_family;
196 fe << tc. m_font_size; 204 fe << tc. m_font_size;
197 fe << tc. m_font_weight << ( tc. m_font_italic ? 1 : 0 ); 205 fe << tc. m_font_weight << ( tc. m_font_italic ? 1 : 0 );
198 206
199 tc. m_changed = false; 207 tc. m_changed = false;
200 } 208 }
209 cfg. setGroup ( "GUI" );
210 QString busytype = QString ( m_busyblink-> isChecked ( ) ? "blink" : "" );
211
212 cfg. writeEntry ( "BusyType", busytype );
213 {
214 QCopEnvelope e ( "QPE/Launcher", "setBusyIndicatorType(QString)" );
215 e << busytype;
216 }
201} 217}
202 218
203void TabsSettings::newClicked ( ) 219void TabsSettings::newClicked ( )
204{ 220{
205 QMessageBox::information ( this, tr( "Error" ), tr( "Not implemented yet" )); 221 QMessageBox::information ( this, tr( "Error" ), tr( "Not implemented yet" ));
206} 222}