[evolution/gnome-43] I#2063 - Make it possible to disable GOA accounts
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/gnome-43] I#2063 - Make it possible to disable GOA accounts
- Date: Fri, 7 Oct 2022 07:01:11 +0000 (UTC)
commit 38f245ef0ef851addf8fa109aded375ca14ac5ed
Author: Milan Crha <mcrha redhat com>
Date: Fri Oct 7 08:59:34 2022 +0200
I#2063 - Make it possible to disable GOA accounts
Closes https://gitlab.gnome.org/GNOME/evolution/-/issues/2063
src/e-util/e-accounts-window.c | 9 +++------
src/modules/accounts-window/e-accounts-window-editors.c | 4 ++--
2 files changed, 5 insertions(+), 8 deletions(-)
---
diff --git a/src/e-util/e-accounts-window.c b/src/e-util/e-accounts-window.c
index 077a1396d5..689486592c 100644
--- a/src/e-util/e-accounts-window.c
+++ b/src/e-util/e-accounts-window.c
@@ -372,7 +372,6 @@ accounts_window_fill_row_with_source (EAccountsWindow *accounts_window,
const gchar *icon_name = NULL;
GdkRGBA rgba;
gboolean rgba_set = FALSE;
- gboolean enabled_visible = TRUE;
guint editing_flags = E_SOURCE_EDITING_FLAG_NONE;
g_return_if_fail (E_IS_ACCOUNTS_WINDOW (accounts_window));
@@ -389,11 +388,9 @@ accounts_window_fill_row_with_source (EAccountsWindow *accounts_window,
if (e_source_has_extension (source, E_SOURCE_EXTENSION_GOA)) {
use_type = g_strconcat ("GOA:", backend_name, NULL);
icon_name = "goa-panel";
- enabled_visible = FALSE;
} else if (e_source_has_extension (source, E_SOURCE_EXTENSION_UOA)) {
use_type = g_strconcat ("UOA:", backend_name, NULL);
icon_name = "credentials-preferences";
- enabled_visible = FALSE;
} else if (g_strcmp0 (backend_name, "none") != 0) {
use_type = backend_name;
backend_name = NULL;
@@ -504,7 +501,7 @@ accounts_window_fill_row_with_source (EAccountsWindow *accounts_window,
gtk_tree_store_set (tree_store, iter,
COLUMN_BOOL_ENABLED, e_source_get_enabled (source),
- COLUMN_BOOL_ENABLED_VISIBLE, can_show_enabled && enabled_visible && (editing_flags &
E_SOURCE_EDITING_FLAG_CAN_ENABLE) != 0,
+ COLUMN_BOOL_ENABLED_VISIBLE, can_show_enabled && (editing_flags &
E_SOURCE_EDITING_FLAG_CAN_ENABLE) != 0,
COLUMN_STRING_DISPLAY_NAME, e_source_get_display_name (source),
COLUMN_STRING_ICON_NAME, icon_name,
COLUMN_BOOL_ICON_VISIBLE, icon_name != NULL,
@@ -1290,11 +1287,11 @@ accounts_window_get_editing_flags_default (EAccountsWindow *accounts_window,
g_return_val_if_fail (out_flags != NULL, FALSE);
if (e_source_has_extension (source, E_SOURCE_EXTENSION_COLLECTION)) {
- *out_flags = E_SOURCE_EDITING_FLAG_NONE;
+ *out_flags = E_SOURCE_EDITING_FLAG_CAN_ENABLE;
if (!e_source_has_extension (source, E_SOURCE_EXTENSION_GOA) &&
!e_source_has_extension (source, E_SOURCE_EXTENSION_UOA)) {
- *out_flags = (*out_flags) | E_SOURCE_EDITING_FLAG_CAN_ENABLE |
E_SOURCE_EDITING_FLAG_CAN_DELETE;
+ *out_flags = (*out_flags) | E_SOURCE_EDITING_FLAG_CAN_DELETE;
}
return TRUE;
diff --git a/src/modules/accounts-window/e-accounts-window-editors.c
b/src/modules/accounts-window/e-accounts-window-editors.c
index 80acfd867e..1000dfbce4 100644
--- a/src/modules/accounts-window/e-accounts-window-editors.c
+++ b/src/modules/accounts-window/e-accounts-window-editors.c
@@ -382,9 +382,9 @@ accounts_window_editors_get_editing_flags_cb (EAccountsWindow *accounts_window,
if (e_source_has_extension (source, E_SOURCE_EXTENSION_GOA) ||
e_source_has_extension (source, E_SOURCE_EXTENSION_UOA)) {
if (editors->gcc_program_path)
- *out_flags = E_SOURCE_EDITING_FLAG_CAN_EDIT;
+ *out_flags = E_SOURCE_EDITING_FLAG_CAN_ENABLE |
E_SOURCE_EDITING_FLAG_CAN_EDIT;
else
- *out_flags = E_SOURCE_EDITING_FLAG_NONE;
+ *out_flags = E_SOURCE_EDITING_FLAG_CAN_ENABLE;
} else {
*out_flags = E_SOURCE_EDITING_FLAG_CAN_ENABLE | E_SOURCE_EDITING_FLAG_CAN_EDIT |
E_SOURCE_EDITING_FLAG_CAN_DELETE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]