summaryrefslogtreecommitdiff
path: root/stickynotes
diff options
context:
space:
mode:
Diffstat (limited to 'stickynotes')
-rw-r--r--stickynotes/org.mate.stickynotes.gschema.xml.in5
-rw-r--r--stickynotes/stickynotes_applet_callbacks.c22
2 files changed, 26 insertions, 1 deletions
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 @@
<summary>Whether to ask for confirmation when deleting a note</summary>
<description>Empty notes are always deleted without confirmation.</description>
</key>
+ <key name="click-hide" type="b">
+ <default>true</default>
+ <summary>Whether to hide all notes when click the icon</summary>
+ <description>If this option is disabled, the note is not hidden when the icon is clicked.</description>
+ </key>
</schema>
</schemalist>
diff --git a/stickynotes/stickynotes_applet_callbacks.c b/stickynotes/stickynotes_applet_callbacks.c
index 6481bb82..e9eed40e 100644
--- a/stickynotes/stickynotes_applet_callbacks.c
+++ b/stickynotes/stickynotes_applet_callbacks.c
@@ -75,10 +75,30 @@ stickynote_show_notes (gboolean visible)
}
}
+static show_all_stickynote (void)
+{
+ StickyNote *note;
+ GList *l;
+
+ stickynotes->visible = TRUE;
+
+ for (l = stickynotes->notes; l; l = l->next) {
+ note = l->data;
+ stickynote_set_visible (note, TRUE);
+ }
+}
+
static void
stickynote_toggle_notes_visible (void)
{
- stickynote_show_notes (!stickynotes->visible);
+ gboolean click_hide;
+
+ click_hide = g_settings_get_boolean (stickynotes->settings, "click-hide");
+
+ if (click_hide == TRUE)
+ stickynote_show_notes (!stickynotes->visible);
+ else
+ show_all_stickynote ();
}
/* Applet Callback : Mouse button press on the applet. */