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)
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.
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.
If one wants the extension, clearly he doesn't want the default
layout of windows, therefore it doesn't make sense to replicate
it and to keep settings for it.
Some keyboard layouts (in particular, azerty / french) require
pressing shift to obtain numerals. Therefore we should not cancel
the switch when shift is pressed.
Also, we should accept indifferently left or right modifiers.
After enabling, the user menu was keeping a reference to a
destroyed actor, and then was updating it from signals. Updating
this (a StEntry) caused g_criticals because of a NULL ClutterText.
Instead we can null out the actor entirely, which will stop
the signal handler from doing any harm.
It is not used anymore, now that translations are bundled with
the extension. Also, in the zip files it ended up with my home
folder, which is not nice.
Common code for retrieving translations and GSettings schemas has
been factored out into lib/convenience.js, which is part of
every extension installation.
Since that code relies on renames done at zip file creation time,
extensions can no longer be installed with "make install". Instead,
one should create the zip file and install it with the tweak-tool.
There is also a bash script, local-install.sh, that will install
everything in zip-files.
Also, since the GSettingsSchemaSource code is not yet in a stable
GLib release, extensions using GSettings have seen their stable
shell version removed.
Now, typing "make zip-file" will create a standard zip-file for each
extension, with everything necessary, including translations and GSettings schemas.
These files can then be installed with the tweak-tool or uploaded
at extensions.gnome.org
Based on an earlier patch by Jasper St. Pierre.
gnome-shell has been ported to GDBus, and this changed some of
its internal API.
Of course, this means that alternative-status-menu no longer works
with 3.2.0.
To go along GNOME Shell 3.2.1
Also, mark both alternate-tab and dock as generally "working with
3.2", since the most outstanding bugs seem to be fixed now.
We cannot return from show() without creating an AppSwitcher, as it
will subsequently crash in core shell code due to _appSwitcher being null.
We can prevent this by destroying the actor (which will prevent it
from being allocated and thus avoid the crash).
Prior to this fix, the variables 'enter_event' and 'leave_event' in the
handler for the 'changed' event for the
'/org/gnome/shell/extensions/dock/hide_effect' dconf key were
uninitialized. This made switching the hide effect at runtime throw an
error. By promoting these two variables to instance members and
assigning to them upon initialization, this problem should be fixed.
https://bugzilla.gnome.org/show_bug.cgi?id=662389
The name property is supposed to be already a displayable string,
without any further work.
Also, that gettext call wouldn't have any effect, since we don't
have those strings in our catalogs.