summaryrefslogtreecommitdiff
authorzecke <zecke>2004-07-15 19:01:40 (UTC)
committer zecke <zecke>2004-07-15 19:01:40 (UTC)
commitdffb08422497af5ccb0e66fc3434f171d57c2216 (patch) (unidiff)
tree5d6407302546f769f6017b406efe8fc12ee7a4d5
parentc96296038ac74083c5bf8009449cb22392cd02dc (diff)
downloadopie-dffb08422497af5ccb0e66fc3434f171d57c2216.zip
opie-dffb08422497af5ccb0e66fc3434f171d57c2216.tar.gz
opie-dffb08422497af5ccb0e66fc3434f171d57c2216.tar.bz2
-Remove double 'connection' of num/capslock/symbol toggle from launcher.
taskbar itself takes care about it -Make having the LockKeyState indicator in the taskbar configurable and have it enabled by default for Sharp Zaurus which actually got a keyboard :) Initial KeyLock State is still not defined/used from within Sharp
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--Rules.make3
-rw-r--r--config.in5
-rw-r--r--core/launcher/launcher.cpp20
-rw-r--r--core/launcher/launcher.h5
-rw-r--r--core/launcher/taskbar.cpp2
5 files changed, 10 insertions, 25 deletions
diff --git a/Rules.make b/Rules.make
index 8511422..e08e5c1 100644
--- a/Rules.make
+++ b/Rules.make
@@ -70,24 +70,27 @@ ifeq ($(CONFIG_QT_QWS_ALLOW_CLOCK),y)
70 echo DEFINES += QT_QWS_ALLOW_OVERCLOCK >> $@ 70 echo DEFINES += QT_QWS_ALLOW_OVERCLOCK >> $@
71endif 71endif
72ifeq ($(CONFIG_OPIE_NEW_ALLOC),y) 72ifeq ($(CONFIG_OPIE_NEW_ALLOC),y)
73 echo DEFINES += OPIE_NEW_MALLOC >> $@ 73 echo DEFINES += OPIE_NEW_MALLOC >> $@
74endif 74endif
75ifeq ($(CONFIG_OPIE_NO_SOUND_PCM_READ_BITS),y) 75ifeq ($(CONFIG_OPIE_NO_SOUND_PCM_READ_BITS),y)
76 echo DEFINES += OPIE_NO_SOUND_PCM_READ_BITS >> $@ 76 echo DEFINES += OPIE_NO_SOUND_PCM_READ_BITS >> $@
77endif 77endif
78 echo DEFINES += OPIE_SOUND_FRAGMENT_SHIFT=$(CONFIG_OPIE_SOUND_FRAGMENT_SHIFT) >> $@ 78 echo DEFINES += OPIE_SOUND_FRAGMENT_SHIFT=$(CONFIG_OPIE_SOUND_FRAGMENT_SHIFT) >> $@
79ifeq ($(CONFIG_OPIE_WE_VERSION_OVERRIDE),y) 79ifeq ($(CONFIG_OPIE_WE_VERSION_OVERRIDE),y)
80 echo DEFINES += OPIE_WE_VERSION=$(CONFIG_OPIE_WE_VERSION) >> $@ 80 echo DEFINES += OPIE_WE_VERSION=$(CONFIG_OPIE_WE_VERSION) >> $@
81endif 81endif
82ifeq ($(CONFIG_OPIE_TASKBAR_LOCK_KEY_STATE),y)
83 echo DEFINES += OPIE_TASKBAR_LOCK_KEY_STATE >> $@
84 endif
82# Write LIB dirs and INC dirs... 85# Write LIB dirs and INC dirs...
83ifeq ($(CONFIG_LIBETPAN_DEP),y) 86ifeq ($(CONFIG_LIBETPAN_DEP),y)
84 echo LIBETPAN_LIB_DIR = $(CONFIG_LIBETPAN_LIB_DIR) >> $@ 87 echo LIBETPAN_LIB_DIR = $(CONFIG_LIBETPAN_LIB_DIR) >> $@
85 echo LIBETPAN_INC_DIR = $(CONFIG_LIBETPAN_INC_DIR) >> $@ 88 echo LIBETPAN_INC_DIR = $(CONFIG_LIBETPAN_INC_DIR) >> $@
86endif 89endif
87ifeq ($(CONFIG_LIBPCAP_DEP),y) 90ifeq ($(CONFIG_LIBPCAP_DEP),y)
88 echo LIBPCAP_LIB_DIR = $(CONFIG_LIBPCAP_LIB_DIR) >> $@ 91 echo LIBPCAP_LIB_DIR = $(CONFIG_LIBPCAP_LIB_DIR) >> $@
89 echo LIBPCAP_INC_DIR = $(CONFIG_LIBPCAP_INC_DIR) >> $@ 92 echo LIBPCAP_INC_DIR = $(CONFIG_LIBPCAP_INC_DIR) >> $@
90endif 93endif
91ifeq ($(CONFIG_LIBSQLITE_DEP),y) 94ifeq ($(CONFIG_LIBSQLITE_DEP),y)
92 echo LIBSQLITE_LIB_DIR = $(CONFIG_LIBSQLITE_LIB_DIR) >> $@ 95 echo LIBSQLITE_LIB_DIR = $(CONFIG_LIBSQLITE_LIB_DIR) >> $@
93 echo LIBSQLITE_INC_DIR = $(CONFIG_LIBSQLITE_INC_DIR) >> $@ 96 echo LIBSQLITE_INC_DIR = $(CONFIG_LIBSQLITE_INC_DIR) >> $@
diff --git a/config.in b/config.in
index 9586a33..c981fd1 100644
--- a/config.in
+++ b/config.in
@@ -138,24 +138,29 @@ config QT_QWS_ALLOW_OVERCLOCK
138 depends TARGET_RAMSES 138 depends TARGET_RAMSES
139 default n 139 default n
140 140
141config USE_FILE_NOTIFICATION 141config USE_FILE_NOTIFICATION
142 boolean "Substitute (some) polling interfaces with OFileNotifier" 142 boolean "Substitute (some) polling interfaces with OFileNotifier"
143 default y 143 default y
144 144
145config OPIE_NEW_ALLOC 145config OPIE_NEW_ALLOC
146 boolean "Use malloc and free for the implementation" 146 boolean "Use malloc and free for the implementation"
147 default y if TARGET_RAMSES || TARGET_IPAQ || TARGET_SIMPAD || TARGET_SHARP 147 default y if TARGET_RAMSES || TARGET_IPAQ || TARGET_SIMPAD || TARGET_SHARP
148 default n if ! (TARGET_IPAQ || TARGET_SIMPAD || TARGET_RAMSES || TARGET_SHARP) 148 default n if ! (TARGET_IPAQ || TARGET_SIMPAD || TARGET_RAMSES || TARGET_SHARP)
149 149
150config OPIE_TASKBAR_LOCK_KEY_STATE
151 boolean "Have a KeyLock state indicator on the taskbar"
152 default y if TARGET_SHARP
153 default n if !TARGET_SHARP
154
150config OPIE_NO_SOUND_PCM_READ_BITS 155config OPIE_NO_SOUND_PCM_READ_BITS
151 boolean "There is not a pcm_read_bits io control" 156 boolean "There is not a pcm_read_bits io control"
152 default y if TARGET_SHARP 157 default y if TARGET_SHARP
153 default n if ! TARGET_SHARP 158 default n if ! TARGET_SHARP
154endmenu 159endmenu
155 160
156menu "Dependencies" 161menu "Dependencies"
157 source dependencies.in 162 source dependencies.in
158endmenu 163endmenu
159 164
160menu "Base" 165menu "Base"
161 choice 166 choice
diff --git a/core/launcher/launcher.cpp b/core/launcher/launcher.cpp
index 87a54bf..aa357ca 100644
--- a/core/launcher/launcher.cpp
+++ b/core/launcher/launcher.cpp
@@ -464,29 +464,24 @@ void Launcher::createGUI()
464 // we have a pretty good idea how big we'll be 464 // we have a pretty good idea how big we'll be
465 setGeometry( 0, 0, qApp->desktop()->width(), qApp->desktop()->height() ); 465 setGeometry( 0, 0, qApp->desktop()->width(), qApp->desktop()->height() );
466 466
467 tb = new TaskBar; 467 tb = new TaskBar;
468 tabs = new LauncherTabWidget( this ); 468 tabs = new LauncherTabWidget( this );
469 setCentralWidget( tabs ); 469 setCentralWidget( tabs );
470 470
471 ServerInterface::dockWidget( tb, ServerInterface::Bottom ); 471 ServerInterface::dockWidget( tb, ServerInterface::Bottom );
472 tb->show(); 472 tb->show();
473 473
474 qApp->installEventFilter( this ); 474 qApp->installEventFilter( this );
475 475
476
477 connect( qApp, SIGNAL(symbol()), this, SLOT(toggleSymbolInput()) );
478 connect( qApp, SIGNAL(numLockStateToggle()), this, SLOT(toggleNumLockState()) );
479 connect( qApp, SIGNAL(capsLockStateToggle()), this, SLOT(toggleCapsLockState()) );
480
481 connect( tb, SIGNAL(tabSelected(const QString&)), 476 connect( tb, SIGNAL(tabSelected(const QString&)),
482 this, SLOT(showTab(const QString&)) ); 477 this, SLOT(showTab(const QString&)) );
483 connect( tabs, SIGNAL(selected(const QString&)), 478 connect( tabs, SIGNAL(selected(const QString&)),
484 this, SLOT(viewSelected(const QString&)) ); 479 this, SLOT(viewSelected(const QString&)) );
485 connect( tabs, SIGNAL(clicked(const AppLnk*)), 480 connect( tabs, SIGNAL(clicked(const AppLnk*)),
486 this, SLOT(select(const AppLnk*))); 481 this, SLOT(select(const AppLnk*)));
487 connect( tabs, SIGNAL(rightPressed(AppLnk*)), 482 connect( tabs, SIGNAL(rightPressed(AppLnk*)),
488 this, SLOT(properties(AppLnk*))); 483 this, SLOT(properties(AppLnk*)));
489 484
490#if defined(Q_WS_QWS) && !defined(QT_NO_COP) 485#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
491 QCopChannel* sysChannel = new QCopChannel( "QPE/System", this ); 486 QCopChannel* sysChannel = new QCopChannel( "QPE/System", this );
492 connect( sysChannel, SIGNAL(received(const QCString&,const QByteArray&)), 487 connect( sysChannel, SIGNAL(received(const QCString&,const QByteArray&)),
@@ -545,39 +540,24 @@ bool Launcher::eventFilter( QObject*, QEvent *ev )
545 Global::terminateBuiltin("calibrate"); // No tr 540 Global::terminateBuiltin("calibrate"); // No tr
546 tb->launchStartMenu(); 541 tb->launchStartMenu();
547 } 542 }
548 return TRUE; 543 return TRUE;
549 } 544 }
550 } 545 }
551#else 546#else
552 Q_UNUSED(ev); 547 Q_UNUSED(ev);
553#endif 548#endif
554 return FALSE; 549 return FALSE;
555} 550}
556 551
557void Launcher::toggleSymbolInput()
558{
559 tb->toggleSymbolInput();
560}
561
562void Launcher::toggleNumLockState()
563{
564 tb->toggleNumLockState();
565}
566
567void Launcher::toggleCapsLockState()
568{
569 tb->toggleCapsLockState();
570}
571
572static bool isVisibleWindow(int wid) 552static bool isVisibleWindow(int wid)
573{ 553{
574#ifdef Q_WS_QWS 554#ifdef Q_WS_QWS
575 const QList<QWSWindow> &list = qwsServer->clientWindows(); 555 const QList<QWSWindow> &list = qwsServer->clientWindows();
576 QWSWindow* w; 556 QWSWindow* w;
577 for (QListIterator<QWSWindow> it(list); (w=it.current()); ++it) { 557 for (QListIterator<QWSWindow> it(list); (w=it.current()); ++it) {
578 if ( w->winId() == wid ) 558 if ( w->winId() == wid )
579 return !w->isFullyObscured(); 559 return !w->isFullyObscured();
580 } 560 }
581#endif 561#endif
582 return FALSE; 562 return FALSE;
583} 563}
diff --git a/core/launcher/launcher.h b/core/launcher/launcher.h
index 29bd7db..2eaf77c 100644
--- a/core/launcher/launcher.h
+++ b/core/launcher/launcher.h
@@ -126,28 +126,25 @@ public:
126 126
127public slots: 127public slots:
128 void viewSelected(const QString&); 128 void viewSelected(const QString&);
129 void showTab(const QString&); 129 void showTab(const QString&);
130 void select( const AppLnk * ); 130 void select( const AppLnk * );
131 void properties( AppLnk * ); 131 void properties( AppLnk * );
132 void makeVisible(); 132 void makeVisible();
133 133
134signals: 134signals:
135 void executing( const AppLnk * ); 135 void executing( const AppLnk * );
136 136
137private slots: 137private slots:
138 void systemMessage( const QCString &, const QByteArray &); 138 void systemMessage( const QCString &, const QByteArray &);
139 void toggleSymbolInput();
140 void toggleNumLockState();
141 void toggleCapsLockState();
142 139
143protected: 140protected:
144 bool eventFilter( QObject *o, QEvent *ev ); 141 bool eventFilter( QObject *o, QEvent *ev );
145 142
146private: 143private:
147 void updateApps(); 144 void updateApps();
148 void loadDocs(); 145 void loadDocs();
149 void updateDocs(); 146 void updateDocs();
150 void updateTabs(); 147 void updateTabs();
151 148
152 LauncherTabWidget *tabs; 149 LauncherTabWidget *tabs;
153 QStringList ids; 150 QStringList ids;
diff --git a/core/launcher/taskbar.cpp b/core/launcher/taskbar.cpp
index 86e0d0d..abe238f 100644
--- a/core/launcher/taskbar.cpp
+++ b/core/launcher/taskbar.cpp
@@ -198,25 +198,25 @@ TaskBar::TaskBar() : QHBox(0, 0, WStyle_Customize | WStyle_Tool | WStyle_StaysOn
198 waitIcon = new Wait( this ); 198 waitIcon = new Wait( this );
199 (void) new AppIcons( this ); 199 (void) new AppIcons( this );
200 200
201 sysTray = new SysTray( this ); 201 sysTray = new SysTray( this );
202 202
203 /* ### FIXME plugin loader and safe mode */ 203 /* ### FIXME plugin loader and safe mode */
204#if 0 204#if 0
205 if (PluginLoader::inSafeMode()) 205 if (PluginLoader::inSafeMode())
206 (void)new SafeMode( this ); 206 (void)new SafeMode( this );
207#endif 207#endif
208 208
209 // ## make customizable in some way? 209 // ## make customizable in some way?
210#ifdef QT_QWS_CUSTOM 210#ifdef OPIE_TASKBAR_LOCK_KEY_STATE
211 lockState = new LockKeyState( this ); 211 lockState = new LockKeyState( this );
212#else 212#else
213 lockState = 0; 213 lockState = 0;
214#endif 214#endif
215 215
216#if defined(Q_WS_QWS) 216#if defined(Q_WS_QWS)
217#if !defined(QT_NO_COP) 217#if !defined(QT_NO_COP)
218 QCopChannel *channel = new QCopChannel( "QPE/TaskBar", this ); 218 QCopChannel *channel = new QCopChannel( "QPE/TaskBar", this );
219 connect( channel, SIGNAL(received(const QCString&,const QByteArray&)), 219 connect( channel, SIGNAL(received(const QCString&,const QByteArray&)),
220 this, SLOT(receive(const QCString&,const QByteArray&)) ); 220 this, SLOT(receive(const QCString&,const QByteArray&)) );
221#endif 221#endif
222#endif 222#endif