Mercurial > pidgin.yaz
changeset 8748:13d592f485d1
[gaim-migrate @ 9503]
The window icon for conversation windows is no longer 15x15. This prevents
the icon from being scaled up and appearing ugly in window lists, alt-tab
dialogs, etc.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Wed, 21 Apr 2004 23:40:39 +0000 |
parents | 4711e12ee1f9 |
children | d7b8eb1f0a18 |
files | src/gtkconv.c |
diffstat | 1 files changed, 18 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/src/gtkconv.c Wed Apr 21 23:10:50 2004 +0000 +++ b/src/gtkconv.c Wed Apr 21 23:40:39 2004 +0000 @@ -1995,7 +1995,7 @@ * A bunch of buddy icon functions **************************************************************************/ static GdkPixbuf * -get_tab_icon(GaimConversation *conv) +get_tab_icon(GaimConversation *conv, gboolean small) { GaimAccount *account = gaim_conversation_get_account(conv); const char *name = gaim_conversation_get_name(conv); @@ -2005,7 +2005,7 @@ GaimBuddy *b = gaim_find_buddy(account, name); if (b != NULL) { status = gaim_gtk_blist_get_status_icon((GaimBlistNode*)b, - GAIM_STATUS_ICON_SMALL); + (small ? GAIM_STATUS_ICON_SMALL : GAIM_STATUS_ICON_LARGE)); } } @@ -2013,11 +2013,14 @@ GdkPixbuf *pixbuf; pixbuf = create_prpl_icon(account); - if (pixbuf) { + if (small && pixbuf != NULL) + { status = gdk_pixbuf_scale_simple(pixbuf, 15, 15, GDK_INTERP_BILINEAR); g_object_unref(pixbuf); } + else + status = pixbuf; } return status; } @@ -2035,17 +2038,24 @@ name = gaim_conversation_get_name(conv); account = gaim_conversation_get_account(conv); - status = get_tab_icon(conv); + status = get_tab_icon(conv, TRUE); gtk_image_set_from_pixbuf(GTK_IMAGE(gtkconv->icon), status); gtk_image_set_from_pixbuf(GTK_IMAGE(gtkconv->menu_icon), status); + if (status != NULL) + g_object_unref(status); + if (gaim_conv_window_get_active_conversation(win) == conv && gtkconv->u.im->anim == NULL) + { + status = get_tab_icon(conv, FALSE); + gtk_window_set_icon(GTK_WINDOW(GAIM_GTK_WINDOW(win)->window), status); - if(status) - g_object_unref(status); + if (status != NULL) + g_object_unref(status); + } } static gboolean @@ -2424,7 +2434,7 @@ } else if (gaim_conversation_get_type(conv) == GAIM_CONV_CHAT) { gtk_widget_set_sensitive(gtkconv->u.chat->invite, FALSE); } - + /* Then deal with menu items */ gtk_widget_set_sensitive(gtkwin->menu.view_log, TRUE); gtk_widget_set_sensitive(gtkwin->menu.add_pounce, TRUE); @@ -2449,7 +2459,7 @@ gdk_pixbuf_animation_get_static_image(gtkconv->u.im->anim); g_object_ref(window_icon); } else { - window_icon = get_tab_icon(conv); + window_icon = get_tab_icon(conv, FALSE); } gtk_window_set_icon(GTK_WINDOW(gtkwin->window), window_icon); g_object_unref(G_OBJECT(window_icon));