Commit Graph
139 Commits
Author SHA1 Message Date
Georges Basile Stavracas Neto 0b07d7d27d manager: improve code
This is a big cleanup commit where I tried my best to
make GcalManager code more structured and readable. This
included both cosmetic and functional changes.
2017-03-17 10:14:25 -03:00
Georges Basile Stavracas Neto 478db350e3 project: intrument functions
Add the newly added macros to provide useful tracing
information.
2017-03-17 10:14:25 -03:00
Georges Basile Stavracas Neto d5825bbd35 project: override log domains
This way, we can have more useful debug spils.
2017-03-17 10:14:25 -03:00
Georges Basile Stavracas Neto 6967c520c9 manager: make all calendars offline-sync
This prevents downloading the same calendar (which can be huge)
over and over, saving us some bandwidth.

https://bugzilla.gnome.org/show_bug.cgi?id=764623
2016-10-03 14:10:45 -03:00
Georges Basile Stavracas Neto 3d3dddf815 manager: avoid deep nesting
Use an early return rather than deep nesting to improve the
code legibility.

https://bugzilla.gnome.org/show_bug.cgi?id=764623
2016-10-03 14:10:35 -03:00
Georges Basile Stavracas Neto f1069c96d6 event: implement GInitable
Since the event creation can fail, lets make it a GInitable
so that we can fail during initialization.

https://bugzilla.gnome.org/show_bug.cgi?id=763166
2016-09-28 00:07:28 -03:00
Georges Basile Stavracas Neto 10391ae6a9 manager: setup default calendar on event creation
When an event is successfully created, make that the default source.

https://bugzilla.gnome.org/show_bug.cgi?id=771570
2016-09-27 22:35:48 -03:00
Georges Basile Stavracas Neto dfdcb7c29c manager: add ::default-calendar property
This property acts as a proxy to ESourceRegistry::default-calendar
and will be used by future patches to track when the default calendar
changes.

https://bugzilla.gnome.org/show_bug.cgi?id=771570
2016-09-27 22:28:59 -03:00
Georges Basile Stavracas Neto 9da6896105 manager: remove unused ::source-activated signal
We're not using it anymore, no need to keep it here.

https://bugzilla.gnome.org/show_bug.cgi?id=768324
2016-09-27 21:29:49 -03:00
Georges Basile Stavracas Neto cd50bec506 project: fix build warnings
https://bugzilla.gnome.org/show_bug.cgi?id=770466
2016-08-29 23:08:39 -03:00
Georges Basile Stavracas Neto 58b193f886 manager: keep the Shell's activated event alive
Currently, the user performs a search in Shell and activates
the result. That should show the edit dialog with the event
being edited, but it's not happening correctly.

Debugging the warnings generated, it was found that the event
was being unref()d and, obviously, that was not what we wanted.

Fix that by only unref()ing the events we don't want, and keeping
the wanted event alive.
2016-06-30 00:01:06 -03:00
Georges Basile Stavracas Neto 6283d9d025 application: update event colors when agenda changes
When we change a source (aka agenda) color, we have to
restart Calendar in order to see it in action.

After the work on GcalEvent, events are now able to track
the agenda's color changes, and the event widget updates
itself in response to that.

The last step was simple notifying GcalApplication when an
agenda changes, so it knows when to recreate the color schemes.
2016-02-14 12:51:32 -02:00
Georges Basile Stavracas Neto 2775012346 manager: use GcalEvent on it's API
To make things consistend and clear, use the
GcalEvent class to handle events.
2016-02-14 12:17:37 -02:00
Georges Basile Stavracas Neto c65fe989fe window: use a GcalEvent to delete events
Instead of using the GcalEventData struct, use the
deleted event. It holds a reference until the event
gets destroyed.

With this commit, we can safely drop GcalEventData
structure, since it's not used anymore.
2016-02-14 12:17:37 -02:00
Georges Basile Stavracas Neto eb360dc809 shell-provider: use GcalEvent instead of event data
Following the sequence of porting commits, make the Shell's
search provider class handle events using GcalEvent classes
instead of the old GcalEventData structure.
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 80b03531f2 manager: turn into a final class 2016-01-19 19:31:04 -02:00
Erick Perez Castellanos e611f87d6a manager: prevent excessive logging.
Skip "Job failed" warning when the error is caused by ouselves cancelling the
thread.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=749337
2015-10-21 08:49:55 -05:00
Erick Perez Castellanos 5f6bd95750 Fix gcal_manager_is_client_writable() semantics
Fix all the calls to it accordingly.
2015-10-07 08:39:51 -05:00
Georges Basile Stavracas Neto 6080b62368 manager: implement ::move method 2015-07-16 00:22:54 -03:00
Georges Basile Stavracas Neto 10e340c20f manager: initialize value
Avoids calling g_free on uninitialized memory,
which results in a nasty segfault.
2015-07-15 21:18:52 -03:00
Milan Crha 6a39614e38 Bug 751206 - correct trust prompt for collection sources
This enables trust prompts for collection sources. Note the changes from the
above cited bug are needed to have this fully and properly working.

https://bugzilla.gnome.org/show_bug.cgi?id=751206
2015-06-20 23:04:10 -03:00
Milan Crha 3e97490e1d Bug 751211 - crash on ESource::read-only property change notification
Two things changes:
a) the actual crash cause in on_client_readonly_changed(), to test whether
   the 'unit' is valid at all before dereferencing it
b) the callback doesn't seem to be disconnected at all, thus added a disconnect
   of it on the source removal as well

The b) might be enough, but just to be sure I included also a).

https://bugzilla.gnome.org/show_bug.cgi?id=751211
2015-06-20 23:00:40 -03:00
Georges Basile Stavracas Neto b7476cb84c manager: only load calendar sources
Do not blindly load every source loaded by the
ESourceRegistry::source-added, since it may be
a non-calendar source.
2015-05-25 14:05:49 -03:00
Georges Basile Stavracas Neto f63541f475 manager: unred GOA client on finalize 2015-05-25 12:36:54 -04:00
Georges Basile Stavracas Neto 18f0026eb7 manager: use goa_client for private field
To not confuse it with the many other clients we
already have here
2015-05-25 12:36:54 -04:00
Georges Basile Stavracas Neto cd872d42ed manager: load GOA client at construction time 2015-05-25 12:35:58 -04:00
Georges Basile Stavracas Neto 27fa9983f4 manager: change ::get_client to ::get_goa_client
This explains better the purpose of the methods, and also
don't collide with the ECalClient prefix we already use.
2015-05-25 12:35:58 -04:00
Georges Basile Stavracas Neto 2b4e46a4b6 manager: notify when sources are enabled/disabled
Add the new signal for GcalManager::source-enabled that
notifies connected widgets about the source change. With
that, we can keep checkboxes syncronizes.
2015-05-25 12:35:58 -04:00
Georges Basile Stavracas Neto 7942677b8e application: move GoaClient to manager 2015-05-25 12:35:56 -04:00
Georges Basile Stavracas Neto c48edbd682 manager: implement GcalManager::query_client_data 2015-05-25 12:35:26 -04:00
Georges Basile Stavracas Neto e5a2361274 manager: implemented GcalManager::get_source method 2015-05-25 12:35:26 -04:00
Georges Basile Stavracas Neto 18fa205916 manager: initial implementation of GcalManager::save_source method 2015-05-25 12:31:07 -04:00
Georges Basile Stavracas Neto c0c5f102c0 manager: fix return type 2015-05-25 12:31:07 -04:00
Georges Basile Stavracas Neto 3070922f5e manager: implement GcalManager::set_default_source method 2015-05-25 12:31:07 -04:00
Erick Pérez Castellanos d49c056d0c manager: squash compilation warning 2015-05-15 23:39:06 -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 b502ccd363 misc: fix styling 2015-02-16 12:54:41 -05:00
Milan Crha b94a804d3a manager: Enable authentication for eds calendars 2015-02-13 13:02:55 -05:00
Milan Crha 560fddeebe manager: port to latest EDS 2015-02-06 14:09:08 -05:00
Erick Pérez Castellanos b203f4da53 manager: enable/disable shell-search model 2015-02-06 09:21:37 -05:00
Erick Pérez Castellanos f0e35881e7 manager: add ::source_enabled API 2015-02-06 09:21:36 -05:00
Erick Pérez Castellanos 023dbb0632 manager: obtain event data from its uuid
This is only enable on the shell search provider model for now. If it
proves useful we can extend it to some other place
2015-02-06 09:21:34 -05:00
Erick Pérez Castellanos 25fd4ab5a9 manager: add shell search provider helpers
Added:
+ :query-completed signal. This would allow to know when the search has
completed and the shell search provider will be able to sort and rank
the results

Added API to:
+ set the query for the shell provider model
+ set the subscription of the view on the shell provider model
+ know when the querying of the views completed on the model and all the
events are available for retrieving
2015-02-06 09:21:34 -05:00
Erick Pérez Castellanos 4527ddfa64 manager: added load_completed public API
The idea is to be able to retrieve the status as well listen to the
signal when needed.
2015-02-06 09:21:33 -05:00
Erick Pérez Castellanos 8f7d931340 manager: add :load-completed signal
:load-completed signals the end of the opening of the sources initially
read from ESourceRegistry.
2015-02-06 09:21:33 -05:00
Erick Pérez Castellanos 1dd50951f6 app: add shell provider implementation skeleton 2015-02-06 09:21:33 -05:00
Erick Pérez Castellanos 01f5276764 manager: retrieve events on a range 2015-01-20 13:11:59 -05:00
Erick Pérez Castellanos 0b2367200b copyright: update year 2015-01-20 13:11:58 -05:00
Georges Basile Stavracas Neto 17e5327cf4 manager: prevent a segfault when opening edit dialog with no sources connected 2015-01-13 17:10:39 -02:00