This continues turning "example" in a real gnome-shell extension
tutorial, showing how to create GSettings using Convenience and
how to build a simple preference dialog by subclassing GtkGrid
and binding GObject properties to GSettings.
Since 3.3.5, gnome-shell offers an integrated configuration tool
for extensions, which can be used by adding a new "prefs" module.
Replace the old modal dialog with a new gtk dialog, which also allows
to configure the new highlight-selected setting.
Optionally, bring the selected window to front before dismissing
the popup, in a manner similar to cycle-windows keybinding (but
without the rendering artifacts, and without application grouping).
Based on a patch by Pallai Roland <dap@magex.hu>
A long due update, since this was merged in gjs and core shell.
We no longer need to mess with __proto__ and prototype, and can
use decent syntax for true object oriented programming.
(This affects all except xrandr-indicator, since I want to port
that to GDBus too, using the new bindings right from the start)
Modified to avoid global settings variables, that were updated
unpredictably. Removed the inital show effect and placing the dock
at primary.y at startup (causing a big and often unexpected jump).
Ported to the new class framework, which should mean cleaner code.
Mode selection was cleaned up, settings dialog was moved to a
separate file (in preparation for GTK replacement), all classes
were moved to Lang.Class. No big code changes though.
Retrieve Convenience from the extension helper object (Me), and
pass no arguments to initTranslations and getSettings (since the
metadata has all that is required)
Extension helper and metadata are now different objects, so the
first needs be retrieved from ExtensionUtils.
Also, reduce the number of required arguments (by using the new
metadata keys) and make generic enough for usage by other extensions.
Includes documentation.
Introduce a common settings.mk file, which is included in extensions
that need GSettings, to ensure that conventions are respected, and
necessary fixes can be applied from one place.
Add "gettext-domain", "extension-id" (containing the base part of the
UUID) and "gschemabase" (which, combined with "extension-id", gives
the GSettings schema) to metadata.json, autogenerated by the build
system.
This way it is clear what license covers these extensions, and to
what extent it is possible to reuse the code.
Also, fixed the rule to avoid calling `pwd` a bunch of times.
Instead of destroying the whole menu and recreating it, find the
right position and just destroy/recreate the items we care about.
Based on a patch by Andrea Santilli <andreasantilli@gmx.com>
Recently gnome-shell changed the code to handle the window overlays
(to fix some bugs aboud the overlay flashing), which resulted in
invisible overlay with this extension. Fix by reimporting some code
from gnome-shell core.