aboutsummaryrefslogtreecommitdiffstats
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
parent50848b9653f92e9acedd1cfc33dfefd10f0df201 (diff)
downloadgsoc2013-epiphany-bd8de625888d481cb6c6ce73721d3597349f5afb.tar
gsoc2013-epiphany-bd8de625888d481cb6c6ce73721d3597349f5afb.tar.gz
gsoc2013-epiphany-bd8de625888d481cb6c6ce73721d3597349f5afb.tar.bz2
gsoc2013-epiphany-bd8de625888d481cb6c6ce73721d3597349f5afb.tar.lz
gsoc2013-epiphany-bd8de625888d481cb6c6ce73721d3597349f5afb.tar.xz
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.
-rw-r--r--ChangeLog17
-rw-r--r--data/epiphany.schemas.in6
-rw-r--r--data/glade/prefs-dialog.glade52
-rw-r--r--lib/ephy-prefs.h2
-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
9 files changed, 46 insertions, 109 deletions
diff --git a/ChangeLog b/ChangeLog
index 7efb84833..e6d55be20 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+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.
+
2003-09-10 Pablo Saratxaga <pablo@mandrakesoft.com>
* configure.in: Added Walloon (wa) to ALL_LINGUAS
diff --git a/data/epiphany.schemas.in b/data/epiphany.schemas.in
index 7626161f9..446e651c9 100644
--- a/data/epiphany.schemas.in
+++ b/data/epiphany.schemas.in
@@ -89,14 +89,14 @@
</locale>
</schema>
<schema>
- <key>/schemas/apps/epiphany/general/open_in_tab</key>
+ <key>/schemas/apps/epiphany/general/always_show_tabs_bar</key>
<applyto>/apps/epiphany/general/open_in_tab</applyto>
<owner>epiphany</owner>
<type>bool</type>
<default>false</default>
<locale name="C">
- <short>Use tabs</short>
- <long>Open in tabs by default.</long>
+ <short>Always show the tab bar</short>
+ <long>Show the tab bar also when there is only one tab open.</long>
</locale>
</schema>
<schema>
diff --git a/data/glade/prefs-dialog.glade b/data/glade/prefs-dialog.glade
index ec6224ce2..6596bcef8 100644
--- a/data/glade/prefs-dialog.glade
+++ b/data/glade/prefs-dialog.glade
@@ -262,27 +262,6 @@
<property name="spacing">6</property>
<child>
- <widget class="GtkLabel" id="label1252">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Tabs&lt;/b&gt;</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
<widget class="GtkHBox" id="hbox145">
<property name="visible">True</property>
<property name="homogeneous">False</property>
@@ -308,37 +287,6 @@
<property name="fill">False</property>
</packing>
</child>
-
- <child>
- <widget class="GtkVBox" id="vbox160">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkCheckButton" id="open_in_tabs_checkbutton">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Open in _tabs by default</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
</widget>
<packing>
<property name="padding">0</property>
diff --git a/lib/ephy-prefs.h b/lib/ephy-prefs.h
index 3b6233f6d..0ecb6360f 100644
--- a/lib/ephy-prefs.h
+++ b/lib/ephy-prefs.h
@@ -24,7 +24,7 @@ G_BEGIN_DECLS
/* General */
#define CONF_GENERAL_HOMEPAGE "/apps/epiphany/general/homepage"
#define CONF_ASK_DOWNLOAD_DEST "/apps/epiphany/general/ask_download_dest"
-#define CONF_TABS_TABBED "/apps/epiphany/general/open_in_tab"
+#define CONF_ALWAYS_SHOW_TABS_BAR "/apps/epiphany/general/always_show_tabs_bar"
#define CONF_WINDOWS_SHOW_TOOLBARS "/apps/epiphany/general/show_toolbars"
#define CONF_WINDOWS_SHOW_BOOKMARKS_BAR "/apps/epiphany/general/show_bookmarks_bar"
#define CONF_WINDOWS_SHOW_STATUSBAR "/apps/epiphany/general/show_statusbar"
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 */