Back to index

unity  6.0.0
Public Member Functions | Static Public Attributes
unity.emulators.launcher.LauncherController Class Reference
Inheritance diagram for unity.emulators.launcher.LauncherController:
Inheritance graph
Collaboration diagram for unity.emulators.launcher.LauncherController:
Collaboration graph

List of all members.

Public Member Functions

def get_launcher_for_monitor
def get_launchers
def model
def add_launcher_item_from_position

Static Public Attributes

string DBUS_SERVICE = "com.canonical.Unity"
string DBUS_OBJECT = "/com/canonical/Unity/Debug"

Detailed Description

The LauncherController class.

Definition at line 34 of file

Member Function Documentation

def unity.emulators.launcher.LauncherController.add_launcher_item_from_position (   self,
Emulate a DBus call from Software Center to pin an icon to the launcher 

Definition at line 53 of file

00054     def add_launcher_item_from_position(self,name,icon,icon_x,icon_y,icon_size,desktop_file,aptdaemon_task):
00055         """ Emulate a DBus call from Software Center to pin an icon to the launcher """
00056         launcher_object = session_bus.get_object('com.canonical.Unity.Launcher',
00057                                       '/com/canonical/Unity/Launcher')
00058         launcher_iface = dbus.Interface(launcher_object, 'com.canonical.Unity.Launcher')
00059         launcher_iface.AddLauncherItemFromPosition(name,
00060                                                    icon,
00061                                                    icon_x,
00062                                                    icon_y,
00063                                                    icon_size,
00064                                                    desktop_file,
00065                                                    aptdaemon_task)

Return an instance of Launcher for the specified monitor, or None.

Definition at line 37 of file

00038     def get_launcher_for_monitor(self, monitor_num):
00039         """Return an instance of Launcher for the specified monitor, or None."""
00040         launchers = self.get_children_by_type(Launcher, monitor=monitor_num)
00041         return launchers[0] if launchers else None

Return the available launchers, or None.

Definition at line 42 of file

00043     def get_launchers(self):
00044         """Return the available launchers, or None."""
00045         return self.get_children_by_type(Launcher)

Return the launcher model.

Definition at line 47 of file

00048     def model(self):
00049         """Return the launcher model."""
00050         models = LauncherModel.get_all_instances()
00051         assert(len(models) == 1)
00052         return models[0]

Member Data Documentation

string unity.emulators.UnityIntrospectionObject.DBUS_OBJECT = "/com/canonical/Unity/Debug" [static, inherited]

Definition at line 19 of file

string unity.emulators.UnityIntrospectionObject.DBUS_SERVICE = "com.canonical.Unity" [static, inherited]

Definition at line 18 of file

The documentation for this class was generated from the following file: