Login
Log in using an SSO provider:
Fedora Account System
Red Hat Associate
Red Hat Customer
Login using a Red Hat Bugzilla account
Forgot Password
Create an Account
Red Hat Bugzilla – Attachment 1980250 Details for
Bug 2227002
Calendar reminders always use 12-hour time format
Home
New
Search
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh89 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
[?]
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
initial patch proposal
eds-fix-clock-format.patch (text/plain), 2.45 KB, created by
Melker Narikka
on 2023-07-27 11:17:37 UTC
(
hide
)
Description:
initial patch proposal
Filename:
MIME Type:
Creator:
Melker Narikka
Created:
2023-07-27 11:17:37 UTC
Size:
2.45 KB
patch
obsolete
>diff --git a/src/calendar/libecal/e-reminder-watcher.c b/src/calendar/libecal/e-reminder-watcher.c >index 5a0849019..dbc8ebb85 100644 >--- a/src/calendar/libecal/e-reminder-watcher.c >+++ b/src/calendar/libecal/e-reminder-watcher.c >@@ -59,6 +59,8 @@ struct _EReminderWatcherPrivate { > ESourceRegistryWatcher *registry_watcher; > GCancellable *cancellable; > GSettings *settings; >+ GSettings *desktop_settings; >+ gboolean use_24h; > gboolean timers_enabled; > gulong past_changed_handler_id; > gulong snoozed_changed_handler_id; >@@ -1370,7 +1372,11 @@ e_reminder_watcher_format_time_impl (EReminderWatcher *watcher, > g_return_if_fail (buffer_size > 0); > > tm = e_cal_util_icaltime_to_tm (itt); >- e_time_format_date_and_time (&tm, FALSE, FALSE, FALSE, *inout_buffer, buffer_size); >+ /* Wrong: the second argument is use_24_hour_format, and always passing >+ * FALSE will break user experience. The time format setting seems to >+ * be universally read from a desktop-wide gsettings property, so the >+ * same could probably be applied here as well. */ >+ e_time_format_date_and_time (&tm, watcher->priv->use_24h, FALSE, FALSE, *inout_buffer, buffer_size); > } > > static GSList * /* EReminderData * */ >@@ -2575,6 +2581,16 @@ e_reminder_watcher_class_init (EReminderWatcherClass *klass) > G_TYPE_NONE); > } > >+static void >+e_reminder_watcher_load_clock_format (EReminderWatcher *watcher) >+{ >+ if (watcher->priv->desktop_settings) { >+ gchar *clock_format = g_settings_get_string(watcher->priv->desktop_settings, "clock-format"); >+ watcher->priv->use_24h = g_strcmp0(clock_format, "24h") == 0; >+ g_free(clock_format); >+ } >+} >+ > static void > e_reminder_watcher_init (EReminderWatcher *watcher) > { >@@ -2593,6 +2609,13 @@ e_reminder_watcher_init (EReminderWatcher *watcher) > watcher->priv = e_reminder_watcher_get_instance_private (watcher); > watcher->priv->cancellable = g_cancellable_new (); > watcher->priv->settings = g_settings_new ("org.gnome.evolution-data-server.calendar"); >+ watcher->priv->desktop_settings = g_settings_new ("org.gnome.desktop.interface"); >+ g_signal_connect_object (watcher->priv->desktop_settings, >+ "changed::clock-format", >+ G_CALLBACK (e_reminder_watcher_load_clock_format), >+ watcher, >+ G_CONNECT_SWAPPED); >+ e_reminder_watcher_load_clock_format(watcher); > watcher->priv->scheduled = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, e_reminder_watcher_free_rd_slist); > watcher->priv->default_zone = e_cal_util_copy_timezone (zone); > watcher->priv->timers_enabled = TRUE;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 2227002
:
1980250
|
1980296