summaryrefslogtreecommitdiff
path: root/core
authorzecke <zecke>2004-07-15 19:01:40 (UTC)
committer zecke <zecke>2004-07-15 19:01:40 (UTC)
commitdffb08422497af5ccb0e66fc3434f171d57c2216 (patch) (side-by-side diff)
tree5d6407302546f769f6017b406efe8fc12ee7a4d5 /core
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 (limited to 'core') (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/launcher.cpp20
-rw-r--r--core/launcher/launcher.h5
-rw-r--r--core/launcher/taskbar.cpp2
3 files changed, 2 insertions, 25 deletions
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
@@ -452,53 +452,48 @@ Launcher::Launcher()
{
tabs = 0;
tb = 0;
Config cfg( "Launcher" );
cfg.setGroup( "DocTab" );
docTabEnabled = cfg.readBoolEntry( "Enable", true );
}
void Launcher::createGUI()
{
setCaption( tr("Launcher") );
// we have a pretty good idea how big we'll be
setGeometry( 0, 0, qApp->desktop()->width(), qApp->desktop()->height() );
tb = new TaskBar;
tabs = new LauncherTabWidget( this );
setCentralWidget( tabs );
ServerInterface::dockWidget( tb, ServerInterface::Bottom );
tb->show();
qApp->installEventFilter( this );
-
- connect( qApp, SIGNAL(symbol()), this, SLOT(toggleSymbolInput()) );
- connect( qApp, SIGNAL(numLockStateToggle()), this, SLOT(toggleNumLockState()) );
- connect( qApp, SIGNAL(capsLockStateToggle()), this, SLOT(toggleCapsLockState()) );
-
connect( tb, SIGNAL(tabSelected(const QString&)),
this, SLOT(showTab(const QString&)) );
connect( tabs, SIGNAL(selected(const QString&)),
this, SLOT(viewSelected(const QString&)) );
connect( tabs, SIGNAL(clicked(const AppLnk*)),
this, SLOT(select(const AppLnk*)));
connect( tabs, SIGNAL(rightPressed(AppLnk*)),
this, SLOT(properties(AppLnk*)));
#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
QCopChannel* sysChannel = new QCopChannel( "QPE/System", this );
connect( sysChannel, SIGNAL(received(const QCString&,const QByteArray&)),
this, SLOT(systemMessage(const QCString&,const QByteArray&)) );
#endif
// all documents
QImage img( Resource::loadImage( "DocsIcon" ) );
QPixmap pm;
pm = img.smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() );
// It could add this itself if it handles docs
tabs->newView("Documents", pm, tr("Documents") )->setToolsEnabled( TRUE );
QTimer::singleShot( 0, tabs, SLOT( initLayout() ) );
@@ -533,63 +528,48 @@ void Launcher::destroyGUI()
}
bool Launcher::eventFilter( QObject*, QEvent *ev )
{
#ifdef QT_QWS_CUSTOM
if ( ev->type() == QEvent::KeyPress ) {
QKeyEvent *ke = (QKeyEvent *)ev;
if ( ke->key() == Qt::Key_F11 ) { // menu key
QWidget *active = qApp->activeWindow();
if ( active && active->isPopup() )
active->close();
else {
Global::terminateBuiltin("calibrate"); // No tr
tb->launchStartMenu();
}
return TRUE;
}
}
#else
Q_UNUSED(ev);
#endif
return FALSE;
}
-void Launcher::toggleSymbolInput()
-{
- tb->toggleSymbolInput();
-}
-
-void Launcher::toggleNumLockState()
-{
- tb->toggleNumLockState();
-}
-
-void Launcher::toggleCapsLockState()
-{
- tb->toggleCapsLockState();
-}
-
static bool isVisibleWindow(int wid)
{
#ifdef Q_WS_QWS
const QList<QWSWindow> &list = qwsServer->clientWindows();
QWSWindow* w;
for (QListIterator<QWSWindow> it(list); (w=it.current()); ++it) {
if ( w->winId() == wid )
return !w->isFullyObscured();
}
#endif
return FALSE;
}
void Launcher::viewSelected(const QString& s)
{
setCaption( s + tr(" - Launcher") );
}
void Launcher::showTab(const QString& id)
{
tabs->categoryBar->showTab(id);
raise();
}
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
@@ -114,46 +114,43 @@ public:
void aboutToAddEnd();
void allDocumentsRemoved();
void documentChanged( const DocLnk& oldDoc, const DocLnk& newDoc );
void storageChanged( const QList<FileSystem> & );
void applicationScanningProgress( int percent );
void documentScanningProgress( int percent );
bool requiresApplications() const { return TRUE; }
bool requiresDocuments() const;
void showLoadingDocs();
void showDocTab();
QStringList idList() const { return ids; }
public slots:
void viewSelected(const QString&);
void showTab(const QString&);
void select( const AppLnk * );
void properties( AppLnk * );
void makeVisible();
signals:
void executing( const AppLnk * );
private slots:
- void systemMessage( const QCString &, const QByteArray &);
- void toggleSymbolInput();
- void toggleNumLockState();
- void toggleCapsLockState();
+ void systemMessage( const QCString &, const QByteArray &);
protected:
bool eventFilter( QObject *o, QEvent *ev );
private:
void updateApps();
void loadDocs();
void updateDocs();
void updateTabs();
LauncherTabWidget *tabs;
QStringList ids;
TaskBar *tb;
bool docTabEnabled;
};
#endif // LAUNCHERVIEW_H
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
@@ -186,49 +186,49 @@ TaskBar::TaskBar() : QHBox(0, 0, WStyle_Customize | WStyle_Tool | WStyle_StaysOn
inputMethods = new InputMethods( this );
connect( inputMethods, SIGNAL(inputToggled(bool)),
this, SLOT(calcMaxWindowRect()) );
stack = new QWidgetStack( this );
stack->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Minimum ) );
label = new QLabel(stack);
runningAppBar = new RunningAppBar(stack);
stack->raiseWidget(runningAppBar);
waitIcon = new Wait( this );
(void) new AppIcons( this );
sysTray = new SysTray( this );
/* ### FIXME plugin loader and safe mode */
#if 0
if (PluginLoader::inSafeMode())
(void)new SafeMode( this );
#endif
// ## make customizable in some way?
-#ifdef QT_QWS_CUSTOM
+#ifdef OPIE_TASKBAR_LOCK_KEY_STATE
lockState = new LockKeyState( this );
#else
lockState = 0;
#endif
#if defined(Q_WS_QWS)
#if !defined(QT_NO_COP)
QCopChannel *channel = new QCopChannel( "QPE/TaskBar", this );
connect( channel, SIGNAL(received(const QCString&,const QByteArray&)),
this, SLOT(receive(const QCString&,const QByteArray&)) );
#endif
#endif
waitTimer = new QTimer( this );
connect( waitTimer, SIGNAL( timeout() ), this, SLOT( stopWait() ) );
clearer = new QTimer( this );
QObject::connect(clearer, SIGNAL(timeout()), SLOT(clearStatusBar()));
connect( qApp, SIGNAL(symbol()), this, SLOT(toggleSymbolInput()) );
connect( qApp, SIGNAL(numLockStateToggle()), this, SLOT(toggleNumLockState()) );
connect( qApp, SIGNAL(capsLockStateToggle()), this, SLOT(toggleCapsLockState()) );
}
void TaskBar::setStatusMessage( const QString &text )
{