Compare commits

...

No commits in common. "c8" and "c9-beta" have entirely different histories.
c8 ... c9-beta

9 changed files with 6573 additions and 609 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/gnome-online-accounts-3.28.2.tar.xz SOURCES/gnome-online-accounts-3.40.0.tar.xz

View File

@ -0,0 +1 @@
547da191a47b8f35ced486fa94145b85ad45c864 SOURCES/gnome-online-accounts-3.40.0.tar.xz

View File

@ -0,0 +1,286 @@
From 0820053ff418bf64db56fa8e63133c3d2e504807 Mon Sep 17 00:00:00 2001
From: Debarshi Ray <debarshir@gnome.org>
Date: Fri, 23 Nov 2018 14:07:09 +0100
Subject: [PATCH] Remove Documents support
In theory, online integration for documents is still desired. However,
these days, GNOME Documents is weekly maintained and doesn't receive
much attention from designers and developers. Therefore, it needs to be
withdrawn from the set of core applications until the situation
changes.
https://pagure.io/fedora-workstation/issue/83
---
data/dbus-interfaces.xml | 3 +++
src/goabackend/goabackendenums.h | 2 +-
src/goabackend/goagoogleprovider.c | 12 ------------
src/goabackend/goaobjectskeletonutils.c | 23 -----------------------
src/goabackend/goaobjectskeletonutils.h | 3 ---
src/goabackend/goaowncloudprovider.c | 12 ------------
src/goabackend/goawindowsliveprovider.c | 17 ++---------------
7 files changed, 6 insertions(+), 66 deletions(-)
diff --git a/data/dbus-interfaces.xml b/data/dbus-interfaces.xml
index 21c42c13d003..072d6aaca3b6 100644
--- a/data/dbus-interfaces.xml
+++ b/data/dbus-interfaces.xml
@@ -668,6 +668,9 @@
An account object implements this interface if it provides
documents-like capabilities.
+
+ The #org.gnome.OnlineAccounts.Documents interface is not used
+ by any account.
-->
<interface name="org.gnome.OnlineAccounts.Documents">
</interface>
diff --git a/src/goabackend/goabackendenums.h b/src/goabackend/goabackendenums.h
index 638674aaf4e0..38f46fa8c193 100644
--- a/src/goabackend/goabackendenums.h
+++ b/src/goabackend/goabackendenums.h
@@ -63,7 +63,7 @@ typedef enum
* @GOA_PROVIDER_FEATURE_CALENDAR: Calendaring services (ie. CalDAV).
* @GOA_PROVIDER_FEATURE_CONTACTS: Addressbook services (ie. CardDAV).
* @GOA_PROVIDER_FEATURE_CHAT: Instant messaging services (ie. XMPP, IRC).
- * @GOA_PROVIDER_FEATURE_DOCUMENTS: Documents storage services (ie. Google Documents).
+ * @GOA_PROVIDER_FEATURE_DOCUMENTS: Documents storage services (ie. Google Documents); currently unused.
* @GOA_PROVIDER_FEATURE_PHOTOS: Photos storage services (ie. Flickr).
* @GOA_PROVIDER_FEATURE_FILES: Files storage services (ie. WebDAV).
* @GOA_PROVIDER_FEATURE_TICKETING: Ticketing services (ie. Kerberos).
diff --git a/src/goabackend/goagoogleprovider.c b/src/goabackend/goagoogleprovider.c
index 9e331c110119..9332c0fdca0b 100644
--- a/src/goabackend/goagoogleprovider.c
+++ b/src/goabackend/goagoogleprovider.c
@@ -69,7 +69,6 @@ get_provider_features (GoaProvider *provider)
GOA_PROVIDER_FEATURE_MAIL |
GOA_PROVIDER_FEATURE_CALENDAR |
GOA_PROVIDER_FEATURE_CONTACTS |
- GOA_PROVIDER_FEATURE_DOCUMENTS |
GOA_PROVIDER_FEATURE_PHOTOS |
GOA_PROVIDER_FEATURE_FILES |
GOA_PROVIDER_FEATURE_PRINTERS;
@@ -281,7 +280,6 @@ build_object (GoaProvider *provider,
gboolean mail_enabled;
gboolean calendar_enabled;
gboolean contacts_enabled;
- gboolean documents_enabled;
gboolean files_enabled;
gboolean photos_enabled;
gboolean printers_enabled;
@@ -344,10 +342,6 @@ build_object (GoaProvider *provider,
contacts_enabled,
FALSE);
- /* Documents */
- documents_enabled = g_key_file_get_boolean (key_file, group, "DocumentsEnabled", NULL);
- goa_object_skeleton_attach_documents (object, documents_enabled);
-
/* Photos */
photos_enabled = g_key_file_get_boolean (key_file, group, "PhotosEnabled", NULL);
goa_object_skeleton_attach_photos (object, photos_enabled);
@@ -367,7 +361,6 @@ build_object (GoaProvider *provider,
goa_account_set_mail_disabled (account, !mail_enabled);
goa_account_set_calendar_disabled (account, !calendar_enabled);
goa_account_set_contacts_disabled (account, !contacts_enabled);
- goa_account_set_documents_disabled (account, !documents_enabled);
goa_account_set_photos_disabled (account, !photos_enabled);
goa_account_set_files_disabled (account, !files_enabled);
goa_account_set_printers_disabled (account, !printers_enabled);
@@ -384,10 +377,6 @@ build_object (GoaProvider *provider,
"notify::contacts-disabled",
G_CALLBACK (goa_util_account_notify_property_cb),
(gpointer) "ContactsEnabled");
- g_signal_connect (account,
- "notify::documents-disabled",
- G_CALLBACK (goa_util_account_notify_property_cb),
- (gpointer) "DocumentsEnabled");
g_signal_connect (account,
"notify::photos-disabled",
G_CALLBACK (goa_util_account_notify_property_cb),
@@ -419,7 +408,6 @@ add_account_key_values (GoaOAuth2Provider *oauth2_provider,
g_variant_builder_add (builder, "{ss}", "MailEnabled", "true");
g_variant_builder_add (builder, "{ss}", "CalendarEnabled", "true");
g_variant_builder_add (builder, "{ss}", "ContactsEnabled", "true");
- g_variant_builder_add (builder, "{ss}", "DocumentsEnabled", "true");
g_variant_builder_add (builder, "{ss}", "PhotosEnabled", "true");
g_variant_builder_add (builder, "{ss}", "FilesEnabled", "true");
g_variant_builder_add (builder, "{ss}", "PrintersEnabled", "true");
diff --git a/src/goabackend/goaobjectskeletonutils.c b/src/goabackend/goaobjectskeletonutils.c
index 657bffd712f3..610c6ee26233 100644
--- a/src/goabackend/goaobjectskeletonutils.c
+++ b/src/goabackend/goaobjectskeletonutils.c
@@ -109,29 +109,6 @@ goa_object_skeleton_attach_contacts (GoaObjectSkeleton *object,
g_clear_object (&contacts);
}
-void
-goa_object_skeleton_attach_documents (GoaObjectSkeleton *object,
- gboolean documents_enabled)
-{
- GoaDocuments *documents;
-
- documents = goa_object_get_documents (GOA_OBJECT (object));
- if (documents_enabled)
- {
- if (documents == NULL)
- {
- documents = goa_documents_skeleton_new ();
- goa_object_skeleton_set_documents (object, documents);
- }
- }
- else
- {
- if (documents != NULL)
- goa_object_skeleton_set_documents (object, NULL);
- }
- g_clear_object (&documents);
-}
-
void
goa_object_skeleton_attach_photos (GoaObjectSkeleton *object,
gboolean photos_enabled)
diff --git a/src/goabackend/goaobjectskeletonutils.h b/src/goabackend/goaobjectskeletonutils.h
index 699695285028..6bc413c38f55 100644
--- a/src/goabackend/goaobjectskeletonutils.h
+++ b/src/goabackend/goaobjectskeletonutils.h
@@ -38,9 +38,6 @@ void goa_object_skeleton_attach_contacts (GoaObjectSkeleton *o
gboolean contacts_enabled,
gboolean accept_ssl_errors);
-void goa_object_skeleton_attach_documents (GoaObjectSkeleton *object,
- gboolean documents_enabled);
-
void goa_object_skeleton_attach_files (GoaObjectSkeleton *object,
const gchar *uri,
gboolean files_enabled,
diff --git a/src/goabackend/goaowncloudprovider.c b/src/goabackend/goaowncloudprovider.c
index 29d461a880d8..d1429661fe2e 100644
--- a/src/goabackend/goaowncloudprovider.c
+++ b/src/goabackend/goaowncloudprovider.c
@@ -72,7 +72,6 @@ get_provider_features (GoaProvider *provider)
return GOA_PROVIDER_FEATURE_BRANDED |
GOA_PROVIDER_FEATURE_CALENDAR |
GOA_PROVIDER_FEATURE_CONTACTS |
- GOA_PROVIDER_FEATURE_DOCUMENTS |
GOA_PROVIDER_FEATURE_FILES;
}
@@ -145,7 +144,6 @@ build_object (GoaProvider *provider,
gboolean accept_ssl_errors;
gboolean calendar_enabled;
gboolean contacts_enabled;
- gboolean documents_enabled;
gboolean files_enabled;
gboolean ret = FALSE;
const gchar *identity;
@@ -196,10 +194,6 @@ build_object (GoaProvider *provider,
goa_object_skeleton_attach_contacts (object, uri_carddav, contacts_enabled, accept_ssl_errors);
g_free (uri_carddav);
- /* Documents */
- documents_enabled = g_key_file_get_boolean (key_file, group, "DocumentsEnabled", NULL);
- goa_object_skeleton_attach_documents (object, documents_enabled);
-
/* Files */
files_enabled = g_key_file_get_boolean (key_file, group, "FilesEnabled", NULL);
uri_webdav = get_webdav_uri (uri);
@@ -210,7 +204,6 @@ build_object (GoaProvider *provider,
{
goa_account_set_calendar_disabled (account, !calendar_enabled);
goa_account_set_contacts_disabled (account, !contacts_enabled);
- goa_account_set_documents_disabled (account, !documents_enabled);
goa_account_set_files_disabled (account, !files_enabled);
g_signal_connect (account,
@@ -221,10 +214,6 @@ build_object (GoaProvider *provider,
"notify::contacts-disabled",
G_CALLBACK (goa_util_account_notify_property_cb),
(gpointer) "ContactsEnabled");
- g_signal_connect (account,
- "notify::documents-disabled",
- G_CALLBACK (goa_util_account_notify_property_cb),
- (gpointer) "DocumentsEnabled");
g_signal_connect (account,
"notify::files-disabled",
G_CALLBACK (goa_util_account_notify_property_cb),
@@ -750,7 +739,6 @@ add_account (GoaProvider *provider,
g_variant_builder_init (&details, G_VARIANT_TYPE ("a{ss}"));
g_variant_builder_add (&details, "{ss}", "CalendarEnabled", "true");
g_variant_builder_add (&details, "{ss}", "ContactsEnabled", "true");
- g_variant_builder_add (&details, "{ss}", "DocumentsEnabled", "true");
g_variant_builder_add (&details, "{ss}", "FilesEnabled", "true");
g_variant_builder_add (&details, "{ss}", "Uri", uri);
g_variant_builder_add (&details, "{ss}", "AcceptSslErrors", (accept_ssl_errors) ? "true" : "false");
diff --git a/src/goabackend/goawindowsliveprovider.c b/src/goabackend/goawindowsliveprovider.c
index 10c2dcff4738..be357465230a 100644
--- a/src/goabackend/goawindowsliveprovider.c
+++ b/src/goabackend/goawindowsliveprovider.c
@@ -73,8 +73,7 @@ static GoaProviderFeatures
get_provider_features (GoaProvider *provider)
{
return GOA_PROVIDER_FEATURE_BRANDED |
- GOA_PROVIDER_FEATURE_MAIL |
- GOA_PROVIDER_FEATURE_DOCUMENTS;
+ GOA_PROVIDER_FEATURE_MAIL;
}
static const gchar *
@@ -102,14 +101,13 @@ get_scope (GoaOAuth2Provider *oauth2_provider)
{
return "wl.imap,"
"wl.offline_access,"
- "wl.skydrive_update,"
"wl.emails";
}
static guint
get_credentials_generation (GoaProvider *provider)
{
- return 3;
+ return 4;
}
static const gchar *
@@ -276,7 +274,6 @@ build_object (GoaProvider *provider,
GoaAccount *account = NULL;
GoaMail *mail = NULL;
gboolean mail_enabled;
- gboolean documents_enabled;
gboolean ret = FALSE;
const gchar *email_address;
@@ -323,23 +320,14 @@ build_object (GoaProvider *provider,
goa_object_skeleton_set_mail (object, NULL);
}
- /* Documents */
- documents_enabled = g_key_file_get_boolean (key_file, group, "DocumentsEnabled", NULL);
- goa_object_skeleton_attach_documents (object, documents_enabled);
-
if (just_added)
{
goa_account_set_mail_disabled (account, !mail_enabled);
- goa_account_set_documents_disabled (account, !documents_enabled);
g_signal_connect (account,
"notify::mail-disabled",
G_CALLBACK (goa_util_account_notify_property_cb),
(gpointer) "MailEnabled");
- g_signal_connect (account,
- "notify::documents-disabled",
- G_CALLBACK (goa_util_account_notify_property_cb),
- (gpointer) "DocumentsEnabled");
}
ret = TRUE;
@@ -357,7 +345,6 @@ add_account_key_values (GoaOAuth2Provider *oauth2_provider,
GVariantBuilder *builder)
{
g_variant_builder_add (builder, "{ss}", "MailEnabled", "true");
- g_variant_builder_add (builder, "{ss}", "DocumentsEnabled", "true");
}
/* ---------------------------------------------------------------------------------------------------- */
--
2.30.2

View File

@ -0,0 +1,86 @@
From f17c21fc97e465b86ed27acceeea331624e66cd6 Mon Sep 17 00:00:00 2001
From: Debarshi Ray <debarshir@gnome.org>
Date: Thu, 22 Apr 2021 01:51:52 +0200
Subject: [PATCH] google: Remove Photos support
In theory, support for photos is still desired. However, right now the
implementation of the Google PicasaWeb API in libgdata no longer works.
Until that's fixed, there's no point in advertising support for photos.
https://gitlab.gnome.org/GNOME/gnome-online-accounts/-/issues/63
https://bugzilla.redhat.com/show_bug.cgi?id=1913641
---
src/goabackend/goagoogleprovider.c | 15 ---------------
1 file changed, 15 deletions(-)
diff --git a/src/goabackend/goagoogleprovider.c b/src/goabackend/goagoogleprovider.c
index 9332c0fdca0b..b3c0f8fdcc66 100644
--- a/src/goabackend/goagoogleprovider.c
+++ b/src/goabackend/goagoogleprovider.c
@@ -69,7 +69,6 @@ get_provider_features (GoaProvider *provider)
GOA_PROVIDER_FEATURE_MAIL |
GOA_PROVIDER_FEATURE_CALENDAR |
GOA_PROVIDER_FEATURE_CONTACTS |
- GOA_PROVIDER_FEATURE_PHOTOS |
GOA_PROVIDER_FEATURE_FILES |
GOA_PROVIDER_FEATURE_PRINTERS;
}
@@ -117,9 +116,6 @@ get_scope (GoaOAuth2Provider *oauth2_provider)
"https://docs.googleusercontent.com/ "
"https://spreadsheets.google.com/feeds/ "
- /* Google PicasaWeb API (GData) */
- "https://picasaweb.google.com/data/ "
-
/* GMail IMAP and SMTP access */
"https://mail.google.com/ "
@@ -281,7 +277,6 @@ build_object (GoaProvider *provider,
gboolean calendar_enabled;
gboolean contacts_enabled;
gboolean files_enabled;
- gboolean photos_enabled;
gboolean printers_enabled;
const gchar *email_address;
@@ -342,10 +337,6 @@ build_object (GoaProvider *provider,
contacts_enabled,
FALSE);
- /* Photos */
- photos_enabled = g_key_file_get_boolean (key_file, group, "PhotosEnabled", NULL);
- goa_object_skeleton_attach_photos (object, photos_enabled);
-
/* Files */
files_enabled = g_key_file_get_boolean (key_file, group, "FilesEnabled", NULL);
uri_drive = g_strconcat ("google-drive://", email_address, "/", NULL);
@@ -361,7 +352,6 @@ build_object (GoaProvider *provider,
goa_account_set_mail_disabled (account, !mail_enabled);
goa_account_set_calendar_disabled (account, !calendar_enabled);
goa_account_set_contacts_disabled (account, !contacts_enabled);
- goa_account_set_photos_disabled (account, !photos_enabled);
goa_account_set_files_disabled (account, !files_enabled);
goa_account_set_printers_disabled (account, !printers_enabled);
@@ -377,10 +367,6 @@ build_object (GoaProvider *provider,
"notify::contacts-disabled",
G_CALLBACK (goa_util_account_notify_property_cb),
(gpointer) "ContactsEnabled");
- g_signal_connect (account,
- "notify::photos-disabled",
- G_CALLBACK (goa_util_account_notify_property_cb),
- (gpointer) "PhotosEnabled");
g_signal_connect (account,
"notify::files-disabled",
G_CALLBACK (goa_util_account_notify_property_cb),
@@ -408,7 +394,6 @@ add_account_key_values (GoaOAuth2Provider *oauth2_provider,
g_variant_builder_add (builder, "{ss}", "MailEnabled", "true");
g_variant_builder_add (builder, "{ss}", "CalendarEnabled", "true");
g_variant_builder_add (builder, "{ss}", "ContactsEnabled", "true");
- g_variant_builder_add (builder, "{ss}", "PhotosEnabled", "true");
g_variant_builder_add (builder, "{ss}", "FilesEnabled", "true");
g_variant_builder_add (builder, "{ss}", "PrintersEnabled", "true");
}
--
2.30.2

View File

@ -1,229 +0,0 @@
diff -up gnome-online-accounts-3.28.2/src/goabackend/goautils.c.mute-debug-prints gnome-online-accounts-3.28.2/src/goabackend/goautils.c
--- gnome-online-accounts-3.28.2/src/goabackend/goautils.c.mute-debug-prints 2019-02-10 20:18:08.000000000 +0100
+++ gnome-online-accounts-3.28.2/src/goabackend/goautils.c 2022-09-02 12:02:45.020910337 +0200
@@ -380,7 +380,7 @@ goa_utils_delete_credentials_for_id_sync
NULL);
if (sec_error != NULL)
{
- g_warning ("secret_password_clear_sync() failed: %s", sec_error->message);
+ g_debug ("secret_password_clear_sync() failed: %s", sec_error->message);
g_set_error_literal (error,
GOA_ERROR,
GOA_ERROR_FAILED, /* TODO: more specific */
@@ -428,7 +428,7 @@ goa_utils_lookup_credentials_sync (GoaPr
NULL);
if (sec_error != NULL)
{
- g_warning ("secret_password_lookup_sync() failed: %s", sec_error->message);
+ g_debug ("secret_password_lookup_sync() failed: %s", sec_error->message);
g_set_error_literal (error,
GOA_ERROR,
GOA_ERROR_FAILED, /* TODO: more specific */
@@ -438,7 +438,7 @@ goa_utils_lookup_credentials_sync (GoaPr
}
else if (password == NULL)
{
- g_warning ("secret_password_lookup_sync() returned NULL");
+ g_debug ("secret_password_lookup_sync() returned NULL");
g_set_error_literal (error,
GOA_ERROR,
GOA_ERROR_FAILED, /* TODO: more specific */
@@ -509,7 +509,7 @@ goa_utils_store_credentials_for_id_sync
"goa-identity", password_key,
NULL))
{
- g_warning ("secret_password_store_sync() failed: %s", sec_error->message);
+ g_debug ("secret_password_store_sync() failed: %s", sec_error->message);
g_set_error_literal (error,
GOA_ERROR,
GOA_ERROR_FAILED, /* TODO: more specific */
@@ -562,11 +562,11 @@ goa_utils_keyfile_copy_group (GKeyFile
keys = g_key_file_get_keys (src_key_file, src_group_name, NULL, &error);
if (error != NULL)
{
- g_warning ("Error getting keys from group %s: %s (%s, %d)",
- src_group_name,
- error->message,
- g_quark_to_string (error->domain),
- error->code);
+ g_debug ("Error getting keys from group %s: %s (%s, %d)",
+ src_group_name,
+ error->message,
+ g_quark_to_string (error->domain),
+ error->code);
g_error_free (error);
goto out;
}
@@ -580,12 +580,12 @@ goa_utils_keyfile_copy_group (GKeyFile
src_value = g_key_file_get_value (src_key_file, src_group_name, keys[i], &error);
if (error != NULL)
{
- g_warning ("Error reading key %s from group %s: %s (%s, %d)",
- keys[i],
- src_group_name,
- error->message,
- g_quark_to_string (error->domain),
- error->code);
+ g_debug ("Error reading key %s from group %s: %s (%s, %d)",
+ keys[i],
+ src_group_name,
+ error->message,
+ g_quark_to_string (error->domain),
+ error->code);
g_error_free (error);
continue;
}
@@ -597,12 +597,12 @@ goa_utils_keyfile_copy_group (GKeyFile
if (!g_error_matches (error, G_KEY_FILE_ERROR, G_KEY_FILE_ERROR_GROUP_NOT_FOUND)
&& !g_error_matches (error, G_KEY_FILE_ERROR, G_KEY_FILE_ERROR_KEY_NOT_FOUND))
{
- g_warning ("Error reading key %s from group %s: %s (%s, %d)",
- keys[i],
- src_group_name,
- error->message,
- g_quark_to_string (error->domain),
- error->code);
+ g_debug ("Error reading key %s from group %s: %s (%s, %d)",
+ keys[i],
+ src_group_name,
+ error->message,
+ g_quark_to_string (error->domain),
+ error->code);
}
g_error_free (error);
@@ -635,12 +635,12 @@ goa_utils_keyfile_get_boolean (GKeyFile
{
if (!g_error_matches (error, G_KEY_FILE_ERROR, G_KEY_FILE_ERROR_KEY_NOT_FOUND))
{
- g_warning ("Error reading key %s from group %s in keyfile: %s (%s, %d)",
- key,
- group_name,
- error->message,
- g_quark_to_string (error->domain),
- error->code);
+ g_debug ("Error reading key %s from group %s in keyfile: %s (%s, %d)",
+ key,
+ group_name,
+ error->message,
+ g_quark_to_string (error->domain),
+ error->code);
}
g_error_free (error);
@@ -667,11 +667,11 @@ goa_utils_keyfile_remove_key (GoaAccount
G_KEY_FILE_KEEP_COMMENTS | G_KEY_FILE_KEEP_TRANSLATIONS,
&error))
{
- g_warning ("Error loading keyfile %s: %s (%s, %d)",
- path,
- error->message,
- g_quark_to_string (error->domain),
- error->code);
+ g_debug ("Error loading keyfile %s: %s (%s, %d)",
+ path,
+ error->message,
+ g_quark_to_string (error->domain),
+ error->code);
g_error_free (error);
goto out;
}
@@ -683,7 +683,7 @@ goa_utils_keyfile_remove_key (GoaAccount
if (!g_key_file_save_to_file (key_file, path, &error))
{
g_prefix_error (&error, "Error writing key-value-file %s: ", path);
- g_warning ("%s (%s, %d)", error->message, g_quark_to_string (error->domain), error->code);
+ g_debug ("%s (%s, %d)", error->message, g_quark_to_string (error->domain), error->code);
g_error_free (error);
goto out;
}
@@ -714,11 +714,11 @@ goa_utils_keyfile_set_boolean (GoaAccoun
G_KEY_FILE_KEEP_COMMENTS | G_KEY_FILE_KEEP_TRANSLATIONS,
&error))
{
- g_warning ("Error loading keyfile %s: %s (%s, %d)",
- path,
- error->message,
- g_quark_to_string (error->domain),
- error->code);
+ g_debug ("Error loading keyfile %s: %s (%s, %d)",
+ path,
+ error->message,
+ g_quark_to_string (error->domain),
+ error->code);
g_error_free (error);
goto out;
}
@@ -727,12 +727,12 @@ goa_utils_keyfile_set_boolean (GoaAccoun
old_value = g_key_file_get_boolean (key_file, group, key, &error);
if (error != NULL)
{
- g_warning ("Error reading key %s from keyfile %s: %s (%s, %d)",
- key,
- path,
- error->message,
- g_quark_to_string (error->domain),
- error->code);
+ g_debug ("Error reading key %s from keyfile %s: %s (%s, %d)",
+ key,
+ path,
+ error->message,
+ g_quark_to_string (error->domain),
+ error->code);
needs_update = TRUE;
g_error_free (error);
}
@@ -750,7 +750,7 @@ goa_utils_keyfile_set_boolean (GoaAccoun
if (!g_key_file_save_to_file (key_file, path, &error))
{
g_prefix_error (&error, "Error writing key-value-file %s: ", path);
- g_warning ("%s (%s, %d)", error->message, g_quark_to_string (error->domain), error->code);
+ g_debug ("%s (%s, %d)", error->message, g_quark_to_string (error->domain), error->code);
g_error_free (error);
goto out;
}
@@ -781,11 +781,11 @@ goa_utils_keyfile_set_string (GoaAccount
G_KEY_FILE_KEEP_COMMENTS | G_KEY_FILE_KEEP_TRANSLATIONS,
&error))
{
- g_warning ("Error loading keyfile %s: %s (%s, %d)",
- path,
- error->message,
- g_quark_to_string (error->domain),
- error->code);
+ g_debug ("Error loading keyfile %s: %s (%s, %d)",
+ path,
+ error->message,
+ g_quark_to_string (error->domain),
+ error->code);
g_error_free (error);
goto out;
}
@@ -794,12 +794,12 @@ goa_utils_keyfile_set_string (GoaAccount
old_value = g_key_file_get_string (key_file, group, key, &error);
if (error != NULL)
{
- g_warning ("Error reading key %s from keyfile %s: %s (%s, %d)",
- key,
- path,
- error->message,
- g_quark_to_string (error->domain),
- error->code);
+ g_debug ("Error reading key %s from keyfile %s: %s (%s, %d)",
+ key,
+ path,
+ error->message,
+ g_quark_to_string (error->domain),
+ error->code);
needs_update = TRUE;
g_error_free (error);
}
@@ -817,7 +817,7 @@ goa_utils_keyfile_set_string (GoaAccount
if (!g_key_file_save_to_file (key_file, path, &error))
{
g_prefix_error (&error, "Error writing key-value-file %s: ", path);
- g_warning ("%s (%s, %d)", error->message, g_quark_to_string (error->domain), error->code);
+ g_debug ("%s (%s, %d)", error->message, g_quark_to_string (error->domain), error->code);
g_error_free (error);
goto out;
}

View File

@ -1,20 +1,24 @@
diff --git a/configure.ac b/configure.ac diff --git a/configure.ac b/configure.ac
index ddf98f1..f997d36 100644 index 332a0bf..70962d6 100644
--- a/configure.ac --- a/configure.ac
+++ b/configure.ac +++ b/configure.ac
@@ -124,10 +124,6 @@ if test "$enable_backend" != "no"; then @@ -113,14 +113,6 @@ if test "$enable_backend" != "no"; then
AC_SUBST(GTK_CFLAGS) AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS) AC_SUBST(GTK_LIBS)
- PKG_CHECK_MODULES(WEBKIT_GTK, [webkit2gtk-4.0 >= 2.12.0]) - PKG_CHECK_MODULES(JAVASCRIPT_CORE_GTK, [javascriptcoregtk-4.0 >= 2.12.0])
- AC_SUBST(JAVASCRIPT_CORE_GTK_CFLAGS)
- AC_SUBST(JAVASCRIPT_CORE_GTK_LIBS)
-
- PKG_CHECK_MODULES(WEBKIT_GTK, [webkit2gtk-4.0 >= 2.26.0])
- AC_SUBST(WEBKIT_GTK_CFLAGS) - AC_SUBST(WEBKIT_GTK_CFLAGS)
- AC_SUBST(WEBKIT_GTK_LIBS) - AC_SUBST(WEBKIT_GTK_LIBS)
- -
PKG_CHECK_MODULES(LIBSOUP, [libsoup-2.4 >= 2.42]) PKG_CHECK_MODULES(LIBSOUP, [libsoup-2.4 >= 2.42])
AC_SUBST(LIBSOUP_CFLAGS) AC_SUBST(LIBSOUP_CFLAGS)
AC_SUBST(LIBSOUP_LIBS) AC_SUBST(LIBSOUP_LIBS)
@@ -176,14 +172,6 @@ if test "$enable_backend" != "no"; then @@ -142,14 +134,6 @@ if test "$enable_backend" != "no"; then
fi AC_SUBST(LIBXML_LIBS)
fi fi
-AC_ARG_ENABLE([inspector], -AC_ARG_ENABLE([inspector],
@ -28,7 +32,7 @@ index ddf98f1..f997d36 100644
AC_ARG_WITH(template-file, AC_ARG_WITH(template-file,
[AS_HELP_STRING([--with-template-file], [Path to the template file])], [AS_HELP_STRING([--with-template-file], [Path to the template file])],
[], [],
@@ -271,7 +259,11 @@ AC_DEFINE_UNQUOTED(GOA_GOOGLE_CLIENT_ID, ["$with_google_client_id"], [Google OAu @@ -275,7 +259,11 @@ AC_DEFINE_UNQUOTED(GOA_GOOGLE_CLIENT_ID, ["$with_google_client_id"], [Google OAu
AC_DEFINE_UNQUOTED(GOA_GOOGLE_CLIENT_SECRET, ["$with_google_client_secret"], [Google OAuth 2.0 client secret]) AC_DEFINE_UNQUOTED(GOA_GOOGLE_CLIENT_SECRET, ["$with_google_client_secret"], [Google OAuth 2.0 client secret])
if test "$enable_google" != "no"; then if test "$enable_google" != "no"; then
AC_DEFINE(GOA_GOOGLE_ENABLED, 1, [Enable Google data provider]) AC_DEFINE(GOA_GOOGLE_ENABLED, 1, [Enable Google data provider])
@ -41,13 +45,16 @@ index ddf98f1..f997d36 100644
# IMAP/SMTP # IMAP/SMTP
AC_DEFINE(GOA_IMAP_SMTP_NAME, ["imap_smtp"], [ProviderType and extension point name]) AC_DEFINE(GOA_IMAP_SMTP_NAME, ["imap_smtp"], [ProviderType and extension point name])
diff --git a/data/Makefile.am b/data/Makefile.am diff --git a/data/Makefile.am b/data/Makefile.am
index 286dcd0..61b69e1 100644 index e3608a1..c3f1009 100644
--- a/data/Makefile.am --- a/data/Makefile.am
+++ b/data/Makefile.am +++ b/data/Makefile.am
@@ -20,16 +20,30 @@ service_DATA = $(service_in_files:.service.in=.service) @@ -19,17 +19,33 @@ endif
service_DATA = $(service_in_files:.service.in=.service)
%.service: %.service.in Makefile
@sed -e "s|\@libexecdir\@|$(libexecdir)|" $< > $@ @sed -e "s|\@libexecdir\@|$(libexecdir)|" $< > $@
endif +
+endif
+
+desktopdir = $(datadir)/applications +desktopdir = $(datadir)/applications
+desktop_in_files = org.gnome.OnlineAccounts.OAuth2.desktop.in +desktop_in_files = org.gnome.OnlineAccounts.OAuth2.desktop.in
+desktop_DATA = $(desktop_in_files:.desktop.in=.desktop) +desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
@ -55,13 +62,14 @@ index 286dcd0..61b69e1 100644
+ oauth2_schemes=x-scheme-handler/com.googleusercontent.apps.44438659992-7kgjeitenc16ssihbtdjbgguch7ju55s; + oauth2_schemes=x-scheme-handler/com.googleusercontent.apps.44438659992-7kgjeitenc16ssihbtdjbgguch7ju55s;
+else +else
+ oauth2_schemes= + oauth2_schemes=
+endif endif
+
+%.desktop: %.desktop.in Makefile +%.desktop: %.desktop.in Makefile
+ @sed -e "s|\@libexecdir\@|$(libexecdir)|" -e "s|\@oauth2_schemes\@|$(oauth2_schemes)|" $< > $@ + @sed -e "s|\@libexecdir\@|$(libexecdir)|" -e "s|\@oauth2_schemes\@|$(oauth2_schemes)|" $< > $@
+
+ +
EXTRA_DIST = \ EXTRA_DIST = \
$(gsettings_SCHEMAS) \ $(gsettings_schema_files) \
dbus-interfaces.xml \ dbus-interfaces.xml \
org.gnome.Identity.service.in \ org.gnome.Identity.service.in \
org.gnome.OnlineAccounts.service.in \ org.gnome.OnlineAccounts.service.in \
@ -70,11 +78,10 @@ index 286dcd0..61b69e1 100644
CLEANFILES = \ CLEANFILES = \
org.gnome.OnlineAccounts.service \ org.gnome.OnlineAccounts.service \
org.gnome.Identity.service \
+ org.gnome.OnlineAccounts.OAuth2.desktop \ + org.gnome.OnlineAccounts.OAuth2.desktop \
org.gnome.Identity.service \
$(NULL) $(NULL)
clean-local :
diff --git a/data/org.gnome.OnlineAccounts.OAuth2.desktop.in b/data/org.gnome.OnlineAccounts.OAuth2.desktop.in diff --git a/data/org.gnome.OnlineAccounts.OAuth2.desktop.in b/data/org.gnome.OnlineAccounts.OAuth2.desktop.in
new file mode 100644 new file mode 100644
index 0000000..d0478aa index 0000000..d0478aa
@ -100,10 +107,10 @@ index 0abb53a..a9d45e1 100644
</chapter> </chapter>
</part> </part>
diff --git a/doc/goa-sections.txt b/doc/goa-sections.txt diff --git a/doc/goa-sections.txt b/doc/goa-sections.txt
index 306846e..a27d942 100644 index 6f96d69..31a07b5 100644
--- a/doc/goa-sections.txt --- a/doc/goa-sections.txt
+++ b/doc/goa-sections.txt +++ b/doc/goa-sections.txt
@@ -498,36 +498,6 @@ GoaOAuth2ProviderPrivate @@ -502,36 +502,6 @@ GoaOAuth2ProviderPrivate
goa_oauth2_provider_get_type goa_oauth2_provider_get_type
</SECTION> </SECTION>
@ -151,19 +158,19 @@ index 56ba3c4..d8d7325 100644
-goa_oauth_provider_get_type -goa_oauth_provider_get_type
goa_oauth2_provider_get_type goa_oauth2_provider_get_type
diff --git a/po/POTFILES.in b/po/POTFILES.in diff --git a/po/POTFILES.in b/po/POTFILES.in
index b65650c..8ee89ae 100644 index 279fb64..e131629 100644
--- a/po/POTFILES.in --- a/po/POTFILES.in
+++ b/po/POTFILES.in +++ b/po/POTFILES.in
@@ -22,7 +22,6 @@ src/goabackend/goasmtpauth.c @@ -20,7 +20,6 @@ src/goabackend/goaowncloudprovider.c
src/goabackend/goatelepathyprovider.c src/goabackend/goaprovider.c
src/goabackend/goatodoistprovider.c src/goabackend/goasmtpauth.c
src/goabackend/goautils.c src/goabackend/goautils.c
-src/goabackend/goawebview.c -src/goabackend/goawebview.c
src/goabackend/goawindowsliveprovider.c src/goabackend/goawindowsliveprovider.c
src/goaidentity/goaidentityservice.c src/goaidentity/goaidentityservice.c
src/goaidentity/goakerberosidentity.c src/goaidentity/goakerberosidentity.c
diff --git a/src/goabackend/Makefile.am b/src/goabackend/Makefile.am diff --git a/src/goabackend/Makefile.am b/src/goabackend/Makefile.am
index c254594..7f15518 100644 index 8385237..c7e00a4 100644
--- a/src/goabackend/Makefile.am --- a/src/goabackend/Makefile.am
+++ b/src/goabackend/Makefile.am +++ b/src/goabackend/Makefile.am
@@ -19,7 +19,6 @@ AM_CPPFLAGS = \ @@ -19,7 +19,6 @@ AM_CPPFLAGS = \
@ -171,10 +178,10 @@ index c254594..7f15518 100644
-DPACKAGE_LOCALE_DIR=\""$(localedir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(localedir)"\" \
-DPACKAGE_LIB_DIR=\""$(libdir)"\" \ -DPACKAGE_LIB_DIR=\""$(libdir)"\" \
- -DPACKAGE_WEB_EXTENSIONS_DIR=\""$(libdir)/goa-1.0/web-extensions"\" \ - -DPACKAGE_WEB_EXTENSIONS_DIR=\""$(libdir)/goa-1.0/web-extensions"\" \
-D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT \
$(WARN_CFLAGS) \ $(WARN_CFLAGS) \
$(NULL) $(NULL)
@@ -81,17 +80,13 @@ libgoa_backend_1_0_la_SOURCES = \
@@ -79,23 +78,18 @@ libgoa_backend_1_0_la_SOURCES = \
goasouplogger.h goasouplogger.c \ goasouplogger.h goasouplogger.c \
goamailclient.h goamailclient.c \ goamailclient.h goamailclient.c \
goaexchangeprovider.h goaexchangeprovider.c \ goaexchangeprovider.h goaexchangeprovider.c \
@ -191,32 +198,32 @@ index c254594..7f15518 100644
- goaflickrprovider.h goaflickrprovider.c \ - goaflickrprovider.h goaflickrprovider.c \
goafoursquareprovider.h goafoursquareprovider.c \ goafoursquareprovider.h goafoursquareprovider.c \
goawindowsliveprovider.h goawindowsliveprovider.c \ goawindowsliveprovider.h goawindowsliveprovider.c \
goapocketprovider.h goapocketprovider.c \ goalastfmprovider.h goalastfmprovider.c \
@@ -99,7 +94,6 @@ libgoa_backend_1_0_la_SOURCES = \
goatodoistprovider.h goatodoistprovider.c \
goaobjectskeletonutils.h goaobjectskeletonutils.c \ goaobjectskeletonutils.h goaobjectskeletonutils.c \
goautils.h goautils.c \ goautils.h goautils.c \
- goawebview.h goawebview.c \ - goawebview.h goawebview.c \
nautilus-floating-bar.h nautilus-floating-bar.c \ nautilus-floating-bar.h nautilus-floating-bar.c \
$(top_builddir)/src/goaidentity/org.gnome.Identity.c \ $(top_builddir)/src/goaidentity/org.gnome.Identity.c \
$(top_srcdir)/src/goaidentity/goaidentitymanagererror.c \ $(top_srcdir)/src/goaidentity/goaidentitymanagererror.c \
@@ -119,7 +113,6 @@ libgoa_backend_1_0_la_SOURCES += \ @@ -112,8 +106,6 @@ libgoa_backend_1_0_la_SOURCES += \
endif endif
libgoa_backend_1_0_la_CFLAGS = \ libgoa_backend_1_0_la_CFLAGS = \
- $(JAVASCRIPT_CORE_GTK_CFLAGS) \
- $(WEBKIT_GTK_CFLAGS) \ - $(WEBKIT_GTK_CFLAGS) \
$(JSON_GLIB_CFLAGS) \ $(JSON_GLIB_CFLAGS) \
$(GCR_CFLAGS) \ $(GCR_CFLAGS) \
$(GLIB_CFLAGS) \ $(GLIB_CFLAGS) \
@@ -134,7 +127,6 @@ libgoa_backend_1_0_la_CFLAGS = \ @@ -128,8 +120,6 @@ libgoa_backend_1_0_la_CFLAGS = \
libgoa_backend_1_0_la_LIBADD = \ libgoa_backend_1_0_la_LIBADD = \
$(top_builddir)/src/goa/libgoa-1.0.la \ $(top_builddir)/src/goa/libgoa-1.0.la \
- $(JAVASCRIPT_CORE_GTK_LIBS) \
- $(WEBKIT_GTK_LIBS) \ - $(WEBKIT_GTK_LIBS) \
$(JSON_GLIB_LIBS) \ $(JSON_GLIB_LIBS) \
$(GCR_LIBS) \ $(GCR_LIBS) \
$(GLIB_LIBS) \ $(GLIB_LIBS) \
@@ -154,39 +146,29 @@ libgoa_backend_1_0_la_LDFLAGS = \ @@ -149,39 +139,29 @@ libgoa_backend_1_0_la_LDFLAGS = \
# ---------------------------------------------------------------------------------------------------- # ----------------------------------------------------------------------------------------------------
@ -770,7 +777,7 @@ index c1e4146..def21cb 100644
oauth2_class->add_account_key_values = add_account_key_values; oauth2_class->add_account_key_values = add_account_key_values;
} }
diff --git a/src/goabackend/goagoogleprovider.c b/src/goabackend/goagoogleprovider.c diff --git a/src/goabackend/goagoogleprovider.c b/src/goabackend/goagoogleprovider.c
index 6e4ace2..6f951e5 100644 index b3c0f8f..0fb40c3 100644
--- a/src/goabackend/goagoogleprovider.c --- a/src/goabackend/goagoogleprovider.c
+++ b/src/goabackend/goagoogleprovider.c +++ b/src/goabackend/goagoogleprovider.c
@@ -32,6 +32,7 @@ @@ -32,6 +32,7 @@
@ -781,7 +788,7 @@ index 6e4ace2..6f951e5 100644
}; };
G_DEFINE_TYPE_WITH_CODE (GoaGoogleProvider, goa_google_provider, GOA_TYPE_OAUTH2_PROVIDER, G_DEFINE_TYPE_WITH_CODE (GoaGoogleProvider, goa_google_provider, GOA_TYPE_OAUTH2_PROVIDER,
@@ -81,19 +82,50 @@ get_provider_features (GoaProvider *provider) @@ -76,19 +77,50 @@ get_provider_features (GoaProvider *provider)
static const gchar * static const gchar *
get_authorization_uri (GoaOAuth2Provider *oauth2_provider) get_authorization_uri (GoaOAuth2Provider *oauth2_provider)
{ {
@ -835,7 +842,7 @@ index 6e4ace2..6f951e5 100644
} }
static const gchar * static const gchar *
@@ -241,37 +273,6 @@ get_identity_sync (GoaOAuth2Provider *oauth2_provider, @@ -228,37 +260,6 @@ get_identity_sync (GoaOAuth2Provider *oauth2_provider,
/* ---------------------------------------------------------------------------------------------------- */ /* ---------------------------------------------------------------------------------------------------- */
@ -873,7 +880,7 @@ index 6e4ace2..6f951e5 100644
static gboolean static gboolean
build_object (GoaProvider *provider, build_object (GoaProvider *provider,
GoaObjectSkeleton *object, GoaObjectSkeleton *object,
@@ -446,6 +447,16 @@ add_account_key_values (GoaOAuth2Provider *oauth2_provider, @@ -400,6 +401,16 @@ add_account_key_values (GoaOAuth2Provider *oauth2_provider,
/* ---------------------------------------------------------------------------------------------------- */ /* ---------------------------------------------------------------------------------------------------- */
@ -890,7 +897,7 @@ index 6e4ace2..6f951e5 100644
static void static void
goa_google_provider_init (GoaGoogleProvider *self) goa_google_provider_init (GoaGoogleProvider *self)
{ {
@@ -456,6 +467,10 @@ goa_google_provider_class_init (GoaGoogleProviderClass *klass) @@ -410,6 +421,10 @@ goa_google_provider_class_init (GoaGoogleProviderClass *klass)
{ {
GoaProviderClass *provider_class; GoaProviderClass *provider_class;
GoaOAuth2ProviderClass *oauth2_class; GoaOAuth2ProviderClass *oauth2_class;
@ -901,7 +908,7 @@ index 6e4ace2..6f951e5 100644
provider_class = GOA_PROVIDER_CLASS (klass); provider_class = GOA_PROVIDER_CLASS (klass);
provider_class->get_provider_type = get_provider_type; provider_class->get_provider_type = get_provider_type;
@@ -472,7 +487,6 @@ goa_google_provider_class_init (GoaGoogleProviderClass *klass) @@ -426,7 +441,6 @@ goa_google_provider_class_init (GoaGoogleProviderClass *klass)
oauth2_class->get_identity_sync = get_identity_sync; oauth2_class->get_identity_sync = get_identity_sync;
oauth2_class->get_redirect_uri = get_redirect_uri; oauth2_class->get_redirect_uri = get_redirect_uri;
oauth2_class->get_scope = get_scope; oauth2_class->get_scope = get_scope;
@ -1222,7 +1229,7 @@ index f2dae5e..0000000
- -
-#endif /* __GOA_OAUTH2_PROVIDER_WEB_VIEW_H__ */ -#endif /* __GOA_OAUTH2_PROVIDER_WEB_VIEW_H__ */
diff --git a/src/goabackend/goaoauth2provider.c b/src/goabackend/goaoauth2provider.c diff --git a/src/goabackend/goaoauth2provider.c b/src/goabackend/goaoauth2provider.c
index 9092605..1ceacb5 100644 index 3715431..e7d5d2e 100644
--- a/src/goabackend/goaoauth2provider.c --- a/src/goabackend/goaoauth2provider.c
+++ b/src/goabackend/goaoauth2provider.c +++ b/src/goabackend/goaoauth2provider.c
@@ -22,16 +22,13 @@ @@ -22,16 +22,13 @@
@ -1520,7 +1527,7 @@ index 9092605..1ceacb5 100644
if (fragment != NULL) if (fragment != NULL)
{ {
/* fragment is encoded into a key/value pairs for the token and /* fragment is encoded into a key/value pairs for the token and
@@ -846,57 +692,175 @@ on_web_view_decide_policy (WebKitWebView *web_view, @@ -846,57 +692,173 @@ on_web_view_decide_policy (WebKitWebView *web_view,
priv->access_token_expires_in = atoi (expires_in_str); priv->access_token_expires_in = atoi (expires_in_str);
priv->refresh_token = g_strdup (g_hash_table_lookup (key_value_pairs, "refresh_token")); priv->refresh_token = g_strdup (g_hash_table_lookup (key_value_pairs, "refresh_token"));
@ -1654,8 +1661,8 @@ index 9092605..1ceacb5 100644
+ GoaOAuth2Provider *self) + GoaOAuth2Provider *self)
+{ +{
+ GoaOAuth2ProviderPrivate *priv = goa_oauth2_provider_get_instance_private (self); + GoaOAuth2ProviderPrivate *priv = goa_oauth2_provider_get_instance_private (self);
+ SecretService *service = NULL; + g_autoptr (SecretService) service = NULL;
+ GList *collections = NULL; + g_autolist (SecretCollection) collections = NULL;
+ +
+ service = secret_service_get_finish (result, &priv->error); + service = secret_service_get_finish (result, &priv->error);
+ if (service == NULL) + if (service == NULL)
@ -1701,8 +1708,6 @@ index 9092605..1ceacb5 100644
+ } + }
+ +
+out: +out:
+ g_clear_object (&service);
+ g_list_free_full (collections, g_object_unref);
+ g_main_loop_quit (priv->loop); + g_main_loop_quit (priv->loop);
+} +}
+ +
@ -1719,7 +1724,7 @@ index 9092605..1ceacb5 100644
} }
static gboolean static gboolean
@@ -906,12 +870,13 @@ get_tokens_and_identity (GoaOAuth2Provider *self, @@ -906,12 +868,13 @@ get_tokens_and_identity (GoaOAuth2Provider *self,
GtkDialog *dialog, GtkDialog *dialog,
GtkBox *vbox) GtkBox *vbox)
{ {
@ -1737,7 +1742,7 @@ index 9092605..1ceacb5 100644
const gchar *scope; const gchar *scope;
gchar *escaped_redirect_uri = NULL; gchar *escaped_redirect_uri = NULL;
gchar *escaped_client_id = NULL; gchar *escaped_client_id = NULL;
@@ -923,7 +888,6 @@ get_tokens_and_identity (GoaOAuth2Provider *self, @@ -923,7 +886,6 @@ get_tokens_and_identity (GoaOAuth2Provider *self,
g_return_val_if_fail (GTK_IS_DIALOG (dialog), FALSE); g_return_val_if_fail (GTK_IS_DIALOG (dialog), FALSE);
g_return_val_if_fail (GTK_IS_BOX (vbox), FALSE); g_return_val_if_fail (GTK_IS_BOX (vbox), FALSE);
@ -1745,7 +1750,7 @@ index 9092605..1ceacb5 100644
g_return_val_if_fail (priv->error == NULL, FALSE); g_return_val_if_fail (priv->error == NULL, FALSE);
/* TODO: check with NM whether we're online, if not - return error */ /* TODO: check with NM whether we're online, if not - return error */
@@ -937,6 +901,8 @@ get_tokens_and_identity (GoaOAuth2Provider *self, @@ -937,6 +899,8 @@ get_tokens_and_identity (GoaOAuth2Provider *self,
g_clear_pointer (&priv->authorization_code, g_free); g_clear_pointer (&priv->authorization_code, g_free);
g_clear_pointer (&priv->access_token, g_free); g_clear_pointer (&priv->access_token, g_free);
g_clear_pointer (&priv->refresh_token, g_free); g_clear_pointer (&priv->refresh_token, g_free);
@ -1754,7 +1759,7 @@ index 9092605..1ceacb5 100644
/* TODO: use oauth2_proxy_build_login_url_full() */ /* TODO: use oauth2_proxy_build_login_url_full() */
escaped_redirect_uri = g_uri_escape_string (goa_oauth2_provider_get_redirect_uri (self), NULL, TRUE); escaped_redirect_uri = g_uri_escape_string (goa_oauth2_provider_get_redirect_uri (self), NULL, TRUE);
@@ -946,40 +912,71 @@ get_tokens_and_identity (GoaOAuth2Provider *self, @@ -946,40 +910,71 @@ get_tokens_and_identity (GoaOAuth2Provider *self,
escaped_scope = g_uri_escape_string (goa_oauth2_provider_get_scope (self), NULL, TRUE); escaped_scope = g_uri_escape_string (goa_oauth2_provider_get_scope (self), NULL, TRUE);
else else
escaped_scope = NULL; escaped_scope = NULL;
@ -1852,7 +1857,7 @@ index 9092605..1ceacb5 100644
/* We can have either the auth code, with which we'll obtain the token, or /* We can have either the auth code, with which we'll obtain the token, or
* the token directly if we are using a client side flow, since we don't * the token directly if we are using a client side flow, since we don't
@@ -1038,12 +1035,14 @@ get_tokens_and_identity (GoaOAuth2Provider *self, @@ -1038,12 +1033,14 @@ get_tokens_and_identity (GoaOAuth2Provider *self,
} }
ret = TRUE; ret = TRUE;
@ -1868,7 +1873,7 @@ index 9092605..1ceacb5 100644
return ret; return ret;
} }
@@ -1131,6 +1130,7 @@ goa_oauth2_provider_add_account (GoaProvider *provider, @@ -1107,6 +1104,7 @@ goa_oauth2_provider_add_account (GoaProvider *provider,
g_return_val_if_fail (error == NULL || *error == NULL, NULL); g_return_val_if_fail (error == NULL || *error == NULL, NULL);
priv = goa_oauth2_provider_get_instance_private (self); priv = goa_oauth2_provider_get_instance_private (self);
@ -1876,7 +1881,7 @@ index 9092605..1ceacb5 100644
if (!get_tokens_and_identity (self, TRUE, NULL, dialog, vbox)) if (!get_tokens_and_identity (self, TRUE, NULL, dialog, vbox))
goto out; goto out;
@@ -1165,7 +1165,6 @@ goa_oauth2_provider_add_account (GoaProvider *provider, @@ -1141,7 +1139,6 @@ goa_oauth2_provider_add_account (GoaProvider *provider,
NULL, /* GCancellable* */ NULL, /* GCancellable* */
(GAsyncReadyCallback) add_account_cb, (GAsyncReadyCallback) add_account_cb,
self); self);
@ -1884,7 +1889,7 @@ index 9092605..1ceacb5 100644
g_main_loop_run (priv->loop); g_main_loop_run (priv->loop);
if (priv->error != NULL) if (priv->error != NULL)
goto out; goto out;
@@ -1215,6 +1214,7 @@ goa_oauth2_provider_refresh_account (GoaProvider *provider, @@ -1191,6 +1188,7 @@ goa_oauth2_provider_refresh_account (GoaProvider *provider,
g_return_val_if_fail (error == NULL || *error == NULL, FALSE); g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
priv = goa_oauth2_provider_get_instance_private (self); priv = goa_oauth2_provider_get_instance_private (self);
@ -1892,7 +1897,7 @@ index 9092605..1ceacb5 100644
dialog = gtk_dialog_new_with_buttons (NULL, dialog = gtk_dialog_new_with_buttons (NULL,
parent, parent,
@@ -1625,6 +1625,8 @@ goa_oauth2_provider_finalize (GObject *object) @@ -1601,6 +1599,8 @@ goa_oauth2_provider_finalize (GObject *object)
g_free (priv->authorization_code); g_free (priv->authorization_code);
g_free (priv->access_token); g_free (priv->access_token);
g_free (priv->refresh_token); g_free (priv->refresh_token);
@ -1901,7 +1906,7 @@ index 9092605..1ceacb5 100644
G_OBJECT_CLASS (goa_oauth2_provider_parent_class)->finalize (object); G_OBJECT_CLASS (goa_oauth2_provider_parent_class)->finalize (object);
} }
@@ -1650,12 +1652,9 @@ goa_oauth2_provider_class_init (GoaOAuth2ProviderClass *klass) @@ -1626,12 +1626,9 @@ goa_oauth2_provider_class_init (GoaOAuth2ProviderClass *klass)
provider_class->ensure_credentials_sync = goa_oauth2_provider_ensure_credentials_sync; provider_class->ensure_credentials_sync = goa_oauth2_provider_ensure_credentials_sync;
klass->build_authorization_uri = goa_oauth2_provider_build_authorization_uri_default; klass->build_authorization_uri = goa_oauth2_provider_build_authorization_uri_default;
@ -1916,10 +1921,10 @@ index 9092605..1ceacb5 100644
diff --git a/src/goabackend/goaoauthprovider.c b/src/goabackend/goaoauthprovider.c diff --git a/src/goabackend/goaoauthprovider.c b/src/goabackend/goaoauthprovider.c
deleted file mode 100644 deleted file mode 100644
index 71bcad6..0000000 index 0bfab6b..0000000
--- a/src/goabackend/goaoauthprovider.c --- a/src/goabackend/goaoauthprovider.c
+++ /dev/null +++ /dev/null
@@ -1,1662 +0,0 @@ @@ -1,1638 +0,0 @@
-/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ -/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
-/* -/*
- * Copyright © 2011 2017 Red Hat, Inc. - * Copyright © 2011 2017 Red Hat, Inc.
@ -2863,7 +2868,7 @@ index 71bcad6..0000000
- g_free (url); - g_free (url);
- -
- g_free (data.oauth_verifier); - g_free (data.oauth_verifier);
- g_clear_pointer (&data.loop, (GDestroyNotify) g_main_loop_unref); - g_clear_pointer (&data.loop, g_main_loop_unref);
- g_free (data.access_token); - g_free (data.access_token);
- g_free (data.access_token_secret); - g_free (data.access_token_secret);
- g_free (escaped_request_token); - g_free (escaped_request_token);
@ -2899,30 +2904,6 @@ index 71bcad6..0000000
- g_main_loop_quit (data->loop); - g_main_loop_quit (data->loop);
-} -}
- -
-static gint64
-duration_to_abs_usec (gint duration_sec)
-{
- gint64 ret;
- GTimeVal now;
-
- g_get_current_time (&now);
- ret = ((gint64) now.tv_sec) * 1000L * 1000L + ((gint64) now.tv_usec);
- ret += ((gint64) duration_sec) * 1000L * 1000L;
- return ret;
-}
-
-static gint
-abs_usec_to_duration (gint64 abs_usec)
-{
- gint64 ret;
- GTimeVal now;
-
- g_get_current_time (&now);
- ret = abs_usec - (((gint64) now.tv_sec) * 1000L * 1000L + ((gint64) now.tv_usec));
- ret /= 1000L * 1000L;
- return ret;
-}
-
-static GoaObject * -static GoaObject *
-goa_oauth_provider_add_account (GoaProvider *_provider, -goa_oauth_provider_add_account (GoaProvider *_provider,
- GoaClient *client, - GoaClient *client,
@ -2985,12 +2966,12 @@ index 71bcad6..0000000
- g_variant_builder_add (&credentials, "{sv}", "access_token_secret", g_variant_new_string (access_token_secret)); - g_variant_builder_add (&credentials, "{sv}", "access_token_secret", g_variant_new_string (access_token_secret));
- if (access_token_expires_in > 0) - if (access_token_expires_in > 0)
- g_variant_builder_add (&credentials, "{sv}", "access_token_expires_at", - g_variant_builder_add (&credentials, "{sv}", "access_token_expires_at",
- g_variant_new_int64 (duration_to_abs_usec (access_token_expires_in))); - g_variant_new_int64 (goa_utils_convert_duration_sec_to_abs_usec (access_token_expires_in)));
- if (session_handle != NULL) - if (session_handle != NULL)
- g_variant_builder_add (&credentials, "{sv}", "session_handle", g_variant_new_string (session_handle)); - g_variant_builder_add (&credentials, "{sv}", "session_handle", g_variant_new_string (session_handle));
- if (session_handle_expires_in > 0) - if (session_handle_expires_in > 0)
- g_variant_builder_add (&credentials, "{sv}", "session_handle_expires_at", - g_variant_builder_add (&credentials, "{sv}", "session_handle_expires_at",
- g_variant_new_int64 (duration_to_abs_usec (session_handle_expires_in))); - g_variant_new_int64 (goa_utils_convert_duration_sec_to_abs_usec (session_handle_expires_in)));
- if (password != NULL) - if (password != NULL)
- g_variant_builder_add (&credentials, "{sv}", "password", g_variant_new_string (password)); - g_variant_builder_add (&credentials, "{sv}", "password", g_variant_new_string (password));
- -
@ -3033,7 +3014,7 @@ index 71bcad6..0000000
- g_free (access_token_secret); - g_free (access_token_secret);
- g_free (session_handle); - g_free (session_handle);
- g_free (data.account_object_path); - g_free (data.account_object_path);
- g_clear_pointer (&data.loop, (GDestroyNotify) g_main_loop_unref); - g_clear_pointer (&data.loop, g_main_loop_unref);
- return ret; - return ret;
-} -}
- -
@ -3122,12 +3103,12 @@ index 71bcad6..0000000
- g_variant_builder_add (&builder, "{sv}", "access_token_secret", g_variant_new_string (access_token_secret)); - g_variant_builder_add (&builder, "{sv}", "access_token_secret", g_variant_new_string (access_token_secret));
- if (access_token_expires_in > 0) - if (access_token_expires_in > 0)
- g_variant_builder_add (&builder, "{sv}", "access_token_expires_at", - g_variant_builder_add (&builder, "{sv}", "access_token_expires_at",
- g_variant_new_int64 (duration_to_abs_usec (access_token_expires_in))); - g_variant_new_int64 (goa_utils_convert_duration_sec_to_abs_usec (access_token_expires_in)));
- if (session_handle != NULL) - if (session_handle != NULL)
- g_variant_builder_add (&builder, "{sv}", "session_handle", g_variant_new_string (session_handle)); - g_variant_builder_add (&builder, "{sv}", "session_handle", g_variant_new_string (session_handle));
- if (session_handle_expires_in > 0) - if (session_handle_expires_in > 0)
- g_variant_builder_add (&builder, "{sv}", "session_handle_expires_at", - g_variant_builder_add (&builder, "{sv}", "session_handle_expires_at",
- g_variant_new_int64 (duration_to_abs_usec (session_handle_expires_in))); - g_variant_new_int64 (goa_utils_convert_duration_sec_to_abs_usec (session_handle_expires_in)));
- if (password != NULL) - if (password != NULL)
- g_variant_builder_add (&builder, "{sv}", "password", g_variant_new_string (password)); - g_variant_builder_add (&builder, "{sv}", "password", g_variant_new_string (password));
- /* TODO: run in worker thread */ - /* TODO: run in worker thread */
@ -3267,11 +3248,11 @@ index 71bcad6..0000000
- else if (g_strcmp0 (key, "access_token_secret") == 0) - else if (g_strcmp0 (key, "access_token_secret") == 0)
- access_token_secret = g_variant_dup_string (value, NULL); - access_token_secret = g_variant_dup_string (value, NULL);
- else if (g_strcmp0 (key, "access_token_expires_at") == 0) - else if (g_strcmp0 (key, "access_token_expires_at") == 0)
- access_token_expires_in = abs_usec_to_duration (g_variant_get_int64 (value)); - access_token_expires_in = goa_utils_convert_abs_usec_to_duration_sec (g_variant_get_int64 (value));
- else if (g_strcmp0 (key, "session_handle") == 0) - else if (g_strcmp0 (key, "session_handle") == 0)
- session_handle = g_variant_dup_string (value, NULL); - session_handle = g_variant_dup_string (value, NULL);
- else if (g_strcmp0 (key, "session_handle_expires_at") == 0) - else if (g_strcmp0 (key, "session_handle_expires_at") == 0)
- session_handle_expires_in = abs_usec_to_duration (g_variant_get_int64 (value)); - session_handle_expires_in = goa_utils_convert_abs_usec_to_duration_sec (g_variant_get_int64 (value));
- else if (g_strcmp0 (key, "password") == 0) - else if (g_strcmp0 (key, "password") == 0)
- password = g_variant_dup_string (value, NULL); - password = g_variant_dup_string (value, NULL);
- g_variant_unref (value); - g_variant_unref (value);
@ -3340,12 +3321,12 @@ index 71bcad6..0000000
- g_variant_builder_add (&builder, "{sv}", "access_token_secret", g_variant_new_string (access_token_secret)); - g_variant_builder_add (&builder, "{sv}", "access_token_secret", g_variant_new_string (access_token_secret));
- if (access_token_expires_in > 0) - if (access_token_expires_in > 0)
- g_variant_builder_add (&builder, "{sv}", "access_token_expires_at", - g_variant_builder_add (&builder, "{sv}", "access_token_expires_at",
- g_variant_new_int64 (duration_to_abs_usec (access_token_expires_in))); - g_variant_new_int64 (goa_utils_convert_duration_sec_to_abs_usec (access_token_expires_in)));
- if (session_handle != NULL) - if (session_handle != NULL)
- g_variant_builder_add (&builder, "{sv}", "session_handle", g_variant_new_string (session_handle)); - g_variant_builder_add (&builder, "{sv}", "session_handle", g_variant_new_string (session_handle));
- if (session_handle_expires_in > 0) - if (session_handle_expires_in > 0)
- g_variant_builder_add (&builder, "{sv}", "session_handle_expires_at", - g_variant_builder_add (&builder, "{sv}", "session_handle_expires_at",
- g_variant_new_int64 (duration_to_abs_usec (session_handle_expires_in))); - g_variant_new_int64 (goa_utils_convert_duration_sec_to_abs_usec (session_handle_expires_in)));
- if (password != NULL) - if (password != NULL)
- g_variant_builder_add (&builder, "{sv}", "password", g_variant_new_string (password)); - g_variant_builder_add (&builder, "{sv}", "password", g_variant_new_string (password));
- -
@ -3385,7 +3366,7 @@ index 71bcad6..0000000
- g_free (access_token_secret_for_refresh); - g_free (access_token_secret_for_refresh);
- g_free (session_handle_for_refresh); - g_free (session_handle_for_refresh);
- g_free (password); - g_free (password);
- g_clear_pointer (&credentials, (GDestroyNotify) g_variant_unref); - g_clear_pointer (&credentials, g_variant_unref);
- -
- g_mutex_unlock (lock); - g_mutex_unlock (lock);
- -
@ -3731,201 +3712,34 @@ index d4ffa3c..0000000
-G_END_DECLS -G_END_DECLS
- -
-#endif /* __GOA_OAUTH_PROVIDER_H__ */ -#endif /* __GOA_OAUTH_PROVIDER_H__ */
diff --git a/src/goabackend/goapocketprovider.c b/src/goabackend/goapocketprovider.c
index 38f9863..0d1a8ce 100644
--- a/src/goabackend/goapocketprovider.c
+++ b/src/goabackend/goapocketprovider.c
@@ -185,32 +185,6 @@ build_authorization_uri (GoaOAuth2Provider *oauth2_provider,
return url;
}
-static gboolean
-decide_navigation_policy (GoaOAuth2Provider *oauth2_provider,
- WebKitWebView *web_view,
- WebKitNavigationPolicyDecision *decision)
-{
- GoaPocketProvider *self = GOA_POCKET_PROVIDER (oauth2_provider);
- WebKitNavigationAction *action;
- WebKitURIRequest *request;
- gboolean ret = FALSE;
- const gchar *uri;
-
- action = webkit_navigation_policy_decision_get_navigation_action (decision);
- request = webkit_navigation_action_get_request (action);
- uri = webkit_uri_request_get_uri (request);
- if (!g_str_has_prefix (uri, "https://getpocket.com/a/"))
- goto out;
-
- webkit_uri_request_set_uri (request, self->authorization_uri);
- webkit_web_view_load_request (web_view, request);
-
- ret = TRUE;
-
- out:
- return ret;
-}
-
static gboolean
process_redirect_url (GoaOAuth2Provider *oauth2_provider,
const gchar *redirect_url,
@@ -279,68 +253,6 @@ get_identity_sync (GoaOAuth2Provider *oauth2_provider,
/* ---------------------------------------------------------------------------------------------------- */
-static gboolean
-is_deny_node (GoaOAuth2Provider *oauth2_provider, WebKitDOMNode *node)
-{
- WebKitDOMElement *element;
- gboolean ret = FALSE;
- gchar *id = NULL;
- gchar *class = NULL;
- gchar *text = NULL;
-
- if (!WEBKIT_DOM_IS_ELEMENT (node))
- goto out;
-
- element = WEBKIT_DOM_ELEMENT (node);
-
- /* Desktop version */
- id = webkit_dom_element_get_id (element);
- if (g_strcmp0 (id, "denyButton") == 0)
- {
- ret = TRUE;
- goto out;
- }
-
- /* Mobile version */
- class = webkit_dom_element_get_class_name (element);
- if (g_strcmp0 (class, "toolbarButton") != 0)
- goto out;
-
- /* FIXME: This only seems to work if we don't click on the "Sign Up"
- * button, does the check need to be done again? */
- text = webkit_dom_node_get_text_content (node);
- if (g_strcmp0 (text, "Cancel") != 0)
- goto out;
-
- ret = TRUE;
-
- out:
- g_free (id);
- g_free (class);
- g_free (text);
- return ret;
-}
-
-static gboolean
-is_identity_node (GoaOAuth2Provider *oauth2_provider, WebKitDOMHTMLInputElement *element)
-{
- gboolean ret = FALSE;
- gchar *name;
-
- name = webkit_dom_html_input_element_get_name (element);
- if (g_strcmp0 (name, "feed_id") != 0)
- goto out;
-
- ret = TRUE;
-
-out:
- g_free (name);
- return ret;
-
-}
-
-/* ---------------------------------------------------------------------------------------------------- */
-
static gboolean
build_object (GoaProvider *provider,
GoaObjectSkeleton *object,
@@ -431,15 +343,12 @@ goa_pocket_provider_class_init (GoaPocketProviderClass *klass)
provider_class->build_object = build_object;
oauth2_class->build_authorization_uri = build_authorization_uri;
- oauth2_class->decide_navigation_policy = decide_navigation_policy;
oauth2_class->get_authorization_uri = get_authorization_uri;
oauth2_class->get_token_uri = get_token_uri;
oauth2_class->get_redirect_uri = get_redirect_uri;
oauth2_class->get_client_id = get_client_id;
oauth2_class->get_client_secret = get_client_secret;
oauth2_class->get_identity_sync = get_identity_sync;
- oauth2_class->is_deny_node = is_deny_node;
- oauth2_class->is_identity_node = is_identity_node;
oauth2_class->add_account_key_values = add_account_key_values;
oauth2_class->process_redirect_url = process_redirect_url;
}
diff --git a/src/goabackend/goaprovider.c b/src/goabackend/goaprovider.c diff --git a/src/goabackend/goaprovider.c b/src/goabackend/goaprovider.c
index c8f7f0d..fe8ce22 100644 index 9e5bd45..9712cd2 100644
--- a/src/goabackend/goaprovider.c --- a/src/goabackend/goaprovider.c
+++ b/src/goabackend/goaprovider.c +++ b/src/goabackend/goaprovider.c
@@ -28,7 +28,6 @@ @@ -27,7 +27,6 @@
#include "goafacebookprovider.h" #include "goafacebookprovider.h"
#include "goaimapsmtpprovider.h" #include "goaimapsmtpprovider.h"
#include "goaowncloudprovider.h" #include "goaowncloudprovider.h"
-#include "goaflickrprovider.h" -#include "goaflickrprovider.h"
#include "goafoursquareprovider.h" #include "goafoursquareprovider.h"
#include "goawindowsliveprovider.h" #include "goawindowsliveprovider.h"
#include "goatelepathyfactory.h" #include "goamediaserverprovider.h"
@@ -968,9 +967,6 @@ static struct @@ -947,9 +946,6 @@ static struct
#ifdef GOA_WINDOWS_LIVE_ENABLED #ifdef GOA_WINDOWS_LIVE_ENABLED
{ GOA_WINDOWS_LIVE_NAME, goa_windows_live_provider_get_type }, { GOA_WINDOWS_LIVE_NAME, goa_windows_live_provider_get_type },
#endif #endif
-#ifdef GOA_FLICKR_ENABLED -#ifdef GOA_FLICKR_ENABLED
- { GOA_FLICKR_NAME, goa_flickr_provider_get_type }, - { GOA_FLICKR_NAME, goa_flickr_provider_get_type },
-#endif -#endif
#ifdef GOA_POCKET_ENABLED #ifdef GOA_FOURSQUARE_ENABLED
{ GOA_POCKET_NAME, goa_pocket_provider_get_type }, { GOA_FOURSQUARE_NAME, goa_foursquare_provider_get_type },
#endif #endif
diff --git a/src/goabackend/goatodoistprovider.c b/src/goabackend/goatodoistprovider.c
index d97c33c..7f17a59 100644
--- a/src/goabackend/goatodoistprovider.c
+++ b/src/goabackend/goatodoistprovider.c
@@ -133,33 +133,6 @@ build_authorization_uri (GoaOAuth2Provider *oauth2_provider,
/* ---------------------------------------------------------------------------------------------------- */
-static gboolean
-is_identity_node (GoaOAuth2Provider *oauth2_provider, WebKitDOMHTMLInputElement *element)
-{
- gboolean ret = FALSE;
- gchar *element_type = NULL;
- gchar *id = NULL;
- gchar *name = NULL;
-
- g_object_get (element, "type", &element_type, NULL);
- if (g_strcmp0 (element_type, "email") != 0)
- goto out;
-
- id = webkit_dom_element_get_id (WEBKIT_DOM_ELEMENT (element));
- if (g_strcmp0 (id, "email") != 0)
- goto out;
-
- ret = TRUE;
-
- out:
- g_free (element_type);
- g_free (id);
- g_free (name);
- return ret;
-}
-
-/* ---------------------------------------------------------------------------------------------------- */
-
static gchar *
get_identity_sync (GoaOAuth2Provider *oauth2_provider,
const gchar *access_token,
@@ -337,6 +310,5 @@ goa_todoist_provider_class_init (GoaTodoistProviderClass *klass)
oauth2_class->get_client_secret = get_client_secret;
oauth2_class->get_scope = get_scope;
oauth2_class->get_identity_sync = get_identity_sync;
- oauth2_class->is_identity_node = is_identity_node;
oauth2_class->add_account_key_values = add_account_key_values;
}
diff --git a/src/goabackend/goawebextension.c b/src/goabackend/goawebextension.c diff --git a/src/goabackend/goawebextension.c b/src/goabackend/goawebextension.c
deleted file mode 100644 deleted file mode 100644
index 6a25ab9..0000000 index a17edf2..0000000
--- a/src/goabackend/goawebextension.c --- a/src/goabackend/goawebextension.c
+++ /dev/null +++ /dev/null
@@ -1,273 +0,0 @@ @@ -1,268 +0,0 @@
-/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ -/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
-/* -/*
- * Copyright © 2015 Damián Nohales - * Copyright © 2015 Damián Nohales
@ -3964,11 +3778,6 @@ index 6a25ab9..0000000
- gchar *provider_type; - gchar *provider_type;
-}; -};
- -
-struct _GoaWebExtensionClass
-{
- GObjectClass parent;
-};
-
-enum -enum
-{ -{
- PROP_0, - PROP_0,
@ -4201,10 +4010,10 @@ index 6a25ab9..0000000
-} -}
diff --git a/src/goabackend/goawebextension.h b/src/goabackend/goawebextension.h diff --git a/src/goabackend/goawebextension.h b/src/goabackend/goawebextension.h
deleted file mode 100644 deleted file mode 100644
index 4a8cf8f..0000000 index 994f43f..0000000
--- a/src/goabackend/goawebextension.h --- a/src/goabackend/goawebextension.h
+++ /dev/null +++ /dev/null
@@ -1,42 +0,0 @@ @@ -1,37 +0,0 @@
-/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ -/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
-/* -/*
- * Copyright © 2015 Damián Nohales - * Copyright © 2015 Damián Nohales
@ -4233,13 +4042,8 @@ index 4a8cf8f..0000000
-G_BEGIN_DECLS -G_BEGIN_DECLS
- -
-#define GOA_TYPE_WEB_EXTENSION (goa_web_extension_get_type()) -#define GOA_TYPE_WEB_EXTENSION (goa_web_extension_get_type())
-#define GOA_WEB_EXTENSION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GOA_TYPE_WEB_EXTENSION, GoaWebExtension)) -G_DECLARE_FINAL_TYPE (GoaWebExtension, goa_web_extension, GOA, WEB_EXTENSION, GObject);
-#define GOA_IS_WEB_EXTENSION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GOA_TYPE_WEB_EXTENSION))
- -
-typedef struct _GoaWebExtension GoaWebExtension;
-typedef struct _GoaWebExtensionClass GoaWebExtensionClass;
-
-GType goa_web_extension_get_type (void);
-GoaWebExtension *goa_web_extension_new (WebKitWebExtension *wk_extension, -GoaWebExtension *goa_web_extension_new (WebKitWebExtension *wk_extension,
- const gchar *provider_type, - const gchar *provider_type,
- const gchar *existing_identity); - const gchar *existing_identity);
@ -4249,10 +4053,10 @@ index 4a8cf8f..0000000
-#endif /* __GOA_WEB_EXTENSION_H__ */ -#endif /* __GOA_WEB_EXTENSION_H__ */
diff --git a/src/goabackend/goawebextensionmain.c b/src/goabackend/goawebextensionmain.c diff --git a/src/goabackend/goawebextensionmain.c b/src/goabackend/goawebextensionmain.c
deleted file mode 100644 deleted file mode 100644
index 4fc91e5..0000000 index 061825f..0000000
--- a/src/goabackend/goawebextensionmain.c --- a/src/goabackend/goawebextensionmain.c
+++ /dev/null +++ /dev/null
@@ -1,53 +0,0 @@ @@ -1,46 +0,0 @@
-/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ -/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
-/* -/*
- * Copyright © 2015 Damián Nohales - * Copyright © 2015 Damián Nohales
@ -4282,16 +4086,9 @@ index 4fc91e5..0000000
-static GoaWebExtension *the_extension; -static GoaWebExtension *the_extension;
- -
-/* Silence -Wmissing-prototypes */ -/* Silence -Wmissing-prototypes */
-void webkit_web_extension_initialize (WebKitWebExtension *wk_extension);
-void webkit_web_extension_initialize_with_user_data (WebKitWebExtension *wk_extension, GVariant *user_data); -void webkit_web_extension_initialize_with_user_data (WebKitWebExtension *wk_extension, GVariant *user_data);
- -
-G_MODULE_EXPORT void -G_MODULE_EXPORT void
-webkit_web_extension_initialize (WebKitWebExtension *wk_extension)
-{
- g_warning ("Error initializing web extension: user data not set");
-}
-
-G_MODULE_EXPORT void
-webkit_web_extension_initialize_with_user_data (WebKitWebExtension *wk_extension, GVariant *user_data) -webkit_web_extension_initialize_with_user_data (WebKitWebExtension *wk_extension, GVariant *user_data)
-{ -{
- const gchar *existing_identity; - const gchar *existing_identity;
@ -4308,10 +4105,10 @@ index 4fc91e5..0000000
-} -}
diff --git a/src/goabackend/goawebview.c b/src/goabackend/goawebview.c diff --git a/src/goabackend/goawebview.c b/src/goabackend/goawebview.c
deleted file mode 100644 deleted file mode 100644
index b7af122..0000000 index 2438e0c..0000000
--- a/src/goabackend/goawebview.c --- a/src/goabackend/goawebview.c
+++ /dev/null +++ /dev/null
@@ -1,501 +0,0 @@ @@ -1,515 +0,0 @@
-/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- -/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
- * - *
- * Copyright © 2015 Damián Nohales - * Copyright © 2015 Damián Nohales
@ -4338,7 +4135,7 @@ index b7af122..0000000
- -
-#include <glib.h> -#include <glib.h>
-#include <glib/gi18n-lib.h> -#include <glib/gi18n-lib.h>
-#include <JavaScriptCore/JavaScript.h> -#include <jsc/jsc.h>
-#include <libsoup/soup.h> -#include <libsoup/soup.h>
-#include <webkit2/webkit2.h> -#include <webkit2/webkit2.h>
- -
@ -4360,11 +4157,6 @@ index b7af122..0000000
- gulong notify_progress_id; - gulong notify_progress_id;
-}; -};
- -
-struct _GoaWebViewClass
-{
- GtkOverlayClass parent_class;
-};
-
-enum -enum
-{ -{
- PROP_0, - PROP_0,
@ -4558,26 +4350,41 @@ index b7af122..0000000
-static void -static void
-web_view_script_message_received_password_submit_cb (GoaWebView *self, WebKitJavascriptResult *js_result) -web_view_script_message_received_password_submit_cb (GoaWebView *self, WebKitJavascriptResult *js_result)
-{ -{
- JSGlobalContextRef js_context; - JSCValue *jsc_value;
- JSStringRef js_string; - gchar *password = NULL;
- JSValueRef js_value;
- gsize max_size;
- -
- js_value = webkit_javascript_result_get_value (js_result); - jsc_value = webkit_javascript_result_get_js_value (js_result);
- js_context = webkit_javascript_result_get_global_context (js_result); - password = jsc_value_to_string (jsc_value);
- js_string = JSValueToStringCopy (js_context, js_value, NULL); - if (password != NULL && password[0] != '\0')
- max_size = JSStringGetMaximumUTF8CStringSize (js_string); - g_signal_emit (self, signals[PASSWORD_SUBMIT], 0, password);
- if (max_size > 0)
- {
- gchar *password;
- -
- password = g_malloc0 (max_size); - g_free (password);
- JSStringGetUTF8CString (js_string, password, max_size); -}
- g_signal_emit (self, signals[PASSWORD_SUBMIT], 0, password);
- g_free (password);
- }
- -
- JSStringRelease (js_string); -static void
-goa_web_view_get_preferred_height (GtkWidget *widget, gint *minimum_size, gint *natural_size)
-{
- if (minimum_size != NULL)
- *minimum_size = 200;
-
- if (natural_size != NULL)
- *natural_size = 400;
-}
-
-static void
-goa_web_view_get_preferred_width (GtkWidget *widget, gint *minimum_size, gint *natural_size)
-{
- if (minimum_size != NULL)
- *minimum_size = 300;
-
- if (natural_size != NULL)
- *natural_size = 500;
-}
-
-static GtkSizeRequestMode
-goa_web_view_get_request_mode (GtkWidget *widget)
-{
- return GTK_SIZE_REQUEST_CONSTANT_SIZE;
-} -}
- -
-static void -static void
@ -4591,6 +4398,7 @@ index b7af122..0000000
- self->context = webkit_web_context_new (); - self->context = webkit_web_context_new ();
- language_names = g_get_language_names (); - language_names = g_get_language_names ();
- webkit_web_context_set_preferred_languages (self->context, language_names); - webkit_web_context_set_preferred_languages (self->context, language_names);
- webkit_web_context_set_sandbox_enabled (self->context, TRUE);
- g_signal_connect_swapped (self->context, - g_signal_connect_swapped (self->context,
- "initialize-web-extensions", - "initialize-web-extensions",
- G_CALLBACK (web_view_initialize_web_extensions_cb), - G_CALLBACK (web_view_initialize_web_extensions_cb),
@ -4612,7 +4420,6 @@ index b7af122..0000000
- "user-content-manager", self->user_content_manager, - "user-content-manager", self->user_content_manager,
- "web-context", self->context, - "web-context", self->context,
- NULL)); - NULL));
- gtk_widget_set_size_request (self->web_view, 500, 400);
- gtk_container_add (GTK_CONTAINER (self), self->web_view); - gtk_container_add (GTK_CONTAINER (self), self->web_view);
- -
-#ifdef GOA_INSPECTOR_ENABLED -#ifdef GOA_INSPECTOR_ENABLED
@ -4727,14 +4534,18 @@ index b7af122..0000000
-static void -static void
-goa_web_view_class_init (GoaWebViewClass *klass) -goa_web_view_class_init (GoaWebViewClass *klass)
-{ -{
- GObjectClass *object_class; - GObjectClass *object_class = G_OBJECT_CLASS (klass);
- GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
- -
- object_class = G_OBJECT_CLASS (klass);
- object_class->constructed = goa_web_view_constructed; - object_class->constructed = goa_web_view_constructed;
- object_class->dispose = goa_web_view_dispose; - object_class->dispose = goa_web_view_dispose;
- object_class->finalize = goa_web_view_finalize; - object_class->finalize = goa_web_view_finalize;
- object_class->set_property = goa_web_view_set_property; - object_class->set_property = goa_web_view_set_property;
- -
- widget_class->get_preferred_height = goa_web_view_get_preferred_height;
- widget_class->get_preferred_width = goa_web_view_get_preferred_width;
- widget_class->get_request_mode = goa_web_view_get_request_mode;
-
- g_object_class_install_property (object_class, - g_object_class_install_property (object_class,
- PROP_EXISTING_IDENTITY, - PROP_EXISTING_IDENTITY,
- g_param_spec_string ("existing-identity", - g_param_spec_string ("existing-identity",
@ -4815,10 +4626,10 @@ index b7af122..0000000
-} -}
diff --git a/src/goabackend/goawebview.h b/src/goabackend/goawebview.h diff --git a/src/goabackend/goawebview.h b/src/goabackend/goawebview.h
deleted file mode 100644 deleted file mode 100644
index 4b415cd..0000000 index 4d5d77f..0000000
--- a/src/goabackend/goawebview.h --- a/src/goabackend/goawebview.h
+++ /dev/null +++ /dev/null
@@ -1,43 +0,0 @@ @@ -1,38 +0,0 @@
-/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- -/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
- * - *
- * Copyright © 2012 2017 Red Hat, Inc. - * Copyright © 2012 2017 Red Hat, Inc.
@ -4847,13 +4658,8 @@ index 4b415cd..0000000
-G_BEGIN_DECLS -G_BEGIN_DECLS
- -
-#define GOA_TYPE_WEB_VIEW (goa_web_view_get_type ()) -#define GOA_TYPE_WEB_VIEW (goa_web_view_get_type ())
-#define GOA_WEB_VIEW(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GOA_TYPE_WEB_VIEW, GoaWebView)) -G_DECLARE_FINAL_TYPE (GoaWebView, goa_web_view, GOA, WEB_VIEW, GtkOverlay);
-#define GOA_IS_WEB_VIEW(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GOA_TYPE_WEB_VIEW))
- -
-typedef struct _GoaWebView GoaWebView;
-typedef struct _GoaWebViewClass GoaWebViewClass;
-
-GType goa_web_view_get_type (void) G_GNUC_CONST;
-GtkWidget *goa_web_view_new (GoaProvider *provider, -GtkWidget *goa_web_view_new (GoaProvider *provider,
- const gchar *existing_identity); - const gchar *existing_identity);
-GtkWidget *goa_web_view_get_view (GoaWebView *self); -GtkWidget *goa_web_view_get_view (GoaWebView *self);
@ -4863,10 +4669,10 @@ index 4b415cd..0000000
- -
-#endif /* __GOA_WEB_VIEW_H__ */ -#endif /* __GOA_WEB_VIEW_H__ */
diff --git a/src/goabackend/goawindowsliveprovider.c b/src/goabackend/goawindowsliveprovider.c diff --git a/src/goabackend/goawindowsliveprovider.c b/src/goabackend/goawindowsliveprovider.c
index 10c2dcf..2135fbd 100644 index be35746..0ac5efb 100644
--- a/src/goabackend/goawindowsliveprovider.c --- a/src/goabackend/goawindowsliveprovider.c
+++ b/src/goabackend/goawindowsliveprovider.c +++ b/src/goabackend/goawindowsliveprovider.c
@@ -94,7 +94,8 @@ get_token_uri (GoaOAuth2Provider *oauth2_provider) @@ -93,7 +93,8 @@ get_token_uri (GoaOAuth2Provider *oauth2_provider)
static const gchar * static const gchar *
get_redirect_uri (GoaOAuth2Provider *oauth2_provider) get_redirect_uri (GoaOAuth2Provider *oauth2_provider)
{ {
@ -4876,7 +4682,7 @@ index 10c2dcf..2135fbd 100644
} }
static const gchar * static const gchar *
@@ -234,36 +235,6 @@ get_identity_sync (GoaOAuth2Provider *oauth2_provider, @@ -232,36 +233,6 @@ get_identity_sync (GoaOAuth2Provider *oauth2_provider,
/* ---------------------------------------------------------------------------------------------------- */ /* ---------------------------------------------------------------------------------------------------- */
@ -4913,7 +4719,7 @@ index 10c2dcf..2135fbd 100644
static gboolean static gboolean
build_object (GoaProvider *provider, build_object (GoaProvider *provider,
GoaObjectSkeleton *object, GoaObjectSkeleton *object,
@@ -390,6 +361,5 @@ goa_windows_live_provider_class_init (GoaWindowsLiveProviderClass *klass) @@ -377,6 +348,5 @@ goa_windows_live_provider_class_init (GoaWindowsLiveProviderClass *klass)
oauth2_class->get_client_id = get_client_id; oauth2_class->get_client_id = get_client_id;
oauth2_class->get_client_secret = get_client_secret; oauth2_class->get_client_secret = get_client_secret;
oauth2_class->get_identity_sync = get_identity_sync; oauth2_class->get_identity_sync = get_identity_sync;

View File

@ -0,0 +1,690 @@
diff --git a/data/org.gnome.online-accounts.gschema.xml b/data/org.gnome.online-accounts.gschema.xml
index 46b79b2..4419d61 100644
--- a/data/org.gnome.online-accounts.gschema.xml
+++ b/data/org.gnome.online-accounts.gschema.xml
@@ -6,6 +6,8 @@
<summary>List of providers that are allowed to be loaded</summary>
<description>
A list of strings representing the providers that are allowed to be loaded (default: 'all'). This is only evaluated on startup.
+
+ Deprecated: use goa.conf in the system config directory instead, with a key [providers] enable=all instead. The key is comma-separated list of the provider names.
</description>
</key>
</schema>
diff --git a/src/goabackend/Makefile.am b/src/goabackend/Makefile.am
index c7e00a4..68795f1 100644
--- a/src/goabackend/Makefile.am
+++ b/src/goabackend/Makefile.am
@@ -12,6 +12,7 @@ AM_CPPFLAGS = \
-DG_LOG_DOMAIN=\"GoaBackend\" \
-DGOA_BACKEND_COMPILATION \
-DGOA_API_IS_SUBJECT_TO_CHANGE \
+ -DGOA_CONF_FILENAME=\""$(sysconfdir)/goa.conf"\" \
-DPACKAGE_LIBEXEC_DIR=\""$(libexecdir)"\" \
-DPACKAGE_SYSCONF_DIR=\""$(sysconfdir)"\" \
-DPACKAGE_DATA_DIR=\""$(pkgdatadir)"\" \
diff --git a/src/goabackend/goaexchangeprovider.c b/src/goabackend/goaexchangeprovider.c
index 46d4314..826549e 100644
--- a/src/goabackend/goaexchangeprovider.c
+++ b/src/goabackend/goaexchangeprovider.c
@@ -86,6 +86,8 @@ build_object (GoaProvider *provider,
GoaExchange *exchange = NULL;
GoaMail *mail = NULL;
GoaPasswordBased *password_based = NULL;
+ GKeyFile *goa_conf;
+ const gchar *provider_type;
gboolean calendar_enabled;
gboolean contacts_enabled;
gboolean mail_enabled;
@@ -115,11 +117,14 @@ build_object (GoaProvider *provider,
NULL);
}
+ provider_type = goa_provider_get_provider_type (provider);
+ goa_conf = goa_util_open_goa_conf ();
account = goa_object_get_account (GOA_OBJECT (object));
/* Email */
mail = goa_object_get_mail (GOA_OBJECT (object));
- mail_enabled = g_key_file_get_boolean (key_file, group, "MailEnabled", NULL);
+ mail_enabled = goa_util_provider_feature_is_enabled (goa_conf, provider_type, GOA_PROVIDER_FEATURE_MAIL) &&
+ g_key_file_get_boolean (key_file, group, "MailEnabled", NULL);
if (mail_enabled)
{
if (mail == NULL)
@@ -139,13 +144,17 @@ build_object (GoaProvider *provider,
}
/* Calendar */
- calendar_enabled = g_key_file_get_boolean (key_file, group, "CalendarEnabled", NULL);
+ calendar_enabled = goa_util_provider_feature_is_enabled (goa_conf, provider_type, GOA_PROVIDER_FEATURE_CALENDAR) &&
+ g_key_file_get_boolean (key_file, group, "CalendarEnabled", NULL);
goa_object_skeleton_attach_calendar (object, NULL, calendar_enabled, FALSE);
/* Contacts */
- contacts_enabled = g_key_file_get_boolean (key_file, group, "ContactsEnabled", NULL);
+ contacts_enabled = goa_util_provider_feature_is_enabled (goa_conf, provider_type, GOA_PROVIDER_FEATURE_CONTACTS) &&
+ g_key_file_get_boolean (key_file, group, "ContactsEnabled", NULL);
goa_object_skeleton_attach_contacts (object, NULL, contacts_enabled, FALSE);
+ g_clear_pointer (&goa_conf, g_key_file_free);
+
/* Exchange */
exchange = goa_object_get_exchange (GOA_OBJECT (object));
if (exchange == NULL)
diff --git a/src/goabackend/goafacebookprovider.c b/src/goabackend/goafacebookprovider.c
index c1d35d0..80ee5e2 100644
--- a/src/goabackend/goafacebookprovider.c
+++ b/src/goabackend/goafacebookprovider.c
@@ -253,6 +253,8 @@ build_object (GoaProvider *provider,
GError **error)
{
GoaAccount *account = NULL;
+ GKeyFile *goa_conf;
+ const gchar *provider_type;
gboolean photos_enabled;
gboolean maps_enabled;
gboolean ret = FALSE;
@@ -267,10 +269,13 @@ build_object (GoaProvider *provider,
error))
goto out;
+ provider_type = goa_provider_get_provider_type (provider);
+ goa_conf = goa_util_open_goa_conf ();
account = goa_object_get_account (GOA_OBJECT (object));
/* Photos */
- photos_enabled = g_key_file_get_boolean (key_file, group, "PhotosEnabled", NULL);
+ photos_enabled = goa_util_provider_feature_is_enabled (goa_conf, provider_type, GOA_PROVIDER_FEATURE_PHOTOS) &&
+ g_key_file_get_boolean (key_file, group, "PhotosEnabled", NULL);
goa_object_skeleton_attach_photos (object, photos_enabled);
if (just_added)
@@ -284,9 +289,12 @@ build_object (GoaProvider *provider,
}
/* Maps */
- maps_enabled = g_key_file_get_boolean (key_file, group, "MapsEnabled", NULL);
+ maps_enabled = goa_util_provider_feature_is_enabled (goa_conf, provider_type, GOA_PROVIDER_FEATURE_MAPS) &&
+ g_key_file_get_boolean (key_file, group, "MapsEnabled", NULL);
goa_object_skeleton_attach_maps (object, maps_enabled);
+ g_clear_pointer (&goa_conf, g_key_file_free);
+
if (just_added)
{
goa_account_set_maps_disabled (account, !maps_enabled);
diff --git a/src/goabackend/goafedoraprovider.c b/src/goabackend/goafedoraprovider.c
index 36cb808..cbc8062 100644
--- a/src/goabackend/goafedoraprovider.c
+++ b/src/goabackend/goafedoraprovider.c
@@ -348,6 +348,8 @@ build_object (GoaProvider *provider,
{
GoaAccount *account;
GoaTicketing *ticketing = NULL;
+ GKeyFile *goa_conf;
+ const gchar *provider_type;
gboolean ticketing_enabled;
gboolean ret = FALSE;
@@ -360,10 +362,15 @@ build_object (GoaProvider *provider,
error))
goto out;
+ provider_type = goa_provider_get_provider_type (provider);
+ goa_conf = goa_util_open_goa_conf ();
account = goa_object_get_account (GOA_OBJECT (object));
ticketing = goa_object_get_ticketing (GOA_OBJECT (object));
- ticketing_enabled = g_key_file_get_boolean (key_file, group, "TicketingEnabled", NULL);
+ ticketing_enabled = goa_util_provider_feature_is_enabled (goa_conf, provider_type, GOA_PROVIDER_FEATURE_TICKETING) &&
+ g_key_file_get_boolean (key_file, group, "TicketingEnabled", NULL);
+
+ g_clear_pointer (&goa_conf, g_key_file_free);
if (ticketing_enabled)
{
diff --git a/src/goabackend/goafoursquareprovider.c b/src/goabackend/goafoursquareprovider.c
index def21cb..98a5431 100644
--- a/src/goabackend/goafoursquareprovider.c
+++ b/src/goabackend/goafoursquareprovider.c
@@ -261,6 +261,8 @@ build_object (GoaProvider *provider,
GError **error)
{
GoaAccount *account = NULL;
+ GKeyFile *goa_conf;
+ const gchar *provider_type;
gboolean maps_enabled;
gboolean ret = FALSE;
@@ -274,12 +276,17 @@ build_object (GoaProvider *provider,
error))
goto out;
+ provider_type = goa_provider_get_provider_type (provider);
+ goa_conf = goa_util_open_goa_conf ();
account = goa_object_get_account (GOA_OBJECT (object));
/* Maps */
- maps_enabled = g_key_file_get_boolean (key_file, group, "MapsEnabled", NULL);
+ maps_enabled = goa_util_provider_feature_is_enabled (goa_conf, provider_type, GOA_PROVIDER_FEATURE_MAPS) &&
+ g_key_file_get_boolean (key_file, group, "MapsEnabled", NULL);
goa_object_skeleton_attach_maps (object, maps_enabled);
+ g_clear_pointer (&goa_conf, g_key_file_free);
+
if (just_added)
{
goa_account_set_maps_disabled (account, !maps_enabled);
diff --git a/src/goabackend/goagoogleprovider.c b/src/goabackend/goagoogleprovider.c
index 0fb40c3..7a4a717 100644
--- a/src/goabackend/goagoogleprovider.c
+++ b/src/goabackend/goagoogleprovider.c
@@ -271,6 +271,8 @@ build_object (GoaProvider *provider,
{
GoaAccount *account = NULL;
GoaMail *mail = NULL;
+ GKeyFile *goa_conf;
+ const gchar *provider_type;
gchar *uri_caldav;
gchar *uri_drive;
gboolean ret = FALSE;
@@ -291,12 +293,15 @@ build_object (GoaProvider *provider,
error))
goto out;
+ provider_type = goa_provider_get_provider_type (provider);
+ goa_conf = goa_util_open_goa_conf ();
account = goa_object_get_account (GOA_OBJECT (object));
email_address = goa_account_get_identity (account);
/* Email */
mail = goa_object_get_mail (GOA_OBJECT (object));
- mail_enabled = g_key_file_get_boolean (key_file, group, "MailEnabled", NULL);
+ mail_enabled = goa_util_provider_feature_is_enabled (goa_conf, provider_type, GOA_PROVIDER_FEATURE_MAIL) &&
+ g_key_file_get_boolean (key_file, group, "MailEnabled", NULL);
if (mail_enabled)
{
if (mail == NULL)
@@ -326,28 +331,34 @@ build_object (GoaProvider *provider,
}
/* Calendar */
- calendar_enabled = g_key_file_get_boolean (key_file, group, "CalendarEnabled", NULL);
+ calendar_enabled = goa_util_provider_feature_is_enabled (goa_conf, provider_type, GOA_PROVIDER_FEATURE_CALENDAR) &&
+ g_key_file_get_boolean (key_file, group, "CalendarEnabled", NULL);
uri_caldav = g_strconcat ("https://apidata.googleusercontent.com/caldav/v2/", email_address, "/user", NULL);
goa_object_skeleton_attach_calendar (object, uri_caldav, calendar_enabled, FALSE);
g_free (uri_caldav);
/* Contacts */
- contacts_enabled = g_key_file_get_boolean (key_file, group, "ContactsEnabled", NULL);
+ contacts_enabled = goa_util_provider_feature_is_enabled (goa_conf, provider_type, GOA_PROVIDER_FEATURE_CONTACTS) &&
+ g_key_file_get_boolean (key_file, group, "ContactsEnabled", NULL);
goa_object_skeleton_attach_contacts (object,
"https://www.googleapis.com/.well-known/carddav",
contacts_enabled,
FALSE);
/* Files */
- files_enabled = g_key_file_get_boolean (key_file, group, "FilesEnabled", NULL);
+ files_enabled = goa_util_provider_feature_is_enabled (goa_conf, provider_type, GOA_PROVIDER_FEATURE_FILES) &&
+ g_key_file_get_boolean (key_file, group, "FilesEnabled", NULL);
uri_drive = g_strconcat ("google-drive://", email_address, "/", NULL);
goa_object_skeleton_attach_files (object, uri_drive, files_enabled, FALSE);
g_free (uri_drive);
/* Printers */
- printers_enabled = g_key_file_get_boolean (key_file, group, "PrintersEnabled", NULL);
+ printers_enabled = goa_util_provider_feature_is_enabled (goa_conf, provider_type, GOA_PROVIDER_FEATURE_PRINTERS) &&
+ g_key_file_get_boolean (key_file, group, "PrintersEnabled", NULL);
goa_object_skeleton_attach_printers (object, printers_enabled);
+ g_clear_pointer (&goa_conf, g_key_file_free);
+
if (just_added)
{
goa_account_set_mail_disabled (account, !mail_enabled);
diff --git a/src/goabackend/goaimapsmtpprovider.c b/src/goabackend/goaimapsmtpprovider.c
index 811d48c..abaa4d9 100644
--- a/src/goabackend/goaimapsmtpprovider.c
+++ b/src/goabackend/goaimapsmtpprovider.c
@@ -90,6 +90,8 @@ build_object (GoaProvider *provider,
GoaAccount *account = NULL;
GoaMail *mail = NULL;
GoaPasswordBased *password_based = NULL;
+ GKeyFile *goa_conf;
+ const gchar *provider_type;
gboolean enabled;
gboolean imap_accept_ssl_errors;
gboolean imap_use_ssl;
@@ -132,11 +134,17 @@ build_object (GoaProvider *provider,
NULL);
}
+ provider_type = goa_provider_get_provider_type (provider);
+ goa_conf = goa_util_open_goa_conf ();
account = goa_object_get_account (GOA_OBJECT (object));
/* Email */
mail = goa_object_get_mail (GOA_OBJECT (object));
- enabled = g_key_file_get_boolean (key_file, group, "Enabled", NULL);
+ enabled = goa_util_provider_feature_is_enabled (goa_conf, provider_type, GOA_PROVIDER_FEATURE_MAIL) &&
+ g_key_file_get_boolean (key_file, group, "Enabled", NULL);
+
+ g_clear_pointer (&goa_conf, g_key_file_free);
+
if (enabled)
{
if (mail == NULL)
diff --git a/src/goabackend/goakerberosprovider.c b/src/goabackend/goakerberosprovider.c
index b3ffc3f..a43dc74 100644
--- a/src/goabackend/goakerberosprovider.c
+++ b/src/goabackend/goakerberosprovider.c
@@ -380,6 +380,8 @@ build_object (GoaProvider *provider,
{
GoaAccount *account;
GoaTicketing *ticketing = NULL;
+ GKeyFile *goa_conf;
+ const gchar *provider_type;
gboolean ticketing_enabled;
gboolean ret = FALSE;
@@ -392,10 +394,15 @@ build_object (GoaProvider *provider,
error))
goto out;
+ provider_type = goa_provider_get_provider_type (provider);
+ goa_conf = goa_util_open_goa_conf ();
account = goa_object_get_account (GOA_OBJECT (object));
ticketing = goa_object_get_ticketing (GOA_OBJECT (object));
- ticketing_enabled = g_key_file_get_boolean (key_file, group, "TicketingEnabled", NULL);
+ ticketing_enabled = goa_util_provider_feature_is_enabled (goa_conf, provider_type, GOA_PROVIDER_FEATURE_TICKETING) &&
+ g_key_file_get_boolean (key_file, group, "TicketingEnabled", NULL);
+
+ g_clear_pointer (&goa_conf, g_key_file_free);
if (ticketing_enabled)
{
diff --git a/src/goabackend/goalastfmprovider.c b/src/goabackend/goalastfmprovider.c
index cb9a6f2..1cddadf 100644
--- a/src/goabackend/goalastfmprovider.c
+++ b/src/goabackend/goalastfmprovider.c
@@ -100,6 +100,8 @@ build_object (GoaProvider *provider,
{
GoaAccount *account;
GoaMusic *music = NULL;
+ GKeyFile *goa_conf;
+ const gchar *provider_type;
gboolean music_enabled;
gboolean ret = FALSE;
@@ -115,11 +117,17 @@ build_object (GoaProvider *provider,
error))
goto out;
+ provider_type = goa_provider_get_provider_type (provider);
+ goa_conf = goa_util_open_goa_conf ();
account = goa_object_get_account (GOA_OBJECT (object));
/* Music */
music = goa_object_get_music (GOA_OBJECT (object));
- music_enabled = g_key_file_get_boolean (key_file, group, "MusicEnabled", NULL);
+ music_enabled = goa_util_provider_feature_is_enabled (goa_conf, provider_type, GOA_PROVIDER_FEATURE_MUSIC) &&
+ g_key_file_get_boolean (key_file, group, "MusicEnabled", NULL);
+
+ g_clear_pointer (&goa_conf, g_key_file_free);
+
if (music_enabled)
{
if (music == NULL)
diff --git a/src/goabackend/goamediaserverprovider.c b/src/goabackend/goamediaserverprovider.c
index 9ffd2a0..7c2d61c 100644
--- a/src/goabackend/goamediaserverprovider.c
+++ b/src/goabackend/goamediaserverprovider.c
@@ -88,6 +88,8 @@ build_object (GoaProvider *provider,
gboolean ret;
GoaAccount *account;
GoaMediaServer *mediaserver;
+ GKeyFile *goa_conf;
+ const gchar *provider_type;
const gchar *udn;
gboolean photos_enabled;
@@ -106,13 +108,18 @@ build_object (GoaProvider *provider,
error))
goto out;
+ provider_type = goa_provider_get_provider_type (provider);
+ goa_conf = goa_util_open_goa_conf ();
account = goa_object_get_account (GOA_OBJECT (object));
udn = goa_account_get_identity (account);
/* Photos */
- photos_enabled = g_key_file_get_boolean (key_file, group, "PhotosEnabled", NULL);
+ photos_enabled = goa_util_provider_feature_is_enabled (goa_conf, provider_type, GOA_PROVIDER_FEATURE_PHOTOS) &&
+ g_key_file_get_boolean (key_file, group, "PhotosEnabled", NULL);
goa_object_skeleton_attach_photos (object, photos_enabled);
+ g_clear_pointer (&goa_conf, g_key_file_free);
+
/* Media Server */
mediaserver = goa_object_get_media_server (GOA_OBJECT (object));
if (mediaserver == NULL)
diff --git a/src/goabackend/goaowncloudprovider.c b/src/goabackend/goaowncloudprovider.c
index d142966..b996e48 100644
--- a/src/goabackend/goaowncloudprovider.c
+++ b/src/goabackend/goaowncloudprovider.c
@@ -136,6 +136,8 @@ build_object (GoaProvider *provider,
GError **error)
{
GoaAccount *account = NULL;
+ GKeyFile *goa_conf;
+ const gchar *provider_type;
gchar *uri_caldav;
gchar *uri_carddav;
gchar *uri_webdav;
@@ -173,6 +175,8 @@ build_object (GoaProvider *provider,
NULL);
}
+ provider_type = goa_provider_get_provider_type (provider);
+ goa_conf = goa_util_open_goa_conf ();
account = goa_object_get_account (GOA_OBJECT (object));
identity = goa_account_get_identity (account);
uri_string = g_key_file_get_string (key_file, group, "Uri", NULL);
@@ -183,23 +187,28 @@ build_object (GoaProvider *provider,
accept_ssl_errors = g_key_file_get_boolean (key_file, group, "AcceptSslErrors", NULL);
/* Calendar */
- calendar_enabled = g_key_file_get_boolean (key_file, group, "CalendarEnabled", NULL);
+ calendar_enabled = goa_util_provider_feature_is_enabled (goa_conf, provider_type, GOA_PROVIDER_FEATURE_CALENDAR) &&
+ g_key_file_get_boolean (key_file, group, "CalendarEnabled", NULL);
uri_caldav = uri_to_string_with_path (uri, CALDAV_ENDPOINT);
goa_object_skeleton_attach_calendar (object, uri_caldav, calendar_enabled, accept_ssl_errors);
g_free (uri_caldav);
/* Contacts */
- contacts_enabled = g_key_file_get_boolean (key_file, group, "ContactsEnabled", NULL);
+ contacts_enabled = goa_util_provider_feature_is_enabled (goa_conf, provider_type, GOA_PROVIDER_FEATURE_CONTACTS) &&
+ g_key_file_get_boolean (key_file, group, "ContactsEnabled", NULL);
uri_carddav = uri_to_string_with_path (uri, CARDDAV_ENDPOINT);
goa_object_skeleton_attach_contacts (object, uri_carddav, contacts_enabled, accept_ssl_errors);
g_free (uri_carddav);
/* Files */
- files_enabled = g_key_file_get_boolean (key_file, group, "FilesEnabled", NULL);
+ files_enabled = goa_util_provider_feature_is_enabled (goa_conf, provider_type, GOA_PROVIDER_FEATURE_FILES) &&
+ g_key_file_get_boolean (key_file, group, "FilesEnabled", NULL);
uri_webdav = get_webdav_uri (uri);
goa_object_skeleton_attach_files (object, uri_webdav, files_enabled, accept_ssl_errors);
g_free (uri_webdav);
+ g_clear_pointer (&goa_conf, g_key_file_free);
+
if (just_added)
{
goa_account_set_calendar_disabled (account, !calendar_enabled);
diff --git a/src/goabackend/goaprovider.c b/src/goabackend/goaprovider.c
index 9712cd2..d178209 100644
--- a/src/goabackend/goaprovider.c
+++ b/src/goabackend/goaprovider.c
@@ -375,6 +375,151 @@ goa_provider_get_provider_group (GoaProvider *self)
return GOA_PROVIDER_GET_CLASS (self)->get_provider_group (self);
}
+static const gchar *
+goa_get_feature_alias (GoaProviderFeatures feature)
+{
+ switch (feature) {
+ case GOA_PROVIDER_FEATURE_MAIL:
+ return "mail";
+ case GOA_PROVIDER_FEATURE_CALENDAR:
+ return "calendar";
+ case GOA_PROVIDER_FEATURE_CONTACTS:
+ return "contacts";
+ case GOA_PROVIDER_FEATURE_CHAT:
+ return "chat";
+ case GOA_PROVIDER_FEATURE_DOCUMENTS:
+ return "documents";
+ case GOA_PROVIDER_FEATURE_PHOTOS:
+ return "photos";
+ case GOA_PROVIDER_FEATURE_FILES:
+ return "files";
+ case GOA_PROVIDER_FEATURE_TICKETING:
+ return "ticketing";
+ case GOA_PROVIDER_FEATURE_READ_LATER:
+ return "read-later";
+ case GOA_PROVIDER_FEATURE_PRINTERS:
+ return "printers";
+ case GOA_PROVIDER_FEATURE_MAPS:
+ return "maps";
+ case GOA_PROVIDER_FEATURE_MUSIC:
+ return "music";
+ case GOA_PROVIDER_FEATURE_TODO:
+ return "todo";
+ case GOA_PROVIDER_FEATURE_BRANDED:
+ case GOA_PROVIDER_FEATURE_INVALID:
+ break;
+ }
+ return NULL;
+}
+
+/*
+ * goa_util_open_goa_conf:
+ *
+ * Reads goa.conf file from the system config directory and
+ * returns it for use for example by goa_util_provider_feature_is_enabled().
+ * It returns %NULL, when the file cannot be opened.
+ *
+ * Free the returned #GKeyFile with g_key_file_free(), when no longer needed.
+ *
+ * Returns: (nullable) (transfer full): a new #GKeyFile containing goa.conf
+ * file, or %NULL, when it cannot be opened.
+ *
+ * Since: 3.40.0-7 / RHEL-40831
+ */
+GKeyFile *
+goa_util_open_goa_conf (void)
+{
+ GKeyFile *goa_conf;
+ GError *error = NULL;
+
+ goa_conf = g_key_file_new ();
+ if (!g_key_file_load_from_file (goa_conf, GOA_CONF_FILENAME, G_KEY_FILE_NONE, &error))
+ {
+ g_debug ("Failed to load '%s': %s", GOA_CONF_FILENAME, error ? error->message : "Unknown error");
+ g_clear_error (&error);
+ g_key_file_free (goa_conf);
+ goa_conf = NULL;
+ }
+
+ return goa_conf;
+}
+
+/*
+ * goa_util_provider_feature_is_enabled:
+ * @goa_conf: (nullable): a #GKeyFile with loaded goa.conf file, or %NULL
+ * @provider_type: a provider type string
+ * @feature: a feature to check, one of %GoaProviderFeatures
+ *
+ * Checks in the @goa_conf, whether the @provider_type can use
+ * the @feature. The @goa_conf is a %GKeyFile returned by
+ * goa_util_open_goa_conf(), it can be %NULL, in which case
+ * the @feature is considered enabled.
+ *
+ * Returns: %TRUE, when the @feature is enabled, %FALSE otherwise
+ *
+ * Since: 3.40.0-7 / RHEL-40831
+ */
+gboolean
+goa_util_provider_feature_is_enabled (GKeyFile *goa_conf,
+ const gchar *provider_type,
+ GoaProviderFeatures feature)
+{
+ GError *error = NULL;
+ const gchar *feature_alias;
+ gboolean enabled;
+
+ if (!goa_conf)
+ return TRUE;
+
+ g_return_val_if_fail (provider_type != NULL, TRUE);
+
+ feature_alias = goa_get_feature_alias (feature);
+ g_return_val_if_fail (feature_alias != NULL, TRUE);
+
+ enabled = g_key_file_get_boolean (goa_conf, provider_type, feature_alias, &error);
+ if (error)
+ {
+ g_clear_error (&error);
+ enabled = g_key_file_get_boolean (goa_conf, "all", feature_alias, &error);
+ if (error)
+ {
+ g_clear_error (&error);
+ enabled = TRUE;
+ }
+ }
+
+ return enabled;
+}
+
+static GoaProviderFeatures
+goa_provider_filter_features (GoaProvider *self,
+ GoaProviderFeatures features)
+{
+ GKeyFile *goa_conf;
+ const gchar *provider_type;
+ guint i;
+
+ goa_conf = goa_util_open_goa_conf ();
+ if (!goa_conf)
+ return features;
+
+ provider_type = goa_provider_get_provider_type (self);
+
+ for (i = 0; provider_features_info[i].property != NULL; i++)
+ {
+ GoaProviderFeatures feature = provider_features_info[i].feature;
+ if ((features & feature) != 0 &&
+ !goa_util_provider_feature_is_enabled (goa_conf, provider_type, feature))
+ {
+ features = features & (~feature);
+ }
+ }
+
+ g_key_file_free (goa_conf);
+
+ return features;
+}
+
/**
* goa_provider_get_provider_features:
* @self: A #GoaProvider.
@@ -391,7 +536,7 @@ goa_provider_get_provider_features (GoaProvider *self)
{
g_return_val_if_fail (GOA_IS_PROVIDER (self), GOA_PROVIDER_FEATURE_INVALID);
g_return_val_if_fail (GOA_PROVIDER_GET_CLASS (self)->get_provider_features != NULL, GOA_PROVIDER_FEATURE_INVALID);
- return GOA_PROVIDER_GET_CLASS (self)->get_provider_features (self);
+ return goa_provider_filter_features (self, GOA_PROVIDER_GET_CLASS (self)->get_provider_features (self));
}
/* ---------------------------------------------------------------------------------------------------- */
@@ -979,14 +1124,35 @@ goa_provider_ensure_builtins_loaded (void)
if (g_once_init_enter (&once_init_value))
{
- GSettings *settings;
- gchar **whitelisted_providers;
+ GKeyFile *goa_conf;
+ gchar **whitelisted_providers = NULL;
guint i;
guint j;
gboolean all = FALSE;
- settings = g_settings_new (GOA_SETTINGS_SCHEMA);
- whitelisted_providers = g_settings_get_strv (settings, GOA_SETTINGS_WHITELISTED_PROVIDERS);
+ goa_conf = goa_util_open_goa_conf ();
+ if (goa_conf)
+ {
+ whitelisted_providers = g_key_file_get_string_list (goa_conf, "providers", "enable", NULL, NULL);
+ /* Let the empty array be like 'all' */
+ if (whitelisted_providers && !*whitelisted_providers)
+ {
+ g_strfreev (whitelisted_providers);
+ whitelisted_providers = g_new0 (gchar *, 2);
+ whitelisted_providers[0] = g_strdup ("all");
+ whitelisted_providers[1] = NULL;
+ }
+ g_clear_pointer (&goa_conf, g_key_file_free);
+ }
+
+ if (!whitelisted_providers)
+ {
+ GSettings *settings;
+
+ settings = g_settings_new (GOA_SETTINGS_SCHEMA);
+ whitelisted_providers = g_settings_get_strv (settings, GOA_SETTINGS_WHITELISTED_PROVIDERS);
+ g_object_unref (settings);
+ }
/* Enable everything if there is 'all'. */
for (i = 0; whitelisted_providers[i] != NULL; i++)
@@ -1025,7 +1191,6 @@ goa_provider_ensure_builtins_loaded (void)
cleanup:
g_strfreev (whitelisted_providers);
- g_object_unref (settings);
g_once_init_leave (&once_init_value, 1);
}
}
diff --git a/src/goabackend/goaprovider.h b/src/goabackend/goaprovider.h
index c4bcf91..e7e8a78 100644
--- a/src/goabackend/goaprovider.h
+++ b/src/goabackend/goaprovider.h
@@ -109,6 +109,11 @@ GtkWidget *goa_util_add_row_switch_from_keyfile_with_blurb (GtkGrid *grid,
const gchar *key,
const gchar *blurb);
+GKeyFile * goa_util_open_goa_conf (void);
+gboolean goa_util_provider_feature_is_enabled (GKeyFile *goa_conf,
+ const gchar *provider_type,
+ GoaProviderFeatures feature);
+
G_END_DECLS
#endif /* __GOA_PROVIDER_H__ */
diff --git a/src/goabackend/goawindowsliveprovider.c b/src/goabackend/goawindowsliveprovider.c
index 0ac5efb..628988d 100644
--- a/src/goabackend/goawindowsliveprovider.c
+++ b/src/goabackend/goawindowsliveprovider.c
@@ -244,6 +244,8 @@ build_object (GoaProvider *provider,
{
GoaAccount *account = NULL;
GoaMail *mail = NULL;
+ GKeyFile *goa_conf;
+ const gchar *provider_type;
gboolean mail_enabled;
gboolean ret = FALSE;
const gchar *email_address;
@@ -258,12 +260,18 @@ build_object (GoaProvider *provider,
error))
goto out;
+ provider_type = goa_provider_get_provider_type (provider);
+ goa_conf = goa_util_open_goa_conf ();
account = goa_object_get_account (GOA_OBJECT (object));
email_address = goa_account_get_presentation_identity (account);
/* Email */
mail = goa_object_get_mail (GOA_OBJECT (object));
- mail_enabled = g_key_file_get_boolean (key_file, group, "MailEnabled", NULL);
+ mail_enabled = goa_util_provider_feature_is_enabled (goa_conf, provider_type, GOA_PROVIDER_FEATURE_MAIL) &&
+ g_key_file_get_boolean (key_file, group, "MailEnabled", NULL);
+
+ g_clear_pointer (&goa_conf, g_key_file_free);
+
if (mail_enabled)
{
if (mail == NULL)

5242
SOURCES/kerberos-fixes.patch Normal file

File diff suppressed because it is too large Load Diff

View File

@ -4,18 +4,26 @@
%global libsoup_version 2.42 %global libsoup_version 2.42
Name: gnome-online-accounts Name: gnome-online-accounts
Version: 3.28.2 Version: 3.40.0
Release: 7%{?dist} Release: 7%{?dist}
Summary: Single sign-on framework for GNOME Summary: Single sign-on framework for GNOME
License: LGPLv2+ License: LGPLv2+
URL: https://wiki.gnome.org/Projects/GnomeOnlineAccounts URL: https://wiki.gnome.org/Projects/GnomeOnlineAccounts
Source0: https://download.gnome.org/sources/gnome-online-accounts/3.28/%{name}-%{version}.tar.xz Source0: https://download.gnome.org/sources/gnome-online-accounts/3.40/%{name}-%{version}.tar.xz
Patch01: 0001-mute-debug-prints.patch # https://pagure.io/fedora-workstation/issue/83
Patch02: 0002-Drop-dependency-on-WebKitGTK-139.patch Patch: 0001-Remove-Documents-support.patch
Obsoletes: gnome-online-accounts-oauth2 < 3.28.2-6 # https://gitlab.gnome.org/GNOME/gnome-online-accounts/-/issues/63
# https://bugzilla.redhat.com/show_bug.cgi?id=1913641
Patch: 0001-google-Remove-Photos-support.patch
Patch: kerberos-fixes.patch
Patch: 0003-Drop-dependency-on-WebKitGTK-139.patch
Patch: 0004-Restrict-Services.patch
Obsoletes: gnome-online-accounts-oauth2 < 3.40.0-5
BuildRequires: pkgconfig(gcr-3) BuildRequires: pkgconfig(gcr-3)
BuildRequires: pkgconfig(gio-2.0) >= %{glib2_version} BuildRequires: pkgconfig(gio-2.0) >= %{glib2_version}
@ -30,11 +38,10 @@ BuildRequires: pkgconfig(json-glib-1.0)
BuildRequires: pkgconfig(libsecret-1) >= 0.7 BuildRequires: pkgconfig(libsecret-1) >= 0.7
BuildRequires: pkgconfig(libsoup-2.4) >= %{libsoup_version} BuildRequires: pkgconfig(libsoup-2.4) >= %{libsoup_version}
BuildRequires: pkgconfig(rest-0.7) BuildRequires: pkgconfig(rest-0.7)
%if ! 0%{?fedora} && 0%{?rhel} <= 7
BuildRequires: pkgconfig(telepathy-glib)
%endif
BuildRequires: pkgconfig(libxml-2.0) BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: vala BuildRequires: vala
BuildRequires: make
BuildRequires: git
BuildRequires: autoconf BuildRequires: autoconf
BuildRequires: automake BuildRequires: automake
@ -45,8 +52,8 @@ Requires: libsoup%{?_isa} >= %{libsoup_version}
%description %description
GNOME Online Accounts provides interfaces so that applications and libraries GNOME Online Accounts provides interfaces so that applications and libraries
in GNOME can access the user's online accounts. It has providers for Google, in GNOME can access the user's online accounts. It has providers for Google,
ownCloud, Facebook, Foursquare, Microsoft Account, Pocket, Microsoft Nextcloud, Microsoft Account, Microsoft Exchange, Fedora, IMAP/SMTP and
Exchange, IMAP/SMTP and Kerberos. Kerberos.
%package devel %package devel
Summary: Development files for %{name} Summary: Development files for %{name}
@ -57,16 +64,13 @@ The %{name}-devel package contains libraries and header files for
developing applications that use %{name}. developing applications that use %{name}.
%prep %prep
%setup -q %autosetup -S git
%patch01 -p1 -b .mute-debug-prints
%patch02 -p1 -b .no-webkitgtk
%build %build
aclocal -I m4 aclocal -I m4
autoheader autoheader
automake --add-missing automake
libtoolize libtoolize
#intltoolize --force
autoconf autoconf
%configure \ %configure \
@ -77,15 +81,15 @@ autoconf
--disable-media-server \ --disable-media-server \
--disable-silent-rules \ --disable-silent-rules \
--disable-static \ --disable-static \
--disable-telepathy \ --enable-compile-warnings=yes \
--disable-todoist \ --enable-documentation \
--enable-fedora \
--enable-exchange \ --enable-exchange \
--enable-google \ --enable-google \
--enable-gtk-doc \ --enable-gtk-doc \
--enable-imap-smtp \ --enable-imap-smtp \
--enable-kerberos \ --enable-kerberos \
--enable-owncloud \ --enable-owncloud \
--enable-pocket \
--enable-windows-live --enable-windows-live
%make_build %make_build
@ -95,18 +99,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete
%find_lang %{name} %find_lang %{name}
%if ! 0%{?fedora} && 0%{?rhel} <= 7
%find_lang %{name}-tpaw
%endif
%ldconfig_scriptlets %ldconfig_scriptlets
%if ! 0%{?fedora} && 0%{?rhel} <= 7
%files -f %{name}.lang -f %{name}-tpaw.lang
%else
%files -f %{name}.lang %files -f %{name}.lang
%endif
%license COPYING %license COPYING
%doc COPYING %doc COPYING
%dir %{_libdir}/girepository-1.0 %dir %{_libdir}/girepository-1.0
@ -122,18 +117,10 @@ find $RPM_BUILD_ROOT -name '*.la' -delete
%{_datadir}/applications/org.gnome.OnlineAccounts.OAuth2.desktop %{_datadir}/applications/org.gnome.OnlineAccounts.OAuth2.desktop
%{_datadir}/dbus-1/services/org.gnome.OnlineAccounts.service %{_datadir}/dbus-1/services/org.gnome.OnlineAccounts.service
%{_datadir}/dbus-1/services/org.gnome.Identity.service %{_datadir}/dbus-1/services/org.gnome.Identity.service
%{_datadir}/icons/hicolor/*/apps/goa-*.png %{_datadir}/icons/hicolor/*/apps/goa-*.svg
%{_datadir}/man/man8/goa-daemon.8* %{_datadir}/man/man8/goa-daemon.8*
%{_datadir}/glib-2.0/schemas/org.gnome.online-accounts.gschema.xml %{_datadir}/glib-2.0/schemas/org.gnome.online-accounts.gschema.xml
%if ! 0%{?fedora} && 0%{?rhel} <= 7
%{_datadir}/icons/hicolor/*/apps/im-*.png
%{_datadir}/icons/hicolor/*/apps/im-*.svg
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/irc-networks.xml
%endif
%files devel %files devel
%{_includedir}/goa-1.0/ %{_includedir}/goa-1.0/
%{_libdir}/libgoa-1.0.so %{_libdir}/libgoa-1.0.so
@ -142,35 +129,130 @@ find $RPM_BUILD_ROOT -name '*.la' -delete
%{_datadir}/gir-1.0/Goa-1.0.gir %{_datadir}/gir-1.0/Goa-1.0.gir
%{_libdir}/pkgconfig/goa-1.0.pc %{_libdir}/pkgconfig/goa-1.0.pc
%{_libdir}/pkgconfig/goa-backend-1.0.pc %{_libdir}/pkgconfig/goa-backend-1.0.pc
%dir %{_datadir}/gtk-doc
%dir %{_datadir}/gtk-doc/html
%{_datadir}/gtk-doc/html/goa/ %{_datadir}/gtk-doc/html/goa/
%{_libdir}/goa-1.0/include %{_libdir}/goa-1.0/include
%{_datadir}/vala/ %{_datadir}/vala/
%changelog %changelog
* Wed Nov 15 2023 Milan Crha <mcrha@redhat.com> - 3.28.2-7 * Wed Jun 12 2024 Milan Crha <mcrha@redhat.com> - 3.40.0-7
- Related: RHEL-10493 (Add margin around OAuth2 prompt content) - Resolves: RHEL-40831 (Use /etc/goa.conf to disable features for providers and whole providers)
* Thu Nov 09 2023 Milan Crha <mcrha@redhat.com> - 3.28.2-6 * Wed Nov 15 2023 Milan Crha <mcrha@redhat.com> - 3.40.0-6
- Resolves: RHEL-10493 (Move account types that depend on WebKitGTK into separate optional subpackage) - Related: RHEL-10492 (Add margin around OAuth2 prompt content)
* Wed Nov 08 2023 Milan Crha <mcrha@redhat.com> - 3.40.0-5
- Resolves: RHEL-10492 (Move account types that depend on WebKitGTK into separate optional subpackage)
- backport upstream fix to use external browser for OAuth2 - backport upstream fix to use external browser for OAuth2
* Wed Oct 11 2023 Milan Crha <mcrha@redhat.com> - 3.28.2-5 * Wed Oct 11 2023 Milan Crha <mcrha@redhat.com> - 3.40.0-4
- Resolves: RHEL-10493 (Move account types that depend on WebKitGTK into separate optional subpackage) - Resolves: RHEL-10492 (Move account types that depend on WebKitGTK into separate optional subpackage)
* Fri Sep 02 2022 Milan Crha <mcrha@redhat.com> - 3.28.2-4 * Tue Jun 06 2023 Ray Strode <rstrode@redhat.com> - 3.40.0-3
- Resolves: #2068010 (Turn runtime warnings around libsecret into debug prints) - Backport various kerberos fixes from upstream
Resolves: #2177765
* Sat Apr 24 2021 Debarshi Ray <rishi@fedoraproject.org> - 3.28.2-3 * Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 3.40.0-2
- Disable the Facebook and Foursquare providers - Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Resolves: #1951086, #1952136 Related: rhbz#1991688
* Mon Feb 01 2021 Tomas Popela <tpopela@redhat.com> - 3.28.2-2 * Thu Apr 22 2021 Debarshi Ray <rishi@fedoraproject.org> - 3.40.0-1
- Rebuild to fix multilib issues - Update to 3.40.0
Resolves: #1765627 - Disable the Facebook, Flickr and Foursquare providers
- Remove Photos support from the Google provider
Resolves: #1913641
* Tue Nov 05 2019 Debarshi Ray <rishi@fedoraproject.org> - 3.28.2-1 * Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 3.39.92-2
- Update to 3.28.2 - Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
Resolves: #1674535
* Tue Mar 16 2021 Debarshi Ray <rishi@fedoraproject.org> - 3.39.92-1
- Update to 3.39.92
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.38.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Fri Oct 16 2020 Kalev Lember <klember@redhat.com> - 3.38.0-1
- Update to 3.38.0
* Mon Aug 10 2020 Debarshi Ray <rishi@fedoraproject.org> - 3.37.90-1
- Update to 3.37.90
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.36.0-3
- Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.36.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue Mar 10 2020 Kalev Lember <klember@redhat.com> - 3.36.0-1
- Update to 3.36.0
* Tue Feb 11 2020 Kalev Lember <klember@redhat.com> - 3.35.90-1
- Update to 3.35.90
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.35.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Sat Jan 04 2020 Debarshi Ray <rishi@fedoraproject.org> - 3.35.3-1
- Update to 3.35.3
* Tue Oct 15 2019 Debarshi Ray <rishi@fedoraproject.org> - 3.35.1-1
- Update to 3.35.1
* Wed Sep 11 2019 Kalev Lember <klember@redhat.com> - 3.34.0-1
- Update to 3.34.0
* Tue Sep 03 2019 Kalev Lember <klember@redhat.com> - 3.33.92-1
- Update to 3.33.92
* Wed Aug 21 2019 Debarshi Ray <rishi@fedoraproject.org> - 3.33.91-1
- Update to 3.33.91
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.32.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Fri Mar 29 2019 Kalev Lember <klember@redhat.com> - 3.32.0-1
- Update to 3.32.0
* Sat Feb 09 2019 Debarshi Ray <rishi@fedoraproject.org> - 3.31.90-1
- Update to 3.31.90
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.31.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Mon Dec 17 2018 Debarshi Ray <rishi@fedoraproject.org> - 3.31.3-2
- Drop the documents integration (fedora-workstation/issue/83)
* Wed Dec 12 2018 Debarshi Ray <rishi@fedoraproject.org> - 3.31.3-1
- Update to 3.31.3
* Fri Sep 07 2018 Kalev Lember <klember@redhat.com> - 3.30.0-3
- Rebuilt against fixed atk (#1626575)
* Fri Sep 07 2018 Kalev Lember <klember@redhat.com> - 3.30.0-2
- Fix gtk-doc directory ownership
* Mon Sep 03 2018 Debarshi Ray <rishi@fedoraproject.org> - 3.30.0-1
- Update to 3.30.0
- Disable Pocket
* Thu Aug 16 2018 Debarshi Ray <rishi@fedoraproject.org> - 3.29.91-1
- Update to 3.29.91
* Thu Aug 9 2018 Owen Taylor <otaylor@redhat.com> - 3.29.4-2
- Remove Requires: gettext-libs - it is extraneous
- Use a glob for man page, to handle variations in man page compression.
* Wed Jul 18 2018 Debarshi Ray <rishi@fedoraproject.org> - 3.29.4-1
- Update to 3.29.4
* Mon Jul 16 2018 Debarshi Ray <rishi@fedoraproject.org> - 3.29.1-1
- Update to 3.29.1
- Drop RHEL 7 compatibility because Telepathy is no longer supported
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.28.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Thu Mar 15 2018 Kalev Lember <klember@redhat.com> - 3.28.0-1 * Thu Mar 15 2018 Kalev Lember <klember@redhat.com> - 3.28.0-1
- Update to 3.28.0 - Update to 3.28.0