diff pidgin/gtkpounce.c @ 32628:a3bd979c9ce4

compiles using GTK+ 3 from git, beware it does not yet run, in fact it crashes...
author Marcus Lundblad <ml@update.uu.se>
date Thu, 25 Nov 2010 22:30:18 +0000
parents 351d07aefb09
children a053474df2e9
line wrap: on
line diff
--- a/pidgin/gtkpounce.c	Mon Nov 22 10:18:15 2010 +0000
+++ b/pidgin/gtkpounce.c	Thu Nov 25 22:30:18 2010 +0000
@@ -410,13 +410,15 @@
 				GtkSelectionData *sd, guint info, guint t, gpointer data)
 {
 	PidginPounceDialog *dialog;
-
-	if (sd->target == gdk_atom_intern("PURPLE_BLIST_NODE", FALSE))
+  GdkAtom target = gtk_selection_data_get_target(sd);
+  const guchar *sd_data = gtk_selection_data_get_data(sd);
+    
+	if (target == gdk_atom_intern("PURPLE_BLIST_NODE", FALSE))
 	{
 		PurpleBlistNode *node = NULL;
 		PurpleBuddy *buddy;
 
-		memcpy(&node, sd->data, sizeof(node));
+		memcpy(&node, sd_data, sizeof(node));
 
 		if (PURPLE_BLIST_NODE_IS_CONTACT(node))
 			buddy = purple_contact_get_priority_buddy((PurpleContact *)node);
@@ -431,15 +433,15 @@
 		dialog->account = buddy->account;
 		pidgin_account_option_menu_set_selected(dialog->account_menu, buddy->account);
 
-		gtk_drag_finish(dc, TRUE, (dc->action == GDK_ACTION_MOVE), t);
+		gtk_drag_finish(dc, TRUE, (gdk_drag_context_get_actions(dc) == GDK_ACTION_MOVE), t);
 	}
-	else if (sd->target == gdk_atom_intern("application/x-im-contact", FALSE))
+	else if (target == gdk_atom_intern("application/x-im-contact", FALSE))
 	{
 		char *protocol = NULL;
 		char *username = NULL;
 		PurpleAccount *account;
 
-		if (pidgin_parse_x_im_contact((const char *)sd->data, FALSE, &account,
+		if (pidgin_parse_x_im_contact((const char *) sd_data, FALSE, &account,
 										&protocol, &username, NULL))
 		{
 			if (account == NULL)
@@ -461,7 +463,7 @@
 		g_free(username);
 		g_free(protocol);
 
-		gtk_drag_finish(dc, TRUE, (dc->action == GDK_ACTION_MOVE), t);
+		gtk_drag_finish(dc, TRUE, (gdk_drag_context_get_actions(dc) == GDK_ACTION_MOVE), t);
 	}
 }
 
@@ -540,7 +542,7 @@
 					 G_CALLBACK(delete_win_cb), dialog);
 
 	/* Create the parent vbox for everything. */
-	vbox1 = GTK_DIALOG(window)->vbox;
+	vbox1 = gtk_dialog_get_content_area(GTK_DIALOG(window));
 
 	/* Create the vbox that will contain all the prefs stuff. */
 	vbox2 = gtk_vbox_new(FALSE, PIDGIN_HIG_BOX_SPACE);
@@ -1018,7 +1020,7 @@
 static gboolean
 pounces_manager_configure_cb(GtkWidget *widget, GdkEventConfigure *event, PouncesManager *dialog)
 {
-	if (GTK_WIDGET_VISIBLE(widget)) {
+	if (gtk_widget_get_visible(widget)) {
 		purple_prefs_set_int(PIDGIN_PREFS_ROOT "/pounces/dialog/width",  event->width);
 		purple_prefs_set_int(PIDGIN_PREFS_ROOT "/pounces/dialog/height", event->height);
 	}