learningequality / kolibri-installer-gnome

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Change window title based on displayed content

wjt opened this issue · comments

Regardless of what page is being displayed, the app's titlebar always reads “Kolibri”. I would expect it to be a function of the current page. For example, take the following:

Capture d’écran de 2020-05-07 22-20-19

I would expect the title to be “Khan Academy (English)”, "Reading music", or some combination thereof.

In the web browser, the title is "Reading music - Khan Academy (English) - Kolibri". This would presumably be easiest to implement :-) and would still be an improvement IMO.

I'm using a build of learningequality/org.learningequality.Kolibri#4 from a few days ago.

Note that this isn't solvable here because pyeverywhere doesn't provide an interface for changing a window's title or for responding to the webview's document title changing. But I momentarily played with this in the pyeverywhere GTK front-end when I was working on it, over here: https://github.com/kollivier/pyeverywhere/blob/dev/src/pew/pygobject_gtk/webview.py. There's even a signal handler, __gtk_webview_on_notify_title. Only trouble is I was trying to keep the original title visible, using gtk_header_bar_set_subtitle with the webview's title, and that ended up looking pretty goofy. But just changing the title (overriding the original) seems reasonable to me, really :) Should be easy to do if someone would like to give it a shot!