[patch] little hal-device-manager tweaks
Sjoerd Simons
sjoerd at luon.net
Tue Jul 13 12:33:22 PDT 2004
Hi,
Attached patch makes hal-device-manager shows the error about hald not
running in a gtk messagedialog instead of on the console. Which ensures that
when running it from the menu you see more then just a flash if hald isn't
running :)
Also it changes some deprecated functions to use their non-deprecated
counterparts.
Sjoerd
--
God is the tangential point between zero and infinity.
-- Alfred Jarry
-------------- next part --------------
Index: tools/device-manager/DeviceManager.py
===================================================================
RCS file: /cvs/hal/hal/tools/device-manager/DeviceManager.py,v
retrieving revision 1.10
diff -u -r1.10 DeviceManager.py
--- tools/device-manager/DeviceManager.py 12 Apr 2004 21:25:39 -0000 1.10
+++ tools/device-manager/DeviceManager.py 13 Jul 2004 19:28:56 -0000
@@ -56,7 +56,12 @@
try:
device_names = self.hal_manager.GetAllDevices()
except:
- sys.exit("Could not get device list. Make sure hald is running")
+ dialog = gtk.MessageDialog(None, gtk.DIALOG_MODAL,
+ gtk.MESSAGE_ERROR, gtk.BUTTONS_CLOSE,
+ "Could not get device list. "
+ "Make sure hald is running!")
+ dialog.run()
+ sys.exit(1)
for name in device_names:
self.bus.add_signal_receiver(self.device_changed,
Index: tools/device-manager/LibGladeApplication.py
===================================================================
RCS file: /cvs/hal/hal/tools/device-manager/LibGladeApplication.py,v
retrieving revision 1.1
diff -u -r1.1 LibGladeApplication.py
--- tools/device-manager/LibGladeApplication.py 3 Dec 2003 01:52:34 -0000 1.1
+++ tools/device-manager/LibGladeApplication.py 13 Jul 2004 19:28:56 -0000
@@ -62,4 +62,4 @@
def on_quit_activate(self, *args):
"""Ignore args and call gtk.mainquit()."""
- gtk.mainquit()
+ gtk.main_quit()
Index: tools/device-manager/hal-device-manager
===================================================================
RCS file: /cvs/hal/hal/tools/device-manager/hal-device-manager,v
retrieving revision 1.3
diff -u -r1.3 hal-device-manager
--- tools/device-manager/hal-device-manager 13 Jan 2004 22:18:46 -0000 1.3
+++ tools/device-manager/hal-device-manager 13 Jul 2004 19:28:56 -0000
@@ -13,4 +13,4 @@
gnome.program_init(Const.NAME, Const.VERSION)
DeviceManager()
-gtk.mainloop()
+gtk.main()
-------------- next part --------------
_______________________________________________
hal mailing list
hal at freedesktop.org
http://freedesktop.org/mailman/listinfo/hal
More information about the Hal
mailing list