Created SugarDownloadManager and ClipboardService's wrapper. Show and hide the frame when adding an object to the clipboard.

This commit is contained in:
Tomeu Vizoso
2006-11-05 19:52:46 +01:00
parent b9f75c1472
commit a7e4092b0e
22 changed files with 267 additions and 181 deletions
+9 -9
View File
@@ -22,30 +22,30 @@ import dbus
import dbus.service
from sugar import env
_CLIPBOARD_SERVICE = "org.laptop.Clipboard"
_CLIPBOARD_DBUS_INTERFACE = "org.laptop.Clipboard"
_CLIPBOARD_OBJECT_PATH = "/org/laptop/Clipboard"
class ClipboardDBusServiceHelper(dbus.service.Object):
_CLIPBOARD_DBUS_INTERFACE = "org.laptop.Clipboard"
_CLIPBOARD_OBJECT_PATH = "/org/laptop/Clipboard"
def __init__(self, parent):
self._parent = parent
bus = dbus.SessionBus()
bus_name = dbus.service.BusName(_CLIPBOARD_DBUS_INTERFACE, bus=bus)
dbus.service.Object.__init__(self, bus_name, _CLIPBOARD_OBJECT_PATH)
bus_name = dbus.service.BusName(self._CLIPBOARD_DBUS_INTERFACE, bus=bus)
dbus.service.Object.__init__(self, bus_name, self._CLIPBOARD_OBJECT_PATH)
@dbus.service.method(_CLIPBOARD_DBUS_INTERFACE,
in_signature="ss", out_signature="")
def add_object(self, mimeType, fileName):
logging.debug('Added object of type ' + mimeType + ' with path at ' + fileName)
self.object_added(mimeType, fileName)
logging.debug('Added object of type ' + mimeType + ' with path at ' + fileName)
@dbus.service.method(_CLIPBOARD_DBUS_INTERFACE,
in_signature="s", out_signature="")
def delete_object(self, fileName):
logging.debug('Deleted object with path at ' + fileName)
self.object_deleted(fileName)
logging.debug('Deleted object with path at ' + fileName)
@dbus.service.method(_CLIPBOARD_DBUS_INTERFACE,
in_signature="si", out_signature="")
def update_object_state(self, fileName, percent):