diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2005-02-24 23:00:17 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2005-02-24 23:00:17 +0800 |
commit | fa2ed1162e71eb37859ec2a5ef38a9387d06b5af (patch) | |
tree | 99fff77df808014fe4dc166acc91a7e1b05cfda1 /src/ephy-tab.c | |
parent | 66e037be87fdb7361fa5d69cfe61b17468a82a56 (diff) | |
download | gsoc2013-epiphany-fa2ed1162e71eb37859ec2a5ef38a9387d06b5af.tar.gz 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-tab.c')
-rw-r--r-- | src/ephy-tab.c | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/src/ephy-tab.c b/src/ephy-tab.c index f7dfe6cad..09debb6f1 100644 --- a/src/ephy-tab.c +++ b/src/ephy-tab.c @@ -42,6 +42,7 @@ #include "ephy-embed-single.h" #include "ephy-shell.h" #include "ephy-permission-manager.h" +#include "ephy-link.h" #include <glib/gi18n.h> #include <libgnomevfs/gnome-vfs-uri.h> @@ -162,10 +163,21 @@ ephy_tab_get_type (void) 0, /* n_preallocs */ (GInstanceInitFunc) ephy_tab_init }; + static const GInterfaceInfo link_info = + { + NULL, + NULL, + NULL + }; + type = g_type_register_static (GTK_TYPE_BIN, "EphyTab", &our_info, 0); + + g_type_add_interface_static (type, + EPHY_TYPE_LINK, + &link_info); } return type; @@ -1402,6 +1414,7 @@ ephy_tab_size_to_cb (EphyEmbed *embed, gint width, gint height, } } + static gboolean open_link_in_new_tab (EphyTab *tab, const char *link_address) @@ -1416,13 +1429,11 @@ open_link_in_new_tab (EphyTab *tab, if (new_tab) { - ephy_shell_new_tab (ephy_shell, window, tab, - link_address, - EPHY_NEW_TAB_OPEN_PAGE | - EPHY_NEW_TAB_IN_EXISTING_WINDOW); + return ephy_link_open (EPHY_LINK (tab), link_address, + tab, EPHY_LINK_NEW_TAB) != NULL; } - return new_tab; + return FALSE; } static void @@ -1459,8 +1470,9 @@ clipboard_text_received_cb (GtkClipboard *clipboard, if (*weak_ptr != NULL && text != NULL) { EphyEmbed *embed = (EphyEmbed *) *weak_ptr; + EphyTab *tab = ephy_tab_for_embed (embed); - ephy_embed_load_url (embed, text); + ephy_link_open (EPHY_LINK (tab), text, tab, 0); } if (*weak_ptr != NULL) |