diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2003-11-10 02:39:52 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2003-11-10 02:39:52 +0800 |
commit | c135299f16ff6d9669ccc12a7f670d9e574bbaa0 (patch) | |
tree | 65d28e61a480f85d94a649066f92aa82f023de79 /src/window-commands.c | |
parent | 40b6378a13d1f2ed6a79f7dba10386115149dcd7 (diff) | |
download | gsoc2013-epiphany-c135299f16ff6d9669ccc12a7f670d9e574bbaa0.tar gsoc2013-epiphany-c135299f16ff6d9669ccc12a7f670d9e574bbaa0.tar.gz gsoc2013-epiphany-c135299f16ff6d9669ccc12a7f670d9e574bbaa0.tar.bz2 gsoc2013-epiphany-c135299f16ff6d9669ccc12a7f670d9e574bbaa0.tar.lz gsoc2013-epiphany-c135299f16ff6d9669ccc12a7f670d9e574bbaa0.tar.xz gsoc2013-epiphany-c135299f16ff6d9669ccc12a7f670d9e574bbaa0.tar.zst gsoc2013-epiphany-c135299f16ff6d9669ccc12a7f670d9e574bbaa0.zip |
Don't unref the icon theme, we don't own it.
2003-11-09 Christian Persch <chpe@cvs.gnome.org>
* src/window-commands.c: (window_cmd_help_about):
Don't unref the icon theme, we don't own it.
Diffstat (limited to 'src/window-commands.c')
-rw-r--r-- | src/window-commands.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/window-commands.c b/src/window-commands.c index 0a45af31e..b360fb40d 100644 --- a/src/window-commands.c +++ b/src/window-commands.c @@ -896,7 +896,7 @@ window_cmd_help_about (GtkAction *action, GtkWidget** ptr; GdkPixbuf *icon; const char *icon_path; - GdkPixbuf *logo; + GdkPixbuf *logo = NULL; GtkIconTheme *icon_theme; GtkIconInfo *icon_info; @@ -924,25 +924,24 @@ window_cmd_help_about (GtkAction *action, return; } + /* FIXME: use the icon theme for the correct screen, not for the default screen */ icon_theme = gtk_icon_theme_get_default (); icon_info = gtk_icon_theme_lookup_icon (icon_theme, "web-browser", -1, 0); if (icon_info) { - icon_path = gtk_icon_info_get_filename (icon_info); - g_return_if_fail (icon_path != NULL); - logo = gdk_pixbuf_new_from_file (icon_path, NULL); + if (icon_path != NULL) + { + logo = gdk_pixbuf_new_from_file (icon_path, NULL); + } } else { - logo = NULL; g_warning ("Web browser gnome icon not found"); } - g_object_unref (icon_theme); - about = gnome_about_new( "Epiphany", VERSION, "Copyright \xc2\xa9 2002-2003 Marco Pesenti Gritti", @@ -952,7 +951,10 @@ window_cmd_help_about (GtkAction *action, strcmp (translator_credits, "translator_credits") != 0 ? translator_credits : NULL, logo); - g_object_unref (logo); + if (logo != NULL) + { + g_object_unref (logo); + } gtk_window_set_transient_for (GTK_WINDOW (about), GTK_WINDOW (window)); |