aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-window.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2005-07-24 20:26:23 +0800
committerChristian Persch <chpe@src.gnome.org>2005-07-24 20:26:23 +0800
commit952a36768edd6b95d65174c7d797e114cda54372 (patch)
tree463779494a6ad8f67c89e22449aeeac9af88a68f /src/ephy-window.c
parent433e0afbdb0dc0ee9e109c1a76a64793b1fcf2be (diff)
downloadgsoc2013-epiphany-952a36768edd6b95d65174c7d797e114cda54372.tar
gsoc2013-epiphany-952a36768edd6b95d65174c7d797e114cda54372.tar.gz
gsoc2013-epiphany-952a36768edd6b95d65174c7d797e114cda54372.tar.bz2
gsoc2013-epiphany-952a36768edd6b95d65174c7d797e114cda54372.tar.lz
gsoc2013-epiphany-952a36768edd6b95d65174c7d797e114cda54372.tar.xz
gsoc2013-epiphany-952a36768edd6b95d65174c7d797e114cda54372.tar.zst
gsoc2013-epiphany-952a36768edd6b95d65174c7d797e114cda54372.zip
Set title of loading page to the address, iff the page was blank before.
2005-07-24 Christian Persch <chpe@cvs.gnome.org> * src/ephy-lockdown.c: (update_location_editable): * src/ephy-shell.c: (ephy_shell_new_tab_full): * src/ephy-tab.c: (ephy_tab_set_property), (ephy_tab_get_property), (ephy_tab_class_init), (get_title_from_address), (ephy_tab_set_loading_title), (ephy_tab_set_address), (ephy_tab_set_load_status), (ephy_tab_get_load_status), (ephy_tab_open_uri_cb), (ephy_tab_address_cb), (ephy_tab_content_change_cb), (ephy_tab_zoom_changed_cb), (ephy_tab_title_cb), (ensure_page_info), (ephy_tab_net_state_cb), (ephy_tab_init), (ephy_tab_set_title), (ephy_tab_get_title), (ephy_tab_get_address), (ephy_tab_get_typed_address), (ephy_tab_set_typed_address): * src/ephy-tab.h: * src/ephy-toolbar.c: (sync_user_input_cb): * src/ephy-window.c: (sync_tab_typed_address), (sync_tab_title), (ephy_window_set_active_tab): * src/epiphany.defs: Set title of loading page to the address, iff the page was blank before. Fixes bug #115337 and bug #171622. * src/ephy-session.c: (ephy_session_close): In ephy_session_close(), close open dialogues first.
Diffstat (limited to 'src/ephy-window.c')
-rw-r--r--src/ephy-window.c37
1 files changed, 13 insertions, 24 deletions
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 3269b9c1b..e474f75b2 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -1114,19 +1114,12 @@ setup_ui_manager (EphyWindow *window)
}
static void
-sync_tab_address (EphyTab *tab, GParamSpec *pspec, EphyWindow *window)
+sync_tab_typed_address (EphyTab *tab, GParamSpec *pspec, EphyWindow *window)
{
- const char *address;
-
if (window->priv->closing) return;
- address = ephy_tab_get_location (tab);
- if (address == NULL)
- {
- address = "";
- }
-
- ephy_toolbar_set_location (window->priv->toolbar, address);
+ ephy_toolbar_set_location (window->priv->toolbar,
+ ephy_tab_get_typed_address (tab));
}
static void
@@ -1433,19 +1426,15 @@ sync_tab_load_status (EphyTab *tab,
}
static void
-sync_tab_title (EphyTab *tab, GParamSpec *pspec, EphyWindow *window)
+sync_tab_title (EphyTab *tab,
+ GParamSpec *pspec,
+ EphyWindow *window)
{
- const char *title;
-
- if (window->priv->closing) return;
+ EphyWindowPrivate *priv = window->priv;
- title = ephy_tab_get_title (tab);
+ if (priv->closing) return;
- if (title)
- {
- gtk_window_set_title (GTK_WINDOW(window),
- title);
- }
+ gtk_window_set_title (GTK_WINDOW(window), ephy_tab_get_title (tab));
}
static void
@@ -1879,7 +1868,7 @@ ephy_window_set_active_tab (EphyWindow *window, EphyTab *new_tab)
if (old_tab != NULL)
{
g_signal_handlers_disconnect_by_func (old_tab,
- G_CALLBACK (sync_tab_address),
+ G_CALLBACK (sync_tab_typed_address),
window);
g_signal_handlers_disconnect_by_func (old_tab,
G_CALLBACK (sync_tab_document_type),
@@ -1927,7 +1916,7 @@ ephy_window_set_active_tab (EphyWindow *window, EphyTab *new_tab)
if (new_tab != NULL)
{
- sync_tab_address (new_tab, NULL, window);
+ sync_tab_typed_address (new_tab, NULL, window);
sync_tab_document_type (new_tab, NULL, window);
sync_tab_icon (new_tab, NULL, window);
sync_tab_load_progress (new_tab, NULL, window);
@@ -1940,8 +1929,8 @@ ephy_window_set_active_tab (EphyWindow *window, EphyTab *new_tab)
sync_tab_title (new_tab, NULL, window);
sync_tab_zoom (new_tab, NULL, window);
- g_signal_connect_object (new_tab, "notify::address",
- G_CALLBACK (sync_tab_address),
+ g_signal_connect_object (new_tab, "notify::typed-address",
+ G_CALLBACK (sync_tab_typed_address),
window, 0);
g_signal_connect_object (new_tab, "notify::document-type",
G_CALLBACK (sync_tab_document_type),