[gnome-software/wip/temp/ubuntu-xenial-rebased-corrected: 136/331] Use traditional window decorations in Unity



commit dcd43779ca273522936cee3fa2c6d1789dcb23de
Author: Robert Ancell <robert ancell canonical com>
Date:   Thu Mar 3 15:13:50 2016 +1300

    Use traditional window decorations in Unity

 src/gs-shell.c |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-shell.c b/src/gs-shell.c
index 73319a8..c6528e5 100644
--- a/src/gs-shell.c
+++ b/src/gs-shell.c
@@ -674,6 +674,23 @@ gs_shell_monitor_permission (GsShell *shell)
                                  G_CALLBACK (on_permission_changed), shell);
 }
 
+static gboolean
+in_desktop (const gchar *name)
+{
+       const gchar *desktop_name_list;
+       g_auto(GStrv) names = NULL;
+       gint i;
+
+       desktop_name_list = g_getenv ("XDG_CURRENT_DESKTOP");
+       if (desktop_name_list == NULL)
+               return FALSE;
+
+       names = g_strsplit (desktop_name_list, ":", -1);
+       for (i = 0; names[i] && strcmp (names[i], name) != 0; i++);
+
+       return names[i] != NULL;
+}
+
 /**
  * gs_shell_setup:
  */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]