Commit Graph
34 Commits
Author SHA1 Message Date
Georges Basile Stavracas Neto c52bacfc3f utils: Move more API to gcal-date-time-utils.c 2019-04-26 13:57:05 -03:00
Georges Basile Stavracas Neto 527cb6fc5f quick-add-popover: React to time format changes 2019-04-26 13:41:07 -03:00
Georges Basile Stavracas Neto 9216e0931c quick-add-popover: Receive a context 2019-04-26 13:36:35 -03:00
Georges Basile Stavracas Neto a799678f68 event: rewrite timezone support
Now with something that hopefully works.

https://gitlab.gnome.org/GNOME/gnome-calendar/issues/43
https://gitlab.gnome.org/GNOME/gnome-calendar/issues/302
2018-09-14 20:16:54 -03:00
Georges Basile Stavracas Neto 09b986f526 quick-add-popover: Only remove existing rows
We can receive the source-changed signal on read-only sources,
and these sources have no row associated. Trying to remove the
non-existing row would yield a warning.
2018-01-28 12:45:57 -02:00
Georges Basile Stavracas Neto e60c8593dd window: propagate manager using properties 2017-09-07 14:35:44 -03:00
Georges Basile Stavracas Neto 316aeb9c67 quick-add-popover: properly place translator comment 2017-08-22 21:21:19 -03:00
Georges Basile Stavracas Neto 13d6f85d1f quick-add-popover: put day placeholder in the translatable string
As fairly pointed out, we should never split sentences [1].

[1] https://wiki.gnome.org/TranslationProject/DevGuidelines/Never%20split%20sentences

https://bugzilla.gnome.org/show_bug.cgi?id=786022
2017-08-22 20:51:16 -03:00
Philip Withnall 30fc0b5bc5 src: Drop unused variables
Fixes a compiler warning.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://bugzilla.gnome.org/show_bug.cgi?id=785670
2017-08-10 07:14:39 -03:00
Georges Basile Stavracas Neto 72a3bb4168 quick-add-popover, event-widget: add translator comments
https://bugzilla.gnome.org/show_bug.cgi?id=784645
2017-07-10 22:57:00 -03:00
Carlo Lobrano 9033d987a3 quick-add-popover: improve event title in header
Currently when creating new events, in both week and month view,
the popover header shows just the date

e.g.
	"New Event on April 29"
	"New event from April 29 to May 2"

It could be better to show fancier headers with relative dates

e.g.
	"New Event Today",
	"New Event Tomorrow",
	"New Event next Monday",
	"New Event from Tomorrow to May 2"

With this patch I change the header title according to the above
logic

https://bugzilla.gnome.org/show_bug.cgi?id=747479
2017-06-23 03:59:01 -03:00
Rafal Luzynski 2263fc9478 date formats: Use g_date_time_format()
Don't hardcode month-day order, use g_date_time_format() and
mark the format string for translation and let translators choose
their preferred formats.

This patch also removes context from the existing "%B %d" date
format because it is unnecessary and this allows the format to be
reused by the patch.

https://bugzilla.gnome.org/show_bug.cgi?id=780629
2017-06-01 11:37:00 -03:00
Georges Basile Stavracas Neto 2544773645 manager: use EDS selectable property to track disabled agendas
This way, we can keep GNOME Calendar and Evolution synchronized.
And we can save some code too.
2017-03-17 21:25:23 -03:00
Georges Basile Stavracas Neto cf6cdfd2aa project: use cairo_surface_t when possible
We can avoid an entire roundtrip from surface > pixbuf > surface
if we simply pass the surface to GtkImage. We also save quite
a bunch of debug lines.
2017-03-17 10:14:25 -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
Georges Basile Stavracas Neto 0b0dee101a quick-add-popover: only focus entry if popover is visible
Otherwise, we end up with a warning and many keybindings won't
work anymore.
2017-03-14 21:51:37 -03:00
Mohammed Sadiq 1e471b1b0c quick-add-popover: focus entry after calendar selection
Pressing 'Enter' key shall always save the event.
So focusing on 'Add' button after selecting calendar is redundant.

Instead, focus on the entry, so that the user can add more text without
manually focusing.

https://bugzilla.gnome.org/show_bug.cgi?id=778373
2017-02-09 09:48:45 -02:00
Piotr Drąg 0b1dd67d2d Fix translator comments
They need to be exactly one line above a string to show up in .po files.
2017-01-26 04:58:52 +01:00
Piotr Drąg c5d92c22d5 Use Unicode en dash in a translatable string
See https://developer.gnome.org/hig/stable/typography.html

https://bugzilla.gnome.org/show_bug.cgi?id=772263
2017-01-17 15:21:52 +01:00
Georges Basile Stavracas Neto 55d9232b0c quick-add-popover: fix creation of timed events
On week view, we want to create events that span 1 day, but with
different hours. The current code of Quick Add popover, however,
doesn't support that, as the only test case up to now was month
and year views - both not making use of timed events.

Fix that by adding the necessary comparisons, adapting the strings
and allowing events with the same date but different times.
2016-12-13 20:19:28 -02:00
Georges Basile Stavracas Neto 159da57e46 quick-add-popover: always set seconds to 0
https://bugzilla.gnome.org/show_bug.cgi?id=772104
2016-10-01 20:35:48 -03:00
Georges Basile Stavracas Neto e8dbe48baa quick-add-popover: focus "Create" button after selecting an agenda
So that the keyboard flow is smooth and clean.

https://bugzilla.gnome.org/show_bug.cgi?id=770714
2016-10-01 20:15:14 -03:00
Georges Basile Stavracas Neto be3833b977 quick-add-popover: only increase day on single day events 2016-09-28 01:11:14 -03:00
Georges Basile Stavracas Neto 653fb86d16 quick-add-popover: fix single all-day events 2016-09-28 01:02:45 -03:00
Georges Basile Stavracas Neto 1e1452810e quick-add-popover: only today events are timed
Everything else is all day.

https://bugzilla.gnome.org/show_bug.cgi?id=770713
2016-09-28 00:29:52 -03:00
Georges Basile Stavracas Neto f1069c96d6 event: implement GInitable
Since the event creation can fail, lets make it a GInitable
so that we can fail during initialization.

https://bugzilla.gnome.org/show_bug.cgi?id=763166
2016-09-28 00:07:28 -03:00
Georges Basile Stavracas Neto df13ac2a59 quick-add-popover: track default calendar
Update the selected calendar when the default one changes.

https://bugzilla.gnome.org/show_bug.cgi?id=771570
2016-09-27 22:30:11 -03:00
Georges Basile Stavracas Neto a76d40d290 quick-add-popover: only show writable calendars
There is no reason to display read-only calendars, since the
user can't add any events on it.

Fix that by only showing writable calendars.

https://bugzilla.gnome.org/show_bug.cgi?id=768324
2016-09-27 21:30:43 -03:00
Georges Basile Stavracas Neto 243c8b75da quick-add-popover: add "calendar-color-image" css class in rows 2016-07-08 16:42:23 -03:00
fosero 2ac228a9b8 quick-add-popover: adjust end date properly
Subtracting 1 from the first day of the month leads to an invalid date
being shown: use a proper function to adjust the date.

https://bugzilla.gnome.org/show_bug.cgi?id=763015
2016-03-14 16:54:54 -03:00
Georges Basile Stavracas Neto 85f4854a73 quick-add-popover: only multiday events are all day
Everything else is considered a 1h event starting now on
local timezone.
2016-02-26 21:14:30 +01:00
Georges Basile Stavracas Neto fd6d6e97c9 quick-add-popover: fix event creation again 2016-02-18 04:02:46 -02:00
Georges Basile Stavracas Neto 86c6e5da87 quick-add-popover: set local timezone when editing the event
If we add directly from the quick add popover, the event is
all day by default. If we're editing the event, it may or
may not be an all day event. In that case, if the user decides
to give it a time, we want it to be in the local timezone.
2016-02-18 04:03:09 +01:00
Georges Basile Stavracas Neto 11070f1d17 quick-add-popover: new class to handle new events
Instead of throwing it all for GcalWindow to handle,
add a new class called GcalQuickAddPopover that handles
event creation.

Events are always all day when created from the quick
add popover, unless the user wants to change it and click
'Edit Details' button.

In the future, we'll look forward adding natural language
support, so the user can type the times directly from the
entry (like e.g. "soccer at park from 10am to 11:30am").
2016-02-16 13:32:35 -02:00