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 702435 - Add configurable homepage for kiosk mode
Add configurable homepage for kiosk mode
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: General
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Epiphany Maintainers
Epiphany Maintainers
Depends on:
Blocks: 702432
 
 
Reported: 2013-06-17 09:56 UTC by Manuel Rego Casasnovas
Modified: 2016-11-01 01:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[PATCH] Reintroduced homepage preference on GSettings (8.15 KB, patch)
2013-07-10 05:47 UTC, Lorenzo Tilve
needs-work Details | Review
[PATCH] Reintroduced homepage preference on GSettings (8.03 KB, patch)
2013-07-23 09:00 UTC, Lorenzo Tilve
committed Details | Review
Rebased patch against current master (8.19 KB, patch)
2013-07-24 11:25 UTC, Manuel Rego Casasnovas
needs-work Details | Review
Restore preference to set homepage (5.50 KB, patch)
2016-11-01 01:31 UTC, Michael Catanzaro
committed Details | Review

Description Manuel Rego Casasnovas 2013-06-17 09:56:03 UTC
Maybe overview is valid as homepage for some kiosk browsers, but in some cases we'll need to set a customized homepage.

As a first step we'll need to add back the GSetting removed in commit bea26fc30ac9ff3def2d18d237509a18b3829e27. And use it instead of the overview when it's defined.

Maybe it could make sense that this patch is available too in Epiphany outside of the kiosk mode. In that case we'll need to add some UI to define the homepage (previously one was removed in commit 0caf7b0f44349cbfd072cb49dbdc609de317a971).
Comment 1 Reinout van Schouwen 2013-06-21 08:59:15 UTC
A GSetting for a customized home page could be useful for sysadmins who want an intranet site to show up for example, but let's not make the mistake of re-introducing a preference for setting a home page. The home page concept is very last-century, the masses use search engines to remember their favorite sites for them anyway.
Comment 2 Lorenzo Tilve 2013-06-24 07:15:50 UTC
I agree with keeping it just as a GSetting variable, which is very useful for this specific case of having a default site configured to show up on the kiosk mode. I'd also forget about the UI to configure that setting for the default Epiphany mode.
Comment 3 Lorenzo Tilve 2013-07-10 05:47:57 UTC
Created attachment 248795 [details] [review]
[PATCH] Reintroduced homepage preference on GSettings

Patch that enables setting a custom homepage for Epiphany.
Comment 4 Manuel Rego Casasnovas 2013-07-22 06:22:58 UTC
Review of attachment 248795 [details] [review]:

Looks good to me, just a few minor issues before pushing it.

::: lib/ephy-prefs.h
@@ +70,2 @@
 #define EPHY_PREFS_UI_SCHEMA                     "org.gnome.Epiphany.ui"
+#define EPHY_PREFS_HOMEPAGE_URL                  "homepage-url"

This setting is not defined in UI schema, so the #define should be moved below to be showed together with the rest of settings for "org.gnome.Epiphany" schema.

::: src/ephy-window.c
@@ +1418,3 @@
 				  G_CALLBACK (ephy_link_open), window);
 	g_object_unref (action);
+	g_free(address);

Nit: Missing space before "(".
This could be moved to line before "action =" as it's only used in the if and not needed anymore.
Comment 5 Manuel Rego Casasnovas 2013-07-22 06:23:00 UTC
Review of attachment 248795 [details] [review]:

Looks good to me, just a few minor issues before pushing it.

::: lib/ephy-prefs.h
@@ +70,2 @@
 #define EPHY_PREFS_UI_SCHEMA                     "org.gnome.Epiphany.ui"
+#define EPHY_PREFS_HOMEPAGE_URL                  "homepage-url"

This setting is not defined in UI schema, so the #define should be moved below to be showed together with the rest of settings for "org.gnome.Epiphany" schema.

::: src/ephy-window.c
@@ +1418,3 @@
 				  G_CALLBACK (ephy_link_open), window);
 	g_object_unref (action);
+	g_free(address);

Nit: Missing space before "(".
This could be moved to line before "action =" as it's only used in the if and not needed anymore.
Comment 6 Lorenzo Tilve 2013-07-23 09:00:52 UTC
Created attachment 249868 [details] [review]
[PATCH] Reintroduced homepage preference on GSettings

Fixed the patch based on the suggested comments. Also a "Return without value, in function returning non-void" warning was avoided by changing:

-  g_return_if_fail (EPHY_IS_WEB_VIEW (view));
+  g_return_val_if_fail (EPHY_IS_WEB_VIEW (view), FALSE);
Comment 7 Manuel Rego Casasnovas 2013-07-23 10:02:20 UTC
(In reply to comment #6)
> Created an attachment (id=249868) [details] [review]
> [PATCH] Reintroduced homepage preference on GSettings
> 
> Fixed the patch based on the suggested comments. Also a "Return without value,
> in function returning non-void" warning was avoided by changing:
> 
> -  g_return_if_fail (EPHY_IS_WEB_VIEW (view));
> +  g_return_val_if_fail (EPHY_IS_WEB_VIEW (view), FALSE);

Good catch :-)
Comment 8 Manuel Rego Casasnovas 2013-07-23 10:02:53 UTC
Review of attachment 249868 [details] [review]:

Thanks for the patch.

Pushed in kiosk-mode branch: https://git.gnome.org/browse/epiphany/commit/?h=kiosk-mode&id=3d143c0209e755d98c0bbc650ab0ad168e2b5fa6
Comment 9 Manuel Rego Casasnovas 2013-07-24 11:25:40 UTC
Created attachment 250026 [details] [review]
Rebased patch against current master

This setting seems interesting for master too, so I'm providing the rebased patch for current master.
Comment 10 Lorenzo Tilve 2014-02-03 01:17:43 UTC
The last version of this patch it's still valid for the current master branch. I also think that this is an interesting feature not only for the kiosk-mode, but for other more generic scenarios. An example of this would be a network environment on which Web homepage could be configured globally on all the systems through dconf profiles, for instance.
Comment 11 Michael Catanzaro 2015-09-11 03:12:21 UTC
Review of attachment 250026 [details] [review]:

This will need to be rebased :(

::: embed/ephy-embed-utils.c
@@ +159,3 @@
       location[0] == '\0' || 
+      strcmp (location, "about:blank") == 0 ||
+      strcmp (location, "about:overview") == 0)

In particular, ephy_embed_utils_is_empty has been removed in master....

::: src/ephy-shell.c
@@ +755,3 @@
     ephy_web_view_set_typed_address (view, "");
     ephy_window_activate_location (window);
+    is_empty = ephy_web_view_load_homepage (view);

This needs rebased too, since the is_empty variable doesn't exist here anymore, but I'm not sure this is the right thing to do anyway. The reason to check if the page is empty is to decide whether it should be replaced with another page, right? E.g. when running 'epiphany www.example.com' from the command line, we probably want to open only www.example.com plus the previously-active tabs, and not www.example.com plus the home page in a new tab. This doesn't matter for kiosk mode, but for users who are stuck in the 1990s and will set this preference because they just want a homepage back. Also, it simplifies the implementation of ephy_web_view_load_homepage, since you don't need to return anything anymore.
Comment 12 Michael Catanzaro 2016-11-01 01:30:43 UTC
Well, kiosk mode is dead and presumably not coming back, but users still complain they can't set a homepage. Let's do this.
Comment 13 Michael Catanzaro 2016-11-01 01:31:35 UTC
The following fix has been pushed:
6b53096 Restore preference to set homepage
Comment 14 Michael Catanzaro 2016-11-01 01:31:40 UTC
Created attachment 338874 [details] [review]
Restore preference to set homepage

Several users have requested this and even if it seems silly, there's
nothing to be gained in denying them. This feature is extremely
low-maintenance.

This will probably never be well-tested, since hardly anybody wants
homepages anymore. Users should be prepared to report bugs if things
break or are broken.