Merge lp:~artmello/indicator-datetime/indicator-datetime-remove_notification_list_check into lp:indicator-datetime

Proposed by Arthur Mello on 2016-07-26
Status: Needs review
Proposed branch: lp:~artmello/indicator-datetime/indicator-datetime-remove_notification_list_check
Merge into: lp:indicator-datetime
Diff against target: 214 lines (+1/-44)
10 files modified
include/datetime/settings-live.h (+0/-1)
include/datetime/settings-shared.h (+0/-1)
include/datetime/settings.h (+0/-1)
include/notifications/notifications.h (+0/-3)
src/notifications.cpp (+0/-11)
src/settings-live.cpp (+0/-12)
src/snap.cpp (+1/-10)
tests/test-notification.cpp (+0/-2)
tests/test-settings.cpp (+0/-1)
tests/test-sound.cpp (+0/-2)
To merge this branch: bzr merge lp:~artmello/indicator-datetime/indicator-datetime-remove_notification_list_check
Reviewer Review Type Date Requested Status
Indicator Applet Developers 2016-07-26 Pending
Review via email: mp+301216@code.launchpad.net

Commit message

Do not check if calendar can use Notification list
Always display calendar notification to Notification List if notifications are enabled for calendar-app

Description of the change

Do not check if calendar can use Notification list
Always display calendar notification to Notification List if notifications are enabled for calendar-app

To post a comment you must log in.

Unmerged revisions

460. By Arthur Mello on 2016-07-26

Do not check if calendar can use Notification list
Always display calendar notification to Notification List if notifications are enabled for calendar-app

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'include/datetime/settings-live.h'
2--- include/datetime/settings-live.h 2016-07-04 19:30:18 +0000
3+++ include/datetime/settings-live.h 2016-07-26 20:32:13 +0000
4@@ -69,7 +69,6 @@
5 void update_cal_notification_sounds();
6 void update_cal_notification_vibrations();
7 void update_cal_notification_bubbles();
8- void update_cal_notification_list();
9 void update_vibrate_silent_mode();
10
11 GSettings* m_settings;
12
13=== modified file 'include/datetime/settings-shared.h'
14--- include/datetime/settings-shared.h 2016-07-04 19:30:18 +0000
15+++ include/datetime/settings-shared.h 2016-07-26 20:32:13 +0000
16@@ -60,6 +60,5 @@
17 #define SETTINGS_NOTIFY_SOUNDS_KEY "use-sounds-notifications"
18 #define SETTINGS_NOTIFY_VIBRATIONS_KEY "use-vibrations-notifications"
19 #define SETTINGS_NOTIFY_BUBBLES_KEY "use-bubbles-notifications"
20-#define SETTINGS_NOTIFY_LIST_KEY "use-list-notifications"
21
22 #endif // INDICATOR_DATETIME_SETTINGS_SHARED
23
24=== modified file 'include/datetime/settings.h'
25--- include/datetime/settings.h 2016-07-04 19:30:18 +0000
26+++ include/datetime/settings.h 2016-07-26 20:32:13 +0000
27@@ -66,7 +66,6 @@
28 core::Property<bool> cal_notification_sounds;
29 core::Property<bool> cal_notification_vibrations;
30 core::Property<bool> cal_notification_bubbles;
31- core::Property<bool> cal_notification_list;
32 core::Property<bool> vibrate_silent_mode;
33 };
34
35
36=== modified file 'include/notifications/notifications.h'
37--- include/notifications/notifications.h 2016-06-30 00:37:56 +0000
38+++ include/notifications/notifications.h 2016-07-26 20:32:13 +0000
39@@ -80,9 +80,6 @@
40 /** Sets if a notification bubble should be displayed. */
41 void set_show_notification_bubble (bool show);
42
43- /** Sets if notification should be posted to messaging menu after it is closed. */
44- void set_post_to_messaging_menu (bool post);
45-
46
47 private:
48 friend class Engine;
49
50=== modified file 'src/notifications.cpp'
51--- src/notifications.cpp 2016-06-30 00:37:56 +0000
52+++ src/notifications.cpp 2016-07-26 20:32:13 +0000
53@@ -62,7 +62,6 @@
54 std::function<void(const std::string&)> m_closed_callback;
55 std::function<void()> m_timeout_callback;
56 bool m_show_notification_bubble;
57- bool m_post_to_messaging_menu;
58 };
59
60 Builder::Builder():
61@@ -134,12 +133,6 @@
62 impl->m_show_notification_bubble = show;
63 }
64
65-void
66-Builder::set_post_to_messaging_menu (bool post)
67-{
68- impl->m_post_to_messaging_menu = post;
69-}
70-
71 /***
72 ****
73 ***/
74@@ -301,10 +294,6 @@
75
76 std::string post(const Builder::Impl& data)
77 {
78- if (!data.m_post_to_messaging_menu) {
79- return "";
80- }
81-
82 if (!m_messaging_app) {
83 return std::string();
84 }
85
86=== modified file 'src/settings-live.cpp'
87--- src/settings-live.cpp 2016-07-04 19:30:18 +0000
88+++ src/settings-live.cpp 2016-07-26 20:32:13 +0000
89@@ -69,7 +69,6 @@
90 update_cal_notification_sounds();
91 update_cal_notification_vibrations();
92 update_cal_notification_bubbles();
93- update_cal_notification_list();
94 update_vibrate_silent_mode();
95
96 // now listen for clients to change the properties s.t. we can sync update GSettings
97@@ -175,10 +174,6 @@
98 g_settings_set_boolean(m_settings_cal_notification, SETTINGS_NOTIFY_BUBBLES_KEY, value);
99 });
100
101- cal_notification_list.changed().connect([this](bool value){
102- g_settings_set_boolean(m_settings_cal_notification, SETTINGS_NOTIFY_LIST_KEY, value);
103- });
104-
105 vibrate_silent_mode.changed().connect([this](bool value){
106 g_settings_set_boolean(m_settings_general_notification, SETTINGS_VIBRATE_SILENT_KEY, value);
107 });
108@@ -328,11 +323,6 @@
109 cal_notification_bubbles.set(g_settings_get_boolean(m_settings_cal_notification, SETTINGS_NOTIFY_BUBBLES_KEY));
110 }
111
112-void LiveSettings::update_cal_notification_list()
113-{
114- cal_notification_list.set(g_settings_get_boolean(m_settings_cal_notification, SETTINGS_NOTIFY_LIST_KEY));
115-}
116-
117 void LiveSettings::update_vibrate_silent_mode()
118 {
119 vibrate_silent_mode.set(g_settings_get_boolean(m_settings_general_notification, SETTINGS_VIBRATE_SILENT_KEY));
120@@ -360,8 +350,6 @@
121 update_cal_notification_vibrations();
122 else if (key == SETTINGS_NOTIFY_BUBBLES_KEY)
123 update_cal_notification_bubbles();
124- else if (key == SETTINGS_NOTIFY_LIST_KEY)
125- update_cal_notification_list();
126 }
127
128 /***
129
130=== modified file 'src/snap.cpp'
131--- src/snap.cpp 2016-07-04 23:44:47 +0000
132+++ src/snap.cpp 2016-07-26 20:32:13 +0000
133@@ -97,10 +97,7 @@
134 const bool interactive = appointment.is_ubuntu_alarm() && m_engine->supports_actions();
135
136 // force the system to stay awake
137- std::shared_ptr<uin::Awake> awake;
138- if (appointment.is_ubuntu_alarm() || calendar_bubbles_enabled() || calendar_list_enabled()) {
139- awake = std::make_shared<uin::Awake>(m_engine->app_name());
140- }
141+ std::shared_ptr<uin::Awake> awake = std::make_shared<uin::Awake>(m_engine->app_name());
142
143 // calendar events are muted in silent mode; alarm clocks never are
144 std::shared_ptr<uin::Sound> sound;
145@@ -185,7 +182,6 @@
146 }
147
148 b.set_show_notification_bubble(appointment.is_ubuntu_alarm() || calendar_bubbles_enabled());
149- b.set_post_to_messaging_menu(appointment.is_ubuntu_alarm() || calendar_list_enabled());
150
151 const auto key = m_engine->show(b);
152 if (key)
153@@ -214,11 +210,6 @@
154 return m_settings->cal_notification_bubbles.get();
155 }
156
157- bool calendar_list_enabled() const
158- {
159- return m_settings->cal_notification_list.get();
160- }
161-
162 bool vibrate_in_silent_mode_enabled() const
163 {
164 return m_settings->vibrate_silent_mode.get();
165
166=== modified file 'tests/test-notification.cpp'
167--- tests/test-notification.cpp 2016-06-24 12:26:06 +0000
168+++ tests/test-notification.cpp 2016-07-26 20:32:13 +0000
169@@ -122,7 +122,6 @@
170 settings->cal_notification_sounds.set(test_disabled.cal_notification_enabled);
171 settings->cal_notification_vibrations.set(test_disabled.cal_notification_enabled);
172 settings->cal_notification_bubbles.set(test_disabled.cal_notification_enabled);
173- settings->cal_notification_list.set(test_disabled.cal_notification_enabled);
174
175 // set test case properties: haptic mode
176 settings->alarm_haptic.set(test_haptic.haptic_mode);
177@@ -234,7 +233,6 @@
178 settings->cal_notification_sounds.set(true);
179 settings->cal_notification_vibrations.set(true);
180 settings->cal_notification_bubbles.set(true);
181- settings->cal_notification_list.set(true);
182
183 // walk through the tests
184 for (const auto& test : tests)
185
186=== modified file 'tests/test-settings.cpp'
187--- tests/test-settings.cpp 2016-07-01 19:46:40 +0000
188+++ tests/test-settings.cpp 2016-07-26 20:32:13 +0000
189@@ -237,5 +237,4 @@
190 TestBoolProperty(m_gsettings_cal_notification, m_settings->cal_notification_sounds, SETTINGS_NOTIFY_SOUNDS_KEY);
191 TestBoolProperty(m_gsettings_cal_notification, m_settings->cal_notification_vibrations, SETTINGS_NOTIFY_VIBRATIONS_KEY);
192 TestBoolProperty(m_gsettings_cal_notification, m_settings->cal_notification_bubbles, SETTINGS_NOTIFY_BUBBLES_KEY);
193- TestBoolProperty(m_gsettings_cal_notification, m_settings->cal_notification_list, SETTINGS_NOTIFY_LIST_KEY);
194 }
195
196=== modified file 'tests/test-sound.cpp'
197--- tests/test-sound.cpp 2016-06-23 19:04:50 +0000
198+++ tests/test-sound.cpp 2016-07-26 20:32:13 +0000
199@@ -63,7 +63,6 @@
200 settings->cal_notification_sounds.set(true);
201 settings->cal_notification_vibrations.set(true);
202 settings->cal_notification_bubbles.set(true);
203- settings->cal_notification_list.set(true);
204
205 make_interactive();
206
207@@ -160,7 +159,6 @@
208 settings->cal_notification_sounds.set(true);
209 settings->cal_notification_vibrations.set(true);
210 settings->cal_notification_bubbles.set(true);
211- settings->cal_notification_list.set(true);
212
213 const struct {
214 Appointment appointment;

Subscribers

People subscribed via source and target branches