forked from AuroraMiddleware/gtk
Fix #344543
This commit is contained in:
parent
adb725eadc
commit
df882a3279
@ -1,3 +1,9 @@
|
||||
2006-06-11 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkprogressbar.h: Add a dirty flag to GtkProgressBar.n/
|
||||
* gtk/gtkprogressbar.c: Defer updating of the offscreen
|
||||
pixmap until expose. (#344543, Chris Wilson)
|
||||
|
||||
2006-06-11 Emmanuele Bassi <ebassi@gnome.org>
|
||||
|
||||
* gtk/gtkrecentchooserdefault.c
|
||||
|
@ -1,3 +1,9 @@
|
||||
2006-06-11 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkprogressbar.h: Add a dirty flag to GtkProgressBar.n/
|
||||
* gtk/gtkprogressbar.c: Defer updating of the offscreen
|
||||
pixmap until expose. (#344543, Chris Wilson)
|
||||
|
||||
2006-06-11 Emmanuele Bassi <ebassi@gnome.org>
|
||||
|
||||
* gtk/gtkrecentchooserdefault.c
|
||||
|
@ -56,7 +56,7 @@ static void gtk_progress_get_property (GObject *object,
|
||||
static void gtk_progress_destroy (GtkObject *object);
|
||||
static void gtk_progress_finalize (GObject *object);
|
||||
static void gtk_progress_realize (GtkWidget *widget);
|
||||
static gint gtk_progress_expose (GtkWidget *widget,
|
||||
static gboolean gtk_progress_expose (GtkWidget *widget,
|
||||
GdkEventExpose *event);
|
||||
static void gtk_progress_size_allocate (GtkWidget *widget,
|
||||
GtkAllocation *allocation);
|
||||
@ -283,7 +283,7 @@ gtk_progress_finalize (GObject *object)
|
||||
G_OBJECT_CLASS (gtk_progress_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
static gint
|
||||
static gboolean
|
||||
gtk_progress_expose (GtkWidget *widget,
|
||||
GdkEventExpose *event)
|
||||
{
|
||||
|
@ -73,6 +73,8 @@ static void gtk_progress_bar_get_property (GObject *object,
|
||||
guint prop_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec);
|
||||
static gboolean gtk_progress_bar_expose (GtkWidget *widget,
|
||||
GdkEventExpose *event);
|
||||
static void gtk_progress_bar_size_request (GtkWidget *widget,
|
||||
GtkRequisition *requisition);
|
||||
static void gtk_progress_bar_real_update (GtkProgress *progress);
|
||||
@ -105,6 +107,7 @@ gtk_progress_bar_class_init (GtkProgressBarClass *class)
|
||||
gobject_class->set_property = gtk_progress_bar_set_property;
|
||||
gobject_class->get_property = gtk_progress_bar_get_property;
|
||||
|
||||
widget_class->expose_event = gtk_progress_bar_expose;
|
||||
widget_class->size_request = gtk_progress_bar_size_request;
|
||||
|
||||
progress_class->paint = gtk_progress_bar_paint;
|
||||
@ -438,7 +441,7 @@ gtk_progress_bar_real_update (GtkProgress *progress)
|
||||
}
|
||||
}
|
||||
}
|
||||
gtk_progress_bar_paint (progress);
|
||||
pbar->dirty = TRUE;
|
||||
gtk_widget_queue_draw (GTK_WIDGET (progress));
|
||||
}
|
||||
else
|
||||
@ -451,12 +454,28 @@ gtk_progress_bar_real_update (GtkProgress *progress)
|
||||
if (pbar->in_block != in_block)
|
||||
{
|
||||
pbar->in_block = in_block;
|
||||
gtk_progress_bar_paint (progress);
|
||||
pbar->dirty = TRUE;
|
||||
gtk_widget_queue_draw (GTK_WIDGET (progress));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gtk_progress_bar_expose (GtkWidget *widget,
|
||||
GdkEventExpose *event)
|
||||
{
|
||||
GtkProgressBar *pbar;
|
||||
|
||||
g_return_val_if_fail (GTK_IS_PROGRESS_BAR (widget), FALSE);
|
||||
|
||||
pbar = GTK_PROGRESS_BAR (widget);
|
||||
|
||||
if (GTK_WIDGET_DRAWABLE (widget) && pbar->dirty)
|
||||
gtk_progress_bar_paint (GTK_PROGRESS (pbar));
|
||||
|
||||
return GTK_WIDGET_CLASS (gtk_progress_bar_parent_class)->expose_event (widget, event);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_progress_bar_size_request (GtkWidget *widget,
|
||||
GtkRequisition *requisition)
|
||||
@ -870,6 +889,8 @@ gtk_progress_bar_paint (GtkProgress *progress)
|
||||
else
|
||||
gtk_progress_bar_paint_discrete (pbar, orientation);
|
||||
}
|
||||
|
||||
pbar->dirty = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -77,6 +77,7 @@ struct _GtkProgressBar
|
||||
|
||||
guint activity_dir : 1;
|
||||
guint ellipsize : 3;
|
||||
guint dirty : 1;
|
||||
};
|
||||
|
||||
struct _GtkProgressBarClass
|
||||
|
Loading…
Reference in New Issue
Block a user