From e44702a9048d6cf4e8de81387a38d3838cd8f4b3 Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Sat, 2 Oct 2004 12:33:04 +0000 Subject: Use gtk_window_set_default_icon_name(). 2004-10-02 Christian Persch * src/ephy-main.c: (main): * src/ephy-window.c: (ephy_window_init): Use gtk_window_set_default_icon_name(). --- src/ephy-main.c | 5 ++++- src/ephy-window.c | 36 ------------------------------------ 2 files changed, 4 insertions(+), 37 deletions(-) (limited to 'src') diff --git a/src/ephy-main.c b/src/ephy-main.c index e0fedc816..0f73fb266 100644 --- a/src/ephy-main.c +++ b/src/ephy-main.c @@ -111,7 +111,10 @@ main (int argc, char *argv[]) g_set_application_name (_("Epiphany Web Browser")); - g_object_get_property (G_OBJECT (program), + /* Set default window icon */ + gtk_window_set_default_icon_name ("web-browser"); + + g_object_get_property (G_OBJECT (program), GNOME_PARAM_POPT_CONTEXT, g_value_init (&context_as_value, G_TYPE_POINTER)); context = g_value_get_pointer (&context_as_value); diff --git a/src/ephy-window.c b/src/ephy-window.c index 428830d49..3b2d8a12a 100644 --- a/src/ephy-window.c +++ b/src/ephy-window.c @@ -2096,40 +2096,6 @@ ephy_window_class_init (EphyWindowClass *klass) g_type_class_add_private (object_class, sizeof(EphyWindowPrivate)); } -static void -ensure_default_icon (void) -{ - static gboolean ephy_has_default_icon = FALSE; - GtkIconTheme *icon_theme; - GtkIconInfo *icon_info; - const char *icon_file; - - if (ephy_has_default_icon) return; - - /* FIXME listen on icon changes */ - /* FIXME MultiHead: icon theme is per-display, not global */ - icon_theme = gtk_icon_theme_get_default (); - icon_info = gtk_icon_theme_lookup_icon (icon_theme, "web-browser", -1, 0); - - if (icon_info) - { - - icon_file = gtk_icon_info_get_filename (icon_info); - if (icon_file) - { - gtk_window_set_default_icon_from_file (icon_file, NULL); - } - - gtk_icon_info_free (icon_info); - } - else - { - g_warning ("Web browser gnome icon not found"); - } - - ephy_has_default_icon = TRUE; -} - static void update_navigation (EphyWindow *window) { @@ -2223,8 +2189,6 @@ ephy_window_init (EphyWindow *window) window->priv->should_save_chrome = FALSE; window->priv->mode = EPHY_WINDOW_MODE_NORMAL; - ensure_default_icon (); - g_object_ref (ephy_shell); /* Setup the UI manager and connect verbs */ -- cgit v1.2.3