From 104362fe34c3881f6956844de2a0403f0ea1b3d0 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Thu, 10 May 2007 18:12:36 +0000 Subject: [PATCH] [darcs-to-svn @ Fix icon size] svn path=/trunk/; revision=46 --- libempathy-gtk/empathy-main-window.c | 1 + libempathy-gtk/gossip-profile-chooser.c | 2 ++ libempathy-gtk/gossip-ui-utils.c | 8 +++++++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/libempathy-gtk/empathy-main-window.c b/libempathy-gtk/empathy-main-window.c index 531d311e..f19a8688 100644 --- a/libempathy-gtk/empathy-main-window.c +++ b/libempathy-gtk/empathy-main-window.c @@ -529,6 +529,7 @@ main_window_throbber_button_press_event_cb (GtkWidget *throbber_ebox, return FALSE; } + #if 0 static void main_window_session_protocol_connecting_cb (GossipSession *session, diff --git a/libempathy-gtk/gossip-profile-chooser.c b/libempathy-gtk/gossip-profile-chooser.c index 96c072c9..b5500289 100644 --- a/libempathy-gtk/gossip-profile-chooser.c +++ b/libempathy-gtk/gossip-profile-chooser.c @@ -75,6 +75,8 @@ gossip_profile_chooser_new (void) gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combo_box), renderer, "icon-name", COL_ICON, NULL); + g_object_set (renderer, "stock-size", GTK_ICON_SIZE_BUTTON, NULL); + renderer = gtk_cell_renderer_text_new (); gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo_box), renderer, TRUE); gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combo_box), renderer, diff --git a/libempathy-gtk/gossip-ui-utils.c b/libempathy-gtk/gossip-ui-utils.c index 9bf2fb36..cf12a51b 100644 --- a/libempathy-gtk/gossip-ui-utils.c +++ b/libempathy-gtk/gossip-ui-utils.c @@ -208,12 +208,18 @@ gossip_pixbuf_from_icon_name (const gchar *icon_name, GtkIconTheme *theme; GdkPixbuf *pixbuf = NULL; GError *error = NULL; + gint w, h; + gint size = 48; theme = gtk_icon_theme_get_default (); + if (gtk_icon_size_lookup (icon_size, &w, &h)) { + size = (w + h) / 2; + } + pixbuf = gtk_icon_theme_load_icon (theme, icon_name, - icon_size, + size, 0, &error); if (error) { -- 2.39.2