2006-05-29 Luc Pionchon <luc.pionchon@nokia.com>
+ * hildon-widgets/hildon-banner.c
+ (hildon_banner_set_property): Set max_width hint to -1 instead of
+ HILDON_BANNER_LABEL_MAX_TIMED when banner is timed to avoid. This
+ has been done to ensure that the size of the banner will be the
+ requisition size and avoid the size problem when reusing the
+ banner window. See NB#24339.
+
+ (hildon_banner_set_text): Removed useless gtk_window_resize after
+ changing the label text. The size requisition of the banner is
+ updated when the label text is modified, so there is no need to do
+ a resize of the window to the requisition size.
+ (hildon_banner_set_markup): Likewise.
+
+ (hildon_banner_check_position): Added cast to widget argument in
+ call to force_to_wrap_truncated in order to avoid a compilation
+ warning.
+
+
+2006-05-29 Luc Pionchon <luc.pionchon@nokia.com>
+
Added time-error signal - NB#22155
* hildon-widgets/hildon-time-editor.c:
priv->is_timed = g_value_get_boolean(value);
/* Timed and progress notifications have different
- pixel size values for text */
- geom.max_width = priv->is_timed ? HILDON_BANNER_LABEL_MAX_TIMED
+ pixel size values for text.
+ We force to use requisition size for timed banners
+ in order to avoid resize problems when reusing the
+ window (see bug #24339) */
+ geom.max_width = priv->is_timed ? -1
: HILDON_BANNER_LABEL_MAX_PROGRESS;
geom.max_height = -1;
gtk_window_set_geometry_hints(GTK_WINDOW(object),
gint x, y;
GtkRequisition req;
- force_to_wrap_truncated(widget); /* see N#27000 and G#329646 */
+ force_to_wrap_truncated(HILDON_BANNER(widget)); /* see N#27000 and G#329646 */
gtk_widget_size_request(widget, &req);
void hildon_banner_set_text(HildonBanner *self, const gchar *text)
{
GtkLabel *label;
- GtkRequisition req;
g_return_if_fail(HILDON_IS_BANNER(self));
label = GTK_LABEL(self->priv->label);
gtk_label_set_text(label, text);
- /* A re-used window may be too large, shrink to the requisition size */
- gtk_widget_size_request(GTK_WIDGET(self), &req);
- if (req.width != 0)
- {
- gtk_window_resize(GTK_WINDOW(self), req.width, req.height);
- }
-
hildon_banner_check_position(GTK_WIDGET(self));
}
void hildon_banner_set_markup(HildonBanner *self, const gchar *markup)
{
GtkLabel *label;
- GtkRequisition req;
g_return_if_fail(HILDON_IS_BANNER(self));
label = GTK_LABEL(self->priv->label);
gtk_label_set_markup(label, markup);
- /* A re-used window may be too large, shrink to the requisition size */
- gtk_widget_size_request(GTK_WIDGET(self), &req);
- if (req.width != 0)
- {
- gtk_window_resize(GTK_WINDOW(self), req.width, req.height);
- }
-
hildon_banner_check_position(GTK_WIDGET(self));
}