2008-03-27 Michael Natterer <mitch@imendio.com>
authorMichael Natterer <mitch@imendio.com>
Thu, 27 Mar 2008 10:52:14 +0000 (10:52 +0000)
committerMichael Natterer <mitch@imendio.com>
Thu, 27 Mar 2008 10:52:14 +0000 (10:52 +0000)
Enable fixing: NB#79916 and NB#79918: The help topic for Color
selector cannot be opened

* src/hildon-color-button.c: add signal "setup-dialog" and emit it
when the popup color selector is created. Please connect to this
signal in order to set the dialog's help ID.

ChangeLog
src/hildon-color-button.c

index c3ca2a2..de84b0b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2008-03-27  Michael Natterer  <mitch@imendio.com>
+
+       Enable fixing: NB#79916 and NB#79918: The help topic for Color
+       selector cannot be opened
+
+       * src/hildon-color-button.c: add signal "setup-dialog" and emit it
+       when the popup color selector is created. Please connect to this
+       signal in order to set the dialog's help ID.
+
 2008-03-25  Sven Herzberg  <sven@imendio.com>
 
        Fixes: MB#1212: Hide info banners (infoprints) on click
index 2164294..0a57a1e 100644 (file)
 
 #define                                         INNER_BORDER_THICKNESS 2
 
-enum 
+enum
+{
+    SETUP_DIALOG,
+    LAST_SIGNAL
+};
+
+enum
 {
     PROP_0,
     PROP_COLOR,
@@ -143,6 +149,7 @@ draw_grid                                       (GdkDrawable *drawable,
                                                  gint h);
 
 static gpointer                                 parent_class = NULL;
+static guint                                    signals [LAST_SIGNAL] = { 0, };
 
 /**
  * hildon_color_button_get_type:
@@ -199,6 +206,16 @@ hildon_color_button_class_init                  (HildonColorButtonClass *klass)
     button_class->clicked           = hildon_color_button_clicked;
     widget_class->mnemonic_activate = hildon_color_button_mnemonic_activate;
 
+   signals[SETUP_DIALOG] =
+       g_signal_new ("setup-dialog",
+                     G_TYPE_FROM_CLASS (klass),
+                     G_SIGNAL_RUN_LAST,
+                     0,
+                     NULL, NULL,
+                     gtk_marshal_VOID__OBJECT,
+                     G_TYPE_NONE, 1,
+                     HILDON_TYPE_COLOR_CHOOSER_DIALOG);
+
     /**
      * HildonColorButton:color:
      *
@@ -427,6 +444,8 @@ hildon_color_button_clicked                     (GtkButton *button)
         cs_dialog = HILDON_COLOR_CHOOSER_DIALOG (priv->dialog);
         if (parent)
             gtk_window_set_transient_for (GTK_WINDOW (cs_dialog), GTK_WINDOW (parent));
+
+        g_signal_emit (button, signals[SETUP_DIALOG], 0, priv->dialog);
     }
 
     /* Set the initial color for the color selector dialog */