mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-24 12:41:16 +00:00
Reset the animation iter on unrealize as well as unmap. (#94336)
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)
This commit is contained in:
parent
335c622faf
commit
4816a141d8
@ -1,3 +1,12 @@
|
||||
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:
|
||||
|
@ -1,3 +1,12 @@
|
||||
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:
|
||||
|
@ -1,3 +1,12 @@
|
||||
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:
|
||||
|
@ -1,3 +1,12 @@
|
||||
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:
|
||||
|
@ -1,3 +1,12 @@
|
||||
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:
|
||||
|
@ -1,3 +1,12 @@
|
||||
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:
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user