[gnome-panel] [panel] More GSeal work



commit 4e9028582f9abee3e4080d90fa0d5abeed9eb33b
Author: Vincent Untz <vuntz gnome org>
Date:   Wed Jun 23 01:43:30 2010 +0200

    [panel] More GSeal work

 gnome-panel/launcher.c           |    4 +-
 gnome-panel/menu.c               |   31 +++++++-----
 gnome-panel/panel-addto.c        |   13 +++--
 gnome-panel/panel-ditem-editor.c |    8 ++-
 gnome-panel/panel-force-quit.c   |   19 ++++---
 gnome-panel/panel-frame.c        |  104 ++++++++++++++++++++++----------------
 gnome-panel/panel-toplevel.c     |   25 ++++++----
 gnome-panel/panel.c              |   22 +++++---
 8 files changed, 134 insertions(+), 92 deletions(-)
---
diff --git a/gnome-panel/launcher.c b/gnome-panel/launcher.c
index 7339bad..28e53be 100644
--- a/gnome-panel/launcher.c
+++ b/gnome-panel/launcher.c
@@ -310,13 +310,13 @@ is_this_drop_ok (GtkWidget      *widget,
 	if (source == widget)
 		return FALSE;
 
-	if (!(context->actions & GDK_ACTION_COPY))
+	if (!(gdk_drag_context_get_actions (context) & GDK_ACTION_COPY))
 		return FALSE;
 
 	if (!text_uri_list)
 		text_uri_list = gdk_atom_intern_static_string ("text/uri-list");
 
-	for (l = context->targets; l; l = l->next) {
+	for (l = gdk_drag_context_list_targets (context); l; l = l->next) {
 		if (GDK_POINTER_TO_ATOM (l->data) == text_uri_list)
 			break;
 	}
diff --git a/gnome-panel/menu.c b/gnome-panel/menu.c
index b2ebcc3..bc79856 100644
--- a/gnome-panel/menu.c
+++ b/gnome-panel/menu.c
@@ -128,7 +128,7 @@ menu_get_panel (GtkWidget *menu)
 	g_return_val_if_fail (menu != NULL, NULL);
 
 	if (GTK_IS_MENU_ITEM (menu))
-		menu = menu->parent;
+		menu = gtk_widget_get_parent (menu);
 
 	g_return_val_if_fail (GTK_IS_MENU (menu), NULL);
 
@@ -137,7 +137,7 @@ menu_get_panel (GtkWidget *menu)
 		if (retval)
 			break;
 
-		menu = gtk_menu_get_attach_widget (GTK_MENU (menu))->parent;
+		menu = gtk_widget_get_parent (gtk_menu_get_attach_widget (GTK_MENU (menu)));
 		if (!GTK_IS_MENU (menu))
 			break;
 	}
@@ -814,7 +814,7 @@ static void
 restore_grabs(GtkWidget *w, gpointer data)
 {
 	GtkWidget *menu_item = data;
-	GtkMenu *menu = GTK_MENU(menu_item->parent); 
+	GtkMenu *menu = GTK_MENU (gtk_widget_get_parent (menu_item));
 	GtkWidget *xgrab_shell;
 	GtkWidget *parent;
 
@@ -831,7 +831,7 @@ restore_grabs(GtkWidget *w, gpointer data)
 				viewable = FALSE;
 				break;
 			}
-			tmp = tmp->parent;
+			tmp = gtk_widget_get_parent (tmp);
 		}
 
 		if (viewable)
@@ -843,14 +843,16 @@ restore_grabs(GtkWidget *w, gpointer data)
 	/*only grab if this HAD a grab before*/
 	if (xgrab_shell && (GTK_MENU_SHELL (xgrab_shell)->have_xgrab))
           {
-	    if (gdk_pointer_grab (xgrab_shell->window, TRUE,
+	    GdkWindow *window = gtk_widget_get_window (xgrab_shell);
+
+	    if (gdk_pointer_grab (window, TRUE,
 				  GDK_BUTTON_PRESS_MASK |
 				  GDK_BUTTON_RELEASE_MASK |
 				  GDK_ENTER_NOTIFY_MASK |
 				  GDK_LEAVE_NOTIFY_MASK,
 				  NULL, NULL, 0) == 0)
               {
-		if (gdk_keyboard_grab (xgrab_shell->window, TRUE,
+		if (gdk_keyboard_grab (window, TRUE,
 				       GDK_CURRENT_TIME) == 0)
 		  GTK_MENU_SHELL (xgrab_shell)->have_xgrab = TRUE;
 		else
@@ -1024,7 +1026,7 @@ drag_end_menu_cb (GtkWidget *widget, GdkDragContext     *context)
 
   /* Find the last viewable ancestor, and make an X grab on it
    */
-  parent = widget->parent;
+  parent = gtk_widget_get_parent (widget);
   xgrab_shell = NULL;
 
   /* FIXME: workaround for a possible gtk+ bug
@@ -1044,7 +1046,7 @@ drag_end_menu_cb (GtkWidget *widget, GdkDragContext     *context)
 	      viewable = FALSE;
 	      break;
 	    }
-	  tmp = tmp->parent;
+	  tmp = gtk_widget_get_parent (tmp);
 	}
       
       if (viewable)
@@ -1055,15 +1057,16 @@ drag_end_menu_cb (GtkWidget *widget, GdkDragContext     *context)
   
   if (xgrab_shell && !gtk_menu_get_tearoff_state (GTK_MENU(xgrab_shell)))
     {
+      GdkWindow *window = gtk_widget_get_window (xgrab_shell);
       GdkCursor *cursor = gdk_cursor_new (GDK_ARROW);
 
-      if ((gdk_pointer_grab (xgrab_shell->window, TRUE,
+      if ((gdk_pointer_grab (window, TRUE,
 			     GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK |
 			     GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK |
 			     GDK_POINTER_MOTION_MASK,
 			     NULL, cursor, GDK_CURRENT_TIME) == 0))
 	{
-	  if (gdk_keyboard_grab (xgrab_shell->window, TRUE,
+	  if (gdk_keyboard_grab (window, TRUE,
 				 GDK_CURRENT_TIME) == 0)
 	    GTK_MENU_SHELL (xgrab_shell)->have_xgrab = TRUE;
 	  else
@@ -1680,11 +1683,14 @@ static GtkWidget *
 populate_menu_from_directory (GtkWidget          *menu,
 			      GMenuTreeDirectory *directory)
 {	
+	GList    *children;
 	GSList   *l;
 	GSList   *items;
 	gboolean  add_separator;
 
-	add_separator = (GTK_MENU_SHELL (menu)->children != NULL);
+	children = gtk_container_get_children (GTK_CONTAINER (menu));
+	add_separator = (children != NULL);
+	g_list_free (children);
 
 	items = gmenu_tree_directory_get_contents (directory);
 
@@ -1858,8 +1864,7 @@ panel_load_menu_image_deferred (GtkWidget   *image_menu_item,
 	gtk_icon_size_lookup (icon_size, NULL, &icon_height);
 
 	image = gtk_image_new ();
-	image->requisition.width  = icon_height;
-	image->requisition.height = icon_height;
+	gtk_widget_set_size_request (image, icon_height, icon_height);
 
 	/* this takes over the floating ref */
 	icon->pixmap = g_object_ref_sink (G_OBJECT (image));
diff --git a/gnome-panel/panel-addto.c b/gnome-panel/panel-addto.c
index d28018c..635424a 100644
--- a/gnome-panel/panel-addto.c
+++ b/gnome-panel/panel-addto.c
@@ -287,8 +287,8 @@ panel_addto_drag_data_get_cb (GtkWidget        *widget,
 			      const char       *string)
 {
 	gtk_selection_data_set (selection_data,
-				selection_data->target, 8, (guchar *) string,
-				strlen (string));
+				gtk_selection_data_get_target (selection_data), 8,
+				(guchar *) string, strlen (string));
 }
 
 static void
@@ -1250,6 +1250,7 @@ static PanelAddtoDialog *
 panel_addto_dialog_new (PanelWidget *panel_widget)
 {
 	PanelAddtoDialog *dialog;
+	GtkWidget *dialog_vbox;
 	GtkWidget *vbox;
 	GtkWidget *inner_vbox;
 	GtkWidget *find_hbox;
@@ -1293,7 +1294,10 @@ panel_addto_dialog_new (PanelWidget *panel_widget)
 					 PANEL_ADDTO_RESPONSE_ADD);
 
 	gtk_container_set_border_width (GTK_CONTAINER (dialog->addto_dialog), 5);
-	gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog->addto_dialog)->vbox), 2);
+
+	dialog_vbox = gtk_dialog_get_content_area (GTK_DIALOG (dialog->addto_dialog));
+	gtk_box_set_spacing (GTK_BOX (dialog_vbox), 2);
+
 	g_signal_connect (G_OBJECT (dialog->addto_dialog), "response",
 			  G_CALLBACK (panel_addto_dialog_response), dialog);
 	g_signal_connect (dialog->addto_dialog, "destroy",
@@ -1301,8 +1305,7 @@ panel_addto_dialog_new (PanelWidget *panel_widget)
 
 	vbox = gtk_vbox_new (FALSE, 12);
 	gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
-	gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog->addto_dialog)->vbox),
-			   vbox);
+	gtk_container_add (GTK_CONTAINER (dialog_vbox), vbox);
 
 	inner_vbox = gtk_vbox_new (FALSE, 6);
 	gtk_box_pack_start (GTK_BOX (vbox), inner_vbox, TRUE, TRUE, 0);
diff --git a/gnome-panel/panel-ditem-editor.c b/gnome-panel/panel-ditem-editor.c
index 9f91e06..58a5d0b 100644
--- a/gnome-panel/panel-ditem-editor.c
+++ b/gnome-panel/panel-ditem-editor.c
@@ -599,18 +599,22 @@ static void
 panel_ditem_editor_make_ui (PanelDItemEditor *dialog)
 {
 	PanelDItemEditorPrivate *priv;
+	GtkWidget *dialog_vbox;
 
 	priv = dialog->priv;
 
 	gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
-	gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 2);
+
+	dialog_vbox = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
+	gtk_box_set_spacing (GTK_BOX (dialog_vbox), 2);
+
 	gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
 
 	priv->table = gtk_table_new (4, 3, FALSE);
 	gtk_container_set_border_width (GTK_CONTAINER (priv->table), 5);
 	gtk_table_set_row_spacings (GTK_TABLE (priv->table), 6);
 	gtk_table_set_col_spacings (GTK_TABLE (priv->table), 12);
-	gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox),
+	gtk_box_pack_start (GTK_BOX (dialog_vbox),
 			    priv->table, TRUE, TRUE, 0);
 	gtk_widget_show (priv->table);
 
diff --git a/gnome-panel/panel-force-quit.c b/gnome-panel/panel-force-quit.c
index 97aa3a9..7a98fcd 100644
--- a/gnome-panel/panel-force-quit.c
+++ b/gnome-panel/panel-force-quit.c
@@ -44,12 +44,13 @@ static Atom wm_state_atom = None;
 static GtkWidget *
 display_popup_window (GdkScreen *screen)
 {
-	GtkWidget *retval;
-	GtkWidget *vbox;
-	GtkWidget *image;
-	GtkWidget *frame;
-	GtkWidget *label;
-	int        screen_width, screen_height;
+	GtkWidget     *retval;
+	GtkWidget     *vbox;
+	GtkWidget     *image;
+	GtkWidget     *frame;
+	GtkWidget     *label;
+	int            screen_width, screen_height;
+	GtkAllocation  allocation;
 
 	retval = gtk_window_new (GTK_WINDOW_POPUP);
 	atk_object_set_role (gtk_widget_get_accessible (retval), ATK_ROLE_ALERT);
@@ -85,9 +86,11 @@ display_popup_window (GdkScreen *screen)
 	screen_width  = gdk_screen_get_width  (screen);
 	screen_height = gdk_screen_get_height (screen);
 
+	gtk_widget_get_allocation (retval, &allocation);
+
 	gtk_window_move (GTK_WINDOW (retval),
-			 (screen_width  - retval->allocation.width) / 2,
-			 (screen_height - retval->allocation.height) / 2);
+			 (screen_width  - allocation.width) / 2,
+			 (screen_height - allocation.height) / 2);
 
 	gtk_widget_show (GTK_WIDGET (retval));
 
diff --git a/gnome-panel/panel-frame.c b/gnome-panel/panel-frame.c
index a48a3e0..e140c82 100644
--- a/gnome-panel/panel-frame.c
+++ b/gnome-panel/panel-frame.c
@@ -41,7 +41,12 @@ panel_frame_size_request (GtkWidget      *widget,
 {
 	PanelFrame *frame = (PanelFrame *) widget;
 	GtkBin     *bin   = (GtkBin *) widget;
+	GtkStyle   *style;
 	GtkWidget  *child;
+	int         border_width;
+
+	style = gtk_widget_get_style (widget);
+	border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
 
 	requisition->width = 1;
 	requisition->height = 1;
@@ -50,17 +55,17 @@ panel_frame_size_request (GtkWidget      *widget,
 	if (child && gtk_widget_get_visible (child))
 		gtk_widget_size_request (child, requisition);
 
-	requisition->width  += GTK_CONTAINER (widget)->border_width;
-	requisition->height += GTK_CONTAINER (widget)->border_width;
+	requisition->width  += border_width;
+	requisition->height += border_width;
 
 	if (frame->edges & PANEL_EDGE_TOP)
-		requisition->height += widget->style->xthickness;
+		requisition->height += style->xthickness;
 	if (frame->edges & PANEL_EDGE_BOTTOM)
-		requisition->height += widget->style->xthickness;
+		requisition->height += style->xthickness;
 	if (frame->edges & PANEL_EDGE_LEFT)
-		requisition->width += widget->style->ythickness;
+		requisition->width += style->ythickness;
 	if (frame->edges & PANEL_EDGE_RIGHT)
-		requisition->width += widget->style->ythickness;
+		requisition->width += style->ythickness;
 }
 
 static void
@@ -69,13 +74,16 @@ panel_frame_size_allocate (GtkWidget     *widget,
 {
 	PanelFrame    *frame = (PanelFrame *) widget;
 	GtkBin        *bin   = (GtkBin *) widget;
+	GtkStyle      *style;
 	GtkAllocation  child_allocation;
+	GtkAllocation  child_allocation_current;
 	GtkWidget     *child;
 	int            border_width;
 
-	widget->allocation = *allocation;
+	gtk_widget_set_allocation (widget, allocation);
 
-	border_width = GTK_CONTAINER (widget)->border_width;
+	style = gtk_widget_get_style (widget);
+	border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
 
 	child_allocation.x      = allocation->x + border_width;
 	child_allocation.y      = allocation->y + border_width;
@@ -83,29 +91,30 @@ panel_frame_size_allocate (GtkWidget     *widget,
 	child_allocation.height = allocation->height - 2 * border_width;
 
 	if (frame->edges & PANEL_EDGE_LEFT) {
-		child_allocation.x     += widget->style->xthickness;
-		child_allocation.width -= widget->style->xthickness;
+		child_allocation.x     += style->xthickness;
+		child_allocation.width -= style->xthickness;
 	}
 
 	if (frame->edges & PANEL_EDGE_TOP) {
-		child_allocation.y      += widget->style->ythickness;
-		child_allocation.height -= widget->style->ythickness;
+		child_allocation.y      += style->ythickness;
+		child_allocation.height -= style->ythickness;
 	}
 
 	if (frame->edges & PANEL_EDGE_RIGHT)
-		child_allocation.width -= widget->style->xthickness;
+		child_allocation.width -= style->xthickness;
 
 	if (frame->edges & PANEL_EDGE_BOTTOM)
-		child_allocation.height -= widget->style->ythickness;
+		child_allocation.height -= style->ythickness;
 
 	child = gtk_bin_get_child (bin);
+	gtk_widget_get_allocation (child, &child_allocation_current);
 
 	if (gtk_widget_get_mapped (widget) &&
-	    (child_allocation.x != child->allocation.x ||
-	     child_allocation.y != child->allocation.y ||
-	     child_allocation.width  != child->allocation.width ||
-	     child_allocation.height != child->allocation.height))
-		gdk_window_invalidate_rect (gtk_widget_get_window (widget), &widget->allocation, FALSE);
+	    (child_allocation.x != child_allocation_current.x ||
+	     child_allocation.y != child_allocation_current.y ||
+	     child_allocation.width  != child_allocation_current.width ||
+	     child_allocation.height != child_allocation_current.height))
+		gdk_window_invalidate_rect (gtk_widget_get_window (widget), allocation, FALSE);
 
 	if (child && gtk_widget_get_visible (child))
 		gtk_widget_size_allocate (child, &child_allocation);
@@ -115,73 +124,82 @@ void
 panel_frame_draw (GtkWidget      *widget,
 		  PanelFrameEdge  edges)
 {
-	GdkGC *dark, *light, *black;
-	int    x, y, width, height;
-	int    xthickness, ythickness;
+	GdkWindow     *window;
+	GtkStyle      *style;
+	GtkStateType   state;
+	GtkAllocation  allocation;
+	GdkGC         *dark, *light, *black;
+	int            x, y, width, height;
+	int            xthickness, ythickness;
 
 	if (edges == PANEL_EDGE_NONE)
 		return;
 
-	dark  = widget->style->dark_gc [widget->state];
-	light = widget->style->light_gc [widget->state];
-	black = widget->style->black_gc;
+	window = gtk_widget_get_window (widget);
+	style = gtk_widget_get_style (widget);
+	state = gtk_widget_get_state (widget);
+	gtk_widget_get_allocation (widget, &allocation);
+
+	dark  = style->dark_gc [state];
+	light = style->light_gc [state];
+	black = style->black_gc;
 
-	xthickness = widget->style->xthickness;
-	ythickness = widget->style->ythickness;
+	xthickness = style->xthickness;
+	ythickness = style->ythickness;
 
-	x      = widget->allocation.x;
-	y      = widget->allocation.y;
-	width  = widget->allocation.width;
-	height = widget->allocation.height;
+	x      = allocation.x;
+	y      = allocation.y;
+	width  = allocation.width;
+	height = allocation.height;
 
 	/* Copied from gtk_default_draw_shadow() */
 
 	if (edges & PANEL_EDGE_BOTTOM && ythickness > 0) {
 		if (ythickness > 1) {
-			gdk_draw_line (widget->window, dark,
+			gdk_draw_line (window, dark,
 				       x, y + height - 2,
 				       x + width - 1, y + height - 2);
-			gdk_draw_line (widget->window, black,
+			gdk_draw_line (window, black,
 				       x, y + height - 1,
 				       x + width - 1, y + height - 1);
 		} else
-			gdk_draw_line (widget->window, dark,
+			gdk_draw_line (window, dark,
 				       x, y + height - 1,
 				       x + width - 1, y + height - 1);
 	}
 
 	if (edges & PANEL_EDGE_RIGHT && xthickness > 0) {
 		if (xthickness > 1) {
-			gdk_draw_line (widget->window, dark,
+			gdk_draw_line (window, dark,
 				       x + width - 2, y,
 				       x + width - 2, y + height - 1);
 
-			gdk_draw_line (widget->window, black,
+			gdk_draw_line (window, black,
 				       x + width - 1, y,
 				       x + width - 1, y + height - 1);
 		} else
-			gdk_draw_line (widget->window, dark,
+			gdk_draw_line (window, dark,
 				       x + width - 1, y,
 				       x + width - 1, y + height - 1);
 	}
 
 	if (edges & PANEL_EDGE_TOP && ythickness > 0) {
-		gdk_draw_line (widget->window, light,
+		gdk_draw_line (window, light,
 			       x, y, x + width - 1, y);
 
 		if (ythickness > 1)
-			gdk_draw_line (widget->window,
-				       widget->style->bg_gc [widget->state],
+			gdk_draw_line (window,
+				       style->bg_gc [state],
 				       x, y + 1, x + width - 1, y + 1);
 	}
 
 	if (edges & PANEL_EDGE_LEFT && xthickness > 0) {
-		gdk_draw_line (widget->window, light,
+		gdk_draw_line (window, light,
 			       x, y, x, y + height - 1);
 
 		if (xthickness > 1)
-			gdk_draw_line (widget->window,
-				       widget->style->bg_gc [widget->state],
+			gdk_draw_line (window,
+				       style->bg_gc [state],
 				       x + 1, y, x + 1, y + height - 1);
 	}
 }
diff --git a/gnome-panel/panel-toplevel.c b/gnome-panel/panel-toplevel.c
index dbd9294..406d761 100644
--- a/gnome-panel/panel-toplevel.c
+++ b/gnome-panel/panel-toplevel.c
@@ -3155,8 +3155,12 @@ panel_toplevel_size_allocate (GtkWidget     *widget,
 	    (challoc.x != child_allocation.x ||
 	     challoc.y != child_allocation.y ||
 	     challoc.width  != child_allocation.width ||
-	     challoc.height != child_allocation.height))
-		gdk_window_invalidate_rect (gtk_widget_get_window (widget), &widget->allocation, FALSE);
+	     challoc.height != child_allocation.height)) {
+		GtkAllocation allocation;
+
+		gtk_widget_get_allocation (widget, &allocation);
+		gdk_window_invalidate_rect (gtk_widget_get_window (widget), &allocation, FALSE);
+	}
 
 	if (child && gtk_widget_get_visible (child))
 		gtk_widget_size_allocate (child, &challoc);
@@ -3465,10 +3469,11 @@ panel_toplevel_calculate_animation_end_geometry (PanelToplevel *toplevel)
 static void
 panel_toplevel_start_animation (PanelToplevel *toplevel)
 {
-	GdkScreen *screen;
-	int        deltax, deltay, deltaw = 0, deltah = 0;
-	int        cur_x = -1, cur_y = -1;
-	long       t;
+	GdkScreen      *screen;
+	GtkRequisition  requisition;
+	int             deltax, deltay, deltaw = 0, deltah = 0;
+	int             cur_x = -1, cur_y = -1;
+	long            t;
 
 	panel_toplevel_calculate_animation_end_geometry (toplevel);
 
@@ -3492,13 +3497,13 @@ panel_toplevel_start_animation (PanelToplevel *toplevel)
 	deltax = toplevel->priv->animation_end_x - cur_x;
 	deltay = toplevel->priv->animation_end_y - cur_y;
 
+	gtk_widget_get_requisition (GTK_WIDGET (toplevel), &requisition);
+
 	if (toplevel->priv->animation_end_width != -1)
-		deltaw = toplevel->priv->animation_end_width -
-			GTK_WIDGET (toplevel)->requisition.width;
+		deltaw = toplevel->priv->animation_end_width - requisition.width;
 
 	if (toplevel->priv->animation_end_height != -1)
-		deltah = toplevel->priv->animation_end_height -
-			GTK_WIDGET (toplevel)->requisition.height;
+		deltah = toplevel->priv->animation_end_height - requisition.height;
 
 	if (deltax == 0 && deltay == 0 && deltaw == 0 && deltah == 0) {
 		toplevel->priv->animation_end_x      = -1;
diff --git a/gnome-panel/panel.c b/gnome-panel/panel.c
index b112d79..b6f3631 100644
--- a/gnome-panel/panel.c
+++ b/gnome-panel/panel.c
@@ -897,10 +897,10 @@ panel_check_dnd_target_data (GtkWidget      *widget,
 	    !BUTTON_IS_WIDGET (widget))
 		return FALSE;
 
-	if (!(context->actions & (GDK_ACTION_COPY|GDK_ACTION_MOVE)))
+	if (!(gdk_drag_context_get_actions (context) & (GDK_ACTION_COPY|GDK_ACTION_MOVE)))
 		return FALSE;
 
-	for (l = context->targets; l; l = l->next) {
+	for (l = gdk_drag_context_list_targets (context); l; l = l->next) {
 		GdkAtom atom;
 		guint   info;
 
@@ -975,15 +975,19 @@ panel_check_drop_forbidden (PanelWidget    *panel,
 
 	if (info == TARGET_ICON_INTERNAL ||
 	    info == TARGET_APPLET_INTERNAL) {
-		if (context->actions & GDK_ACTION_MOVE)
+		if (gdk_drag_context_get_actions (context) & GDK_ACTION_MOVE)
 			gdk_drag_status (context, GDK_ACTION_MOVE, time_);
 		else
-			gdk_drag_status (context, context->suggested_action, time_);
+			gdk_drag_status (context,
+					 gdk_drag_context_get_suggested_action (context),
+					 time_);
 
-	} else if (context->actions & GDK_ACTION_COPY)
+	} else if (gdk_drag_context_get_actions (context) & GDK_ACTION_COPY)
 		gdk_drag_status (context, GDK_ACTION_COPY, time_);
 	else
-		gdk_drag_status (context, context->suggested_action, time_);
+		gdk_drag_status (context,
+				 gdk_drag_context_get_suggested_action (context),
+				 time_);
 
 	return TRUE;
 
@@ -1094,7 +1098,7 @@ panel_receive_dnd_data (PanelWidget      *panel,
 				    PANEL_ICON_FOLDER);
 		break;
 	case TARGET_APPLET:
-		if (!selection_data->data) {
+		if (!gtk_selection_data_get_data (selection_data)) {
 			gtk_drag_finish (context, FALSE, FALSE, time_);
 			return;
 		}
@@ -1107,11 +1111,11 @@ panel_receive_dnd_data (PanelWidget      *panel,
 		break;
 	case TARGET_APPLET_INTERNAL:
 		success = drop_internal_applet (panel, pos, (char *)data,
-						context->action);
+						gdk_drag_context_get_selected_action (context));
 		break;
 	case TARGET_ICON_INTERNAL:
 		success = drop_internal_icon (panel, pos, (char *)data,
-					      context->action);
+					      gdk_drag_context_get_selected_action (context));
 		break;
 	default:
 		gtk_drag_finish (context, FALSE, FALSE, time_);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]