Merge lp:~elementary-apps/pantheon-mail/remove-notify-prefs into lp:~elementary-apps/pantheon-mail/trunk

Proposed by Danielle Foré
Status: Merged
Approved by: kay van der Zander
Approved revision: 1870
Merged at revision: 1882
Proposed branch: lp:~elementary-apps/pantheon-mail/remove-notify-prefs
Merge into: lp:~elementary-apps/pantheon-mail/trunk
Diff against target: 200 lines (+7/-81)
6 files modified
data/org.yorba.geary.gschema.xml (+0/-10)
data/ui/preferences.glade (+3/-50)
src/client/application/geary-config.vala (+0/-10)
src/client/dialogs/preferences-dialog.vala (+0/-2)
src/client/notification/libmessagingmenu.vala (+1/-1)
src/client/notification/libnotify.vala (+3/-8)
To merge this branch: bzr merge lp:~elementary-apps/pantheon-mail/remove-notify-prefs
Reviewer Review Type Date Requested Status
kay van der Zander (community) Approve
Review via email: mp+277939@code.launchpad.net

Commit message

Remove notification preferences

Description of the change

Notification preferences are handled in Switchboard now

To post a comment you must log in.
1870. By Danielle Foré

Remove notification preferences

Revision history for this message
kay van der Zander (kay20) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'data/org.yorba.geary.gschema.xml'
2--- data/org.yorba.geary.gschema.xml 2015-03-10 23:08:59 +0000
3+++ data/org.yorba.geary.gschema.xml 2015-11-23 01:32:24 +0000
4@@ -73,16 +73,6 @@
5 <summary>enable inline spell checking</summary>
6 <description>True to spell check while typing.</description>
7 </key>
8- <key name="play-sounds" type="b">
9- <default>true</default>
10- <summary>enable notification sounds</summary>
11- <description>True to play sounds for notifications and sending.</description>
12- </key>
13- <key name="show-notifications" type="b">
14- <default>true</default>
15- <summary>show notifications for new mail</summary>
16- <description>True to show notification bubbles.</description>
17- </key>
18 <key name="startup-notifications" type="b">
19 <default>false</default>
20 <summary>notify of new mail at startup</summary>
21
22=== modified file 'data/ui/preferences.glade'
23--- data/ui/preferences.glade 2015-03-11 00:35:07 +0000
24+++ data/ui/preferences.glade 2015-11-23 01:32:24 +0000
25@@ -1,9 +1,11 @@
26 <?xml version="1.0" encoding="UTF-8"?>
27+<!-- Generated with glade 3.18.3 -->
28 <interface>
29 <requires lib="gtk+" version="3.10"/>
30 <object class="GtkDialog" id="dialog">
31 <property name="can_focus">False</property>
32 <property name="border_width">12</property>
33+ <property name="resizable">False</property>
34 <property name="window_position">center-on-parent</property>
35 <property name="type_hint">dialog</property>
36 <child internal-child="vbox">
37@@ -158,44 +160,6 @@
38 </packing>
39 </child>
40 <child>
41- <object class="GtkCheckButton" id="play_sounds">
42- <property name="label" translatable="yes">_Play notification sounds</property>
43- <property name="visible">True</property>
44- <property name="can_focus">True</property>
45- <property name="receives_default">False</property>
46- <property name="margin_left">12</property>
47- <property name="margin_right">5</property>
48- <property name="margin_top">5</property>
49- <property name="margin_bottom">5</property>
50- <property name="use_underline">True</property>
51- <property name="xalign">0</property>
52- <property name="draw_indicator">True</property>
53- </object>
54- <packing>
55- <property name="left_attach">0</property>
56- <property name="top_attach">7</property>
57- </packing>
58- </child>
59- <child>
60- <object class="GtkCheckButton" id="show_notifications">
61- <property name="label" translatable="yes">Show _notifications for new mail</property>
62- <property name="visible">True</property>
63- <property name="can_focus">True</property>
64- <property name="receives_default">False</property>
65- <property name="margin_left">12</property>
66- <property name="margin_right">5</property>
67- <property name="margin_top">5</property>
68- <property name="margin_bottom">5</property>
69- <property name="use_underline">True</property>
70- <property name="xalign">0</property>
71- <property name="draw_indicator">True</property>
72- </object>
73- <packing>
74- <property name="left_attach">0</property>
75- <property name="top_attach">8</property>
76- </packing>
77- </child>
78- <child>
79 <object class="GtkCheckButton" id="startup_notifications">
80 <property name="label" translatable="yes">Always _watch for new mail</property>
81 <property name="visible">True</property>
82@@ -212,12 +176,9 @@
83 </object>
84 <packing>
85 <property name="left_attach">0</property>
86- <property name="top_attach">9</property>
87+ <property name="top_attach">7</property>
88 </packing>
89 </child>
90- <child>
91- <placeholder/>
92- </child>
93 </object>
94 <packing>
95 <property name="expand">False</property>
96@@ -227,13 +188,5 @@
97 </child>
98 </object>
99 </child>
100- <child type="titlebar">
101- <object class="GtkHeaderBar" id="headerbar">
102- <property name="visible">True</property>
103- <property name="can_focus">False</property>
104- <property name="title" translatable="yes">Preferences</property>
105- <property name="show_close_button">True</property>
106- </object>
107- </child>
108 </object>
109 </interface>
110
111=== modified file 'src/client/application/geary-config.vala'
112--- src/client/application/geary-config.vala 2015-03-10 23:08:59 +0000
113+++ src/client/application/geary-config.vala 2015-11-23 01:32:24 +0000
114@@ -18,8 +18,6 @@
115 public const string AUTOSELECT_KEY = "autoselect";
116 public const string DISPLAY_PREVIEW_KEY = "display-preview";
117 public const string SPELL_CHECK_KEY = "spell-check";
118- public const string PLAY_SOUNDS_KEY = "play-sounds";
119- public const string SHOW_NOTIFICATIONS_KEY = "show-notifications";
120 public const string STARTUP_NOTIFICATIONS_KEY = "startup-notifications";
121 public const string ASK_OPEN_ATTACHMENT_KEY = "ask-open-attachment";
122 public const string COMPOSE_AS_HTML_KEY = "compose-as-html";
123@@ -79,14 +77,6 @@
124 get { return settings.get_boolean(SPELL_CHECK_KEY); }
125 }
126
127- public bool play_sounds {
128- get { return settings.get_boolean(PLAY_SOUNDS_KEY); }
129- }
130-
131- public bool show_notifications {
132- get { return settings.get_boolean(SHOW_NOTIFICATIONS_KEY); }
133- }
134-
135 public bool startup_notifications {
136 get { return settings.get_boolean(STARTUP_NOTIFICATIONS_KEY); }
137 set { set_boolean(STARTUP_NOTIFICATIONS_KEY, value); }
138
139=== modified file 'src/client/dialogs/preferences-dialog.vala'
140--- src/client/dialogs/preferences-dialog.vala 2015-03-10 23:08:59 +0000
141+++ src/client/dialogs/preferences-dialog.vala 2015-11-23 01:32:24 +0000
142@@ -21,8 +21,6 @@
143 config.bind(Configuration.FOLDER_LIST_PANE_HORIZONTAL_KEY,
144 builder.get_object("three_pane_view"), "active");
145 config.bind(Configuration.SPELL_CHECK_KEY, builder.get_object("spell_check"), "active");
146- config.bind(Configuration.PLAY_SOUNDS_KEY, builder.get_object("play_sounds"), "active");
147- config.bind(Configuration.SHOW_NOTIFICATIONS_KEY, builder.get_object("show_notifications"), "active");
148 config.bind(Configuration.STARTUP_NOTIFICATIONS_KEY, builder.get_object("startup_notifications"), "active");
149 }
150
151
152=== modified file 'src/client/notification/libmessagingmenu.vala'
153--- src/client/notification/libmessagingmenu.vala 2015-02-06 20:43:33 +0000
154+++ src/client/notification/libmessagingmenu.vala 2015-11-23 01:32:24 +0000
155@@ -63,7 +63,7 @@
156 }
157
158 private void show_new_messages_count(Geary.Folder folder, int count) {
159- if (!GearyApplication.instance.config.show_notifications || !monitor.should_notify_new_messages(folder))
160+ if (!monitor.should_notify_new_messages(folder))
161 return;
162
163 string source_id = get_source_id(folder);
164
165=== modified file 'src/client/notification/libnotify.vala'
166--- src/client/notification/libnotify.vala 2015-02-06 20:43:33 +0000
167+++ src/client/notification/libnotify.vala 2015-11-23 01:32:24 +0000
168@@ -65,8 +65,7 @@
169 this.folder = null;
170 email = null;
171
172- if (!GearyApplication.instance.config.show_notifications ||
173- !monitor.should_notify_new_messages(folder))
174+ if (!monitor.should_notify_new_messages(folder))
175 return;
176
177 string body = ngettext("%d new message", "%d new messages", added).printf(added);
178@@ -87,10 +86,9 @@
179 this.folder = folder;
180 this.email = email;
181
182- if (!GearyApplication.instance.config.show_notifications ||
183- !monitor.should_notify_new_messages(folder))
184+ if (!monitor.should_notify_new_messages(folder))
185 return;
186-
187+
188 // possible to receive email with no originator
189 Geary.RFC822.MailboxAddress? primary = email.get_primary_originator();
190 if (primary == null) {
191@@ -183,9 +181,6 @@
192 }
193
194 public static void play_sound(string sound) {
195- if (!GearyApplication.instance.config.play_sounds)
196- return;
197-
198 init_sound();
199 sound_context.play(0, Canberra.PROP_EVENT_ID, sound);
200 }

Subscribers

People subscribed via source and target branches