2006-09-14 Michael Dominic Kostrzewa <michael.kostrzewa@nokia.com>
authorMichael Dominic Kostrzewa <michael.kostrzewa@nokia.com>
Fri, 15 Sep 2006 08:14:01 +0000 (08:14 +0000)
committerMichael Dominic Kostrzewa <michael.kostrzewa@nokia.com>
Fri, 15 Sep 2006 08:14:01 +0000 (08:14 +0000)
* hildon-widgets/hildon-date-editor.c:
(hildon_date_editor_entry_released): Removed this function in order
to avoid the selection of the entry with the second click.
(hildon_date_editor_entry_focusin): Removed the test, now we want
to select the entry using the callback in all the situations.
Fixes #NB39612.

* hildon-widgets/hildon-number-editor.c: renamed {plus,minus}-button
widgets to ne-{plus,minus}-button in order to do the theming without
depending on the HildonNumberEditor widget name. Fixes #MB624. Will
work with new theme config.

ChangeLog
hildon-widgets/hildon-date-editor.c
hildon-widgets/hildon-number-editor.c

index 7415fe5..55a14a7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,19 @@
 2006-09-14  Michael Dominic Kostrzewa  <michael.kostrzewa@nokia.com> 
 
+       * hildon-widgets/hildon-date-editor.c:
+       (hildon_date_editor_entry_released): Removed this function in order
+       to avoid the selection of the entry with the second click.
+       (hildon_date_editor_entry_focusin): Removed the test, now we want
+       to select the entry using the callback in all the situations. 
+       Fixes #NB39612. 
+       
+       * hildon-widgets/hildon-number-editor.c: renamed {plus,minus}-button
+       widgets to ne-{plus,minus}-button in order to do the theming without
+       depending on the HildonNumberEditor widget name. Fixes #MB624. Will
+       work with new theme config.
+       
+2006-09-14  Michael Dominic Kostrzewa  <michael.kostrzewa@nokia.com> 
+
        * hildon-widgets/hildon-composite-widget.c: Changed the focus
        handler -- with hildon-time-editor and hildon-date-editor, if we
        are moving up or down, with the focus inside the widget, we return
index 3ebff5d..89be988 100644 (file)
@@ -85,9 +85,6 @@ hildon_date_editor_icon_press(GtkWidget * widget,
                               gpointer data);
 
 static gboolean
-hildon_date_editor_entry_released(GtkWidget * widget,
-                                  GdkEventButton * event, gpointer data);
-static gboolean
 hildon_date_editor_released(GtkWidget * widget, 
                             gpointer data);
 
@@ -477,22 +474,13 @@ static void hildon_date_editor_init(HildonDateEditor * editor)
     g_signal_connect(GTK_OBJECT(priv->d_button_image), "key_press_event",
                      G_CALLBACK(hildon_date_editor_keypress), editor);
 
-    /* entry signal connects */
-    g_signal_connect(GTK_OBJECT(priv->d_entry), "button_release_event",
-                     G_CALLBACK(hildon_date_editor_entry_released), editor);
-    
+    /* entry signal connects */    
     g_signal_connect(GTK_OBJECT(priv->d_entry), "focus-in-event",
                      G_CALLBACK(hildon_date_editor_entry_focusin), editor);
 
-    g_signal_connect(GTK_OBJECT(priv->m_entry), "button_release_event",
-                     G_CALLBACK(hildon_date_editor_entry_released), editor);
-
     g_signal_connect(GTK_OBJECT(priv->m_entry), "focus-in-event",
                      G_CALLBACK(hildon_date_editor_entry_focusin), editor);
 
-    g_signal_connect(GTK_OBJECT(priv->y_entry), "button_release_event",
-                     G_CALLBACK(hildon_date_editor_entry_released), editor);
-
     g_signal_connect(GTK_OBJECT(priv->y_entry), "focus-in-event",
                      G_CALLBACK(hildon_date_editor_entry_focusin), editor);
 
@@ -816,35 +804,12 @@ static gboolean hildon_date_editor_icon_press(GtkWidget * widget,
     return FALSE;
 }
 
-static gboolean hildon_date_editor_entry_released(GtkWidget * widget,
-                                                 GdkEventButton * event,
-                                                  gpointer data)
-{
-    HildonDateEditor *ed;
-    HildonDateEditorPrivate *priv;
-
-    ed = HILDON_DATE_EDITOR(data);
-    priv = HILDON_DATE_EDITOR_GET_PRIVATE(ed);
-
-    if (event->button == 1) {
-        /* We might not get focus because of invalid values in entries */
-        if (GTK_WIDGET_HAS_FOCUS(widget))
-                       g_idle_add((GSourceFunc)
-                                       _hildon_date_editor_entry_select_all, GTK_ENTRY(widget));
-    }
-
-    return FALSE;
-}
-
 static gboolean hildon_date_editor_entry_focusin(GtkWidget * widget,
                                                  GdkEventFocus * event,
                                                  gpointer data)
 {
-    if (!GTK_ENTRY(widget)->button)
-    {
-               g_idle_add((GSourceFunc)
-                               _hildon_date_editor_entry_select_all, GTK_ENTRY(widget));
-    }
+    g_idle_add((GSourceFunc)
+               _hildon_date_editor_entry_select_all, GTK_ENTRY(widget));
 
     return FALSE;
 }
index 1c92b9f..84ab06d 100644 (file)
@@ -336,8 +336,8 @@ hildon_number_editor_init (HildonNumberEditor *editor)
     priv->minus = gtk_button_new();
     priv->plus = gtk_button_new();
 
-    gtk_widget_set_name( priv->minus, "minus-button" );
-    gtk_widget_set_name( priv->plus, "plus-button" );
+    gtk_widget_set_name( priv->minus, "ne-minus-button" );
+    gtk_widget_set_name( priv->plus, "ne-plus-button" );
     gtk_widget_set_size_request( priv->minus, BUTTON_WIDTH, BUTTON_HEIGHT );
     gtk_widget_set_size_request( priv->plus, BUTTON_WIDTH, BUTTON_HEIGHT );
     gtk_entry_set_alignment (GTK_ENTRY(priv->num_entry), 1);