conduit r1560 - in trunk: . tools/eog-plugin
- From: jstowers svn gnome org
- To: svn-commits-list gnome org
- Subject: conduit r1560 - in trunk: . tools/eog-plugin
- Date: Wed, 16 Jul 2008 04:49:09 +0000 (UTC)
Author: jstowers
Date: Wed Jul 16 04:49:09 2008
New Revision: 1560
URL: http://svn.gnome.org/viewvc/conduit?rev=1560&view=rev
Log:
Enable iPod support in the eog plugin
Modified:
trunk/ (props changed)
trunk/tools/eog-plugin/conduit.py
Modified: trunk/tools/eog-plugin/conduit.py
==============================================================================
--- trunk/tools/eog-plugin/conduit.py (original)
+++ trunk/tools/eog-plugin/conduit.py Wed Jul 16 04:49:09 2008
@@ -21,7 +21,8 @@
"ShutterflySink" : "Upload to Shutterfly",
"BoxDotNetTwoWay" : "Upload to Box.net",
"FacebookSink" : "Upload to Facebook",
- "TestImageSink" : "Test"
+ "IPodPhotoSink" : "Add to iPod",
+# "TestImageSink" : "Test"
}
ICON_SIZE = 24
@@ -211,9 +212,15 @@
raise Exception("Could not connect to conduit")
def _build_conduit(self, sinkName):
- if sinkName in self.dps:
- print "Building exporter conduit %s" % sinkName
- path = self.app.BuildExporter(sinkName)
+ #Split of the key part of the name
+ a = {}
+ for n in self.dps:
+ a[n.split(":")[0]] = str(n)
+
+ if sinkName in a:
+ realName = a[sinkName]
+ print "Building exporter conduit %s (%s)" % (sinkName, realName)
+ path = self.app.BuildExporter(realName)
exporter = dbus.SessionBus().get_object(CONDUIT_DBUS_IFACE,path)
self.conduits[sinkName] = ConduitWrapper(conduit=exporter, name=sinkName, store=self.store)
@@ -239,7 +246,7 @@
try:
remote_object = dbus.SessionBus().get_object(APPLICATION_DBUS_IFACE,"/")
self.app = dbus.Interface(remote_object, APPLICATION_DBUS_IFACE)
- self.dps = self.app.GetAllDataProviders()
+ self.dps = self.app.GetAllDataProviders()
except dbus.exceptions.DBusException:
self.app = None
print "Conduit unavailable"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]