Notes are used to ask a confirmation (Ok/Cancel/etc.) from the user. The following code shows a confirmation note and changes the button label based on user's response.
def button_callback(widget, button, window):
dialog = hildon.Note ("confirmation", (window, "Are you sure?", gtk.STOCK_DIALOG_WARNING) )
dialog.set_button_texts ("Yes", "No")
response = dialog.run()
dialog.destroy()
if response == gtk.RESPONSE_OK:
button.set_label("Confirmed")
else:
button.set_label("Canceled")
Dialog used to receive a new password from user.
def button_callback(widget, button, window): passwordDialog = hildon.SetPasswordDialog(window, False) response = passwordDialog.run() passwordDialog.hide() passwordDialog.destroy()
It is a dialog popup widget which lets the user set a time.
def button_callback(widget, button, window): time_picker = hildon.TimePicker(window) response = time_picker.run() time_picker.hide()
No related wiki articles found