Commit dbd5b75e authored by Michael Natterer's avatar Michael Natterer Committed by Michael Natterer
Browse files

gtk/gtkclist.c gtk/gtklist.c gtk/gtkoldeditable.c gtk/gtkpixmap.c

2008-08-04  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkclist.c
	* gtk/gtklist.c
	* gtk/gtkoldeditable.c
	* gtk/gtkpixmap.c
	* gtk/gtktipsquery.c
	* gtk/gtktree.c
	* gtk/gtktreeitem.c: avoid using deprecated GtkWidget API.


svn path=/trunk/; revision=20969
parent 906db67f
2008-08-04 Michael Natterer <mitch@imendio.com>
* gtk/gtkclist.c
* gtk/gtklist.c
* gtk/gtkoldeditable.c
* gtk/gtkpixmap.c
* gtk/gtktipsquery.c
* gtk/gtktree.c
* gtk/gtktreeitem.c: avoid using deprecated GtkWidget API.
2008-08-04 Michael Natterer <mitch@imendio.com>
* gtk/gtkclist.[ch]
......
......@@ -2288,9 +2288,9 @@ gtk_clist_set_pixmap (GtkCList *clist,
clist_row = ROW_ELEMENT (clist, row)->data;
gdk_pixmap_ref (pixmap);
g_object_ref (pixmap);
if (mask) gdk_pixmap_ref (mask);
if (mask) g_object_ref (mask);
GTK_CLIST_GET_CLASS (clist)->set_cell_contents
(clist, clist_row, column, GTK_CELL_PIXMAP, NULL, 0, pixmap, mask);
......@@ -2354,8 +2354,8 @@ gtk_clist_set_pixtext (GtkCList *clist,
clist_row = ROW_ELEMENT (clist, row)->data;
gdk_pixmap_ref (pixmap);
if (mask) gdk_pixmap_ref (mask);
g_object_ref (pixmap);
if (mask) g_object_ref (mask);
GTK_CLIST_GET_CLASS (clist)->set_cell_contents
(clist, clist_row, column, GTK_CELL_PIXTEXT, text, spacing, pixmap, mask);
......@@ -2529,9 +2529,9 @@ set_cell_contents (GtkCList *clist,
g_free (old_text);
if (old_pixmap)
gdk_pixmap_unref (old_pixmap);
g_object_unref (old_pixmap);
if (old_mask)
gdk_pixmap_unref (old_mask);
g_object_unref (old_mask);
}
PangoLayout *
......
......@@ -873,7 +873,7 @@ gtk_list_set_focus_child (GtkContainer *container,
}
container->focus_child = child;
if (container->focus_child)
gtk_widget_ref (container->focus_child);
g_object_ref (container->focus_child);
}
/* check for v adjustment */
......@@ -1168,7 +1168,7 @@ gtk_list_clear_items (GtkList *list,
widget = tmp_list->data;
tmp_list = tmp_list->next;
gtk_widget_ref (widget);
g_object_ref (widget);
if (widget->state == GTK_STATE_SELECTED)
gtk_list_unselect_child (list, widget);
......@@ -1289,9 +1289,9 @@ gtk_list_remove_items_internal (GtkList *list,
widget = tmp_list->data;
tmp_list = tmp_list->next;
gtk_widget_ref (widget);
g_object_ref (widget);
if (no_unref)
gtk_widget_ref (widget);
g_object_ref (widget);
if (widget == new_focus_child)
{
......@@ -2474,7 +2474,7 @@ gtk_list_signal_item_select (GtkListItem *list_item,
if (!sel_list)
{
list->selection = g_list_prepend (list->selection, list_item);
gtk_widget_ref (GTK_WIDGET (list_item));
g_object_ref (list_item);
}
gtk_signal_emit (GTK_OBJECT (list), list_signals[SELECTION_CHANGED]);
break;
......
......@@ -392,7 +392,7 @@ gtk_old_editable_insert_text (GtkEditable *editable,
gchar buf[64];
gchar *text;
gtk_widget_ref (GTK_WIDGET (editable));
g_object_ref (editable);
if (new_text_length <= 63)
text = buf;
......@@ -419,7 +419,7 @@ gtk_old_editable_delete_text (GtkEditable *editable,
{
GtkOldEditable *old_editable = GTK_OLD_EDITABLE (editable);
gtk_widget_ref (GTK_WIDGET (old_editable));
g_object_ref (old_editable);
g_signal_emit_by_name (editable, "delete_text", start_pos, end_pos);
g_signal_emit_by_name (editable, "changed");
......
......@@ -135,7 +135,7 @@ gtk_pixmap_set (GtkPixmap *pixmap,
(GTK_WIDGET (pixmap)->requisition.height != oldheight))
gtk_widget_queue_resize (GTK_WIDGET (pixmap));
else
gtk_widget_queue_clear (GTK_WIDGET (pixmap));
gtk_widget_queue_draw (GTK_WIDGET (pixmap));
}
}
......@@ -231,7 +231,7 @@ gtk_pixmap_set_build_insensitive (GtkPixmap *pixmap, gboolean build)
if (GTK_WIDGET_VISIBLE (pixmap))
{
gtk_widget_queue_clear (GTK_WIDGET (pixmap));
gtk_widget_queue_draw (GTK_WIDGET (pixmap));
}
}
......
......@@ -308,10 +308,10 @@ gtk_tips_query_set_caller (GtkTipsQuery *tips_query,
g_return_if_fail (GTK_IS_WIDGET (caller));
if (caller)
gtk_widget_ref (caller);
g_object_ref (caller);
if (tips_query->caller)
gtk_widget_unref (tips_query->caller);
g_object_unref (tips_query->caller);
tips_query->caller = caller;
}
......@@ -376,7 +376,7 @@ gtk_tips_query_real_stop_query (GtkTipsQuery *tips_query)
}
if (tips_query->last_crossed)
{
gtk_widget_unref (tips_query->last_crossed);
g_object_unref (tips_query->last_crossed);
tips_query->last_crossed = NULL;
}
......@@ -419,12 +419,12 @@ gtk_tips_query_emit_widget_entered (GtkTipsQuery *tips_query,
NULL,
NULL,
NULL);
gtk_widget_unref (tips_query->last_crossed);
g_object_unref (tips_query->last_crossed);
tips_query->last_crossed = NULL;
}
else if (widget && widget != tips_query->last_crossed)
{
gtk_widget_ref (widget);
g_object_ref (widget);
if (tdata || tips_query->emit_always)
gtk_signal_emit (GTK_OBJECT (tips_query),
tips_query_signals[SIGNAL_WIDGET_ENTERED],
......@@ -432,7 +432,7 @@ gtk_tips_query_emit_widget_entered (GtkTipsQuery *tips_query,
tdata ? tdata->tip_text : NULL,
tdata ? tdata->tip_private : NULL);
if (tips_query->last_crossed)
gtk_widget_unref (tips_query->last_crossed);
g_object_unref (tips_query->last_crossed);
tips_query->last_crossed = widget;
}
}
......
......@@ -391,7 +391,7 @@ gtk_tree_destroy (GtkObject *object)
child = children->data;
children = children->next;
gtk_widget_ref (child);
g_object_ref (child);
gtk_widget_unparent (child);
gtk_widget_destroy (child);
g_object_unref (child);
......@@ -1022,7 +1022,7 @@ gtk_real_tree_select_child (GtkTree *tree,
{
gtk_tree_item_select (GTK_TREE_ITEM (child));
root_selection = g_list_prepend (root_selection, child);
gtk_widget_ref (child);
g_object_ref (child);
}
else if (child->state == GTK_STATE_SELECTED)
{
......@@ -1067,7 +1067,7 @@ gtk_real_tree_select_child (GtkTree *tree,
{
gtk_tree_item_select (GTK_TREE_ITEM (child));
root_selection = g_list_prepend (root_selection, child);
gtk_widget_ref (child);
g_object_ref (child);
tree->root_tree->selection = root_selection;
gtk_signal_emit (GTK_OBJECT (tree->root_tree),
tree_signals[SELECTION_CHANGED]);
......
......@@ -643,7 +643,12 @@ gtk_tree_item_paint (GtkWidget *widget,
if (tree_item->pixmaps_box &&
GTK_WIDGET_VISIBLE(tree_item->pixmaps_box) &&
gtk_widget_intersect (tree_item->pixmaps_box, area, &child_area))
gtk_widget_draw (tree_item->pixmaps_box, &child_area);
{
gtk_widget_queue_draw_area (tree_item->pixmaps_box,
child_area.x, child_area.y,
child_area.width, child_area.height);
gdk_window_process_updates (tree_item->pixmaps_box->window, TRUE);
}
}
if (GTK_WIDGET_HAS_FOCUS (widget))
......@@ -847,7 +852,7 @@ gtk_tree_item_destroy (GtkObject *object)
child = item->subtree;
if (child)
{
gtk_widget_ref (child);
g_object_ref (child);
gtk_widget_unparent (child);
gtk_widget_destroy (child);
g_object_unref (child);
......@@ -858,7 +863,7 @@ gtk_tree_item_destroy (GtkObject *object)
child = item->pixmaps_box;
if (child)
{
gtk_widget_ref (child);
g_object_ref (child);
gtk_widget_unparent (child);
gtk_widget_destroy (child);
g_object_unref (child);
......
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