/soc/2015/mmcc/main: 0aa9eba6fe28: switch from the deprecated gt...
Michael McConville
mmcconville at mykolab.com
Tue Jul 7 22:41:09 EDT 2015
Changeset: 0aa9eba6fe2858743b8aee23c9894c4ed46f20a6
Author: Michael McConville <mmcconville at mykolab.com>
Date: 2015-07-07 22:41 -0400
Branch: default
URL: https://hg.pidgin.im/soc/2015/mmcc/main/rev/0aa9eba6fe28
Description:
switch from the deprecated gtk_widget_render_icon() to the less-deprecated gtk_widget_render_icon_pixbuf()
diffstat:
pidgin/gtkaccount.c | 4 ++--
pidgin/gtkblist.c | 8 ++++----
pidgin/gtkconv.c | 18 +++++++++---------
pidgin/gtklog.c | 4 ++--
pidgin/gtkmedia.c | 8 ++++----
pidgin/gtknotify.c | 4 ++--
pidgin/gtksmiley-manager.c | 5 ++---
pidgin/gtkstatusbox.c | 12 ++++++------
pidgin/gtkutils.c | 4 ++--
pidgin/gtkxfer.c | 16 ++++++++--------
pidgin/win32/gtkdocklet-win32.c | 4 ++--
11 files changed, 43 insertions(+), 44 deletions(-)
diffs (259 lines):
diff --git a/pidgin/gtkaccount.c b/pidgin/gtkaccount.c
--- a/pidgin/gtkaccount.c
+++ b/pidgin/gtkaccount.c
@@ -218,8 +218,8 @@ set_dialog_icon(AccountPrefsDialog *dial
{
/* Show a placeholder icon */
GtkIconSize icon_size = gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_SMALL);
- pixbuf = gtk_widget_render_icon(dialog->window, PIDGIN_STOCK_TOOLBAR_SELECT_AVATAR,
- icon_size, "PidginAccount");
+ pixbuf = gtk_widget_render_icon_pixbuf(dialog->window, PIDGIN_STOCK_TOOLBAR_SELECT_AVATAR,
+ icon_size);
}
gtk_image_set_from_pixbuf(GTK_IMAGE(dialog->icon_entry), pixbuf);
diff --git a/pidgin/gtkblist.c b/pidgin/gtkblist.c
--- a/pidgin/gtkblist.c
+++ b/pidgin/gtkblist.c
@@ -4192,8 +4192,8 @@ pidgin_blist_get_status_icon(PurpleBlist
if (gtkconv == NULL && size == PIDGIN_STATUS_ICON_SMALL) {
PidginBlistNode *ui = purple_blist_node_get_ui_data(&(buddy->node));
if (ui == NULL || (ui->conv.flags & PIDGIN_BLIST_NODE_HAS_PENDING_MESSAGE))
- return gtk_widget_render_icon (GTK_WIDGET(gtkblist->treeview),
- PIDGIN_STOCK_STATUS_MESSAGE, icon_size, "GtkTreeView");
+ return gtk_widget_render_icon_pixbuf(GTK_WIDGET(gtkblist->treeview),
+ PIDGIN_STOCK_STATUS_MESSAGE, icon_size);
}
}
@@ -4233,8 +4233,8 @@ pidgin_blist_get_status_icon(PurpleBlist
icon = PIDGIN_STOCK_STATUS_PERSON;
}
- ret = gtk_widget_render_icon (GTK_WIDGET(gtkblist->treeview), icon,
- icon_size, "GtkTreeView");
+ ret = gtk_widget_render_icon_pixbuf(GTK_WIDGET(gtkblist->treeview), icon,
+ icon_size);
return ret;
}
diff --git a/pidgin/gtkconv.c b/pidgin/gtkconv.c
--- a/pidgin/gtkconv.c
+++ b/pidgin/gtkconv.c
@@ -2595,7 +2595,7 @@ pidgin_conv_get_icon(PurpleConversation
stock = pidgin_conv_get_icon_stock(conv);
size = gtk_icon_size_from_name(icon_size);
- status = gtk_widget_render_icon (parent, stock, size, "GtkWidget");
+ status = gtk_widget_render_icon_pixbuf(parent, stock, size);
return status;
}
@@ -9939,17 +9939,17 @@ make_status_icon_list(const char *stock,
{
GList *l = NULL;
l = g_list_append(l,
- gtk_widget_render_icon(w, stock,
- gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_EXTRA_SMALL), "GtkWindow"));
+ gtk_widget_render_icon_pixbuf(w, stock,
+ gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_EXTRA_SMALL)));
l = g_list_append(l,
- gtk_widget_render_icon(w, stock,
- gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_SMALL), "GtkWindow"));
+ gtk_widget_render_icon_pixbuf(w, stock,
+ gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_SMALL)));
l = g_list_append(l,
- gtk_widget_render_icon(w, stock,
- gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_MEDIUM), "GtkWindow"));
+ gtk_widget_render_icon_pixbuf(w, stock,
+ gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_MEDIUM)));
l = g_list_append(l,
- gtk_widget_render_icon(w, stock,
- gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_LARGE), "GtkWindow"));
+ gtk_widget_render_icon_pixbuf(w, stock,
+ gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_LARGE)));
return l;
}
diff --git a/pidgin/gtklog.c b/pidgin/gtklog.c
--- a/pidgin/gtklog.c
+++ b/pidgin/gtklog.c
@@ -775,8 +775,8 @@ void pidgin_log_show_contact(PurpleConta
logs = g_list_sort(logs, purple_log_compare);
image = gtk_image_new();
- pixbuf = gtk_widget_render_icon(image, PIDGIN_STOCK_STATUS_PERSON,
- gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_SMALL), "GtkWindow");
+ pixbuf = gtk_widget_render_icon_pixbuf(image, PIDGIN_STOCK_STATUS_PERSON,
+ gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_SMALL));
if (pixbuf) {
gtk_image_set_from_pixbuf(GTK_IMAGE(image), pixbuf);
g_object_unref(pixbuf);
diff --git a/pidgin/gtkmedia.c b/pidgin/gtkmedia.c
--- a/pidgin/gtkmedia.c
+++ b/pidgin/gtkmedia.c
@@ -1032,13 +1032,13 @@ pidgin_media_ready_cb(PurpleMedia *media
/* set the window icon according to the type */
if (type & PURPLE_MEDIA_VIDEO) {
- icon = gtk_widget_render_icon(GTK_WIDGET(gtkmedia),
+ icon = gtk_widget_render_icon_pixbuf(GTK_WIDGET(gtkmedia),
PIDGIN_STOCK_TOOLBAR_VIDEO_CALL,
- gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_LARGE), NULL);
+ gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_LARGE));
} else if (type & PURPLE_MEDIA_AUDIO) {
- icon = gtk_widget_render_icon(GTK_WIDGET(gtkmedia),
+ icon = gtk_widget_render_icon_pixbuf(GTK_WIDGET(gtkmedia),
PIDGIN_STOCK_TOOLBAR_AUDIO_CALL,
- gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_LARGE), NULL);
+ gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_LARGE));
}
if (icon) {
diff --git a/pidgin/gtknotify.c b/pidgin/gtknotify.c
--- a/pidgin/gtknotify.c
+++ b/pidgin/gtknotify.c
@@ -841,8 +841,8 @@ pidgin_notify_emails(PurpleConnection *g
}
if (!gtk_widget_get_visible(mail_dialog->dialog)) {
- GdkPixbuf *pixbuf = gtk_widget_render_icon(mail_dialog->dialog, PIDGIN_STOCK_DIALOG_MAIL,
- gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_EXTRA_SMALL), NULL);
+ GdkPixbuf *pixbuf = gtk_widget_render_icon_pixbuf(mail_dialog->dialog, PIDGIN_STOCK_DIALOG_MAIL,
+ gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_EXTRA_SMALL));
char *label_text = g_strdup_printf(ngettext("<b>%d new email.</b>",
"<b>%d new emails.</b>",
mail_dialog->total_count), mail_dialog->total_count);
diff --git a/pidgin/gtksmiley-manager.c b/pidgin/gtksmiley-manager.c
--- a/pidgin/gtksmiley-manager.c
+++ b/pidgin/gtksmiley-manager.c
@@ -105,9 +105,8 @@ edit_dialog_image_update_thumb(SmileyEdi
if (!pixbuf) {
GtkIconSize icon_size =
gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_SMALL);
- pixbuf = gtk_widget_render_icon(GTK_WIDGET(edit_dialog->window),
- PIDGIN_STOCK_TOOLBAR_SELECT_AVATAR, icon_size,
- "PidginSmileyManager");
+ pixbuf = gtk_widget_render_icon_pixbuf(GTK_WIDGET(edit_dialog->window),
+ PIDGIN_STOCK_TOOLBAR_SELECT_AVATAR, icon_size);
}
g_return_if_fail(pixbuf != NULL);
diff --git a/pidgin/gtkstatusbox.c b/pidgin/gtkstatusbox.c
--- a/pidgin/gtkstatusbox.c
+++ b/pidgin/gtkstatusbox.c
@@ -1149,8 +1149,8 @@ cache_pixbufs(PidginStatusBox *status_bo
if (status_box->connecting_pixbufs[i] != NULL)
g_object_unref(G_OBJECT(status_box->connecting_pixbufs[i]));
if (connecting_stock_ids[i])
- status_box->connecting_pixbufs[i] = gtk_widget_render_icon (GTK_WIDGET(status_box->vbox),
- connecting_stock_ids[i], icon_size, "PidginStatusBox");
+ status_box->connecting_pixbufs[i] = gtk_widget_render_icon_pixbuf(GTK_WIDGET(status_box->vbox),
+ connecting_stock_ids[i], icon_size);
else
status_box->connecting_pixbufs[i] = NULL;
}
@@ -1161,8 +1161,8 @@ cache_pixbufs(PidginStatusBox *status_bo
if (status_box->typing_pixbufs[i] != NULL)
g_object_unref(G_OBJECT(status_box->typing_pixbufs[i]));
if (typing_stock_ids[i])
- status_box->typing_pixbufs[i] = gtk_widget_render_icon (GTK_WIDGET(status_box->vbox),
- typing_stock_ids[i], icon_size, "PidginStatusBox");
+ status_box->typing_pixbufs[i] = gtk_widget_render_icon_pixbuf(GTK_WIDGET(status_box->vbox),
+ typing_stock_ids[i], icon_size);
else
status_box->typing_pixbufs[i] = NULL;
}
@@ -2230,9 +2230,9 @@ pidgin_status_box_redisplay_buddy_icon(P
{
/* Show a placeholder icon */
GtkIconSize icon_size = gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_SMALL);
- status_box->buddy_icon = gtk_widget_render_icon(GTK_WIDGET(status_box),
+ status_box->buddy_icon = gtk_widget_render_icon_pixbuf(GTK_WIDGET(status_box),
PIDGIN_STOCK_TOOLBAR_SELECT_AVATAR,
- icon_size, "PidginStatusBox");
+ icon_size);
}
if (status_box->buddy_icon != NULL) {
diff --git a/pidgin/gtkutils.c b/pidgin/gtkutils.c
--- a/pidgin/gtkutils.c
+++ b/pidgin/gtkutils.c
@@ -1640,8 +1640,8 @@ GdkPixbuf * pidgin_create_status_icon(Pu
GdkPixbuf *pixbuf = NULL;
const char *stock = pidgin_stock_id_from_status_primitive(prim);
- pixbuf = gtk_widget_render_icon (w, stock ? stock : PIDGIN_STOCK_STATUS_AVAILABLE,
- icon_size, "GtkWidget");
+ pixbuf = gtk_widget_render_icon_pixbuf(w, stock ? stock : PIDGIN_STOCK_STATUS_AVAILABLE,
+ icon_size);
return pixbuf;
}
diff --git a/pidgin/gtkxfer.c b/pidgin/gtkxfer.c
--- a/pidgin/gtkxfer.c
+++ b/pidgin/gtkxfer.c
@@ -259,9 +259,9 @@ update_detailed_info(PidginXferDialog *d
GdkPixbuf *pixbuf = NULL;
- pixbuf = gtk_widget_render_icon(xfer_dialog->window,
+ pixbuf = gtk_widget_render_icon_pixbuf(xfer_dialog->window,
PIDGIN_STOCK_FILE_DONE,
- GTK_ICON_SIZE_MENU, NULL);
+ GTK_ICON_SIZE_MENU);
gtk_list_store_set(GTK_LIST_STORE(xfer_dialog->model), &data->iter,
COLUMN_STATUS, pixbuf,
@@ -873,11 +873,11 @@ pidgin_xfer_dialog_add_xfer(PidginXferDi
size_str = purple_str_size_to_units(purple_xfer_get_size(xfer));
remaining_str = purple_str_size_to_units(purple_xfer_get_bytes_remaining(xfer));
- pixbuf = gtk_widget_render_icon(dialog->window,
+ pixbuf = gtk_widget_render_icon_pixbuf(dialog->window,
(type == PURPLE_XFER_TYPE_RECEIVE
? PIDGIN_STOCK_DOWNLOAD
: PIDGIN_STOCK_UPLOAD),
- GTK_ICON_SIZE_MENU, NULL);
+ GTK_ICON_SIZE_MENU);
gtk_list_store_append(dialog->model, &data->iter);
lfilename = g_path_get_basename(purple_xfer_get_local_filename(xfer));
@@ -967,9 +967,9 @@ pidgin_xfer_dialog_cancel_xfer(PidginXfe
update_detailed_info(dialog, xfer);
update_title_progress(dialog);
- pixbuf = gtk_widget_render_icon(dialog->window,
+ pixbuf = gtk_widget_render_icon_pixbuf(dialog->window,
PIDGIN_STOCK_FILE_CANCELLED,
- GTK_ICON_SIZE_MENU, NULL);
+ GTK_ICON_SIZE_MENU);
if (purple_xfer_is_cancelled(xfer))
status = _("Cancelled");
@@ -1030,9 +1030,9 @@ pidgin_xfer_dialog_update_xfer(PidginXfe
{
GdkPixbuf *pixbuf;
- pixbuf = gtk_widget_render_icon(dialog->window,
+ pixbuf = gtk_widget_render_icon_pixbuf(dialog->window,
PIDGIN_STOCK_FILE_DONE,
- GTK_ICON_SIZE_MENU, NULL);
+ GTK_ICON_SIZE_MENU);
gtk_list_store_set(GTK_LIST_STORE(xfer_dialog->model), &data->iter,
COLUMN_STATUS, pixbuf,
diff --git a/pidgin/win32/gtkdocklet-win32.c b/pidgin/win32/gtkdocklet-win32.c
--- a/pidgin/win32/gtkdocklet-win32.c
+++ b/pidgin/win32/gtkdocklet-win32.c
@@ -474,8 +474,8 @@ pixbuf_to_hicon (GdkPixbuf *pixbuf)
static HICON load_hicon_from_stock(const char *stock) {
HICON hicon = NULL;
- GdkPixbuf *pixbuf = gtk_widget_render_icon(image, stock,
- gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_EXTRA_SMALL), NULL);
+ GdkPixbuf *pixbuf = gtk_widget_render_icon_pixbuf(image, stock,
+ gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_EXTRA_SMALL));
if (pixbuf) {
hicon = pixbuf_to_hicon(pixbuf);
More information about the Commits
mailing list