Georges Basile Stavracas Neto
8511285525
year-view: move comparing function from gcal-event-widget.c
...
The compare_for_single_day() method is reproducing the
same functionality from gcal_event_compare(), and the only
consumer is the Year View. So, for now, simplify the
comparing function and put it in year view file.
Also, this commit vastly improves and documents the year
view's algorithm to add events to the sidebar list.
2016-02-14 12:17:37 -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
2ded8b3147
event-widget: drop unused function
2016-02-14 12:17:37 -02:00
Georges Basile Stavracas Neto
f001fb48b7
event-widget: turn into a final class
2016-01-19 19:12:13 -02:00
Georges Basile Stavracas Neto
ef9868a0d7
event-widget: port to css nodes
...
This commit add a css name, and use the style
context's state flags as well.
2016-01-04 16:27:40 -02:00
Erick Pérez Castellanos
636df18f64
event-widget: convert date/time to local timezone
2015-03-16 12:37:43 -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
8f1b118abb
event-widget: fix events with no end date
2015-02-16 09:31:21 -05:00
Erick Pérez Castellanos
4c7a99e7bf
event-widget: handle timezone properly
2015-02-16 09:31:21 -05:00
Erick Pérez Castellanos
cb0571987a
event-widget: properly handle timezone
...
For now, we're going to convert every widget time into our timezone
without question. Further along the way, when we have a more complete
edit-dialog we can handle this in a less strict manner.
2015-02-16 09:31:20 -05:00
Erick Pérez Castellanos
eb8d16bbc7
event-widget: fix size requisition
...
Size requisition previously add margin to the size requested. Margin
should be taken into account outside of the widget. Moving margin to the
container and use border, which previously was not used.
2015-02-16 09:31:19 -05:00
Erick Pérez Castellanos
16d77a6718
Revert "event-widget: hardcode padding-top/bottom at 4px"
...
This reverts commit 554ef1d80b .
2015-02-13 09:12:15 -05:00
Erick Pérez Castellanos
b1df382ee3
app: use get_color_name_from_source()
2015-02-06 09:21:36 -05:00
Erick Pérez Castellanos
554ef1d80b
event-widget: hardcode padding-top/bottom at 4px
...
This is necessary in order to properly style slanted edges on widgets
who need it on both start and end.
2015-01-22 13:31:08 -05:00
Erick Pérez Castellanos
0dd6458ae8
event-widget: fix compare function
2015-01-20 13:11:59 -05:00
Erick Pérez Castellanos
d53a3570bf
event-widget: added compare function
...
This compare function is made to sort using the same two methods used
before but together, giving priority to the longer events.
The idea is sort event properly on year-view's sidebar.
This function will probably change later.
2015-01-20 13:11:59 -05:00
Erick Pérez Castellanos
0b2367200b
copyright: update year
2015-01-20 13:11:58 -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
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
Erick Pérez Castellanos
8f8bb21534
event-widget: use custom class for background colors
2014-12-22 21:41:14 -05:00
Erick Pérez Castellanos
5a36689e07
event-widget: advertise properly multiday status
...
When an event is marked all day, the end-date is always one day ahead of
the true end of the event, and both dates are marked as date. We need to
take this into account.
2014-12-22 14:52:34 -05:00
Erick Pérez Castellanos
a08a0a66c1
event-widget: remove unused CSS tag name
...
Since Gtk+ parses automatically widgets' name, there's no need of custom class
2014-12-22 08:38:19 -05:00
Erick Pérez Castellanos
420e66bdb1
event-widget: add ::compare_by_start_date
...
This function will eventually deprecate gcal_compare_event_widget_by_date()
2014-12-20 09:10:00 -05:00
Erick Pérez Castellanos
51c7e5e2ea
event-widget: add convenient API to query dates
...
Simply it is faster not to allocate memory when there is no need of it
2014-12-18 00:56:46 -05:00
Erick Pérez Castellanos
719a294fae
event-widget: add helper API
...
Added GcalEventWidget::is_multiday to check if an event span more than
one day.
Added GcalEventWidget::compare_by_length which compares two event
widgets according to the duration of the events they represent.
2014-12-16 10:06:09 -05:00
Erick Pérez Castellanos
60946551b3
event-widget: add ::clone API
2014-12-16 10:06:08 -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
532a4de02e
event-widget: fixed typo on method name
2014-12-05 08:17:30 -05:00
Erick Pérez Castellanos
746864e7bc
event-widget: fix icons scaling, made 16x always.
...
Previously the scaling was made to the size of the text layout which
caused a blurriness of the icon. Making its size a multiple of 16 made
the icon preserve its sharpness.
2014-12-04 17:10:51 -05:00
Erick Pérez Castellanos
c526329450
misc: code style and comments removed
2014-12-04 17:10:51 -05:00
Erick Pérez Castellanos
4c98b16c76
event-widget: render locked state of the calendar
2014-12-04 17:10:50 -05:00
Erick Pérez Castellanos
2e82b098b3
build: replace Gtk deprecated calls
2014-12-04 17:10:49 -05:00
Erick Pérez Castellanos
5a1f12ad00
event-widget: make more CSS compliant
...
There are some other changes:
1. Renamed widget class to "event-widget" to avoid collisions
2. Added contrasting event title coloring
3. Use gtk_render functions
2014-12-04 17:10:48 -05:00
Erick Pérez Castellanos
605cb7fc25
build: stop complaints from gcc
...
Gcc complaints this variable may be used uninitialized
2014-12-04 17:10:46 -05:00
Erick Pérez Castellanos
3805496dbb
event-widget: fix memory leak.
...
According to valgrind pango leaks memory when creating a PangoLayout
using gtk_widget_create_pango_layout with a literal string.
2014-12-04 17:10:44 -05:00
Erick Pérez Castellanos
c2eda0e446
event-widget: fix memory corruption
...
GdkRBA should not be allocated using g_new0. Used G_SLICE=debug-blocks
to find it.
2014-12-04 17:10:44 -05:00
Erick Pérez Castellanos
bddf1d2104
event-widget: fixed memory leak
...
Each property was owned by the widget, and I was not freeing its memory
at destruction time
2014-12-04 17:10:43 -05:00
Erick Pérez Castellanos
2b92e0977f
event-widget: include recurid on event uuid
...
By taking recur id into event uuid we are able to properly handle events recurrences
2014-12-04 17:10:43 -05:00
Erick Pérez Castellanos
2a100b5fce
event-widget: add method to test equality
2014-12-04 17:10:42 -05:00
Erick Pérez Castellanos
19c3c4e94f
event-widget: add method to pass its internal data
2014-12-04 17:10:39 -05:00
Erick Pérez Castellanos
714e2c93f3
event-widget: set :uuid property from data
2014-12-04 17:10:39 -05:00
Erick Pérez Castellanos
bc4663f8c8
event-widget: add internal #ECalComponent object
...
The changes made here are minimal to get this building. GcalEventWidget
needs a new rethink and rework to accommodate to those new internal
attributes, which replaces some of the old ones.
2014-12-04 17:10:38 -05:00
Erick Pérez Castellanos
f37e2f6416
event-widget: use single click activation
...
Use pointer cursor
2014-12-04 17:10:36 -05:00
Erick Pérez Castellanos
ca64eb190d
gcal-event-widget: symbolic icon match the height of the text
2014-12-04 17:10:34 -05:00
Erick Pérez Castellanos
3c25ccb4e2
gcal-event-widget: remove unneeded call
2014-12-04 17:10:31 -05:00
Erick Pérez Castellanos
1ada96616b
build: moved gobject construction to new sugar
...
Misc formatting fixes
Misc minor refactoring
2014-12-04 17:10:29 -05:00
Erick Pérez Castellanos
f3afda6584
gcal-event-widget: added :date-end property
...
Added get/set accesors methods.
2014-12-04 17:10:24 -05:00
Erick Pérez Castellanos
7bb3381b6b
gcal-event-widget: fix retrieve :summary property
...
Formatting fixes.
Added functions docs.
2014-12-04 17:10:23 -05:00
Erick Pérez Castellanos
01145b8916
Migrated to Gtk+-3.8
2013-05-17 14:41:12 -04:00
Erick Pérez Castellanos
c3acffa9d7
Changed mode declaration for emacs.
2012-09-20 09:00:46 -04:00