[empathy] GDK keys are now GDK_KEY_*
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] GDK keys are now GDK_KEY_*
- Date: Mon, 4 Oct 2010 09:15:39 +0000 (UTC)
commit b70f96a527146903d637ef75434423da9a5b7468
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Wed Sep 29 15:45:08 2010 +0200
GDK keys are now GDK_KEY_*
libempathy-gtk/empathy-contact-list-view.c | 4 ++--
libempathy-gtk/empathy-individual-view.c | 4 ++--
libempathy-gtk/empathy-live-search.c | 14 +++++++-------
libempathy-gtk/empathy-presence-chooser.c | 4 ++--
libempathy-gtk/empathy-search-bar.c | 2 +-
src/empathy-call-window.c | 2 +-
src/empathy-chat-window.c | 4 ++--
src/empathy-debug-window.c | 4 ++--
src/empathy-ft-manager.c | 4 ++--
src/empathy-main-window.c | 2 +-
src/empathy-sidebar.c | 8 ++++----
src/empathy-status-icon.c | 2 +-
12 files changed, 27 insertions(+), 27 deletions(-)
---
diff --git a/libempathy-gtk/empathy-contact-list-view.c b/libempathy-gtk/empathy-contact-list-view.c
index ce58642..f7a946a 100644
--- a/libempathy-gtk/empathy-contact-list-view.c
+++ b/libempathy-gtk/empathy-contact-list-view.c
@@ -856,7 +856,7 @@ contact_list_view_key_press_event_cb (EmpathyContactListView *view,
GdkEventKey *event,
gpointer user_data)
{
- if (event->keyval == GDK_Menu) {
+ if (event->keyval == GDK_KEY_Menu) {
MenuPopupData *data;
data = g_slice_new (MenuPopupData);
@@ -1282,7 +1282,7 @@ contact_list_view_search_key_navigation_cb (GtkWidget *search,
GdkEventKey *eventkey = ((GdkEventKey *) event);
gboolean ret = FALSE;
- if (eventkey->keyval == GDK_Up || eventkey->keyval == GDK_Down) {
+ if (eventkey->keyval == GDK_KEY_Up || eventkey->keyval == GDK_KEY_Down) {
GdkEvent *new_event;
new_event = gdk_event_copy (event);
diff --git a/libempathy-gtk/empathy-individual-view.c b/libempathy-gtk/empathy-individual-view.c
index 9079303..ee0e06c 100644
--- a/libempathy-gtk/empathy-individual-view.c
+++ b/libempathy-gtk/empathy-individual-view.c
@@ -882,7 +882,7 @@ individual_view_key_press_event_cb (EmpathyIndividualView *view,
GdkEventKey *event,
gpointer user_data)
{
- if (event->keyval == GDK_Menu)
+ if (event->keyval == GDK_KEY_Menu)
{
MenuPopupData *data;
@@ -1314,7 +1314,7 @@ individual_view_search_key_navigation_cb (GtkWidget *search,
GdkEventKey *eventkey = ((GdkEventKey *) event);
gboolean ret = FALSE;
- if (eventkey->keyval == GDK_Up || eventkey->keyval == GDK_Down)
+ if (eventkey->keyval == GDK_KEY_Up || eventkey->keyval == GDK_KEY_Down)
{
GdkEvent *new_event;
diff --git a/libempathy-gtk/empathy-live-search.c b/libempathy-gtk/empathy-live-search.c
index d058b57..a607939 100644
--- a/libempathy-gtk/empathy-live-search.c
+++ b/libempathy-gtk/empathy-live-search.c
@@ -255,15 +255,15 @@ live_search_entry_key_pressed_cb (GtkEntry *entry,
gboolean ret;
/* if esc key pressed, hide the search */
- if (event->keyval == GDK_Escape)
+ if (event->keyval == GDK_KEY_Escape)
{
gtk_widget_hide (GTK_WIDGET (self));
return TRUE;
}
/* emit key navigation signal, so other widgets can respond to it properly */
- if (event->keyval == GDK_Up || event->keyval == GDK_Down
- || event->keyval == GDK_Left || event->keyval == GDK_Right)
+ if (event->keyval == GDK_KEY_Up || event->keyval == GDK_KEY_Down
+ || event->keyval == GDK_KEY_Left || event->keyval == GDK_KEY_Right)
{
g_signal_emit (self, signals[KEYNAV], 0, event, &ret);
return ret;
@@ -319,20 +319,20 @@ live_search_key_press_event_cb (GtkWidget *widget,
/* dont forward this event to the entry, else the event is consumed by the
* entry and does not close the window */
if (!gtk_widget_get_visible (GTK_WIDGET (self)) &&
- event->keyval == GDK_Escape)
+ event->keyval == GDK_KEY_Escape)
return FALSE;
/* do not show the search if CTRL and/or ALT are pressed with a key
* this is needed, because otherwise the CTRL + F accel would not work,
* because the entry consumes it */
if (event->state & (GDK_MOD1_MASK | GDK_CONTROL_MASK) ||
- event->keyval == GDK_Control_L ||
- event->keyval == GDK_Control_R)
+ event->keyval == GDK_KEY_Control_L ||
+ event->keyval == GDK_KEY_Control_R)
return FALSE;
/* dont forward the up and down arrow keys to the entry, they are needed for
* navigation in the treeview and are not needed in the search entry */
- if (event->keyval == GDK_Up || event->keyval == GDK_Down)
+ if (event->keyval == GDK_KEY_Up || event->keyval == GDK_KEY_Down)
return FALSE;
/* realize the widget if it is not realized yet */
diff --git a/libempathy-gtk/empathy-presence-chooser.c b/libempathy-gtk/empathy-presence-chooser.c
index cd9b455..8258688 100644
--- a/libempathy-gtk/empathy-presence-chooser.c
+++ b/libempathy-gtk/empathy-presence-chooser.c
@@ -525,12 +525,12 @@ presence_chooser_entry_key_press_event_cb (EmpathyPresenceChooser *self,
{
EmpathyPresenceChooserPriv *priv = GET_PRIV (self);
- if (priv->editing_status && event->keyval == GDK_Escape) {
+ if (priv->editing_status && event->keyval == GDK_KEY_Escape) {
/* the user pressed Escape, undo the editing */
presence_chooser_reset_status (self);
return TRUE;
}
- else if (event->keyval == GDK_Up || event->keyval == GDK_Down) {
+ else if (event->keyval == GDK_KEY_Up || event->keyval == GDK_KEY_Down) {
/* ignore */
return TRUE;
}
diff --git a/libempathy-gtk/empathy-search-bar.c b/libempathy-gtk/empathy-search-bar.c
index 2116d59..bd97c2d 100644
--- a/libempathy-gtk/empathy-search-bar.c
+++ b/libempathy-gtk/empathy-search-bar.c
@@ -230,7 +230,7 @@ empathy_search_bar_key_pressed (GtkWidget *widget,
GdkEventKey *event,
gpointer user_data)
{
- if (event->keyval == GDK_Escape)
+ if (event->keyval == GDK_KEY_Escape)
{
empathy_search_bar_hide (EMPATHY_SEARCH_BAR (widget));
return TRUE;
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c
index c2dbebb..bdf2a6b 100644
--- a/src/empathy-call-window.c
+++ b/src/empathy-call-window.c
@@ -3218,7 +3218,7 @@ empathy_call_window_key_press_cb (GtkWidget *video_output,
{
EmpathyCallWindowPriv *priv = GET_PRIV (window);
- if (priv->is_fullscreen && event->keyval == GDK_Escape)
+ if (priv->is_fullscreen && event->keyval == GDK_KEY_Escape)
{
/* Since we are in fullscreen mode, toggling will bring us back to
normal mode. */
diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c
index 66c4e96..70b5c31 100644
--- a/src/empathy-chat-window.c
+++ b/src/empathy-chat-window.c
@@ -116,8 +116,8 @@ typedef struct {
static GList *chat_windows = NULL;
static const guint tab_accel_keys[] = {
- GDK_1, GDK_2, GDK_3, GDK_4, GDK_5,
- GDK_6, GDK_7, GDK_8, GDK_9, GDK_0
+ GDK_KEY_1, GDK_KEY_2, GDK_KEY_3, GDK_KEY_4, GDK_KEY_5,
+ GDK_KEY_6, GDK_KEY_7, GDK_KEY_8, GDK_KEY_9, GDK_KEY_0
};
typedef enum {
diff --git a/src/empathy-debug-window.c b/src/empathy-debug-window.c
index affb259..ddebf23 100644
--- a/src/empathy-debug-window.c
+++ b/src/empathy-debug-window.c
@@ -1328,8 +1328,8 @@ debug_window_key_press_event_cb (GtkWidget *widget,
GdkEventKey *event,
gpointer user_data)
{
- if ((event->state & GDK_CONTROL_MASK && event->keyval == GDK_w)
- || event->keyval == GDK_Escape)
+ if ((event->state & GDK_CONTROL_MASK && event->keyval == GDK_KEY_w)
+ || event->keyval == GDK_KEY_Escape)
{
gtk_widget_destroy (widget);
return TRUE;
diff --git a/src/empathy-ft-manager.c b/src/empathy-ft-manager.c
index 6b9e537..126ad87 100644
--- a/src/empathy-ft-manager.c
+++ b/src/empathy-ft-manager.c
@@ -927,8 +927,8 @@ ft_manager_key_press_event_cb (GtkWidget *widget,
GdkEventKey *event,
gpointer user_data)
{
- if ((event->state & GDK_CONTROL_MASK && event->keyval == GDK_w)
- || event->keyval == GDK_Escape)
+ if ((event->state & GDK_CONTROL_MASK && event->keyval == GDK_KEY_w)
+ || event->keyval == GDK_KEY_Escape)
{
gtk_widget_destroy (widget);
return TRUE;
diff --git a/src/empathy-main-window.c b/src/empathy-main-window.c
index 9a336a3..976ce09 100644
--- a/src/empathy-main-window.c
+++ b/src/empathy-main-window.c
@@ -725,7 +725,7 @@ main_window_key_press_event_cb (GtkWidget *window,
{
EmpathyChatManager *chat_manager;
- if (event->keyval == GDK_T
+ if (event->keyval == GDK_KEY_T
&& event->state & GDK_SHIFT_MASK
&& event->state & GDK_CONTROL_MASK) {
chat_manager = empathy_chat_manager_dup_singleton ();
diff --git a/src/empathy-sidebar.c b/src/empathy-sidebar.c
index de68780..776e0a8 100644
--- a/src/empathy-sidebar.c
+++ b/src/empathy-sidebar.c
@@ -294,10 +294,10 @@ empathy_sidebar_select_button_key_press_cb (GtkWidget *widget,
{
EmpathySidebar *sidebar = EMPATHY_SIDEBAR (user_data);
- if (event->keyval == GDK_space ||
- event->keyval == GDK_KP_Space ||
- event->keyval == GDK_Return ||
- event->keyval == GDK_KP_Enter)
+ if (event->keyval == GDK_KEY_space ||
+ event->keyval == GDK_KEY_KP_Space ||
+ event->keyval == GDK_KEY_Return ||
+ event->keyval == GDK_KEY_KP_Enter)
{
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), TRUE);
diff --git a/src/empathy-status-icon.c b/src/empathy-status-icon.c
index 97ab255..a062f51 100644
--- a/src/empathy-status-icon.c
+++ b/src/empathy-status-icon.c
@@ -466,7 +466,7 @@ status_icon_key_press_event_cb (GtkWidget *window,
GdkEventKey *event,
EmpathyStatusIcon *icon)
{
- if (event->keyval == GDK_Escape) {
+ if (event->keyval == GDK_KEY_Escape) {
status_icon_set_visibility (icon, FALSE, TRUE);
}
return FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]