[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: Bug#27313: Make pinnable menus optional
From:       Stephan Binner <Stephan.Binner () gmx ! de>
Date:       2001-11-30 11:22:14
[Download RAW message or body]

On Friday 30 November 2001 03:54, Jeff Tranter wrote:

> Here is a suggested patch that will make kicker follow the setting that 
> is in KGlobalSettings: The default is to enable tear off handles. To 
> disable it, add this line to your ~/.kde/share/config/kdeglobals file 
> in the [KDE] section: InsertTearOffHandle=false

Why should this option turn off only this one handle? I think of some-
thing like attached patch. Only problem beside BCI is, what identifier
should be returned if it isn't inserted, perhaps someone will use it?

This doesn't work with Kicker as KPanelMenu inherits QPopupMenu, why?

Bye,
   Steve
["global_turn_off_tear_off_handles.diff" (text/x-diff)]

Index: kpopupmenu.h
===================================================================
RCS file: /home/kde/kdelibs/kdeui/kpopupmenu.h,v
retrieving revision 1.9
diff -u -3 -p -r1.9 kpopupmenu.h
--- kpopupmenu.h	2001/10/26 21:52:58	1.9
+++ kpopupmenu.h	2001/11/30 11:02:44
@@ -131,6 +131,10 @@ public:
      */
     QPixmap titlePixmap(int id) const;
     /**
+     * Inserts a tear-off handle into the menu.
+     */
+    int insertTearOffHandle ( int id=-1, int index=-1 );
+    /**
      * Obsolete method provided for backwards compatibility only. Use the
      * normal constructor and insertTitle instead.
      */
Index: kpopupmenu.cpp
===================================================================
RCS file: /home/kde/kdelibs/kdeui/kpopupmenu.cpp,v
retrieving revision 1.10
diff -u -3 -p -r1.10 kpopupmenu.cpp
--- kpopupmenu.cpp	2001/10/10 17:40:39	1.10
+++ kpopupmenu.cpp	2001/11/30 11:02:50
@@ -248,6 +248,12 @@ QPixmap KPopupMenu::titlePixmap(int id) 
     return(tmp);
 }
 
+int KPopupMenu::insertTearOffHandle ( int id, int index )
+{
+  if (KGlobalSettings::insertTearOffHandle())
+    return QPopupMenu::insertTearOffHandle( id, index );
+  return 0;
+}
 
 // Obselete
 KPopupMenu::KPopupMenu(const QString& title, QWidget *parent, const char *name)


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic