Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAgustin Zubiaga <aguz@sugarlabs.org>2012-05-10 02:30:00 (GMT)
committer Agustin Zubiaga <aguz@sugarlabs.org>2012-05-10 02:30:00 (GMT)
commit56a2ef66ee3e2344086648d0c06c8bbb8cb10cf7 (patch)
tree707b4a58cb6fad4f202f9913a00dadec36706647
parentd1c87cfdc444d15692421b207ae87384aeac1815 (diff)
Show alert button palette immediate
-rw-r--r--illustrate.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/illustrate.py b/illustrate.py
index c8fe839..4d24b91 100644
--- a/illustrate.py
+++ b/illustrate.py
@@ -89,7 +89,7 @@ class IllustrateActivity(activity.Activity):
alert_btn = ToolButton("alert-icon")
alert_btn.set_tooltip(_("Alert example"))
- alert_btn.connect("clicked", self._show_example_alert)
+ alert_btn.connect("clicked", self._show_alert_btn_pallete)
toolbarbox.toolbar.insert(alert_btn, -1)
options_button = ToolbarButton(icon_name='preferences-system')
@@ -143,6 +143,9 @@ class IllustrateActivity(activity.Activity):
self._create_canvas(canvas)
self._create_alert_btn_palette(alert_btn)
+ def _show_alert_btn_pallete(self, widget):
+ widget.props.palette.popup(immediate=True, state=1)
+
def _create_alert_btn_palette(self, button):
palette = button.get_palette()
hbox = gtk.HBox()
@@ -154,7 +157,7 @@ class IllustrateActivity(activity.Activity):
notify.connect("clicked", self._show_example_alert, True)
hbox.pack_start(simple, False, True, 0)
- hbox.pack_start(notify, False, True, 0)
+ hbox.pack_end(notify, False, True, 0)
hbox.show_all()