From d37e9c275513c06a547c086e792d8d820e6a39d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erick=20P=C3=A9rez=20Castellanos?= Date: Mon, 7 May 2012 23:16:01 -0400 Subject: [PATCH] Docs comments and fixes. --- doc/{Assumptions => Assumptions.markdown} | 6 +- doc/Flows | 30 ------ doc/Flows.markdown | 32 +++++++ doc/Internals | 108 ---------------------- doc/Internals.markdown | 102 ++++++++++++++++++++ 5 files changed, 137 insertions(+), 141 deletions(-) rename doc/{Assumptions => Assumptions.markdown} (51%) delete mode 100644 doc/Flows create mode 100644 doc/Flows.markdown delete mode 100644 doc/Internals create mode 100644 doc/Internals.markdown diff --git a/doc/Assumptions b/doc/Assumptions.markdown similarity index 51% rename from doc/Assumptions rename to doc/Assumptions.markdown index ab164b3b..bc7492a0 100644 --- a/doc/Assumptions +++ b/doc/Assumptions.markdown @@ -1,9 +1,9 @@ -Some words about how do we work so far: +# Some words about how do we work so far # 1. We load calendar sources from Online Accounts. - (So we'll need a view for adding sources, since I refuse + (So we'll need a view for adding sources, since I refuse to read some gconf key from evolution to load some others. Maybe that's will be the way eventually, but well) 2. Using sexp for getting objects between two dates: - (occur-in-time-range? (make-time "20001116T230000Z") (make-time "20001217T230000Z") "America/New_York") + (occur-in-time-range? (make-time "20001116T230000Z") (make-time "20001217T230000Z") "America/New_York") diff --git a/doc/Flows b/doc/Flows deleted file mode 100644 index a929b421..00000000 --- a/doc/Flows +++ /dev/null @@ -1,30 +0,0 @@ -These are some of the flows followed inside the application. - -Adding calendar (gcal_store_add_source) - Sources are added defined by an URI, at least for now. I think there's - been done on improving this, but for now, there and URI defining every - source we're adding. - - - Check if the URI already existed - (here will have to take into account relative and absolute URIs) - - If it isn't new end processing. - - Create the ECalClient, add it to the list. - - Open the ECalClient (e_client_open) - - Retrieve capabilities ? (ask IRC, what's this) //FIXME this wil be later implemented, when needed - - Get Object list based on the existing query - - Create ECalClientView using the existing query. - - Hook to ECalClientView signals - -Setting a view in the main window (MainWindow.set_view) - This will work for setting a new view (the app hasn't instanced a view - of that type yet), or for updating an old view with a new time lapse - - - Update GSettings key for keeping active-view-type - - Create/Update the view with the active date from MainWindow._date - - Retrieve new time range from view. - - Update time range in MainWindow._store (a GcalStore) - - Hook up to signals emitted from GcalStore to read new events - from updated time range - - Hook up to signals emitted from GcalStore to get events - updates lively - - Update MainWindow._view_type diff --git a/doc/Flows.markdown b/doc/Flows.markdown new file mode 100644 index 00000000..0fd691b8 --- /dev/null +++ b/doc/Flows.markdown @@ -0,0 +1,32 @@ +These are some of the flows followed inside the application. + +### Adding calendar (`gcal_store_add_source`) ### +Sources are added defined by an URI, at least for now. I think there's +work been done on improving this, but for now, there and URI defining every +source we're adding. + +* Check if the URI already existed + (here will have to take into account relative and absolute URIs) +* If it isn't new end processing. +* Create the ECalClient, add it to the list. +* Open the ECalClient (`e_client_open`) +* Retrieve capabilities ? (ask IRC, what's this) + //FIXME this wil be later implemented, when needed +* Get Object list based on the existing query +* Create ECalClientView using the existing query. +* Hook to ECalClientView signals + +### Setting a view in the main window (`gcal_main_window_set_view`) ### +This will work for setting a new view (the app hasn't instanced a view +of that type yet), or for updating an old view with a new time lapse + +* Update GSettings key for keeping active-view-type +* Create/Update the view with the active date from + `GcalMainWindow.active_date` +* Retrieve new time range from view. +* Update time range in store (a `GcalStore`) +* Hook up to signals emitted from GcalStore to read active events + from updated time range +* Hook up to signals emitted from GcalStore to get events + updates lively +* Update `GcalMainWindow.view_type` diff --git a/doc/Internals b/doc/Internals deleted file mode 100644 index a25fd12e..00000000 --- a/doc/Internals +++ /dev/null @@ -1,108 +0,0 @@ -Rough description of some internals of Gnome Calendar Application - - -+ mainToolbar object: - - Has 3 states: - 1. Overview - 2. View Event - 3. Edit Event (this one could act as New Event View, or even as New anything view) - - -+ GcalApplication - - Has dconf-key attribute - For keeping the last view and last day selected - - Has command-line option - For opening on the day specified - - Has a GcalManager object - For managingn source and events, and everything else - - -+ GcalManager - - Has a list of GcalStoreUnit, - Containing: - Esource, ECalClient,ECalClientView - - Has a list of ESourceGroup - - Has icaltimetype *initial_date, *final_date - For defining a range to get events from - Could have an active query representing the range (s-exp) - - Has a list of Events in the active range (a list of ECalComponent) - - Emit signals for: - - objects-added (wrapping ECalClientView) - - objects-removed (wrapping ECalClientView) - - events-retrieved (for time range changing) - - Has a GtkListStore with calendar/sources info. - -+ GcalSource - - Has a base_uri - Has a relative uri - Has a color - - -+ GcalView - - Has NavigationPane - Has icaltimetype: selected_date attribute - - Has child classes - 1. GcalDayView - ... - - -+ GcalEvent - - Has one source - - -+ GcalMainWindow - - Design - - +- GtkClutter.Embed::ClutterBox(BoxLayout) ----------------------------------+ - | | - | +- _body_actor::ClutterBox(BoxLayout) --------------------------------+ | - | | | | - | | +- _main_toolbar -----------------------------------------------+ | | - | | | | | | - | | +---------------------------------------------------------------+ | | - | | +- _contents_actor::ClutterBox(BinLayout) ----------------------+ | | - | | | | | | - | | | +- _sources_actor ----------------------------------------+ | | | - | | | | | | | | - | | | +---------------------------------------------------------+ | | | - | | | | | | - | | | +- _notebook_actor ---------------------------------------+ | | | - | | | | | | | | - | | | | | | | | - | | | | | | | | - | | | +---------------------------------------------------------+ | | | - | | +---------------------------------------------------------------+ | | - | | | | - | +---------------------------------------------------------------------+ | - +----------------------------------------------------------------------------+ - - Has an active_view attribute - For keeping the type view is actually showing - - Has views - 1. GcalDayView - 2. GcalWeekView - 3. GcalMonthView - ... - - Has icaltimetype attribute - For keeping actual date - - Has set_view/update_view method - For updating the view content by talking to GcalManager - about events an dates of the view diff --git a/doc/Internals.markdown b/doc/Internals.markdown new file mode 100644 index 00000000..cdc0a7d0 --- /dev/null +++ b/doc/Internals.markdown @@ -0,0 +1,102 @@ +# Internals # + +Description of some internals of Gnome Calendar Application + +* mainToolbar object: + + Has 3 states: + 1. Overview + 2. View Event + 3. Edit Event (this one could act as New Event View, + or even as New anything view) + +* GcalApplication + + * Has dconf-key attribute (To keep the last view and last day selected) + + * Has command-line option (To open on a specified day) + + * Has a GcalManager object (To manage source and events, and everything else) + +* GcalManager + + * Has a list of GcalStoreUnit containing: + 1. Esource, ECalClient,ECalClientView, + 2. `GHashTable` + (representing *active events* of the view) + + * Has a list of ESourceGroup + + * Has `icaltimetype *initial_date, *final_date;` + For defining a range to get events from + Could have an active query representing the range (s-exp) + + * Has a list of Events in the active range (a list of ECalComponent) + + * Emit signals for: + 1. objects-added (wrapping ECalClientView) + 2. objects-removed (wrapping ECalClientView) + 3. events-changed (for time range changing) + This signal is emitted so the views knows they have to update the + GcalEvent widgets they contain. E.g. when you disable/enable a Calendar in + SourcesView widget. + + * Has a GtkListStore with calendar/sources info. + +* GcalView + + * Has NavigationPane + + * Has icaltimetype: `selected_date` attribute + + * Has child classes + 1. GcalDayView + +* GcalEvent + + * Has one source + +* GcalMainWindow + + Design + +
++- GtkClutter.Embed::ClutterBox(BoxLayout) ----------------------------------+
+|                                                                            |
+|  +- _body_actor::ClutterBox(BoxLayout) --------------------------------+   |
+|  |                                                                     |   |
+|  |  +- _main_toolbar -----------------------------------------------+  |   |
+|  |  |                                                               |  |   |
+|  |  +---------------------------------------------------------------+  |   |
+|  |  +- _contents_actor::ClutterBox(BinLayout) ----------------------+  |   |
+|  |  |                                                               |  |   |
+|  |  |  +- _sources_actor ----------------------------------------+  |  |   |
+|  |  |  |                                                         |  |  |   |
+|  |  |  +---------------------------------------------------------+  |  |   |
+|  |  |                                                               |  |   |
+|  |  |  +- _notebook_actor ---------------------------------------+  |  |   |
+|  |  |  |                                                         |  |  |   |
+|  |  |  |                                                         |  |  |   |
+|  |  |  |                                                         |  |  |   |
+|  |  |  +---------------------------------------------------------+  |  |   |
+|  |  +---------------------------------------------------------------+  |   |
+|  |                                                                     |   |
+|  +---------------------------------------------------------------------+   |
++----------------------------------------------------------------------------+
+
+ + * Has an `active_view` attribute + For keeping the type view is actually showing + + * Has views + 1. GcalDayView + 2. GcalWeekView + 3. GcalMonthView + ... + + * Has icaltimetype attribute + For keeping actual date + + * Has `set_view/update_view` method + For updating the view content by talking to GcalManager + about events and dates of the view