From efc5f4f7a286ead1ee6f0957cd884077b4d8db0b Mon Sep 17 00:00:00 2001 From: mate Date: Thu, 5 May 2022 14:08:24 +0800 Subject: Add click-hide key to the stickynotes GSettings --- stickynotes/org.mate.stickynotes.gschema.xml.in | 5 +++++ stickynotes/stickynotes_applet_callbacks.c | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/stickynotes/org.mate.stickynotes.gschema.xml.in b/stickynotes/org.mate.stickynotes.gschema.xml.in index eb5d3927..c173f383 100644 --- a/stickynotes/org.mate.stickynotes.gschema.xml.in +++ b/stickynotes/org.mate.stickynotes.gschema.xml.in @@ -65,5 +65,10 @@ Whether to ask for confirmation when deleting a note Empty notes are always deleted without confirmation. + + true + Whether to hide all notes when click the icon + If this option is disabled, the note is not hidden when the icon is clicked. + diff --git a/stickynotes/stickynotes_applet_callbacks.c b/stickynotes/stickynotes_applet_callbacks.c index 6481bb82..d3061a17 100644 --- a/stickynotes/stickynotes_applet_callbacks.c +++ b/stickynotes/stickynotes_applet_callbacks.c @@ -67,6 +67,10 @@ stickynote_show_notes (gboolean visible) GList *l; if (stickynotes->visible == visible) return; + + if (g_settings_get_boolean (stickynotes->settings, "click-hide") && !visible) + return; + stickynotes->visible = visible; for (l = stickynotes->notes; l; l = l->next) { -- cgit v1.2.1