| Summary: | ability to close drop target via context menu | ||
|---|---|---|---|
| Product: | [Applications] kget | Reporter: | _ <praseodym+kdebugzilla> |
| Component: | general | Assignee: | KGet bugs <kget-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | wishlist | ||
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Compiled Sources | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
_
2005-01-02 23:56:44 UTC
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()));
CVS commit by pino:
Backporting the implementation of wishlist #96190: ability to close drop target via context menu
I can close it, now.
BUGS: 96190
M +3 -1 docking.cpp 1.27.2.2
M +8 -2 droptarget.cpp 1.25.2.1
M +3 -2 droptarget.h 1.10.8.1
M +1 -1 kmainwidget.cpp 1.114.2.1
--- kdenetwork/kget/docking.cpp #1.27.2.1:1.27.2.2
@@ -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.25.2.1
@@ -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.10.8.1
@@ -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.114:1.114.2.1
@@ -208,5 +208,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()));
|