[gedit-list] keys patch
- From: Chuchi Perriman <chuchiperriman gmail com>
- To: gedit-list <gedit-list gnome org>
- Subject: [gedit-list] keys patch
- Date: Sun, 12 Sep 2010 11:36:42 +0200
I'm changed the prefix GDK_ by GDK_KEY_ ifyou want I attach the patch.
From 13259ef841fe6d9887fb20b666d3899f45561056 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jes=C3=BAs=20Barbero=20Rodr=C3=ADguez?= <chuchiperriman gmail com>
Date: Sun, 12 Sep 2010 11:35:21 +0200
Subject: [PATCH] Updated key to the new prefix GDK_KEY
---
gedit/gedit-commands-search.c | 4 +-
gedit/gedit-panel.c | 4 +-
gedit/gedit-print-preview.c | 44 +++++++++++-----------
gedit/gedit-status-combo-box.c | 6 ++--
gedit/gedit-view-frame.c | 12 +++---
gedit/gedit-view.c | 8 ++--
plugins/filebrowser/gedit-file-browser-view.c | 8 ++--
plugins/filebrowser/gedit-file-browser-widget.c | 12 +++---
plugins/taglist/gedit-taglist-plugin-panel.c | 2 +-
9 files changed, 50 insertions(+), 50 deletions(-)
diff --git a/gedit/gedit-commands-search.c b/gedit/gedit-commands-search.c
index e416a9b..940903d 100644
--- a/gedit/gedit-commands-search.c
+++ b/gedit/gedit-commands-search.c
@@ -529,7 +529,7 @@ _gedit_cmd_search_find (GtkAction *action,
* the corresponding binding.
*/
gtk_bindings_activate (GTK_OBJECT (active_view),
- GDK_f,
+ GDK_KEY_f,
GDK_CONTROL_MASK);
}
@@ -656,7 +656,7 @@ _gedit_cmd_search_goto_line (GtkAction *action,
* the corresponding binding.
*/
gtk_bindings_activate (GTK_OBJECT (active_view),
- GDK_i,
+ GDK_KEY_i,
GDK_CONTROL_MASK);
}
diff --git a/gedit/gedit-panel.c b/gedit/gedit-panel.c
index 45ea743..c32dd95 100644
--- a/gedit/gedit-panel.c
+++ b/gedit/gedit-panel.c
@@ -243,12 +243,12 @@ gedit_panel_class_init (GeditPanelClass *klass)
binding_set = gtk_binding_set_by_class (klass);
gtk_binding_entry_add_signal (binding_set,
- GDK_Escape,
+ GDK_KEY_Escape,
0,
"close",
0);
gtk_binding_entry_add_signal (binding_set,
- GDK_Return,
+ GDK_KEY_Return,
GDK_CONTROL_MASK,
"focus_document",
0);
diff --git a/gedit/gedit-print-preview.c b/gedit/gedit-print-preview.c
index deaadfa..3a8279e 100644
--- a/gedit/gedit-print-preview.c
+++ b/gedit/gedit-print-preview.c
@@ -822,49 +822,49 @@ preview_layout_key_press (GtkWidget *widget,
break;
case '+':
case '=':
- case GDK_KP_Add:
+ case GDK_KEY_KP_Add:
zoom_in (preview);
break;
case '-':
case '_':
- case GDK_KP_Subtract:
+ case GDK_KEY_KP_Subtract:
zoom_out (preview);
break;
- case GDK_KP_Right:
- case GDK_Right:
+ case GDK_KEY_KP_Right:
+ case GDK_KEY_Right:
if (event->state & GDK_SHIFT_MASK)
x = hupper - hpage;
else
x = MIN (hupper - hpage, x + hstep);
domove = TRUE;
break;
- case GDK_KP_Left:
- case GDK_Left:
+ case GDK_KEY_KP_Left:
+ case GDK_KEY_Left:
if (event->state & GDK_SHIFT_MASK)
x = hlower;
else
x = MAX (hlower, x - hstep);
domove = TRUE;
break;
- case GDK_KP_Up:
- case GDK_Up:
+ case GDK_KEY_KP_Up:
+ case GDK_KEY_Up:
if (event->state & GDK_SHIFT_MASK)
goto page_up;
y = MAX (vlower, y - vstep);
domove = TRUE;
break;
- case GDK_KP_Down:
- case GDK_Down:
+ case GDK_KEY_KP_Down:
+ case GDK_KEY_Down:
if (event->state & GDK_SHIFT_MASK)
goto page_down;
y = MIN (vupper - vpage, y + vstep);
domove = TRUE;
break;
- case GDK_KP_Page_Up:
- case GDK_Page_Up:
- case GDK_Delete:
- case GDK_KP_Delete:
- case GDK_BackSpace:
+ case GDK_KEY_KP_Page_Up:
+ case GDK_KEY_Page_Up:
+ case GDK_KEY_Delete:
+ case GDK_KEY_KP_Delete:
+ case GDK_KEY_BackSpace:
page_up:
if (y <= vlower)
{
@@ -880,8 +880,8 @@ preview_layout_key_press (GtkWidget *widget,
}
domove = TRUE;
break;
- case GDK_KP_Page_Down:
- case GDK_Page_Down:
+ case GDK_KEY_KP_Page_Down:
+ case GDK_KEY_Page_Down:
case ' ':
page_down:
if (y >= (vupper - vpage))
@@ -898,19 +898,19 @@ preview_layout_key_press (GtkWidget *widget,
}
domove = TRUE;
break;
- case GDK_KP_Home:
- case GDK_Home:
+ case GDK_KEY_KP_Home:
+ case GDK_KEY_Home:
goto_page (preview, 0);
y = 0;
domove = TRUE;
break;
- case GDK_KP_End:
- case GDK_End:
+ case GDK_KEY_KP_End:
+ case GDK_KEY_End:
goto_page (preview, preview->priv->n_pages - 1);
y = 0;
domove = TRUE;
break;
- case GDK_Escape:
+ case GDK_KEY_Escape:
gtk_widget_destroy (GTK_WIDGET (preview));
break;
case 'c':
diff --git a/gedit/gedit-status-combo-box.c b/gedit/gedit-status-combo-box.c
index bd16140..18fbbb4 100644
--- a/gedit/gedit-status-combo-box.c
+++ b/gedit/gedit-status-combo-box.c
@@ -252,9 +252,9 @@ key_press_event (GtkWidget *widget,
GdkEventKey *event,
GeditStatusComboBox *combo)
{
- if (event->keyval == GDK_Return || event->keyval == GDK_ISO_Enter ||
- event->keyval == GDK_KP_Enter || event->keyval == GDK_space ||
- event->keyval == GDK_KP_Space)
+ if (event->keyval == GDK_KEY_Return || event->keyval == GDK_KEY_ISO_Enter ||
+ event->keyval == GDK_KEY_KP_Enter || event->keyval == GDK_KEY_space ||
+ event->keyval == GDK_KEY_KP_Space)
{
show_menu (combo, 0, event->time);
return TRUE;
diff --git a/gedit/gedit-view-frame.c b/gedit/gedit-view-frame.c
index bb2267a..200d958 100644
--- a/gedit/gedit-view-frame.c
+++ b/gedit/gedit-view-frame.c
@@ -505,14 +505,14 @@ search_widget_key_press_event (GtkWidget *widget,
modifiers = gtk_accelerator_get_default_mod_mask ();
/* Close window */
- if (event->keyval == GDK_Tab)
+ if (event->keyval == GDK_KEY_Tab)
{
hide_search_widget (frame, FALSE);
retval = TRUE;
}
/* Close window and cancel the search */
- if (event->keyval == GDK_Escape)
+ if (event->keyval == GDK_KEY_Escape)
{
if (frame->priv->search_mode == SEARCH)
{
@@ -535,28 +535,28 @@ search_widget_key_press_event (GtkWidget *widget,
/* SEARCH mode */
/* select previous matching iter */
- if (event->keyval == GDK_Up || event->keyval == GDK_KP_Up)
+ if (event->keyval == GDK_KEY_Up || event->keyval == GDK_KEY_KP_Up)
{
search_again (frame, TRUE);
retval = TRUE;
}
if (((event->state & modifiers) == (GDK_CONTROL_MASK | GDK_SHIFT_MASK)) &&
- (event->keyval == GDK_g || event->keyval == GDK_G))
+ (event->keyval == GDK_KEY_g || event->keyval == GDK_KEY_G))
{
search_again (frame, TRUE);
retval = TRUE;
}
/* select next matching iter */
- if (event->keyval == GDK_Down || event->keyval == GDK_KP_Down)
+ if (event->keyval == GDK_KEY_Down || event->keyval == GDK_KEY_KP_Down)
{
search_again (frame, FALSE);
retval = TRUE;
}
if (((event->state & modifiers) == GDK_CONTROL_MASK) &&
- (event->keyval == GDK_g || event->keyval == GDK_G))
+ (event->keyval == GDK_KEY_g || event->keyval == GDK_KEY_G))
{
search_again (frame, FALSE);
retval = TRUE;
diff --git a/gedit/gedit-view.c b/gedit/gedit-view.c
index 7f80430..cef3167 100644
--- a/gedit/gedit-view.c
+++ b/gedit/gedit-view.c
@@ -228,22 +228,22 @@ gedit_view_class_init (GeditViewClass *klass)
binding_set = gtk_binding_set_by_class (klass);
gtk_binding_entry_add_signal (binding_set,
- GDK_f,
+ GDK_KEY_f,
GDK_CONTROL_MASK,
"start-interactive-search", 0);
gtk_binding_entry_add_signal (binding_set,
- GDK_i,
+ GDK_KEY_i,
GDK_CONTROL_MASK,
"start-interactive-goto-line", 0);
gtk_binding_entry_add_signal (binding_set,
- GDK_k,
+ GDK_KEY_k,
GDK_CONTROL_MASK | GDK_SHIFT_MASK,
"reset_searched_text", 0);
gtk_binding_entry_add_signal (binding_set,
- GDK_d,
+ GDK_KEY_d,
GDK_CONTROL_MASK,
"delete_from_cursor", 2,
G_TYPE_ENUM, GTK_DELETE_PARAGRAPHS,
diff --git a/plugins/filebrowser/gedit-file-browser-view.c b/plugins/filebrowser/gedit-file-browser-view.c
index b3053f5..83d3e06 100644
--- a/plugins/filebrowser/gedit-file-browser-view.c
+++ b/plugins/filebrowser/gedit-file-browser-view.c
@@ -665,7 +665,7 @@ key_press_event (GtkWidget *widget,
switch (event->keyval)
{
- case GDK_space:
+ case GDK_KEY_space:
if (event->state & GDK_CONTROL_MASK)
{
handled = FALSE;
@@ -681,13 +681,13 @@ key_press_event (GtkWidget *widget,
handled = TRUE;
break;
- case GDK_Return:
- case GDK_KP_Enter:
+ case GDK_KEY_Return:
+ case GDK_KEY_KP_Enter:
activate_selected_items (view);
handled = TRUE;
break;
- case GDK_h:
+ case GDK_KEY_h:
if ((event->state & modifiers) == GDK_CONTROL_MASK)
{
toggle_hidden_filter (view);
diff --git a/plugins/filebrowser/gedit-file-browser-widget.c b/plugins/filebrowser/gedit-file-browser-widget.c
index d7d8efd..ed860b1 100644
--- a/plugins/filebrowser/gedit-file-browser-widget.c
+++ b/plugins/filebrowser/gedit-file-browser-widget.c
@@ -2815,7 +2815,7 @@ do_change_directory (GeditFileBrowserWidget *obj,
if ((event->state &
(~GDK_CONTROL_MASK & ~GDK_SHIFT_MASK & ~GDK_MOD1_MASK)) ==
- event->state && event->keyval == GDK_BackSpace)
+ event->state && event->keyval == GDK_KEY_BackSpace)
{
action = gtk_action_group_get_action (obj->priv->action_group_sensitive,
"DirectoryPrevious");
@@ -2828,15 +2828,15 @@ do_change_directory (GeditFileBrowserWidget *obj,
switch (event->keyval)
{
- case GDK_Left:
+ case GDK_KEY_Left:
action = gtk_action_group_get_action (obj->priv->action_group_sensitive,
"DirectoryPrevious");
break;
- case GDK_Right:
+ case GDK_KEY_Right:
action = gtk_action_group_get_action (obj->priv->action_group_sensitive,
"DirectoryNext");
break;
- case GDK_Up:
+ case GDK_KEY_Up:
action = gtk_action_group_get_action (obj->priv->action_group,
"DirectoryUp");
break;
@@ -2871,7 +2871,7 @@ on_treeview_key_press_event (GeditFileBrowserView *treeview,
modifiers = gtk_accelerator_get_default_mod_mask ();
- if (event->keyval == GDK_Delete || event->keyval == GDK_KP_Delete)
+ if (event->keyval == GDK_KEY_Delete || event->keyval == GDK_KEY_KP_Delete)
{
if ((event->state & modifiers) == GDK_SHIFT_MASK &&
@@ -2887,7 +2887,7 @@ on_treeview_key_press_event (GeditFileBrowserView *treeview,
}
}
- if ((event->keyval == GDK_F2) && (event->state & modifiers) == 0)
+ if ((event->keyval == GDK_KEY_F2) && (event->state & modifiers) == 0)
{
rename_selected_file (obj);
return TRUE;
diff --git a/plugins/taglist/gedit-taglist-plugin-panel.c b/plugins/taglist/gedit-taglist-plugin-panel.c
index 5942486..10793ab 100644
--- a/plugins/taglist/gedit-taglist-plugin-panel.c
+++ b/plugins/taglist/gedit-taglist-plugin-panel.c
@@ -277,7 +277,7 @@ tag_list_key_press_event_cb (GtkTreeView *tag_list,
grab_focus = (event->state & GDK_CONTROL_MASK) != 0;
- if (event->keyval == GDK_Return)
+ if (event->keyval == GDK_KEY_Return)
{
GtkTreeModel *model;
GtkTreeSelection *selection;
--
1.7.2.3
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]