summaryrefslogtreecommitdiff
path: root/capplet/gsp-app.c
diff options
context:
space:
mode:
authorWu Xiaotian <[email protected]>2019-05-03 11:26:50 +0800
committerVictor Kareh <[email protected]>2019-05-09 15:12:46 -0400
commite8499e2e738a5227ddfc11a4b04b55543716d559 (patch)
treea7f2c851bd7f61e6abd7a62feeb9f21c7bea6764 /capplet/gsp-app.c
parent6b81375f406a5623015e4246d169b57ae621970e (diff)
downloadmate-session-manager-e8499e2e738a5227ddfc11a4b04b55543716d559.tar.bz2
mate-session-manager-e8499e2e738a5227ddfc11a4b04b55543716d559.tar.xz
Hide NoDisplay Apps in Startup Applications
Autostart applications are hidden in Startup Applications when NoDisplay=true. Fix #134.
Diffstat (limited to 'capplet/gsp-app.c')
-rw-r--r--capplet/gsp-app.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/capplet/gsp-app.c b/capplet/gsp-app.c
index 1e970e6..169701f 100644
--- a/capplet/gsp-app.c
+++ b/capplet/gsp-app.c
@@ -54,6 +54,7 @@ typedef struct {
char *path;
gboolean hidden;
+ gboolean nodisplay;
gboolean enabled;
char *name;
@@ -621,6 +622,18 @@ gsp_app_set_enabled (GspApp *app,
_gsp_app_emit_changed (app);
}
+gboolean
+gsp_app_get_nodisplay (GspApp *app)
+{
+ GspAppPrivate *priv;
+
+ g_return_val_if_fail (GSP_IS_APP (app), FALSE);
+
+ priv = gsp_app_get_instance_private (app);
+
+ return priv->nodisplay;
+}
+
const char *
gsp_app_get_name (GspApp *app)
{
@@ -953,7 +966,9 @@ gsp_app_new (const char *path,
priv->enabled = gsp_key_file_get_boolean (keyfile,
GSP_KEY_FILE_DESKTOP_KEY_AUTOSTART_ENABLED,
TRUE);
-
+ priv->nodisplay = gsp_key_file_get_boolean (keyfile,
+ G_KEY_FILE_DESKTOP_KEY_NO_DISPLAY,
+ FALSE);
priv->name = gsp_key_file_get_locale_string (keyfile,
G_KEY_FILE_DESKTOP_KEY_NAME);
priv->exec = gsp_key_file_get_string (keyfile,
@@ -1100,6 +1115,7 @@ gsp_app_create (const char *name,
priv->hidden = FALSE;
priv->enabled = TRUE;
+ priv->nodisplay = FALSE;
if (!gsm_util_text_is_blank (name)) {
priv->name = g_strdup (name);