diff --git a/ChangeLog b/ChangeLog index 09e466eaf8..c25471aab5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +Fri Sep 27 15:27:45 2002 Owen Taylor + + * gtk/gtkimage.c (gtk_image_unrealize): Reset the + animation iter on unrealize as well as unmap. + (#94336) + + * gtk/gtkprogressbar.c (gtk_progress_bar_set_text): Don't + turn a value of "" into NULL. (#94157, Vitaly Tishkov) + Wed Sep 25 18:23:50 2002 HideToshi Tajima * modules/input/gtkimcontextxim.c: diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 09e466eaf8..c25471aab5 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,12 @@ +Fri Sep 27 15:27:45 2002 Owen Taylor + + * gtk/gtkimage.c (gtk_image_unrealize): Reset the + animation iter on unrealize as well as unmap. + (#94336) + + * gtk/gtkprogressbar.c (gtk_progress_bar_set_text): Don't + turn a value of "" into NULL. (#94157, Vitaly Tishkov) + Wed Sep 25 18:23:50 2002 HideToshi Tajima * modules/input/gtkimcontextxim.c: diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 09e466eaf8..c25471aab5 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,12 @@ +Fri Sep 27 15:27:45 2002 Owen Taylor + + * gtk/gtkimage.c (gtk_image_unrealize): Reset the + animation iter on unrealize as well as unmap. + (#94336) + + * gtk/gtkprogressbar.c (gtk_progress_bar_set_text): Don't + turn a value of "" into NULL. (#94157, Vitaly Tishkov) + Wed Sep 25 18:23:50 2002 HideToshi Tajima * modules/input/gtkimcontextxim.c: diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 09e466eaf8..c25471aab5 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,12 @@ +Fri Sep 27 15:27:45 2002 Owen Taylor + + * gtk/gtkimage.c (gtk_image_unrealize): Reset the + animation iter on unrealize as well as unmap. + (#94336) + + * gtk/gtkprogressbar.c (gtk_progress_bar_set_text): Don't + turn a value of "" into NULL. (#94157, Vitaly Tishkov) + Wed Sep 25 18:23:50 2002 HideToshi Tajima * modules/input/gtkimcontextxim.c: diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 09e466eaf8..c25471aab5 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,12 @@ +Fri Sep 27 15:27:45 2002 Owen Taylor + + * gtk/gtkimage.c (gtk_image_unrealize): Reset the + animation iter on unrealize as well as unmap. + (#94336) + + * gtk/gtkprogressbar.c (gtk_progress_bar_set_text): Don't + turn a value of "" into NULL. (#94157, Vitaly Tishkov) + Wed Sep 25 18:23:50 2002 HideToshi Tajima * modules/input/gtkimcontextxim.c: diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 09e466eaf8..c25471aab5 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,12 @@ +Fri Sep 27 15:27:45 2002 Owen Taylor + + * gtk/gtkimage.c (gtk_image_unrealize): Reset the + animation iter on unrealize as well as unmap. + (#94336) + + * gtk/gtkprogressbar.c (gtk_progress_bar_set_text): Don't + turn a value of "" into NULL. (#94157, Vitaly Tishkov) + Wed Sep 25 18:23:50 2002 HideToshi Tajima * modules/input/gtkimcontextxim.c: diff --git a/gtk/gtkimage.c b/gtk/gtkimage.c index 967fd29df5..3ca712b65a 100644 --- a/gtk/gtkimage.c +++ b/gtk/gtkimage.c @@ -39,6 +39,7 @@ static void gtk_image_init (GtkImage *image); static gint gtk_image_expose (GtkWidget *widget, GdkEventExpose *event); static void gtk_image_unmap (GtkWidget *widget); +static void gtk_image_unrealize (GtkWidget *widget); static void gtk_image_size_request (GtkWidget *widget, GtkRequisition *requisition); static void gtk_image_destroy (GtkObject *object); @@ -122,6 +123,7 @@ gtk_image_class_init (GtkImageClass *class) widget_class->expose_event = gtk_image_expose; widget_class->size_request = gtk_image_size_request; widget_class->unmap = gtk_image_unmap; + widget_class->unrealize = gtk_image_unrealize; g_object_class_install_property (gobject_class, PROP_PIXBUF, @@ -1136,12 +1138,8 @@ gtk_image_get (GtkImage *image, } static void -gtk_image_unmap (GtkWidget *widget) +gtk_image_reset_anim_iter (GtkImage *image) { - GtkImage *image; - - image = GTK_IMAGE (widget); - if (image->storage_type == GTK_IMAGE_ANIMATION) { /* Reset the animation */ @@ -1158,11 +1156,26 @@ gtk_image_unmap (GtkWidget *widget) image->data.anim.iter = NULL; } } +} + +static void +gtk_image_unmap (GtkWidget *widget) +{ + gtk_image_reset_anim_iter (GTK_IMAGE (widget)); if (GTK_WIDGET_CLASS (parent_class)->unmap) GTK_WIDGET_CLASS (parent_class)->unmap (widget); } +static void +gtk_image_unrealize (GtkWidget *widget) +{ + gtk_image_reset_anim_iter (GTK_IMAGE (widget)); + + if (GTK_WIDGET_CLASS (parent_class)->unrealize) + GTK_WIDGET_CLASS (parent_class)->unrealize (widget); +} + static gint animation_timeout (gpointer data) { diff --git a/gtk/gtkprogressbar.c b/gtk/gtkprogressbar.c index e5ac4eeb31..4d5f80d79e 100644 --- a/gtk/gtkprogressbar.c +++ b/gtk/gtkprogressbar.c @@ -910,17 +910,9 @@ gtk_progress_bar_set_text (GtkProgressBar *pbar, { g_return_if_fail (GTK_IS_PROGRESS_BAR (pbar)); - if (text && *text) - { - gtk_progress_set_show_text (GTK_PROGRESS (pbar), TRUE); - gtk_progress_set_format_string (GTK_PROGRESS (pbar), text); - } - else - { - gtk_progress_set_show_text (GTK_PROGRESS (pbar), FALSE); - gtk_progress_set_format_string (GTK_PROGRESS (pbar), NULL); - } - + gtk_progress_set_show_text (GTK_PROGRESS (pbar), text && *text); + gtk_progress_set_format_string (GTK_PROGRESS (pbar), text); + /* We don't support formats in this interface */ GTK_PROGRESS (pbar)->use_text_format = FALSE;