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

List:       kde-commits
Subject:    branches/work/plasma-desktoplayout/kdelibs-plasma (silent)
From:       Ambroz Bizjak <ambrop7 () gmail ! com>
Date:       2009-01-28 0:39:44
Message-ID: 1233103184.626176.769.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 917538 by abizjak:

SVN_SILENT Merge upstream changes.


 M  +9 -9      applet.cpp  
 M  +8 -9      containment.cpp  


--- branches/work/plasma-desktoplayout/kdelibs-plasma/applet.cpp #917537:917538
@@ -25,7 +25,6 @@
 #include <cmath>
 #include <limits>
 
-#include <QAction>
 #include <QApplication>
 #include <QEvent>
 #include <QFile>
@@ -906,7 +905,7 @@
         //FIXME desktop containments can't be removed while in use.
         //it's kinda silly to have a keyboard shortcut for something that can only \
be used when the  //shortcut isn't active.
-        QAction *closeApplet = new QAction(this);
+        KAction *closeApplet = new KAction(this);
         closeApplet->setIcon(KIcon("edit-delete"));
         closeApplet->setEnabled(unlocked);
         closeApplet->setVisible(unlocked);
@@ -1275,19 +1274,19 @@
     d->hasConfigurationInterface = hasInterface;
     //config action
     //TODO respect security when it's implemented (4.2)
-    QAction *configAction = d->actions.action("configure");
+    KAction *configAction = qobject_cast<KAction*>(d->actions.action("configure"));
     if (hasInterface) {
         if (!configAction) { //should be always true
-            configAction = new QAction(i18n("%1 Settings", name()), this);
+            configAction = new KAction(i18n("%1 Settings", name()), this);
             configAction->setIcon(KIcon("configure"));
             configAction->setShortcutContext(Qt::WidgetShortcut); //don't clash with \
other views  bool unlocked = immutability() == Mutable;
             bool canConfig = unlocked || \
KAuthorized::authorize("PlasmaAllowConfigureWhenLocked");  \
configAction->setVisible(canConfig);  configAction->setEnabled(canConfig);
+            //XXX these shortcuts are also in setIsContainment. keep them in sync.
             if (d->isContainment) {
-                //FIXME containments don't seem to use this action any more
-                //configAction->setShortcut(QKeySequence("ctrl+shift+s"));
+                configAction->setShortcut(QKeySequence("alt+d,alt+s"));
                 connect(configAction, SIGNAL(triggered()), this, \
SLOT(requestConfiguration()));  } else {
                 configAction->setShortcut(QKeySequence("alt+d,s"));
@@ -1823,16 +1822,17 @@
         }
     }
 
-    QAction *configAction = actions.action("configure");
+    KAction *configAction = qobject_cast<KAction*>(actions.action("configure"));
     if (configAction) {
         QObject::disconnect(configAction, SIGNAL(triggered()), q, \
                SLOT(requestConfiguration()));
         QObject::disconnect(configAction, SIGNAL(triggered(bool)), q, \
SLOT(showConfigurationInterface())); +        //XXX these shortcuts are also in \
setHasConfigurationInterface. keep them in sync.  if (nowIsContainment) {
             //kDebug() << "I am a containment";
-            configAction->setShortcut(QKeySequence("ctrl+shift+s"));
+            configAction->setShortcut(QKeySequence("alt+d,alt+s"));
             QObject::connect(configAction, SIGNAL(triggered()), q, \
SLOT(requestConfiguration()));  } else {
-            configAction->setShortcut(QKeySequence("ctrl+s"));
+            configAction->setShortcut(QKeySequence("alt+d,s"));
             QObject::connect(configAction, SIGNAL(triggered(bool)), q, \
SLOT(showConfigurationInterface()));  }
     }
--- branches/work/plasma-desktoplayout/kdelibs-plasma/containment.cpp #917537:917538
@@ -21,7 +21,6 @@
 #include "containment.h"
 #include "private/containment_p.h"
 
-#include <QAction>
 #include <QFile>
 #include <QGraphicsSceneContextMenuEvent>
 #include <QGraphicsView>
@@ -139,7 +138,7 @@
     //common actions
     bool unlocked = immutability() == Mutable;
 
-    QAction *appletBrowserAction = new QAction(i18n("Add Widgets..."), this);
+    KAction *appletBrowserAction = new KAction(i18n("Add Widgets..."), this);
     appletBrowserAction->setIcon(KIcon("list-add"));
     appletBrowserAction->setVisible(unlocked);
     appletBrowserAction->setEnabled(unlocked);
@@ -148,14 +147,14 @@
     appletBrowserAction->setShortcut(QKeySequence("alt+d,a"));
     d->actions().addAction("add widgets", appletBrowserAction);
 
-    QAction *action = new QAction(i18n("Next Widget"), this);
+    KAction *action = new KAction(i18n("Next Widget"), this);
     //no icon
     connect(action, SIGNAL(triggered()), this, SLOT(focusNextApplet()));
     action->setShortcutContext(Qt::WidgetShortcut);
     action->setShortcut(QKeySequence("alt+d,n"));
     d->actions().addAction("next applet", action);
 
-    action = new QAction(i18n("Previous Widget"), this);
+    action = new KAction(i18n("Previous Widget"), this);
     //no icon
     connect(action, SIGNAL(triggered()), this, SLOT(focusPreviousApplet()));
     action->setShortcutContext(Qt::WidgetShortcut);
@@ -165,8 +164,8 @@
     if (immutability() != SystemImmutable) {
         //FIXME I'm not certain this belongs in Containment
         //but it sure is nice to have the keyboard shortcut in every containment by \
                default
-        QAction *lockDesktopAction =
-            new QAction(unlocked ? i18n("Lock Widgets") : i18n("Unlock Widgets"), \
this); +        KAction *lockDesktopAction =
+            new KAction(unlocked ? i18n("Lock Widgets") : i18n("Unlock Widgets"), \
                this);
         lockDesktopAction->setIcon(KIcon(unlocked ? "object-locked" : \
"object-unlocked"));  connect(lockDesktopAction, SIGNAL(triggered(bool)),
                 this, SLOT(toggleDesktopImmutability()));
@@ -177,7 +176,7 @@
 
     if (d->type != PanelContainment &&
         d->type != CustomPanelContainment) {
-        QAction *zoomAction = new QAction(i18n("Zoom In"), this);
+        KAction *zoomAction = new KAction(i18n("Zoom In"), this);
         zoomAction->setIcon(KIcon("zoom-in"));
         connect(zoomAction, SIGNAL(triggered(bool)), this, SLOT(zoomIn()));
         zoomAction->setShortcutContext(Qt::WidgetShortcut);
@@ -188,14 +187,14 @@
         zoomAction->setShortcuts(keys);
         d->actions().addAction("zoom in", zoomAction);
 
-        zoomAction = new QAction(i18n("Zoom Out"), this);
+        zoomAction = new KAction(i18n("Zoom Out"), this);
         zoomAction->setIcon(KIcon("zoom-out"));
         connect(zoomAction, SIGNAL(triggered(bool)), this, SLOT(zoomOut()));
         zoomAction->setShortcutContext(Qt::WidgetShortcut);
         zoomAction->setShortcut(QKeySequence("alt+d,-"));
         d->actions().addAction("zoom out", zoomAction);
 
-        QAction *activityAction = new QAction(i18n("Add Activity"), this);
+        KAction *activityAction = new KAction(i18n("Add Activity"), this);
         activityAction->setIcon(KIcon("list-add"));
         activityAction->setVisible(unlocked);
         activityAction->setEnabled(unlocked);


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

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