gtk+ r19532 - in branches/gtk-2-12: . gtk
- From: matthiasc svn gnome org
- To: svn-commits-list gnome org
- Subject: gtk+ r19532 - in branches/gtk-2-12: . gtk
- Date: Tue, 12 Feb 2008 16:04:55 +0000 (GMT)
Author: matthiasc
Date: Tue Feb 12 16:04:54 2008
New Revision: 19532
URL: http://svn.gnome.org/viewvc/gtk+?rev=19532&view=rev
Log:
2008-02-12 Matthias Clasen <mclasen redhat com>
* gtk/*.c: Unify the handling of various "Enter" keysyms
all over the place. (#515047, Christian Persch)
Modified:
branches/gtk-2-12/ChangeLog
branches/gtk-2-12/gtk/gtkaboutdialog.c
branches/gtk-2-12/gtk/gtkcolorsel.c
branches/gtk-2-12/gtk/gtkcombo.c
branches/gtk-2-12/gtk/gtkcombobox.c
branches/gtk-2-12/gtk/gtkdnd.c
branches/gtk-2-12/gtk/gtkentry.c
branches/gtk-2-12/gtk/gtkfilechooserdefault.c
branches/gtk-2-12/gtk/gtkiconview.c
branches/gtk-2-12/gtk/gtkmenushell.c
branches/gtk-2-12/gtk/gtkpaned.c
branches/gtk-2-12/gtk/gtkscalebutton.c
branches/gtk-2-12/gtk/gtktext.c
branches/gtk-2-12/gtk/gtktextview.c
branches/gtk-2-12/gtk/gtktreeview.c
branches/gtk-2-12/gtk/gtkwindow.c
Modified: branches/gtk-2-12/gtk/gtkaboutdialog.c
==============================================================================
--- branches/gtk-2-12/gtk/gtkaboutdialog.c (original)
+++ branches/gtk-2-12/gtk/gtkaboutdialog.c Tue Feb 12 16:04:54 2008
@@ -1715,7 +1715,8 @@
switch (event->keyval)
{
- case GDK_Return:
+ case GDK_Return:
+ case GDK_ISO_Enter:
case GDK_KP_Enter:
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (text_view));
gtk_text_buffer_get_iter_at_mark (buffer, &iter,
Modified: branches/gtk-2-12/gtk/gtkcolorsel.c
==============================================================================
--- branches/gtk-2-12/gtk/gtkcolorsel.c (original)
+++ branches/gtk-2-12/gtk/gtkcolorsel.c Tue Feb 12 16:04:54 2008
@@ -1066,6 +1066,7 @@
/* should have a drawing area subclass with an activate signal */
if ((event->keyval == GDK_space) ||
(event->keyval == GDK_Return) ||
+ (event->keyval == GDK_ISO_Enter) ||
(event->keyval == GDK_KP_Enter) ||
(event->keyval == GDK_KP_Space))
{
@@ -1327,6 +1328,7 @@
{
case GDK_space:
case GDK_Return:
+ case GDK_ISO_Enter:
case GDK_KP_Enter:
case GDK_KP_Space:
grab_color_at_mouse (screen, x, y, data);
Modified: branches/gtk-2-12/gtk/gtkcombo.c
==============================================================================
--- branches/gtk-2-12/gtk/gtkcombo.c (original)
+++ branches/gtk-2-12/gtk/gtkcombo.c Tue Feb 12 16:04:54 2008
@@ -293,7 +293,9 @@
{
guint state = event->state & gtk_accelerator_get_default_mod_mask ();
- if ((event->keyval == GDK_Return || event->keyval == GDK_KP_Enter) &&
+ if ((event->keyval == GDK_Return ||
+ event->keyval == GDK_ISO_Enter ||
+ event->keyval == GDK_KP_Enter) &&
state == 0)
{
gtk_combo_popdown_list (combo);
Modified: branches/gtk-2-12/gtk/gtkcombobox.c
==============================================================================
--- branches/gtk-2-12/gtk/gtkcombobox.c (original)
+++ branches/gtk-2-12/gtk/gtkcombobox.c Tue Feb 12 16:04:54 2008
@@ -3846,7 +3846,7 @@
GtkComboBox *combo_box = GTK_COMBO_BOX (data);
GtkTreeIter iter;
- if (event->keyval == GDK_Return || event->keyval == GDK_KP_Enter ||
+ if (event->keyval == GDK_Return || event->keyval == GDK_ISO_Enter || event->keyval == GDK_KP_Enter ||
event->keyval == GDK_space || event->keyval == GDK_KP_Space)
{
GtkTreeModel *model = NULL;
@@ -5329,7 +5329,9 @@
return TRUE;
}
- else if (event->keyval == GDK_Return)
+ else if (event->keyval == GDK_Return ||
+ event->keyval == GDK_ISO_Enter ||
+ event->keyval == GDK_KP_Enter)
{
gtk_cell_editable_editing_done (GTK_CELL_EDITABLE (combo_box));
gtk_cell_editable_remove_widget (GTK_CELL_EDITABLE (combo_box));
Modified: branches/gtk-2-12/gtk/gtkdnd.c
==============================================================================
--- branches/gtk-2-12/gtk/gtkdnd.c (original)
+++ branches/gtk-2-12/gtk/gtkdnd.c Tue Feb 12 16:04:54 2008
@@ -4062,6 +4062,7 @@
case GDK_space:
case GDK_Return:
+ case GDK_ISO_Enter:
case GDK_KP_Enter:
case GDK_KP_Space:
gtk_drag_end (info, event->time);
Modified: branches/gtk-2-12/gtk/gtkentry.c
==============================================================================
--- branches/gtk-2-12/gtk/gtkentry.c (original)
+++ branches/gtk-2-12/gtk/gtkentry.c Tue Feb 12 16:04:54 2008
@@ -820,6 +820,8 @@
*/
gtk_binding_entry_add_signal (binding_set, GDK_Return, 0,
"activate", 0);
+ gtk_binding_entry_add_signal (binding_set, GDK_ISO_Enter, 0,
+ "activate", 0);
gtk_binding_entry_add_signal (binding_set, GDK_KP_Enter, 0,
"activate", 0);
Modified: branches/gtk-2-12/gtk/gtkfilechooserdefault.c
==============================================================================
--- branches/gtk-2-12/gtk/gtkfilechooserdefault.c (original)
+++ branches/gtk-2-12/gtk/gtkfilechooserdefault.c Tue Feb 12 16:04:54 2008
@@ -4078,7 +4078,8 @@
if ((event->keyval == GDK_Return
|| event->keyval == GDK_ISO_Enter
|| event->keyval == GDK_KP_Enter
- || event->keyval == GDK_space)
+ || event->keyval == GDK_space
+ || event->keyval == GDK_KP_Space)
&& ((event->state & modifiers) == 0)
&& !(impl->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER ||
impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER))
Modified: branches/gtk-2-12/gtk/gtkiconview.c
==============================================================================
--- branches/gtk-2-12/gtk/gtkiconview.c (original)
+++ branches/gtk-2-12/gtk/gtkiconview.c Tue Feb 12 16:04:54 2008
@@ -870,9 +870,13 @@
"unselect_all", 0);
gtk_binding_entry_add_signal (binding_set, GDK_space, GDK_CONTROL_MASK,
"toggle_cursor_item", 0);
+ gtk_binding_entry_add_signal (binding_set, GDK_KP_Space, GDK_CONTROL_MASK,
+ "toggle_cursor_item", 0);
gtk_binding_entry_add_signal (binding_set, GDK_space, 0,
"activate_cursor_item", 0);
+ gtk_binding_entry_add_signal (binding_set, GDK_KP_Space, 0,
+ "activate_cursor_item", 0);
gtk_binding_entry_add_signal (binding_set, GDK_Return, 0,
"activate_cursor_item", 0);
gtk_binding_entry_add_signal (binding_set, GDK_ISO_Enter, 0,
Modified: branches/gtk-2-12/gtk/gtkmenushell.c
==============================================================================
--- branches/gtk-2-12/gtk/gtkmenushell.c (original)
+++ branches/gtk-2-12/gtk/gtkmenushell.c Tue Feb 12 16:04:54 2008
@@ -325,6 +325,11 @@
G_TYPE_BOOLEAN,
TRUE);
gtk_binding_entry_add_signal (binding_set,
+ GDK_ISO_Enter, 0,
+ "activate_current", 1,
+ G_TYPE_BOOLEAN,
+ TRUE);
+ gtk_binding_entry_add_signal (binding_set,
GDK_KP_Enter, 0,
"activate_current", 1,
G_TYPE_BOOLEAN,
Modified: branches/gtk-2-12/gtk/gtkpaned.c
==============================================================================
--- branches/gtk-2-12/gtk/gtkpaned.c (original)
+++ branches/gtk-2-12/gtk/gtkpaned.c Tue Feb 12 16:04:54 2008
@@ -479,6 +479,9 @@
GDK_Return, 0,
"accept_position", 0);
gtk_binding_entry_add_signal (binding_set,
+ GDK_ISO_Enter, 0,
+ "accept_position", 0);
+ gtk_binding_entry_add_signal (binding_set,
GDK_KP_Enter, 0,
"accept_position", 0);
gtk_binding_entry_add_signal (binding_set,
Modified: branches/gtk-2-12/gtk/gtkscalebutton.c
==============================================================================
--- branches/gtk-2-12/gtk/gtkscalebutton.c (original)
+++ branches/gtk-2-12/gtk/gtkscalebutton.c Tue Feb 12 16:04:54 2008
@@ -297,6 +297,8 @@
gtk_binding_entry_add_signal (binding_set, GDK_space, 0,
"popup", 0);
+ gtk_binding_entry_add_signal (binding_set, GDK_KP_Space, 0,
+ "popup", 0);
gtk_binding_entry_add_signal (binding_set, GDK_Return, 0,
"popup", 0);
gtk_binding_entry_add_signal (binding_set, GDK_ISO_Enter, 0,
Modified: branches/gtk-2-12/gtk/gtktext.c
==============================================================================
--- branches/gtk-2-12/gtk/gtktext.c (original)
+++ branches/gtk-2-12/gtk/gtktext.c Tue Feb 12 16:04:54 2008
@@ -1909,6 +1909,7 @@
case GDK_KP_Down:
case GDK_Down: scroll_int (text, +KEY_SCROLL_PIXELS); break;
case GDK_Return:
+ case GDK_ISO_Enter:
case GDK_KP_Enter:
if (event->state & GDK_CONTROL_MASK)
gtk_signal_emit_by_name (GTK_OBJECT (text), "activate");
@@ -2028,6 +2029,7 @@
gtk_editable_insert_text (GTK_EDITABLE (old_editable), "\t", 1, &position);
break;
case GDK_KP_Enter:
+ case GDK_ISO_Enter:
case GDK_Return:
if (event->state & GDK_CONTROL_MASK)
gtk_signal_emit_by_name (GTK_OBJECT (text), "activate");
Modified: branches/gtk-2-12/gtk/gtktextview.c
==============================================================================
--- branches/gtk-2-12/gtk/gtktextview.c (original)
+++ branches/gtk-2-12/gtk/gtktextview.c Tue Feb 12 16:04:54 2008
@@ -4094,6 +4094,7 @@
/* use overall editability not can_insert, more predictable for users */
else if (text_view->editable &&
(event->keyval == GDK_Return ||
+ event->keyval == GDK_ISO_Enter ||
event->keyval == GDK_KP_Enter))
{
/* this won't actually insert the newline if the cursor isn't
Modified: branches/gtk-2-12/gtk/gtktreeview.c
==============================================================================
--- branches/gtk-2-12/gtk/gtktreeview.c (original)
+++ branches/gtk-2-12/gtk/gtktreeview.c Tue Feb 12 16:04:54 2008
@@ -1165,6 +1165,7 @@
G_TYPE_INT, -1);
gtk_binding_entry_add_signal (binding_set, GDK_space, GDK_CONTROL_MASK, "toggle_cursor_row", 0);
+ gtk_binding_entry_add_signal (binding_set, GDK_KP_Space, GDK_CONTROL_MASK, "toggle_cursor_row", 0);
gtk_binding_entry_add_signal (binding_set, GDK_a, GDK_CONTROL_MASK, "select_all", 0);
gtk_binding_entry_add_signal (binding_set, GDK_slash, GDK_CONTROL_MASK, "select_all", 0);
@@ -1174,9 +1175,13 @@
gtk_binding_entry_add_signal (binding_set, GDK_space, GDK_SHIFT_MASK, "select_cursor_row", 1,
G_TYPE_BOOLEAN, TRUE);
+ gtk_binding_entry_add_signal (binding_set, GDK_KP_Space, GDK_SHIFT_MASK, "select_cursor_row", 1,
+ G_TYPE_BOOLEAN, TRUE);
gtk_binding_entry_add_signal (binding_set, GDK_space, 0, "select_cursor_row", 1,
G_TYPE_BOOLEAN, TRUE);
+ gtk_binding_entry_add_signal (binding_set, GDK_KP_Space, 0, "select_cursor_row", 1,
+ G_TYPE_BOOLEAN, TRUE);
gtk_binding_entry_add_signal (binding_set, GDK_Return, 0, "select_cursor_row", 1,
G_TYPE_BOOLEAN, TRUE);
gtk_binding_entry_add_signal (binding_set, GDK_ISO_Enter, 0, "select_cursor_row", 1,
Modified: branches/gtk-2-12/gtk/gtkwindow.c
==============================================================================
--- branches/gtk-2-12/gtk/gtkwindow.c (original)
+++ branches/gtk-2-12/gtk/gtkwindow.c Tue Feb 12 16:04:54 2008
@@ -826,7 +826,8 @@
gtk_binding_entry_add_signal (binding_set, GDK_Return, 0,
"activate_default", 0);
-
+ gtk_binding_entry_add_signal (binding_set, GDK_ISO_Enter, 0,
+ "activate_default", 0);
gtk_binding_entry_add_signal (binding_set, GDK_KP_Enter, 0,
"activate_default", 0);
@@ -4876,7 +4877,7 @@
if (!accel_mods)
{
static const guint bindings[] = {
- GDK_space, GDK_KP_Space, GDK_Return, GDK_KP_Enter, GDK_Up, GDK_KP_Up, GDK_Down, GDK_KP_Down,
+ GDK_space, GDK_KP_Space, GDK_Return, GDK_ISO_Enter, GDK_KP_Enter, GDK_Up, GDK_KP_Up, GDK_Down, GDK_KP_Down,
GDK_Left, GDK_KP_Left, GDK_Right, GDK_KP_Right, GDK_Tab, GDK_KP_Tab, GDK_ISO_Left_Tab,
};
guint i;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]