[gnome-sharing-service] change the title depending on how many files will be shared



commit 2e0f551e2acef3082e9c3d27ab7679284ebb711b
Author: daniel g. siegel <dgsiegel gnome org>
Date:   Wed Jun 16 02:14:19 2010 +0200

    change the title depending on how many files will be shared

 src/gui.py |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/src/gui.py b/src/gui.py
index 5d181a3..04840f3 100644
--- a/src/gui.py
+++ b/src/gui.py
@@ -8,11 +8,7 @@ import gobject
 
 import threading
 
-try:
-  from gss.plugin import PluginManager
-except ImportError:
-  print "modules can not be found."
-  sys.exit(1)
+from gss.plugin import PluginManager
 
     # move to gui as this is a filter
     #mimeset = set()
@@ -75,7 +71,13 @@ class SharingDialog (threading.Thread):
 
   def run (self):
 
-    self.dialog = gtk.Dialog("Sharing 3 photos and 1 video")
+    title = "Sharing " + str(len(self.uris))
+    if len(self.uris) > 1:
+      title = title + " files"
+    else:
+      title = title + " file"
+
+    self.dialog = gtk.Dialog(title)
 
     self.dialog.connect("delete-event", self.close_application)
     self.dialog.set_has_separator(False)



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