LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File applet-no-arrow.patch of Package kdebase3 (Project openSUSE:Factory)

diff -wruN kdebase-3.5.10.orig/kicker/kicker/core/applethandle.cpp kdebase-3.5.10/kicker/kicker/core/applethandle.cpp
--- kdebase-3.5.10.orig/kicker/kicker/core/applethandle.cpp	2008-08-19 22:16:56.000000000 +0400
+++ kdebase-3.5.10/kicker/kicker/core/applethandle.cpp	2012-03-01 17:38:54.720182058 +0400
@@ -58,7 +58,7 @@
     m_dragBar->installEventFilter(this);
     m_layout->addWidget(m_dragBar);
 
-    if (kapp->authorizeKAction("kicker_rmb"))
+ /*   if (kapp->authorizeKAction("kicker_rmb"))
     {
         m_menuButton = new AppletHandleButton( this );
         m_menuButton->installEventFilter(this);
@@ -67,7 +67,7 @@
         connect(m_menuButton, SIGNAL(pressed()),
                 this, SLOT(menuButtonPressed()));
         QToolTip::add(m_menuButton, i18n("%1 menu").arg(parent->info().name()));
-    }
+    } */
 
     QToolTip::add(this, i18n("%1 applet handle").arg(parent->info().name()));
     resetLayout();
@@ -236,7 +236,7 @@
         }
     }
 
-    if (m_menuButton && e->type() == QEvent::MouseButtonPress)
+/*    if (m_menuButton && e->type() == QEvent::MouseButtonPress)
     {
         QMouseEvent* ev = static_cast<QMouseEvent*>(e);
         if (ev->button() == RightButton)
@@ -249,6 +249,20 @@
 
             return true;
         }
+    } */
+
+    if (e->type() == QEvent::MouseButtonPress)
+    {
+        QMouseEvent* ev = static_cast<QMouseEvent*>(e);
+        if (ev->button() == RightButton)
+        {
+            if (kapp->authorizeKAction("kicker_rmb"))
+            {
+                emit showAppletMenu();
+                return true;
+            }
+
+        }
     }
 
     return QWidget::eventFilter(o, e);    // standard event processing