Commit Graph
100 Commits
Author SHA1 Message Date
Erick Pérez Castellanos 74c9f009d8 edit-dialog: show events description, minor tweaks 2014-12-04 17:10:48 -05:00
Erick Pérez Castellanos eb436f57db window: update setting when the view changes
Note: Eventually I ended reverting the changes I have made here a few
commits back.
2014-12-04 17:10:48 -05:00
Erick Pérez Castellanos 1c98dd5c04 window: fix update labels on view change
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=739039
2014-12-04 17:10:48 -05:00
Erick Pérez Castellanos e873503744 app: added search-view to window views enum 2014-12-04 17:10:48 -05:00
Erick Pérez Castellanos 852c5eda9f style: remove duplicated '_subscriber' prefix 2014-12-04 17:10:48 -05:00
Erick Pérez Castellanos 9ffabe03ba week-view: fix unref of not added widget
This works in conjunction with code implemented in GcalSubscriber where
the ownership of the event widget passes into the container, so the
container is free to delete it in case it does not fit into the range
represented by the view.
2014-12-04 17:10:47 -05:00
Erick Pérez Castellanos 48bcb57363 week-view: rename internal method
Note: The body of the method was added by mistake on the previous
commit. This commit make the code build again.
2014-12-04 17:10:47 -05:00
Erick Pérez Castellanos dc21b70760 week-view: add subscriber range update
Remove unneeded GcalView deprecated method.
Hook event widget activation
2014-12-04 17:10:47 -05:00
Erick Pérez Castellanos dd2a0da883 misc: fix styling issues and gcc warnings
Update code style
2014-12-04 17:10:47 -05:00
Erick Pérez Castellanos d7d8dd94ee window: update date on view on binding creation
Ensure the views has events widgets in it for the first time the user
clicks on it.
2014-12-04 17:10:47 -05:00
Erick Pérez Castellanos 4bdc696b54 window: update_view when the property changes
Update the value of the internal holder of the property
2014-12-04 17:10:47 -05:00
Erick Pérez Castellanos f988eac12f view iface: remove more unused methods
GcalView::draw_event overlapped a bit with GcalView::will_add_event, so
the same reasons for removing one stand for the other.
GcalView::clear was a hack for the composited GcalDayView which has
gone, and was a bad experiment.
2014-12-04 17:10:47 -05:00
Erick Pérez Castellanos 5422066bb0 view iface: another round at cleaning
Remove unused methods laying there for a long time now.
2014-12-04 17:10:47 -05:00
Erick Pérez Castellanos 8e066850a3 window: added New Event item to menu button
Updated label on app-menu action.
2014-12-04 17:10:47 -05:00
Erick Pérez Castellanos defb99d8a8 window: replace New Event with Today button
As Lapo rightfully explain, providing a button there for creating a new
event is way to prominently and might divert users of the intended click
on a cell behavior to create an event.
New event will be also accessible from the hamburger icon on the left of
the header-bar and Ctrl-N key shortcut.
Also as Lapo suggestion Today button fall better on the header bar than
between the navigation buttons.
2014-12-04 17:10:46 -05:00
Erick Pérez Castellanos 28be6bc581 window: remove FIXME comment
edit_dialog_closed already hides the widget. Reminder is not needed anymore
2014-12-04 17:10:46 -05:00
Erick Pérez Castellanos 18b4ef8186 month-view: remove FIXME
Subscription is already being made. Remove reminder.
2014-12-04 17:10:46 -05:00
Erick Pérez Castellanos 6f2b01018f view iface: remove unused will_add_event
ECalDataModelSubscriber interface notify each view only about the events
beloging to the subscribed range so there's no need of checking if the
event widget will be added.
The safety check of not adding the same widget twice its stil being made
on each GtkContainer::add implementation.
2014-12-04 17:10:46 -05:00
Erick Pérez Castellanos c7e27c7ef4 year-view: makes a descendant of GcalSubscriber 2014-12-04 17:10:46 -05:00
Erick Pérez Castellanos aca1b66743 month-view: makes a descendant of GcalSubscriber
By making GcalMonthView a descendat of GcalSubscriber it gets
implementation for each of the methods on ECalDataModel subscriber and
utomatically gains the functionality of adding and removing events widgets
2014-12-04 17:10:46 -05:00
Erick Pérez Castellanos cfb2c39a7d build: add GcalSubscriber abstract class
GcalSubscriber abstract class is meant for handling the implementation
of ECalDataModelSubscriber interface. The code in each vfunc implemented
is the same for each view, then it makes sense to have a class holding
these implementations and make every views descend from it. This class
sits in the middle between GtkContainer and each of the views.
2014-12-04 17:10:46 -05:00
Erick Pérez Castellanos 605cb7fc25 build: stop complaints from gcc
Gcc complaints this variable may be used uninitialized
2014-12-04 17:10:46 -05:00
Erick Pérez Castellanos 37f0e8ecfd style: add entry class to notes textview 2014-12-04 17:10:46 -05:00
Erick Pérez Castellanos 68a427528c manager: fix remove source from ECalDataModel
When a source is removed should be removed from the internal
ECalDataModel instance as well
2014-12-04 17:10:45 -05:00
Erick Pérez Castellanos 772fa7b586 manager: remove internal date range
This is not needed since the range is kept by ECalDataModel instance
2014-12-04 17:10:45 -05:00
Erick Pérez Castellanos 792c6a9cec manager: remove internal query
The internal query is not needed since that's handled now by the
ECalDataModel instance
2014-12-04 17:10:45 -05:00
Erick Pérez Castellanos 5f8cadb650 manager: fix clients' hash construction
free_manager_unit should have been removed from clients construction previously
2014-12-04 17:10:45 -05:00
Erick Pérez Castellanos 4c0938e5cb manager: free clients' hash-table with g_free
Since ECalDataModel keeps a ref to the connected EClients there's no
need of keeping another and using a custom free function for clients' hash
2014-12-04 17:10:45 -05:00
Erick Pérez Castellanos 08d9cd8e9b theme: remove unneeded rules 2014-12-04 17:10:45 -05:00
Erick Pérez Castellanos 9b281eff69 month-view: implement ECalDataModel::components_modified vfunc 2014-12-04 17:10:45 -05:00
Erick Pérez Castellanos 39318534cd window: fix focus issue when creating event
https://bugzilla.gnome.org/show_bug.cgi?id=738858
2014-12-04 17:10:44 -05:00
Erick Pérez Castellanos 3805496dbb event-widget: fix memory leak.
According to valgrind pango leaks memory when creating a PangoLayout
using gtk_widget_create_pango_layout with a literal string.
2014-12-04 17:10:44 -05:00
Erick Pérez Castellanos c2eda0e446 event-widget: fix memory corruption
GdkRBA should not be allocated using g_new0. Used G_SLICE=debug-blocks
to find it.
2014-12-04 17:10:44 -05:00
Erick Pérez Castellanos cf96da6308 memory: fix memory leaks scattered around 2014-12-04 17:10:44 -05:00
Erick Pérez Castellanos a158fc5757 application: handle ref count of GtkCssProvider correctly
It seems gtk_style_context_add_provider_for_screen increase the ref
count of the GtkCssProvider (maybe copy it to GdkScreen and this isn't
releasing it correctly). We're forcing an _unref to keep the destruction
process working as expected. Previously gtk_css_provider_finalize was
not called at any time on the closing process.
2014-12-04 17:10:44 -05:00
Erick Pérez Castellanos 6c7593dbb1 application: free properties' memory on finalize
Note: GtkCssProvider doesn't finalize correctly yet, but it is correct
to clear the reference belonging to the application.
2014-12-04 17:10:44 -05:00
Erick Pérez Castellanos fb2461b813 application: properly quit application
Fixes destruction process. Calling g_application_quit skip the reference
decreasing process of GApplication and that resulted in a bunch of
_finalize methods not being called. By removing the windows GApplication
finalize properly.
2014-12-04 17:10:43 -05:00
Erick Pérez Castellanos ed32e8d624 application: do not access instance data on _new
The settings setup could be delayed to _init vfunc of the
application.
2014-12-04 17:10:43 -05:00
Erick Pérez Castellanos bddf1d2104 event-widget: fixed memory leak
Each property was owned by the widget, and I was not freeing its memory
at destruction time
2014-12-04 17:10:43 -05:00
Erick Pérez Castellanos d37347418b month-view: implement ECalDataModel::components_removed vfunc
Previous fixes on GcalEventWidget allow to use the recurid in order to
differentiate instances of the same event.
2014-12-04 17:10:43 -05:00
Erick Pérez Castellanos a9b302b205 month-view: fix double free of the passed component 2014-12-04 17:10:43 -05:00
Erick Pérez Castellanos 2b92e0977f event-widget: include recurid on event uuid
By taking recur id into event uuid we are able to properly handle events recurrences
2014-12-04 17:10:43 -05:00
Erick Pérez Castellanos c777d4c852 views: use new comparison function 2014-12-04 17:10:42 -05:00
Erick Pérez Castellanos ab2050b695 month-view: change widget comparison for inclusion
Using new function ensure checking recurid besides everything else
2014-12-04 17:10:42 -05:00
Erick Pérez Castellanos 2a100b5fce event-widget: add method to test equality 2014-12-04 17:10:42 -05:00
Erick Pérez Castellanos cf7e6be614 window: hook GcalView:event-activated signal 2014-12-04 17:10:42 -05:00
Erick Pérez Castellanos 2bb8b6f4c4 month-view: add ECalDataModelSubscriber iface impl
Initial work implementing ECalDataModelSubscriber interface. As
explained before, on each set of GcalView:active-date property the range
the view its subscribing gets updated. Allowing this to obtain
notification through ECalDataModelSubscriber::components_added and
ECalDataModelSubscriber::components_removed vfuncs.
2014-12-04 17:10:42 -05:00
Erick Pérez Castellanos a05d114859 window: add :manager property to construction
Since a pointer to the GcalManager instance it's needed at construction
time and GtkWindow::application property is not set as construction
property. We need to add this property to have a reference to pass to
the instantiated views.
Just like the views, this isn't ref/copied or anything, it's just a
dummy pointer. The application objects is the respnsible of handling
GcalManager instance initialization and destruction.
2014-12-04 17:10:42 -05:00
Erick Pérez Castellanos c55caa89c6 window: removed unused code
Events related signals from GcalManager had been removed previously,
those handlers aren't needed anymore.
Second, there's no need to inform GcalManager of the new range since
every view will do so internally. Also, there's no need of removing
children widgets from the active view, since each view will do so on its
own by implementing ECalDataMoelSubscriber::components_removed vfunc.
2014-12-04 17:10:42 -05:00
Erick Pérez Castellanos 3a151894be views: implemented :manager property
As explained before, this is only intended to keep a reference to the
GcalManager instance of the application.
Misc: fixed some documentation and whitespace issues
2014-12-04 17:10:42 -05:00
Erick Pérez Castellanos 8ba7f431fd view: gained a :manager property
Forcing every GcalView implementing class to keep a reference (actually
it is a simple pointer) to GcalManager instance coming from the application.
2014-12-04 17:10:41 -05:00
Erick Pérez Castellanos e1737a0930 view: added :event-activated signal
Since the events widget are handled entirely inside GcalView
implementations (aka the views), we need a way to hook event-widget
activation with GcalWindow which is handling the dialogs (as expected).
This signal serve as a bridge between those two objects.
2014-12-04 17:10:41 -05:00
Erick Pérez Castellanos 1cb862900e docs: updated HACKING style guide 2014-12-04 17:10:41 -05:00
Erick Pérez Castellanos d5f2b21f37 build: removed unused/faulty code
This cleaning is made in order to merge this branch into master as soon
as possible.
The implementation of GcalDayView is planned to go on the same lines as
GcalWeekView but for two days alone, so much of the code of the latter
could be reused. The approach of using shallow container and kinda
layout manager objects inside GcalDayView didn't worked that well for my
expertise at this time.
2014-12-04 17:10:41 -05:00
Erick Pérez Castellanos bc2a348d0b manager: use ECalDataModel to handle events
Initial work. Code is marked all over the place with comments
GcalManager:set_subscriber will set a view and a new range in the
internal ECalDataModel instance.
More cleaning is needed, along the way unneeded methods will be removed
2014-12-04 17:10:41 -05:00
Erick Pérez Castellanos bed94963d0 build: added ECalDataModel related files
Implements an ECalDataModel object from evolution courtesy of Milan Crha
ECalDataModel hides the details of events retrieving from
calendars. Provides a time range and a subscriber system allowing
objects implements the necessary callbacks to be notified of events
happening on the selected time range.
2014-12-04 17:10:41 -05:00
Erick Pérez Castellanos e175ca2f66 manager: overwrite constructed vfunc is not needed
Since GcalManager does not have any properties or use in way GObject's
initialization system there's no need of having initialization code
split between vfunc _init and vfunc _contructed.
2014-12-04 17:10:41 -05:00
Erick Pérez Castellanos 33235fda67 manager: add back dates marking range 2014-12-04 17:10:41 -05:00
Erick Pérez Castellanos 7b97248c8b window: fix memory leak 2014-12-04 17:10:41 -05:00
Erick Pérez Castellanos b8525fc0f6 app: fix about dialog build 2014-12-04 17:10:40 -05:00
Erick Pérez Castellanos 21356d926d app: update about dialog 2014-12-04 17:10:40 -05:00
Erick Pérez Castellanos 6fa533ba79 manager: improved ESource/EClient connection flow 2014-12-04 17:10:40 -05:00
Erick Pérez Castellanos 503d0345d9 window: restore GcalEditDialog:response handling
Now, this method will be improved later since the modify response will
use some new API
2014-12-04 17:10:40 -05:00
Erick Pérez Castellanos b094f39288 build: remove unused GcalArrowBin 2014-12-04 17:10:40 -05:00
Erick Pérez Castellanos 6d3e30b160 edit-dialog: added stub code
The code added make the dialog show up. Probably anything else works,
but it's start to keep the project building while GcalManager migration
is finished and new GcalEditDialog is built.
2014-12-04 17:10:40 -05:00
Erick Pérez Castellanos 67fc66a8f4 window: migrated to match latest GcalManager API
Reorganized some code as mentioned on HACKING code style file
Removed unused methods
Started migration on new EditDialog flow to match latest GcalManager API
Updated GcalManager:events-modified handler to match lastet GcalManager
API
2014-12-04 17:10:40 -05:00
Erick Pérez Castellanos 65653d16b4 manager: remove get_event* methods
Now those values are accesible from inside GcalEventWidget and
GcalEditDialog using its internals copies of ECalComponent of the event
they represent
2014-12-04 17:10:39 -05:00
Erick Pérez Castellanos b88e6574b4 utils: fixed debug method 2014-12-04 17:10:39 -05:00
Erick Pérez Castellanos 19c3c4e94f event-widget: add method to pass its internal data 2014-12-04 17:10:39 -05:00
Erick Pérez Castellanos 4bd4322cf8 manager: enable sources by default 2014-12-04 17:10:39 -05:00
Erick Pérez Castellanos def5345fce manager: update functions docs 2014-12-04 17:10:39 -05:00
Erick Pérez Castellanos d8cc980a1d month-view: implement GcalView::wil_add_event vfunc 2014-12-04 17:10:39 -05:00
Erick Pérez Castellanos 714e2c93f3 event-widget: set :uuid property from data 2014-12-04 17:10:39 -05:00
Erick Pérez Castellanos 8ca256b130 window: update GcalManager:objects-added handler 2014-12-04 17:10:39 -05:00
Erick Pérez Castellanos bc4663f8c8 event-widget: add internal #ECalComponent object
The changes made here are minimal to get this building. GcalEventWidget
needs a new rethink and rework to accommodate to those new internal
attributes, which replaces some of the old ones.
2014-12-04 17:10:38 -05:00
Erick Pérez Castellanos 76582329ef view: add :will_add_event vfunc and stub methods
Note: this commit probably won't build, but this is the right order of
keeping history.
2014-12-04 17:10:38 -05:00
Erick Pérez Castellanos ef6d464071 manager: migrate :objects-added signal
GcalManager:objects-added signal pass a list of struct containing
ECalComponents for the event widgets. This ECalComponent instance will
be owned and released by the event widget. Look at: GcalEventWidget::finalize
2014-12-04 17:10:38 -05:00
Erick Pérez Castellanos 43eb35fc6e manager: more work into migration
1. Some code style updated
2. Remove unneeded function
2014-12-04 17:10:38 -05:00
Erick Pérez Castellanos 9752b719f0 manager: initial work on new design
GcalManager new design includes:
1. remove deprecated methods from eds
2. remove event cache
3. remove the need for keeping date range logic
4. reorder code according to HACKING code style document

This changes will cause some other changes among the application. While
this commit build just fine, work is missing yet. Next I will fix
GcalEventWigdet and the rest of the affected components.
2014-12-04 17:10:38 -05:00
Erick Pérez Castellanos 000b1a843b docs: update code style 2014-12-04 17:10:38 -05:00
Erick Pérez Castellanos 84ca745eb4 build: fix distcheck 2014-12-04 17:10:38 -05:00
Erick Pérez Castellanos 24ea81583d build: update/clean autotools machinery 2014-12-04 17:10:38 -05:00
Erick Pérez Castellanos 1d95b5e8a9 window: new-event-mode doesn't need CONSTRUCT flag 2014-12-04 17:10:38 -05:00
Erick Pérez Castellanos 27565d487e time: properly set time and timezone 2014-12-04 17:10:37 -05:00
Erick Pérez Castellanos 7ab1af4e96 app: remove unused view type action 2014-12-04 17:10:37 -05:00
Erick Pérez Castellanos 333363205c app: update application menu
Use only application wide actions in the menu, as stated in GNOME HIG
Migrated to use GtkBuilder files
2014-12-04 17:10:37 -05:00
Erick Pérez Castellanos 693b34da28 build: update requirements 2014-12-04 17:10:37 -05:00
Erick Pérez Castellanos 80fdc33e0d window: queue draw on update view 2014-12-04 17:10:37 -05:00
Erick Pérez Castellanos 9afcc4dfa5 nav_bar: remove deprecated margin definitions 2014-12-04 17:10:37 -05:00
Erick Pérez Castellanos 6c893eb333 window: remove geometry related debug sentences 2014-12-04 17:10:36 -05:00
Erick Pérez Castellanos ed9342b237 window: hook key events to search-mode 2014-12-04 17:10:36 -05:00
Erick Pérez Castellanos 1d8cc8a01c manager: use timezone info in time_t conversion 2014-12-04 17:10:36 -05:00
Erick Pérez Castellanos 48f5b36c29 views: ensure initial/final dates have timezones 2014-12-04 17:10:36 -05:00
Erick Pérez Castellanos e06033910c utils: add print_date debug method 2014-12-04 17:10:36 -05:00
Erick Pérez Castellanos db9d2dfa6b week-view: fixed doc sections 2014-12-04 17:10:36 -05:00
Erick Pérez Castellanos f37e2f6416 event-widget: use single click activation
Use pointer cursor
2014-12-04 17:10:36 -05:00
Erick Pérez Castellanos b63c59b1d1 week-view: remove deprecated methods and warnings 2014-12-04 17:10:36 -05:00
Erick Pérez Castellanos ee1d760398 week-view: modernize Gobject boilerplate code 2014-12-04 17:10:36 -05:00
Erick Pérez Castellanos 5ed966dfda week-view: draw header updated 2014-12-04 17:10:35 -05:00
Erick Pérez Castellanos 04dfcd582a week-view: remove navigation controls
This commit just remove the related code. We will make the view work
further along the way.
2014-12-04 17:10:35 -05:00