pidgin: c8528fe7: Use g_object_ref/unref instead of the de..
qulogic at pidgin.im
qulogic at pidgin.im
Sat Apr 18 23:36:05 EDT 2009
-----------------------------------------------------------------
Revision: c8528fe7f2a21bd2071ce51b1e739e5110e7613b
Ancestor: ab9aaff4c39d9ec3f6cf0b01db8823028b3ef453
Author: qulogic at pidgin.im
Date: 2009-04-18T07:31:32
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/c8528fe7f2a21bd2071ce51b1e739e5110e7613b
Modified files:
pidgin/gtkaccount.c pidgin/gtkdialogs.c pidgin/gtkprefs.c
pidgin/gtksmiley.c pidgin/gtkstatusbox.c pidgin/gtkutils.c
pidgin/gtkwhiteboard.c pidgin/plugins/markerline.c
ChangeLog:
Use g_object_ref/unref instead of the deprecated versions.
-------------- next part --------------
============================================================
--- pidgin/gtkaccount.c 95331953b6a904be100c80ef2a59f795690c0ace
+++ pidgin/gtkaccount.c f7bb182fa4fd2fb71894e9c2580c2ea1e64e84ae
@@ -413,7 +413,11 @@ add_login_options(AccountPrefsDialog *di
if (dialog->protocol_menu != NULL)
{
+#if GTK_CHECK_VERSION(2,12,0)
+ g_object_ref(G_OBJECT(dialog->protocol_menu));
+#else
gtk_widget_ref(dialog->protocol_menu);
+#endif
hbox = g_object_get_data(G_OBJECT(dialog->protocol_menu), "container");
gtk_container_remove(GTK_CONTAINER(hbox), dialog->protocol_menu);
}
@@ -440,13 +444,21 @@ add_login_options(AccountPrefsDialog *di
{
dialog->protocol_menu = pidgin_protocol_option_menu_new(
dialog->protocol_id, G_CALLBACK(set_account_protocol_cb), dialog);
+#if GTK_CHECK_VERSION(2,12,0)
+ g_object_ref(G_OBJECT(dialog->protocol_menu));
+#else
gtk_widget_ref(dialog->protocol_menu);
+#endif
}
hbox = add_pref_box(dialog, vbox, _("Pro_tocol:"), dialog->protocol_menu);
g_object_set_data(G_OBJECT(dialog->protocol_menu), "container", hbox);
+#if GTK_CHECK_VERSION(2,12,0)
+ g_object_unref(G_OBJECT(dialog->protocol_menu));
+#else
gtk_widget_unref(dialog->protocol_menu);
+#endif
/* Username */
dialog->username_entry = gtk_entry_new();
============================================================
--- pidgin/gtkdialogs.c 2806dfc13904533a454f57e63d49f018d70bb63a
+++ pidgin/gtkdialogs.c d07bc7b0c271d78986f4e7185d354361ae282d20
@@ -427,7 +427,7 @@ void pidgin_dialogs_about()
#endif
gtk_widget_destroy(logo);
logo = gtk_image_new_from_pixbuf(pixbuf);
- gdk_pixbuf_unref(pixbuf);
+ g_object_unref(G_OBJECT(pixbuf));
/* Insert the logo */
obj = gtk_widget_get_accessible(logo);
tmp = g_strconcat(PIDGIN_NAME, " " DISPLAY_VERSION, NULL);
============================================================
--- pidgin/gtkprefs.c a87a7f8295af6d8ab1e2689c9d9b019183b89744
+++ pidgin/gtkprefs.c 27661179b510c5ecc8ac0940c4dd68d48b14a949
@@ -638,7 +638,7 @@ prefs_themes_sort(PurpleTheme *theme)
gtk_list_store_set(prefs_sound_themes, &iter, 0, pixbuf, 2, purple_theme_get_name(theme), -1);
if (pixbuf != NULL)
- gdk_pixbuf_unref(pixbuf);
+ g_object_unref(G_OBJECT(pixbuf));
} else if (PIDGIN_IS_BLIST_THEME(theme) || PIDGIN_IS_STATUS_ICON_THEME(theme)){
GtkListStore *store;
@@ -665,7 +665,7 @@ prefs_themes_sort(PurpleTheme *theme)
g_free(markup);
if (pixbuf != NULL)
- gdk_pixbuf_unref(pixbuf);
+ g_object_unref(G_OBJECT(pixbuf));
}
}
============================================================
--- pidgin/gtksmiley.c c6ac35c207e6d700e52e3394d5764f98e2509781
+++ pidgin/gtksmiley.c 1d1f35e1fe51ce174c286653f95e5964c589068a
@@ -74,7 +74,7 @@ pidgin_smiley_destroy(PidginSmiley *smil
gtk_widget_destroy(smiley->parent);
g_free(smiley->filename);
if (smiley->custom_pixbuf)
- gdk_pixbuf_unref(smiley->custom_pixbuf);
+ g_object_unref(G_OBJECT(smiley->custom_pixbuf));
g_free(smiley);
}
@@ -460,7 +460,7 @@ pidgin_smiley_editor_set_image(PidginSmi
{
if (editor->custom_pixbuf)
gdk_pixbuf_unref(editor->custom_pixbuf);
- editor->custom_pixbuf = image ? gdk_pixbuf_ref(image) : NULL;
+ editor->custom_pixbuf = image ? g_object_ref(G_OBJECT(image)) : NULL;
if (image)
gtk_image_set_from_pixbuf(GTK_IMAGE(editor->smiley_image), image);
}
============================================================
--- pidgin/gtkstatusbox.c 93a31b2a51ea84302d9017bdfffb43ff53d48201
+++ pidgin/gtkstatusbox.c 07626a5d2f503fc08778a9f418918950c2e982f2
@@ -536,12 +536,12 @@ pidgin_status_box_finalize(GObject *obj)
for (i = 0; i < G_N_ELEMENTS(statusbox->connecting_pixbufs); i++) {
if (statusbox->connecting_pixbufs[i] != NULL)
- gdk_pixbuf_unref(statusbox->connecting_pixbufs[i]);
+ g_object_unref(G_OBJECT(statusbox->connecting_pixbufs[i]));
}
for (i = 0; i < G_N_ELEMENTS(statusbox->typing_pixbufs); i++) {
if (statusbox->typing_pixbufs[i] != NULL)
- gdk_pixbuf_unref(statusbox->typing_pixbufs[i]);
+ g_object_unref(G_OBJECT(statusbox->typing_pixbufs[i]));
}
g_object_unref(G_OBJECT(statusbox->store));
============================================================
--- pidgin/gtkutils.c f818ac92f5362cf71c9f0699829bb094ef1be6d3
+++ pidgin/gtkutils.c a47cc453ac3d04c1bc2c30730beed265218301c2
@@ -1627,7 +1627,7 @@ pidgin_dnd_file_manage(GtkSelectionData
_("Set as buddy icon"), DND_BUDDY_ICON,
(ft ? _("Send image file") : _("Insert in message")), (ft ? DND_FILE_TRANSFER : DND_IM_IMAGE),
NULL);
- gdk_pixbuf_unref(pb);
+ g_object_unref(G_OBJECT(pb));
return;
}
============================================================
--- pidgin/gtkwhiteboard.c 42cd1c6e7911fad5a66c97a71879d08a697c80cc
+++ pidgin/gtkwhiteboard.c f5f877b1898b292703bb45f6ee1a8dfaec8b648a
@@ -624,7 +624,7 @@ static void pidgin_whiteboard_draw_brush
update_rect.x, update_rect.y,
update_rect.width, update_rect.height);
- gdk_gc_unref(gfx_con);
+ g_object_unref(G_OBJECT(gfx_con));
}
/* Uses Bresenham's algorithm (as provided by Wikipedia) */
============================================================
--- pidgin/plugins/markerline.c 4bf68e140290aefb627912693a766e668d12b856
+++ pidgin/plugins/markerline.c 0a283ea65f5ace9944d9a6a1b7091350404f99a1
@@ -84,7 +84,7 @@ imhtml_expose_cb(GtkWidget *widget, GdkE
gdk_gc_set_rgb_fg_color(gc, &red);
gdk_draw_line(event->window, gc,
0, y, visible_rect.width, y);
- gdk_gc_unref(gc);
+ g_object_unref(G_OBJECT(gc));
}
return FALSE;
}
More information about the Commits
mailing list