Commit Graph
584 Commits
Author SHA1 Message Date
Erick Pérez Castellanos 251e849548 year-view: launch edit dialog on event activate 2014-12-04 17:10:51 -05:00
Erick Pérez Castellanos 2cecaf9337 week-view: add first_weekday setting to view
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=703317
2014-12-04 17:10:50 -05:00
Erick Pérez Castellanos a67635bb05 month-view: add first_weekday settings to view
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=703317
2014-12-04 17:10:50 -05:00
Erick Pérez Castellanos ff73499ab0 utils: retrieve first_weekday from locale
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=703317
2014-12-04 17:10:50 -05:00
Erick Pérez Castellanos 8531fedde9 month-view: optimize set :date property
There's no need to calculate first day of month date twice.
2014-12-04 17:10:50 -05:00
Erick Pérez Castellanos 4d7237b46e window: shorten stack transition duration 2014-12-04 17:10:50 -05:00
Erick Pérez Castellanos c9d347cceb misc: updates to code style and docs 2014-12-04 17:10:50 -05:00
Erick Pérez Castellanos 461057727b window: sync search-view hiding with stack transition
The previous approach was causing an error on the animation code of
GtkStack because the search-view's GdkWindow was banishing before
the end of the animation.
2014-12-04 17:10:50 -05:00
Erick Pérez Castellanos e68ca325b4 views: use GcalEventWidget API for locked sate 2014-12-04 17:10:50 -05:00
Erick Pérez Castellanos 4c98b16c76 event-widget: render locked state of the calendar 2014-12-04 17:10:50 -05:00
Erick Pérez Castellanos b3cab47334 build: remove unused c/css code 2014-12-04 17:10:49 -05:00
Erick Pérez Castellanos f4eaf2217d search: added initial search implementation 2014-12-04 17:10:49 -05:00
Erick Pérez Castellanos 516a611055 window: handle key pressed properly
Before the code handling key presses was an unreadable mess. Now we use
gtk_accelerator_get_default_mod_mask as stated on Gtk documentation.
2014-12-04 17:10:49 -05:00
Erick Pérez Castellanos 2e82b098b3 build: replace Gtk deprecated calls 2014-12-04 17:10:49 -05:00
Erick Pérez Castellanos 80b3e5d3c8 window: fix memory leak 2014-12-04 17:10:49 -05:00
Erick Pérez Castellanos d301a07f4b week-view: increase ref count on parent window
The call to GtkWidget::unrealize was destroying GtkStack window because
of the reference increasing on GcalWeekView when setting the
parent_window as its own.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=739554
2014-12-04 17:10:49 -05:00
Georges Basile Stavracas Neto 8e878f0a06 edit-dialog: show Save label for editable events
Fixes bug #739309.
2014-12-04 17:10:49 -05:00
Georges Basile Stavracas Neto 56e69f7c88 edit-dialog: implements GCAL_RESPONSE_SAVE_EVENT
This patch mainly implements GCAL_RESPONSE_SAVE_EVENT. It updates the event correctly, no matter in which source it is.

Signed-off-by: Georges Basile Stavracas Neto <georges.stavracas@gmail.com>
2014-12-04 17:10:49 -05:00
Erick Pérez Castellanos 5a1f12ad00 event-widget: make more CSS compliant
There are some other changes:
1. Renamed widget class to "event-widget" to avoid collisions
2. Added contrasting event title coloring
3. Use gtk_render functions
2014-12-04 17:10:48 -05:00
Erick Pérez Castellanos 5397a1e4ba edit-dialog: fix wrongly updating ECalComponent
GcalEditDialog::clear_data was clearing the summary on the internal
ECalComponent instance. Blocking signal handler call allow to clear the
widget without clearing the component.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=739307
2014-12-04 17:10:48 -05:00
Erick Pérez Castellanos de90213fd7 month-view: fix cell rendering glitch
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=739294
2014-12-04 17:10:48 -05:00
Georges Basile Stavracas Neto b8a4812f3b edit-dialog: don't keep an internal cached version of the summary
This is part of the Edit dialog's redesign.

Fixes bug #739268.
2014-12-04 17:10:48 -05:00
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