Commit Graph
43 Commits
Author SHA1 Message Date
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
Georges Basile Stavracas Neto e9a5a12d5e date-selector: remove hack
Seems like Gtk+ fixed the positioning code, and we don't
need this hack anymore.
2016-09-14 16:11:33 -03:00
Georges Basile Stavracas Neto cef7f02a65 date-selector: update text even for today
When the date selector is initialized, the text is
blank, even when the date is set for today.

Fix that by updating the text when setting the date.
2016-07-24 20:09:37 -03:00
Georges Basile Stavracas Neto 2744f5acd2 date-selector: bind weekday numbers with desktop
The current implementation of the new calendar widget
accepts showing the week numbers in a modern and much
more consistent way.

The behavior, however, is not aligned with the rest of
the application and the desktop, which share a setting
to show or hide the week number.

Fix that by synchronizing the new calendar's week number
property with the specific setting.
2016-07-23 17:47:11 -03:00
Georges Basile Stavracas Neto bdac4e4c79 date-selector: turn into a entry
After making the date selector use the brand
new date chooser widget, it is now time to make
it an entry.

This commit, then turns GcalDateSelector into a
GtkEntry subclass, and add all the plumbing that
is necessary to make it work as such.

As a side effect, this commit adds rudimentary
natural language support for parsing dates.
2016-07-23 17:47:11 -03:00
Georges Basile Stavracas Neto 4ef9f75dfb date-selector: move to use the new date chooser
After adding the new GcalDateChooser widget, change the
current date selector to use it as the internal widget
of the popover.

The next logical step is turning GcalDateSelector into
an entry.
2016-07-23 17:47:11 -03:00
Georges Basile Stavracas Neto afe8def60c date-selector: use GDateTime internally
Using a GDateTime improves consistency with the
other components (ideally, we'll move completely
to GDateTime) and simplifies the code.

This commit adds a new property GcalDateSelector::date
and adapts the API to use GDateTime.
2016-02-14 12:17:37 -02:00
Georges Basile Stavracas Neto 5fe6578b16 date-selector: turn into a final class
There is no subclass of GcalDateSelector, and
actually it isn't needed. So, turn the class
into a final class and get rid of the needless
private field.
2016-01-19 18:54:29 -02:00
Erick Perez Castellanos 9be7233f28 date-selector: fix typo
The parsing of the date mask was never happening because it was always assuming
it was wrong.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=758391
2015-12-22 23:55:12 -06:00
Erick Perez Castellanos e81f7090f4 date-selector: use glib string translations
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=756412
2015-10-20 09:35:54 -05:00
Erick Pérez Castellanos fd54a863f4 date-selector: fix crash on some locales
As stated on the bug below Calendar crashes in some locales because of the
parsing of the string representing the date. Since parsing this string can be
very tricky, we decided to make a simple translatable string with the format it
is needed and th translators can set the proper order according to his locale.

The translatable string goes as "%d/%m/%y" being %d the representation of the
day, %m the representation of the month and, %y, the year. The translators
should place it in the correct order for its locale, for instance en_US, should
place it: "%m/%d/%y"

The validation of the translated string is lacking some strength. It could use
some improving.

Bug: https://bugzilla.redhat.com/show_bug.cgi?id=1226823
2015-06-03 14:46:00 -04:00
Erick Pérez Castellanos 47e78ce1b1 date-selector: fix labels order in RTL locales 2015-03-04 10:14:38 -05:00
Erick Pérez Castellanos 52634b982e date-selector: fix children order in RTL locales
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=745117
2015-03-04 10:02:42 -05:00
Erick Pérez Castellanos 9638db32e6 date-selector: fix memory leak 2014-12-25 18:47:04 -05:00
Erick Pérez Castellanos 5395dca4f2 date-selector: make it GtkMenuButton descendant
Added GtkBuilder's UI file definition
2014-12-25 13:03:15 -05:00
Erick Pérez Castellanos d1315de42a date-selector: fixed re-entry in ::set_date
This was causing double actualization of internal day,month,year
variables because GtkCalendar::day-selected signal handler is run by
default after the user connected ones.
2014-12-24 15:00:56 -05:00
Erick Pérez Castellanos cf69b68288 date-selector: always use 4 digits entry for years
Since GtkCalendar widget is a bit clunky to navigate fast between years,
using a four years digits it's better because we are still
very close to the change of the century.
2014-12-24 13:31:54 -05:00
Georges Basile Stavracas Neto 70fa71492e date-selector: added docs 2014-12-23 12:01:42 -05:00
Georges Basile Stavracas Neto e2dc2591e8 date-selector: remove unneeded initialization
GObject initializes private fields to 0, we don't have to redo this work.
2014-12-23 12:01:42 -05:00
Georges Basile Stavracas Neto 70d62e802d date-selector: fix code style format
Better legibility is always welcomed.
2014-12-23 12:01:42 -05:00
Georges Basile Stavracas Neto 4d9ed837cb date-selector: remove debug message
It's not needed to know the mask.
2014-12-23 12:01:42 -05:00
Georges Basile Stavracas Neto 5ed4832f9a date-selector: use atoi instead of strtol
This prevents the pseudo-bug where strtol thinks the date is in octal because of the leading zeros.
2014-12-23 12:01:42 -05:00
Georges Basile Stavracas Neto 3257f47b46 date-selector: fix code style 2014-12-23 12:01:42 -05:00
Georges Basile Stavracas Neto fddac33fad date-selector: factor out duplicated code 2014-12-23 12:01:41 -05:00
Georges Basile Stavracas Neto 13a3fb9638 date-selector: don't set locale on ::init 2014-12-23 12:01:41 -05:00
Georges Basile Stavracas Neto 5cec73ab43 date-selector: completely drop the format_24h flag
Dates do not depend on the time format, so it shouldn't be cached here.
2014-12-23 12:01:41 -05:00
Georges Basile Stavracas Neto 9b5670a416 date-selector: add gcal_date_selector_use_24h_format function
Will be used later on in order to avoid retrieving this value multiple times with GSettings.
2014-12-23 12:01:41 -05:00
Georges Basile Stavracas Neto 0ad7dd54ab date-selector: remove wrongly placed g_object_refs 2014-12-23 12:01:41 -05:00
Georges Basile Stavracas Neto bfc6e37595 date-selector: show Day, Month and Year labels according to it's position 2014-12-23 12:01:40 -05:00
Georges Basile Stavracas Neto 71913eed41 date-selector: fire MODIFIED signal
Also, some code cleanup.
2014-12-23 12:01:40 -05:00
Georges Basile Stavracas Neto 62849f128d date-selector: fix focus-out propagation issue 2014-12-23 12:01:40 -05:00
Georges Basile Stavracas Neto f0e0a6c015 date-selector: update date on GtkEntry::activate signal 2014-12-23 12:01:40 -05:00
Georges Basile Stavracas Neto 55b4002e6b date-selector: set date on GtkEntry::focus-out-event 2014-12-23 12:01:40 -05:00
Georges Basile Stavracas Neto 077b1a7d01 date-selector: clamp day & month values before validating it 2014-12-23 12:01:40 -05:00
Georges Basile Stavracas Neto 107772131b date-selector: clear code, improved set_date func 2014-12-23 12:01:39 -05:00
Georges Basile Stavracas Neto d820abcb3e date-selector: allow calendar to select the date
For testing reasons, we don't fire MODIFIED signal yet.
2014-12-23 12:01:39 -05:00
Georges Basile Stavracas Neto 86624ce8fd date-selector: validate entries' input 2014-12-23 12:01:39 -05:00
Georges Basile Stavracas Neto 69db4acf4c date-selector: limit number of digits of entries 2014-12-23 12:01:39 -05:00
Georges Basile Stavracas Neto 55c0681763 date-selector: setup date entries' text
They still are useless.
2014-12-23 12:01:39 -05:00
Georges Basile Stavracas Neto 8521e5b0f1 date-selector: shows parsed date at the date's label
Also, GcalDateSelector do it's best to find out day, month and year relative positions at the date mask.
2014-12-23 12:01:39 -05:00
Georges Basile Stavracas Neto a518c4e046 date-selector: set calendar's date 2014-12-23 12:01:38 -05:00
Georges Basile Stavracas Neto 2be9c125dd date-selector: load popover with date selector 2014-12-23 12:01:38 -05:00
Georges Basile Stavracas Neto 40683e5e10 date-selector: initial implementetation
No functionality is ready, only project settings and class type.
2014-12-23 12:01:38 -05:00