+Fri Sep 27 15:27:45 2002 Owen Taylor <otaylor@redhat.com>
+
+ * 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 <hidetoshi.tajima@sun.com>
* modules/input/gtkimcontextxim.c:
+Fri Sep 27 15:27:45 2002 Owen Taylor <otaylor@redhat.com>
+
+ * 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 <hidetoshi.tajima@sun.com>
* modules/input/gtkimcontextxim.c:
+Fri Sep 27 15:27:45 2002 Owen Taylor <otaylor@redhat.com>
+
+ * 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 <hidetoshi.tajima@sun.com>
* modules/input/gtkimcontextxim.c:
+Fri Sep 27 15:27:45 2002 Owen Taylor <otaylor@redhat.com>
+
+ * 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 <hidetoshi.tajima@sun.com>
* modules/input/gtkimcontextxim.c:
+Fri Sep 27 15:27:45 2002 Owen Taylor <otaylor@redhat.com>
+
+ * 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 <hidetoshi.tajima@sun.com>
* modules/input/gtkimcontextxim.c:
+Fri Sep 27 15:27:45 2002 Owen Taylor <otaylor@redhat.com>
+
+ * 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 <hidetoshi.tajima@sun.com>
* modules/input/gtkimcontextxim.c:
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);
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,
}
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 */
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)
{
{
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;