aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-shell.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-08-06 22:34:43 +0800
committerChristian Persch <chpe@src.gnome.org>2004-08-06 22:34:43 +0800
commit54f1919cae74d3551c23eef9d00975344d1c78a9 (patch)
tree817546aea8161746bcf5f1eb4aabfec0d4d0ec18 /src/ephy-shell.c
parent394409d0ccca365dd8d9e8a29752d2fb27cb7bbe (diff)
downloadgsoc2013-epiphany-54f1919cae74d3551c23eef9d00975344d1c78a9.tar.gz
gsoc2013-epiphany-54f1919cae74d3551c23eef9d00975344d1c78a9.tar.zst
gsoc2013-epiphany-54f1919cae74d3551c23eef9d00975344d1c78a9.zip
Fix dragging of urls which gnome-vfs can't handle. Fix new tab positioning
2004-08-06 Christian Persch <chpe@cvs.gnome.org> * lib/ephy-string.c: (ephy_string_parse_uri_list): * lib/ephy-string.h: * lib/widgets/ephy-node-view.c: (drag_data_received_cb), (ephy_node_view_class_init): * src/bookmarks/ephy-bookmarks-editor.c: * src/ephy-notebook.c: (notebook_drag_data_received_cb): * src/ephy-notebook.h: * src/ephy-session.c: * src/ephy-shell.c: (ephy_shell_new_tab): * src/ephy-tab.c: (ephy_tab_new_window_cb): * src/ephy-window.c: (ephy_window_load_in_tabs): Fix dragging of urls which gnome-vfs can't handle. Fix new tab positioning when opening tabs from drags.
Diffstat (limited to 'src/ephy-shell.c')
-rw-r--r--src/ephy-shell.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/src/ephy-shell.c b/src/ephy-shell.c
index 1d709d9eb..85edfaf21 100644
--- a/src/ephy-shell.c
+++ b/src/ephy-shell.c
@@ -549,7 +549,7 @@ ephy_shell_new_tab (EphyShell *shell,
gboolean jump_to;
EphyEmbed *previous_embed = NULL;
GtkWidget *nb;
- gint position;
+ int position = -1;
Toolbar *toolbar;
if (flags & EPHY_NEW_TAB_IN_NEW_WINDOW) in_new_window = TRUE;
@@ -557,7 +557,7 @@ ephy_shell_new_tab (EphyShell *shell,
in_new_window = in_new_window && !eel_gconf_get_boolean (CONF_LOCKDOWN_FULLSCREEN);
- jump_to = (flags & EPHY_NEW_TAB_JUMP);
+ jump_to = (flags & EPHY_NEW_TAB_JUMP) != 0;
if (!in_new_window && parent_window != NULL)
{
@@ -570,30 +570,24 @@ ephy_shell_new_tab (EphyShell *shell,
toolbar = EPHY_TOOLBAR (ephy_window_get_toolbar (window));
- if (previous_tab)
+ if (previous_tab != NULL)
{
previous_embed = ephy_tab_get_embed (previous_tab);
}
- if ((flags & EPHY_NEW_TAB_APPEND_AFTER) && previous_embed != NULL)
+ if ((flags & EPHY_NEW_TAB_APPEND_AFTER) && previous_tab != NULL)
{
nb = ephy_window_get_notebook (window);
position = gtk_notebook_page_num (GTK_NOTEBOOK (nb),
- GTK_WIDGET (previous_embed)) + 1;
- }
- else
- {
- position = EPHY_NOTEBOOK_ADD_LAST;
+ GTK_WIDGET (previous_tab)) + 1;
}
tab = ephy_tab_new ();
gtk_widget_show (GTK_WIDGET (tab));
embed = ephy_tab_get_embed (tab);
- ephy_window_add_tab (window, tab,
- position,
- jump_to);
- gtk_widget_show (GTK_WIDGET(window));
+ ephy_window_add_tab (window, tab, position, jump_to);
+ gtk_window_present (GTK_WINDOW (window));
if (flags & EPHY_NEW_TAB_HOME_PAGE ||
flags & EPHY_NEW_TAB_NEW_PAGE)