temp/gnome-contacts: drop (MR 3072)

See https://gitlab.com/postmarketOS/pmaports/issues/1479
This commit is contained in:
Newbyte 2022-04-13 08:59:50 +02:00
parent 664c7ac2e7
commit 58488d02de
No known key found for this signature in database
GPG key ID: 5873C171C9429CFA
5 changed files with 0 additions and 229 deletions

View file

@ -1,74 +0,0 @@
From 1886c2028ebd8e7ef48c55c2289cace2d860e311 Mon Sep 17 00:00:00 2001
From: Julian Sparber <julian@sparber.net>
Date: Fri, 2 Aug 2019 18:32:31 +0200
Subject: [PATCH] ContactSheet: Add make call and send sms button
This adds a button to make calls via the default handler for tel:
and a button to send sms via the default handler for sms:
The buttons are hidden when no handler is available
---
src/contacts-contact-sheet.vala | 28 ++++++++++++++++++++++++----
src/contacts-utils.vala | 18 ++++++++++++++++++
2 files changed, 42 insertions(+), 4 deletions(-)
diff --git a/src/contacts-contact-sheet.vala b/src/contacts-contact-sheet.vala
index 480494af..467a61a0 100644
--- a/src/contacts-contact-sheet.vala
+++ b/src/contacts-contact-sheet.vala
@@ -201,7 +205,23 @@ public class Contacts.ContactSheet : ContactForm {
add_row_with_label (TypeSet.phone.format_type (phone), phone.value);
}
#else
- add_row_with_label (TypeSet.phone.format_type (phone), phone.value);
+ // Show a call button when we have a hanlder for it
+ Gtk.Button call_button = null;
+ Gtk.Button sms_button = null;
+ if (AppInfo.get_all_for_type ("x-scheme-handler/tel").length () > 0) {
+ call_button = create_button ("call-start-symbolic");
+ call_button.clicked.connect (() => {
+ Utils.start_call (phone.value);
+ });
+ }
+ if (AppInfo.get_all_for_type ("x-scheme-handler/sms").length () > 0) {
+ sms_button = create_button ("mail-unread-symbolic");
+ sms_button.clicked.connect (() => {
+ Utils.send_sms (phone.value);
+ });
+ }
+
+ add_row_with_label (TypeSet.phone.format_type (phone), phone.value, call_button, sms_button);
#endif
}
}
diff --git a/src/contacts-utils.vala b/src/contacts-utils.vala
index b8858194..adbff296 100644
--- a/src/contacts-utils.vala
+++ b/src/contacts-utils.vala
@@ -112,6 +112,24 @@ namespace Contacts.Utils {
var request = new TelepathyGLib.AccountChannelRequest(account, request_dict, int64.MAX);
request.ensure_channel_async.begin ("org.freedesktop.Telepathy.Client.Empathy.Call", null);
}
+#else
+ public void start_call (string number) {
+ var uri = "tel:" + Uri.escape_string (number, "+" , false);
+ try {
+ Gtk.show_uri_on_window (null, uri, 0);
+ } catch (Error e) {
+ debug ("Couldn't launch URI \"%s\": %s", uri, e.message);
+ }
+ }
+
+ public void send_sms (string number) {
+ var uri = "sms:" + Uri.escape_string (number, "+" , false);
+ try {
+ Gtk.show_uri_on_window (null, uri, 0);
+ } catch (Error e) {
+ debug ("Couldn't launch URI \"%s\": %s", uri, e.message);
+ }
+ }
#endif
public T? get_first<T> (Gee.Collection<T> collection) {
--
2.26.2

View file

@ -1,42 +0,0 @@
From 584b39696178806491a4a6556c8844e1471737c9 Mon Sep 17 00:00:00 2001
From: Julian Sparber <julian@sparber.net>
Date: Mon, 4 Nov 2019 11:34:19 +0100
Subject: [PATCH] Contact-Sheet: use normalized phone number for tel: and sms:
Fixes: https://source.puri.sm/Librem5/gnome-contacts/issues/33
---
src/contacts-contact-sheet.vala | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/contacts-contact-sheet.vala b/src/contacts-contact-sheet.vala
index b789d5b8..ec8d5a78 100644
--- a/src/contacts-contact-sheet.vala
+++ b/src/contacts-contact-sheet.vala
@@ -224,7 +224,7 @@ public class Contacts.ContactSheet : Grid {
if (this.store.caller_account != null) {
var call_button = create_button ("call-start-symbolic");
call_button.clicked.connect (() => {
- Utils.start_call (phone.value, this.store.caller_account);
+ Utils.start_call (phone.get_normalised (), this.store.caller_account);
});
add_row_with_label (TypeSet.phone.format_type (phone), phone.value, call_button);
@@ -238,13 +238,13 @@ public class Contacts.ContactSheet : Grid {
if (AppInfo.get_all_for_type ("x-scheme-handler/tel").length () > 0) {
call_button = create_button ("call-start-symbolic");
call_button.clicked.connect (() => {
- Utils.start_call (phone.value);
+ Utils.start_call (phone.get_normalised ());
});
}
if (AppInfo.get_all_for_type ("x-scheme-handler/sms").length () > 0) {
sms_button = create_button ("mail-unread-symbolic");
sms_button.clicked.connect (() => {
- Utils.send_sms (phone.value);
+ Utils.send_sms (phone.get_normalised ());
});
}
--
2.26.2

View file

@ -1,26 +0,0 @@
From 8fc4f25a88fc26ac4a85e331b9d5e1e6e92453d0 Mon Sep 17 00:00:00 2001
From: Julian Sparber <julian@sparber.net>
Date: Fri, 13 Dec 2019 13:16:26 +0100
Subject: [PATCH] Sheet: use user-available-symbolic for send sms btn
Fixes https://source.puri.sm/Librem5/gnome-contacts/issues/28
---
src/contacts-contact-sheet.vala | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/contacts-contact-sheet.vala b/src/contacts-contact-sheet.vala
index d24cd41d..1904718d 100644
--- a/src/contacts-contact-sheet.vala
+++ b/src/contacts-contact-sheet.vala
@@ -242,7 +242,7 @@ public class Contacts.ContactSheet : Grid {
});
}
if (AppInfo.get_all_for_type ("x-scheme-handler/sms").length () > 0) {
- sms_button = create_button ("mail-unread-symbolic");
+ sms_button = create_button ("user-available-symbolic");
sms_button.clicked.connect (() => {
Utils.send_sms (phone.get_normalised ());
});
--
2.26.2

View file

@ -1,43 +0,0 @@
From f3e981a1ce9f2bd6860eb980687bc479595711ef Mon Sep 17 00:00:00 2001
From: Julian Sparber <julian@sparber.net>
Date: Thu, 28 Nov 2019 17:30:46 +0100
Subject: [PATCH] ContactSheet: always show im details
---
src/contacts-contact-sheet.vala | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/contacts-contact-sheet.vala b/src/contacts-contact-sheet.vala
index ec8d5a78..d24cd41d 100644
--- a/src/contacts-contact-sheet.vala
+++ b/src/contacts-contact-sheet.vala
@@ -255,11 +255,11 @@ public class Contacts.ContactSheet : Grid {
}
private void add_im_addresses (Persona persona) {
-#if HAVE_TELEPATHY
var im_details = persona as ImDetails;
if (im_details != null) {
foreach (var protocol in im_details.im_addresses.get_keys ()) {
foreach (var id in im_details.im_addresses[protocol]) {
+#if HAVE_TELEPATHY
if (persona is Tpf.Persona) {
var button = create_button ("user-available-symbolic");
button.clicked.connect (() => {
@@ -274,10 +274,12 @@ public class Contacts.ContactSheet : Grid {
});
add_row_with_label (ImService.get_display_name (protocol), id.value, button);
}
+#else
+ add_row_with_label (ImService.get_display_name (protocol), id.value);
+#endif
}
}
}
-#endif
}
private void add_urls (Persona persona) {
--
2.26.2

View file

@ -1,44 +0,0 @@
# Forked from Alpine to apply Purism's mobile patches
pkgname=gnome-contacts
pkgver=9999_git20211030
_pkgver=41.0
pkgrel=0
pkgdesc="A contacts manager for GNOME"
url="https://wiki.gnome.org/Apps/Contacts"
# mips64 and riscv64 blocked by webkit2gtk -> evolution-data-server
# s390x blocked by libhandy1
arch="all !s390x !mips64 !riscv64"
license="GPL-2.0-or-later"
makedepends="meson vala folks-dev libgee-dev glib-dev gnome-desktop-dev
gnome-online-accounts-dev cheese-dev evolution-data-server-dev telepathy-glib-dev
libhandy1-dev gtk+3.0-dev"
checkdepends="appstream-glib desktop-file-utils"
subpackages="$pkgname-lang $pkgname-doc"
source="https://download.gnome.org/sources/gnome-contacts/${_pkgver%.*}/gnome-contacts-$_pkgver.tar.xz
0001-ContactSheet-Add-make-call-and-send-sms-button.patch
0002-Contact-Sheet-use-normalized-phone-number-for-tel-and-sms-.patch
0003-Sheet-use-user-available-symbolic-for-send-sms-btn.patch
0004-ContactSheet-always-show-im-details.patch"
builddir="$srcdir/$pkgname-$_pkgver"
build() {
abuild-meson . output
meson compile ${JOBS:+-j ${JOBS}} -C output
}
check() {
meson test --no-rebuild -v -C output
}
package() {
DESTDIR="$pkgdir" meson install --no-rebuild -C output
}
sha512sums="
310f333c0863d8e58c2280b994071b2655eee7224ab80a468ffc7acc61834d3f6dbb794bbdc5b8d4428226bab96f3ea65b8bed39df79d88704e38b51a8f4b05f gnome-contacts-41.0.tar.xz
8bf50d6090b1cab1489eb2a837fa774077658d2bb70ccc920bf225d7ec379d1d487f6e8e88d87732ee56826abcb2e85b3eb70bdbbeba89aa5bf1aa1af7f4fe4e 0001-ContactSheet-Add-make-call-and-send-sms-button.patch
163dd9506f783af1816c2884f606e910c4b22322268d54d11296978f3359c1973627b04c65d8c78bb403882c3194a39a38952cc17ccd07ffa2735e9d818bf5fc 0002-Contact-Sheet-use-normalized-phone-number-for-tel-and-sms-.patch
e7485667fbc0a8d53d9e7a554e72fd029143b3b4a94b04c8132dd9e8d87c0771411b89493e8f863f091fca573f5f5c7ff573baf081a3228e8d5ef8b3130743ff 0003-Sheet-use-user-available-symbolic-for-send-sms-btn.patch
1535bee27e8835727be875c22d6c5641610f19ea5982a57b648ee585c5e4b4037e501457869fdf73c3965b31456ea8944ff7259d3ace5d1f4397a70e8bd903ae 0004-ContactSheet-always-show-im-details.patch
"