mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Cloud storage: clean up handling of cloud storage account
Correctly tracking the status of our authentication with the cloud service is non-trivial, especially since the user may quit Subsurface between registering and verifying an account, they might even register on one machine and verify on another. This tries to make sure that when in doubt we check with the cloud service backend. And we show errors in the UI. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
8f7a4a1a97
commit
b5eb66545b
5 changed files with 43 additions and 27 deletions
9
pref.h
9
pref.h
|
|
@ -95,7 +95,7 @@ struct preferences {
|
|||
char *cloud_storage_email;
|
||||
char *cloud_storage_email_encoded;
|
||||
bool save_password_local;
|
||||
bool show_cloud_pin;
|
||||
short cloud_verification_status;
|
||||
bool cloud_background_sync;
|
||||
};
|
||||
enum unit_system_values {
|
||||
|
|
@ -111,6 +111,13 @@ enum def_file_behavior {
|
|||
CLOUD_DEFAULT_FILE
|
||||
};
|
||||
|
||||
enum cloud_status {
|
||||
CS_UNKNOWN,
|
||||
CS_INCORRECT_USER_PASSWD,
|
||||
CS_NEED_TO_VERIFY,
|
||||
CS_VERIFIED
|
||||
};
|
||||
|
||||
extern struct preferences prefs, default_prefs;
|
||||
|
||||
#define PP_GRAPHS_ENABLED (prefs.pp_graphs.po2 || prefs.pp_graphs.pn2 || prefs.pp_graphs.phe)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue