aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-window.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2005-02-24 23:00:17 +0800
committerChristian Persch <chpe@src.gnome.org>2005-02-24 23:00:17 +0800
commitfa2ed1162e71eb37859ec2a5ef38a9387d06b5af (patch)
tree99fff77df808014fe4dc166acc91a7e1b05cfda1 /src/ephy-window.c
parent66e037be87fdb7361fa5d69cfe61b17468a82a56 (diff)
downloadgsoc2013-epiphany-fa2ed1162e71eb37859ec2a5ef38a9387d06b5af.tar
gsoc2013-epiphany-fa2ed1162e71eb37859ec2a5ef38a9387d06b5af.tar.gz
gsoc2013-epiphany-fa2ed1162e71eb37859ec2a5ef38a9387d06b5af.tar.bz2
gsoc2013-epiphany-fa2ed1162e71eb37859ec2a5ef38a9387d06b5af.tar.lz
gsoc2013-epiphany-fa2ed1162e71eb37859ec2a5ef38a9387d06b5af.tar.xz
gsoc2013-epiphany-fa2ed1162e71eb37859ec2a5ef38a9387d06b5af.tar.zst
gsoc2013-epiphany-fa2ed1162e71eb37859ec2a5ef38a9387d06b5af.zip
Make the signal RUN_LAST.
2005-02-24 Christian Persch <chpe@cvs.gnome.org> * src/ephy-link.c: (ephy_link_base_init): Make the signal RUN_LAST. * src/ephy-tab.c: (ephy_tab_get_type), (open_link_in_new_tab), (clipboard_text_received_cb): Make EphyTab implement EphyLink interface. * src/ephy-window.c: (modal_alert_cb), (tab_added_cb), (tab_removed_cb), (ephy_window_open_link): Attach to link signal on EphyTab. Don't switch tabs to modal alerts in ppv mode; block the alerts instead. 2005-02-23 Carlos Garnacho Parro <carlos@gnome.org>
Diffstat (limited to 'src/ephy-window.c')
-rw-r--r--src/ephy-window.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 77953976c..cd0f4f7f6 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -1979,12 +1979,16 @@ static gboolean
modal_alert_cb (EphyEmbed *embed,
EphyWindow *window)
{
+ EphyWindowPrivate *priv = window->priv;
EphyTab *tab;
char *address;
tab = ephy_tab_for_embed (embed);
g_return_val_if_fail (tab != NULL, FALSE);
+ /* if we're in ppv mode, we cannot switch tabs, so inhibit the alert */
+ if (priv->ppv_mode) return TRUE;
+
/* switch the window to the tab, and bring the window to the foreground
* (since the alert is modal, the user won't be able to do anything
* with his current window anyway :|)
@@ -1994,7 +1998,7 @@ modal_alert_cb (EphyEmbed *embed,
/* make sure the location entry shows the real URL of the tab's page */
address = ephy_embed_get_location (embed, TRUE);
- ephy_toolbar_set_location (window->priv->toolbar, address);
+ ephy_toolbar_set_location (priv->toolbar, address);
g_free (address);
/* don't suppress alert */
@@ -2080,6 +2084,9 @@ tab_added_cb (EphyNotebook *notebook,
g_signal_connect_object (G_OBJECT (tab), "notify::visibility",
G_CALLBACK (sync_tab_visibility), window, 0);
+ g_signal_connect_object (G_OBJECT (tab), "open-link",
+ G_CALLBACK (ephy_link_open), window,
+ G_CONNECT_SWAPPED);
embed = ephy_tab_get_embed (tab);
g_return_if_fail (embed != NULL);
@@ -2108,6 +2115,9 @@ tab_removed_cb (EphyNotebook *notebook,
g_signal_handlers_disconnect_by_func (G_OBJECT (tab),
G_CALLBACK (sync_tab_visibility),
+ window);
+ g_signal_handlers_disconnect_by_func (G_OBJECT (tab),
+ G_CALLBACK (ephy_link_open),
window);
window->priv->num_tabs--;
@@ -2525,6 +2535,9 @@ ephy_window_open_link (EphyLink *link,
g_return_val_if_fail (address != NULL, NULL);
+ /* don't do anything in ppv mode */
+ if (window->priv->ppv_mode) return NULL;
+
if (tab == NULL)
{
tab = ephy_window_get_active_tab (window);