diff options
author | lukefromdc <[email protected]> | 2016-10-23 23:50:34 -0400 |
---|---|---|
committer | lukefromdc <[email protected]> | 2016-10-23 23:50:34 -0400 |
commit | 570d6afed8ff62e430f46b3d87870702240ce3e8 (patch) | |
tree | 5e88cb203ebe285d1e7552bbb85f640437329d6d | |
parent | 6404fa33afc5b4961fea47f8eefd07f5b4ff913a (diff) | |
download | caja-570d6afed8ff62e430f46b3d87870702240ce3e8.tar.bz2 caja-570d6afed8ff62e430f46b3d87870702240ce3e8.tar.xz |
Add gsettings preference to enable/disable notifications
Defaults to TRUE
-rw-r--r-- | libcaja-private/caja-file-operations.c | 2 | ||||
-rw-r--r-- | libcaja-private/caja-global-preferences.h | 1 | ||||
-rw-r--r-- | libcaja-private/org.mate.caja.gschema.xml | 5 |
3 files changed, 8 insertions, 0 deletions
diff --git a/libcaja-private/caja-file-operations.c b/libcaja-private/caja-file-operations.c index a1172533..b76ef038 100644 --- a/libcaja-private/caja-file-operations.c +++ b/libcaja-private/caja-file-operations.c @@ -200,6 +200,8 @@ caja_application_notify_unmount_show (const gchar *message) gchar **strings; strings = g_strsplit (message, "\n", 0); + if (!g_settings_get_boolean (caja_preferences, CAJA_PREFERENCES_SHOW_NOTIFICATIONS)) return; + if (unmount_notify == NULL) { unmount_notify = notify_notification_new (strings[0], strings[1], diff --git a/libcaja-private/caja-global-preferences.h b/libcaja-private/caja-global-preferences.h index d97c7225..6fae1fc0 100644 --- a/libcaja-private/caja-global-preferences.h +++ b/libcaja-private/caja-global-preferences.h @@ -59,6 +59,7 @@ G_BEGIN_DECLS /* Desktop options */ #define CAJA_PREFERENCES_DESKTOP_IS_HOME_DIR "desktop-is-home-dir" +#define CAJA_PREFERENCES_SHOW_NOTIFICATIONS "show-notifications" /* Display */ #define CAJA_PREFERENCES_SHOW_HIDDEN_FILES "show-hidden-files" diff --git a/libcaja-private/org.mate.caja.gschema.xml b/libcaja-private/org.mate.caja.gschema.xml index 0668d584..0f84f4ec 100644 --- a/libcaja-private/org.mate.caja.gschema.xml +++ b/libcaja-private/org.mate.caja.gschema.xml @@ -241,6 +241,11 @@ <summary>Whether to show file sizes with IEC units</summary> <description>If set to true, file sizes are shown using IEC (base 1024) units with "KiB" style suffixes, instead of default with SI units.</description> </key> + <key name="show-notifications" type="b"> + <default>true</default> + <summary>Whether to show desktop notifications</summary> + <description>If set to true, caja will show desktop notifications for eject events</description> + </key> </schema> <schema id="org.mate.caja.icon-view" path="/org/mate/caja/icon-view/" gettext-domain="caja"> |