libegg r883 - in trunk: . libegg/toolpalette
- From: jap svn gnome org
- To: svn-commits-list gnome org
- Subject: libegg r883 - in trunk: . libegg/toolpalette
- Date: Fri, 20 Jun 2008 10:11:30 +0000 (UTC)
Author: jap
Date: Fri Jun 20 10:11:29 2008
New Revision: 883
URL: http://svn.gnome.org/viewvc/libegg?rev=883&view=rev
Log:
2008-06-20 Jan Arne Petersen <jpetersen openismus com>
* libegg/toolpalette/eggtoolpalette.c
(egg_tool_palette_item_drag_data_get,
egg_tool_palette_child_drag_data_get): Replace calls to
egg_tool_palette_find_anchestor with calls to
gtk_widget_get_ancestor and remove egg_tool_palette_find_anchestor.
Modified:
trunk/ChangeLog
trunk/libegg/toolpalette/eggtoolpalette.c
Modified: trunk/libegg/toolpalette/eggtoolpalette.c
==============================================================================
--- trunk/libegg/toolpalette/eggtoolpalette.c (original)
+++ trunk/libegg/toolpalette/eggtoolpalette.c Fri Jun 20 10:11:29 2008
@@ -1250,21 +1250,6 @@
*requested_rows = max_rows;
}
-static GtkWidget*
-egg_tool_palette_find_anchestor (GtkWidget *widget,
- GType type)
-{
- while (widget)
- {
- if (G_TYPE_CHECK_INSTANCE_TYPE (widget, type))
- return widget;
-
- widget = gtk_widget_get_parent (widget);
- }
-
- return NULL;
-}
-
static void
egg_tool_palette_item_drag_data_get (GtkWidget *widget,
GdkDragContext *context G_GNUC_UNUSED,
@@ -1276,7 +1261,7 @@
EggToolPaletteDragData drag_data = { EGG_TOOL_PALETTE (data), NULL };
if (selection->target == dnd_target_atom_item)
- drag_data.item = egg_tool_palette_find_anchestor (widget, GTK_TYPE_TOOL_ITEM);
+ drag_data.item = gtk_widget_get_ancestor (widget, GTK_TYPE_TOOL_ITEM);
if (drag_data.item)
gtk_selection_data_set (selection, selection->target, 8,
@@ -1294,7 +1279,7 @@
EggToolPaletteDragData drag_data = { EGG_TOOL_PALETTE (data), NULL };
if (selection->target == dnd_target_atom_group)
- drag_data.item = egg_tool_palette_find_anchestor (widget, EGG_TYPE_TOOL_ITEM_GROUP);
+ drag_data.item = gtk_widget_get_ancestor (widget, EGG_TYPE_TOOL_ITEM_GROUP);
if (drag_data.item)
gtk_selection_data_set (selection, selection->target, 8,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]