Erick Pérez Castellanos
069ea90d57
manager: implement ::enable/disable methods
2014-12-15 13:38:42 -05:00
Erick Pérez Castellanos
9e42922543
manager: Keep references of the clients internally
...
In order to remove clients from the ECalDataModel without destroying we
need to keep a reference to it.
2014-12-15 13:38:37 -05:00
Erick Pérez Castellanos
2a6b9a31ce
app: fix sigsegv when not getting a date from cli
2014-12-10 01:21:19 -05:00
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
738bb89d94
edit-dialog: fix memory leaks
2014-12-08 12:33:41 -05:00
Erick Pérez Castellanos
e58959d851
e-cal-data-model: fix event with no end-date
...
Google Calendar set no end-date on events with 0 sec duration time. We
need to make the corner case work.
2014-12-08 11:33:44 -05:00
Erick Pérez Castellanos
98e4b44a7d
manager: defer adding client to the internal hash
...
Wait until the client is opened and connected to add it to the internal
hash, so GcalManager::get_sources work properly.
2014-12-08 11:21:14 -05:00
Erick Pérez Castellanos
e62f48bfea
events: fix handling of event with no end date
...
Fix the sigsegv in edit-dialog and event-widgets when there's no
end-date set.
Set a guard in Utils::gcal_dup_icaltime function.
There's still some problems with the events showing the first time but
not anymore.
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=736002
2014-12-08 11:21:14 -05:00
Erick Pérez Castellanos
b5ff5437f6
manager: removed unneeded code, and comments
2014-12-05 22:40:15 -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
314f60e040
about: praise our artists properly
...
Add jimmac to artists list
2014-12-05 16:20:57 -05:00
Erick Pérez Castellanos
fe7b1d942e
app: use new icon
2014-12-05 16:20:16 -05:00
Erick Pérez Castellanos
2853e9a3b2
about: add Lapo to the design/art team
2014-12-05 08:17:30 -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
532a4de02e
event-widget: fixed typo on method name
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
Erick Pérez Castellanos
1f614948a8
style: HACKING updated
2014-12-04 17:31:00 -05: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
b36a390292
manager: updated GcalManager::create_event
...
Move the API to use ECalComponent instead of uids.
2014-12-04 17:10:56 -05:00
Erick Pérez Castellanos
78bced937e
utils: add helper method for component construction
2014-12-04 17:10:56 -05:00
Erick Pérez Castellanos
1c277b99b3
window: connect signal to the right object
...
The ::remove_event handler was not connected to the GtkRevealer so it
was not executing itself when the notification was closed. That caused
the application never removed any events. Fixed now.
2014-12-04 17:10:55 -05:00
Erick Pérez Castellanos
dc941b6a9d
edit-dialog: use reccurrence_id of events
...
When generating the uuid of an event if the event is recurrent, you need
to take into account its rid.
2014-12-04 17:10:55 -05:00
Erick Pérez Castellanos
927233cabb
build: remove GcalNewEventWidget related files
2014-12-04 17:10:55 -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
67732884bb
utils: build an uuid string
...
Use an ESource and ECalComponent to build an uuid string with the format specified
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
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
7fa696c137
manager: added ECalDataModel for search alone
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
Erick Pérez Castellanos
3887951323
month-view: more double to int rounding issues
...
Style fixes
2014-12-04 17:10:52 -05:00
Erick Pérez Castellanos
260237bc85
month-view: style cleaning
2014-12-04 17:10:52 -05:00
Erick Pérez Castellanos
5cbdf28387
month-view: added current day highlight
...
Improved ::draw vfunc code. Use .current class to handle active day styling
2014-12-04 17:10:52 -05:00
Erick Pérez Castellanos
298a0e56c2
Revert: month-view: fix cell rendering glitch
...
This was not the proper fix.
2014-12-04 17:10:52 -05:00
Erick Pérez Castellanos
4425149647
month-view: optimized, organized ::draw vfunc code
2014-12-04 17:10:51 -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
8c5eaa66c8
views: fixed docs style
2014-12-04 17:10:51 -05:00
Erick Pérez Castellanos
c77076c7d6
week-view: added current day highlight
...
Cleaned code a little bit. Removed unnecessary instructions. Added style
class to handle current day.
2014-12-04 17:10:51 -05:00
Erick Pérez Castellanos
746864e7bc
event-widget: fix icons scaling, made 16x always.
...
Previously the scaling was made to the size of the text layout which
caused a blurriness of the icon. Making its size a multiple of 16 made
the icon preserve its sharpness.
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
c526329450
misc: code style and comments removed
2014-12-04 17:10:51 -05:00
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
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
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