From add9dd5ba8b984ba7371383cb9d527ebd5980e0e Mon Sep 17 00:00:00 2001 From: rbuj Date: Thu, 22 Apr 2021 14:43:13 +0200 Subject: Follow freedesktop guidelines to disable autorun using Hidden key --- capplet/gsm-properties-dialog.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'capplet/gsm-properties-dialog.c') diff --git a/capplet/gsm-properties-dialog.c b/capplet/gsm-properties-dialog.c index 434dcf0..cb314c5 100644 --- a/capplet/gsm-properties-dialog.c +++ b/capplet/gsm-properties-dialog.c @@ -118,7 +118,7 @@ _fill_iter_from_app (GtkListStore *list_store, const char *description; const char *app_name; - enabled = gsp_app_get_enabled (app); + enabled = !gsp_app_get_hidden (app); icon = gsp_app_get_icon (app); description = gsp_app_get_description (app); app_name = gsp_app_get_name (app); @@ -270,10 +270,9 @@ on_startup_enabled_toggled (GtkCellRendererToggle *cell_renderer, -1); active = gtk_cell_renderer_toggle_get_active (cell_renderer); - active = !active; if (app) { - gsp_app_set_enabled (app, active); + gsp_app_set_hidden (app, active); g_object_unref (app); } } @@ -500,12 +499,10 @@ visible_func (GtkTreeModel *model, -1); if (app) { - gboolean hidden; gboolean nodisplay; - hidden = gsp_app_get_hidden (app); nodisplay = gsp_app_get_nodisplay (app); - visible = !hidden && (show_hidden || !nodisplay); + visible = show_hidden || !nodisplay; g_object_unref (app); } else { visible = show_hidden; -- cgit v1.2.1