1
0
mirror of https://github.com/gryf/wicd.git synced 2026-01-03 12:24:14 +01:00

experimental:

- Use gobject.timeout_add_seconds instead of gobject.timeout_add when possible
- Merge some fixes from pluggablebackends
- Replace os.system usage with subprocess.call.
This commit is contained in:
imdano
2008-09-13 11:28:36 +00:00
parent 97e1123c8c
commit bbfcae834e
4 changed files with 24 additions and 5 deletions

View File

@@ -56,7 +56,7 @@ else:
from dbus.mainloop.glib import DBusGMainLoop
DBusGMainLoop(set_as_default=True)
proxy_obj, daemon, wireless, wired, bus = [None for x in range(0, 5)]
proxy_obj = daemon = wireless = wired = bus = None
language = misc.get_language_list_gui()
def setup_dbus(dbus_man=None):
@@ -84,6 +84,7 @@ def setup_dbus(dbus_man=None):
wired = dbus_ifaces['wired']
return True
def error(parent, message):
""" Shows an error dialog """
dialog = gtk.MessageDialog(parent, gtk.DIALOG_MODAL, gtk.MESSAGE_ERROR,
@@ -91,6 +92,14 @@ def error(parent, message):
dialog.set_markup(message)
dialog.run()
dialog.destroy()
def alert(parent, message):
""" Shows an error dialog """
dialog = gtk.MessageDialog(parent, gtk.DIALOG_MODAL, gtk.MESSAGE_WARNING,
gtk.BUTTONS_OK)
dialog.set_markup(message)
dialog.run()
dialog.destroy()
########################################
##### GTK EXTENSION CLASSES