[Kget] [Bug 96190] ability to close drop target via context menu

Pino Toscano toscano.pino at tiscali.it
Sat Mar 5 18:30:27 CET 2005


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=96190         
toscano.pino tiscali it changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From toscano.pino tiscali it  2005-03-05 18:30 -------
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()));



More information about the Kget mailing list