Commit a11baab1 authored by Anders Carlsson's avatar Anders Carlsson Committed by Anders Carlsson

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.
parent 88edb0e5
2002-01-03 Anders Carlsson <andersca@gnu.org> 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/gtktreeview.c: Rename gtk_tree_view_queue_draw_node to
_gtk_tree_view_queue_draw_node. _gtk_tree_view_queue_draw_node.
(gtk_tree_view_row_has_child_toggled): Only redraw one node. (gtk_tree_view_row_has_child_toggled): Only redraw one node.
......
2002-01-03 Anders Carlsson <andersca@gnu.org> 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/gtktreeview.c: Rename gtk_tree_view_queue_draw_node to
_gtk_tree_view_queue_draw_node. _gtk_tree_view_queue_draw_node.
(gtk_tree_view_row_has_child_toggled): Only redraw one node. (gtk_tree_view_row_has_child_toggled): Only redraw one node.
......
2002-01-03 Anders Carlsson <andersca@gnu.org> 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/gtktreeview.c: Rename gtk_tree_view_queue_draw_node to
_gtk_tree_view_queue_draw_node. _gtk_tree_view_queue_draw_node.
(gtk_tree_view_row_has_child_toggled): Only redraw one node. (gtk_tree_view_row_has_child_toggled): Only redraw one node.
......
2002-01-03 Anders Carlsson <andersca@gnu.org> 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/gtktreeview.c: Rename gtk_tree_view_queue_draw_node to
_gtk_tree_view_queue_draw_node. _gtk_tree_view_queue_draw_node.
(gtk_tree_view_row_has_child_toggled): Only redraw one node. (gtk_tree_view_row_has_child_toggled): Only redraw one node.
......
2002-01-03 Anders Carlsson <andersca@gnu.org> 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/gtktreeview.c: Rename gtk_tree_view_queue_draw_node to
_gtk_tree_view_queue_draw_node. _gtk_tree_view_queue_draw_node.
(gtk_tree_view_row_has_child_toggled): Only redraw one node. (gtk_tree_view_row_has_child_toggled): Only redraw one node.
......
2002-01-03 Anders Carlsson <andersca@gnu.org> 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/gtktreeview.c: Rename gtk_tree_view_queue_draw_node to
_gtk_tree_view_queue_draw_node. _gtk_tree_view_queue_draw_node.
(gtk_tree_view_row_has_child_toggled): Only redraw one node. (gtk_tree_view_row_has_child_toggled): Only redraw one node.
......
2002-01-03 Anders Carlsson <andersca@gnu.org> 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/gtktreeview.c: Rename gtk_tree_view_queue_draw_node to
_gtk_tree_view_queue_draw_node. _gtk_tree_view_queue_draw_node.
(gtk_tree_view_row_has_child_toggled): Only redraw one node. (gtk_tree_view_row_has_child_toggled): Only redraw one node.
......
...@@ -676,6 +676,8 @@ get_focus_gc (GtkWidget *drawing_area, ...@@ -676,6 +676,8 @@ get_focus_gc (GtkWidget *drawing_area,
if (dash_list[0]) if (dash_list[0])
gdk_gc_set_dashes (gc, 0, dash_list, strlen (dash_list)); gdk_gc_set_dashes (gc, 0, dash_list, strlen (dash_list));
g_free (dash_list);
return gc; return gc;
} }
......
...@@ -2169,7 +2169,9 @@ set_icon_stock_pixbuf (GdkDragContext *context, ...@@ -2169,7 +2169,9 @@ set_icon_stock_pixbuf (GdkDragContext *context,
gtk_widget_shape_combine_mask (window, mask, 0, 0); gtk_widget_shape_combine_mask (window, mask, 0, 0);
g_object_unref (G_OBJECT (pixmap)); 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); gtk_drag_set_icon_window (context, window, hot_x, hot_y, TRUE);
} }
......
...@@ -1755,5 +1755,7 @@ gtk_hsv_get_focus_gc (GtkHSV *hsv, ...@@ -1755,5 +1755,7 @@ gtk_hsv_get_focus_gc (GtkHSV *hsv,
if (dash_list[0]) if (dash_list[0])
gdk_gc_set_dashes (focus_gc, 0, dash_list, strlen (dash_list)); gdk_gc_set_dashes (focus_gc, 0, dash_list, strlen (dash_list));
g_free (dash_list);
return focus_gc; return focus_gc;
} }
...@@ -3804,6 +3804,7 @@ gtk_default_draw_focus (GtkStyle *style, ...@@ -3804,6 +3804,7 @@ gtk_default_draw_focus (GtkStyle *style,
{ {
GdkPoint points[5]; GdkPoint points[5];
GdkGC *gc; GdkGC *gc;
gboolean free_dash_list = FALSE;
gint line_width = 1; gint line_width = 1;
gchar *dash_list = "\1\1"; gchar *dash_list = "\1\1";
gint dash_len; gint dash_len;
...@@ -3811,11 +3812,15 @@ gtk_default_draw_focus (GtkStyle *style, ...@@ -3811,11 +3812,15 @@ gtk_default_draw_focus (GtkStyle *style,
gc = style->fg_gc[state_type]; gc = style->fg_gc[state_type];
if (widget) if (widget)
gtk_widget_style_get (widget, {
"focus-line-width", &line_width, gtk_widget_style_get (widget,
"focus-line-pattern", (gchar *)&dash_list, "focus-line-width", &line_width,
NULL); "focus-line-pattern", (gchar *)&dash_list,
NULL);
free_dash_list = TRUE;
}
sanitize_size (window, &width, &height); sanitize_size (window, &width, &height);
if (area) if (area)
...@@ -3827,7 +3832,13 @@ gtk_default_draw_focus (GtkStyle *style, ...@@ -3827,7 +3832,13 @@ gtk_default_draw_focus (GtkStyle *style,
if (detail && !strcmp (detail, "add-mode")) 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].x = x + line_width / 2;
points[0].y = y + line_width / 2; points[0].y = y + line_width / 2;
...@@ -3911,6 +3922,9 @@ gtk_default_draw_focus (GtkStyle *style, ...@@ -3911,6 +3922,9 @@ gtk_default_draw_focus (GtkStyle *style,
if (area) if (area)
gdk_gc_set_clip_rectangle (gc, NULL); gdk_gc_set_clip_rectangle (gc, NULL);
if (free_dash_list)
g_free (dash_list);
} }
static void static void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment