fix alerts documentation
- s/Set/Get for a get property method, - fix two typos.
This commit is contained in:
parent
e16f8ec61b
commit
9de70acfff
@ -145,7 +145,7 @@ class Alert(Gtk.EventBox):
|
|||||||
|
|
||||||
def do_get_property(self, pspec):
|
def do_get_property(self, pspec):
|
||||||
"""
|
"""
|
||||||
Set alert property, GObject internal method.
|
Get alert property, GObject internal method.
|
||||||
Use the `alert.props` object, eg::
|
Use the `alert.props` object, eg::
|
||||||
|
|
||||||
title = alert.props.title
|
title = alert.props.title
|
||||||
@ -385,7 +385,7 @@ class TimeoutAlert(Alert):
|
|||||||
elif response_id is Gtk.ResponseType.CANCEL:
|
elif response_id is Gtk.ResponseType.CANCEL:
|
||||||
print 'Cancel Button was clicked.'
|
print 'Cancel Button was clicked.'
|
||||||
elif response_id == -1:
|
elif response_id == -1:
|
||||||
print 'Timout occurred'
|
print 'Timeout occurred'
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, timeout=5, **kwargs):
|
def __init__(self, timeout=5, **kwargs):
|
||||||
@ -417,7 +417,7 @@ class NotifyAlert(Alert):
|
|||||||
"""
|
"""
|
||||||
Timeout alert with only an "OK" button. This should be used just for
|
Timeout alert with only an "OK" button. This should be used just for
|
||||||
notifications and not for user interaction. The alert will timeout after
|
notifications and not for user interaction. The alert will timeout after
|
||||||
a given length, simmilar to a :class:`sugar3.graphics.alert.TimeoutAlert`.
|
a given length, similar to a :class:`sugar3.graphics.alert.TimeoutAlert`.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
timeout (int, optional): the length in seconds for the timeout to
|
timeout (int, optional): the length in seconds for the timeout to
|
||||||
|
Loading…
Reference in New Issue
Block a user