Commit Graph
54 Commits
Author SHA1 Message Date
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
Georges Basile Stavracas Neto 19d380e80f project: replace GdkColor by GdkRGBA
Fixes bug #738553
2014-12-04 17:10:45 -05:00
Erick Pérez Castellanos cf96da6308 memory: fix memory leaks scattered around 2014-12-04 17:10:44 -05:00
Erick Pérez Castellanos b88e6574b4 utils: fixed debug method 2014-12-04 17:10:39 -05:00
Erick Pérez Castellanos e06033910c utils: add print_date debug method 2014-12-04 17:10:36 -05:00
Erick Pérez Castellanos 3e7f9f4636 gcal-utils: pass size to gcal_get_pixbuf_from_color 2014-12-04 17:10:30 -05:00
Erick Pérez Castellanos f4179ec990 build: removed unused code from gcal-utils
Removed enums and one function
2014-12-04 17:10:25 -05:00
Erick Pérez Castellanos 6ed56ba819 Migrated get_icon_margin to gcal-utils.
Moved to use it later on GcalSearchbar.
2013-05-11 11:32:16 -04:00
Cosimo Cecchi dc450104b8 Don't depend on libedataserverui
libedataserverui has been removed from evolution-data-server this cycle;
we only use it for ECellRendererColor, so import a copy of it in-tree
and remove the dependency.
2013-01-10 18:13:24 -05:00
Erick Pérez Castellanos 0e39c4f618 Added gcal_compare_event_widget_by_date function.
Method added so I can sort the widgets by its start date on
the views.
2012-12-01 15:28:56 -05:00
Erick Pérez Castellanos a3aa2fc664 Fixed indexing of month_names array. 2012-12-01 15:28:53 -05:00
Erick Pérez Castellanos cc14e10d36 Get month names and weekdays from locale.
Added modification to extract month names from locale instead
of localization files.
2012-12-01 15:28:53 -05:00
Erick Pérez Castellanos c3acffa9d7 Changed mode declaration for emacs. 2012-09-20 09:00:46 -04:00
Erick Pérez Castellanos 7581e8bad0 Reworked details view of an event.
Removed editable-widgets.
Added GcalEditDialog
Reworked delete-event trigger
Moved method from GcalEventOverlay to utils to use it on GcalEditDialog
2012-08-23 09:43:58 -04:00
Erick Pérez Castellanos a9da2aa552 Made simple-add event work.
Fixed GcalEventOverlay handling of dates.
Added initial code and methods to handle adding events to GcalManager.
Fixed in GcalMonthView handling of dates passed to event-creation.
Fixed gcal-utils sources for gcc warning.
Fixed calling order in GcalWindow.
2012-08-23 09:43:57 -04:00
Giovanni Campagna 970529cb2f [PATCH] Port to newer EvolutionDataServer
Since 3.5.3, evolution-data-server has changed API regarding
storage and retrieval of sources, introducing the ESourceRegistry
and removing GConf.
Adapt to that.
2012-07-12 10:04:56 -04:00
Erick Pérez Castellanos 1021c7e781 Added GcalWeekView. Not integrated yet.
Refactoring the code inside GcalMonthView for drawing and for showing child
widgets.
Fixed ref_sink in GcalEditableRemainder. (Don't need it)
Added translation for weekdays abbreviation. (Thxs to ebassi & mclasen)
Passed make distcheck.
2012-07-11 10:50:28 -04:00
Erick Pérez Castellanos 39ed044ca5 Glue code for using those editable widgets.
Added GcalEventWidget::activated signal.
Fixed bug in GcalMonthView preventing to get button events.
Added methods in GcalUtils from Evo for formatting time.
..and stuff
2012-07-03 15:20:00 -04:00