Commits

Arne Babenhauserheide  committed fffa0e1

Added Ideas from Benny (more efficient circle creation, keyboard shortcuts, check if app open -> activate).

  • Participants
  • Parent commits 869b494

Comments (0)

Files changed (2)

 - Add a CLI fallback, so people can also access their actions via the shell. 
 - Talk to DBus directly (for higher performance). -> dbus-send --type=method_call --dest=org.kde.pyRad /MainApplication org.kde.KUniqueApplication.newInstance
   (from http://www.staerk.de/thorsten/index.php/Hacking_KDE)
+- Keyboard shortcuts (1, 2, 3, ... for the wheel items -> click paths to programs)
+- Check if an app is already open. If it is, simply switch to it (dbus -> get winID, forceActivateWindow(winID)?). 
 
 PyPI url: http://pypi.python.org/pypi/pyRadKDE
 """
         @return: True if the circle reached an end, None if it should continue existing."""
         if label.action is None:
             return True
-        if label.action is not None and label.action[0] == "[":
+        if label.action[0] == "[":
             # then it's a folder!
             # get its contents
             items = eval(label.action)
         # Now set the center icon
         self.circle[0].move(0.5*self.width() - 0.25*self.circle[0].width(), 0.5*self.height() - 0.75*self.circle[0].height())
 
+        # TODO: Check QPainterPath -> circle by percentage. 
         # And finally arrange all other items in a circle around the center.
         for i in self.circle[1:]:
             angle = 2 * pi * (self.circle.index(i) -1 ) / len(self.circle[1:])