Commit Graph
704 Commits
Author SHA1 Message Date
Georges Basile Stavracas Neto a2a2a9c8d5 time-selector: removed unneeded code 2014-12-18 09:55:11 -05:00
Georges Basile Stavracas Neto fa7bc69192 edit-dialog: properly set time selector's sensivity
Instead of simply not settings them at all, it is now set according to the writable and all day values.
2014-12-18 09:55:11 -05:00
Georges Basile Stavracas Neto 448594325e edit-dialog: remove useless code
I'm not really sure of this one, but it seems very correct. At least, things work now.
2014-12-18 09:55:11 -05:00
Georges Basile Stavracas Neto 7f1277062e time-selector: send GcalTimeSelector::modified signal when date changes 2014-12-18 09:55:11 -05:00
Georges Basile Stavracas Neto 1c76779143 time-selector: update label when hour or minute changes 2014-12-18 09:55:10 -05:00
Georges Basile Stavracas Neto 78140e7b79 time-selector: always show the popover at the bottom 2014-12-18 09:55:10 -05:00
Georges Basile Stavracas Neto ff15bd3a05 time-selector: format time label when the day period changes
Also, factor out date formatting code.
2014-12-18 09:55:10 -05:00
Georges Basile Stavracas Neto ee62cdab92 time-selector: format hour according to the 12/24h setting 2014-12-18 09:55:10 -05:00
Georges Basile Stavracas Neto 5c570e0140 time-selector: select AM by default 2014-12-18 09:55:10 -05:00
Georges Basile Stavracas Neto de04c78cc0 time-selector: limit to 11 hours when using 12h format 2014-12-18 09:55:10 -05:00
Georges Basile Stavracas Neto 37a38b6acb time-select: hide period selector when not 12h format 2014-12-18 09:55:10 -05:00
Georges Basile Stavracas Neto c6ada8c356 time-selector: ref builder objects before destroying it
Fixes the annoying bug
2014-12-18 09:55:10 -05:00
Georges Basile Stavracas Neto 9372b3ff3f time-selector: removed unused var 2014-12-18 09:55:09 -05:00
Georges Basile Stavracas Neto 33d101062d time-selector: implemented time selection with spin buttons 2014-12-18 09:55:09 -05:00
Erick Pérez Castellanos 1f9b380238 month-view: overflow indicator drawn centered 2014-12-18 01:54:24 -05:00
Erick Pérez Castellanos fbeb6d35b2 month-view: initial implementation of size alloc
This implements breaking of events, and showing of its parts. It also
provides the information need for the drawing of the overflow indicator.
This implementation brings support to RTL locales as well as LTR.

There's some things still missing here:
1. Mark the widgets with CSS classes for styling its broken status
2. Draw properly the overflow indicator
2014-12-18 01:23:46 -05:00
Erick Pérez Castellanos 7f7739db6d month-view: add helper for hidden event-widgets
When an event is deleted we hide it while the notification with the Undo
option is shown and after a while the event is actually destroyed. This
helper is meant for keeping a set of the event-widgets hidden in that situation
2014-12-18 01:11:17 -05:00
Erick Pérez Castellanos 87856ec31c month-view: initial drawing of overflow indicator
Added FIXME for properly wording the message
2014-12-18 01:11:04 -05:00
Erick Pérez Castellanos 4c7626cad2 month-view: fix ::add, ::remove, ::forall vfuncs
Fixed some bugs:
1. Insert single-day event-widgets on the proper structure
(GcalMonthView::single_day_children)
2. Add FIXME for keep single-day events-widgets ordered
3. Properly handle hash table replacement. GHashTable::replace call
key_destroy_func() and value_destroy_func() if those are provided
4. Don't keep NULL lists on any of the hashes kept by GcalMonthView
5. Change the order in which forall is executed. Don't modify the hashes
while iterating over it.
2014-12-18 01:03:45 -05:00
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 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 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 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 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
Erick Pérez Castellanos 60946551b3 event-widget: add ::clone API 2014-12-16 10:06:08 -05:00
Georges Basile Stavracas Neto cb7d45e184 manager: change signal name to ::'source-activated' 2014-12-16 13:05:11 -02:00
Georges Basile Stavracas Neto 75143200cb manager: change signal name to ::'source-activated' 2014-12-16 13:01:29 -02:00
Georges Basile Stavracas Neto 09262e875e window: remove faulty g_free()
Freeing uid variant results in bloody segfaults.
2014-12-16 12:47:37 -02:00
Georges Basile Stavracas Neto 37241a189b window: implement ability to show/hide calendars
This is a major feature of the preview roadmap.

Right now, it only shows/hides calendars, and the ability to create, delete, et al, them is to be designed.
2014-12-16 12:35:47 -02:00
Georges Basile Stavracas Neto 31fa4e8e06 edit-dialog: update sources when their readonly state changes
This fixes the annoying all-insensitive-menu bug.
2014-12-16 11:19:56 -02:00
Georges Basile Stavracas Neto 96e0055fcb manager: added missing signal signature 2014-12-16 11:16:10 -02:00
Georges Basile Stavracas Neto ffac8223c1 window: added calendar button 2014-12-16 11:14:46 -02:00
Georges Basile Stavracas Neto 0cefc9f5ea manager: implemented GcalManager::source-added and GcalManager::source-removed signals 2014-12-16 11:12:48 -02:00
Erick Pérez Castellanos 069ea90d57 manager: implement ::enable/disable methods 2014-12-15 13:38:42 -05:00
Erick Pérez Castellanos 9e42922543 manager: Keep references of the clients internally
In order to remove clients from the ECalDataModel without destroying we
need to keep a reference to it.
2014-12-15 13:38:37 -05:00
Georges Basile Stavracas Neto e53e514a7e manager: stub functions for enabling/disabling sources 2014-12-15 15:34:58 -02:00
Piotr Drąg 25cbc8627d Updated Polish translation 2014-12-14 12:55:16 +01:00
Erick Pérez Castellanos 2a6b9a31ce app: fix sigsegv when not getting a date from cli 2014-12-10 01:21:19 -05:00
Erick Pérez Castellanos e2a2721e9e window: add safety check 2014-12-09 15:37:02 -05:00
Erick Pérez Castellanos 83345b2fb4 app: gained --date option
GcalWindow loads the date from GcalApplication.
2014-12-09 15:36:01 -05:00
Erick Pérez Castellanos 738bb89d94 edit-dialog: fix memory leaks 2014-12-08 12:33:41 -05:00
Georges Basile Stavracas Neto f8c269ac74 edit-dialog: fixed wrong menu fill
Menu is created each time the dialog is shown, now. This avoids the syncronization between sources loading time.

Also, icon color is now 16px.
2014-12-08 15:34:04 -02:00
Erick Pérez Castellanos e58959d851 e-cal-data-model: fix event with no end-date
Google Calendar set no end-date on events with 0 sec duration time. We
need to make the corner case work.
2014-12-08 11:33:44 -05:00
Erick Pérez Castellanos 98e4b44a7d manager: defer adding client to the internal hash
Wait until the client is opened and connected to add it to the internal
hash, so GcalManager::get_sources work properly.
2014-12-08 11:21:14 -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
Piotr Drąg e3976bdb80 Updated Polish translation 2014-12-07 19:24:10 +01:00