From ae767a6174e353acb3b1a850fdefdffebeec9817 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Sun, 5 Jan 2003 13:51:43 +0000 Subject: Make GaleonShell inherit from GaleonEmbedShell. Ref the shell when using 2003-01-05 Marco Pesenti Gritti * data/art/Makefile.am: * data/art/epiphany.png: * data/epiphany.schemas.in: * data/glade/epiphany.glade: * embed/downloader-view.c: (downloader_view_init), (downloader_view_finalize): * embed/ephy-embed-favicon.c: (ephy_embed_favicon_set_property): * embed/ephy-embed-shell.c: (ephy_embed_shell_get_impl), (ephy_embed_shell_get_type), (ephy_embed_shell_new): * embed/ephy-embed-shell.h: * embed/ephy-embed-utils.c: (ephy_embed_utils_build_charsets_submenu): * embed/mozilla/mozilla-embed-persist.cpp: * embed/mozilla/mozilla-embed.cpp: * src/appearance-prefs.c: (setup_font_menu): * src/bookmarks/ephy-bookmarks.c: (compute_lower_fav), (ephy_setup_history_notifiers): * src/ephy-main.c: (main): * src/ephy-nautilus-view.c: (ephy_nautilus_view_instance_init): * src/ephy-shell.c: (ephy_shell_get_type), (ephy_shell_init), (ephy_shell_finalize), (build_homepage_url), (ephy_shell_get_autocompletion): * src/ephy-shell.h: * src/ephy-tab.c: (ephy_tab_init), (ephy_tab_location_cb), (ephy_tab_visibility_cb): * src/ephy-window.c: (favicon_cache_changed_cb), (ephy_window_init), (update_favicon_control): * src/general-prefs.c: (create_default_charset_menu): * src/history-dialog.c: (history_dialog_init): * src/pdm-dialog.c: (pdm_dialog_cookie_remove), (pdm_dialog_password_remove), (pdm_dialog_cookies_free), (pdm_dialog_passwords_free), (pdm_dialog_init): * src/prefs-dialog.c: (prefs_clear_memory_cache_button_clicked_cb), (prefs_clear_disk_cache_button_clicked_cb): * src/window-commands.c: (window_cmd_file_open): Make GaleonShell inherit from GaleonEmbedShell. Ref the shell when using the downloader. Use favicons for the window icon when possible. This required to use jimmac icon as default, we still dont have his permission, I'll remove it later if necessary. --- embed/mozilla/mozilla-embed-persist.cpp | 3 ++- embed/mozilla/mozilla-embed.cpp | 20 +++++++++++--------- 2 files changed, 13 insertions(+), 10 deletions(-) (limited to 'embed/mozilla') diff --git a/embed/mozilla/mozilla-embed-persist.cpp b/embed/mozilla/mozilla-embed-persist.cpp index c0c8cb06e..9f9ac185c 100644 --- a/embed/mozilla/mozilla-embed-persist.cpp +++ b/embed/mozilla/mozilla-embed-persist.cpp @@ -167,7 +167,8 @@ impl_save (EphyEmbedPersist *persist) if (embed) { - wrapper = (EphyWrapper *) mozilla_embed_get_galeon_wrapper (MOZILLA_EMBED(embed)); + wrapper = (EphyWrapper *) mozilla_embed_get_galeon_wrapper (MOZILLA_EMBED(embed)); + g_return_val_if_fail (wrapper != NULL, G_FAILED); wrapper->GetDOMWindow (getter_AddRefs (parent)); } diff --git a/embed/mozilla/mozilla-embed.cpp b/embed/mozilla/mozilla-embed.cpp index 66330db4a..8c39dd460 100644 --- a/embed/mozilla/mozilla-embed.cpp +++ b/embed/mozilla/mozilla-embed.cpp @@ -274,7 +274,7 @@ mozilla_embed_get_type (void) static const GInterfaceInfo embed_info = { - (GInterfaceInitFunc) ephy_embed_init, /* interface_init */ + (GInterfaceInitFunc) ephy_embed_init, /* interface_init */ NULL, /* interface_finalize */ NULL /* interface_data */ }; @@ -357,8 +357,6 @@ mozilla_embed_init (MozillaEmbed *embed) gpointer mozilla_embed_get_galeon_wrapper (MozillaEmbed *embed) { - g_return_val_if_fail (embed->priv->wrapper != NULL, NULL); - return embed->priv->wrapper; } @@ -719,6 +717,8 @@ impl_get_location (EphyEmbed *embed, } *location = l; + + if (l == NULL) return G_FAILED; return G_OK; } @@ -1309,14 +1309,16 @@ mozilla_embed_visibility_cb (GtkMozEmbed *embed, gboolean visibility, (do_GetService(WINDOWWATCHER_CONTRACTID, &rv)); if (NS_FAILED(rv) || !wwatch) return; - EphyWrapper *wrapper = (EphyWrapper *)mozilla_embed_get_galeon_wrapper(membed); - if(!wrapper) return; + EphyWrapper *wrapper = membed->priv->wrapper; - nsCOMPtr domWindow; - rv = wrapper->GetDOMWindow(getter_AddRefs(domWindow)); - if(NS_FAILED(rv) || !domWindow) return; + if (wrapper) + { + nsCOMPtr domWindow; + rv = wrapper->GetDOMWindow(getter_AddRefs(domWindow)); + if(NS_FAILED(rv) || !domWindow) return; - rv = wwatch->SetActiveWindow(domWindow); + rv = wwatch->SetActiveWindow(domWindow); + } } static void -- cgit v1.2.3