Commit Graph
169 Commits
Author SHA1 Message Date
Erick Pérez Castellanos e2a2721e9e window: add safety check 2014-12-09 15:37:02 -05:00
Erick Pérez Castellanos 83345b2fb4 app: gained --date option
GcalWindow loads the date from GcalApplication.
2014-12-09 15:36:01 -05:00
Erick Pérez Castellanos db71a1c1f6 window: adjust new-event popover position 2014-12-05 22:30:10 -05:00
Erick Pérez Castellanos da19ffd6ab window: create edit-dialog at construct time
This isn't as dynamical as one was, so create it at construction will
work just fine, and we have the 'if's.
2014-12-05 08:17:30 -05:00
Erick Pérez Castellanos 9188d37e53 manager: removed EVENT_CREATED signal
Since we are opening edit-dialog on event creation directly, we don't
need this notification anymore.
2014-12-05 08:17:30 -05:00
Georges Basile Stavracas Neto e9eca7c86d window: reset title after search 2014-12-05 10:39:28 -02:00
Georges Basile Stavracas Neto 8f4d6be1bf edit-dialog: hide Delete button when creating a new event
Because we don't want to delete an event that is not created
2014-12-05 00:41:34 -02:00
Georges Basile Stavracas Neto 7cd4fd032b window: fixed key handler code
When in GcalWindow::new-event-mode, the key handler cannot redirect input to search bar. This commit fixes it.
2014-12-04 20:57:31 -02:00
Erick Pérez Castellanos 1916986f15 app: active More details button from new event popover
GcalWindow got connected to GcalManager, and pass just created component
to GcalEditDialog
GcalEditDialog gained support to handle component not committed to
manager singleton instance yet.
2014-12-04 17:10:56 -05:00
Erick Pérez Castellanos af3ce14ac2 app: remove GcalNewEventWidget, use GcalWindow ui
Since there will be no behavior on GcalNewEventWidget we can use simple
ui from GcalWindow to accomplish this.
2014-12-04 17:10:55 -05:00
Erick Pérez Castellanos 83eb99efba manager: update retrieve sources API
The move to newer API is to drop GtkListStore dependency on the manager.
2014-12-04 17:10:55 -05:00
Erick Pérez Castellanos 329118079d manager: update GcalManager::remove_event API
Move GcalManager::remove_event API to new style using ESource and
ECalComponent instead of uuid
Update GcalWindow uses of this API
2014-12-04 17:10:55 -05:00
Erick Pérez Castellanos e0ef2892fd window: fixed event removed notification
Moved all this code into ui file.
Removed public API of GcalWindow. In time, if needed by some other
object it can be brought back.
2014-12-04 17:10:55 -05:00
Georges Basile Stavracas Neto 2970729324 window: move arrow buttons to headerbar
This is part of the ongoing efforts to fit Calendar with the latest designs.
2014-12-04 17:10:54 -05:00
Erick Pérez Castellanos 52fc61a1a5 window: set view visible before show it
Since the move into using GtkBuilder's files the views aren't show
automatically. That's why the setting of the view initially was failing.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=741003
2014-12-04 17:10:54 -05:00
Erick Pérez Castellanos 947e23758c misc: whitespace, comments and strings fixed 2014-12-04 17:10:54 -05:00
Erick Pérez Castellanos f3bd29ba9c app: use new search ECalDataModel 2014-12-04 17:10:54 -05:00
Erick Pérez Castellanos 934b1c4be0 window: more code moved into ui file 2014-12-04 17:10:54 -05:00
Erick Pérez Castellanos f8f8991510 window: move more code into ui file
Probably I can load the GMenuModel of the popover directly but I don't
know exactly how, and I've asked already and you can set bindings using
builder's ui file, just like before I don't know how at this time.
2014-12-04 17:10:54 -05:00
Georges Basile Stavracas Neto aa445c33d1 window: remove unneeded set of menu image
This is already done in the builder file.
2014-12-04 17:10:53 -05:00
Georges Basile Stavracas Neto 8b955cae19 window: move to builder's ui file
This is way better than programmatically building the entire window interface.
2014-12-04 17:10:53 -05:00
Georges Basile Stavracas Neto c87c0e2ad0 window: use GDK_EVENT_PROPAGATE to propagate keys
This is good for code legibility and to be safe from any radical API update.
2014-12-04 17:10:53 -05:00
Georges Basile Stavracas Neto c0a16ac06a window: simplified key handler code
Instead of treating every case, use the builtin gtk_search_bar_handle_event function.
2014-12-04 17:10:53 -05:00
Georges Basile Stavracas Neto 97cfe4fd79 window: correctly hide search bar when not in search mode
Search bar shows an annoying border when it should be hidden. This commit fixes it.

Fixes bug #739913.
2014-12-04 17:10:53 -05:00
Georges Basile Stavracas Neto ff6440d206 window: mark headerbar search string as translatable 2014-12-04 17:10:52 -05:00
Erick Pérez Castellanos 184854e318 week-view: take into account GNOME time format
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=703321
2014-12-04 17:10:51 -05:00
Erick Pérez Castellanos 3b9f2aa128 window: set timezone of date when moving to today 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 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 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 80b3e5d3c8 window: fix memory leak 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 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 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 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 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 cf7e6be614 window: hook GcalView:event-activated signal 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 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