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:10:37 -0400
commitfb24ae35d358177cfaa1706280b3e0752a2ec97b (patch)
tree63c5349e78dfdd31eece997e06f03854919f8555 /capplet/gsp-app.c
parent7b242fb0745aa6c70a7712743cdde1d6c7209afc (diff)
downloadmate-session-manager-fb24ae35d358177cfaa1706280b3e0752a2ec97b.tar.bz2
mate-session-manager-fb24ae35d358177cfaa1706280b3e0752a2ec97b.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);