Changes

Jump to navigation Jump to search
Line 55: Line 55:     
== Alerts ==
 
== Alerts ==
 +
 +
We have to change the way that the alerts were shown because <tt>self.notify_alert</tt> is no longer available.
 +
 +
Example about how to use the different types of alerts:
 +
* http://git.sugarlabs.org/sugar-toolkit-gtk3/sugar-toolkit-gtk3/blobs/master/src/sugar3/graphics/alert.py#line11
 +
 +
A simple alert:
 +
 +
<pre>
 +
from sugar3.graphics.alert import Alert
 +
 +
# Create a new simple alert
 +
alert = Alert()
 +
 +
# Populate the title and text body of the alert.
 +
alert.props.title = _('Title of Alert Goes Here')
 +
alert.props.msg = _('Text message of alert goes here')
 +
 +
# Call the add_alert() method (inherited via the sugar3.graphics.Window
 +
# superclass of Activity) to add this alert to the activity window.
 +
self.add_alert(alert)
 +
alert.show()
 +
</pre>
    
= Missing / Problematic things (not ported yet) =
 
= Missing / Problematic things (not ported yet) =
266

edits

Navigation menu