Docs comments and fixes.

This commit is contained in:
Erick Pérez Castellanos
2012-05-07 23:16:01 -04:00
parent 466203d83e
commit d37e9c2755
5 changed files with 137 additions and 141 deletions
+3 -3
View File
@@ -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")
-30
View File
@@ -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
+32
View File
@@ -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`
-108
View File
@@ -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
+102
View File
@@ -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<uid, ECalComponent>`
(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
<pre style="font-family: Mono;">
+- GtkClutter.Embed::ClutterBox(BoxLayout) ----------------------------------+
| |
| +- _body_actor::ClutterBox(BoxLayout) --------------------------------+ |
| | | |
| | +- _main_toolbar -----------------------------------------------+ | |
| | | | | |
| | +---------------------------------------------------------------+ | |
| | +- _contents_actor::ClutterBox(BinLayout) ----------------------+ | |
| | | | | |
| | | +- _sources_actor ----------------------------------------+ | | |
| | | | | | | |
| | | +---------------------------------------------------------+ | | |
| | | | | |
| | | +- _notebook_actor ---------------------------------------+ | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | +---------------------------------------------------------+ | | |
| | +---------------------------------------------------------------+ | |
| | | |
| +---------------------------------------------------------------------+ |
+----------------------------------------------------------------------------+
</pre>
* 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