[debian-edu-commits] r78691 - trunk/src/hw-support-handler

pere at alioth.debian.org pere at alioth.debian.org
Wed Jan 9 23:14:43 UTC 2013


Author: pere
Date: 2013-01-09 23:14:42 +0000 (Wed, 09 Jan 2013)
New Revision: 78691

Modified:
   trunk/src/hw-support-handler/hw-support-handlerd
Log:
Improve notification text.

Modified: trunk/src/hw-support-handler/hw-support-handlerd
===================================================================
--- trunk/src/hw-support-handler/hw-support-handlerd	2013-01-09 22:37:27 UTC (rev 78690)
+++ trunk/src/hw-support-handler/hw-support-handlerd	2013-01-09 23:14:42 UTC (rev 78691)
@@ -20,7 +20,8 @@
     info = "New %s device [%04x:%04x] supported by package(s) %s." \
         % (bus, vendor, device, string.join(pkgs, " "))
     instructions = "To install, run /sbin/discover-pkginstall as user root."
-    msg = info + "  " + instructions
+    title = "New %s device" % bus
+    text = info + "  " + instructions
 
     print info
 
@@ -28,7 +29,7 @@
     if not pynotify.init("test"):
         return False
 
-    n = pynotify.Notification(msg)
+    n = pynotify.Notification(title, text)
     n.set_timeout(10000)
     n.add_action("clicked",
                  "Please install program(s)",
@@ -102,7 +103,9 @@
     ignore_initial_suggestions()
     DBusGMainLoop(set_as_default=True)
     system_bus = dbus.SystemBus()
-    system_bus.add_signal_receiver(catchall_signal_handler, interface_keyword='dbus_interface', member_keyword='member')
+    system_bus.add_signal_receiver(catchall_signal_handler,
+                                   interface_keyword='dbus_interface',
+                                   member_keyword='member')
     loop = gobject.MainLoop()
     print "ready to accept hardware events"
     loop.run()




More information about the debian-edu-commits mailing list