aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--src/window-commands.c18
2 files changed, 16 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 150ddbd01..0e32a8f03 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+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.
+
2003-11-09 Marco Pesenti Gritti <marco@gnome.org>
* embed/ephy-history.c: (ephy_history_save):
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));