mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-05 16:20:10 +00:00
Free dash list if necessary.
2002-01-03 Anders Carlsson <andersca@gnu.org> * gtk/gtkstyle.c (gtk_default_draw_focus): Free dash list if necessary. * gtk/gtkhsv.c (gtk_hsv_get_focus_gc): Free dash list. * gtk/gtkcolorsel.c (get_focus_gc): Free dash list. * gtk/gtkdnd.c (set_icon_stock_pixbuf): Don't unref the mask if it's NULL.
This commit is contained in:
parent
88edb0e58e
commit
a11baab148
10
ChangeLog
10
ChangeLog
@ -1,5 +1,15 @@
|
||||
2002-01-03 Anders Carlsson <andersca@gnu.org>
|
||||
|
||||
* gtk/gtkstyle.c (gtk_default_draw_focus): Free dash list if
|
||||
necessary.
|
||||
|
||||
* gtk/gtkhsv.c (gtk_hsv_get_focus_gc): Free dash list.
|
||||
|
||||
* gtk/gtkcolorsel.c (get_focus_gc): Free dash list.
|
||||
|
||||
* gtk/gtkdnd.c (set_icon_stock_pixbuf): Don't unref the mask
|
||||
if it's NULL.
|
||||
|
||||
* gtk/gtktreeview.c: Rename gtk_tree_view_queue_draw_node to
|
||||
_gtk_tree_view_queue_draw_node.
|
||||
(gtk_tree_view_row_has_child_toggled): Only redraw one node.
|
||||
|
@ -1,5 +1,15 @@
|
||||
2002-01-03 Anders Carlsson <andersca@gnu.org>
|
||||
|
||||
* gtk/gtkstyle.c (gtk_default_draw_focus): Free dash list if
|
||||
necessary.
|
||||
|
||||
* gtk/gtkhsv.c (gtk_hsv_get_focus_gc): Free dash list.
|
||||
|
||||
* gtk/gtkcolorsel.c (get_focus_gc): Free dash list.
|
||||
|
||||
* gtk/gtkdnd.c (set_icon_stock_pixbuf): Don't unref the mask
|
||||
if it's NULL.
|
||||
|
||||
* gtk/gtktreeview.c: Rename gtk_tree_view_queue_draw_node to
|
||||
_gtk_tree_view_queue_draw_node.
|
||||
(gtk_tree_view_row_has_child_toggled): Only redraw one node.
|
||||
|
@ -1,5 +1,15 @@
|
||||
2002-01-03 Anders Carlsson <andersca@gnu.org>
|
||||
|
||||
* gtk/gtkstyle.c (gtk_default_draw_focus): Free dash list if
|
||||
necessary.
|
||||
|
||||
* gtk/gtkhsv.c (gtk_hsv_get_focus_gc): Free dash list.
|
||||
|
||||
* gtk/gtkcolorsel.c (get_focus_gc): Free dash list.
|
||||
|
||||
* gtk/gtkdnd.c (set_icon_stock_pixbuf): Don't unref the mask
|
||||
if it's NULL.
|
||||
|
||||
* gtk/gtktreeview.c: Rename gtk_tree_view_queue_draw_node to
|
||||
_gtk_tree_view_queue_draw_node.
|
||||
(gtk_tree_view_row_has_child_toggled): Only redraw one node.
|
||||
|
@ -1,5 +1,15 @@
|
||||
2002-01-03 Anders Carlsson <andersca@gnu.org>
|
||||
|
||||
* gtk/gtkstyle.c (gtk_default_draw_focus): Free dash list if
|
||||
necessary.
|
||||
|
||||
* gtk/gtkhsv.c (gtk_hsv_get_focus_gc): Free dash list.
|
||||
|
||||
* gtk/gtkcolorsel.c (get_focus_gc): Free dash list.
|
||||
|
||||
* gtk/gtkdnd.c (set_icon_stock_pixbuf): Don't unref the mask
|
||||
if it's NULL.
|
||||
|
||||
* gtk/gtktreeview.c: Rename gtk_tree_view_queue_draw_node to
|
||||
_gtk_tree_view_queue_draw_node.
|
||||
(gtk_tree_view_row_has_child_toggled): Only redraw one node.
|
||||
|
@ -1,5 +1,15 @@
|
||||
2002-01-03 Anders Carlsson <andersca@gnu.org>
|
||||
|
||||
* gtk/gtkstyle.c (gtk_default_draw_focus): Free dash list if
|
||||
necessary.
|
||||
|
||||
* gtk/gtkhsv.c (gtk_hsv_get_focus_gc): Free dash list.
|
||||
|
||||
* gtk/gtkcolorsel.c (get_focus_gc): Free dash list.
|
||||
|
||||
* gtk/gtkdnd.c (set_icon_stock_pixbuf): Don't unref the mask
|
||||
if it's NULL.
|
||||
|
||||
* gtk/gtktreeview.c: Rename gtk_tree_view_queue_draw_node to
|
||||
_gtk_tree_view_queue_draw_node.
|
||||
(gtk_tree_view_row_has_child_toggled): Only redraw one node.
|
||||
|
@ -1,5 +1,15 @@
|
||||
2002-01-03 Anders Carlsson <andersca@gnu.org>
|
||||
|
||||
* gtk/gtkstyle.c (gtk_default_draw_focus): Free dash list if
|
||||
necessary.
|
||||
|
||||
* gtk/gtkhsv.c (gtk_hsv_get_focus_gc): Free dash list.
|
||||
|
||||
* gtk/gtkcolorsel.c (get_focus_gc): Free dash list.
|
||||
|
||||
* gtk/gtkdnd.c (set_icon_stock_pixbuf): Don't unref the mask
|
||||
if it's NULL.
|
||||
|
||||
* gtk/gtktreeview.c: Rename gtk_tree_view_queue_draw_node to
|
||||
_gtk_tree_view_queue_draw_node.
|
||||
(gtk_tree_view_row_has_child_toggled): Only redraw one node.
|
||||
|
@ -1,5 +1,15 @@
|
||||
2002-01-03 Anders Carlsson <andersca@gnu.org>
|
||||
|
||||
* gtk/gtkstyle.c (gtk_default_draw_focus): Free dash list if
|
||||
necessary.
|
||||
|
||||
* gtk/gtkhsv.c (gtk_hsv_get_focus_gc): Free dash list.
|
||||
|
||||
* gtk/gtkcolorsel.c (get_focus_gc): Free dash list.
|
||||
|
||||
* gtk/gtkdnd.c (set_icon_stock_pixbuf): Don't unref the mask
|
||||
if it's NULL.
|
||||
|
||||
* gtk/gtktreeview.c: Rename gtk_tree_view_queue_draw_node to
|
||||
_gtk_tree_view_queue_draw_node.
|
||||
(gtk_tree_view_row_has_child_toggled): Only redraw one node.
|
||||
|
@ -676,6 +676,8 @@ get_focus_gc (GtkWidget *drawing_area,
|
||||
if (dash_list[0])
|
||||
gdk_gc_set_dashes (gc, 0, dash_list, strlen (dash_list));
|
||||
|
||||
g_free (dash_list);
|
||||
|
||||
return gc;
|
||||
}
|
||||
|
||||
|
@ -2169,7 +2169,9 @@ set_icon_stock_pixbuf (GdkDragContext *context,
|
||||
gtk_widget_shape_combine_mask (window, mask, 0, 0);
|
||||
|
||||
g_object_unref (G_OBJECT (pixmap));
|
||||
g_object_unref (G_OBJECT (mask));
|
||||
|
||||
if (mask)
|
||||
g_object_unref (G_OBJECT (mask));
|
||||
|
||||
gtk_drag_set_icon_window (context, window, hot_x, hot_y, TRUE);
|
||||
}
|
||||
|
@ -1755,5 +1755,7 @@ gtk_hsv_get_focus_gc (GtkHSV *hsv,
|
||||
if (dash_list[0])
|
||||
gdk_gc_set_dashes (focus_gc, 0, dash_list, strlen (dash_list));
|
||||
|
||||
g_free (dash_list);
|
||||
|
||||
return focus_gc;
|
||||
}
|
||||
|
@ -3804,6 +3804,7 @@ gtk_default_draw_focus (GtkStyle *style,
|
||||
{
|
||||
GdkPoint points[5];
|
||||
GdkGC *gc;
|
||||
gboolean free_dash_list = FALSE;
|
||||
gint line_width = 1;
|
||||
gchar *dash_list = "\1\1";
|
||||
gint dash_len;
|
||||
@ -3811,11 +3812,15 @@ gtk_default_draw_focus (GtkStyle *style,
|
||||
gc = style->fg_gc[state_type];
|
||||
|
||||
if (widget)
|
||||
gtk_widget_style_get (widget,
|
||||
"focus-line-width", &line_width,
|
||||
"focus-line-pattern", (gchar *)&dash_list,
|
||||
NULL);
|
||||
|
||||
{
|
||||
gtk_widget_style_get (widget,
|
||||
"focus-line-width", &line_width,
|
||||
"focus-line-pattern", (gchar *)&dash_list,
|
||||
NULL);
|
||||
|
||||
free_dash_list = TRUE;
|
||||
}
|
||||
|
||||
sanitize_size (window, &width, &height);
|
||||
|
||||
if (area)
|
||||
@ -3827,7 +3832,13 @@ gtk_default_draw_focus (GtkStyle *style,
|
||||
|
||||
|
||||
if (detail && !strcmp (detail, "add-mode"))
|
||||
dash_list = "\4\4";
|
||||
{
|
||||
if (free_dash_list)
|
||||
g_free (dash_list);
|
||||
|
||||
dash_list = "\4\4";
|
||||
free_dash_list = FALSE;
|
||||
}
|
||||
|
||||
points[0].x = x + line_width / 2;
|
||||
points[0].y = y + line_width / 2;
|
||||
@ -3911,6 +3922,9 @@ gtk_default_draw_focus (GtkStyle *style,
|
||||
|
||||
if (area)
|
||||
gdk_gc_set_clip_rectangle (gc, NULL);
|
||||
|
||||
if (free_dash_list)
|
||||
g_free (dash_list);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user