View Single Post
qwerty12's Avatar
Posts: 4,274 | Thanked: 5,358 times | Joined on Sep 2007 @ Looking at y'all and sighing
#13
Code:
--- vertsms.py.1	2010-05-04 21:30:01.000000000 +0100
+++ vertsms.py	2010-05-05 07:19:03.000000000 +0100
@@ -149,6 +149,11 @@
     def pygobject_new(self, addr):
         return self._api.newgobj(addr)
 
+def disable_osk(widget):
+    input_mode = widget.get_property("hildon-input-mode")
+    input_mode = input_mode | gtk.HILDON_GTK_INPUT_MODE_NO_SCREEN_PLUGINS
+    widget.set_property("hildon-input-mode", input_mode)
+
 window = hildon.Window()
 window.set_title("VertSMS")
 hildon.hildon_gtk_window_set_portrait_flags(window,hildon.PORTRAIT_MODE_SUPPORT | hildon.PORTRAIT_MODE_REQUEST)
@@ -156,10 +161,12 @@
 #receiver = hildon.Entry(gtk.HILDON_SIZE_AUTO_WIDTH | 
 #                          gtk.HILDON_SIZE_THUMB_HEIGHT)
 receiver.set_placeholder("To")
+disable_osk(receiver)
 message = hildon.TextView()
 message.set_wrap_mode(gtk.WRAP_WORD)
 message.set_placeholder("Write your message here")
 message.set_cursor_visible(True)
+disable_osk(message)
 buffer = message.get_buffer()
 buffer_receiver = receiver.get_buffer()
^ simple patch to stop the OSK from popping up. Oh, I tested that under the PR 1.2 leak; I hear HILDON_GTK_INPUT_MODE_NO_SCREEN_PLUGINS may not do anything in PR 1.1.

As for "UI of send -button must be improved in order to stop accidental sending", I guess you could bring up a confirmation message (à la Hildon.Note) or you can enable tap-and-hold on the widget which'll only send if you... wait for it... tap and hold on the widget.

Last edited by qwerty12; 2010-05-05 at 06:29.
 

The Following 4 Users Say Thank You to qwerty12 For This Useful Post: