[geary/mjog/493-undo-send: 28/37] Add undo-send-delay application setting
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/mjog/493-undo-send: 28/37] Add undo-send-delay application setting
- Date: Sun, 17 Nov 2019 09:03:20 +0000 (UTC)
commit 8f8539788dcdb591e48978dd541a29e41725debc
Author: Michael Gratton <mike vee net>
Date: Sat Nov 9 16:43:43 2019 +1100
Add undo-send-delay application setting
desktop/org.gnome.Geary.gschema.xml | 7 +++++++
src/client/application/application-configuration.vala | 15 ++++++++++++---
2 files changed, 19 insertions(+), 3 deletions(-)
---
diff --git a/desktop/org.gnome.Geary.gschema.xml b/desktop/org.gnome.Geary.gschema.xml
index fafb6ba2..9f2467b5 100644
--- a/desktop/org.gnome.Geary.gschema.xml
+++ b/desktop/org.gnome.Geary.gschema.xml
@@ -113,6 +113,13 @@
<description>The last recorded size of the detached composer window.</description>
</key>
+ <key name="undo-send-delay" type="i">
+ <default>5</default>
+ <summary>Undo sending email delay</summary>
+ <description>The number of seconds to wait before sending an
+ email. Set to zero or less to disable.</description>
+ </key>
+
<key name="migrated-config" type="b">
<default>false</default>
<summary>Whether we migrated the old settings</summary>
diff --git a/src/client/application/application-configuration.vala
b/src/client/application/application-configuration.vala
index 10464c5a..051b4d7d 100644
--- a/src/client/application/application-configuration.vala
+++ b/src/client/application/application-configuration.vala
@@ -1,11 +1,13 @@
-/* Copyright 2016 Software Freedom Conservancy Inc.
+/*
+ * Copyright 2016 Software Freedom Conservancy Inc.
+ * Copyright 2019 Michael Gratton <mike vee net>
*
* This software is licensed under the GNU Lesser General Public License
- * (version 2.1 or later). See the COPYING file in this distribution.
+ * (version 2.1 or later). See the COPYING file in this distribution.
*/
/**
- * Provides convenience properties to current Geary GSettings values.
+ * Provides properties to access application GSettings values.
*/
public class Application.Configuration {
@@ -25,6 +27,7 @@ public class Application.Configuration {
public const string SPELL_CHECK_LANGUAGES = "spell-check-languages";
public const string SPELL_CHECK_VISIBLE_LANGUAGES = "spell-check-visible-languages";
public const string STARTUP_NOTIFICATIONS_KEY = "startup-notifications";
+ public const string UNDO_SEND_DELAY = "undo-send-delay";
public const string WINDOW_HEIGHT_KEY = "window-height";
public const string WINDOW_MAXIMIZE_KEY = "window-maximize";
public const string WINDOW_WIDTH_KEY = "window-width";
@@ -200,6 +203,12 @@ public class Application.Configuration {
}
}
+ /** The number of seconds to wait before sending an email. */
+ public int undo_send_delay {
+ get { return settings.get_int(UNDO_SEND_DELAY); }
+ }
+
+
// Creates a configuration object.
public Configuration(string schema_id) {
// Start GSettings.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]