GTK_WIDGET_CLASS (parent_class)->realize (widget);
/* We use special hint to turn the banner into information notification. */
- gdk_window_set_type_hint (widget->window, GDK_WINDOW_TYPE_HINT_MESSAGE);
+ gdk_window_set_type_hint (widget->window, GDK_WINDOW_TYPE_HINT_NOTIFICATION);
hildon_banner_check_position (widget);
}
{
GtkLabel *label;
HildonBannerPrivate *priv;
+ const gchar *existing_text;
g_return_if_fail (HILDON_IS_BANNER (self));
g_assert (priv);
label = GTK_LABEL (priv->label);
- if (strcmp (gtk_label_get_text (label), text) != 0)
+ existing_text = gtk_label_get_text (label);
+
+ if (existing_text != NULL &&
+ text != NULL &&
+ strcmp (existing_text, text) != 0)
gtk_label_set_text (label, text);
hildon_banner_check_position (GTK_WIDGET (self));