summaryrefslogtreecommitdiff
path: root/src/actionGroups/groupRegistry.vala
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2017-07-24 19:58:27 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2017-07-24 19:58:27 +0200
commit309d161f6d464fcea2de200bb3cb5a7cb784b6d3 (patch)
treea0d5ea02bfb3765191f2596aa8a7404f6b3a819c /src/actionGroups/groupRegistry.vala
parent45a3d7f0e2783d9898f017772583d31c1c9e0f03 (diff)
New upstream version 0.7.1upstream/0.7.1
Diffstat (limited to 'src/actionGroups/groupRegistry.vala')
-rw-r--r--src/actionGroups/groupRegistry.vala42
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;