[brasero] brasero-project-type-chooser: fix icons on buttons for 'Recent projects'



commit 2eb68c9855e202899a3ab71d14d884c80c57b38a
Author: Joshua Lock <joshua lock intel com>
Date:   Mon Aug 12 16:36:38 2013 +0100

    brasero-project-type-chooser: fix icons on buttons for 'Recent projects'
    
    The call to gtk_recent_info_get_icon() causes a segfault as a member of the
    GtkIconSize enum is no longer a valid size parameter for this function
    following a recent round of deprecations.
    
    Instead use gtk_recent_info_get_gicon () and create the GtkImage from the
    GIcon with the desired size.

 src/brasero-project-type-chooser.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/brasero-project-type-chooser.c b/src/brasero-project-type-chooser.c
index 3707be7..fb6ff4a 100644
--- a/src/brasero-project-type-chooser.c
+++ b/src/brasero-project-type-chooser.c
@@ -316,7 +316,7 @@ brasero_project_type_chooser_build_recent (BraseroProjectTypeChooser *self,
                GtkRecentInfo *info;
                GList *child_iter;
                const gchar *name;
-               GdkPixbuf *pixbuf;
+               GIcon *icon;
                GtkWidget *image;
                const gchar *uri;
                GtkWidget *child;
@@ -328,9 +328,9 @@ brasero_project_type_chooser_build_recent (BraseroProjectTypeChooser *self,
 
                tooltip = gtk_recent_info_get_uri_display (info);
 
-               pixbuf = gtk_recent_info_get_icon (info, GTK_ICON_SIZE_BUTTON);
-               image = gtk_image_new_from_pixbuf (pixbuf);
-               g_object_unref (pixbuf);
+               icon = gtk_recent_info_get_gicon (info);
+               image = gtk_image_new_from_gicon (icon, GTK_ICON_SIZE_BUTTON);
+               g_object_unref (icon);
                gtk_size_group_add_widget (image_group, image);
 
                gtk_widget_show (image);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]