diff options
author | Marco Pesenti Gritti <marco@gnome.org> | 2003-11-14 01:28:04 +0800 |
---|---|---|
committer | Marco Pesenti Gritti <marco@src.gnome.org> | 2003-11-14 01:28:04 +0800 |
commit | 62caa3e6eec7b6109703071179ed260aac507db7 (patch) | |
tree | 9ccf963ec55954e7adab7b4a68eac776d9114ca1 /src/ephy-window.c | |
parent | 00c81d309184a49f6e711c4ce0b61ae8f94b42ae (diff) | |
download | gsoc2013-epiphany-62caa3e6eec7b6109703071179ed260aac507db7.tar gsoc2013-epiphany-62caa3e6eec7b6109703071179ed260aac507db7.tar.gz gsoc2013-epiphany-62caa3e6eec7b6109703071179ed260aac507db7.tar.bz2 gsoc2013-epiphany-62caa3e6eec7b6109703071179ed260aac507db7.tar.lz gsoc2013-epiphany-62caa3e6eec7b6109703071179ed260aac507db7.tar.xz gsoc2013-epiphany-62caa3e6eec7b6109703071179ed260aac507db7.tar.zst gsoc2013-epiphany-62caa3e6eec7b6109703071179ed260aac507db7.zip |
Rework shell services initialization so that it happen either on every
2003-11-13 Marco Pesenti Gritti <marco@gnome.org>
* embed/mozilla/mozilla-notifiers.cpp:
* src/ephy-main.c: (main):
* src/ephy-shell.c: (ephy_shell_init), (ephy_shell_startup),
(ephy_shell_finalize), (ephy_shell_get_session),
(ephy_shell_get_extensions_manager):
* src/ephy-window.c: (ensure_default_icon), (ephy_window_init):
Rework shell services initialization so that it happen either
on every instance, before the automation stuff is used, either
when they are requested. This appear to fix the crash with two
instances runned simultaneously.
(Christian I'm not quite sure this is ok for plugins manager, if
there are problems let me know.)
Diffstat (limited to 'src/ephy-window.c')
-rw-r--r-- | src/ephy-window.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/ephy-window.c b/src/ephy-window.c index c93689f54..854b2d9c8 100644 --- a/src/ephy-window.c +++ b/src/ephy-window.c @@ -1451,6 +1451,40 @@ ephy_window_class_init (EphyWindowClass *klass) } 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 ephy_window_init (EphyWindow *window) { EphyExtension *manager; @@ -1468,6 +1502,8 @@ ephy_window_init (EphyWindow *window) window->priv->is_fullscreen = FALSE; window->priv->has_size = FALSE; + ensure_default_icon (); + /* Setup the window and connect verbs */ setup_window (window); |