2009-01-19 Claudio Saavedra <csaavedra@igalia.com>
authorClaudio Saavedra <csaavedra@igalia.com>
Mon, 19 Jan 2009 16:07:40 +0000 (16:07 +0000)
committerClaudio Saavedra <csaavedra@igalia.com>
Mon, 19 Jan 2009 16:07:40 +0000 (16:07 +0000)
* src/hildon-picker-button.c: (hildon_picker_button_clicked): Connect
the signal handlers only after creating the dialog instead of on every
button click.

ChangeLog
src/hildon-picker-button.c

index 042900a..2cfe54a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-01-19  Claudio Saavedra  <csaavedra@igalia.com>
+
+       * src/hildon-picker-button.c: (hildon_picker_button_clicked): Connect
+       the signal handlers only after creating the dialog instead of on every
+       button click.
+
 2009-01-19  Alberto Garcia  <agarcia@igalia.com>
 
        * src/hildon-button.c (hildon_button_init)
index eae520d..e208d99 100644 (file)
@@ -236,17 +236,17 @@ hildon_picker_button_clicked (GtkButton * button)
                           gtk_window_get_modal (GTK_WINDOW (parent)));
     gtk_window_set_title (GTK_WINDOW (priv->dialog),
                           hildon_button_get_title (HILDON_BUTTON (button)));
-  }
-
-  if (_current_selector_empty (HILDON_PICKER_BUTTON (button))) {
-    g_warning ("There are no elements in the selector. Nothing to show.");
-  } else {
     g_signal_connect (priv->dialog, "response",
                       G_CALLBACK (hildon_picker_button_on_dialog_response),
                       button);
     g_signal_connect (priv->dialog, "delete-event",
                       G_CALLBACK (gtk_widget_hide_on_delete),
                       NULL);
+  }
+
+  if (_current_selector_empty (HILDON_PICKER_BUTTON (button))) {
+    g_warning ("There are no elements in the selector. Nothing to show.");
+  } {
     gtk_window_present (GTK_WINDOW (priv->dialog));
   }
 }