Features/GTK3/Porting/InfoSlicer: Difference between revisions

Humitos (talk | contribs)
Humitos (talk | contribs)
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) =