[kupfer] nautilusselection: Unwrap the dbus type for byte strings



commit a38ace6a9308f6fd8937ce0b521ac763f61ebfaa
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date:   Mon Jan 18 16:06:51 2010 +0100

    nautilusselection: Unwrap the dbus type for byte strings

 kupfer/plugin/nautilusselection.py |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/kupfer/plugin/nautilusselection.py b/kupfer/plugin/nautilusselection.py
index 71d9dca..145d54a 100644
--- a/kupfer/plugin/nautilusselection.py
+++ b/kupfer/plugin/nautilusselection.py
@@ -60,7 +60,10 @@ class SelectionSource (Source, PicklingHelperMixin):
 				byte_arrays=True)
 
 	def _selected_signal(self, selection):
-		self._selection = selection
+		# The SelectionChanged signal carries an array of byte arrays,
+		# which arrive as byte strings here, in effect a list of `str'.
+		# we unwrap the dbus type dbus.ByteArray to str
+		self._selection = [str(S) for S in selection]
 		self.mark_for_update()
 
 	def get_items(self):



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]