Commit Graph
126 Commits
Author SHA1 Message Date
Erick Pérez Castellanos 442b26b5ea month-view: properly handle all-day events
Note: when the marking of break events is made, this have to be taken
into account.
2014-12-22 14:54:05 -05:00
Erick Pérez Castellanos 3f093c5e13 month-view: fix drawing of overflow indicator
The drawing was happening but the clipping was not including the full
widget. Queuing a new draw expands the clip to the whole area of the widget.
2014-12-22 10:01:58 -05:00
Benjamin Otte 45601d39a2 Use d_ngettext() in printf format directly
.. instead of going via an intermediate variable.
This way, gcc is smart enough to detect that the format string is indeed
static and not throw a warning.
2014-12-22 15:10:20 +01:00
Erick Pérez Castellanos e2d4e52ec7 month-view: monitor click only on overflow indicator 2014-12-22 08:38:19 -05:00
Erick Pérez Castellanos c97473e955 month-view: emit ::create-event-detailed
Emit this signal from the "Add new event..." button of overflow popover,
the reason is mainly aesthetics since it won't look good showing one
popover after another.
2014-12-22 08:38:18 -05:00
Erick Pérez Castellanos 56f7f88572 month-view: fix insert ordered widgets
The head of the list might changed when ordering the list at insertion,
then, some events was getting lost
2014-12-22 08:38:18 -05:00
Erick Pérez Castellanos 4bef6148f9 month-view: sort single-day event widgets by start date
This guarantee that events widgets appear sorted by its start date on
the overflow popover
2014-12-20 09:10:00 -05:00
Erick Pérez Castellanos f9627fcf98 month-view: show start time header on overflow popover 2014-12-20 09:10:00 -05:00
Erick Pérez Castellanos 9badd9f502 month-view: read 12/24 time format setting
The setting will be used when showing the start time of events in the
overflow popover.
2014-12-20 09:10:00 -05:00
Erick Pérez Castellanos 5051ba600f month-view: draw a background on the overflow indicator
This code suffer from a similar bug to ::queue_area on
::size_allocate. This need some revisiting to make it work properly.
2014-12-20 09:10:00 -05:00
Erick Pérez Castellanos 7a00364efb month-view: preserve hovered cell on popover show
The hovered cell is the indicator to draw the background and the
coloring of the overflow indicator. Preserve its value as long as the
overflow is shown.
2014-12-20 09:10:00 -05:00
Erick Pérez Castellanos d63d23bc16 month-view: add title to overflow popover 2014-12-20 09:10:00 -05:00
Erick Pérez Castellanos 96a939ab48 month-view: update note about Gtk+ clipping bug 2014-12-20 09:10:00 -05:00
Erick Pérez Castellanos bd62b96a75 month-view: FIXME removed, feature added 2014-12-20 09:10:00 -05:00
Erick Pérez Castellanos ca20726959 month-view: fix popover placement on RTL locales 2014-12-20 09:09:59 -05:00
Erick Pérez Castellanos 046dac4fe9 month-view: highlight overflow indicator on hover 2014-12-20 09:09:59 -05:00
Erick Pérez Castellanos 07b4ee4862 month-view: initial impl of overflow popover 2014-12-20 09:09:59 -05:00
Erick Pérez Castellanos e5f507b95a month-view: track events on overflow indicator area
We keep to state variables to handle hovering and clicking on the
indicator.
Note: This commit does not build because requires of upcoming work
2014-12-20 09:09:59 -05:00
Erick Pérez Castellanos 9bfa048101 month-view: add proper count of overflowed events
Keep a list of the hidden events per cell in order to add them later to
the popover
2014-12-20 09:09:59 -05:00
Erick Pérez Castellanos 06e43d836f month-view: amend fix ::forall impl 2014-12-19 10:40:39 -05:00
Erick Pérez Castellanos 2c639d2d00 month-view: queue draw on size_allocate
It should not be necessary to queue a draw operation after
::size_allocate. This has been discussed over with Gtk+ devs, as soon as
the bug is fixed these statements will goes away.
2014-12-18 22:21:18 -05:00
Erick Pérez Castellanos 780bebf871 month-view: optimize text direction query
By keeping the value of the direction factor k around we save code and
function calling every time we need to use it.
2014-12-18 19:58:13 -05:00
Erick Pérez Castellanos 232b93095d month-view: fix ::forall and ::remove impl
Take care of removing parts-widgets first whenever a master widgets is removed
2014-12-18 19:25:23 -05:00
Erick Pérez Castellanos 5b4e7d470d month-view: implement GcalView::get_by_uuid 2014-12-18 15:43:13 -05:00
Erick Pérez Castellanos 170501bbdd month-view: add helper method 2014-12-18 14:50:29 -05:00
Erick Pérez Castellanos ceabae5e2c month-view: rework handling of widget's hiding
Previously, we were hoping keeping a list of the widgets hidden by the
application, but the implementation did not work.
Now we keep a hash of those widgets hidden because of the overflow, when
a widget is not visible, and it's not in GcalMonthView::hidden_as_overflow
hash, then was hidden by the application.
2014-12-18 14:44:05 -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 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