Commit Graph

379 Commits

Author SHA1 Message Date
Florian Müllner
4cde6facc9 window-list: Use font-relative size in classic style
Commit 85b7049376 fixed this for the regular session, but forgot to also
update the classic style.
2015-09-04 19:56:23 +02:00
Florian Müllner
547163e895 places: Include DESKTOP when desktop icons are enabled
The user explicitly enabling desktop icons is a pretty good hint
that she intends to use the Desktop folder, so be consistent with
GTK+ and nautilus and include it when the corresponding setting
is true.

https://bugzilla.gnome.org/show_bug.cgi?id=754578
2015-09-04 17:50:06 +02:00
Florian Müllner
31506a342c workspace-indicator: Use consistent workspace numbering
The indicator numbers workspaces starting from 1, while newly added
workspace names in the preference dialog start counting at 0.
Change the latter to be consistent with the indicator.

https://bugzilla.gnome.org/show_bug.cgi?id=753105
2015-07-31 16:47:18 +02:00
Florian Müllner
d1bf592539 apps-menu: Handle non-UTF8 filename encodings more gracefully
Instead of failing completely if any .desktop file uses a filename
encoding other than UTF-8, just filter out the offending apps.

https://bugzilla.gnome.org/show_bug.cgi?id=651503
2015-07-31 16:22:32 +02:00
Florian Müllner
6062284ac4 window-list: Don't consider skip-taskbar windows for app sorting
It is odd to consider windows that are not shown in the window list
for app sorting, in particular when switching between grouped and
ungrouped mode, and when a long-lived window like the DESKTOP is
present.

https://bugzilla.gnome.org/show_bug.cgi?id=753055
2015-07-30 18:24:19 +02:00
Florian Müllner
85b7049376 window-list: Use font-relative sizes for width/height
Just like the top bar, the window list should scale according to
the font scaling factor, so convert the existing pixel sizes into
font-relative ones.

https://bugzilla.gnome.org/show_bug.cgi?id=703585
2015-06-19 23:49:01 +02:00
Florian Müllner
61ec98f504 window-list: Reposition on height changes
The window list position depends on both the monitor geometry and the
list height, however changes to the latter are currently ignored. For
the time being this doesn't matter due to the list's fixed height, but
we are about to scale the list with the text, so reposition the list
on height changes.

https://bugzilla.gnome.org/show_bug.cgi?id=703585
2015-06-19 23:49:01 +02:00
Florian Müllner
b97c111bde window-list: Expand window buttons vertically
The window-list's fixed height currently allows us to get away without
expanding buttons, however this won't be the case anymore once we start
adapting the list with the text scaling. So fix up the code to do what
was always the intention anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=703585
2015-06-19 23:49:01 +02:00
Florian Müllner
8b89840e2b apps-menu: Remove some obsolete code
The hot corner code has been modifying the existing hot corner rather
than replacing it with a custom one for quite a while now ...
2015-06-19 18:22:47 +02:00
Siteshwar Vashisht
dd620df620 apps-menu: Fix call to open_new_window()
The function never had a timestamp parameter, the parameter that was
added at some point is a workspace index. Ouch, this has gone unspotted
since the original AxeMenu extension was adapted for the apps-menu ...
2015-06-12 15:29:32 +02:00
Florian Müllner
0a5e5ee93c apps-menu: Take over shortcuts again on startup-complete
For a while now, gnome-shell has initialized extensions before
setting up its own keybinding handling. As a result, our taking
over of the panel-main-menu shortcut will be overwritten when
the extension is enabled at startup - work around this by setting
up the keybinding again on LayoutManager::startup-complete.

https://bugzilla.gnome.org/show_bug.cgi?id=746639
2015-03-24 14:20:49 +01:00
Florian Müllner
8f4cecc8e5 apps-menu: Move panel-main-menu handling into AppsMenuButton
This is really where it belongs, and will make an upcoming fix slightly
less ugly ...

https://bugzilla.gnome.org/show_bug.cgi?id=746639
2015-03-24 14:20:49 +01:00
Florian Müllner
487c089e86 apps-menu: Clean up signal code
Setting up signal handlers inside a class and rely on outside code
to disconnect them via global variables is utterly weird. Just
disconnect everything inside the class when the corresponding actor
is destroyed.

https://bugzilla.gnome.org/show_bug.cgi?id=746639
2015-03-24 14:20:49 +01:00
Rui Matos
903a3b25cb window-list: Fix WorkspaceIndicator's popup menu position
By default, PanelMenu.Button creates a popup menu with arrow side TOP
which is wrong in our case and can mess up BoxPointer's positioning.

We can work around that easily by creating the menu ourselves with the
correct arrow side.

https://bugzilla.gnome.org/show_bug.cgi?id=746365
2015-03-24 12:58:07 +01:00
Florian Müllner
11b151e5e0 native-window-placement: Update for mutter API changes 2015-03-17 19:46:05 +01:00
Florian Müllner
0b18b15fee screenshot-window-size: Update for mutter API changes 2015-03-17 19:46:05 +01:00
Florian Müllner
5e9f66f3d1 Use a proper arrows instead of UTF8
All proper shell menus were updated to do that a while ago, we
should do the same for consistency.

https://bugzilla.gnome.org/show_bug.cgi?id=745909
2015-03-10 19:56:41 +01:00
Florian Müllner
8bad8a3b63 window-list: Don't use 'panel-menu' class in bottom panel
Menus in the top bar have some margin at the bottom, to prevent
menus to extend all the way to the bottom edge as the expand; we
obviously don't want the same behavior in the window-list at the
bottom, so stop pretending to be a top bar menu.

https://bugzilla.gnome.org/show_bug.cgi?id=745952
2015-03-10 14:27:16 +01:00
Florian Müllner
715f445f61 apps-menu: Make it a bit narrower
General rule: if it can fit "GNU Image Manipulation Program", it is
wide enough ...

https://bugzilla.gnome.org/show_bug.cgi?id=745670
2015-03-06 17:28:01 +01:00
Florian Müllner
c9a6421f36 extensions: Remove systemMonitor extension
The systemMonitor extension extends the message tray with its UI, which
obviously broke when the bottom tray was removed. It has also been the
source for various performance/memory issues in the past and is part of
the semi-random collection that pre-dates the extension.gnome.org site
rather than the set of classic-mode/endorsed extensions, so just remove
it from the module.
Hopefully this will motivate someone who actually cares about it to pick
it up ...

https://bugzilla.gnome.org/show_bug.cgi?id=745195
2015-03-05 17:14:48 +01:00
Florian Müllner
a39aba4099 app-menu: Remove unused function
This was an override for a parent function that hasn't existed
since summer 2013 ...

https://bugzilla.gnome.org/show_bug.cgi?id=745670
2015-03-05 16:33:36 +01:00
Florian Müllner
c69ea808ae launch-new-instance: Fix warning
Commit 2667b9f3e5 updated the extension for a shell change that
renamed _onActivate() to _activate, but forgot to also rename the
declaration of the variable that stores the original function.
Fix this to stop a warning about assignment to an undefined variable.

https://bugzilla.gnome.org/show_bug.cgi?id=745470
2015-03-02 21:05:43 +01:00
Florian Müllner
7afdb541ce window-list: Adjust to trayBox removal
The point of that code is to keep the window-list underneath
modals' lightboxes if possible (i.e. unless the OSK is shown).
The trayBox was a natural pick back in the day, but the panel
will do just as well ...

https://bugzilla.gnome.org/show_bug.cgi?id=745304
2015-02-27 20:17:31 +01:00
Rui Matos
c0170ff945 window-list: Check if the window title is set
MetaWindow.title might be NULL, particularly for Wayland clients where
setting the title is a request separate from window creation. We
shouldn't try to set StLabel's text prop in that case.

https://bugzilla.gnome.org/show_bug.cgi?id=745064
2015-02-24 21:09:02 +01:00
Florian Müllner
93a1fd0b60 window-list: Fix for "app-less" windows
While rare, it is possible to have a window not associated with any app
(not even a fake window-based one). We currently throw an error when
trying to set the icon for such a window, so handle this case and
use a fallback icon instead of the app icon.

https://bugzilla.gnome.org/show_bug.cgi?id=743401
2015-02-20 18:28:32 +01:00
Florian Müllner
04ec4de375 window-list: Remove message tray handling
Notification banners are now displayed at the top, and the summary
moved into the date and time drop down - the bottom is ours now,
no more special sauce needed to interact with it gracefully.
2015-02-20 17:57:02 +01:00
Florian Müllner
adc68889b7 window-list: Keep panel below modal dialogs when possible
Currently the window-list will be stacked above system modal dialogs,
which means it is not dimmed like the rest of the desktop and remains
accessible to interaction. We cannot do any better when showing the
on-screen keyboard, as we need to keep ourselves above to not end up
covered by the OSK, and the keyboard itself is stacked above modal
dialogs to allow its use for input. However we can at least fix the
case when not using the OSK.

https://bugzilla.gnome.org/show_bug.cgi?id=740722
2015-01-15 13:56:57 +01:00
Florian Müllner
0e0f7c80c2 Update for KeyBindingMode => ActionMode change 2014-12-19 16:13:29 +01:00
Florian Müllner
8b59c031d5 window-list: Do not hardcode overrides schema
Classic mode uses a different overrides schema, so make sure we use the
correct setting instead of hardcoding the usual org.gnome.shell.overrides
schema.

https://bugzilla.gnome.org/show_bug.cgi?id=737486
2014-12-19 15:15:44 +01:00
Sylvain Pasche
a3f352d0c3 window-list: Option to show the window list on all monitors
A new setting "show-on-all-monitors" (false by default) is available to
show window lists on all connected monitors.
The Extension object monitors conditions that require the list of
windows to be rebuilt. The WindowList and Button classes have a new
"perMonitor" property that indicates they should handle windows on
their own monitor only.

https://bugzilla.gnome.org/show_bug.cgi?id=737486
2014-12-19 15:15:44 +01:00
Sylvain Pasche
e80b790b78 window-list: Refactor {Window,App}Button shared code into BaseButton
BaseButton is a new class that shares the common logic of WindowButton
and AppButton. AppButton is passed to AppContextMenu so that it can reuse
code from the now public getWindowList() method.

https://bugzilla.gnome.org/show_bug.cgi?id=737486
2014-12-19 15:15:44 +01:00
Maxime Henrion
768bad6e1e Skip over XDG directories that cannot be found.
This fixes loading the places menu gnome-shell extension when the XDG
directories have not been configured.

https://bugzilla.gnome.org/show_bug.cgi?id=741033
2014-12-02 18:59:30 +01:00
Florian Müllner
8c6644f1be Revert "user-theme: Temporarily work around a gnome-shell regression"
The issue has been fixed in gnome-shell master, so we can revert the
workaround.
2014-11-27 14:49:43 +00:00
Florian Müllner
dd3c7ca199 user-theme: Temporarily work around a gnome-shell regression
setThemeStylesheet() stopped accepting %null to revert to the default
stylesheet. The issue is fixed in gnome-shell master, but work around
it for 3.15.2 to not ship broken (again).
2014-11-27 14:42:01 +00:00
Sylvain Pasche
5c2d13ec51 window-list: Move messageTray patching to the WindowList class
Move messageTray patching form the Extension object to the WindowList
class. Moreover, only do the patching if the window list is on the bottom
monitor. This refactoring will make it easier to have several instances
of WindowList (one on each monitor).

https://bugzilla.gnome.org/show_bug.cgi?id=737486
2014-11-26 20:00:50 +01:00
Sylvain Pasche
5fc66444b6 window-list: Refactoring to use an Extension object
Move the global state into a new Extension object. This is in
preparation for adding more logic to the Extension object.

https://bugzilla.gnome.org/show_bug.cgi?id=737486
2014-11-26 20:00:50 +01:00
Sylvain Pasche
57bfb9400e window-list: _pointerInTray was renamed to _pointerInNotification in bug 695800
https://bugzilla.gnome.org/show_bug.cgi?id=737486
2014-11-26 20:00:50 +01:00
Sylvain Pasche
4a1f49586d window-list: Disconnect drag and drop handlers
https://bugzilla.gnome.org/show_bug.cgi?id=737486
2014-11-26 20:00:49 +01:00
Florian Müllner
92012f6626 apps-menu: Center app labels
Currently labels are not vertically centered, unlike icons.
Fix this.

https://bugzilla.gnome.org/show_bug.cgi?id=740724
2014-11-26 19:06:41 +01:00
Florian Müllner
92b7c44e6d apps-menu: Update menu arrow to use an icon
gnome-shell no longer uses labels with UTF8 arrows, so the currently
used arrow is no longer consistent with other menus; fix that.

https://bugzilla.gnome.org/show_bug.cgi?id=740725
2014-11-26 18:54:18 +01:00
Florian Müllner
4da36684ad drive-menu: Adjust for renamed .desktop file name
Nautilus now uses reverse domain notation for its .desktop file,
adjust for that.

https://bugzilla.gnome.org/show_bug.cgi?id=739931
2014-11-12 19:53:13 +01:00
Florian Müllner
109bdd1cd0 drive-menu: Update for gnome-shell changes
Since shell commit 3227d4f3edad, Shell.Global.create_app_launch_context()
expects additional parameters.
2014-11-12 19:51:33 +01:00
Florian Müllner
e669aa75b6 Revert "screenshot-window-sizer: Do not translate schema for now"
This reverts commit 53b1149d0a0316602bea310b624f3ad8b839541e.
2014-10-14 21:43:16 +02:00
Florian Müllner
e372c5ace8 window-list: Avoid flashing when using auto-grouping
Currently when using auto-grouping, the list is ungrouped each
time a window is closed, and then possibly re-grouped on the next
allocation - as a result, there is a brief "ungroup flash" if the
list is supposed to remain grouped.
Avoid this by computing the width the ungrouped list would have
rather than by actually ungrouping it.

https://bugzilla.gnome.org/show_bug.cgi?id=738286
2014-10-11 00:06:59 +02:00
Florian Müllner
614d1c9697 window-list: Fix spacing in app buttons 2014-10-07 20:01:56 +02:00
Florian Müllner
70056ba56e window-list: Don't unnecessarily add/remove window buttons
Since commit 191c7ccc24, we check whether we already have a window
in the list before re-adding it on MetaWorkspace::window-added.
We can do something similar on MetaWorkspace::window-removed to
avoid some extra work when a window is moved between workspaces
rather than destroyed.
2014-10-07 18:57:45 +02:00
Florian Müllner
4af36f41fa window-list: Don't use Meta.get_window_actors() directly
The list returned may contain windows that are being destroyed.
The ShellGlobal method filters those out, so use that instead; we
should eventually stop looking at window actors when we want windows,
but for now this is the easy and safe thing to do.
2014-10-07 17:19:00 +02:00
Florian Müllner
60ea0fb172 Stop using deprecated GSettings:schema property 2014-10-07 14:38:12 +02:00
Florian Müllner
54e39c9779 launch-new-instance: Re-use original activate function
Rather than re-implementing the function (and risk missing improvements
like the launch animation), call the original one as if the user had
middle-clicked the launcher.
2014-09-29 15:32:02 +02:00
Florian Müllner
d4ca2aeeb5 extension: Reuse original handler in keyPressHandler injection
We do need to inject our own handler to treat application-switch
actions the same way as the corresponding window-switch ones;
we can actually express exactly this without re-implementing the
entire function, by calling the original handler with a tweaked
action parameter - the resulting code is not only more concise,
but should also be a bit more robust against changes in core.

https://bugzilla.gnome.org/show_bug.cgi?id=737457
2014-09-29 15:32:02 +02:00