|
|
2008-07-18
, 10:08
|
|
|
Posts: 696 |
Thanked: 1,012 times |
Joined on Mar 2006
@ Asturies, Spain
|
#2
|
button.connect("clicked", on_click, argument1)
def on_click(widget, argument1):
......
| The Following User Says Thank You to yerga For This Useful Post: | ||
|
|
2008-07-18
, 17:50
|
|
Posts: 8 |
Thanked: 1 time |
Joined on Jul 2008
|
#3
|
|
|
2008-07-18
, 17:55
|
|
|
Posts: 868 |
Thanked: 474 times |
Joined on Oct 2007
@ Capital District, NY, USA
|
#4
|
|
|
2008-07-18
, 18:02
|
|
|
Posts: 868 |
Thanked: 474 times |
Joined on Oct 2007
@ Capital District, NY, USA
|
#5
|
|
|
2008-07-18
, 18:08
|
|
|
Posts: 868 |
Thanked: 474 times |
Joined on Oct 2007
@ Capital District, NY, USA
|
#6
|
self._widgetTree.get_widget("usernameentry").set_property('hildon-input-mode', 7)
self._widgetTree.get_widget("passwordentry").set_property('hildon-input-mode', 7|(1 << 29))
|
|
2008-07-18
, 18:18
|
|
|
Posts: 868 |
Thanked: 474 times |
Joined on Oct 2007
@ Capital District, NY, USA
|
#7
|
|
|
2008-07-18
, 18:43
|
|
Posts: 8 |
Thanked: 1 time |
Joined on Jul 2008
|
#8
|
|
|
2008-07-18
, 18:57
|
|
|
Posts: 868 |
Thanked: 474 times |
Joined on Oct 2007
@ Capital District, NY, USA
|
#9
|
import gtk
import hildon
def on_click(widget, window):
dialog = hildon.LoginDialog(window)
response = dialog.run()
dialog.hide()
if response == gtk.RESPONSE_OK:
widget.set_label("Name: %s\nPassword: %s" % (dialog.get_username(), dialog.get_password()))
else:
widget.set_label("Enter name and password")
dialog.destroy()
window = hildon.Window()
window.set_title("Test App")
button = gtk.Button("Enter name and password")
button.connect("clicked", on_click, window)
window.add(button)
window.show_all()
gtk.main()
|
|
2008-07-18
, 18:59
|
|
Posts: 8 |
Thanked: 1 time |
Joined on Jul 2008
|
#10
|
| The Following User Says Thank You to greghudd For This Useful Post: | ||
(Not new to engineering / programming but new to N800 & PyGTK)
Trying to get the -> hildon.NamePasswordDialog example found at http://pymaemo.garage.maemo.org/ -> Components -> Python-Hildon...(NamePasswordDialog) to work in my code.
Tried out the example on both the N800 / Os2008 device and also on my X86 SBOX devl. environment. I cut-and-pasted the code right out of the doc example. Msg when button clicked is: TypeError: on_click() takes exactly 1 argument (2 given)
Looked all over internet for working example, no joy. Anyone have some working code &/or a pointer to (perhaps) a correct spec. for this feature. I am stumped at this point.
Many Thanks in Advance for help on this. //GregH
Last edited by greghudd; 2008-07-18 at 04:23. Reason: bug fix