aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@gnome.org>2003-09-10 16:11:43 +0800
committerMarco Pesenti Gritti <marco@src.gnome.org>2003-09-10 16:11:43 +0800
commitbd8de625888d481cb6c6ce73721d3597349f5afb (patch)
treea7dc459c2a4902bea006d574ff416c4421f2ca27 /src
parent50848b9653f92e9acedd1cfc33dfefd10f0df201 (diff)
downloadgsoc2013-epiphany-bd8de625888d481cb6c6ce73721d3597349f5afb.tar.gz
gsoc2013-epiphany-bd8de625888d481cb6c6ce73721d3597349f5afb.tar.zst
gsoc2013-epiphany-bd8de625888d481cb6c6ce73721d3597349f5afb.zip
Make spinner status per tab. Remove the default to tab pref, use tab by
2003-09-10 Marco Pesenti Gritti <marco@gnome.org> * data/epiphany.schemas.in: * data/glade/prefs-dialog.glade: * lib/ephy-prefs.h: * src/ephy-notebook.c: (update_tabs_visibility), (ephy_notebook_init): * src/ephy-shell.c: (ephy_shell_new_tab): * src/ephy-tab.c: (open_link_in_new_tab): * src/ephy-window.c: (sync_tab_load_status), (ephy_window_set_active_tab), (tab_added_cb), (tab_removed_cb): * src/prefs-dialog.c: Make spinner status per tab. Remove the default to tab pref, use tab by default for middle click on links, add a always_show_tabs_bar hidden pref.
Diffstat (limited to 'src')
-rw-r--r--src/ephy-notebook.c4
-rw-r--r--src/ephy-shell.c4
-rw-r--r--src/ephy-tab.c3
-rw-r--r--src/ephy-window.c65
-rw-r--r--src/prefs-dialog.c2
5 files changed, 25 insertions, 53 deletions
diff --git a/src/ephy-notebook.c b/src/ephy-notebook.c
index 1ca616eed..9600673cd 100644
--- a/src/ephy-notebook.c
+++ b/src/ephy-notebook.c
@@ -716,7 +716,7 @@ update_tabs_visibility (EphyNotebook *nb, gboolean before_inserting)
if (before_inserting) num++;
- show_tabs = (eel_gconf_get_boolean (CONF_TABS_TABBED) || num > 1) &&
+ show_tabs = (eel_gconf_get_boolean (CONF_ALWAYS_SHOW_TABS_BAR) || num > 1) &&
nb->priv->show_tabs == TRUE;
gtk_notebook_set_show_tabs (GTK_NOTEBOOK (nb), show_tabs);
@@ -770,7 +770,7 @@ ephy_notebook_init (EphyNotebook *notebook)
GDK_ACTION_MOVE | GDK_ACTION_COPY);
notebook->priv->tabs_vis_notifier_id = eel_gconf_notification_add
- (CONF_TABS_TABBED,
+ (CONF_ALWAYS_SHOW_TABS_BAR,
(GConfClientNotifyFunc)tabs_visibility_notifier, notebook);
}
diff --git a/src/ephy-shell.c b/src/ephy-shell.c
index 4fe89e069..7e29fd293 100644
--- a/src/ephy-shell.c
+++ b/src/ephy-shell.c
@@ -397,7 +397,7 @@ ephy_shell_new_tab (EphyShell *shell,
EphyWindow *window;
EphyTab *tab;
EphyEmbed *embed;
- gboolean in_new_window;
+ gboolean in_new_window = TRUE;
gboolean grouped;
gboolean jump_to;
EphyEmbed *previous_embed = NULL;
@@ -405,8 +405,6 @@ ephy_shell_new_tab (EphyShell *shell,
gint position;
Toolbar *toolbar;
- in_new_window = !eel_gconf_get_boolean (CONF_TABS_TABBED);
-
if (flags & EPHY_NEW_TAB_IN_NEW_WINDOW) in_new_window = TRUE;
if (flags & EPHY_NEW_TAB_IN_EXISTING_WINDOW) in_new_window = FALSE;
diff --git a/src/ephy-tab.c b/src/ephy-tab.c
index 43815893a..c5091239a 100644
--- a/src/ephy-tab.c
+++ b/src/ephy-tab.c
@@ -905,7 +905,8 @@ open_link_in_new_tab (EphyTab *tab,
{
ephy_shell_new_tab (ephy_shell, window, tab,
link_address,
- EPHY_NEW_TAB_OPEN_PAGE);
+ EPHY_NEW_TAB_OPEN_PAGE |
+ EPHY_NEW_TAB_IN_EXISTING_WINDOW);
}
else
{
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 29e6cdd9c..0d59e9823 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -720,38 +720,6 @@ sync_tab_load_progress (EphyTab *tab, GParamSpec *pspec, EphyWindow *window)
}
static void
-sync_tab_load_status (EphyTab *dummy, GParamSpec *pspec, EphyWindow *window)
-{
- gboolean spin = FALSE;
- GList *tabs, *l;
-
- if (window->priv->closing) return;
-
- tabs = ephy_window_get_tabs (window);
- for (l = tabs; l != NULL; l = l->next)
- {
- EphyTab *tab = EPHY_TAB(l->data);
- g_return_if_fail (EPHY_IS_TAB(tab));
-
- if (ephy_tab_get_load_status (tab))
- {
- spin = TRUE;
- break;
- }
- }
- g_list_free (tabs);
-
- if (spin)
- {
- toolbar_spinner_start (window->priv->toolbar);
- }
- else
- {
- toolbar_spinner_stop (window->priv->toolbar);
- }
-}
-
-static void
sync_tab_message (EphyTab *tab, GParamSpec *pspec, EphyWindow *window)
{
if (window->priv->closing) return;
@@ -872,15 +840,26 @@ sync_tab_security (EphyTab *tab, GParamSpec *pspec, EphyWindow *window)
}
static void
-sync_tab_stop (EphyTab *tab, GParamSpec *pspec, EphyWindow *window)
+sync_tab_load_status (EphyTab *tab, GParamSpec *pspec, EphyWindow *window)
{
GtkAction *action;
+ gboolean status;
if (window->priv->closing) return;
action = gtk_action_group_get_action (window->priv->action_group, "ViewStop");
- g_object_set (action, "sensitive", ephy_tab_get_load_status (tab), NULL);
+ status = ephy_tab_get_load_status (tab);
+ g_object_set (action, "sensitive", status, NULL);
+
+ if (status)
+ {
+ toolbar_spinner_start (window->priv->toolbar);
+ }
+ else
+ {
+ toolbar_spinner_stop (window->priv->toolbar);
+ }
}
static void
@@ -1118,7 +1097,7 @@ ephy_window_set_active_tab (EphyWindow *window, EphyTab *new_tab)
G_CALLBACK (sync_tab_load_progress),
window);
g_signal_handlers_disconnect_by_func (G_OBJECT (old_tab),
- G_CALLBACK (sync_tab_stop),
+ G_CALLBACK (sync_tab_load_status),
window);
g_signal_handlers_disconnect_by_func (G_OBJECT (old_tab),
G_CALLBACK (sync_tab_message),
@@ -1149,7 +1128,7 @@ ephy_window_set_active_tab (EphyWindow *window, EphyTab *new_tab)
sync_tab_address (new_tab, NULL, window);
sync_tab_icon (new_tab, NULL, window);
sync_tab_load_progress (new_tab, NULL, window);
- sync_tab_stop (new_tab, NULL, window);
+ sync_tab_load_status (new_tab, NULL, window);
sync_tab_message (new_tab, NULL, window);
sync_tab_navigation (new_tab, NULL, window);
sync_tab_security (new_tab, NULL, window);
@@ -1169,8 +1148,12 @@ ephy_window_set_active_tab (EphyWindow *window, EphyTab *new_tab)
G_CALLBACK (sync_tab_load_progress),
window, 0);
g_signal_connect_object (G_OBJECT (new_tab),
+ "notify::load-progress",
+ G_CALLBACK (sync_tab_load_progress),
+ window, 0);
+ g_signal_connect_object (G_OBJECT (new_tab),
"notify::load-status",
- G_CALLBACK (sync_tab_stop),
+ G_CALLBACK (sync_tab_load_status),
window, 0);
g_signal_connect_object (G_OBJECT (new_tab),
"notify::message",
@@ -1250,9 +1233,6 @@ tab_added_cb (EphyNotebook *notebook, GtkWidget *child, EphyWindow *window)
update_tabs_menu (window);
- sync_tab_load_status (tab, NULL, window);
- g_signal_connect_object (G_OBJECT (tab), "notify::load-status",
- G_CALLBACK (sync_tab_load_status), window, 0);
g_signal_connect_object (G_OBJECT (tab), "notify::visible",
G_CALLBACK (sync_tab_visibility), window, 0);
}
@@ -1266,16 +1246,11 @@ tab_removed_cb (EphyNotebook *notebook, GtkWidget *child, EphyWindow *window)
tab = EPHY_TAB (g_object_get_data (G_OBJECT (child), "EphyTab"));
g_signal_handlers_disconnect_by_func (G_OBJECT (tab),
- G_CALLBACK (sync_tab_load_status),
- window);
- g_signal_handlers_disconnect_by_func (G_OBJECT (tab),
G_CALLBACK (sync_tab_visibility),
window);
window->priv->num_tabs--;
- sync_tab_load_status (NULL, NULL, window);
-
if (window->priv->num_tabs == 0)
{
/* removed the last tab, close the window */
diff --git a/src/prefs-dialog.c b/src/prefs-dialog.c
index b99b75de4..62961414f 100644
--- a/src/prefs-dialog.c
+++ b/src/prefs-dialog.c
@@ -209,7 +209,6 @@ enum
NOTEBOOK_PROP,
/* General */
- OPEN_IN_TABS_PROP,
HOMEPAGE_ENTRY_PROP,
/* Fonts and Colors */
@@ -247,7 +246,6 @@ EphyDialogProperty properties [] =
{ NOTEBOOK_PROP, "prefs_notebook", NULL, PT_NORMAL, NULL },
/* General */
- { OPEN_IN_TABS_PROP, "open_in_tabs_checkbutton", CONF_TABS_TABBED, PT_AUTOAPPLY, NULL },
{ HOMEPAGE_ENTRY_PROP, "homepage_entry", CONF_GENERAL_HOMEPAGE, PT_AUTOAPPLY, NULL },
/* Fonts and Colors */