Open main menu
Home
Random
Log in
Settings
About Sugar Labs
Disclaimers
Sugar Labs
Search
Changes
← Older edit
Newer edit →
Features/GTK3/Porting/InfoSlicer
(view source)
Revision as of 12:57, 4 July 2012
437 bytes added
,
12:57, 4 July 2012
→Alerts
Line 61:
Line 61:
* http://git.sugarlabs.org/sugar-toolkit-gtk3/sugar-toolkit-gtk3/blobs/master/src/sugar3/graphics/alert.py#line11
* http://git.sugarlabs.org/sugar-toolkit-gtk3/sugar-toolkit-gtk3/blobs/master/src/sugar3/graphics/alert.py#line11
−
A simple alert:
+
*
A simple alert:
<pre>
<pre>
Line 78:
Line 78:
alert.show()
alert.show()
</pre>
</pre>
+
+
* NotifyAlert
+
+
from sugar3.graphics.alert import NotifyAlert
+
+
def __alert_notify_response_cb(alert, response_id, activity):
+
activity.remove_alert(alert)
+
+
alert = NotifyAlert(5)
+
alert.props.title = _('Nothing to publish')
+
alert.props.msg = _('Mark arcticles from "Custom" '
+
'panel and try again.')
+
alert.connect('response', __alert_notify_response_cb, activity)
+
activity.add_alert(alert)
+
alert.show()
= Missing / Problematic things (not ported yet) =
= Missing / Problematic things (not ported yet) =
Humitos
266
edits