]> git.0d.be Git - empathy.git/commitdiff
[darcs-to-svn @ Fix icon size]
authorXavier Claessens <xclaesse@src.gnome.org>
Thu, 10 May 2007 18:12:36 +0000 (18:12 +0000)
committerXavier Claessens <xclaesse@src.gnome.org>
Thu, 10 May 2007 18:12:36 +0000 (18:12 +0000)
svn path=/trunk/; revision=46

libempathy-gtk/empathy-main-window.c
libempathy-gtk/gossip-profile-chooser.c
libempathy-gtk/gossip-ui-utils.c

index 531d311e650f211ac24842e83ba99f36d6a6ce6b..f19a868866f3a5972d365c8eb66e3645ff83279d 100644 (file)
@@ -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,
index 96c072c9ece08f0aaedd5f7dd75532b21e855745..b5500289600370ee18768de43daf06f2ad7e03f5 100644 (file)
@@ -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,
index 9bf2fb36d305393d0f10f3f38eefc7d5e3841863..cf12a51bb00e867427e0e7abbd10bab71a5fc3fb 100644 (file)
@@ -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) {