Ejemplo n.º 1
0
 def __init__(self, session_bus=dbus.SessionBus()):
     self.logger = logging.getLogger("%s.%s"%(self.__class__.__module__, self.__class__.__name__))
     bus_name = dbus.service.BusName(filer_dbus_bus_name, bus=session_bus)
     dbus.service.Object.__init__(self, bus_name, filer_dbus_object_path)
     self.model = setup_filer_dbus()
     self.bib_filer = BibFiler(self.model)
     self.clip = gtk.Clipboard()
Ejemplo n.º 2
0
class DBusProvider(dbus.service.Object):
    def __init__(self, session_bus=dbus.SessionBus()):
        self.logger = logging.getLogger("%s.%s"%(self.__class__.__module__, self.__class__.__name__))
        bus_name = dbus.service.BusName(filer_dbus_bus_name, bus=session_bus)
        dbus.service.Object.__init__(self, bus_name, filer_dbus_object_path)
        self.model = setup_filer_dbus()
        self.bib_filer = BibFiler(self.model)
        self.clip = gtk.Clipboard()


    @dbus.service.method(filer_dbus_bus_name)
    def process_clipboard(self):
        self.logger._log(1, "Filling.", [])
        self.bib_filer.file_string(self.clip.wait_for_text())
        self.logger._log(1, "Finished filling.", [])


    @dbus.service.method(filer_dbus_bus_name, in_signature="v")
    def process_file(self, file_names):
        self.bib_filer.file_file(file_names)