[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdenetwork/kget
From: Pino Toscano <toscano.pino () tiscali ! it>
Date: 2005-03-05 17:16:00
Message-ID: 20050305171600.C99F22226 () office ! kde ! org
[Download RAW message or body]
CVS commit by pino:
Plugging the Show/Hide Drop Target action to drop target popup menu and to tray icon popup menu.
This should implement wishlist #96190: ability to close drop target via context menu
CCBUGS: 96190
M +3 -1 docking.cpp 1.29
M +8 -2 droptarget.cpp 1.26
M +3 -2 droptarget.h 1.11
M +1 -1 kmainwidget.cpp 1.116
--- kdenetwork/kget/docking.cpp #1.28:1.29
@@ -47,4 +47,6 @@ DockWidget::DockWidget(KMainWidget * _pa
// popup menu for right mouse button
KPopupMenu *popupMenu = contextMenu();
+ parent->action("drop_target")->plug(popupMenu);
+ popupMenu->insertSeparator();
parent->m_paPreferences->plug(popupMenu);
--- kdenetwork/kget/droptarget.cpp #1.25:1.26
@@ -27,8 +27,10 @@
#include <qpainter.h>
+#include <kaction.h>
#include <kapplication.h>
#include <kconfig.h>
#include <kiconloader.h>
#include <kglobalsettings.h>
+#include <kmainwindow.h>
#include <kwin.h>
#include <klocale.h>
@@ -49,5 +51,5 @@
#include "droptarget.h"
-DropTarget::DropTarget():QWidget()
+DropTarget::DropTarget(KMainWindow * mainWin):QWidget()
{
int x = ksettings.dropPosition.x();
@@ -92,4 +94,8 @@ DropTarget::DropTarget():QWidget()
pop_sticky = popupMenu->insertItem(i18n("Sticky"), this, SLOT(toggleSticky()));
+ popupMenu->insertSeparator();
+ mainWin->action("drop_target")->plug(popupMenu);
+ popupMenu->insertSeparator();
+
popupMenu->setItemChecked(pop_sticky, b_sticky);
kmain->m_paPreferences->plug(popupMenu);
--- kdenetwork/kget/droptarget.h #1.10:1.11
@@ -34,4 +34,5 @@
class KPopupMenu;
class KMainWidget;
+class KMainWindow;
class DropTarget:public QWidget
@@ -40,5 +41,5 @@ Q_OBJECT
public:
- DropTarget();
+ DropTarget(KMainWindow *);
~DropTarget();
--- kdenetwork/kget/kmainwidget.cpp #1.115:1.116
@@ -210,5 +210,5 @@ KMainWidget::KMainWidget(bool bStartDock
// Setup special windows
- kdrop = new DropTarget();
+ kdrop = new DropTarget(this);
kdock = new DockWidget(this);
connect(kdock, SIGNAL(quitSelected()), SLOT(slotQuit()));
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic