Don't dereference NULL focus tab.
Mon Aug 24 10:55:51 1998 Owen Taylor <otaylor@redhat.com> * gtk/gtknotebook.c (gtk_notebook_draw_tab): Don't dereference NULL focus tab. * gtk/gtkscale.c (gtk_scale_[un]map): Add map/unmap functions since we need to both show/hide and queue a redraw. (There's some duplication of drawing here, we probably should only be queuing a redraw on the "value" portion of the scale.)
This commit is contained in:
11
ChangeLog
11
ChangeLog
@@ -1,3 +1,14 @@
|
||||
Mon Aug 24 10:55:51 1998 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtknotebook.c (gtk_notebook_draw_tab): Don't
|
||||
dereference NULL focus tab.
|
||||
|
||||
* gtk/gtkscale.c (gtk_scale_[un]map): Add map/unmap
|
||||
functions since we need to both show/hide and
|
||||
queue a redraw. (There's some duplication of drawing here,
|
||||
we probably should only be queuing a redraw on the
|
||||
"value" portion of the scale.)
|
||||
|
||||
Fri Aug 21 19:02:30 1998 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkrange.[ch] gtk/gtkhscale.c gtk/gtkvscale.[ch]: Fit scales
|
||||
|
||||
@@ -1,3 +1,14 @@
|
||||
Mon Aug 24 10:55:51 1998 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtknotebook.c (gtk_notebook_draw_tab): Don't
|
||||
dereference NULL focus tab.
|
||||
|
||||
* gtk/gtkscale.c (gtk_scale_[un]map): Add map/unmap
|
||||
functions since we need to both show/hide and
|
||||
queue a redraw. (There's some duplication of drawing here,
|
||||
we probably should only be queuing a redraw on the
|
||||
"value" portion of the scale.)
|
||||
|
||||
Fri Aug 21 19:02:30 1998 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkrange.[ch] gtk/gtkhscale.c gtk/gtkvscale.[ch]: Fit scales
|
||||
|
||||
@@ -1,3 +1,14 @@
|
||||
Mon Aug 24 10:55:51 1998 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtknotebook.c (gtk_notebook_draw_tab): Don't
|
||||
dereference NULL focus tab.
|
||||
|
||||
* gtk/gtkscale.c (gtk_scale_[un]map): Add map/unmap
|
||||
functions since we need to both show/hide and
|
||||
queue a redraw. (There's some duplication of drawing here,
|
||||
we probably should only be queuing a redraw on the
|
||||
"value" portion of the scale.)
|
||||
|
||||
Fri Aug 21 19:02:30 1998 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkrange.[ch] gtk/gtkhscale.c gtk/gtkvscale.[ch]: Fit scales
|
||||
|
||||
@@ -1,3 +1,14 @@
|
||||
Mon Aug 24 10:55:51 1998 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtknotebook.c (gtk_notebook_draw_tab): Don't
|
||||
dereference NULL focus tab.
|
||||
|
||||
* gtk/gtkscale.c (gtk_scale_[un]map): Add map/unmap
|
||||
functions since we need to both show/hide and
|
||||
queue a redraw. (There's some duplication of drawing here,
|
||||
we probably should only be queuing a redraw on the
|
||||
"value" portion of the scale.)
|
||||
|
||||
Fri Aug 21 19:02:30 1998 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkrange.[ch] gtk/gtkhscale.c gtk/gtkvscale.[ch]: Fit scales
|
||||
|
||||
@@ -1,3 +1,14 @@
|
||||
Mon Aug 24 10:55:51 1998 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtknotebook.c (gtk_notebook_draw_tab): Don't
|
||||
dereference NULL focus tab.
|
||||
|
||||
* gtk/gtkscale.c (gtk_scale_[un]map): Add map/unmap
|
||||
functions since we need to both show/hide and
|
||||
queue a redraw. (There's some duplication of drawing here,
|
||||
we probably should only be queuing a redraw on the
|
||||
"value" portion of the scale.)
|
||||
|
||||
Fri Aug 21 19:02:30 1998 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkrange.[ch] gtk/gtkhscale.c gtk/gtkvscale.[ch]: Fit scales
|
||||
|
||||
@@ -1,3 +1,14 @@
|
||||
Mon Aug 24 10:55:51 1998 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtknotebook.c (gtk_notebook_draw_tab): Don't
|
||||
dereference NULL focus tab.
|
||||
|
||||
* gtk/gtkscale.c (gtk_scale_[un]map): Add map/unmap
|
||||
functions since we need to both show/hide and
|
||||
queue a redraw. (There's some duplication of drawing here,
|
||||
we probably should only be queuing a redraw on the
|
||||
"value" portion of the scale.)
|
||||
|
||||
Fri Aug 21 19:02:30 1998 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkrange.[ch] gtk/gtkhscale.c gtk/gtkvscale.[ch]: Fit scales
|
||||
|
||||
@@ -1,3 +1,14 @@
|
||||
Mon Aug 24 10:55:51 1998 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtknotebook.c (gtk_notebook_draw_tab): Don't
|
||||
dereference NULL focus tab.
|
||||
|
||||
* gtk/gtkscale.c (gtk_scale_[un]map): Add map/unmap
|
||||
functions since we need to both show/hide and
|
||||
queue a redraw. (There's some duplication of drawing here,
|
||||
we probably should only be queuing a redraw on the
|
||||
"value" portion of the scale.)
|
||||
|
||||
Fri Aug 21 19:02:30 1998 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkrange.[ch] gtk/gtkhscale.c gtk/gtkvscale.[ch]: Fit scales
|
||||
|
||||
9
TODO
9
TODO
@@ -4,8 +4,6 @@ For 1.2.0 release:
|
||||
|
||||
Bugs:
|
||||
* Widget redrawing when the window resizes sometimes messes up.
|
||||
GtkLabels sometimes redraw without clearing up the underlying background on
|
||||
window resizes.
|
||||
|
||||
* delay dnd settings to take effect once a widget is realized, this is
|
||||
to avoid force realizations. i think this goes along with owens dnd
|
||||
@@ -271,3 +269,10 @@ Text/Edit widget:
|
||||
[ From: Stefan Jeske <jeske@braunschweig.netsurf.de> ]
|
||||
|
||||
- "changed" emitted when doing deletes on empty Text widget.
|
||||
|
||||
Themes
|
||||
======
|
||||
|
||||
- When a scale gets shown/hidden only queue a redraw on the
|
||||
non-window portion, not the whole area.
|
||||
|
||||
|
||||
@@ -182,7 +182,6 @@ gtk_hscale_realize (GtkWidget *widget)
|
||||
gtk_range_slider_update (GTK_RANGE (widget));
|
||||
|
||||
gdk_window_show (range->slider);
|
||||
gdk_window_show (range->trough);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -2276,7 +2276,7 @@ gtk_notebook_draw_tab (GtkNotebook *notebook,
|
||||
page_area.width - 1, page_area.height - 1,
|
||||
gap_side);
|
||||
if ((GTK_WIDGET_HAS_FOCUS (widget)) &&
|
||||
(GTK_NOTEBOOK(widget)->focus_tab->data == page) &&
|
||||
notebook->focus_tab && (notebook->focus_tab->data == page) &&
|
||||
(page))
|
||||
{
|
||||
gtk_paint_focus (widget->style, widget->window,
|
||||
|
||||
@@ -26,6 +26,9 @@
|
||||
|
||||
static void gtk_scale_class_init (GtkScaleClass *klass);
|
||||
static void gtk_scale_init (GtkScale *scale);
|
||||
static void gtk_scale_map (GtkWidget *widget);
|
||||
static void gtk_scale_unmap (GtkWidget *widget);
|
||||
|
||||
static void gtk_scale_draw_background (GtkRange *range);
|
||||
|
||||
|
||||
@@ -61,13 +64,18 @@ static void
|
||||
gtk_scale_class_init (GtkScaleClass *class)
|
||||
{
|
||||
GtkObjectClass *object_class;
|
||||
GtkWidgetClass *widget_class;
|
||||
GtkRangeClass *range_class;
|
||||
|
||||
object_class = (GtkObjectClass*) class;
|
||||
range_class = (GtkRangeClass*) class;
|
||||
widget_class = (GtkWidgetClass*) class;
|
||||
|
||||
parent_class = gtk_type_class (gtk_range_get_type ());
|
||||
|
||||
widget_class->map = gtk_scale_map;
|
||||
widget_class->unmap = gtk_scale_unmap;
|
||||
|
||||
range_class->draw_background = gtk_scale_draw_background;
|
||||
|
||||
class->slider_length = 31;
|
||||
@@ -85,6 +93,40 @@ gtk_scale_init (GtkScale *scale)
|
||||
scale->value_pos = GTK_POS_TOP;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_scale_map (GtkWidget *widget)
|
||||
{
|
||||
GtkRange *range;
|
||||
|
||||
g_return_if_fail (widget != NULL);
|
||||
g_return_if_fail (GTK_IS_SCALE (widget));
|
||||
|
||||
GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED);
|
||||
range = GTK_RANGE (widget);
|
||||
|
||||
if (GTK_WIDGET_NO_WINDOW (widget))
|
||||
gtk_widget_queue_draw (widget);
|
||||
|
||||
gdk_window_show (range->trough);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_scale_unmap (GtkWidget *widget)
|
||||
{
|
||||
GtkRange *range;
|
||||
|
||||
g_return_if_fail (widget != NULL);
|
||||
g_return_if_fail (GTK_IS_SCALE (widget));
|
||||
|
||||
GTK_WIDGET_UNSET_FLAGS (widget, GTK_MAPPED);
|
||||
range = GTK_RANGE (widget);
|
||||
|
||||
if (GTK_WIDGET_NO_WINDOW (widget))
|
||||
gtk_widget_queue_clear (widget);
|
||||
|
||||
gdk_window_hide (range->trough);
|
||||
}
|
||||
|
||||
void
|
||||
gtk_scale_set_digits (GtkScale *scale,
|
||||
gint digits)
|
||||
|
||||
Reference in New Issue
Block a user