[maemo-commits] [maemo-commits] r9467 - in projects/haf/branches/gtk+/maemo-gtk-2-10: . gtk

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Tue Jan 30 15:48:45 EET 2007
Author: mitch
Date: 2007-01-30 15:48:38 +0200 (Tue, 30 Jan 2007)
New Revision: 9467

Modified:
   projects/haf/branches/gtk+/maemo-gtk-2-10/ChangeLog
   projects/haf/branches/gtk+/maemo-gtk-2-10/gtk/gtkentry.c
Log:
2007-01-30  Michael Natterer  <mitch at imendio.com>

	* gtk/gtkentry.c (gtk_entry_real_activate): port over
	tab-forward-on-activate.



Modified: projects/haf/branches/gtk+/maemo-gtk-2-10/ChangeLog
===================================================================
--- projects/haf/branches/gtk+/maemo-gtk-2-10/ChangeLog	2007-01-30 10:46:35 UTC (rev 9466)
+++ projects/haf/branches/gtk+/maemo-gtk-2-10/ChangeLog	2007-01-30 13:48:38 UTC (rev 9467)
@@ -1,3 +1,8 @@
+2007-01-30  Michael Natterer  <mitch at imendio.com>
+
+	* gtk/gtkentry.c (gtk_entry_real_activate): port over
+	tab-forward-on-activate.
+
 2007-01-29  Michael Natterer  <mitch at imendio.com>
 
 	* gtk/gtkaccellabel.c

Modified: projects/haf/branches/gtk+/maemo-gtk-2-10/gtk/gtkentry.c
===================================================================
--- projects/haf/branches/gtk+/maemo-gtk-2-10/gtk/gtkentry.c	2007-01-30 10:46:35 UTC (rev 9466)
+++ projects/haf/branches/gtk+/maemo-gtk-2-10/gtk/gtkentry.c	2007-01-30 13:48:38 UTC (rev 9467)
@@ -3153,6 +3153,28 @@
 	    gtk_window_activate_default (window);
 	}
     }
+#ifdef MAEMO_CHANGES
+  else
+    {
+      /* (VKBD) Enter (Enter, GDK_KP_Enter) should accept the field
+       * and move focus to the next editable field.
+       *
+       * If we get here it is often when the user has pressed Enter
+       * and no one handled the event. Another possibility is
+       * application emitting the "activate" signal (in)directly but
+       * that sould be rare.
+       *
+       * FIXME This should probably be removed as it changes the
+       * semantics slightly (be it here or in "key-press-event"
+       * handler) and is probably going to break something.  Though
+       * doing this in the default handler for "activate" should
+       * minimize the impact.  NB#34112
+       */
+      toplevel = gtk_widget_get_toplevel (widget);
+      if (GTK_IS_WINDOW (toplevel))
+        g_signal_emit_by_name (toplevel, "move-focus", GTK_DIR_TAB_FORWARD);
+    }
+#endif /* MAEMO_CHANGES */
 }
 
 static void


More information about the maemo-commits mailing list