2009-02-24 Claudio Saavedra <csaavedra@igalia.com>
+ * src/hildon-banner.c (+hildon_banner_bind_style):
+ Renamed from hildon_banner_bind_label_style(), now naming the
+ banner itself as well.
+ (hildon_banner_show_information),
+ (hildon_banner_show_information_with_markup),
+ (hildon_banner_show_animation), (hildon_banner_show_progress):
+ Name the widgets and labels, based on their type.
+
+ See NB#98597 (Hildon Note and Hildon Banner should use themeable
+ background image)
+
+2009-02-24 Claudio Saavedra <csaavedra@igalia.com>
+
* src/hildon-note.c (hildon_note_set_property): call
hildon_note_rename() on HildonNote:note-type set.
(hildon_note_rename): Name the note and its label, based on the
hildon_banner_timed_quark (void);
static void
-hildon_banner_bind_label_style (HildonBanner *self,
- const gchar *name);
+hildon_banner_bind_style (HildonBanner *self,
+ const gchar *name);
static gboolean
hildon_banner_timeout (gpointer data);
return quark;
}
-/* Set the label name to make the correct rc-style attached into it */
+/* Set the widget and label name to make the correct rc-style attached into them */
static void
-hildon_banner_bind_label_style (HildonBanner *self,
- const gchar *name)
+hildon_banner_bind_style (HildonBanner *self,
+ const gchar *name_sufix)
{
HildonBannerPrivate *priv = HILDON_BANNER_GET_PRIVATE (self);
+ gchar *name;
+
g_assert (priv);
- GtkWidget *label = priv->label;
+ name = g_strconcat ("HildonBannerLabel-", name_sufix, NULL);
+ gtk_widget_set_name (priv->label, name);
+ g_free (name);
- /* Too bad that we cannot really reset the widget name */
- gtk_widget_set_name (label, name ? name : g_type_name (GTK_WIDGET_TYPE (label)));
+ name = g_strconcat ("HildonBanner-", name_sufix, NULL);
+ gtk_widget_set_name (GTK_WIDGET (self), name);
+ g_free (name);
}
/* In timeout function we automatically destroy timed banners */
banner = hildon_banner_get_instance_for_widget (widget, TRUE);
hildon_banner_set_text (banner, text);
- hildon_banner_bind_label_style (banner, NULL);
+ hildon_banner_bind_style (banner, "information");
/* Show the banner, since caller cannot do that */
gtk_widget_show_all (GTK_WIDGET (banner));
banner = hildon_banner_get_instance_for_widget (widget, TRUE);
hildon_banner_set_markup (banner, markup);
- hildon_banner_bind_label_style (banner, NULL);
+ hildon_banner_bind_style (banner, "information");
/* Show the banner, since caller cannot do that */
gtk_widget_show_all (GTK_WIDGET (banner));
GTK_TYPE_IMAGE, "yalign", 0.0, NULL);
hildon_banner_set_text (banner, text);
- hildon_banner_bind_label_style (banner, NULL);
+ hildon_banner_bind_style (banner, "animation");
/* And show it */
gtk_widget_show_all (GTK_WIDGET (banner));
HILDON_BANNER_PROGRESS_WIDTH, -1);
hildon_banner_set_text (banner, text);
- hildon_banner_bind_label_style (banner, NULL);
+ hildon_banner_bind_style (banner, "progress");
/* Show the banner */
gtk_widget_show_all (GTK_WIDGET (banner));