Skip to content

Commit

Permalink
Change: Add system_default value for date and time format settings
Browse files Browse the repository at this point in the history
  • Loading branch information
a-h-abdelsalam authored and timopollmeier committed Aug 30, 2024
1 parent b4c652c commit 1cc8c6d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/manage_sql.c
Original file line number Diff line number Diff line change
Expand Up @@ -16131,7 +16131,7 @@ check_db_settings ()
" ('" SETTING_UUID_USER_INTERFACE_TIME_FORMAT "', NULL,"
" 'User Interface Time Format',"
" 'Preferred time format to be used in client user interfaces.',"
" '24' );");
" 'system_default' );");

if (sql_int ("SELECT count(*) FROM settings"
" WHERE uuid = '" SETTING_UUID_USER_INTERFACE_DATE_FORMAT "'"
Expand All @@ -16142,7 +16142,7 @@ check_db_settings ()
" ('" SETTING_UUID_USER_INTERFACE_DATE_FORMAT "', NULL,"
" 'User Interface Date Format',"
" 'Preferred date format to be used in client user interfaces.',"
" 'wdmy' );");
" 'system_default' );");
}

/**
Expand Down Expand Up @@ -53348,10 +53348,9 @@ modify_setting (const gchar *uuid, const gchar *name,

if (strcmp (uuid, "11deb7ff-550b-4950-aacf-06faeb7c61b9") == 0)
{
int value_int;
/* User Interface Time Format */
if (sscanf (value, "%d", &value_int) != 1
|| (strcmp (value, "12") && strcmp (value, "24")))
if (strcmp (value, "12") && strcmp (value, "24")
&& strcmp (value, "system_default"))
{
g_free (value);
return 2;
Expand All @@ -53361,7 +53360,8 @@ modify_setting (const gchar *uuid, const gchar *name,
if (strcmp (uuid, "d9857b7c-1159-4193-9bc0-18fae5473a69") == 0)
{
/* User Interface Date Format */
if (strcmp (value, "wmdy") && strcmp (value, "wdmy"))
if (strcmp (value, "wmdy") && strcmp (value, "wdmy")
&& strcmp (value, "system_default"))
{
g_free (value);
return 2;
Expand Down

0 comments on commit 1cc8c6d

Please sign in to comment.