diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0dbb7578..61530bd6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,26 +21,24 @@ variables: INSTALL_CMD: ninja -v -C $BUILD_DIR install # Fedora packages - FEDORA_DEPS: meson vala - desktop-file-utils enchant2-devel folks-devel gcr-devel - glib2-devel gmime-devel gnome-online-accounts-devel - gspell-devel gtk3-devel iso-codes-devel json-glib-devel - itstool libappstream-glib-devel libcanberra-devel - libgee-devel libhandy-devel libpeas-devel - libsecret-devel libunwind-devel libxml2-devel - libytnef-devel sqlite-devel webkitgtk4-devel + FEDORA_DEPS: + meson vala desktop-file-utils enchant2-devel folks-devel gcr-devel + glib2-devel gmime-devel gnome-online-accounts-devel gspell-devel + gtk3-devel iso-codes-devel json-glib-devel itstool + libappstream-glib-devel libgee-devel libhandy-devel libpeas-devel + libsecret-devel libunwind-devel libxml2-devel libytnef-devel + sqlite-devel webkitgtk4-devel FEDORA_TEST_DEPS: Xvfb tar xz # Ubuntu packages - UBUNTU_DEPS: meson build-essential valac - desktop-file-utils gettext iso-codes itstool - libappstream-glib-dev libcanberra-dev libenchant-dev - libfolks-dev libgcr-3-dev libgee-0.8-dev libglib2.0-dev - libgmime-2.6-dev libgoa-1.0-dev libgspell-1-dev - libgtk-3-dev libhandy-0.0-dev libjson-glib-dev - libmessaging-menu-dev libpeas-dev libsecret-1-dev - libsqlite3-dev libunity-dev libunwind-dev - libwebkit2gtk-4.0-dev libxml2-dev libytnef0-dev + UBUNTU_DEPS: + meson build-essential valac desktop-file-utils gettext iso-codes + itstool libappstream-glib-dev libenchant-dev libfolks-dev + libgcr-3-dev libgee-0.8-dev libglib2.0-dev libgmime-2.6-dev + libgoa-1.0-dev libgspell-1-dev libgtk-3-dev libhandy-0.0-dev + libjson-glib-dev libmessaging-menu-dev libpeas-dev libsecret-1-dev + libsqlite3-dev libunity-dev libunwind-dev libwebkit2gtk-4.0-dev + libxml2-dev libytnef0-dev UBUNTU_TEST_DEPS: xauth xvfb # fedora: diff --git a/INSTALL b/INSTALL index 43ed6e33..f77f3b52 100644 --- a/INSTALL +++ b/INSTALL @@ -39,13 +39,13 @@ Installing dependencies on Fedora Install them by running this command: - sudo yum install meson vala \ - desktop-file-utils enchant2-devel folks-devel gcr-devel \ - glib2-devel gmime-devel gnome-online-accounts-devel \ - gspell-devel gtk3-devel iso-codes-devel json-glib-devel \ - libappstream-glib-devel libcanberra-devel libgee-devel \ - libhandy-devel libpeas-devel libsecret-devel libunwind-devel \ - libxml2-devel libytnef-devel sqlite-devel webkitgtk4-devel + sudo yum install meson vala desktop-file-utils enchant2-devel \ + folks-devel gcr-devel glib2-devel gmime-devel \ + gnome-online-accounts-devel gspell-devel gtk3-devel \ + iso-codes-devel json-glib-devel libappstream-glib-devel \ + libgee-devel libhandy-devel libpeas-devel libsecret-devel \ + libunwind-devel libxml2-devel libytnef-devel sqlite-devel \ + webkitgtk4-devel Installing dependencies on Ubuntu/Debian ---------------------------------------- @@ -53,7 +53,7 @@ Installing dependencies on Ubuntu/Debian Install them by running this command: sudo apt-get install meson build-essential valac \ - desktop-file-utils iso-codes gettext itstool libcanberra-dev \ + desktop-file-utils iso-codes gettext itstool \ libappstream-glib-dev libenchant-dev libfolks-dev libgcr-3-dev \ libgee-0.8-dev libglib2.0-dev libgmime-2.6-dev libgoa-1.0-dev \ libgspell-1-dev libgtk-3-dev libjson-glib-dev libhandy-0.0-dev \ diff --git a/desktop/org.gnome.Geary.gschema.xml b/desktop/org.gnome.Geary.gschema.xml index cfae778b..fafb6ba2 100644 --- a/desktop/org.gnome.Geary.gschema.xml +++ b/desktop/org.gnome.Geary.gschema.xml @@ -77,12 +77,6 @@ List of languages that are always displayed in the popover of the spell checker. - - true - Enable notification sounds - True to play sounds for notifications and sending. - - false Notify of new mail at startup diff --git a/meson.build b/meson.build index 61864e47..98d4527f 100644 --- a/meson.build +++ b/meson.build @@ -88,7 +88,6 @@ gthread = dependency('gthread-2.0', version: '>=' + target_glib) iso_codes = dependency('iso-codes') javascriptcoregtk = dependency('javascriptcoregtk-4.0', version: '>=' + target_webkit) json_glib = dependency('json-glib-1.0', version: '>= 1.0') -libcanberra = dependency('libcanberra', version: '>= 0.28') libhandy = dependency('libhandy-0.0', version: '>= 0.0.9', required: false) libmath = cc.find_library('m') libpeas = dependency('libpeas-1.0', version: '>= 1.24.0') diff --git a/src/client/application/application-controller.vala b/src/client/application/application-controller.vala index 1edf05e3..22f22758 100644 --- a/src/client/application/application-controller.vala +++ b/src/client/application/application-controller.vala @@ -144,7 +144,6 @@ public class Application.Controller : Geary.BaseObject { private UpgradeDialog upgrade_dialog; private Folks.IndividualAggregator folks; - private Canberra.Context sound_context; private PluginManager plugin_manager; @@ -251,8 +250,6 @@ public class Application.Controller : Geary.BaseObject { error("Error loading web resources: %s", err.message); } - Canberra.Context.create(out this.sound_context); - this.folks = Folks.IndividualAggregator.dup(); if (!this.folks.is_prepared) { // Do this in the background since it can take a long time @@ -2448,16 +2445,16 @@ public class Application.Controller : Geary.BaseObject { this.main_window.conversation_list_view.grab_focus(); } - private void on_sent(Geary.RFC822.Message rfc822) { + private void on_sent(Geary.Account account, Geary.RFC822.Message sent) { // Translators: The label for an in-app notification. The // string substitution is a list of recipients of the email. string message = _( "Successfully sent mail to %s." - ).printf(Util.Email.to_short_recipient_display(rfc822.to)); + ).printf(Util.Email.to_short_recipient_display(sent.to)); Components.InAppNotification notification = new Components.InAppNotification(message); this.main_window.add_notification(notification); - this.play_sound("message-sent-email"); + this.plugin_manager.notifications.email_sent(account, sent); } private void on_conversation_view_added(ConversationListBox list) { @@ -2687,12 +2684,6 @@ public class Application.Controller : Geary.BaseObject { return false; } - public void play_sound(string sound) { - if (this.application.config.play_sounds) { - this.sound_context.play(0, Canberra.PROP_EVENT_ID, sound); - } - } - private void on_account_available(Geary.AccountInformation info) { Geary.Account? account = null; try { diff --git a/src/client/application/application-notification-context.vala b/src/client/application/application-notification-context.vala index 4aa30911..cf78ca9c 100644 --- a/src/client/application/application-notification-context.vala +++ b/src/client/application/application-notification-context.vala @@ -89,6 +89,11 @@ public class Application.NotificationContext : Geary.BaseObject { /** Emitted when a folder has been cleared of new messages. */ public signal void new_messages_retired(Geary.Folder parent, int total); + /** Emitted when an email has been sent. */ + public signal void email_sent(Geary.Account account, + Geary.RFC822.Message sent); + + /** Constructs a new context instance. */ internal NotificationContext(AvatarStore avatars, GetContactStore contact_store_delegate, diff --git a/src/client/application/geary-config.vala b/src/client/application/geary-config.vala index 99917b76..03074088 100644 --- a/src/client/application/geary-config.vala +++ b/src/client/application/geary-config.vala @@ -19,7 +19,6 @@ public class Configuration { public const string MESSAGES_PANE_POSITION_KEY = "messages-pane-position"; public const string AUTOSELECT_KEY = "autoselect"; public const string DISPLAY_PREVIEW_KEY = "display-preview"; - public const string PLAY_SOUNDS_KEY = "play-sounds"; public const string STARTUP_NOTIFICATIONS_KEY = "startup-notifications"; public const string ASK_OPEN_ATTACHMENT_KEY = "ask-open-attachment"; public const string COMPOSE_AS_HTML_KEY = "compose-as-html"; @@ -154,10 +153,6 @@ public class Configuration { } } - public bool play_sounds { - get { return settings.get_boolean(PLAY_SOUNDS_KEY); } - } - public bool startup_notifications { get { return settings.get_boolean(STARTUP_NOTIFICATIONS_KEY); } set { set_boolean(STARTUP_NOTIFICATIONS_KEY, value); } diff --git a/src/client/dialogs/preferences-dialog.vala b/src/client/dialogs/preferences-dialog.vala index fe9c02a0..72459c1c 100644 --- a/src/client/dialogs/preferences-dialog.vala +++ b/src/client/dialogs/preferences-dialog.vala @@ -16,9 +16,6 @@ public class PreferencesDialog : Gtk.Dialog { [GtkChild] private Gtk.CheckButton three_pane_view; - [GtkChild] - private Gtk.CheckButton play_sounds; - [GtkChild] private Gtk.CheckButton startup_notifications; @@ -36,7 +33,6 @@ public class PreferencesDialog : Gtk.Dialog { config.bind(Configuration.AUTOSELECT_KEY, autoselect, "active"); config.bind(Configuration.DISPLAY_PREVIEW_KEY, display_preview, "active"); config.bind(Configuration.FOLDER_LIST_PANE_HORIZONTAL_KEY, three_pane_view, "active"); - config.bind(Configuration.PLAY_SOUNDS_KEY, play_sounds, "active"); config.bind(Configuration.STARTUP_NOTIFICATIONS_KEY, startup_notifications, "active"); } diff --git a/src/client/meson.build b/src/client/meson.build index 37666c42..8b760907 100644 --- a/src/client/meson.build +++ b/src/client/meson.build @@ -124,7 +124,6 @@ geary_client_dependencies = [ gtk, javascriptcoregtk, json_glib, - libcanberra, libhandy, libmath, libpeas, diff --git a/ui/preferences-dialog.ui b/ui/preferences-dialog.ui index 37e0c72f..dc6cd9d0 100644 --- a/ui/preferences-dialog.ui +++ b/ui/preferences-dialog.ui @@ -39,17 +39,20 @@ True False - + + _Automatically select next message True - False + True + False + 12 + 5 + 12 5 5 5 - Reading + True 0 - - - + True 0 @@ -57,11 +60,13 @@ - - _Automatically select next message + + _Display conversation preview True True False + 12 + 5 12 5 5 @@ -76,11 +81,13 @@ - - _Display conversation preview + + Use _three pane view True True False + 12 + 5 12 5 5 @@ -94,62 +101,6 @@ 2 - - - Use _three pane view - True - True - False - 12 - 5 - 5 - 5 - True - 0 - True - - - 0 - 3 - - - - - True - False - 5 - 5 - 5 - Notifications - 0 - - - - - - 0 - 4 - - - - - _Play notification sounds - True - True - False - 12 - 5 - 5 - 5 - True - 0 - True - - - 0 - 5 - - _Watch for new mail when closed @@ -169,7 +120,7 @@ 0 - 6 + 3