Added printing "password copied" under Maemo. master
authorStanislaw Klekot <dozzie@jarowit.net>
Tue, 7 Jun 2011 13:08:20 +0000 (15:08 +0200)
committerStanislaw Klekot <dozzie@jarowit.net>
Tue, 7 Jun 2011 13:08:20 +0000 (15:08 +0200)
genpass.py

index 406404c..154d516 100755 (executable)
@@ -36,6 +36,9 @@ try:
   entry_passlen = hildon.NumberEditor(lower_bound, upper_bound)
   entry_passlen.set_value(value_set)
   entry_passlen.get_value_as_int = entry_passlen.get_value
+  def display_message(msg):
+    global main_win
+    hildon.hildon_banner_show_information(main_win, None, msg)
 except ImportError:
   entry_passlen = gtk.SpinButton(
     adjustment = gtk.Adjustment(
@@ -46,6 +49,8 @@ except ImportError:
     )
   )
   entry_passlen.set_alignment(0.5)
+  def display_message(msg):
+    pass
 
 #-------------------------------------------------
 # additional functions, handlers and so on
@@ -60,6 +65,7 @@ def copy_to_clipboard(button):
   clipboard = gtk.Clipboard()
   clipboard.set_text(entry_passwd.get_text())
   entry_passwd.grab_focus()
+  display_message('Password copied')
 
 button_generate.connect('clicked', generate)
 button_clipcopy.connect('clicked', copy_to_clipboard)