1 |
""" |
""" |
2 |
Modified by Jan Alonzo <jmalonzo@spaceants.org>. |
Modified by Jan Alonzo <jmalonzo@spaceants.org>. |
3 |
Date: 24/09/2003 |
Date: 28/09/2003 |
4 |
|
|
5 |
This is from Seth Nickell's gnome-blog. |
This is from Seth Nickell's gnome-blog. |
6 |
http://www.gnome.org/~seth/gnome-blog |
http://www.gnome.org/~seth/gnome-blog |
10 |
import straw |
import straw |
11 |
|
|
12 |
class HIGAlert(gtk.Dialog): |
class HIGAlert(gtk.Dialog): |
13 |
def __init__(self, primaryText, secondaryText, parent=None, flags=0, buttons=None, code=None): |
def __init__(self, primaryText, secondaryText, parent=None, flags=0, buttons=None, status=None): |
14 |
gtk.Dialog.__init__(self, primaryText, parent, flags, buttons) |
gtk.Dialog.__init__(self, primaryText, parent, flags, buttons) |
15 |
|
|
16 |
self.set_border_width(6) |
self.set_border_width(6) |
49 |
vbox.pack_start(primaryLabel) |
vbox.pack_start(primaryLabel) |
50 |
vbox.pack_start(secondaryLabel) |
vbox.pack_start(secondaryLabel) |
51 |
|
|
52 |
if code is not None: |
if status is not None: |
53 |
onlineCheck = gtk.CheckButton(label="I would like to go online now") |
onlineCheck = gtk.CheckButton(label=_("I would like to go online now")) |
54 |
onlineCheck.connect("toggled", self.online_check_toggled) |
onlineCheck.connect("toggled", self.online_check_toggled) |
55 |
vbox.pack_end(onlineCheck) |
vbox.pack_end(onlineCheck) |
56 |
|
|
76 |
else: |
else: |
77 |
straw.poll_manager.poll() |
straw.poll_manager.poll() |
78 |
|
|
79 |
alert = HIGAlert(primaryText, secondaryText, buttons=(gtk.STOCK_OK,gtk.RESPONSE_OK), code="offline") |
alert = HIGAlert(primaryText, secondaryText, buttons=(gtk.STOCK_OK,gtk.RESPONSE_OK), status="offline") |
80 |
alert.connect('response', response) |
alert.connect('response', response) |
81 |
alert.run() |
alert.run() |
82 |
alert.hide() |
alert.hide() |