Commit Graph
71 Commits
Author SHA1 Message Date
Georges Basile Stavracas Neto 2f52962f01 utils: remove debug spew 2017-09-07 01:52:21 -03:00
Georges Basile Stavracas Neto 53a8278953 views: correctly hide events according to the mod type
When deleting events with recurrence, we want to hide the event
widgets according to the modification type. So that selecting
e.g. subsequent in the modification type dialog hides the event,
and the subsequent ones, truly reflecting the operation that will
happen.

Currently, however, the views don't do that, and only hide the
event that was asked to be deleted.

Fix that by passing the object modification type, and adapting the
views to take that into account.
2017-09-07 00:02:40 -03:00
Georges Basile Stavracas Neto 3b6b536663 recurrence: add GcalRecurrenceModType
Instead of reusing the ECalObjModType and mixing the
prefixes all around, do this small cleanup and add a
gcal-prefixed enum.
2017-09-07 00:02:40 -03:00
Carlo Lobrano 66fa49b166 year-view: Mark working days according to locale
Currently, on the year view, Saturday and Sunday are marked
as non working days by default, despite the Locale settings and the
fact that in some Countries Sunday and/or Saturday are workdays.

This patch introduces a new function "is_workday" to check
whether a day is a working day according to the territory part of
Locale.

https://bugzilla.gnome.org/show_bug.cgi?id=746927
2017-08-22 21:10:07 -03:00
Alex Benishek 311195857f Move from GPL 2 to GPL 3
Right now the project contains a mix of GPL 2 and GPL 3 code.
This commit moves all of the perviously GPL 2 code to GPL 3

https://bugzilla.gnome.org/show_bug.cgi?id=752649
2017-08-10 07:16:36 -03:00
Yash Singh a7add6d6be utils: set recurrence-dialog transient for toplevel widget
Setting the recurrence-dialog transient for toplevel widget
allows us to take care of
ask_recurrence_modification_type() calls in the
various views.

https://bugzilla.gnome.org/show_bug.cgi?id=782755
2017-06-14 14:44:10 -03:00
Yash Singh 19f10697d5 utils: set recurrence-dialog modal to toplevel widget
Setting the recurrence-dialog modal to toplevel widget
allows us to take care of
ask_recurrence_modification_type() calls in the
various views.

https://bugzilla.gnome.org/show_bug.cgi?id=782755
2017-06-12 14:46:38 -03:00
Yash Singh a9430f54d0 utils: add ESource* argument to ask-recurrence-modification-type
Earlier the argument was ESource. Changed
the argument to ESource* for the function
to correctly fetch "client" data from the
source.

https://bugzilla.gnome.org/show_bug.cgi?id=782755
2017-06-10 08:49:48 -03:00
Yash Singh cbc9fe7be1 utils: add dialog to modify recurring events
Whenever a user chooses to modify an event which is
recurring, a new dialog will open automatically when
the user clicks 'Done' or 'Delete' in edit-dialog,
after making the desired changes. This new dialog
will ask the user to choose the set of events to
which the changes will be applied. The options
include 'This Event Only', 'Subsequent Events'
and 'All Events'. The function returns true and
the changes take place only if the user chooses any
option other than 'Cancel' or <Alt+F4>.

https://bugzilla.gnome.org/show_bug.cgi?id=782755
2017-06-09 22:33:46 -03:00
Georges Basile Stavracas Neto fc074bcde3 source-dialog: improve URI handler
Now we have a more reliable way to detect whether
the passed URI is a file or a resource.

https://bugzilla.gnome.org/show_bug.cgi?id=780455
2017-04-13 09:17:52 -03:00
Georges Basile Stavracas Neto 7681b7a2da project: document classes 2017-04-12 15:17:17 -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 ab3b80f3b9 event-widget: factor out clock format function
This function will be used by other pieces of code later. We also gain
a tiny performance improvement, as only one GSetting is ever created.
2016-12-13 20:17:28 -02:00
Georges Basile Stavracas Neto c1ab1c2d3b week-header, week-grid: remove duplicate code 2016-12-08 18:53:34 -02:00
Georges Basile Stavracas Neto eb7ad4959b month-view: allow changing months with scrolling
It is very natural and intuitive to try and change the current date
by scrolling. The current implementation of the Month view, however,
blatantly ignores scroll events.

Fix that by hearing to the scrolling events and changing the month
when the scroll is enough.
2016-10-01 19:15:54 -03:00
Georges Basile Stavracas Neto cb7f195966 utils: add "calendars-list" css class to the container
Following the previous commit, add the CSS class to the GtkBox
that is the container of the calendars.
2016-07-08 16:27:49 -03:00
Georges Basile Stavracas Neto a1882ff25e utils: add calendar-color-image css class to popover icons 2016-07-08 16:16:19 -03:00
Georges Basile Stavracas Neto 19d68573dd utils: move utility method to get alarm's minutes 2016-07-06 03:01:56 -03:00
Isaque Galdino 5e05f99876 build: define first week day in the build script
Calendar is not handling locale correctly, e.g. user’ set language to
English (en-us) and format to Norwegian (nb-no), but Calendar assumes
English format rather than Norwegian.

Calendar code was ready to use the correct format, just like Shell and
GtkCalendar. The issue was in the build script which was setting the
correct locale variable responsible to make that code work.

This patch fixes the build script.

https://bugzilla.gnome.org/show_bug.cgi?id=762428
2016-05-08 14:30:00 -03:00
Georges Basile Stavracas Neto c9499b6f7b utils: better compare datetimes by date
By multiplying the year difference by 360 and
month difference by 30, we have a much better
idea of how far the dates are.
2016-03-11 22:55:00 -03:00
Georges Basile Stavracas Neto 34a6ac389a view: update interface code
This commit updates GcalView interface to use
modern GLib API and, consequently, removes tons
of obsolete code.
2016-03-09 14:19:04 -03:00
Georges Basile Stavracas Neto d70613929b utils: fix timezones on event component creation 2016-02-28 14:13:19 -03:00
fosero 83cf97ecb3 utils: let format_utc_offset handle microseconds
format_utc_offset can be called with the return value of
g_date_time_get_utc_offset returning microseconds in a gint64. It is
also still called with the return value of icaltimezone_get_utc_offset
in seconds. Deal with both.

https://bugzilla.gnome.org/show_bug.cgi?id=762438
2016-02-23 22:05:24 -03:00
Georges Basile Stavracas Neto 3c0c3646f4 utils: use GDateTime to build component
As part of our epic journey to GDateTime, and to
prepare ground for the future work, use GDateTime
as arguments for building the ECalComponent.
2016-02-16 11:54:35 -02:00
Georges Basile Stavracas Neto 7a6a13d7e0 event: fix timezone handling
Using libical with libecal means that the dates
are always stored as UTF dates, and we receive the
timezone as the ECalComponentDateTime::tzid value.

This fact was net being considered when adding date
support on GcalEvent, and was causing various issues
when displaying dates.

Fix that by properly handling timezones in GcalEvent.
2016-02-15 20:42:47 -02:00
Georges Basile Stavracas Neto 0ec0ea8121 event-widget: use GcalEvent internally
This saves a lot of code, and is much saner to maintain.
2016-02-14 12:17:37 -02:00
Georges Basile Stavracas Neto 5e0d4018f4 event: add a wrapper around events
Instead of relying on confusing structures, raw data
and direct access to components, add a wrapper for
events.
2016-02-14 12:17:37 -02:00
Miguel Vaello Martínez 2001273c28 Fix uninitialized variable
In the 'icaltime_compare_with_current' function, the 'result' was
uninitialized. As a consequence, this simplifies the if-else
condition.

https://bugzilla.gnome.org/show_bug.cgi?id=759588
2015-12-21 20:11:42 -06:00
Erick Pérez Castellanos c256bec634 utils: make NULL comparison explicit 2015-05-25 12:36:53 -04:00
Georges Basile Stavracas Neto a6a54a2b24 utils: add helper function to retrieve parent source data 2015-05-25 12:35:30 -04:00
Georges Basile Stavracas Neto 37624104cb utils: better regext to match urls 2015-05-25 12:35:30 -04:00
Georges Basile Stavracas Neto 01ac569a1a utils: add function to parse uris
By using a custom regular expression,
parse a uri or abort if it's invalid.
2015-05-25 12:35:28 -04:00
Erick Pérez Castellanos c7563da2d0 app: handle calendars colours better
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=745487
2015-03-06 11:32:32 -05:00
Erick Pérez Castellanos 8589cde0f5 utils: clean description of whitespaces 2015-03-06 10:35:25 -05:00
Erick Pérez Castellanos 87d35dd443 utils: gained compare API 2015-02-17 08:06:18 -05:00
Erick Pérez Castellanos 8f1b118abb event-widget: fix events with no end date 2015-02-16 09:31:21 -05:00
Erick Pérez Castellanos 546b137d24 utils: removing unused functions 2015-02-06 09:21:36 -05:00
Erick Pérez Castellanos 820d1cdb65 utils: API added
+ get_color_name_from_source
+ get_circle_pixbuf_from_color

The first one is use plenty in the codebase, everytime we need a color,
and the second one will be used when retrieving the search results.
2015-02-06 09:21:33 -05:00
Erick Pérez Castellanos f2d84231a4 utils: added date comparison method
icaltime_compare_date_only() has some problems when one of the dates
passed are marked as is_date and the other not.
2015-01-27 17:42:16 -05:00
Georges Basile Stavracas Neto e009a67e30 utils: better search for the first week day
We were relying on _NL_TIME_FIRST_WEEKDAY, which is a glibc extension.

It doesn't work with non-glibc systems, such as FreeBSD.

This commit makes it carefully search for the first weekday. Fixes bug #743327.
2015-01-22 09:53:19 -02:00
Georges Basile Stavracas Neto b44f14bdf2 utils: added code to show the GtkPopover menu's icons
This will be useful for the next commits, which will introduce a fix for the hidden icons at calendar menus.
2015-01-13 13:21:48 -02:00
Erick Pérez Castellanos 43dd2e207f utils: fix memory leak 2014-12-25 18:47:32 -05:00
Erick Pérez Castellanos 0ff177c1d8 comments: document utils functions, add FIXME 2014-12-22 21:55:55 -05:00
Erick Pérez Castellanos e62f48bfea events: fix handling of event with no end date
Fix the sigsegv in edit-dialog and event-widgets when there's no
end-date set.
Set a guard in Utils::gcal_dup_icaltime function.
There's still some problems with the events showing the first time but
not anymore.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=736002
2014-12-08 11:21:14 -05:00
Erick Pérez Castellanos 78bced937e utils: add helper method for component construction 2014-12-04 17:10:56 -05:00
Erick Pérez Castellanos 67732884bb utils: build an uuid string
Use an ESource and ECalComponent to build an uuid string with the format specified
2014-12-04 17:10:55 -05:00
Erick Pérez Castellanos ff73499ab0 utils: retrieve first_weekday from locale
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=703317
2014-12-04 17:10:50 -05:00
Erick Pérez Castellanos 74c9f009d8 edit-dialog: show events description, minor tweaks 2014-12-04 17:10:48 -05:00