[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdelibs/kio/misc
From: Zack Rusin <zack () kde ! org>
Date: 2003-08-11 22:58:21
[Download RAW message or body]
CVS commit by zrusin:
This was really getting on my nerves:
1) Making the tray use a decent icon.
2) Don't let the uiserver quit unless an option to do so was picked
from the gui.
M +18 -11 uiserver.cpp 1.100
M +3 -1 uiserver.h 1.56
--- kdelibs/kio/misc/uiserver.cpp #1.99:1.100
@@ -99,6 +99,7 @@ class UIServerSystemTray:public KSystemT
pop->insertItem(i18n("Settings..."), uis, SLOT(slotConfigure()));
pop->insertItem(i18n("Remove"), uis, SLOT(slotRemoveSystemTrayIcon()));
- setPixmap(UserIcon("I_need_an_icon"));
- actionCollection()->action("file_quit")->setEnabled(false);
+ setPixmap(SmallIcon("filesave"));
+ //actionCollection()->action("file_quit")->setEnabled(true);
+ KStdAction::quit(uis, SLOT(slotQuit()), actionCollection());
}
};
@@ -566,4 +567,5 @@ UIServer::UIServer()
,m_contextMenu(0)
,m_systemTray(0)
+,m_shuttingDown(false)
{
@@ -984,13 +986,4 @@ void UIServer::killJob( QCString observe
}
-
-void UIServer::closeEvent( QCloseEvent * e){
-#ifndef Q_WS_QWS //FIXME(E): Implement for QT Embedded
- KWin::iconifyWindow(winId());
-#endif
- e->accept();
-}
-
-
void UIServer::slotJobCanceled( ProgressItem *item ) {
kdDebug(7024) << "UIServer::slotJobCanceled appid=" << item->appId() << " jobid=" \
<< item->jobId() << endl; @@ -1004,4 +997,10 @@ void UIServer::slotJobCanceled( \
Progress
+void UIServer::slotQuit()
+{
+ m_shuttingDown = true;
+ kapp->quit();
+}
+
void UIServer::slotUpdate() {
// don't do anything if we don't have any inserted progress item
@@ -1314,4 +1313,12 @@ void UIServer::hideEvent(QHideEvent* e)
m_bShowList=false;
writeSettings();
+}
+
+bool UIServer::queryClose()
+{
+ if ( !m_shuttingDown ) {
+ hide();
+ return false;
+ }
}
--- kdelibs/kio/misc/uiserver.h #1.55:1.56
@@ -360,4 +360,5 @@ protected slots:
void slotUpdate();
+ void slotQuit();
void slotCancelCurrent();
@@ -375,7 +376,7 @@ protected:
virtual void resizeEvent(QResizeEvent* e);
- virtual void closeEvent( QCloseEvent * );
virtual void showEvent(QShowEvent*);
virtual void hideEvent(QHideEvent*);
+ virtual bool queryClose();
void setItemVisible( ProgressItem * item, bool visible );
@@ -401,4 +402,5 @@ private:
bool m_keepListOpen;
bool m_showSystemTray;
+ bool m_shuttingDown;
// true if there's a new job that hasn't been shown yet.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic