1 |
commit: 71b539ba93c96ceded3c107a65eeee8f667b920c |
2 |
Author: Marco Scardovi <marco <AT> scardovi <DOT> com> |
3 |
AuthorDate: Tue Jul 13 07:12:29 2021 +0000 |
4 |
Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jul 13 07:12:29 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=71b539ba |
7 |
|
8 |
gui-wm/phosh: drop all the patches |
9 |
|
10 |
Package-Manager: Portage-3.0.20, Repoman-3.0.3 |
11 |
Signed-off-by: Marco Scardovi <marco <AT> scardovi.com> |
12 |
|
13 |
gui-wm/phosh/Manifest | 2 +- |
14 |
.../0001-system-prompt-allow-blank-passwords.patch | 49 -- |
15 |
gui-wm/phosh/files/0002-fix-locale-issue.patch | 14 - |
16 |
.../0003-fix-locale-issue-in-service-file.patch | 22 - |
17 |
gui-wm/phosh/files/0004-calls-manager.patch | 465 ------------------ |
18 |
gui-wm/phosh/files/0005-calls-manager.patch | 536 --------------------- |
19 |
gui-wm/phosh/files/0006-calls-manager.patch | 383 --------------- |
20 |
.../{phosh-0.11.0.ebuild => phosh-0.12.0.ebuild} | 11 +- |
21 |
8 files changed, 2 insertions(+), 1480 deletions(-) |
22 |
|
23 |
diff --git a/gui-wm/phosh/Manifest b/gui-wm/phosh/Manifest |
24 |
index 3fded753f..779688537 100644 |
25 |
--- a/gui-wm/phosh/Manifest |
26 |
+++ b/gui-wm/phosh/Manifest |
27 |
@@ -1,2 +1,2 @@ |
28 |
DIST libgnome-volume-control-c5ab6037f460406ac9799b1e5765de3ce0097a8b.tar.gz 46481 BLAKE2B 7ea8424d640d71361905e2eff346f45e024f9cd430cc8cc92c53d8cf72a8ea312c00bdbd0d9c25f499e1af2122fcafbf08a600d69f053ff9fa04baeb44283ccf SHA512 368d56223907d3eaafd35fce643abddf00e963800eebe98fb5cbe6fbbd8da115d1afb93bd5d557167e787579e3ff8b8e7885cae74d8f0326b45085870ac8cc05 |
29 |
-DIST phosh-v0.11.0.tar.gz 447909 BLAKE2B e5e269a1c0d84000ba956b2f03e29079f53eceb03b83829f10f9aeea3e45668d7e275769f244d67e74e448deecd37abd0a0e3c4eefb945c9dce397e618911073 SHA512 77bb2898a63d3a4438d55775a55af852a90815f090bdb07889ea1743cbda7749cde2fef38ece073352303804852c9bcd1d296492a02a1334d4b5a00619b6ff0f |
30 |
+DIST phosh-v0.12.0.tar.gz 472232 BLAKE2B 3f48efebb9a9bcef1cd0e5d50d062914490d4452d857975f02e11ff14c6871041e5a03d3ef5c57222b97b978d7c1e6f1eaf55726b6e007487ed31a2384bad9d0 SHA512 4db588a805db7b2dd441dc9bb6e514006d1a82f9ddbbc0feb67d0620cbfb863cf383401acbc450b4fc7e6bd9ca1ed825833075aa04487519c7abb127f92cbc1a |
31 |
|
32 |
diff --git a/gui-wm/phosh/files/0001-system-prompt-allow-blank-passwords.patch b/gui-wm/phosh/files/0001-system-prompt-allow-blank-passwords.patch |
33 |
deleted file mode 100644 |
34 |
index e10824d13..000000000 |
35 |
--- a/gui-wm/phosh/files/0001-system-prompt-allow-blank-passwords.patch |
36 |
+++ /dev/null |
37 |
@@ -1,49 +0,0 @@ |
38 |
-From e88f5dee0cbb7fa0851b43a5ded5d94256c756d2 Mon Sep 17 00:00:00 2001 |
39 |
-From: Arnaud Ferraris <arnaud.ferraris@×××××.com> |
40 |
-Date: Sat, 21 Mar 2020 03:00:34 +0100 |
41 |
-Subject: [PATCH] system-prompt: allow blank passwords |
42 |
- |
43 |
---- |
44 |
- src/system-prompt.c | 5 ----- |
45 |
- 1 file changed, 5 deletions(-) |
46 |
- |
47 |
-diff --git a/src/system-prompt.c b/src/system-prompt.c |
48 |
-index 30aa3f1..bd06ee0 100644 |
49 |
---- a/src/system-prompt.c |
50 |
-+++ b/src/system-prompt.c |
51 |
-@@ -256,8 +256,6 @@ phosh_system_prompt_password_async (GcrPrompt *prompt, |
52 |
- priv->task = g_task_new (self, NULL, callback, user_data); |
53 |
- g_task_set_source_tag (priv->task, phosh_system_prompt_password_async); |
54 |
- |
55 |
-- if (!gtk_entry_get_text_length (GTK_ENTRY (priv->entry_password))) |
56 |
-- gtk_widget_set_sensitive (priv->btn_continue, FALSE); |
57 |
- gtk_widget_set_sensitive (priv->grid, TRUE); |
58 |
- |
59 |
- obj = G_OBJECT (self); |
60 |
-@@ -315,7 +313,6 @@ phosh_system_prompt_confirm_async (GcrPrompt *prompt, |
61 |
- priv->task = g_task_new (self, NULL, callback, user_data); |
62 |
- g_task_set_source_tag (priv->task, phosh_system_prompt_confirm_async); |
63 |
- |
64 |
-- gtk_widget_set_sensitive (priv->btn_continue, TRUE); |
65 |
- gtk_widget_set_sensitive (priv->grid, TRUE); |
66 |
- |
67 |
- obj = G_OBJECT (self); |
68 |
-@@ -392,7 +389,6 @@ prompt_complete (PhoshSystemPrompt *self) |
69 |
- g_task_return_pointer (res, (gpointer)password, NULL); |
70 |
- g_object_unref (res); |
71 |
- |
72 |
-- gtk_widget_set_sensitive (priv->btn_continue, FALSE); |
73 |
- gtk_widget_set_sensitive (priv->grid, FALSE); |
74 |
- |
75 |
- return TRUE; |
76 |
-@@ -451,7 +447,6 @@ on_password_changed (PhoshSystemPrompt *self, |
77 |
- if (!gtk_entry_get_text_length (GTK_ENTRY (editable))) |
78 |
- return; |
79 |
- |
80 |
-- gtk_widget_set_sensitive (priv->btn_continue, TRUE); |
81 |
- password = gtk_entry_get_text (GTK_ENTRY (editable)); |
82 |
- |
83 |
- /* |
84 |
--- |
85 |
-2.24.1 |
86 |
- |
87 |
|
88 |
diff --git a/gui-wm/phosh/files/0002-fix-locale-issue.patch b/gui-wm/phosh/files/0002-fix-locale-issue.patch |
89 |
deleted file mode 100644 |
90 |
index 9d2d3a0ea..000000000 |
91 |
--- a/gui-wm/phosh/files/0002-fix-locale-issue.patch |
92 |
+++ /dev/null |
93 |
@@ -1,14 +0,0 @@ |
94 |
-diff -Npur a/data/phosh.in b/data/phosh.in |
95 |
---- a/data/phosh.in 2021-03-20 13:53:32.367786000 +0100 |
96 |
-+++ b/data/phosh.in 2021-03-20 13:55:19.327789721 +0100 |
97 |
-@@ -56,6 +56,10 @@ elif [ -f /etc/phosh/rootston.ini ]; th |
98 |
- PHOC_INI=/etc/phosh/rootston.ini |
99 |
- fi |
100 |
- |
101 |
-+# Set proper locale according to /etc/locale.conf |
102 |
-+source /etc/locale.conf |
103 |
-+export LANG=$LANG |
104 |
-+ |
105 |
- # Run gnome-session through a login shell so it picks |
106 |
- # variables from /etc/profile.d (XDG_*) |
107 |
- [ -n "$WLR_BACKENDS" ] || WLR_BACKENDS=drm,libinput |
108 |
|
109 |
diff --git a/gui-wm/phosh/files/0003-fix-locale-issue-in-service-file.patch b/gui-wm/phosh/files/0003-fix-locale-issue-in-service-file.patch |
110 |
deleted file mode 100644 |
111 |
index 115834b23..000000000 |
112 |
--- a/gui-wm/phosh/files/0003-fix-locale-issue-in-service-file.patch |
113 |
+++ /dev/null |
114 |
@@ -1,22 +0,0 @@ |
115 |
-From: Daniel Dehennin <daniel.dehennin@××××××××.org> |
116 |
-Date: Wed, 17 Mar 2021 17:38:58 +0100 |
117 |
-Subject: Fix locale issue in Service file |
118 |
- |
119 |
-* data/phosh.service (Environment): do not override user language |
120 |
- setting. |
121 |
---- |
122 |
- data/phosh.service | 1 - |
123 |
- 1 file changed, 1 deletion(-) |
124 |
- |
125 |
-diff --git a/data/phosh.service b/data/phosh.service |
126 |
-index fa18137..a585696 100644 |
127 |
---- a/data/phosh.service |
128 |
-+++ b/data/phosh.service |
129 |
-@@ -25,7 +25,6 @@ Before=graphical.target |
130 |
- ConditionPathExists=/dev/tty0 |
131 |
- |
132 |
- [Service] |
133 |
--Environment=LANG=C.UTF-8 |
134 |
- Environment=XDG_CURRENT_DESKTOP=GNOME |
135 |
- Environment=XDG_SESSION_DESKTOP=phosh |
136 |
- Environment=XDG_SESSION_TYPE=wayland |
137 |
|
138 |
diff --git a/gui-wm/phosh/files/0004-calls-manager.patch b/gui-wm/phosh/files/0004-calls-manager.patch |
139 |
deleted file mode 100644 |
140 |
index 8b7c8c88c..000000000 |
141 |
--- a/gui-wm/phosh/files/0004-calls-manager.patch |
142 |
+++ /dev/null |
143 |
@@ -1,465 +0,0 @@ |
144 |
-diff --git a/src/shell.h b/src/shell.h |
145 |
-index 6465fd4..0d7c161 100644 |
146 |
---- a/src/shell.h |
147 |
-+++ b/src/shell.h |
148 |
-@@ -70,7 +70,9 @@ void phosh_shell_unlock (PhoshShell *self); |
149 |
- void phosh_shell_set_primary_monitor (PhoshShell *self, PhoshMonitor *monitor); |
150 |
- PhoshMonitor *phosh_shell_get_primary_monitor (PhoshShell *self); |
151 |
- PhoshMonitor *phosh_shell_get_builtin_monitor (PhoshShell *self); |
152 |
-+ |
153 |
- PhoshLockscreenManager *phosh_shell_get_lockscreen_manager (PhoshShell *self); |
154 |
-+PhoshCallsManager *phosh_shell_get_calls_manager (PhoshShell *self); |
155 |
- PhoshBackgroundManager *phosh_shell_get_background_manager (PhoshShell *self); |
156 |
- PhoshModeManager *phosh_shell_get_mode_manager (PhoshShell *self); |
157 |
- PhoshMonitorManager *phosh_shell_get_monitor_manager (PhoshShell *self); |
158 |
---- /dev/null |
159 |
-+++ b/src/calls-manager.c |
160 |
-@@ -0,0 +1,418 @@ |
161 |
-+/* |
162 |
-+ * Copyright (C) 2021 Purism SPC |
163 |
-+ * |
164 |
-+ * SPDX-License-Identifier: GPL-3.0-or-later |
165 |
-+ * |
166 |
-+ * Author: Guido Günther <agx@×××××××.org> |
167 |
-+ */ |
168 |
-+ |
169 |
-+#define G_LOG_DOMAIN "phosh-calls-manager" |
170 |
-+ |
171 |
-+#include "config.h" |
172 |
-+ |
173 |
-+#include "calls-manager.h" |
174 |
-+#include "shell.h" |
175 |
-+#include "util.h" |
176 |
-+#include "dbus/calls-dbus.h" |
177 |
-+ |
178 |
-+#define BUS_NAME "sm.puri.Calls" |
179 |
-+#define OBJECT_PATH "/sm/puri/Calls" |
180 |
-+#define OBJECT_PATHS_CALLS_PREFIX OBJECT_PATH "/Call/" |
181 |
-+ |
182 |
-+/** |
183 |
-+ * SECTION:calls-manager |
184 |
-+ * @short_description: Track ongoing phone calls |
185 |
-+ * @Title: PhoshCallsManager |
186 |
-+ * |
187 |
-+ * #PhoshCallsManager tracks on going calls and allows |
188 |
-+ * interaction with them. |
189 |
-+ */ |
190 |
-+ |
191 |
-+/** |
192 |
-+ * PhoshCallState: |
193 |
-+ * |
194 |
-+ * The call state. Must match call's CallsCallState. |
195 |
-+ */ |
196 |
-+typedef enum |
197 |
-+{ |
198 |
-+ /*< private >*/ |
199 |
-+ PHOSH_CALL_STATE_ACTIVE = 1, |
200 |
-+ PHOSH_CALL_STATE_HELD, |
201 |
-+ PHOSH_CALL_STATE_DIALING, |
202 |
-+ PHOSH_CALL_STATE_ALERTING, |
203 |
-+ PHOSH_CALL_STATE_INCOMING, |
204 |
-+ PHOSH_CALL_STATE_WAITING, |
205 |
-+ PHOSH_CALL_STATE_DISCONNECTED |
206 |
-+} PhoshCallState; |
207 |
-+ |
208 |
-+enum { |
209 |
-+ PROP_0, |
210 |
-+ PROP_PRESENT, |
211 |
-+ PROP_ACTIVE_CALL, |
212 |
-+ PROP_LAST_PROP |
213 |
-+}; |
214 |
-+static GParamSpec *props[PROP_LAST_PROP]; |
215 |
-+ |
216 |
-+ |
217 |
-+enum { |
218 |
-+ CALL_INBOUND, |
219 |
-+ N_SIGNALS |
220 |
-+}; |
221 |
-+static guint signals[N_SIGNALS] = { 0 }; |
222 |
-+ |
223 |
-+ |
224 |
-+struct _PhoshCallsManager { |
225 |
-+ PhoshManager parent; |
226 |
-+ |
227 |
-+ gboolean present; |
228 |
-+ gboolean incoming; |
229 |
-+ char *active_call; |
230 |
-+ |
231 |
-+ PhoshCallsDBusObjectManagerClient *om_client; |
232 |
-+ GCancellable *cancel; |
233 |
-+ GHashTable *calls; |
234 |
-+}; |
235 |
-+G_DEFINE_TYPE (PhoshCallsManager, phosh_calls_manager, PHOSH_TYPE_MANAGER); |
236 |
-+ |
237 |
-+ |
238 |
-+static void |
239 |
-+on_call_state_changed (PhoshCallsManager *self, |
240 |
-+ GParamSpec *pspec, |
241 |
-+ PhoshCallsDBusCallsCall *proxy) |
242 |
-+{ |
243 |
-+ const char *path; |
244 |
-+ PhoshCallState state; |
245 |
-+ |
246 |
-+ g_return_if_fail (PHOSH_IS_CALLS_MANAGER (self)); |
247 |
-+ g_return_if_fail (PHOSH_CALLS_DBUS_IS_CALLS_CALL (proxy)); |
248 |
-+ |
249 |
-+ path = g_dbus_proxy_get_object_path (G_DBUS_PROXY (proxy)); |
250 |
-+ state = phosh_calls_dbus_calls_call_get_state (proxy); |
251 |
-+ |
252 |
-+ if (g_strcmp0 (path, self->active_call) == 0) { |
253 |
-+ /* current active call became inactive> */ |
254 |
-+ if (state != PHOSH_CALL_STATE_ACTIVE && |
255 |
-+ state != PHOSH_CALL_STATE_DIALING) { |
256 |
-+ g_debug ("No active call, was %s", path); |
257 |
-+ g_clear_pointer (&self->active_call, g_free); |
258 |
-+ g_object_notify_by_pspec (G_OBJECT (self), props[PROP_ACTIVE_CALL]); |
259 |
-+ /* TODO: pick new active call from list once calls supports multiple active calls */ |
260 |
-+ } |
261 |
-+ return; |
262 |
-+ } |
263 |
-+ |
264 |
-+ if (state != PHOSH_CALL_STATE_ACTIVE && state != PHOSH_CALL_STATE_DIALING) |
265 |
-+ return; |
266 |
-+ |
267 |
-+ /* New active call */ |
268 |
-+ g_free (self->active_call); |
269 |
-+ self->active_call = g_strdup (path); |
270 |
-+ g_debug ("New active call %s", path); |
271 |
-+ g_object_notify_by_pspec (G_OBJECT (self), props[PROP_ACTIVE_CALL]); |
272 |
-+} |
273 |
-+ |
274 |
-+ |
275 |
-+static void |
276 |
-+on_call_proxy_new_for_bus_finish (GObject *source_object, |
277 |
-+ GAsyncResult *res, |
278 |
-+ gpointer *data) |
279 |
-+{ |
280 |
-+ const char *path; |
281 |
-+ gboolean inbound; |
282 |
-+ PhoshCallsManager *self; |
283 |
-+ PhoshCallsDBusCallsCall *proxy; |
284 |
-+ |
285 |
-+ g_autoptr (GError) err = NULL; |
286 |
-+ |
287 |
-+ proxy = phosh_calls_dbus_calls_call_proxy_new_for_bus_finish (res, &err); |
288 |
-+ if (!proxy) { |
289 |
-+ phosh_async_error_warn (err, "Failed to get call proxy"); |
290 |
-+ return; |
291 |
-+ } |
292 |
-+ |
293 |
-+ self = PHOSH_CALLS_MANAGER (data); |
294 |
-+ path = g_dbus_proxy_get_object_path (G_DBUS_PROXY (proxy)); |
295 |
-+ |
296 |
-+ if (g_hash_table_contains (self->calls, path)) |
297 |
-+ g_critical ("Already got a call with path %s", path); |
298 |
-+ else |
299 |
-+ g_hash_table_insert (self->calls, g_strdup (path), proxy); |
300 |
-+ |
301 |
-+ g_signal_connect_swapped (proxy, |
302 |
-+ "notify::state", |
303 |
-+ G_CALLBACK (on_call_state_changed), |
304 |
-+ self); |
305 |
-+ on_call_state_changed (self, NULL, proxy); |
306 |
-+ |
307 |
-+ inbound = phosh_calls_dbus_calls_call_get_inbound (proxy); |
308 |
-+ g_debug ("Added call %s, incoming: %d", path, inbound); |
309 |
-+ if (inbound) |
310 |
-+ g_signal_emit (self, signals[CALL_INBOUND], 0); |
311 |
-+} |
312 |
-+ |
313 |
-+ |
314 |
-+static void |
315 |
-+on_call_obj_added (PhoshCallsManager *self, |
316 |
-+ GDBusObject *object) |
317 |
-+{ |
318 |
-+ const char *path; |
319 |
-+ |
320 |
-+ g_return_if_fail (PHOSH_IS_CALLS_MANAGER (self)); |
321 |
-+ |
322 |
-+ path = g_dbus_object_get_object_path (object); |
323 |
-+ g_debug ("New call obj at %s", path); |
324 |
-+ if (!g_str_has_prefix (path, OBJECT_PATHS_CALLS_PREFIX)) |
325 |
-+ return; |
326 |
-+ |
327 |
-+ phosh_calls_dbus_calls_call_proxy_new_for_bus (G_BUS_TYPE_SESSION, |
328 |
-+ G_DBUS_PROXY_FLAGS_NONE, |
329 |
-+ BUS_NAME, |
330 |
-+ path, |
331 |
-+ self->cancel, |
332 |
-+ (GAsyncReadyCallback) on_call_proxy_new_for_bus_finish, |
333 |
-+ self); |
334 |
-+} |
335 |
-+ |
336 |
-+ |
337 |
-+static void |
338 |
-+on_call_obj_removed (PhoshCallsManager *self, |
339 |
-+ GDBusObject *object) |
340 |
-+{ |
341 |
-+ const char *path; |
342 |
-+ |
343 |
-+ g_return_if_fail (PHOSH_IS_CALLS_MANAGER (self)); |
344 |
-+ |
345 |
-+ path = g_dbus_object_get_object_path (object); |
346 |
-+ g_debug ("Call obj at %s gone", path); |
347 |
-+ if (!g_str_has_prefix (path, OBJECT_PATHS_CALLS_PREFIX)) |
348 |
-+ return; |
349 |
-+ |
350 |
-+ if (g_strcmp0 (path, self->active_call) == 0) { |
351 |
-+ g_clear_pointer (&self->active_call, g_free); |
352 |
-+ g_object_notify_by_pspec (G_OBJECT (self), props[PROP_ACTIVE_CALL]); |
353 |
-+ /* TODO: pick new active call from list once calls supports multiple active calls */ |
354 |
-+ } |
355 |
-+ |
356 |
-+ g_debug ("Removed call %s", path); |
357 |
-+ |
358 |
-+ g_return_if_fail (g_hash_table_remove (self->calls, path)); |
359 |
-+} |
360 |
-+ |
361 |
-+ |
362 |
-+static void |
363 |
-+phosh_calls_manager_get_property (GObject *object, |
364 |
-+ guint property_id, |
365 |
-+ GValue *value, |
366 |
-+ GParamSpec *pspec) |
367 |
-+{ |
368 |
-+ PhoshCallsManager *self = PHOSH_CALLS_MANAGER (object); |
369 |
-+ |
370 |
-+ switch (property_id) { |
371 |
-+ case PROP_PRESENT: |
372 |
-+ g_value_set_boolean (value, self->present); |
373 |
-+ break; |
374 |
-+ case PROP_ACTIVE_CALL: |
375 |
-+ g_value_set_string (value, self->active_call); |
376 |
-+ break; |
377 |
-+ default: |
378 |
-+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); |
379 |
-+ break; |
380 |
-+ } |
381 |
-+} |
382 |
-+ |
383 |
-+ |
384 |
-+static void |
385 |
-+on_name_owner_changed (PhoshCallsManager *self, |
386 |
-+ GParamSpec *pspec, |
387 |
-+ GDBusObjectManagerClient *om) |
388 |
-+{ |
389 |
-+ g_autofree char *owner = NULL; |
390 |
-+ gboolean present; |
391 |
-+ |
392 |
-+ g_return_if_fail (PHOSH_IS_CALLS_MANAGER (self)); |
393 |
-+ g_return_if_fail (G_IS_DBUS_OBJECT_MANAGER_CLIENT (om)); |
394 |
-+ |
395 |
-+ owner = g_dbus_object_manager_client_get_name_owner (om); |
396 |
-+ present = owner ? TRUE : FALSE; |
397 |
-+ |
398 |
-+ if (!present) { |
399 |
-+ g_hash_table_remove_all (self->calls); |
400 |
-+ } else { |
401 |
-+ g_autolist (GDBusObject) objs = g_dbus_object_manager_get_objects ( |
402 |
-+ G_DBUS_OBJECT_MANAGER (self->om_client)); |
403 |
-+ |
404 |
-+ /* Catch up on ongoing calls */ |
405 |
-+ for (GList *elem = objs; elem; elem = elem->next) { |
406 |
-+ on_call_obj_added (self, elem->data); |
407 |
-+ } |
408 |
-+ } |
409 |
-+ |
410 |
-+ if (present != self->present) { |
411 |
-+ self->present = present; |
412 |
-+ g_debug ("Calls present: %d", self->present); |
413 |
-+ g_object_notify_by_pspec (G_OBJECT (self), props[PROP_PRESENT]); |
414 |
-+ } |
415 |
-+} |
416 |
-+ |
417 |
-+ |
418 |
-+static void |
419 |
-+on_om_new_for_bus_finish (GObject *source_object, |
420 |
-+ GAsyncResult *res, |
421 |
-+ gpointer data) |
422 |
-+{ |
423 |
-+ g_autoptr (GError) err = NULL; |
424 |
-+ PhoshCallsManager *self; |
425 |
-+ GDBusObjectManager *om; |
426 |
-+ GDBusObjectManagerClient *om_client; |
427 |
-+ |
428 |
-+ om = phosh_calls_dbus_object_manager_client_new_for_bus_finish (res, &err); |
429 |
-+ if (om == NULL) { |
430 |
-+ g_message ("Failed to get calls object manager client: %s", err->message); |
431 |
-+ return; |
432 |
-+ } |
433 |
-+ |
434 |
-+ self = PHOSH_CALLS_MANAGER (data); |
435 |
-+ self->om_client = PHOSH_CALLS_DBUS_OBJECT_MANAGER_CLIENT (om); |
436 |
-+ om_client = G_DBUS_OBJECT_MANAGER_CLIENT (om); |
437 |
-+ |
438 |
-+ g_signal_connect_object (self->om_client, |
439 |
-+ "notify::name-owner", |
440 |
-+ G_CALLBACK (on_name_owner_changed), |
441 |
-+ self, |
442 |
-+ G_CONNECT_SWAPPED); |
443 |
-+ on_name_owner_changed (self, NULL, G_DBUS_OBJECT_MANAGER_CLIENT (om)); |
444 |
-+ |
445 |
-+ g_signal_connect_object (self->om_client, |
446 |
-+ "object-added", |
447 |
-+ G_CALLBACK (on_call_obj_added), |
448 |
-+ self, |
449 |
-+ G_CONNECT_SWAPPED); |
450 |
-+ g_signal_connect_object (self->om_client, |
451 |
-+ "object-removed", |
452 |
-+ G_CALLBACK (on_call_obj_removed), |
453 |
-+ self, |
454 |
-+ G_CONNECT_SWAPPED); |
455 |
-+ |
456 |
-+ g_debug ("Calls manager initialized for name %s at %s", |
457 |
-+ g_dbus_object_manager_client_get_name (om_client), |
458 |
-+ g_dbus_object_manager_get_object_path (om)); |
459 |
-+} |
460 |
-+ |
461 |
-+ |
462 |
-+static void |
463 |
-+phosh_calls_manager_idle_init (PhoshManager *manager) |
464 |
-+{ |
465 |
-+ PhoshCallsManager *self = PHOSH_CALLS_MANAGER (manager); |
466 |
-+ |
467 |
-+ phosh_calls_dbus_object_manager_client_new_for_bus (G_BUS_TYPE_SESSION, |
468 |
-+ G_DBUS_OBJECT_MANAGER_CLIENT_FLAGS_DO_NOT_AUTO_START, |
469 |
-+ BUS_NAME, |
470 |
-+ OBJECT_PATH, |
471 |
-+ self->cancel, |
472 |
-+ on_om_new_for_bus_finish, |
473 |
-+ self); |
474 |
-+} |
475 |
-+ |
476 |
-+ |
477 |
-+static void |
478 |
-+phosh_calls_manager_dispose (GObject *object) |
479 |
-+{ |
480 |
-+ PhoshCallsManager *self = PHOSH_CALLS_MANAGER (object); |
481 |
-+ |
482 |
-+ g_cancellable_cancel (self->cancel); |
483 |
-+ g_clear_object (&self->cancel); |
484 |
-+ g_clear_object (&self->om_client); |
485 |
-+ g_clear_pointer (&self->calls, g_hash_table_unref); |
486 |
-+ g_clear_pointer (&self->active_call, g_free); |
487 |
-+ |
488 |
-+ G_OBJECT_CLASS (phosh_calls_manager_parent_class)->dispose (object); |
489 |
-+} |
490 |
-+ |
491 |
-+ |
492 |
-+static void |
493 |
-+phosh_calls_manager_class_init (PhoshCallsManagerClass *klass) |
494 |
-+{ |
495 |
-+ GObjectClass *object_class = G_OBJECT_CLASS (klass); |
496 |
-+ PhoshManagerClass *manager_class = PHOSH_MANAGER_CLASS (klass); |
497 |
-+ |
498 |
-+ object_class->get_property = phosh_calls_manager_get_property; |
499 |
-+ object_class->dispose = phosh_calls_manager_dispose; |
500 |
-+ |
501 |
-+ manager_class->idle_init = phosh_calls_manager_idle_init; |
502 |
-+ |
503 |
-+ /** |
504 |
-+ * PhoshCallsManager:present: |
505 |
-+ * |
506 |
-+ * Whether the call interface is present on the bus |
507 |
-+ */ |
508 |
-+ props[PROP_PRESENT] = |
509 |
-+ g_param_spec_boolean ("present", |
510 |
-+ "", |
511 |
-+ "", |
512 |
-+ FALSE, |
513 |
-+ G_PARAM_READABLE | |
514 |
-+ G_PARAM_EXPLICIT_NOTIFY | |
515 |
-+ G_PARAM_STATIC_STRINGS); |
516 |
-+ |
517 |
-+ /** |
518 |
-+ * PhoshCallsManager:active-call: |
519 |
-+ * |
520 |
-+ * The currently active call |
521 |
-+ */ |
522 |
-+ props[PROP_ACTIVE_CALL] = |
523 |
-+ g_param_spec_string ("active-call", |
524 |
-+ "", |
525 |
-+ "", |
526 |
-+ NULL, |
527 |
-+ G_PARAM_READABLE | |
528 |
-+ G_PARAM_EXPLICIT_NOTIFY | |
529 |
-+ G_PARAM_STATIC_STRINGS); |
530 |
-+ |
531 |
-+ g_object_class_install_properties (object_class, PROP_LAST_PROP, props); |
532 |
-+ |
533 |
-+ signals[CALL_INBOUND] = g_signal_new ("call-inbound", |
534 |
-+ G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, 0, NULL, NULL, |
535 |
-+ NULL, G_TYPE_NONE, 0); |
536 |
-+} |
537 |
-+ |
538 |
-+ |
539 |
-+static void |
540 |
-+phosh_calls_manager_init (PhoshCallsManager *self) |
541 |
-+{ |
542 |
-+ self->calls = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_object_unref); |
543 |
-+ self->cancel = g_cancellable_new (); |
544 |
-+} |
545 |
-+ |
546 |
-+ |
547 |
-+PhoshCallsManager * |
548 |
-+phosh_calls_manager_new (void) |
549 |
-+{ |
550 |
-+ return g_object_new (PHOSH_TYPE_CALLS_MANAGER, NULL); |
551 |
-+} |
552 |
-+ |
553 |
-+ |
554 |
-+gboolean |
555 |
-+phosh_calls_manager_get_present (PhoshCallsManager *self) |
556 |
-+{ |
557 |
-+ g_return_val_if_fail (PHOSH_IS_CALLS_MANAGER (self), FALSE); |
558 |
-+ |
559 |
-+ return self->present; |
560 |
-+} |
561 |
-+ |
562 |
-+ |
563 |
-+int |
564 |
-+phosh_calls_manager_get_incoming (PhoshCallsManager *self) |
565 |
-+{ |
566 |
-+ g_return_val_if_fail (PHOSH_IS_CALLS_MANAGER (self), FALSE); |
567 |
-+ |
568 |
-+ return self->incoming; |
569 |
-+} |
570 |
-+ |
571 |
-+ |
572 |
-+const char * |
573 |
-+phosh_calls_manager_get_active_call (PhoshCallsManager *self) |
574 |
-+{ |
575 |
-+ g_return_val_if_fail (PHOSH_IS_CALLS_MANAGER (self), NULL); |
576 |
-+ |
577 |
-+ return self->active_call; |
578 |
-+} |
579 |
-diff --git a/src/calls-manager.h b/src/calls-manager.h |
580 |
-new file mode 100644 |
581 |
-index 00000000..193f7f1c |
582 |
---- /dev/null |
583 |
-+++ b/src/calls-manager.h |
584 |
-@@ -0,0 +1,24 @@ |
585 |
-+/* |
586 |
-+ * Copyright (C) 2021 Purism SPC |
587 |
-+ * |
588 |
-+ * SPDX-License-Identifier: GPL-3.0-or-later |
589 |
-+ */ |
590 |
-+ |
591 |
-+#pragma once |
592 |
-+ |
593 |
-+#include "manager.h" |
594 |
-+ |
595 |
-+#include <glib-object.h> |
596 |
-+ |
597 |
-+G_BEGIN_DECLS |
598 |
-+ |
599 |
-+#define PHOSH_TYPE_CALLS_MANAGER (phosh_calls_manager_get_type ()) |
600 |
-+ |
601 |
-+G_DECLARE_FINAL_TYPE (PhoshCallsManager, phosh_calls_manager, PHOSH, CALLS_MANAGER, PhoshManager) |
602 |
-+ |
603 |
-+PhoshCallsManager *phosh_calls_manager_new (void); |
604 |
-+gboolean phosh_calls_manager_get_present (PhoshCallsManager *self); |
605 |
-+gboolean phosh_calls_manager_get_incoming (PhoshCallsManager *self); |
606 |
-+const char *phosh_calls_manager_get_active_call (PhoshCallsManager *self); |
607 |
-+ |
608 |
-+G_END_DECLS |
609 |
|
610 |
diff --git a/gui-wm/phosh/files/0005-calls-manager.patch b/gui-wm/phosh/files/0005-calls-manager.patch |
611 |
deleted file mode 100644 |
612 |
index ff9c3bb11..000000000 |
613 |
--- a/gui-wm/phosh/files/0005-calls-manager.patch |
614 |
+++ /dev/null |
615 |
@@ -1,536 +0,0 @@ |
616 |
-From ebecb70a3049d6f538cce30e64026d0929c05ace Mon Sep 17 00:00:00 2001 |
617 |
-From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@×××××××.org> |
618 |
-Date: Fri, 14 May 2021 18:53:38 +0200 |
619 |
-Subject: [PATCH 1/9] screenshot-manager: Remove opaque handler in dispose |
620 |
-MIME-Version: 1.0 |
621 |
-Content-Type: text/plain; charset=UTF-8 |
622 |
-Content-Transfer-Encoding: 8bit |
623 |
- |
624 |
-Signed-off-by: Guido Günther <guido.gunther@××××.sm> |
625 |
---- |
626 |
- src/screenshot-manager.c | 11 ++++++++--- |
627 |
- 1 file changed, 8 insertions(+), 3 deletions(-) |
628 |
- |
629 |
-diff --git a/src/screenshot-manager.c b/src/screenshot-manager.c |
630 |
-index 00ff5efa..51df85dc 100644 |
631 |
---- a/src/screenshot-manager.c |
632 |
-+++ b/src/screenshot-manager.c |
633 |
-@@ -55,8 +55,9 @@ typedef struct _PhoshScreenshotManager { |
634 |
- ScreencopyFrame *frame; |
635 |
- |
636 |
- PhoshFader *fader; |
637 |
-- PhoshFader *opaque; |
638 |
- guint fader_id; |
639 |
-+ PhoshFader *opaque; |
640 |
-+ guint opaque_id; |
641 |
- } PhoshScreenshotManager; |
642 |
- |
643 |
- |
644 |
-@@ -188,9 +189,10 @@ on_opaque_timeout (PhoshScreenshotManager *self) |
645 |
- gtk_clipboard_set_image (clipboard, self->frame->pixbuf); |
646 |
- g_debug ("Updated clipboard with %p", self->frame); |
647 |
- screencopy_done (self, TRUE); |
648 |
-+ |
649 |
- out: |
650 |
- g_clear_pointer (&self->opaque, phosh_cp_widget_destroy); |
651 |
-- |
652 |
-+ self->opaque_id = 0; |
653 |
- return G_SOURCE_REMOVE; |
654 |
- } |
655 |
- |
656 |
-@@ -288,7 +290,9 @@ screencopy_frame_handle_ready (void *data, |
657 |
- self->frame->pixbuf = g_steal_pointer (&pixbuf); |
658 |
- /* FIXME: Would be better to trigger when the opaque window is up and got |
659 |
- input focus but all such attempts failed */ |
660 |
-- g_timeout_add_seconds (1, (GSourceFunc) on_opaque_timeout, self); |
661 |
-+ self->opaque_id = g_timeout_add_seconds (1, (GSourceFunc) on_opaque_timeout, self); |
662 |
-+ g_source_set_name_by_id (self->opaque_id, "[phosh] screenshot opaque"); |
663 |
-+ |
664 |
- gtk_widget_show (GTK_WIDGET (self->opaque)); |
665 |
- } |
666 |
- return; |
667 |
-@@ -493,6 +497,7 @@ phosh_screenshot_manager_dispose (GObject *object) |
668 |
- g_dbus_interface_skeleton_unexport (G_DBUS_INTERFACE_SKELETON (self)); |
669 |
- |
670 |
- g_clear_handle_id (&self->fader_id, g_source_remove); |
671 |
-+ g_clear_handle_id (&self->opaque_id, g_source_remove); |
672 |
- g_clear_pointer (&self->fader, phosh_cp_widget_destroy); |
673 |
- |
674 |
- G_OBJECT_CLASS (phosh_screenshot_manager_parent_class)->dispose (object); |
675 |
--- |
676 |
-GitLab |
677 |
- |
678 |
- |
679 |
-From 116a4fe763073b9c01126a6b069f17761e31d262 Mon Sep 17 00:00:00 2001 |
680 |
-From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@×××××××.org> |
681 |
-Date: Fri, 14 May 2021 18:57:01 +0200 |
682 |
-Subject: [PATCH 2/9] screenshot-manager: Actually set fader_id |
683 |
-MIME-Version: 1.0 |
684 |
-Content-Type: text/plain; charset=UTF-8 |
685 |
-Content-Transfer-Encoding: 8bit |
686 |
- |
687 |
-It got cleared but never set. |
688 |
- |
689 |
-Signed-off-by: Guido Günther <guido.gunther@××××.sm> |
690 |
---- |
691 |
- src/screenshot-manager.c | 4 +++- |
692 |
- 1 file changed, 3 insertions(+), 1 deletion(-) |
693 |
- |
694 |
-diff --git a/src/screenshot-manager.c b/src/screenshot-manager.c |
695 |
-index 51df85dc..8bb64c0a 100644 |
696 |
---- a/src/screenshot-manager.c |
697 |
-+++ b/src/screenshot-manager.c |
698 |
-@@ -121,6 +121,7 @@ on_fader_timeout (gpointer user_data) |
699 |
- |
700 |
- g_clear_pointer (&self->fader, phosh_cp_widget_destroy); |
701 |
- |
702 |
-+ self->fader_id = 0; |
703 |
- return G_SOURCE_REMOVE; |
704 |
- } |
705 |
- |
706 |
-@@ -130,7 +131,8 @@ show_fader (PhoshScreenshotManager *self) |
707 |
- { |
708 |
- PhoshMonitor *monitor = phosh_shell_get_primary_monitor (phosh_shell_get_default ()); |
709 |
- |
710 |
-- g_timeout_add (FLASH_FADER_TIMEOUT, on_fader_timeout, self); |
711 |
-+ self->fader_id = g_timeout_add (FLASH_FADER_TIMEOUT, on_fader_timeout, self); |
712 |
-+ g_source_set_name_by_id (self->fader_id, "[phosh] screenshot fader"); |
713 |
- self->fader = g_object_new (PHOSH_TYPE_FADER, |
714 |
- "monitor", monitor, |
715 |
- "style-class", "phosh-fader-flash-fade", |
716 |
--- |
717 |
-GitLab |
718 |
- |
719 |
- |
720 |
-From e6808f57ece2cec5b6265e7678f6f3c6edef0f06 Mon Sep 17 00:00:00 2001 |
721 |
-From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@×××××××.org> |
722 |
-Date: Fri, 14 May 2021 18:12:34 +0200 |
723 |
-Subject: [PATCH 3/9] lockscreen-manager: Shorten property enum values |
724 |
-MIME-Version: 1.0 |
725 |
-Content-Type: text/plain; charset=UTF-8 |
726 |
-Content-Transfer-Encoding: 8bit |
727 |
- |
728 |
-This is what we recommend in Hacking.md. |
729 |
- |
730 |
-Signed-off-by: Guido Günther <guido.gunther@××××.sm> |
731 |
---- |
732 |
- src/lockscreen-manager.c | 21 +++++++++++---------- |
733 |
- 1 file changed, 11 insertions(+), 10 deletions(-) |
734 |
- |
735 |
-diff --git a/src/lockscreen-manager.c b/src/lockscreen-manager.c |
736 |
-index e34fb4b4..afcdb6ba 100644 |
737 |
---- a/src/lockscreen-manager.c |
738 |
-+++ b/src/lockscreen-manager.c |
739 |
-@@ -42,11 +42,11 @@ enum { |
740 |
- static guint signals[N_SIGNALS] = { 0 }; |
741 |
- |
742 |
- enum { |
743 |
-- PHOSH_LOCKSCREEN_MANAGER_PROP_0, |
744 |
-- PHOSH_LOCKSCREEN_MANAGER_PROP_LOCKED, |
745 |
-- PHOSH_LOCKSCREEN_MANAGER_PROP_LAST_PROP |
746 |
-+ PROP_0, |
747 |
-+ PROP_LOCKED, |
748 |
-+ PROP_LAST_PROP |
749 |
- }; |
750 |
--static GParamSpec *props[PHOSH_LOCKSCREEN_MANAGER_PROP_LAST_PROP]; |
751 |
-+static GParamSpec *props[PROP_LAST_PROP]; |
752 |
- |
753 |
- |
754 |
- struct _PhoshLockscreenManager { |
755 |
-@@ -84,7 +84,7 @@ lockscreen_unlock_cb (PhoshLockscreenManager *self, PhoshLockscreen *lockscreen) |
756 |
- |
757 |
- self->locked = FALSE; |
758 |
- self->active_time = 0; |
759 |
-- g_object_notify_by_pspec (G_OBJECT (self), props[PHOSH_LOCKSCREEN_MANAGER_PROP_LOCKED]); |
760 |
-+ g_object_notify_by_pspec (G_OBJECT (self), props[PROP_LOCKED]); |
761 |
- } |
762 |
- |
763 |
- |
764 |
-@@ -248,7 +248,7 @@ lockscreen_lock (PhoshLockscreenManager *self) |
765 |
- |
766 |
- self->locked = TRUE; |
767 |
- self->active_time = g_get_monotonic_time (); |
768 |
-- g_object_notify_by_pspec (G_OBJECT (self), props[PHOSH_LOCKSCREEN_MANAGER_PROP_LOCKED]); |
769 |
-+ g_object_notify_by_pspec (G_OBJECT (self), props[PROP_LOCKED]); |
770 |
- } |
771 |
- |
772 |
- |
773 |
-@@ -272,7 +272,7 @@ phosh_lockscreen_manager_set_property (GObject *object, |
774 |
- PhoshLockscreenManager *self = PHOSH_LOCKSCREEN_MANAGER (object); |
775 |
- |
776 |
- switch (property_id) { |
777 |
-- case PHOSH_LOCKSCREEN_MANAGER_PROP_LOCKED: |
778 |
-+ case PROP_LOCKED: |
779 |
- phosh_lockscreen_manager_set_locked (self, g_value_get_boolean (value)); |
780 |
- break; |
781 |
- default: |
782 |
-@@ -291,7 +291,7 @@ phosh_lockscreen_manager_get_property (GObject *object, |
783 |
- PhoshLockscreenManager *self = PHOSH_LOCKSCREEN_MANAGER (object); |
784 |
- |
785 |
- switch (property_id) { |
786 |
-- case PHOSH_LOCKSCREEN_MANAGER_PROP_LOCKED: |
787 |
-+ case PROP_LOCKED: |
788 |
- g_value_set_boolean (value, self->locked); |
789 |
- break; |
790 |
- default: |
791 |
-@@ -341,13 +341,14 @@ phosh_lockscreen_manager_class_init (PhoshLockscreenManagerClass *klass) |
792 |
- object_class->set_property = phosh_lockscreen_manager_set_property; |
793 |
- object_class->get_property = phosh_lockscreen_manager_get_property; |
794 |
- |
795 |
-- props[PHOSH_LOCKSCREEN_MANAGER_PROP_LOCKED] = |
796 |
-+ props[PROP_LOCKED] = |
797 |
- g_param_spec_boolean ("locked", |
798 |
- "Locked", |
799 |
- "Whether the screen is locked", |
800 |
- FALSE, |
801 |
- G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS); |
802 |
-- g_object_class_install_properties (object_class, PHOSH_LOCKSCREEN_MANAGER_PROP_LAST_PROP, props); |
803 |
-+ |
804 |
-+ g_object_class_install_properties (object_class, PROP_LAST_PROP, props); |
805 |
- |
806 |
- /** |
807 |
- * PhoshLockscreenManager::wakeup-outputs |
808 |
--- |
809 |
-GitLab |
810 |
- |
811 |
- |
812 |
-From 3214736fe1b5f4abd31d4dec6a2b6ae5b0033395 Mon Sep 17 00:00:00 2001 |
813 |
-From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@×××××××.org> |
814 |
-Date: Thu, 8 Apr 2021 10:21:55 +0200 |
815 |
-Subject: [PATCH 4/9] proximity: Fix function spacing |
816 |
-MIME-Version: 1.0 |
817 |
-Content-Type: text/plain; charset=UTF-8 |
818 |
-Content-Transfer-Encoding: 8bit |
819 |
- |
820 |
-Signed-off-by: Guido Günther <guido.gunther@××××.sm> |
821 |
---- |
822 |
- src/proximity.c | 7 +++++++ |
823 |
- 1 file changed, 7 insertions(+) |
824 |
- |
825 |
-diff --git a/src/proximity.c b/src/proximity.c |
826 |
-index 89e1c863..169fba3f 100644 |
827 |
---- a/src/proximity.c |
828 |
-+++ b/src/proximity.c |
829 |
-@@ -65,6 +65,7 @@ on_proximity_claimed (PhoshSensorProxyManager *sensor_proxy_manager, |
830 |
- } |
831 |
- } |
832 |
- |
833 |
-+ |
834 |
- static void |
835 |
- on_proximity_released (PhoshSensorProxyManager *sensor_proxy_manager, |
836 |
- GAsyncResult *res, |
837 |
-@@ -89,6 +90,7 @@ on_proximity_released (PhoshSensorProxyManager *sensor_proxy_manager, |
838 |
- g_clear_pointer (&self->fader, phosh_cp_widget_destroy); |
839 |
- } |
840 |
- |
841 |
-+ |
842 |
- static void |
843 |
- phosh_proximity_claim_proximity (PhoshProximity *self, gboolean claim) |
844 |
- { |
845 |
-@@ -192,6 +194,7 @@ phosh_proximity_set_property (GObject *object, |
846 |
- } |
847 |
- } |
848 |
- |
849 |
-+ |
850 |
- static void |
851 |
- phosh_proximity_get_property (GObject *object, |
852 |
- guint property_id, |
853 |
-@@ -213,6 +216,7 @@ phosh_proximity_get_property (GObject *object, |
854 |
- } |
855 |
- } |
856 |
- |
857 |
-+ |
858 |
- static void |
859 |
- phosh_proximity_constructed (GObject *object) |
860 |
- { |
861 |
-@@ -237,6 +241,7 @@ phosh_proximity_constructed (GObject *object) |
862 |
- G_OBJECT_CLASS (phosh_proximity_parent_class)->constructed (object); |
863 |
- } |
864 |
- |
865 |
-+ |
866 |
- static void |
867 |
- phosh_proximity_dispose (GObject *object) |
868 |
- { |
869 |
-@@ -260,6 +265,7 @@ phosh_proximity_dispose (GObject *object) |
870 |
- G_OBJECT_CLASS (phosh_proximity_parent_class)->dispose (object); |
871 |
- } |
872 |
- |
873 |
-+ |
874 |
- static void |
875 |
- phosh_proximity_class_init (PhoshProximityClass *klass) |
876 |
- { |
877 |
-@@ -291,6 +297,7 @@ phosh_proximity_class_init (PhoshProximityClass *klass) |
878 |
- |
879 |
- } |
880 |
- |
881 |
-+ |
882 |
- static void |
883 |
- phosh_proximity_init (PhoshProximity *self) |
884 |
- { |
885 |
--- |
886 |
-GitLab |
887 |
- |
888 |
- |
889 |
-From dac5f658ffef409c29bd45735a777e0d8d35bad8 Mon Sep 17 00:00:00 2001 |
890 |
-From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@×××××××.org> |
891 |
-Date: Wed, 7 Apr 2021 15:02:13 +0200 |
892 |
-Subject: [PATCH 5/9] lockscreen: Drop style class |
893 |
-MIME-Version: 1.0 |
894 |
-Content-Type: text/plain; charset=UTF-8 |
895 |
-Content-Transfer-Encoding: 8bit |
896 |
- |
897 |
-We set it in the ui file already. |
898 |
- |
899 |
-Signed-off-by: Guido Günther <guido.gunther@××××.sm> |
900 |
---- |
901 |
- src/lockscreen.c | 4 ---- |
902 |
- 1 file changed, 4 deletions(-) |
903 |
- |
904 |
-diff --git a/src/lockscreen.c b/src/lockscreen.c |
905 |
-index 61ed356f..2992d12d 100644 |
906 |
---- a/src/lockscreen.c |
907 |
-+++ b/src/lockscreen.c |
908 |
-@@ -442,10 +442,6 @@ phosh_lockscreen_constructed (GObject *object) |
909 |
- gtk_window_set_decorated (GTK_WINDOW (self), FALSE); |
910 |
- gtk_widget_realize(GTK_WIDGET (self)); |
911 |
- |
912 |
-- gtk_style_context_add_class ( |
913 |
-- gtk_widget_get_style_context (GTK_WIDGET (self)), |
914 |
-- "phosh-lockscreen"); |
915 |
-- |
916 |
- gtk_widget_add_events (GTK_WIDGET (self), GDK_KEY_PRESS_MASK); |
917 |
- g_signal_connect (G_OBJECT (self), |
918 |
- "key_press_event", |
919 |
--- |
920 |
-GitLab |
921 |
- |
922 |
- |
923 |
-From c7571db13a0874dba50860c5ccb7703fcbe7bf7d Mon Sep 17 00:00:00 2001 |
924 |
-From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@×××××××.org> |
925 |
-Date: Wed, 7 Apr 2021 15:06:32 +0200 |
926 |
-Subject: [PATCH 6/9] Drop HANDY_USE_UNSTABLE_API |
927 |
-MIME-Version: 1.0 |
928 |
-Content-Type: text/plain; charset=UTF-8 |
929 |
-Content-Transfer-Encoding: 8bit |
930 |
- |
931 |
-Libhany's API isn't unstable anymore |
932 |
- |
933 |
-Signed-off-by: Guido Günther <guido.gunther@××××.sm> |
934 |
---- |
935 |
- src/lockscreen.c | 1 - |
936 |
- src/notifications/notification-banner.c | 1 - |
937 |
- src/overview.c | 1 - |
938 |
- 3 files changed, 3 deletions(-) |
939 |
- |
940 |
-diff --git a/src/lockscreen.c b/src/lockscreen.c |
941 |
-index 2992d12d..d367e262 100644 |
942 |
---- a/src/lockscreen.c |
943 |
-+++ b/src/lockscreen.c |
944 |
-@@ -20,7 +20,6 @@ |
945 |
- #include <math.h> |
946 |
- #include <time.h> |
947 |
- |
948 |
--#define HANDY_USE_UNSTABLE_API |
949 |
- #include <handy.h> |
950 |
- |
951 |
- #define GNOME_DESKTOP_USE_UNSTABLE_API |
952 |
-diff --git a/src/notifications/notification-banner.c b/src/notifications/notification-banner.c |
953 |
-index a85f27c7..fbdda5ad 100644 |
954 |
---- a/src/notifications/notification-banner.c |
955 |
-+++ b/src/notifications/notification-banner.c |
956 |
-@@ -14,7 +14,6 @@ |
957 |
- #include "shell.h" |
958 |
- #include "util.h" |
959 |
- |
960 |
--#define HANDY_USE_UNSTABLE_API |
961 |
- #include <handy.h> |
962 |
- |
963 |
- /** |
964 |
-diff --git a/src/overview.c b/src/overview.c |
965 |
-index 790b4ee3..088bda00 100644 |
966 |
---- a/src/overview.c |
967 |
-+++ b/src/overview.c |
968 |
-@@ -23,7 +23,6 @@ |
969 |
- |
970 |
- #include <gio/gdesktopappinfo.h> |
971 |
- |
972 |
--#define HANDY_USE_UNSTABLE_API |
973 |
- #include <handy.h> |
974 |
- |
975 |
- #define OVERVIEW_ICON_SIZE 64 |
976 |
--- |
977 |
-GitLab |
978 |
- |
979 |
- |
980 |
-From c0cd6cee102242fe0cfd82b3bf5d0bfd75a841cd Mon Sep 17 00:00:00 2001 |
981 |
-From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@×××××××.org> |
982 |
-Date: Tue, 6 Apr 2021 16:56:34 +0200 |
983 |
-Subject: [PATCH 7/9] Add calls manager |
984 |
-MIME-Version: 1.0 |
985 |
-Content-Type: text/plain; charset=UTF-8 |
986 |
-Content-Transfer-Encoding: 8bit |
987 |
- |
988 |
-This tracks ongoing calls via the sm.puri.Calls DBus interface. |
989 |
-This can be used to (e.g. activate the proximity sensor and to |
990 |
-unblank the screen on incoming calls). |
991 |
- |
992 |
-Signed-off-by: Guido Günther <guido.gunther@××××.sm> |
993 |
---- |
994 |
- docs/phosh-docs.xml | 1 + |
995 |
- src/calls-manager.c | 418 ++++++++++++++++++++++++++++++++ |
996 |
- src/calls-manager.h | 24 ++ |
997 |
- src/dbus/meson.build | 6 + |
998 |
- src/dbus/sm.puri.Calls.Call.xml | 39 +++ |
999 |
- src/meson.build | 2 + |
1000 |
- src/shell.c | 17 ++ |
1001 |
- src/shell.h | 2 + |
1002 |
- 8 files changed, 509 insertions(+) |
1003 |
- create mode 100644 src/calls-manager.c |
1004 |
- create mode 100644 src/calls-manager.h |
1005 |
- create mode 100644 src/dbus/sm.puri.Calls.Call.xml |
1006 |
- |
1007 |
-diff --git a/docs/phosh-docs.xml b/docs/phosh-docs.xml |
1008 |
-index 7a1bab7b..57ffbb8f 100644 |
1009 |
---- a/docs/phosh-docs.xml |
1010 |
-+++ b/docs/phosh-docs.xml |
1011 |
-@@ -50,6 +50,7 @@ |
1012 |
- <xi:include href="xml/batteryinfo.xml"/> |
1013 |
- <xi:include href="xml/bt-manager.xml"/> |
1014 |
- <xi:include href="xml/bt-info.xml"/> |
1015 |
-+ <xi:include href="xml/calls-manager.xml"/> |
1016 |
- <xi:include href="xml/connectivity-info.xml"/> |
1017 |
- <xi:include href="xml/dbus-notification.xml"/> |
1018 |
- <xi:include href="xml/docked-info.xml"/> |
1019 |
-diff --git a/src/dbus/meson.build b/src/dbus/meson.build |
1020 |
-index 0424cc39..613df7e8 100644 |
1021 |
---- a/src/dbus/meson.build |
1022 |
-+++ b/src/dbus/meson.build |
1023 |
-@@ -62,6 +62,12 @@ generated_dbus_sources += gnome.gdbus_codegen('mpris-dbus', |
1024 |
- 'org.mpris.MediaPlayer2.xml', |
1025 |
- interface_prefix: 'org.mpris', |
1026 |
- namespace: 'PhoshMprisDBus') |
1027 |
-+# Calls |
1028 |
-+generated_dbus_sources += gnome.gdbus_codegen('calls-dbus', |
1029 |
-+ 'sm.puri.Calls.Call.xml', |
1030 |
-+ object_manager: true, |
1031 |
-+ interface_prefix: 'sm.puri', |
1032 |
-+ namespace: 'PhoshCallsDBus') |
1033 |
- |
1034 |
- generated_dbus_sources += gnome.gdbus_codegen('phosh-wwan-ofono-dbus', |
1035 |
- 'org.ofono.xml', |
1036 |
-diff --git a/src/dbus/sm.puri.Calls.Call.xml b/src/dbus/sm.puri.Calls.Call.xml |
1037 |
-new file mode 100644 |
1038 |
-index 00000000..78ecafb5 |
1039 |
---- /dev/null |
1040 |
-+++ b/src/dbus/sm.puri.Calls.Call.xml |
1041 |
-@@ -0,0 +1,39 @@ |
1042 |
-+<!DOCTYPE node PUBLIC |
1043 |
-+ "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" |
1044 |
-+ "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd"> |
1045 |
-+ |
1046 |
-+<!-- |
1047 |
-+ Copyright (C) 2021 Purism SPC |
1048 |
-+ |
1049 |
-+ This library is free software; you can redistribute it and/or |
1050 |
-+ modify it under the terms of the GNU Lesser General Public |
1051 |
-+ License as published by the Free Software Foundation; either |
1052 |
-+ version 3 of the License, or (at your option) any later version. |
1053 |
-+ |
1054 |
-+ This library is distributed in the hope that it will be useful, |
1055 |
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
1056 |
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
1057 |
-+ Lesser General Public License for more details. |
1058 |
-+ |
1059 |
-+ You should have received a copy of the GNU Lesser General |
1060 |
-+ Public License along with this library; if not, see <http://www.gnu.org/licenses/>. |
1061 |
-+--> |
1062 |
-+ |
1063 |
-+<node> |
1064 |
-+ |
1065 |
-+ <interface name="sm.puri.Calls.Call"> |
1066 |
-+ <method name="Accept"/> |
1067 |
-+ <method name="Hangup"/> |
1068 |
-+ <property name="Inbound" type="b" access="read"/> |
1069 |
-+ <property name="State" type="u" access="read"/> |
1070 |
-+ <property name="Id" type="s" access="read"> |
1071 |
-+ <doc:doc> |
1072 |
-+ <doc:description> |
1073 |
-+ <doc:para>The Id identifying the call, e.g. a phone number</doc:para> |
1074 |
-+ </doc:description> |
1075 |
-+ </doc:doc> |
1076 |
-+ </property> |
1077 |
-+ <property name="Party" type="s" access="read"/> |
1078 |
-+ </interface> |
1079 |
-+ |
1080 |
-+</node> |
1081 |
-diff --git a/src/meson.build b/src/meson.build |
1082 |
-index c755f450..38c95248 100644 |
1083 |
---- a/src/meson.build |
1084 |
-+++ b/src/meson.build |
1085 |
-@@ -57,6 +57,8 @@ libphosh_tool_sources = files( |
1086 |
- 'app-list-model.h', |
1087 |
- 'background.c', |
1088 |
- 'background.h', |
1089 |
-+ 'calls-manager.c', |
1090 |
-+ 'calls-manager.h', |
1091 |
- 'connectivity-info.c', |
1092 |
- 'connectivity-info.h', |
1093 |
- 'end-session-dialog.c', |
1094 |
-diff --git a/src/shell.c b/src/shell.c |
1095 |
-index c5894fde..2120e1f8 100644 |
1096 |
---- a/src/shell.c |
1097 |
-+++ b/src/shell.c |
1098 |
-@@ -30,6 +30,7 @@ |
1099 |
- #include "bt-info.h" |
1100 |
- #include "bt-manager.h" |
1101 |
- #include "connectivity-info.h" |
1102 |
-+#include "calls-manager.h" |
1103 |
- #include "docked-info.h" |
1104 |
- #include "docked-manager.h" |
1105 |
- #include "fader.h" |
1106 |
-@@ -111,6 +112,7 @@ typedef struct |
1107 |
- |
1108 |
- PhoshSessionManager *session_manager; |
1109 |
- PhoshBackgroundManager *background_manager; |
1110 |
-+ PhoshCallsManager *calls_manager; |
1111 |
- PhoshMonitor *primary_monitor; |
1112 |
- PhoshMonitor *builtin_monitor; |
1113 |
- PhoshMonitorManager *monitor_manager; |
1114 |
-@@ -356,6 +358,7 @@ phosh_shell_dispose (GObject *object) |
1115 |
- |
1116 |
- /* dispose managers in opposite order of declaration */ |
1117 |
- g_clear_object (&priv->screenshot_manager); |
1118 |
-+ g_clear_object (&priv->calls_manager); |
1119 |
- g_clear_object (&priv->location_manager); |
1120 |
- g_clear_object (&priv->hks_manager); |
1121 |
- g_clear_object (&priv->docked_manager); |
1122 |
-@@ -723,6 +726,7 @@ phosh_shell_constructed (GObject *object) |
1123 |
- "/sm/puri/phosh/icons"); |
1124 |
- css_setup (self); |
1125 |
- |
1126 |
-+ priv->calls_manager = phosh_calls_manager_new (); |
1127 |
- priv->lockscreen_manager = phosh_lockscreen_manager_new (); |
1128 |
- g_object_bind_property (priv->lockscreen_manager, "locked", |
1129 |
- self, "locked", |
1130 |
-@@ -934,6 +938,19 @@ phosh_shell_get_background_manager (PhoshShell *self) |
1131 |
- } |
1132 |
- |
1133 |
- |
1134 |
-+PhoshCallsManager * |
1135 |
-+phosh_shell_get_calls_manager (PhoshShell *self) |
1136 |
-+{ |
1137 |
-+ PhoshShellPrivate *priv; |
1138 |
-+ |
1139 |
-+ g_return_val_if_fail (PHOSH_IS_SHELL (self), NULL); |
1140 |
-+ priv = phosh_shell_get_instance_private (self); |
1141 |
-+ g_return_val_if_fail (PHOSH_IS_CALLS_MANAGER (priv->calls_manager), NULL); |
1142 |
-+ |
1143 |
-+ return priv->calls_manager; |
1144 |
-+} |
1145 |
-+ |
1146 |
-+ |
1147 |
- PhoshWifiManager * |
1148 |
- phosh_shell_get_wifi_manager (PhoshShell *self) |
1149 |
- { |
1150 |
--- |
1151 |
-GitLab |
1152 |
|
1153 |
diff --git a/gui-wm/phosh/files/0006-calls-manager.patch b/gui-wm/phosh/files/0006-calls-manager.patch |
1154 |
deleted file mode 100644 |
1155 |
index f9eb22474..000000000 |
1156 |
--- a/gui-wm/phosh/files/0006-calls-manager.patch |
1157 |
+++ /dev/null |
1158 |
@@ -1,383 +0,0 @@ |
1159 |
-From ac8f72dafc04d94f79d2466177b43f50943c3dad Mon Sep 17 00:00:00 2001 |
1160 |
-From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@×××××××.org> |
1161 |
-Date: Wed, 7 Apr 2021 15:07:11 +0200 |
1162 |
-Subject: [PATCH 8/9] lockscreen-manager: Unblank on incoming calls |
1163 |
-MIME-Version: 1.0 |
1164 |
-Content-Type: text/plain; charset=UTF-8 |
1165 |
-Content-Transfer-Encoding: 8bit |
1166 |
- |
1167 |
-Do it here instead of in lockscreen-manager since |
1168 |
-is where we'd also switch to the calls page later on. |
1169 |
- |
1170 |
-Signed-off-by: Guido Günther <guido.gunther@××××.sm> |
1171 |
---- |
1172 |
- src/lockscreen-manager.c | 48 ++++++++++++++++++++++++++++++++++------ |
1173 |
- src/lockscreen-manager.h | 3 ++- |
1174 |
- src/shell.c | 2 +- |
1175 |
- 3 files changed, 44 insertions(+), 9 deletions(-) |
1176 |
- |
1177 |
-diff --git a/src/lockscreen-manager.c b/src/lockscreen-manager.c |
1178 |
-index afcdb6ba..4b986362 100644 |
1179 |
---- a/src/lockscreen-manager.c |
1180 |
-+++ b/src/lockscreen-manager.c |
1181 |
-@@ -44,6 +44,7 @@ static guint signals[N_SIGNALS] = { 0 }; |
1182 |
- enum { |
1183 |
- PROP_0, |
1184 |
- PROP_LOCKED, |
1185 |
-+ PROP_CALLS_MANAGER, |
1186 |
- PROP_LAST_PROP |
1187 |
- }; |
1188 |
- static GParamSpec *props[PROP_LAST_PROP]; |
1189 |
-@@ -52,13 +53,15 @@ static GParamSpec *props[PROP_LAST_PROP]; |
1190 |
- struct _PhoshLockscreenManager { |
1191 |
- GObject parent; |
1192 |
- |
1193 |
-- PhoshLockscreen *lockscreen; /* phone display lock screen */ |
1194 |
-- PhoshSessionPresence *presence; /* gnome-session's presence interface */ |
1195 |
-- GPtrArray *shields; /* other outputs */ |
1196 |
-+ PhoshLockscreen *lockscreen; /* phone display lock screen */ |
1197 |
-+ PhoshSessionPresence *presence; /* gnome-session's presence interface */ |
1198 |
-+ GPtrArray *shields; /* other outputs */ |
1199 |
- |
1200 |
- gboolean locked; |
1201 |
-- gint64 active_time; /* when lock was activated (in us) */ |
1202 |
-- int transform; /* the shell transform before locking */ |
1203 |
-+ gint64 active_time; /* when lock was activated (in us) */ |
1204 |
-+ int transform; /* the shell transform before locking */ |
1205 |
-+ |
1206 |
-+ PhoshCallsManager *calls_manager; /* Calls DBus Interface */ |
1207 |
- }; |
1208 |
- |
1209 |
- G_DEFINE_TYPE (PhoshLockscreenManager, phosh_lockscreen_manager, G_TYPE_OBJECT) |
1210 |
-@@ -275,6 +278,9 @@ phosh_lockscreen_manager_set_property (GObject *object, |
1211 |
- case PROP_LOCKED: |
1212 |
- phosh_lockscreen_manager_set_locked (self, g_value_get_boolean (value)); |
1213 |
- break; |
1214 |
-+ case PROP_CALLS_MANAGER: |
1215 |
-+ self->calls_manager = g_value_dup_object (value); |
1216 |
-+ break; |
1217 |
- default: |
1218 |
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); |
1219 |
- break; |
1220 |
-@@ -294,6 +300,9 @@ phosh_lockscreen_manager_get_property (GObject *object, |
1221 |
- case PROP_LOCKED: |
1222 |
- g_value_set_boolean (value, self->locked); |
1223 |
- break; |
1224 |
-+ case PROP_CALLS_MANAGER: |
1225 |
-+ g_value_set_object (value, self->calls_manager); |
1226 |
-+ break; |
1227 |
- default: |
1228 |
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); |
1229 |
- break; |
1230 |
-@@ -301,6 +310,15 @@ phosh_lockscreen_manager_get_property (GObject *object, |
1231 |
- } |
1232 |
- |
1233 |
- |
1234 |
-+static void |
1235 |
-+on_calls_call_inbound (PhoshLockscreen *self) |
1236 |
-+{ |
1237 |
-+ g_return_if_fail (PHOSH_IS_LOCKSCREEN_MANAGER (self)); |
1238 |
-+ |
1239 |
-+ g_signal_emit (self, signals[WAKEUP_OUTPUTS], 0); |
1240 |
-+} |
1241 |
-+ |
1242 |
-+ |
1243 |
- static void |
1244 |
- phosh_lockscreen_manager_dispose (GObject *object) |
1245 |
- { |
1246 |
-@@ -308,6 +326,7 @@ phosh_lockscreen_manager_dispose (GObject *object) |
1247 |
- |
1248 |
- g_clear_pointer (&self->shields, g_ptr_array_unref); |
1249 |
- g_clear_pointer (&self->lockscreen, phosh_cp_widget_destroy); |
1250 |
-+ g_clear_object (&self->calls_manager); |
1251 |
- |
1252 |
- G_OBJECT_CLASS (phosh_lockscreen_manager_parent_class)->dispose (object); |
1253 |
- } |
1254 |
-@@ -327,6 +346,12 @@ phosh_lockscreen_manager_constructed (GObject *object) |
1255 |
- (GCallback) presence_status_changed_cb, |
1256 |
- self); |
1257 |
- } |
1258 |
-+ |
1259 |
-+ g_signal_connect_object (self->calls_manager, |
1260 |
-+ "call-inbound", |
1261 |
-+ G_CALLBACK (on_calls_call_inbound), |
1262 |
-+ self, |
1263 |
-+ G_CONNECT_SWAPPED); |
1264 |
- } |
1265 |
- |
1266 |
- |
1267 |
-@@ -348,6 +373,13 @@ phosh_lockscreen_manager_class_init (PhoshLockscreenManagerClass *klass) |
1268 |
- FALSE, |
1269 |
- G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS); |
1270 |
- |
1271 |
-+ props[PROP_CALLS_MANAGER] = |
1272 |
-+ g_param_spec_object ("calls-manager", |
1273 |
-+ "", |
1274 |
-+ "", |
1275 |
-+ PHOSH_TYPE_CALLS_MANAGER, |
1276 |
-+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT_ONLY); |
1277 |
-+ |
1278 |
- g_object_class_install_properties (object_class, PROP_LAST_PROP, props); |
1279 |
- |
1280 |
- /** |
1281 |
-@@ -370,9 +402,11 @@ phosh_lockscreen_manager_init (PhoshLockscreenManager *self) |
1282 |
- |
1283 |
- |
1284 |
- PhoshLockscreenManager * |
1285 |
--phosh_lockscreen_manager_new (void) |
1286 |
-+phosh_lockscreen_manager_new (PhoshCallsManager *calls_manager) |
1287 |
- { |
1288 |
-- return g_object_new (PHOSH_TYPE_LOCKSCREEN_MANAGER, NULL); |
1289 |
-+ return g_object_new (PHOSH_TYPE_LOCKSCREEN_MANAGER, |
1290 |
-+ "calls-manager", calls_manager, |
1291 |
-+ NULL); |
1292 |
- } |
1293 |
- |
1294 |
- /** |
1295 |
-diff --git a/src/lockscreen-manager.h b/src/lockscreen-manager.h |
1296 |
-index 8dcfc8c0..3b0501a9 100644 |
1297 |
---- a/src/lockscreen-manager.h |
1298 |
-+++ b/src/lockscreen-manager.h |
1299 |
-@@ -6,6 +6,7 @@ |
1300 |
- |
1301 |
- #pragma once |
1302 |
- |
1303 |
-+#include "calls-manager.h" |
1304 |
- #include "lockscreen.h" |
1305 |
- #include <gtk/gtk.h> |
1306 |
- |
1307 |
-@@ -17,7 +18,7 @@ G_DECLARE_FINAL_TYPE (PhoshLockscreenManager, |
1308 |
- LOCKSCREEN_MANAGER, |
1309 |
- GObject) |
1310 |
- |
1311 |
--PhoshLockscreenManager *phosh_lockscreen_manager_new (void); |
1312 |
-+PhoshLockscreenManager *phosh_lockscreen_manager_new (PhoshCallsManager *calls_manager); |
1313 |
- void phosh_lockscreen_manager_set_locked (PhoshLockscreenManager *self, |
1314 |
- gboolean state); |
1315 |
- gboolean phosh_lockscreen_manager_get_locked (PhoshLockscreenManager *self); |
1316 |
-diff --git a/src/shell.c b/src/shell.c |
1317 |
-index 2120e1f8..99fd34b2 100644 |
1318 |
---- a/src/shell.c |
1319 |
-+++ b/src/shell.c |
1320 |
-@@ -727,7 +727,7 @@ phosh_shell_constructed (GObject *object) |
1321 |
- css_setup (self); |
1322 |
- |
1323 |
- priv->calls_manager = phosh_calls_manager_new (); |
1324 |
-- priv->lockscreen_manager = phosh_lockscreen_manager_new (); |
1325 |
-+ priv->lockscreen_manager = phosh_lockscreen_manager_new (priv->calls_manager); |
1326 |
- g_object_bind_property (priv->lockscreen_manager, "locked", |
1327 |
- self, "locked", |
1328 |
- G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE); |
1329 |
--- |
1330 |
-GitLab |
1331 |
- |
1332 |
- |
1333 |
-From 04ad113587f78291aa4b5613ca1e80016b6f2504 Mon Sep 17 00:00:00 2001 |
1334 |
-From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@×××××××.org> |
1335 |
-Date: Wed, 7 Apr 2021 16:51:49 +0200 |
1336 |
-Subject: [PATCH 9/9] proximity: Only use proximity sensor on active calls |
1337 |
-MIME-Version: 1.0 |
1338 |
-Content-Type: text/plain; charset=UTF-8 |
1339 |
-Content-Transfer-Encoding: 8bit |
1340 |
- |
1341 |
-See https://source.puri.sm/Librem5/calls/-/issues/175 |
1342 |
- |
1343 |
-Signed-off-by: Guido Günther <guido.gunther@××××.sm> |
1344 |
---- |
1345 |
- src/proximity.c | 65 +++++++++++++++++++++++++++---------------------- |
1346 |
- src/proximity.h | 4 +-- |
1347 |
- src/shell.c | 2 +- |
1348 |
- 3 files changed, 39 insertions(+), 32 deletions(-) |
1349 |
- |
1350 |
-diff --git a/src/proximity.c b/src/proximity.c |
1351 |
-index 169fba3f..1f57959f 100644 |
1352 |
---- a/src/proximity.c |
1353 |
-+++ b/src/proximity.c |
1354 |
-@@ -19,13 +19,16 @@ |
1355 |
- * SECTION:proximity |
1356 |
- * @short_description: Proximity sensor handling |
1357 |
- * @Title: PhoshProximity |
1358 |
-+ * |
1359 |
-+ * #PhoshProximity handles enabling and disabling the proximity detection |
1360 |
-+ * based on e.g. active calls. |
1361 |
- */ |
1362 |
- |
1363 |
- |
1364 |
- enum { |
1365 |
- PROP_0, |
1366 |
- PROP_SENSOR_PROXY_MANAGER, |
1367 |
-- PROP_LOCKSCREEN_MANAGER, |
1368 |
-+ PROP_CALLS_MANAGER, |
1369 |
- LAST_PROP, |
1370 |
- }; |
1371 |
- static GParamSpec *props[LAST_PROP]; |
1372 |
-@@ -35,7 +38,7 @@ typedef struct _PhoshProximity { |
1373 |
- |
1374 |
- gboolean claimed; |
1375 |
- PhoshSensorProxyManager *sensor_proxy_manager; |
1376 |
-- PhoshLockscreenManager *lockscreen_manager; |
1377 |
-+ PhoshCallsManager *calls_manager; |
1378 |
- PhoshFader *fader; |
1379 |
- } PhoshProximity; |
1380 |
- |
1381 |
-@@ -120,28 +123,32 @@ on_has_proximity_changed (PhoshProximity *self, |
1382 |
- { |
1383 |
- gboolean has_proximity; |
1384 |
- |
1385 |
-- /* Don't claim if locked to save power */ |
1386 |
-- if (phosh_lockscreen_manager_get_locked(self->lockscreen_manager)) |
1387 |
-- return; |
1388 |
-- |
1389 |
- has_proximity = phosh_dbus_sensor_proxy_get_has_proximity ( |
1390 |
- PHOSH_DBUS_SENSOR_PROXY (self->sensor_proxy_manager)); |
1391 |
- |
1392 |
- g_debug ("Found %s proximity sensor", has_proximity ? "a" : "no"); |
1393 |
-+ |
1394 |
-+ /* If prox went a way we always unclaim but only claim on ongoing calls: */ |
1395 |
-+ if (!phosh_calls_manager_get_active_call (self->calls_manager) && has_proximity) |
1396 |
-+ return; |
1397 |
-+ |
1398 |
- phosh_proximity_claim_proximity (self, has_proximity); |
1399 |
- } |
1400 |
- |
1401 |
-+ |
1402 |
- static void |
1403 |
--on_lockscreen_manager_locked (PhoshProximity *self, GParamSpec *pspec, |
1404 |
-- PhoshLockscreenManager *lockscreen_manager) |
1405 |
-+on_calls_manager_active_call_changed (PhoshProximity *self, |
1406 |
-+ GParamSpec *pspec, |
1407 |
-+ PhoshCallsManager *calls_manager) |
1408 |
- { |
1409 |
-- gboolean locked; |
1410 |
-+ gboolean active; |
1411 |
- |
1412 |
- g_return_if_fail (PHOSH_IS_PROXIMITY (self)); |
1413 |
-- g_return_if_fail (PHOSH_IS_LOCKSCREEN_MANAGER (lockscreen_manager)); |
1414 |
-+ g_return_if_fail (PHOSH_IS_CALLS_MANAGER (calls_manager)); |
1415 |
- |
1416 |
-- locked = phosh_lockscreen_manager_get_locked(self->lockscreen_manager); |
1417 |
-- phosh_proximity_claim_proximity (self, !locked); |
1418 |
-+ active = !!phosh_calls_manager_get_active_call(self->calls_manager); |
1419 |
-+ phosh_proximity_claim_proximity (self, active); |
1420 |
-+ /* TODO: if call is over wait until we hit the threshold */ |
1421 |
- } |
1422 |
- |
1423 |
- |
1424 |
-@@ -184,9 +191,9 @@ phosh_proximity_set_property (GObject *object, |
1425 |
- /* construct only */ |
1426 |
- self->sensor_proxy_manager = g_value_dup_object (value); |
1427 |
- break; |
1428 |
-- case PROP_LOCKSCREEN_MANAGER: |
1429 |
-+ case PROP_CALLS_MANAGER: |
1430 |
- /* construct only */ |
1431 |
-- self->lockscreen_manager = g_value_dup_object (value); |
1432 |
-+ self->calls_manager = g_value_dup_object (value); |
1433 |
- break; |
1434 |
- default: |
1435 |
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); |
1436 |
-@@ -207,8 +214,8 @@ phosh_proximity_get_property (GObject *object, |
1437 |
- case PROP_SENSOR_PROXY_MANAGER: |
1438 |
- g_value_set_object (value, self->sensor_proxy_manager); |
1439 |
- break; |
1440 |
-- case PROP_LOCKSCREEN_MANAGER: |
1441 |
-- g_value_set_object (value, self->lockscreen_manager); |
1442 |
-+ case PROP_CALLS_MANAGER: |
1443 |
-+ g_value_set_object (value, self->calls_manager); |
1444 |
- break; |
1445 |
- default: |
1446 |
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); |
1447 |
-@@ -222,9 +229,9 @@ phosh_proximity_constructed (GObject *object) |
1448 |
- { |
1449 |
- PhoshProximity *self = PHOSH_PROXIMITY (object); |
1450 |
- |
1451 |
-- g_signal_connect_swapped (self->lockscreen_manager, |
1452 |
-- "notify::locked", |
1453 |
-- G_CALLBACK (on_lockscreen_manager_locked), |
1454 |
-+ g_signal_connect_swapped (self->calls_manager, |
1455 |
-+ "notify::active-call", |
1456 |
-+ G_CALLBACK (on_calls_manager_active_call_changed), |
1457 |
- self); |
1458 |
- |
1459 |
- g_signal_connect_swapped (self->sensor_proxy_manager, |
1460 |
-@@ -255,10 +262,10 @@ phosh_proximity_dispose (GObject *object) |
1461 |
- g_clear_object (&self->sensor_proxy_manager); |
1462 |
- } |
1463 |
- |
1464 |
-- if (self->lockscreen_manager) { |
1465 |
-- g_signal_handlers_disconnect_by_data (self->lockscreen_manager, |
1466 |
-+ if (self->calls_manager) { |
1467 |
-+ g_signal_handlers_disconnect_by_data (self->calls_manager, |
1468 |
- self); |
1469 |
-- g_clear_object (&self->lockscreen_manager); |
1470 |
-+ g_clear_object (&self->calls_manager); |
1471 |
- } |
1472 |
- |
1473 |
- g_clear_pointer (&self->fader, phosh_cp_widget_destroy); |
1474 |
-@@ -285,12 +292,12 @@ phosh_proximity_class_init (PhoshProximityClass *klass) |
1475 |
- PHOSH_TYPE_SENSOR_PROXY_MANAGER, |
1476 |
- G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); |
1477 |
- |
1478 |
-- props[PROP_LOCKSCREEN_MANAGER] = |
1479 |
-+ props[PROP_CALLS_MANAGER] = |
1480 |
- g_param_spec_object ( |
1481 |
-- "lockscreen-manager", |
1482 |
-- "Lockscren manager", |
1483 |
-- "The object managing the lock screen", |
1484 |
-- PHOSH_TYPE_LOCKSCREEN_MANAGER, |
1485 |
-+ "calls-manager", |
1486 |
-+ "", |
1487 |
-+ "", |
1488 |
-+ PHOSH_TYPE_CALLS_MANAGER, |
1489 |
- G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); |
1490 |
- |
1491 |
- g_object_class_install_properties (object_class, LAST_PROP, props); |
1492 |
-@@ -306,10 +313,10 @@ phosh_proximity_init (PhoshProximity *self) |
1493 |
- |
1494 |
- PhoshProximity * |
1495 |
- phosh_proximity_new (PhoshSensorProxyManager *sensor_proxy_manager, |
1496 |
-- PhoshLockscreenManager *lockscreen_manager) |
1497 |
-+ PhoshCallsManager *calls_manager) |
1498 |
- { |
1499 |
- return g_object_new (PHOSH_TYPE_PROXIMITY, |
1500 |
- "sensor-proxy-manager", sensor_proxy_manager, |
1501 |
-- "lockscreen-manager", lockscreen_manager, |
1502 |
-+ "calls-manager", calls_manager, |
1503 |
- NULL); |
1504 |
- } |
1505 |
-diff --git a/src/proximity.h b/src/proximity.h |
1506 |
-index ad9a0ed1..ef2e6da7 100644 |
1507 |
---- a/src/proximity.h |
1508 |
-+++ b/src/proximity.h |
1509 |
-@@ -6,7 +6,7 @@ |
1510 |
- |
1511 |
- #pragma once |
1512 |
- |
1513 |
--#include "lockscreen-manager.h" |
1514 |
-+#include "calls-manager.h" |
1515 |
- #include "sensor-proxy-manager.h" |
1516 |
- |
1517 |
- G_BEGIN_DECLS |
1518 |
-@@ -16,6 +16,6 @@ G_BEGIN_DECLS |
1519 |
- G_DECLARE_FINAL_TYPE (PhoshProximity, phosh_proximity, PHOSH, PROXIMITY, GObject); |
1520 |
- |
1521 |
- PhoshProximity *phosh_proximity_new (PhoshSensorProxyManager *sensor_proxy_manager, |
1522 |
-- PhoshLockscreenManager *lockscreen_manager); |
1523 |
-+ PhoshCallsManager *calls_manager); |
1524 |
- |
1525 |
- G_END_DECLS |
1526 |
-diff --git a/src/shell.c b/src/shell.c |
1527 |
-index 99fd34b2..9122c5ed 100644 |
1528 |
---- a/src/shell.c |
1529 |
-+++ b/src/shell.c |
1530 |
-@@ -513,7 +513,7 @@ setup_idle_cb (PhoshShell *self) |
1531 |
- phosh_shell_get_location_manager (self); |
1532 |
- if (priv->sensor_proxy_manager) { |
1533 |
- priv->proximity = phosh_proximity_new (priv->sensor_proxy_manager, |
1534 |
-- priv->lockscreen_manager); |
1535 |
-+ priv->calls_manager); |
1536 |
- phosh_monitor_manager_set_sensor_proxy_manager (priv->monitor_manager, |
1537 |
- priv->sensor_proxy_manager); |
1538 |
- } |
1539 |
--- |
1540 |
-GitLab |
1541 |
- |
1542 |
|
1543 |
diff --git a/gui-wm/phosh/phosh-0.11.0.ebuild b/gui-wm/phosh/phosh-0.12.0.ebuild |
1544 |
similarity index 82% |
1545 |
rename from gui-wm/phosh/phosh-0.11.0.ebuild |
1546 |
rename to gui-wm/phosh/phosh-0.12.0.ebuild |
1547 |
index be7f96a4c..206aec909 100644 |
1548 |
--- a/gui-wm/phosh/phosh-0.11.0.ebuild |
1549 |
+++ b/gui-wm/phosh/phosh-0.12.0.ebuild |
1550 |
@@ -11,7 +11,7 @@ MY_COMMIT="c5ab6037f460406ac9799b1e5765de3ce0097a8b" |
1551 |
DESCRIPTION="A pure Wayland shell prototype for GNOME on mobile devices" |
1552 |
HOMEPAGE="https://source.puri.sm/Librem5/phosh" |
1553 |
SRC_URI=" |
1554 |
- https://source.puri.sm/Librem5/phosh/-/archive/v0.11.0/${MY_P}.tar.gz |
1555 |
+ https://source.puri.sm/Librem5/phosh/-/archive/v${PV}/${MY_P}.tar.gz |
1556 |
https://gitlab.gnome.org/GNOME/libgnome-volume-control/-/archive/${MY_COMMIT}.tar.gz -> libgnome-volume-control-${MY_COMMIT}.tar.gz |
1557 |
" |
1558 |
S="${WORKDIR}/${MY_P}" |
1559 |
@@ -40,15 +40,6 @@ BDEPEND=" |
1560 |
dev-util/meson |
1561 |
" |
1562 |
|
1563 |
-PATCHES=( |
1564 |
- "${FILESDIR}"/0001-system-prompt-allow-blank-passwords.patch |
1565 |
- "${FILESDIR}"/0002-fix-locale-issue.patch |
1566 |
- "${FILESDIR}"/0003-fix-locale-issue-in-service-file.patch |
1567 |
- "${FILESDIR}"/0004-calls-manager.patch |
1568 |
- "${FILESDIR}"/0005-calls-manager.patch |
1569 |
- "${FILESDIR}"/0006-calls-manager.patch |
1570 |
-) |
1571 |
- |
1572 |
src_prepare() { |
1573 |
default |
1574 |
eapply_user |