Commit Graph
2181 Commits
Author SHA1 Message Date
Georges Basile Stavracas Neto 18b788c997 week-header: rename function 2016-12-01 23:48:54 -02:00
Georges Basile Stavracas Neto ab50b0d039 week-header: rewrite event moving method
This method could've avoided an infinite loop case all this time,
and I didn't realize it.
2016-12-01 23:48:54 -02:00
Georges Basile Stavracas Neto 1903474ca6 week-header: make event removal more robust
The current code does not move the remaining events up and,
when changing the week header various times, it ends up
showing completely bogus events at bogus positions.

Fix that by properly moving events up when removing them.
2016-12-01 23:48:54 -02:00
Georges Basile Stavracas Neto 392c310f55 week-header: refactor event moving
Instead of passing the position of the widget in the
UI, pass the position of the widget in the model.
2016-12-01 23:48:54 -02:00
Georges Basile Stavracas Neto 3b885d2874 week-header: fix style 2016-12-01 23:48:54 -02:00
Georges Basile Stavracas Neto 2bc8f85ce8 week-header: simplify and extend moving column events 2016-12-01 23:48:54 -02:00
Georges Basile Stavracas Neto de36d449ed week-header: don't allow negative widths 2016-12-01 23:48:54 -02:00
Georges Basile Stavracas Neto 92ba507b9e week-header: implement merging of consecultive events
When an event is placed in the same row consecultively, we must
guarantee that it's only one widget.
2016-12-01 23:48:54 -02:00
Georges Basile Stavracas Neto bb0e927fc2 week-grid: style cleanup 2016-12-01 23:48:54 -02:00
Georges Basile Stavracas Neto f4f2527e69 week-header: remove unused code 2016-12-01 23:48:54 -02:00
Georges Basile Stavracas Neto 6e318f3463 week-header: start moving to use another event storage
Instead of using a single, giant GList to store all the available
events, use an array of sorted GLists.

This commit adds temporary debug messages, beware the huge output.
2016-12-01 23:48:54 -02:00
Georges Basile Stavracas Neto c66029d49f window: fix week view range 2016-12-01 23:48:54 -02:00
Georges Basile Stavracas Neto 1cf46abfed week-view: don't set the subscriber range twice 2016-12-01 23:48:54 -02:00
Georges Basile Stavracas Neto 2e7c6c8c58 week-header: visual improvements 2016-12-01 23:48:54 -02:00
Georges Basile Stavracas Neto 12da2c44e7 week-view: improve drawing of the week grid 2016-12-01 23:48:54 -02:00
Georges Basile Stavracas Neto 39076d1aaf style: update hour sidebar padding 2016-12-01 23:48:54 -02:00
Georges Basile Stavracas Neto 16a2d64874 week-header: simplify background drawing code
By moving the drawing area to a separate place, we're
able to avoid having to manually calculate the sidebar
width.

Also, because we can, the drawing code was simplified a
little bit by moving the bottom border to CSS.
2016-12-01 23:48:54 -02:00
Georges Basile Stavracas Neto 2298379e51 week-header: reorganize widgets
Instead of a box inside the overlay, put the overlay inside the
box.
2016-12-01 23:48:54 -02:00
Georges Basile Stavracas Neto 154a01f4c1 week-view, week-grid: various fixed
This commit is a rebase, compile-warning remover and a
misbehaviour fixer too.
2016-12-01 23:48:53 -02:00
pandusonu2 a94a15ebba window: add week-view shortcut
Add the shortcut to switch between views to the week-view
2016-12-01 23:48:53 -02:00
pandusonu2 b51f8c3ca6 week-grid: realize the week-grid
Activate the week-grid by writing the necessary realize, unrealize, map and unmap functions
2016-12-01 23:48:53 -02:00
pandusonu2 e16426db05 week-header: correct padding and drawing
Correct the padding for the expand button, to set some space between the button and the border.
Remove the extra code which results in drawing of an additional line.
2016-12-01 23:48:53 -02:00
pandusonu2 97ed5267e2 week-view: fix the sync between sidebar width
Fix the width of the sidebar sync between the week view and week header.
2016-12-01 23:48:53 -02:00
pandusonu2 4fde7e369d week-header: remove unnecessary code and correct access of public functions
Remove code of functions which are no longer being used. Also corrected a few public functions and made them private as they won't be used.
2016-12-01 23:48:53 -02:00
pandusonu2 680f220fb2 week-view: draw the hours labels
Draw the hour labels in the sidebar of the week grid.
2016-12-01 23:48:53 -02:00
pandusonu2 4b1ff14b6a week-header: work around with GtkOverlay error
Using the height request function to fix the error with height allocation of GtkOverlay widget.
2016-12-01 23:48:53 -02:00
pandusonu2 7927d3b11f week-header: add support for expanded and collapsed mode
Add the expand button and the functions require to expand and collapse the header.
2016-12-01 23:48:53 -02:00
pandusonu2 d6ef05b31d week-header: adjust theming to match the mockups
Set correct font weight, size and draw lines where required.
2016-12-01 23:48:53 -02:00
pandusonu2 4544b39b47 week-header: sort events before placing them
Sort the events based on multiday/single day, start date and duration.
2016-12-01 23:48:53 -02:00
pandusonu2 175d22e9ef week-header: reposition present events on changing active date.
When an event lasts beyond the active week, the event placement doesn't change on changing the week.

We removed all the present events and added them to the list of events to be added to reposition them.
2016-12-01 23:48:53 -02:00
pandusonu2 665f91701b week-header: set correct padding for the grid
Set the margin top, left, and right for the grid, according to the mockups.
2016-12-01 23:48:53 -02:00
pandusonu2 62d8fdc057 week-header: manage event display, position and removal
Manage the displaying, positioning and removal of events in the week-header.
2016-12-01 23:48:53 -02:00
pandusonu2 0a53f1440e week-header: set line width and height as in mockup
Set the divider line width and height to match the mockup.
2016-12-01 23:48:53 -02:00
Georges Basile Stavracas Neto a43df17b08 week-header: turn into a GtkGrid
If the header is a GtkScrolledWindow, all the content
(including the top labels and week names) are scrolled.
This is a wrong behavior, since only the events should
be scrollable.

Fix that by making GcalWeekHeader a GtkGrid, and adding
the scrolled window in the correct position.
2016-12-01 23:48:53 -02:00
pandusonu2 61f25b78db week-header: override the size_allocate()
Override the size_allocate() widget function to set proper alignment for the grid.
2016-12-01 23:48:53 -02:00
pandusonu2 188d7742b4 week-view: display events in header
Displaying events in the week-header based on duration of the event.
2016-12-01 23:48:53 -02:00
pandusonu2 16a1c9b55b week-header: corrected the date of start of the week
The active date is taken as the start of the week

Added a function to get the correct date at start of the week.
2016-12-01 23:48:53 -02:00
pandusonu2 2e82f0a2b8 week-header: use GDateTime in place of icaltimetype
Switch to using GDateTime variables in place of icaltimetype variables wherever found.
2016-12-01 23:48:53 -02:00
pandusonu2 4dec80af4f week-header: made the update_headers()
Shifted the code to update labels from the draw() to a separate new function update_headers()
2016-12-01 23:48:53 -02:00
pandusonu2 1122b24216 week-header: modify the draw() to match mockup
Made changes in the draw() to match the mockups.
2016-12-01 23:48:53 -02:00
pandusonu2 9ff7d79d7d week-header: use stack-allocated structure
Using stack allocated structure for certain variable in the draw(). Also disabling the week-grid for now.
2016-12-01 23:48:53 -02:00
pandusonu2 bffaa3bd76 week-view: add the EcalDataModelSubscriber functions
Added the init, add, modified and removed functions of week-view for data model subscriber.
2016-12-01 23:48:53 -02:00
pandusonu2 16fac7c3a0 week-view: make it a template class
Made changes to make the week-view into a template class.
2016-12-01 23:48:53 -02:00
pandusonu2 383cd818e9 week-view: remove unused code
Cleaning up the week-view.c file. Removing the previously written code which won't be required.
2016-12-01 23:48:52 -02:00
pandusonu2 c658d030b8 week-grid: created the basic skeleton of week-grid
Created the .h, .c and .ui file of week grid. Also made changes in the Makefile.am for it to get built.
2016-12-01 23:48:52 -02:00
pandusonu2 69cade3d77 week-header: created the basic skeleton of the week-header
Created the .h, .c and .ui file of week header. Also made changes in the Makefile.am for it to get built.
2016-12-01 23:48:52 -02:00
pandusonu2 3656c781da build: move week view to views/ subfolder
Moved the gcal-week-view.{h,c} into views folder. Made changes in the src/Makefile.am and configure.ac to include the views/gcal-week-view.h.
2016-12-01 23:48:52 -02:00
pandusonu2 d31f20ed72 window: updated update_active_date() for week-view
Added the code required to update_active_date for week-view.
2016-12-01 23:48:52 -02:00
pandusonu2 028eb7b994 window: initialize and include week-view in the main window
We add the week-view to the views_stack.
Initialize the GtkWidget week_view in the gcal-window.c
2016-12-01 23:48:52 -02:00
Christian Hergert d29520266d flatpak: add Calendar flatpak manifest to simplify newcomer setup
If using Builder 3.22.3, you can use this manifest to allow building
Calendar against the GNOME master SDK. This means that contributing to
Calendar can be as easy as installing Builder, cloning calendar, set the
manifest build preference,and Build/Run.
2016-11-30 23:58:54 -08:00