Commit Graph
95 Commits
Author SHA1 Message Date
Erick Pérez Castellanos 9c29618fb6 month-view: helper to calculate the split of widgets
This calculates the split according to the space left on each cell
2014-12-18 00:59:58 -05:00
Erick Pérez Castellanos f5a08f24bb month-view: rework internals data structures
Changed internals data structures in order to handle allocation of
multidays events properly.
Modified GtkContainer::add, GtkContainer::remove and
GtkContainer::forall according to this new internal structure.
Commented out GcalView::get_by_uuid since it might get deprecated.
2014-12-16 10:06:09 -05:00
Erick Pérez Castellanos d1a7c6ee24 month-view: fix sigsegv if end_date is not created 2014-12-16 10:06:09 -05:00
Erick Pérez Castellanos 52a4e617b5 month-view: draw selected days marks 2014-12-16 10:06:09 -05:00
Erick Pérez Castellanos 70d69ac966 month-view: organize, clean code 2014-12-16 10:06:08 -05:00
Erick Pérez Castellanos 268ef17484 month-view: updated press/release/motions handlers
Now internal values of button press, motion and releases are kept
according the cell numbers alone, as explained in the comments.
2014-12-16 10:06:08 -05:00
Erick Pérez Castellanos aaee4a2657 month-view: initial work to new mockup from Lapo
There's a bunch of stuff missing here, but this code is already working.
This includes only part of the drawing code, I already take into account
here LTR and RTL languages.
Here month-view make use of classes for styling different regions of the
grid, there are:
1. header class, which is used for the font and color details of the
days naming on the top of the grid
2. current class, which is used for drawing the current day number and
its background
3. lines class: which set the color property of the lines in the grid
4. :selected pseudo-class is used for drawing the font on the days
marked when creating an event. This will work as well for keyboard
navigation

What's missing here:
1. properly update click/press marks to new model
2. draw border around the selected days
2014-12-16 10:06:08 -05:00
Georges Basile Stavracas Neto 23a7cda500 month-view: fixed small position calc issue
When using double for *part* of the calculation of Y position, the result is completely wrong.

This commit fixes it.
2014-12-05 00:04:42 -02:00
Erick Pérez Castellanos 947e23758c misc: whitespace, comments and strings fixed 2014-12-04 17:10:54 -05:00
Erick Pérez Castellanos 3887951323 month-view: more double to int rounding issues
Style fixes
2014-12-04 17:10:52 -05:00
Erick Pérez Castellanos 260237bc85 month-view: style cleaning 2014-12-04 17:10:52 -05:00
Erick Pérez Castellanos 5cbdf28387 month-view: added current day highlight
Improved ::draw vfunc code. Use .current class to handle active day styling
2014-12-04 17:10:52 -05:00
Georges Basile Stavracas Neto d25a6e4cbf views: queue a redraw when the current date changes
This partially fixes bug #739550. The warning message is still being emmited.
2014-12-04 17:10:52 -05:00
Georges Basile Stavracas Neto 3e0fa5763c month-view: fix rendering issues, smooth resizing
All about integer rounding.

Fixes bug #739294.
2014-12-04 17:10:52 -05:00
Erick Pérez Castellanos 298a0e56c2 Revert: month-view: fix cell rendering glitch
This was not the proper fix.
2014-12-04 17:10:52 -05:00
Erick Pérez Castellanos 4425149647 month-view: optimized, organized ::draw vfunc code 2014-12-04 17:10:51 -05:00
Erick Pérez Castellanos 8c5eaa66c8 views: fixed docs style 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 a67635bb05 month-view: add first_weekday settings to view
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=703317
2014-12-04 17:10:50 -05:00
Erick Pérez Castellanos 8531fedde9 month-view: optimize set :date property
There's no need to calculate first day of month date twice.
2014-12-04 17:10:50 -05:00
Erick Pérez Castellanos c9d347cceb misc: updates to code style and docs 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 de90213fd7 month-view: fix cell rendering glitch
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=739294
2014-12-04 17:10:48 -05:00
Erick Pérez Castellanos f988eac12f view iface: remove more unused methods
GcalView::draw_event overlapped a bit with GcalView::will_add_event, so
the same reasons for removing one stand for the other.
GcalView::clear was a hack for the composited GcalDayView which has
gone, and was a bad experiment.
2014-12-04 17:10:47 -05:00
Erick Pérez Castellanos 18b4ef8186 month-view: remove FIXME
Subscription is already being made. Remove reminder.
2014-12-04 17:10:46 -05:00
Erick Pérez Castellanos 6f2b01018f view iface: remove unused will_add_event
ECalDataModelSubscriber interface notify each view only about the events
beloging to the subscribed range so there's no need of checking if the
event widget will be added.
The safety check of not adding the same widget twice its stil being made
on each GtkContainer::add implementation.
2014-12-04 17:10:46 -05:00
Erick Pérez Castellanos aca1b66743 month-view: makes a descendant of GcalSubscriber
By making GcalMonthView a descendat of GcalSubscriber it gets
implementation for each of the methods on ECalDataModel subscriber and
utomatically gains the functionality of adding and removing events widgets
2014-12-04 17:10:46 -05:00
Erick Pérez Castellanos 9b281eff69 month-view: implement ECalDataModel::components_modified vfunc 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 d37347418b month-view: implement ECalDataModel::components_removed vfunc
Previous fixes on GcalEventWidget allow to use the recurid in order to
differentiate instances of the same event.
2014-12-04 17:10:43 -05:00
Erick Pérez Castellanos a9b302b205 month-view: fix double free of the passed component 2014-12-04 17:10:43 -05:00
Erick Pérez Castellanos ab2050b695 month-view: change widget comparison for inclusion
Using new function ensure checking recurid besides everything else
2014-12-04 17:10:42 -05:00
Erick Pérez Castellanos 2bb8b6f4c4 month-view: add ECalDataModelSubscriber iface impl
Initial work implementing ECalDataModelSubscriber interface. As
explained before, on each set of GcalView:active-date property the range
the view its subscribing gets updated. Allowing this to obtain
notification through ECalDataModelSubscriber::components_added and
ECalDataModelSubscriber::components_removed vfuncs.
2014-12-04 17:10:42 -05:00
Erick Pérez Castellanos 3a151894be views: implemented :manager property
As explained before, this is only intended to keep a reference to the
GcalManager instance of the application.
Misc: fixed some documentation and whitespace issues
2014-12-04 17:10:42 -05:00
Erick Pérez Castellanos d8cc980a1d month-view: implement GcalView::wil_add_event vfunc 2014-12-04 17:10:39 -05:00
Erick Pérez Castellanos 76582329ef view: add :will_add_event vfunc and stub methods
Note: this commit probably won't build, but this is the right order of
keeping history.
2014-12-04 17:10:38 -05:00
Georges Basile Stavracas Neto 4287cc72ef month-view: fixed wrong day selection 2014-12-04 17:10:38 -05:00
Erick Pérez Castellanos 48f5b36c29 views: ensure initial/final dates have timezones 2014-12-04 17:10:36 -05:00
Erick Pérez Castellanos ff11049f30 build: remove calls to deprecated methods 2014-12-04 17:10:35 -05:00
Erick Pérez Castellanos 1ad998b54b month-view: fixed drawing of the grid
Updated colors and line widths
2014-12-04 17:10:35 -05:00
Erick Pérez Castellanos 0527350db7 gcal-month-view: added security check
Prevented button release handling when not needed
2014-12-04 17:10:31 -05:00
Erick Pérez Castellanos 65bc0d1269 gcal-month-view: fixed days number drawing
Updated GcalMonthViewPrivate:days_delay on every day update
2014-12-04 17:10:30 -05:00
Erick Pérez Castellanos 41f490aa8d gcal-month-view: fixed drawing issue
Fixed drawing issue with :mark_current_unit method
2014-12-04 17:10:30 -05:00
Erick Pérez Castellanos a24eca0386 gcal-view: modified mark_current_unit API
Added x,y return values, positions of the current unit
2014-12-04 17:10:29 -05:00
Erick Pérez Castellanos 8cbac83723 gcal-month-view: migrated to new GcalView API
Migrated to new event creation flow, compliant with one click create event.
Moved to new private instance data API.
2014-12-04 17:10:29 -05:00
Erick Pérez Castellanos f3df3e784d misc: cleaning unused code. 2014-12-04 17:10:28 -05:00
Erick Pérez Castellanos 37dc43c518 gcal-view: implementing GcalView:clear vfunc 2014-12-04 17:10:27 -05:00
Erick Pérez Castellanos c365e9124a gcal-view: cleaned API
Removed unneeded GcalView:reposition_child method.
Reworked gcal_window_events_modified to use GcalView:get_by_uuid
2014-12-04 17:10:26 -05:00
Erick Pérez Castellanos 9f530a5b8a gcal-view: modified API
Implemented in views.
Reworked GcalDayView implementation to allow bigger
than days events.
2014-12-04 17:10:26 -05:00
Erick Pérez Castellanos 4330859ae0 gcal-view: removed unused methods 2014-12-04 17:10:25 -05:00