diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-07-24 19:58:27 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-07-24 19:58:27 +0200 |
commit | 5ad5531baa3ab7729427caf821fde6a6856da34e (patch) | |
tree | 016644484b3c5814879a0e910394e9b064d2b2d2 /src/actionGroups/groupRegistry.vala | |
parent | 394ad3b32f9f79775bcac4c6cc2a4dfa74586800 (diff) | |
parent | 309d161f6d464fcea2de200bb3cb5a7cb784b6d3 (diff) |
Updated version 0.7.1 from 'upstream/0.7.1'
with Debian dir 55ec79e844cfb79babaf0535d64bfdb9bd5b22f7
Diffstat (limited to 'src/actionGroups/groupRegistry.vala')
-rw-r--r-- | src/actionGroups/groupRegistry.vala | 42 |
1 files changed, 29 insertions, 13 deletions
diff --git a/src/actionGroups/groupRegistry.vala b/src/actionGroups/groupRegistry.vala index 89cde6a..eaaab24 100644 --- a/src/actionGroups/groupRegistry.vala +++ b/src/actionGroups/groupRegistry.vala @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// Copyright (c) 2011-2016 by Simon Schneegans +// Copyright (c) 2011-2017 by Simon Schneegans // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -54,28 +54,40 @@ public class GroupRegistry : GLib.Object { TypeDescription type_description; type_description = BookmarkGroup.register(); - types.add(typeof(BookmarkGroup).name()); - descriptions.set(typeof(BookmarkGroup).name(), type_description); + if (type_description != null) { + types.add(typeof(BookmarkGroup).name()); + descriptions.set(typeof(BookmarkGroup).name(), type_description); + } type_description = ClipboardGroup.register(); - types.add(typeof(ClipboardGroup).name()); - descriptions.set(typeof(ClipboardGroup).name(), type_description); + if (type_description != null) { + types.add(typeof(ClipboardGroup).name()); + descriptions.set(typeof(ClipboardGroup).name(), type_description); + } type_description = DevicesGroup.register(); - types.add(typeof(DevicesGroup).name()); - descriptions.set(typeof(DevicesGroup).name(), type_description); + if (type_description != null) { + types.add(typeof(DevicesGroup).name()); + descriptions.set(typeof(DevicesGroup).name(), type_description); + } type_description = MenuGroup.register(); - types.add(typeof(MenuGroup).name()); - descriptions.set(typeof(MenuGroup).name(), type_description); + if (type_description != null) { + types.add(typeof(MenuGroup).name()); + descriptions.set(typeof(MenuGroup).name(), type_description); + } type_description = SessionGroup.register(); - types.add(typeof(SessionGroup).name()); - descriptions.set(typeof(SessionGroup).name(), type_description); + if (type_description != null) { + types.add(typeof(SessionGroup).name()); + descriptions.set(typeof(SessionGroup).name(), type_description); + } type_description = WindowListGroup.register(); - types.add(typeof(WindowListGroup).name()); - descriptions.set(typeof(WindowListGroup).name(), type_description); + if (type_description != null) { + types.add(typeof(WindowListGroup).name()); + descriptions.set(typeof(WindowListGroup).name(), type_description); + } } ///////////////////////////////////////////////////////////////////// @@ -83,6 +95,8 @@ public class GroupRegistry : GLib.Object { ///////////////////////////////////////////////////////////////////// public static ActionGroup? create_group(string type_id, string parent_id) { + bool wayland = GLib.Environment.get_variable("XDG_SESSION_TYPE") == "wayland"; + switch (type_id) { case "bookmarks": return new BookmarkGroup(parent_id); @@ -95,9 +109,11 @@ public class GroupRegistry : GLib.Object { case "session": return new SessionGroup(parent_id); case "window_list": + if (wayland) return null; return new WindowListGroup(parent_id); // deprecated case "workspace_window_list": + if (wayland) return null; var group = new WindowListGroup(parent_id); group.current_workspace_only = true; return group; |