[frogr] fix generation of default icon list (#656519)
- From: Mario Sanchez Prada <msanchez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [frogr] fix generation of default icon list (#656519)
- Date: Sun, 14 Aug 2011 16:23:36 +0000 (UTC)
commit 6d3c95789ca16da19c184ea70634c7a8970df898
Author: Christophe Fergeau <teuf gnome org>
Date: Sun Aug 14 16:12:06 2011 +0200
fix generation of default icon list (#656519)
frogr_main_view_init builds a list of icon to pass
to gtk_window_set_default_icon_list. The generation of this list
is incorrectly done, resulting in a series of 1-element lists
being generated, leaking the previous list every time.
This commit fixes the list generation.
https://bugzilla.gnome.org/show_bug.cgi?id=656519
src/frogr-main-view.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/src/frogr-main-view.c b/src/frogr-main-view.c
index ec947e9..316802c 100644
--- a/src/frogr-main-view.c
+++ b/src/frogr-main-view.c
@@ -1491,7 +1491,7 @@ frogr_main_view_init (FrogrMainView *self)
GtkWidget *progress_label;
const gchar *icons_path;
gchar *full_path;
- GList *icons;
+ GList *icons = NULL;
#ifdef MAC_INTEGRATION
GtkOSXApplication *osx_app;
@@ -1510,27 +1510,27 @@ frogr_main_view_init (FrogrMainView *self)
/* Provide a default icon list in several sizes */
icons_path = frogr_util_get_icons_dir ();
full_path = g_strdup_printf ("%s/" MAIN_VIEW_ICON("128x128"), icons_path);
- icons = g_list_prepend (NULL, gdk_pixbuf_new_from_file (full_path, NULL));
+ icons = g_list_prepend (icons, gdk_pixbuf_new_from_file (full_path, NULL));
g_free (full_path);
full_path = g_strdup_printf ("%s/" MAIN_VIEW_ICON("64x64"), icons_path);
- icons = g_list_prepend (NULL, gdk_pixbuf_new_from_file (full_path, NULL));
+ icons = g_list_prepend (icons, gdk_pixbuf_new_from_file (full_path, NULL));
g_free (full_path);
full_path = g_strdup_printf ("%s/" MAIN_VIEW_ICON("48x48"), icons_path);
- icons = g_list_prepend (NULL, gdk_pixbuf_new_from_file (full_path, NULL));
+ icons = g_list_prepend (icons, gdk_pixbuf_new_from_file (full_path, NULL));
g_free (full_path);
full_path = g_strdup_printf ("%s/" MAIN_VIEW_ICON("32x32"), icons_path);
- icons = g_list_prepend (NULL, gdk_pixbuf_new_from_file (full_path, NULL));
+ icons = g_list_prepend (icons, gdk_pixbuf_new_from_file (full_path, NULL));
g_free (full_path);
full_path = g_strdup_printf ("%s/" MAIN_VIEW_ICON("24x24"), icons_path);
- icons = g_list_prepend (NULL, gdk_pixbuf_new_from_file (full_path, NULL));
+ icons = g_list_prepend (icons, gdk_pixbuf_new_from_file (full_path, NULL));
g_free (full_path);
full_path = g_strdup_printf ("%s/" MAIN_VIEW_ICON("16x16"), icons_path);
- icons = g_list_prepend (NULL, gdk_pixbuf_new_from_file (full_path, NULL));
+ icons = g_list_prepend (icons, gdk_pixbuf_new_from_file (full_path, NULL));
g_free (full_path);
gtk_window_set_default_icon_list (icons);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]