From fada4bfcd2f007e52166f4567164dc1d5bb6a54a Mon Sep 17 00:00:00 2001 From: Luc Pionchon Date: Mon, 5 Jun 2006 19:54:14 +0000 Subject: [PATCH] * hildon-widgets/hildon-color-button.c (hildon_color_button_init): Moved key handling from key release event to key press event. (hildon_color_button_key_released): Renamed to _key_pressed (hildon_color_button_key_pressed) : new name from _key_released NB#31604 --- ChangeLog | 12 ++++++++++++ hildon-widgets/hildon-color-button.c | 17 ++++++++--------- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 87d09d2..af4333d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,17 @@ 2006-06-05 Luc Pionchon + * hildon-widgets/hildon-color-button.c + (hildon_color_button_init): Moved key handling from key release + event to key press event. + + (hildon_color_button_key_released): Renamed to _key_pressed + (hildon_color_button_key_pressed) : new name from _key_released + + NB#31604 + + +2006-06-05 Luc Pionchon + * hildon-widgets/hildon-time-editor.c (validated_conversion): return the minimum allowed value for the entry when the user types an empty text into an entry and moves diff --git a/hildon-widgets/hildon-color-button.c b/hildon-widgets/hildon-color-button.c index e24b4b1..be017c6 100644 --- a/hildon-widgets/hildon-color-button.c +++ b/hildon-widgets/hildon-color-button.c @@ -99,9 +99,9 @@ hildon_color_button_unrealize(GtkWidget *widget); static void hildon_color_button_clicked(GtkButton *button); static gboolean -hildon_color_button_key_released(GtkWidget * button, - GdkEventKey * event, - gpointer data); +hildon_color_button_key_pressed(GtkWidget * button, + GdkEventKey * event, + gpointer data); static gint hildon_color_field_expose_event(GtkWidget *widget, GdkEventExpose *event, HildonColorButton *cb); @@ -260,14 +260,13 @@ hildon_color_button_init(HildonColorButton *cb) g_signal_connect(drawing_area, "expose-event", G_CALLBACK(hildon_color_field_expose_event), cb); - g_signal_connect(G_OBJECT(cb), "key-release-event", - G_CALLBACK(hildon_color_button_key_released), cb); + /* Connect to callback function for key press event */ + g_signal_connect(G_OBJECT(cb), "key-press-event", + G_CALLBACK(hildon_color_button_key_pressed), cb); /* packing */ gtk_container_add(GTK_CONTAINER(align), drawing_area); gtk_container_add(GTK_CONTAINER(cb), align); - - gtk_widget_add_events(GTK_WIDGET(cb), GDK_KEY_RELEASE_MASK); gtk_widget_show_all(align); @@ -352,9 +351,9 @@ hildon_color_button_clicked(GtkButton *button) gtk_widget_hide(GTK_WIDGET(cs_dialog)); } -/* Popup a color selector dialog on hardkey Select release */ +/* Popup a color selector dialog on hardkey Select press */ static gboolean -hildon_color_button_key_released(GtkWidget * button, +hildon_color_button_key_pressed(GtkWidget * button, GdkEventKey * event, gpointer data) { -- 1.7.9.5