def __init__(self): super(KNotifyNotifier, self).__init__() self.__factory = None try: import pcop import pydcop except ImportError: pass else: if pydcop.anyAppCalled('knotify') is not None: self.__factory = pydcop.anyAppCalled
def connect(self, screenlet_settings): self.playerAPI = pydcop.anyAppCalled("amarok").player self.playerAPI2 = pydcop.anyAppCalled( "amarok").MainApplication - Interface
def is_active(self, dbus_iface, screenlet_settings): app = pydcop.anyAppCalled("amarok") if not app: return False else: return True
def __init__(self): import pydcop self._wait_start = None #FIXME: The following line will probably break things if I have to restart kdesktop. self._kdesktop = pydcop.anyAppCalled('kdesktop') self._tid = None
TODO: - Merge this with another idea of mine and whip up a nice GUI for it. """ __appname__ = "KDE GUI Fixes" __author__ = "Stephan Sokolow (deitarion/SSokolow)" __version__ = "0.1alpha1" __license__ = "GNU GPL 2.0 or newer" import pygtk pygtk.require('2.0') import gtk, gobject, logging import time, pydcop kwin = pydcop.anyAppCalled('kwin') SCROLL_ACTIONS = { gtk.gdk.SCROLL_DOWN: lambda w, e: kwin.KWinInterface.nextDesktop(), gtk.gdk.SCROLL_UP: lambda w, e: kwin.KWinInterface.previousDesktop() } BUTTON_ACTIONS = { 1: lambda w, e: pydcop.anyAppCalled('kdesktop').KDesktopIface. popupExecuteCommand(), 2: lambda w, e: pydcop.anyAppCalled('kicker').kicker.toggleShowDesktop(), 3: lambda w, e: pydcop.anyAppCalled('kicker').kicker.popupKMenu( tuple(int(x) for x in e.get_root_coords()))
def __init__( self, passed_config ): global config self.amarokapp = pydcop.anyAppCalled( "amarok" ) self.db = MySQLdb.connect( host = "localhost", user = "******", db = "amarok", passwd = "amarok" ) config = passed_config
TODO: - Merge this with another idea of mine and whip up a nice GUI for it. """ __appname__ = "KDE GUI Fixes" __author__ = "Stephan Sokolow (deitarion/SSokolow)" __version__ = "0.1alpha1" __license__ = "GNU GPL 2.0 or newer" import pygtk pygtk.require('2.0') import gtk, gobject, logging import time, pydcop kwin = pydcop.anyAppCalled('kwin') SCROLL_ACTIONS = { gtk.gdk.SCROLL_DOWN : lambda w,e : kwin.KWinInterface.nextDesktop(), gtk.gdk.SCROLL_UP : lambda w,e : kwin.KWinInterface.previousDesktop() } BUTTON_ACTIONS = { 1 : lambda w,e : pydcop.anyAppCalled('kdesktop').KDesktopIface.popupExecuteCommand(), 2 : lambda w,e : pydcop.anyAppCalled('kicker').kicker.toggleShowDesktop(), 3 : lambda w,e : pydcop.anyAppCalled('kicker').kicker.popupKMenu(tuple(int(x) for x in e.get_root_coords())) } ACTIVE_CORNERS = (gtk.gdk.GRAVITY_NORTH_WEST, gtk.gdk.GRAVITY_NORTH_EAST, gtk.gdk.GRAVITY_SOUTH_WEST, gtk.gdk.GRAVITY_SOUTH_EAST)
def init(): return pydcop.anyAppCalled("amarok")
def connect(self, screenlet_settings): self.playerAPI = pydcop.anyAppCalled("amarok").player self.playerAPI2 = pydcop.anyAppCalled("amarok").MainApplication-Interface