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.
By importing various stuff from core shell, now it works for me.
(In particular, what was missing was setting the modifierMask in
show()).
Also, remove the native mode. Users wishing to have it should just
disable the extension with the standard tools.
This is the stable release, so we support all of GNOME Shell
stable cycle without updates.
(As said earlier, dock and alternate-tab have issues, so they're
not marked 3.2 but just 3.2.0)
GNOME Shell has changed internal API here and there, and this
broke some extensions.
alternate-tab and dock still have issues, I'll try to solve them
post 3.2.0
In current GNOME Shell master, there are some more things that
we need to update on enable/disable. Also, the Do Not Disturb
item was changed to Notifications, and the meaning flipped.
TelepathyClient.Notification was renamed to ChatNotification, a
setChatState method was added in the Source API too and the timestamp
management changed a bit.
https://bugzilla.gnome.org/show_bug.cgi?id=657475
I was planning to add global.stage_xwindow, back when this was
written for core. Then this became an extension, but the reference
staid there.
We could use clutter_x11_get_stage_window(), if that wasn't marked
(skip). For now, let's just 0 (it is correct anyway, as we want
the dialog to be system modal)
main() has been replaced by init(), enable() and disable()
I'm not sure it actually disables, it should unless you have more
extensions messing with the same methods.