Commit Graph
26 Commits
Author SHA1 Message Date
Georges Basile Stavracas Neto b936759e5c project: Make time format a first-class citizen
The current code deals with 12/24h clock formats almost like
a workaround of the issue. This commit adds proper support to
different clock formats.
2018-01-28 02:30:55 -02:00
Georges Basile Stavracas Neto 1dcf0d1f24 project: Unify headers 2018-01-27 22:35:20 -02:00
Mohammed Sadiq cf787ea5b2 time-selector: set the right lower bound
There was a typo in function name, which was only setting
the upper bound for 24 hour time format. As the default
lower bound is 0, no issue was known so far.

But in cases like the user switched from 12 hour to 24 hour
format there is a chance for some issues to appear as the lower
bound of 12 Hour format is 1, and it won't be reset to 0 when
the user has switched to 24 hour format.

https://bugzilla.gnome.org/show_bug.cgi?id=781448
2017-04-18 09:32:37 -03:00
Georges Basile Stavracas Neto d5825bbd35 project: override log domains
This way, we can have more useful debug spils.
2017-03-17 10:14:25 -03:00
Victor Toso f713a90ea3 time-selector: Fix GDateTime leak
By using finalize and dispose methods and calling the proper free
methods calls.

8,806 (64 direct, 8,742 indirect) bytes in 2 blocks are definitely lost in loss record 18,367 of 18,534
   at 0x4C2DB9D: malloc (vg_replace_malloc.c:299)
   by 0x9A0C90E: g_malloc (gmem.c:94)
   by 0x9A26A55: g_slice_alloc (gslice.c:1025)
   by 0x9A26A95: g_slice_alloc0 (gslice.c:1051)
   by 0x99E8DC4: g_date_time_alloc (gdatetime.c:428)
   by 0x99E8FA3: g_date_time_from_instant (gdatetime.c:524)
   by 0x99E933F: g_date_time_new_from_timeval (gdatetime.c:647)
   by 0x99E93A5: g_date_time_new_now (gdatetime.c:705)
   by 0x99E93C4: g_date_time_new_now_local (gdatetime.c:728)
   by 0x445BED: gcal_time_selector_init (gcal-time-selector.c:249)
   by 0x9584B32: g_type_create_instance (gtype.c:1866)
   by 0x956BED0: g_object_new_internal (gobject.c:1783)

https://bugzilla.gnome.org/show_bug.cgi?id=772272
2016-10-01 19:20:01 -03:00
Ernestas Kulik c16864ff97 time-selector: fix 12-hour format
Currently, the date selector allows hours in range [0; 11], which is not
the convention. This commit fixes the conversion logic.

https://bugzilla.gnome.org/show_bug.cgi?id=756377
2016-07-28 16:40:56 -03:00
Ernestas Kulik d0143db01b time-selector: fix AM to PM time logic
Currently, the hour component of the time is doubled when switching from
AM to PM, which is incorrect. This commit fixes the logic by adding 12
hours when switching to PM.

https://bugzilla.gnome.org/show_bug.cgi?id=765370
2016-07-27 16:36:36 -03:00
Anwar Sadath 14dc32891b edit-dialog: Respecting GNOME's 12/24 hour format
The edit dialog time picker didnt take into account GNOME's hour format.

The edit dialog time picker didnt take into account GNOME's hour format because the desktop settings clock-format from gcal-window was not passed to gcal-edit-dialog.

Now the data is passed through the function gcal_edit_dialog_time_format and everything works as required.

https://bugzilla.gnome.org/show_bug.cgi?id=703321
2016-03-14 17:40:22 -03:00
Georges Basile Stavracas Neto 34ff93ce3f time-selector: use GDateTime
Pretty much like the previous commit, but porting the
GcalTimeSelector class.
2016-02-14 12:17:37 -02:00
Georges Basile Stavracas Neto ca327e2ce5 time-selector: turn into a final class 2016-01-19 21:12:19 -02:00
Erick Pérez Castellanos 0b2367200b copyright: update year 2015-01-20 13:11:58 -05:00
Georges Basile Stavracas Neto b635ac7112 time-selector: fix wrong time order for RTL languages
Fix bug #741921.
2015-01-03 16:00:37 -02:00
Georges Basile Stavracas Neto c10ba6b228 time-selector: don't access dconf multiple times for the same key
Instead of accessing 3 times the same key, use the cached version and save up some time.
2015-01-03 15:31:05 -02:00
Georges Basile Stavracas Neto fa014972bc time-selector: make it GtkMenuButton descendant
With it, it is up to Gtk+ to handle the popover.
2015-01-03 15:11:20 -02:00
Erick Pérez Castellanos 4eabc0223b build: remove unneeded code
GObject type system zeroing instance private data, so initialization to
NULL and FALSE is not needed.
Misc code styles fixes.
2014-12-22 21:52:35 -05:00
Georges Basile Stavracas Neto a2a2a9c8d5 time-selector: removed unneeded code 2014-12-18 09:55:11 -05:00
Georges Basile Stavracas Neto 7f1277062e time-selector: send GcalTimeSelector::modified signal when date changes 2014-12-18 09:55:11 -05:00
Georges Basile Stavracas Neto 1c76779143 time-selector: update label when hour or minute changes 2014-12-18 09:55:10 -05:00
Georges Basile Stavracas Neto 78140e7b79 time-selector: always show the popover at the bottom 2014-12-18 09:55:10 -05:00
Georges Basile Stavracas Neto ff15bd3a05 time-selector: format time label when the day period changes
Also, factor out date formatting code.
2014-12-18 09:55:10 -05:00
Georges Basile Stavracas Neto ee62cdab92 time-selector: format hour according to the 12/24h setting 2014-12-18 09:55:10 -05:00
Georges Basile Stavracas Neto de04c78cc0 time-selector: limit to 11 hours when using 12h format 2014-12-18 09:55:10 -05:00
Georges Basile Stavracas Neto 37a38b6acb time-select: hide period selector when not 12h format 2014-12-18 09:55:10 -05:00
Georges Basile Stavracas Neto c6ada8c356 time-selector: ref builder objects before destroying it
Fixes the annoying bug
2014-12-18 09:55:10 -05:00
Georges Basile Stavracas Neto 9372b3ff3f time-selector: removed unused var 2014-12-18 09:55:09 -05:00
Georges Basile Stavracas Neto 33d101062d time-selector: implemented time selection with spin buttons 2014-12-18 09:55:09 -05:00