cpw.qulogic.gtk3-required: 1013b725: Fix some merge errors.

qulogic at pidgin.im qulogic at pidgin.im
Tue Feb 28 02:22:07 EST 2012


----------------------------------------------------------------------
Revision: 1013b725418fd385bbff36cff76c4751c97ea49d
Parent:   cb4be8d06dd78ac31523e9e7cd30756a45c30192
Author:   qulogic at pidgin.im
Date:     02/28/12 00:28:43
Branch:   im.pidgin.cpw.qulogic.gtk3-required
URL: http://d.pidgin.im/viewmtn/revision/info/1013b725418fd385bbff36cff76c4751c97ea49d

Changelog: 

Fix some merge errors.

Changes against parent cb4be8d06dd78ac31523e9e7cd30756a45c30192

  patched  pidgin/gtkaccount.c
  patched  pidgin/gtkblist-theme-loader.c
  patched  pidgin/gtkblist.c
  patched  pidgin/gtkcellrendererexpander.c
  patched  pidgin/gtkdebug.c
  patched  pidgin/gtkdnd-hints.c
  patched  pidgin/gtkmenutray.h
  patched  pidgin/gtkplugin.c
  patched  pidgin/gtksavedstatuses.c
  patched  pidgin/gtkscrollbook.c
  patched  pidgin/gtksession.c
  patched  pidgin/gtksourceundomanager.c
  patched  pidgin/minidialog.c
  patched  pidgin/pidginstock.c
  patched  pidgin/pidgintooltip.c
  patched  pidgin/plugins/contact_priority.c
  patched  pidgin/plugins/convcolors.c
  patched  pidgin/plugins/gestures/stroke-draw.c
  patched  pidgin/plugins/themeedit.c
  patched  pidgin/plugins/ticker/gtkticker.c
  patched  pidgin/plugins/timestamp.c
  patched  pidgin/plugins/timestamp_format.c

-------------- next part --------------
============================================================
--- pidgin/plugins/ticker/gtkticker.c	8be613ae4205334fe7b52d01b2e1c86c5c45a317
+++ pidgin/plugins/ticker/gtkticker.c	20621cb4bdf8125d13509a279ca3c6341a5f07be
@@ -128,7 +128,7 @@ static void gtk_ticker_class_init (GtkTi
 
 	widget_class->map = gtk_ticker_map;
 	widget_class->realize = gtk_ticker_realize;
-	widget_class->size_request = gtk_ticker_size_request;
+	/*widget_class->size_request = gtk_ticker_size_request;*/
 	widget_class->size_allocate = gtk_ticker_size_allocate;
 
 	container_class->add = gtk_ticker_add_real;
@@ -332,11 +332,11 @@ static void gtk_ticker_realize (GtkWidge
 #endif
 	attributes.wclass = GDK_INPUT_OUTPUT;
 	attributes.visual = gtk_widget_get_visual (widget);
-	attributes.colormap = gtk_widget_get_colormap (widget);
+	/*attributes.colormap = gtk_widget_get_colormap (widget);*/
 	attributes.event_mask = gtk_widget_get_events (widget);
 	attributes.event_mask |= GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK;
 
-	attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
+	attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL /*| GDK_WA_COLORMAP*/;
 
 	window = gdk_window_new (gtk_widget_get_parent_window (widget),
 			&attributes, attributes_mask);
============================================================
--- pidgin/plugins/timestamp.c	2a0ae636289f7ec0629804d31b76a4a0872cab68
+++ pidgin/plugins/timestamp.c	8492d27680aa9690bb1c4a20a1f4b7c25e4c0d3b
@@ -134,7 +134,7 @@ get_config_frame(PurplePlugin *plugin)
 	GtkWidget *ret;
 	GtkWidget *frame, *label;
 	GtkWidget *vbox, *hbox;
-	GtkObject *adj;
+	GtkAdjustment *adj;
 	GtkWidget *spinner;
 
 	ret = gtk_vbox_new(FALSE, 18);
============================================================
--- pidgin/plugins/gestures/stroke-draw.c	de1f7eaeb012577c84e6ec8fa5b37a64b65489ae
+++ pidgin/plugins/gestures/stroke-draw.c	87635c0383ddb812c119252656064fa272f356be
@@ -19,10 +19,6 @@
 #include <X11/Xlib.h>
 #include <X11/Xutil.h>
 
-#if !GTK_CHECK_VERSION(2,14,0)
-#define gtk_widget_get_window(x) x->window
-#endif
-
 static void gstroke_invisible_window_init (GtkWidget *widget);
 /*FIXME: Maybe these should be put in a structure, and not static...*/
 static Display * gstroke_disp = NULL;
@@ -339,7 +335,7 @@ gstroke_invisible_window_init (GtkWidget
   unsigned int border_width;
   XSizeHints hints;
   Display *disp = GDK_WINDOW_XDISPLAY(gtk_widget_get_window(widget));
-  Window wind = GDK_WINDOW_XWINDOW (gtk_widget_get_window(widget));
+  Window wind = gdk_x11_window_get_xid(gtk_widget_get_window(widget));
   int screen = DefaultScreen (disp);
 
 	if (!gstroke_draw_strokes())
============================================================
--- pidgin/gtkplugin.c	7c52fc39e8673533d60094e8f1b8dafee8cf916e
+++ pidgin/gtkplugin.c	e4387fcfa02aab603d8769819ca1727f77d4fc40
@@ -518,7 +518,7 @@ static void plugin_dialog_response_cb(Gt
 			break;
 
 		dialog = gtk_dialog_new_with_buttons(PIDGIN_ALERT_TITLE, GTK_WINDOW(d),
-						     GTK_DIALOG_NO_SEPARATOR | GTK_DIALOG_DESTROY_WITH_PARENT,
+						     GTK_DIALOG_DESTROY_WITH_PARENT,
 						     GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
 						     NULL);
 		if (plugin_pref_dialogs == NULL)
@@ -527,7 +527,7 @@ static void plugin_dialog_response_cb(Gt
 		g_hash_table_insert(plugin_pref_dialogs, plug, dialog);
 
 		g_signal_connect(G_OBJECT(dialog), "response", G_CALLBACK(pref_dialog_response_cb), plug);
-		gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), box);
+		gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), box);
 		gtk_window_set_role(GTK_WINDOW(dialog), "plugin_config");
 		gtk_window_set_title(GTK_WINDOW(dialog), _(purple_plugin_get_name(plug)));
 		gtk_widget_show_all(dialog);
@@ -562,9 +562,12 @@ pidgin_plugins_paint_tooltip(GtkWidget *
 pidgin_plugins_paint_tooltip(GtkWidget *tipwindow, gpointer data)
 {
 	PangoLayout *layout = g_object_get_data(G_OBJECT(tipwindow), "tooltip-plugin");
-	gtk_paint_layout(tipwindow->style, tipwindow->window, GTK_STATE_NORMAL, FALSE,
-			NULL, tipwindow, "tooltip",
+	cairo_t *cr = gdk_cairo_create(gtk_widget_get_window(tipwindow));
+	gtk_paint_layout(gtk_widget_get_style(tipwindow), cr, GTK_STATE_NORMAL, FALSE,
+			tipwindow, "tooltip",
 			6, 6, layout);
+	cairo_destroy(cr);
+
 	return TRUE;
 }
 
@@ -719,7 +722,7 @@ void pidgin_plugin_dialog_show()
 
 	plugin_dialog = gtk_dialog_new_with_buttons(_("Plugins"),
 						    NULL,
-						    GTK_DIALOG_NO_SEPARATOR,
+						    0,
 						    NULL);
 	pref_button = gtk_dialog_add_button(GTK_DIALOG(plugin_dialog),
 						_("Configure Pl_ugin"), PIDGIN_RESPONSE_CONFIGURE);
@@ -772,7 +775,7 @@ void pidgin_plugin_dialog_show()
 	gtk_tree_view_append_column (GTK_TREE_VIEW(event_view), col);
 	gtk_tree_view_column_set_sort_column_id(col, 1);
 	g_object_unref(G_OBJECT(ls));
-	gtk_box_pack_start(GTK_BOX(GTK_DIALOG(plugin_dialog)->vbox), 
+	gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(plugin_dialog))), 
 		pidgin_make_scrollable(event_view, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC, GTK_SHADOW_IN, -1, -1), 
 		TRUE, TRUE, 0);
 	gtk_tree_view_set_search_column(GTK_TREE_VIEW(event_view), 1);
@@ -788,8 +791,8 @@ void pidgin_plugin_dialog_show()
 	gtk_expander_set_use_markup(GTK_EXPANDER(expander), TRUE);
 	gtk_widget_set_sensitive(expander, FALSE);
 	gtk_container_add(GTK_CONTAINER(expander), create_details());
-	gtk_box_pack_start(GTK_BOX(GTK_DIALOG(plugin_dialog)->vbox), expander,
-		FALSE, FALSE, 0);
+	gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(plugin_dialog))),
+	                    expander, FALSE, FALSE, 0);
 
 
 	g_signal_connect (G_OBJECT (sel), "changed", G_CALLBACK (prefs_plugin_sel), NULL);
============================================================
--- pidgin/gtkdebug.c	1c51a02d41acfcaeb63dde3d6a38d384d6db5575
+++ pidgin/gtkdebug.c	d9a6c97e01798392a588dd165dd8d7515ec631ba
@@ -128,11 +128,7 @@ configure_cb(GtkWidget *w, GdkEventConfi
 static gboolean
 configure_cb(GtkWidget *w, GdkEventConfigure *event, DebugWindow *win)
 {
-#if GTK_CHECK_VERSION(2,18,0)
 	if (gtk_widget_get_visible(w)) {
-#else
-	if (GTK_WIDGET_VISIBLE(w)) {
-#endif
 		purple_prefs_set_int(PIDGIN_PREFS_ROOT "/debug/width",  event->width);
 		purple_prefs_set_int(PIDGIN_PREFS_ROOT "/debug/height", event->height);
 	}
@@ -628,12 +624,8 @@ regex_key_release_cb(GtkWidget *w, GdkEv
 
 static void
 regex_key_release_cb(GtkWidget *w, GdkEventKey *e, DebugWindow *win) {
-	if(e->keyval == GDK_Return &&
-#if GTK_CHECK_VERSION(2,18,0)
+	if(e->keyval == GDK_KEY_Return &&
 	   gtk_widget_is_sensitive(win->filter) &&
-#else
-	   GTK_WIDGET_IS_SENSITIVE(win->filter) &&
-#endif
 	   !gtk_toggle_tool_button_get_active(GTK_TOGGLE_TOOL_BUTTON(win->filter)))
 	{
 		gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(win->filter), TRUE);
@@ -935,22 +927,18 @@ debug_window_new(void)
 		gtk_container_add(GTK_CONTAINER(item), gtk_label_new(_("Level ")));
 		gtk_container_add(GTK_CONTAINER(toolbar), GTK_WIDGET(item));
 
-		win->filterlevel = gtk_combo_box_new_text();
+		win->filterlevel = gtk_combo_box_text_new();
 		item = gtk_tool_item_new();
-#if GTK_CHECK_VERSION(2,12,0)
 		gtk_widget_set_tooltip_text(win->filterlevel, _("Select the debug filter level."));
-#else
-		gtk_tooltips_set_tip(tooltips, win->filterlevel, _("Select the debug filter level."), NULL);
-#endif
 		gtk_container_add(GTK_CONTAINER(item), win->filterlevel);
 		gtk_container_add(GTK_CONTAINER(toolbar), GTK_WIDGET(item));
 
-		gtk_combo_box_append_text(GTK_COMBO_BOX(win->filterlevel), _("All"));
-		gtk_combo_box_append_text(GTK_COMBO_BOX(win->filterlevel), _("Misc"));
-		gtk_combo_box_append_text(GTK_COMBO_BOX(win->filterlevel), _("Info"));
-		gtk_combo_box_append_text(GTK_COMBO_BOX(win->filterlevel), _("Warning"));
-		gtk_combo_box_append_text(GTK_COMBO_BOX(win->filterlevel), _("Error "));
-		gtk_combo_box_append_text(GTK_COMBO_BOX(win->filterlevel), _("Fatal Error"));
+		gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(win->filterlevel), _("All"));
+		gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(win->filterlevel), _("Misc"));
+		gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(win->filterlevel), _("Info"));
+		gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(win->filterlevel), _("Warning"));
+		gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(win->filterlevel), _("Error "));
+		gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(win->filterlevel), _("Fatal Error"));
 		gtk_combo_box_set_active(GTK_COMBO_BOX(win->filterlevel),
 					purple_prefs_get_int(PIDGIN_PREFS_ROOT "/debug/filterlevel"));
 #ifdef USE_REGEX
============================================================
--- pidgin/gtkblist.c	805376da5afd723f965c5919b1cec27e83e33cbb
+++ pidgin/gtkblist.c	9fabc712d9361a2e71b4bbbc598346e5f912e38f
@@ -2973,7 +2973,7 @@ pidgin_blist_paint_tip(GtkWidget *widget
 	else
 		prpl_col = TOOLTIP_BORDER + status_size + SMALL_SPACE + max_text_width - PRPL_SIZE;
 
-	cr = gdk_cairo_create(GDK_DRAWABLE(gtk_widget_get_window(gtkblist->tipwindow)));
+	cr = gdk_cairo_create(gtk_widget_get_window(gtkblist->tipwindow));
 	current_height = 12;
 	for(l = gtkblist->tooltipdata; l; l = l->next)
 	{
============================================================
--- pidgin/gtkaccount.c	6316f11cb7369be3bfde39ed5487553c580052ac
+++ pidgin/gtkaccount.c	cc6d180d572f7d8f758ae733f9ca673955a92b1a
@@ -354,9 +354,11 @@ account_dnd_recv(GtkWidget *widget, GdkD
 account_dnd_recv(GtkWidget *widget, GdkDragContext *dc, gint x, gint y,
 		 GtkSelectionData *sd, guint info, guint t, AccountPrefsDialog *dialog)
 {
-	gchar *name = (gchar *)sd->data;
+	const gchar *name = (gchar *)gtk_selection_data_get_data(sd);
+	gint length = gtk_selection_data_get_length(sd);
+	gint format = gtk_selection_data_get_format(sd);
 
-	if ((sd->length >= 0) && (sd->format == 8)) {
+	if ((length >= 0) && (format == 8)) {
 		/* Well, it looks like the drag event was cool.
 		 * Let's do something with it */
 		if (!g_ascii_strncasecmp(name, "file://", 7)) {
@@ -1034,7 +1036,7 @@ proxy_type_changed_cb(GtkWidget *menu, A
 		dialog->new_proxy_type == PURPLE_PROXY_NONE ||
 		dialog->new_proxy_type == PURPLE_PROXY_USE_ENVVAR) {
 
-		gtk_widget_hide_all(dialog->proxy_vbox);
+		gtk_widget_hide(dialog->proxy_vbox);
 	}
 	else
 		gtk_widget_show_all(dialog->proxy_vbox);
@@ -1741,7 +1743,9 @@ drag_data_get_cb(GtkWidget *widget, GdkD
 				 GtkSelectionData *data, guint info, guint time,
 				 AccountsWindow *dialog)
 {
-	if (data->target == gdk_atom_intern("PURPLE_ACCOUNT", FALSE)) {
+	GdkAtom target = gtk_selection_data_get_target(data);
+
+	if (target == gdk_atom_intern("PURPLE_ACCOUNT", FALSE)) {
 		GtkTreeRowReference *ref;
 		GtkTreePath *source_row;
 		GtkTreeIter iter;
@@ -1812,13 +1816,16 @@ drag_data_received_cb(GtkWidget *widget,
 					  guint x, guint y, GtkSelectionData *sd,
 					  guint info, guint t, AccountsWindow *dialog)
 {
-	if (sd->target == gdk_atom_intern("PURPLE_ACCOUNT", FALSE) && sd->data) {
+	GdkAtom target = gtk_selection_data_get_target(sd);
+	const guchar *data = gtk_selection_data_get_data(sd);
+
+	if (target == gdk_atom_intern("PURPLE_ACCOUNT", FALSE) && data) {
 		gint dest_index;
 		PurpleAccount *a = NULL;
 		GtkTreePath *path = NULL;
 		GtkTreeViewDropPosition position;
 
-		memcpy(&a, sd->data, sizeof(a));
+		memcpy(&a, data, sizeof(a));
 
 		if (gtk_tree_view_get_dest_row_at_pos(GTK_TREE_VIEW(widget), x, y,
 											  &path, &position)) {
============================================================
--- pidgin/plugins/contact_priority.c	b98d3468b8a654740033da9db214f3323356b614
+++ pidgin/plugins/contact_priority.c	8a91916ddf3d0102e2ccd37b24d90d06434bb9a7
@@ -75,7 +75,7 @@ get_config_frame(PurplePlugin *plugin)
 	GtkWidget *ret = NULL, *hbox = NULL, *frame = NULL, *vbox = NULL;
 	GtkWidget *label = NULL, *spin = NULL, *check = NULL;
 	GtkWidget *optmenu = NULL;
-	GtkObject *adj = NULL;
+	GtkAdjustment *adj = NULL;
 	GtkSizeGroup *sg = NULL;
 	PurpleAccount *account = NULL;
 	int i;
============================================================
--- pidgin/pidginstock.c	27d760196319bd34c9099b911489e268beed07f8
+++ pidgin/pidginstock.c	d7212f9e443c795d34f122ee6ace78f60fd0ce57
@@ -95,7 +95,7 @@ typedef struct {
 
 typedef struct {
 	const char *name;
- 	const char *dir;
+	const char *dir;
 	const char *filename;
 	gboolean microscopic;
 	gboolean extra_small;
============================================================
--- pidgin/gtkdnd-hints.c	1f93eb44772b2bf4c500975a976813f8b0f63792
+++ pidgin/gtkdnd-hints.c	41583142d7829ada029a8232f357411c9912a439
@@ -57,22 +57,27 @@ dnd_hints_init_window(const gchar *fname
 static GtkWidget *
 dnd_hints_init_window(const gchar *fname)
 {
+	/* TODO: this is likely very broken right now, I think this needs to be 
+	 * Caito-ified. */
 	GdkPixbuf *pixbuf;
-	GdkPixmap *pixmap;
-	GdkBitmap *bitmap;
-	GtkWidget *pix;
+	/*GdkPixmap *pixmap;*/
+	/*GdkBitmap *bitmap;*/
+	/*GtkWidget *pix;*/
 	GtkWidget *win;
-	GdkColormap *colormap;
+	/*GdkColormap *colormap;*/
 
 	pixbuf = gdk_pixbuf_new_from_file(fname, NULL);
 	g_return_val_if_fail(pixbuf, NULL);
 
 	win = gtk_window_new(GTK_WINDOW_POPUP);
+#if 0
 	colormap = gtk_widget_get_colormap(win);
 	gdk_pixbuf_render_pixmap_and_mask_for_colormap(pixbuf, colormap,
 	                                               &pixmap, &bitmap, 128);
+#endif
 	g_object_unref(G_OBJECT(pixbuf));
 
+#if 0
 	pix = gtk_image_new_from_pixmap(pixmap, bitmap);
 	gtk_container_add(GTK_CONTAINER(win), pix);
 	gtk_widget_shape_combine_mask(win, bitmap, 0, 0);
@@ -81,6 +86,7 @@ dnd_hints_init_window(const gchar *fname
 	g_object_unref(G_OBJECT(bitmap));
 
 	gtk_widget_show_all(pix);
+#endif
 
 	return win;
 }
@@ -89,17 +95,23 @@ get_widget_coords(GtkWidget *w, gint *x1
 get_widget_coords(GtkWidget *w, gint *x1, gint *y1, gint *x2, gint *y2)
 {
 	gint ox, oy, width, height;
+	GtkWidget *parent = gtk_widget_get_parent(w);
 
-	if (w->parent && w->parent->window == w->window)
+	if (parent && gtk_widget_get_window(parent) == gtk_widget_get_window(w))
 	{
-		get_widget_coords(w->parent, &ox, &oy, NULL, NULL);
-		height = w->allocation.height;
-		width = w->allocation.width;
+		GtkAllocation allocation;
+
+		gtk_widget_get_allocation(w, &allocation);
+		get_widget_coords(parent, &ox, &oy, NULL, NULL);
+		height = allocation.height;
+		width = allocation.width;
 	}
 	else
 	{
-		gdk_window_get_origin(w->window, &ox, &oy);
-		gdk_drawable_get_size(w->window, &width, &height);
+		GdkWindow *win = gtk_widget_get_window(w);
+		gdk_window_get_origin(win, &ox, &oy);
+		width = gdk_window_get_width(win);
+		height = gdk_window_get_height(win);
 	}
 
 	if (x1) *x1 = ox;
@@ -172,10 +184,13 @@ dnd_hints_show_relative(DndHintWindowId 
 {
 	gint x1, x2, y1, y2;
 	gint x = 0, y = 0;
+	GtkAllocation allocation;
 
+	gtk_widget_get_allocation(widget, &allocation);
+
 	get_widget_coords(widget, &x1, &y1, &x2, &y2);
-	x1 += widget->allocation.x;	x2 += widget->allocation.x;
-	y1 += widget->allocation.y;	y2 += widget->allocation.y;
+	x1 += allocation.x;	x2 += allocation.x;
+	y1 += allocation.y;	y2 += allocation.y;
 
 	switch (horiz)
 	{
============================================================
--- pidgin/gtksavedstatuses.c	f6982dc2c237ab48f1bec14d3ca059cb8e061ed3
+++ pidgin/gtksavedstatuses.c	c769668ae4ef36a23bbeff82ca1a39b95ce40b33
@@ -524,11 +524,7 @@ configure_cb(GtkWidget *widget, GdkEvent
 static gboolean
 configure_cb(GtkWidget *widget, GdkEventConfigure *event, StatusWindow *dialog)
 {
-#if GTK_CHECK_VERSION(2,18,0)
 	if (gtk_widget_get_visible(widget))
-#else
-	if (GTK_WIDGET_VISIBLE(widget))
-#endif
 	{
 		purple_prefs_set_int(PIDGIN_PREFS_ROOT "/status/dialog/width",  event->width);
 		purple_prefs_set_int(PIDGIN_PREFS_ROOT "/status/dialog/height", event->height);
============================================================
--- pidgin/gtkmenutray.h	c9ff16a951d6ad167f148de98e9c5198023d0ad9
+++ pidgin/gtkmenutray.h	f196246df1e596ce8742eea444c9044b5b664341
@@ -40,9 +40,6 @@ struct _PidginMenuTray {
 struct _PidginMenuTray {
 	GtkMenuItem gparent;					/**< The parent instance */
 	GtkWidget *tray;						/**< The tray */
-#if !GTK_CHECK_VERSION(2,12,0)
-	GtkTooltips *tooltips;					/**< Tooltips */
-#endif
 };
 
 /** A PidginMenuTrayClass */
============================================================
--- pidgin/gtksession.c	c554eb95f25715403e48c1f6a55457f3f162c492
+++ pidgin/gtksession.c	1acaa195f577ffb22ecf1fe101f5601c2c7e3af0
@@ -349,7 +349,7 @@ pidgin_session_init(gchar *argv0, gchar 
 	free(tmp);
 
 	session_managed = TRUE;
-	gdk_set_sm_client_id(client_id);
+	gdk_x11_set_sm_client_id(client_id);
 
 	tmp = g_get_current_dir();
 	session_set_string(session, SmCurrentDirectory, tmp);
============================================================
--- pidgin/plugins/timestamp_format.c	b0110601005e3f55178aacef31208bb8ea8c09b3
+++ pidgin/plugins/timestamp_format.c	0135999522d9fa9c62bdbd338906c80f70407633
@@ -155,8 +155,9 @@ menu_cb(GtkWidget *item, gpointer data)
 	if (!frame)
 		return;
 
+	/* GTK_DIALOG_NO_SEPARATOR seems to be gone in gtk+ 3.0... */
 	dialog = gtk_dialog_new_with_buttons(PIDGIN_ALERT_TITLE, NULL,
-			GTK_DIALOG_NO_SEPARATOR | GTK_DIALOG_DESTROY_WITH_PARENT,
+			GTK_DIALOG_DESTROY_WITH_PARENT,
 			GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
 			NULL);
 	g_signal_connect_after(G_OBJECT(dialog), "response", G_CALLBACK(gtk_widget_destroy), dialog);
============================================================
--- pidgin/gtkcellrendererexpander.c	8251823853d9dead3d8f867585f16f5ec79f8ac3
+++ pidgin/gtkcellrendererexpander.c	e1f64d9cafa432ae3ca6c4b6cb80c4e905f4f770
@@ -44,24 +44,23 @@ static void pidgin_cell_renderer_expande
 static void pidgin_cell_renderer_expander_class_init (PidginCellRendererExpanderClass *class);
 static void pidgin_cell_renderer_expander_get_size   (GtkCellRenderer            *cell,
 						   GtkWidget                  *widget,
-						   GdkRectangle               *cell_area,
+						   const GdkRectangle               *cell_area,
 						   gint                       *x_offset,
 						   gint                       *y_offset,
 						   gint                       *width,
 						   gint                       *height);
 static void pidgin_cell_renderer_expander_render     (GtkCellRenderer            *cell,
-						   GdkWindow                  *window,
+						   cairo_t                    *cr,
 						   GtkWidget                  *widget,
-						   GdkRectangle               *background_area,
-						   GdkRectangle               *cell_area,
-						   GdkRectangle               *expose_area,
-						   guint                       flags);
+						   const GdkRectangle         *background_area,
+						   const GdkRectangle         *cell_area,
+						   GtkCellRendererState        flags);
 static gboolean pidgin_cell_renderer_expander_activate  (GtkCellRenderer            *r,
 						      GdkEvent                   *event,
 						      GtkWidget                  *widget,
 						      const gchar                *p,
-						      GdkRectangle               *bg,
-						      GdkRectangle               *cell,
+						      const GdkRectangle         *bg,
+						      const GdkRectangle         *cell,
 						      GtkCellRendererState        flags);
 static void  pidgin_cell_renderer_expander_finalize (GObject *gobject);
 
@@ -108,9 +107,9 @@ static void pidgin_cell_renderer_expande
 
 static void pidgin_cell_renderer_expander_init (PidginCellRendererExpander *cellexpander)
 {
-	GTK_CELL_RENDERER(cellexpander)->mode = GTK_CELL_RENDERER_MODE_ACTIVATABLE;
-	GTK_CELL_RENDERER(cellexpander)->xpad = 0;
-	GTK_CELL_RENDERER(cellexpander)->ypad = 2;
+	g_object_set(G_OBJECT(cellexpander), "mode",
+	             GTK_CELL_RENDERER_MODE_ACTIVATABLE, NULL);
+	gtk_cell_renderer_set_padding(GTK_CELL_RENDERER(cellexpander), 0, 2);
 }
 
 static void pidgin_cell_renderer_expander_class_init (PidginCellRendererExpanderClass *class)
@@ -190,7 +189,7 @@ static void pidgin_cell_renderer_expande
 
 static void pidgin_cell_renderer_expander_get_size (GtkCellRenderer *cell,
 						 GtkWidget       *widget,
-						 GdkRectangle    *cell_area,
+						 const GdkRectangle    *cell_area,
 						 gint            *x_offset,
 						 gint            *y_offset,
 						 gint            *width,
@@ -199,11 +198,17 @@ static void pidgin_cell_renderer_expande
 	gint calc_width;
 	gint calc_height;
 	gint expander_size;
+	gint xpad;
+	gint ypad;
+	gfloat xalign;
+	gfloat yalign;
 
 	gtk_widget_style_get(widget, "expander-size", &expander_size, NULL);
 
-	calc_width = (gint) cell->xpad * 2 + expander_size;
-	calc_height = (gint) cell->ypad * 2 + expander_size;
+	gtk_cell_renderer_get_padding(cell, &xpad, &ypad);
+	gtk_cell_renderer_get_alignment(cell, &xalign, &yalign); 
+	calc_width = (gint) xpad * 2 + expander_size;
+	calc_height = (gint) ypad * 2 + expander_size;
 
 	if (width)
 		*width = calc_width;
@@ -215,12 +220,12 @@ static void pidgin_cell_renderer_expande
 		{
 			if (x_offset)
 				{
-					*x_offset = cell->xalign * (cell_area->width - calc_width);
+					*x_offset = xalign * (cell_area->width - calc_width);
 					*x_offset = MAX (*x_offset, 0);
 				}
 			if (y_offset)
 				{
-					*y_offset = cell->yalign * (cell_area->height - calc_height);
+					*y_offset = yalign * (cell_area->height - calc_height);
 					*y_offset = MAX (*y_offset, 0);
 				}
 		}
@@ -228,61 +233,64 @@ static void pidgin_cell_renderer_expande
 
 
 static void pidgin_cell_renderer_expander_render(GtkCellRenderer *cell,
-					       GdkWindow       *window,
-					       GtkWidget       *widget,
-					       GdkRectangle    *background_area,
-					       GdkRectangle    *cell_area,
-					       GdkRectangle    *expose_area,
-					       guint            flags)
+					       cairo_t              *cr,
+					       GtkWidget            *widget,
+					       const GdkRectangle   *background_area,
+					       const GdkRectangle   *cell_area,
+					       GtkCellRendererState flags)
 {
 	PidginCellRendererExpander *cellexpander = (PidginCellRendererExpander *) cell;
 	gboolean set;
 	gint width, height;
 	GtkStateType state;
+	gint xpad;
+	gint ypad;
+	gboolean is_expanded;
+	GtkAllocation allocation;
 
 	if (!cellexpander->is_expander)
 		return;
 
+	gtk_cell_renderer_get_padding(cell, &xpad, &ypad);
+	g_object_get(G_OBJECT(cell), "is-expanded", &is_expanded, NULL);
+
 	width = cell_area->width;
 	height = cell_area->height;
 
-	if (!cell->sensitive)
+	if (!gtk_widget_get_sensitive(GTK_WIDGET(cell)))
 		state = GTK_STATE_INSENSITIVE;
 	else if (flags & GTK_CELL_RENDERER_PRELIT)
 		state = GTK_STATE_PRELIGHT;
-#if GTK_CHECK_VERSION(2,18,0)
-	else if (gtk_widget_has_focus (widget) && flags & GTK_CELL_RENDERER_SELECTED)
+	else if (gtk_widget_has_focus(widget) && flags & GTK_CELL_RENDERER_SELECTED)
 		state = GTK_STATE_ACTIVE;
-#else
-	else if (GTK_WIDGET_HAS_FOCUS (widget) && flags & GTK_CELL_RENDERER_SELECTED)
-		state = GTK_STATE_ACTIVE;
-#endif
 	else
 		state = GTK_STATE_NORMAL;
 
-	width -= cell->xpad*2;
-	height -= cell->ypad*2;
+	width -= xpad*2;
+	height -= ypad*2;
 
-	gtk_paint_expander (widget->style,
-			    window, state,
-			    NULL, widget, "treeview",
-			    cell_area->x + cell->xpad + (width / 2),
-			    cell_area->y + cell->ypad + (height / 2),
-			    cell->is_expanded ? GTK_EXPANDER_EXPANDED : GTK_EXPANDER_COLLAPSED);
+	gtk_paint_expander(gtk_widget_get_style(widget),
+	                   cr, state,
+	                   widget, "treeview",
+	                   cell_area->x + xpad + (width / 2),
+	                   cell_area->y + ypad + (height / 2),
+	                   is_expanded ? GTK_EXPANDER_EXPANDED : GTK_EXPANDER_COLLAPSED);
 
 	/* only draw the line if the color isn't set - this prevents a bug where the hline appears only under the expander */
 	g_object_get(cellexpander, "cell-background-set", &set, NULL);
-	if (cell->is_expanded && !set)
-		gtk_paint_hline (widget->style, window, state, NULL, widget, NULL, 0,
-				 widget->allocation.width, cell_area->y + cell_area->height);
+	gtk_widget_get_allocation(widget, &allocation);
+
+	if (is_expanded && !set)
+		gtk_paint_hline(gtk_widget_get_style(widget), cr, state, widget, NULL, 0,
+		                allocation.width, cell_area->y + cell_area->height);
 }
 
 static gboolean pidgin_cell_renderer_expander_activate(GtkCellRenderer *r,
 						     GdkEvent *event,
 						     GtkWidget *widget,
 						     const gchar *p,
-						     GdkRectangle *bg,
-						     GdkRectangle *cell,
+						     const GdkRectangle *bg,
+						     const GdkRectangle *cell,
 						     GtkCellRendererState flags)
 {
 	GtkTreePath *path = gtk_tree_path_new_from_string(p);
============================================================
--- pidgin/gtkscrollbook.c	5afe519462e2fbba27e2f5a8b7104e883f426969
+++ pidgin/gtkscrollbook.c	5a3cc32cf0705e877341c391face8c70daf96bce
@@ -102,7 +102,7 @@ refresh_scroll_box(PidginScrollBook *scr
 
 	gtk_widget_show_all(GTK_WIDGET(scroll_book));
 	if (count < 1)
-		gtk_widget_hide_all(scroll_book->hbox);
+		gtk_widget_hide(scroll_book->hbox);
 	else {
 		gtk_widget_show_all(scroll_book->hbox);
 		if (count == 1) {
@@ -160,7 +160,7 @@ pidgin_scroll_book_add(GtkContainer *con
 	PidginScrollBook *scroll_book;
 
 	g_return_if_fail(GTK_IS_WIDGET (widget));
-	g_return_if_fail (widget->parent == NULL);
+	g_return_if_fail(gtk_widget_get_parent(widget) == NULL);
 
 	scroll_book = PIDGIN_SCROLL_BOOK(container);
 	scroll_book->children = g_list_append(scroll_book->children, widget);
============================================================
--- pidgin/plugins/convcolors.c	84887a693f1ec780fd026113f3beb9f727cef0db
+++ pidgin/plugins/convcolors.c	c3c535ee3b7908a28e05e0c75c54e27784e3b855
@@ -302,7 +302,7 @@ static void
 }
 
 static void
-disconnect_prefs_callbacks(GtkObject *object, gpointer data)
+disconnect_prefs_callbacks(GtkAdjustment *object, gpointer data)
 {
 	PurplePlugin *plugin = (PurplePlugin *)data;
 
@@ -383,7 +383,7 @@ get_config_frame(PurplePlugin *plugin)
 		purple_prefs_connect_callback(plugin, tmp2, enable_toggled, button);
 	}
 
-	g_signal_connect(GTK_OBJECT(ret), "destroy", G_CALLBACK(disconnect_prefs_callbacks), plugin);
+	g_signal_connect(G_OBJECT(ret), "destroy", G_CALLBACK(disconnect_prefs_callbacks), plugin);
 	frame = pidgin_make_frame(ret, _("General"));
 	pidgin_prefs_checkbox(_("Ignore incoming format"), PREF_IGNORE, frame);
 	pidgin_prefs_checkbox(_("Apply in Chats"), PREF_CHATS, frame);
============================================================
--- pidgin/gtksourceundomanager.c	007f324b0f92d080085778fde3be45fc8abb5233
+++ pidgin/gtksourceundomanager.c	7227946cb8405ebffce9d11eb0175a5c5b5be91d
@@ -532,7 +532,8 @@ gtk_source_undo_manager_undo (GtkSourceU
 					um->priv->document,
 					undo_action->action.insert_anchor.pos,
 					undo_action->action.insert_anchor.pos + 1);
-				undo_action->action.insert_anchor.anchor->segment = NULL; /* XXX: This may be a bug in GTK+ */
+				/* TODO: is this needed in GTK+3? */
+				/*gtk_text_child_anchor_set_segment(undo_action->action.insert_anchor.anchor, NULL); XXX: This may be a bug in GTK+ */
 				break;
 			default:
 				/* Unknown action type. */
============================================================
--- pidgin/minidialog.c	25df03b2f3f0c96122312096e55480391960a750
+++ pidgin/minidialog.c	d2a1cb82d9f84ed1b346e10a2e634061d27f8712
@@ -184,7 +184,7 @@ pidgin_mini_dialog_get_num_children(Pidg
 guint
 pidgin_mini_dialog_get_num_children(PidginMiniDialog *mini_dialog)
 {
-	return g_list_length(mini_dialog->contents->children);
+	return g_list_length(gtk_container_get_children(GTK_CONTAINER(mini_dialog->contents)));
 }
 
 static gboolean
============================================================
--- pidgin/pidgintooltip.c	72c61132854e8efb3f1d0c9327d128649941d258
+++ pidgin/pidgintooltip.c	181fc572e4abbc04b2105ab4ef547487632ae19c
@@ -101,11 +101,16 @@ static gboolean
 }
 
 static gboolean
-pidgin_tooltip_expose_event(GtkWidget *widget, GdkEventExpose *event, gpointer data)
+pidgin_tooltip_draw_cb(GtkWidget *widget, cairo_t *cr, gpointer data)
 {
+	GtkAllocation allocation;
+
+	gtk_widget_get_allocation(widget, &allocation);
+
 	if (pidgin_tooltip.paint_tooltip) {
-		gtk_paint_flat_box(widget->style, widget->window, GTK_STATE_NORMAL, GTK_SHADOW_OUT,
-				NULL, widget, "tooltip", 0, 0, -1, -1);
+		gtk_paint_flat_box(gtk_widget_get_style(widget), cr,
+			GTK_STATE_NORMAL, GTK_SHADOW_OUT,
+			widget, "tooltip", 0, 0, allocation.width, allocation.height);
 		pidgin_tooltip.paint_tooltip(widget, data);
 	}
 	return FALSE;
@@ -189,8 +194,8 @@ setup_tooltip_window_position(gpointer d
 	gtk_window_move(GTK_WINDOW(tipwindow), x, y);
 	gtk_widget_show(tipwindow);
 
-	g_signal_connect(G_OBJECT(tipwindow), "expose_event",
-			G_CALLBACK(pidgin_tooltip_expose_event), data);
+	g_signal_connect(G_OBJECT(tipwindow), "draw",
+			G_CALLBACK(pidgin_tooltip_draw_cb), data);
 
 	/* Hide the tooltip when the widget is destroyed */
 	sig = g_signal_connect(G_OBJECT(pidgin_tooltip.widget), "destroy", G_CALLBACK(pidgin_tooltip_destroy), NULL);
============================================================
--- pidgin/gtkblist-theme-loader.c	998de9eccacaf35c081669f51313bbec33ee37f2
+++ pidgin/gtkblist-theme-loader.c	58068bd2686e41622faca16bfb663e16f9231162
@@ -65,7 +65,8 @@ parse_color(xmlnode *node, const char *t
 	GdkColor color;
 
 	if (temp && gdk_color_parse(temp, &color)) {
-		gdk_colormap_alloc_color(gdk_colormap_get_system(), &color, FALSE, TRUE);
+		/* TODO: fix this for GTK+ 3.0 */
+		/*gdk_colormap_alloc_color(gdk_colormap_get_system(), &color, FALSE, TRUE);*/
 		return gdk_color_copy(&color);
 	} else {
 		return NULL;
============================================================
--- pidgin/plugins/themeedit.c	2f0d0e9408ea58753ccf682fd30ba01b4391b45d
+++ pidgin/plugins/themeedit.c	ac145969c9e7a0b2e0f2aa36c0ae16d657ff2df4
@@ -306,9 +306,6 @@ pidgin_blist_theme_edit(PurplePluginActi
 		}
 	}
 
-#if !GTK_CHECK_VERSION(2,22,0)
-	gtk_dialog_set_has_separator(GTK_DIALOG(dialog), TRUE);
-#endif
 #ifdef NOT_SADRUL
 	pidgin_dialog_add_button(GTK_DIALOG(dialog), GTK_STOCK_SAVE, G_CALLBACK(save_blist_theme), dialog);
 #endif


More information about the Commits mailing list