* hildon-widgets/hildon-color-button.c (hildon_color_button_init): Moved key handling...
authorLuc Pionchon <luc.pionchon@nokia.com>
Mon, 5 Jun 2006 19:54:14 +0000 (19:54 +0000)
committerLuc Pionchon <luc.pionchon@nokia.com>
Mon, 5 Jun 2006 19:54:14 +0000 (19:54 +0000)
(hildon_color_button_key_released): Renamed  to   _key_pressed
(hildon_color_button_key_pressed) : new name from _key_released

NB#31604

ChangeLog
hildon-widgets/hildon-color-button.c

index 87d09d2..af4333d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,17 @@
 2006-06-05  Luc Pionchon  <luc.pionchon@nokia.com>
 
+       * 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  <luc.pionchon@nokia.com>
+
        * 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
index e24b4b1..be017c6 100644 (file)
@@ -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)
 {