diff pidgin/plugins/timestamp_format.c @ 30137:4e7a9940627e

Prepare Pidgin plugins for GTK+3.0. They're almost GSeal-compliant, except for a few things that aren't in GTK+ releases yet.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Tue, 13 Apr 2010 23:22:31 +0000
parents 9ec94a37446a
children 446f208e5765
line wrap: on
line diff
--- a/pidgin/plugins/timestamp_format.c	Tue Apr 13 22:29:02 2010 +0000
+++ b/pidgin/plugins/timestamp_format.c	Tue Apr 13 23:22:31 2010 +0000
@@ -122,7 +122,11 @@
 			GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
 			NULL);
 	g_signal_connect_after(G_OBJECT(dialog), "response", G_CALLBACK(gtk_widget_destroy), dialog);
+#if GTK_CHECK_VERSION(2,14,0)
+	gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), frame);
+#else
 	gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), frame);
+#endif
 	gtk_window_set_role(GTK_WINDOW(dialog), "plugin_config");
 	gtk_window_set_title(GTK_WINDOW(dialog), _(purple_plugin_get_name(plugin)));
 	gtk_widget_show_all(dialog);
@@ -141,8 +145,13 @@
 	if (!GTK_IS_IMHTML(view))
 		return TRUE;
 
+#if GTK_CHECK_VERSION(2,14,0)
+	if (!gdk_window_get_pointer(gtk_widget_get_window(GTK_WIDGET(view)), &cx, &cy, NULL))
+		return TRUE;
+#else
 	if (!gdk_window_get_pointer(GTK_WIDGET(view)->window, &cx, &cy, NULL))
 		return TRUE;
+#endif
 
 	buffer = gtk_text_view_get_buffer(view);