After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 724583 - Expose restore-session-policy in the UI
Expose restore-session-policy in the UI
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: Interface
3.11.x
Other Linux
: Normal enhancement
: ---
Assigned To: Epiphany Maintainers
Epiphany Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-02-17 22:01 UTC by Asif Ali Rizvan
Modified: 2016-03-01 08:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
prefs-dialog: Expose restore-session-policy (5.17 KB, patch)
2016-01-18 17:46 UTC, Michael Catanzaro
none Details | Review
prefs-dialog: Expose restore-session-policy (5.17 KB, patch)
2016-01-19 19:51 UTC, Michael Catanzaro
committed Details | Review

Description Asif Ali Rizvan 2014-02-17 22:01:25 UTC
when gnome-web is closed and relaunched, it loads the previous tabs and websites; supposing we had 10 tabs running while exiting/crashing epiphany, it will again start/reaload those tabs; this is highly undesirable;

this also not good for privacy; if someone else run epiphany, it loads the last visited websites, which is not good.

expected behavior is to launch with default website, or auto-dial or blank page.

thanks.
Comment 1 Reinout van Schouwen 2014-02-17 22:05:25 UTC
It's a feature, not a bug! :-)
I believe there already is a bug for lazy loading tabs in the background, don't have it present atm.
'Someone else' should simply use their own account if it's undesirable that they can see your browsing history!
Comment 2 Asif Ali Rizvan 2014-02-17 22:12:46 UTC
I appreciate this feature, but it's like restore session of desktops where may apps were running; it's a kind of clutter to see so many tabs in the browser (even if they are not loaded); and closing all other tabs takes a lot of effort.

It would be great to have [x] restore session in options, so that those who don't want it can uncheck it. Thanks.
Comment 3 Asif Ali Rizvan 2014-02-17 22:39:57 UTC
This feature is present is firefox as "pin tab"; so should we...
Comment 4 Michael Catanzaro 2014-02-18 01:04:50 UTC
(In reply to comment #2)
> It would be great to have [x] restore session in options, so that those who
> don't want it can uncheck it. Thanks.

It's org.gnome.Epiphany restore-session-policy, but I'd also like to have this option available in the UI.
Comment 5 Reinout van Schouwen 2014-02-18 08:23:05 UTC
(In reply to comment #4)

> It's org.gnome.Epiphany restore-session-policy, but I'd also like to have this
> option available in the UI.

Maybe first expose it in gnome-tweak-tool then, to see whether it´s gebuinely useful?
Comment 6 Michael Catanzaro 2014-02-18 15:47:21 UTC
(In reply to comment #5)
> Maybe first expose it in gnome-tweak-tool then, to see whether it´s gebuinely
> useful?

gnome-tweak-tool currently only has options that affect the entire desktop; AFAIK there are not any settings for one particular application.  I wonder if the maintainers would really be interested in adding Epiphany-specific functionality. (Also, the vast majority of tweak-tool users will not even have Epiphany installed.)
Comment 7 Carlos Garcia Campos 2014-02-19 07:12:45 UTC
I prefer if the option is in the ephy prefs dialog itself, otherwise most people won't find where to change that, since it's not obvious that for that specific setting you need to use an external application that might even not be installed.
Comment 8 Michael Catanzaro 2016-01-18 16:40:38 UTC
I keep hearing complaints about this. We have to have this setting in the UI to be taken seriously.
Comment 9 Michael Catanzaro 2016-01-18 17:46:02 UTC
Created attachment 319284 [details] [review]
prefs-dialog: Expose restore-session-policy
Comment 10 Carlos Garcia Campos 2016-01-19 10:06:04 UTC
Review of attachment 319284 [details] [review]:

::: src/prefs-dialog.c
@@ +168,3 @@
 	gtk_widget_class_bind_template_child_private (widget_class, PrefsDialog, automatic_downloads_checkbutton);
 	gtk_widget_class_bind_template_child_private (widget_class, PrefsDialog, search_engine_combo);
+	gtk_widget_class_bind_template_child_private (widget_class, PrefsDialog, restore_session_checkbutton);

Check button? There are 3 values.

@@ +1089,3 @@
+{
+	const char *policy = g_variant_get_string (variant, NULL);
+	// FIXME: Is it possible to somehow use EPHY_PREFS_RESTORE_SESSION_POLICY_ALWAYS here?

Do not use C++ comments.

@@ +1099,3 @@
+			     gpointer user_data)
+{
+	// FIXME: Is it possible to somehow use EphyPrefsRestoreSessionPolicy here?

Ditto.

@@ +1102,3 @@
+	if (g_value_get_boolean (value))
+		return g_variant_new_string ("always");
+	else return g_variant_new_string ("crashed");

Do not use else after a return. What about the never policy?
Comment 11 Michael Catanzaro 2016-01-19 19:42:00 UTC
(In reply to Carlos Garcia Campos from comment #10)
> @@ +1089,3 @@
> +{
> +	const char *policy = g_variant_get_string (variant, NULL);
> +	// FIXME: Is it possible to somehow use
> EPHY_PREFS_RESTORE_SESSION_POLICY_ALWAYS here?
> 
> Do not use C++ comments.

OK.
 
> @@ +1102,3 @@
> +	if (g_value_get_boolean (value))
> +		return g_variant_new_string ("always");
> +	else return g_variant_new_string ("crashed");
> 
> Do not use else after a return.

OK.

> What about the never policy?

I'd rather stick with a checkbox to keep the dialog simpler. The Never policy seems not very useful. If the browser crashes unexpectedly, surely you always want to restore your previous session?

One case you might not is if you are looking at something embarrassing in a non-incognito session, it crashes, and you for some reason don't reopen the browser until much later. This seems pretty unlikely though, and UI process crashes are very rare nowadays (glad I can finally say that!) so it doesn't matter too much whether we use Crashed or None.
Comment 12 Michael Catanzaro 2016-01-19 19:51:17 UTC
Created attachment 319379 [details] [review]
prefs-dialog: Expose restore-session-policy
Comment 13 Michael Catanzaro 2016-02-07 17:36:56 UTC
Planning to sneak this in before freeze next week....
Comment 14 Michael Catanzaro 2016-02-08 13:18:01 UTC
Attachment 319379 [details] pushed as 70bc6b8 - prefs-dialog: Expose restore-session-policy
Comment 15 Hussam Al-Tayeb 2016-03-01 08:13:53 UTC
It is not respecting the preference for me. I filed a bug about it. bug 762906.