Commit Graph
1415 Commits
Author SHA1 Message Date
pandusonu2 188d7742b4 week-view: display events in header
Displaying events in the week-header based on duration of the event.
2016-12-01 23:48:53 -02:00
pandusonu2 16a1c9b55b week-header: corrected the date of start of the week
The active date is taken as the start of the week

Added a function to get the correct date at start of the week.
2016-12-01 23:48:53 -02:00
pandusonu2 2e82f0a2b8 week-header: use GDateTime in place of icaltimetype
Switch to using GDateTime variables in place of icaltimetype variables wherever found.
2016-12-01 23:48:53 -02:00
pandusonu2 4dec80af4f week-header: made the update_headers()
Shifted the code to update labels from the draw() to a separate new function update_headers()
2016-12-01 23:48:53 -02:00
pandusonu2 1122b24216 week-header: modify the draw() to match mockup
Made changes in the draw() to match the mockups.
2016-12-01 23:48:53 -02:00
pandusonu2 9ff7d79d7d week-header: use stack-allocated structure
Using stack allocated structure for certain variable in the draw(). Also disabling the week-grid for now.
2016-12-01 23:48:53 -02:00
pandusonu2 bffaa3bd76 week-view: add the EcalDataModelSubscriber functions
Added the init, add, modified and removed functions of week-view for data model subscriber.
2016-12-01 23:48:53 -02:00
pandusonu2 16fac7c3a0 week-view: make it a template class
Made changes to make the week-view into a template class.
2016-12-01 23:48:53 -02:00
pandusonu2 383cd818e9 week-view: remove unused code
Cleaning up the week-view.c file. Removing the previously written code which won't be required.
2016-12-01 23:48:52 -02:00
pandusonu2 c658d030b8 week-grid: created the basic skeleton of week-grid
Created the .h, .c and .ui file of week grid. Also made changes in the Makefile.am for it to get built.
2016-12-01 23:48:52 -02:00
pandusonu2 69cade3d77 week-header: created the basic skeleton of the week-header
Created the .h, .c and .ui file of week header. Also made changes in the Makefile.am for it to get built.
2016-12-01 23:48:52 -02:00
pandusonu2 3656c781da build: move week view to views/ subfolder
Moved the gcal-week-view.{h,c} into views folder. Made changes in the src/Makefile.am and configure.ac to include the views/gcal-week-view.h.
2016-12-01 23:48:52 -02:00
pandusonu2 d31f20ed72 window: updated update_active_date() for week-view
Added the code required to update_active_date for week-view.
2016-12-01 23:48:52 -02:00
pandusonu2 028eb7b994 window: initialize and include week-view in the main window
We add the week-view to the views_stack.
Initialize the GtkWidget week_view in the gcal-window.c
2016-12-01 23:48:52 -02:00
Mohammed Sadiq 0514d2b3b8 source-dialog: escape string in markup
Calendar name can potentially contain invalid markup texts.
So it have to be escaped to be safe.

https://bugzilla.gnome.org/show_bug.cgi?id=774986
2016-11-30 23:14:13 -02:00
Mohammed Sadiq 6cf5c0317d edit-dialog: check if event is new the right way
Checking if a new event is already having a source succeeds
for some reason (which should actually fail).

But thankfully we already have an event_is_new gboolean flag.
Check the status of that flag and add or update the event.

https://bugzilla.gnome.org/show_bug.cgi?id=771566
2016-11-22 09:54:28 -02:00
Piotr Drąg 4cc24c8c4c Use Unicode in translatable strings
See https://developer.gnome.org/hig/stable/typography.html

https://bugzilla.gnome.org/show_bug.cgi?id=772263
2016-11-11 17:21:19 +01:00
Isaque Galdino 7c01508620 year-view: Not in sync with month-view
When user changes the date in month-view, there is no sync with
year-view. The other way around works just fine, when user selects a
date in year-view, month-view goes to the same date.

Both views share an "active-date", but year-view doesn't obey that
property in some cases. Month-view also doesn't warn when changing that
property.

This commit fixes both views to keep them in sync, updating and using
"active-date" correctly.

https://bugzilla.gnome.org/show_bug.cgi?id=750478
2016-10-05 23:59:33 -03:00
Victor Toso c0ed70f9df e-cal-data-model: fix critical due invalid time range
libecal-CRITICAL **: e_cal_recur_generate_instances_sync: assertion
'icaltime_compare (interval_start, interval_end) < 0' failed

https://bugzilla.gnome.org/show_bug.cgi?id=763047
2016-10-03 19:25:50 -03:00
Victor Toso 7dfadeb56a window: Fix leak of event_creation_data struct
And also be sure to set its pointer to NULL by using g_clear_pointer()

8,830 (24 direct, 8,806 indirect) bytes in 1 blocks are
definitely lost in loss record 17,999 of 18,078
   at 0x4C2FA50: calloc (vg_replace_malloc.c:711)
   by 0x99CE981: g_malloc0 (gmem.c:124)
   by 0x99CEC64: g_malloc0_n (gmem.c:355)
   by 0x44CD43: show_new_event_widget (gcal-window.c:731)
   by 0x976FC57: ffi_call_unix64 (in /usr/lib64/libffi.so.6.0.2)
   by 0x976F6B9: ffi_call (in /usr/lib64/libffi.so.6.0.2)
   by 0x952703B: g_cclosure_marshal_generic (gclosure.c:1490)
   by 0x95258B9: g_closure_invoke (gclosure.c:804)
   by 0x9541D25: signal_emit_unlocked_R (gsignal.c:3635)
   by 0x954105C: g_signal_emit_valist (gsignal.c:3391)
   by 0x954170B: g_signal_emit_by_name (gsignal.c:3487)
   by 0x4324D8: show_popover_for_position (gcal-month-view.c:305)

https://bugzilla.gnome.org/show_bug.cgi?id=772379
2016-10-03 19:25:50 -03:00
Georges Basile Stavracas Neto 6967c520c9 manager: make all calendars offline-sync
This prevents downloading the same calendar (which can be huge)
over and over, saving us some bandwidth.

https://bugzilla.gnome.org/show_bug.cgi?id=764623
2016-10-03 14:10:45 -03:00
Georges Basile Stavracas Neto 3d3dddf815 manager: avoid deep nesting
Use an early return rather than deep nesting to improve the
code legibility.

https://bugzilla.gnome.org/show_bug.cgi?id=764623
2016-10-03 14:10:35 -03:00
Georges Basile Stavracas Neto 7d3cd7f727 month-view: queue redraw on scroll
If we scroll to a month that has no event widget to
display, the redraw is not dispatched and looks like
Calendar is broken.

Fix that by always queuing a redraw.
2016-10-02 08:19:19 -03:00
Georges Basile Stavracas Neto 23cc46a01a event: fix comparison if event is today
Since the end times are open-ended, we have to consider the very second
before the actual end time.

https://bugzilla.gnome.org/show_bug.cgi?id=772104
2016-10-01 20:43:37 -03:00
Georges Basile Stavracas Neto 159da57e46 quick-add-popover: always set seconds to 0
https://bugzilla.gnome.org/show_bug.cgi?id=772104
2016-10-01 20:35:48 -03:00
Georges Basile Stavracas Neto e8dbe48baa quick-add-popover: focus "Create" button after selecting an agenda
So that the keyboard flow is smooth and clean.

https://bugzilla.gnome.org/show_bug.cgi?id=770714
2016-10-01 20:15:14 -03:00
Georges Basile Stavracas Neto 152f6ff8b7 month-view: use G_DECLARE_FINAL_TYPE
Instead of using the old GLib boilerplate code, use the new
utilities and simplify the code a little bit. This also allows
us to remove the private field of month view.
2016-10-01 19:56:01 -03:00
Georges Basile Stavracas Neto a2edfd48b6 subscriber-view: add an autoptr cleanup function
So that we can use G_DECLARE_{FINAL,DERIVABLE}_TYPE() utility macros.
2016-10-01 19:54:54 -03:00
djb 0843f9e93e application: stop force disabling dark theme
https://bugzilla.gnome.org/show_bug.cgi?id=758057
2016-10-01 19:21:55 -03:00
Victor Toso 52a9864cba date-chooser: Fix GDateTime leak
By using finalize and dispose methods and calling the proper free method.

8,806 (64 direct, 8,742 indirect) bytes in 2 blocks are definitely lost in loss record 18,051 of 18,131
   at 0x4C2DB9D: malloc (vg_replace_malloc.c:299)
   by 0x9A0C90E: g_malloc (gmem.c:94)
   by 0x9A26A55: g_slice_alloc (gslice.c:1025)
   by 0x9A26A95: g_slice_alloc0 (gslice.c:1051)
   by 0x99E8DC4: g_date_time_alloc (gdatetime.c:428)
   by 0x99E95C1: g_date_time_new (gdatetime.c:957)
   by 0x99E97B2: g_date_time_new_local (gdatetime.c:1012)
   by 0x4251F4: multi_choice_changed (gcal-date-chooser.c:419)
   by 0x9567F16: g_cclosure_marshal_VOID__PARAM (gmarshal.c:1832)
   by 0x95638B9: g_closure_invoke (gclosure.c:804)
   by 0x957FD25: signal_emit_unlocked_R (gsignal.c:3635)
   by 0x957F05C: g_signal_emit_valist (gsignal.c:3391)

https://bugzilla.gnome.org/show_bug.cgi?id=772272
2016-10-01 19:20:01 -03:00
Victor Toso f713a90ea3 time-selector: Fix GDateTime leak
By using finalize and dispose methods and calling the proper free
methods calls.

8,806 (64 direct, 8,742 indirect) bytes in 2 blocks are definitely lost in loss record 18,367 of 18,534
   at 0x4C2DB9D: malloc (vg_replace_malloc.c:299)
   by 0x9A0C90E: g_malloc (gmem.c:94)
   by 0x9A26A55: g_slice_alloc (gslice.c:1025)
   by 0x9A26A95: g_slice_alloc0 (gslice.c:1051)
   by 0x99E8DC4: g_date_time_alloc (gdatetime.c:428)
   by 0x99E8FA3: g_date_time_from_instant (gdatetime.c:524)
   by 0x99E933F: g_date_time_new_from_timeval (gdatetime.c:647)
   by 0x99E93A5: g_date_time_new_now (gdatetime.c:705)
   by 0x99E93C4: g_date_time_new_now_local (gdatetime.c:728)
   by 0x445BED: gcal_time_selector_init (gcal-time-selector.c:249)
   by 0x9584B32: g_type_create_instance (gtype.c:1866)
   by 0x956BED0: g_object_new_internal (gobject.c:1783)

https://bugzilla.gnome.org/show_bug.cgi?id=772272
2016-10-01 19:20:01 -03:00
Victor Toso 03d1e549f2 event: Fix leak of GdkRGBA
23,776 bytes in 743 blocks are definitely lost in loss record 19,053 of 19,159
   at 0x4C2DB9D: malloc (vg_replace_malloc.c:299)
   by 0x9A0C90E: g_malloc (gmem.c:94)
   by 0x9A26A55: g_slice_alloc (gslice.c:1025)
   by 0x9A26AD7: g_slice_copy (gslice.c:1076)
   by 0x6A97912: gdk_rgba_copy (gdkrgba.c:76)
   by 0x42B35E: gcal_event_set_color (gcal-event.c:750)
   by 0x42BF3E: gcal_event_set_source (gcal-event.c:1204)
   by 0x42AE20: gcal_event_set_property (gcal-event.c:481)
   by 0x956B39B: object_set_property (gobject.c:1423)
   by 0x956BFDF: g_object_new_internal (gobject.c:1817)
   by 0x956CB24: g_object_new_valist (gobject.c:2042)
   by 0x878945D: g_initable_new_valist (ginitable.c:224)

https://bugzilla.gnome.org/show_bug.cgi?id=772272
2016-10-01 19:20:01 -03:00
Victor Toso ea70173cd3 event: Fix leak of uid (string)
28,337 bytes in 415 blocks are definitely lost in loss record 18,432 of 18,507
   at 0x4C2FC47: realloc (vg_replace_malloc.c:785)
   by 0xA88021D: vasprintf (in /usr/lib64/libc-2.24.so)
   by 0x9A593FC: g_vasprintf (gprintf.c:316)
   by 0x9A292F7: g_strdup_vprintf (gstrfuncs.c:514)
   by 0x9A2939C: g_strdup_printf (gstrfuncs.c:540)
   by 0x42A10B: gcal_event_update_uid_internal (gcal-event.c:192)
   by 0x42BF52: gcal_event_set_source (gcal-event.c:1217)
   by 0x42ADCA: gcal_event_set_property (gcal-event.c:480)
   by 0x956B39B: object_set_property (gobject.c:1423)
   by 0x956BFDF: g_object_new_internal (gobject.c:1817)
   by 0x956CB24: g_object_new_valist (gobject.c:2042)
   by 0x878945D: g_initable_new_valist (ginitable.c:224)

https://bugzilla.gnome.org/show_bug.cgi?id=772272
2016-10-01 19:20:01 -03:00
Victor Toso 86d91b7598 event: Fix leak of EcalComponentId
29,717 (8,128 direct, 21,589 indirect) bytes in 508 blocks are definitely lost in loss record 18,380 of 18,445
   at 0x4C2FA50: calloc (vg_replace_malloc.c:711)
   by 0x9A0C981: g_malloc0 (gmem.c:124)
   by 0x9A0CC64: g_malloc0_n (gmem.c:355)
   by 0x5BE3948: e_cal_component_get_id (e-cal-component.c:1477)
   by 0x42A06D: gcal_event_update_uid_internal (gcal-event.c:178)
   by 0x42A64D: gcal_event_set_component_internal (gcal-event.c:310)
   by 0x42AD0F: gcal_event_set_property (gcal-event.c:459)
   by 0x956B39B: object_set_property (gobject.c:1423)
   by 0x956BFDF: g_object_new_internal (gobject.c:1817)
   by 0x956CB24: g_object_new_valist (gobject.c:2042)
   by 0x878945D: g_initable_new_valist (ginitable.c:224)
   by 0x878933A: g_initable_new (ginitable.c:146)

https://bugzilla.gnome.org/show_bug.cgi?id=772272
2016-10-01 19:20:01 -03:00
Victor Toso aee120b898 event: Fix leak of alarm (GHashTable)
105,858 (42,064 direct, 63,794 indirect) bytes in 478 blocks are definitely lost in loss record 19,065 of 19,103
   at 0x4C2DB9D: malloc (vg_replace_malloc.c:299)
   by 0x9A0C90E: g_malloc (gmem.c:94)
   by 0x9A26A55: g_slice_alloc (gslice.c:1025)
   by 0x99F0510: g_hash_table_new_full (ghash.c:711)
   by 0x42B10C: gcal_event_init (gcal-event.c:657)
   by 0x9584B32: g_type_create_instance (gtype.c:1866)
   by 0x956BED0: g_object_new_internal (gobject.c:1783)
   by 0x956CB24: g_object_new_valist (gobject.c:2042)
   by 0x878945D: g_initable_new_valist (ginitable.c:224)
   by 0x878933A: g_initable_new (ginitable.c:146)
   by 0x42B181: gcal_event_new (gcal-event.c:690)
   by 0x4549CA: gcal_year_view_component_added (gcal-year-view.c:1632)

https://bugzilla.gnome.org/show_bug.cgi?id=772272
2016-10-01 19:20:01 -03:00
Victor Toso 705d9809f9 date-chooser: Fix leak of GDateTime
264,180 (1,920 direct, 262,260 indirect) bytes in 60 blocks are definitely lost in loss record 18,487 of 18,509
   at 0x4C2DB9D: malloc (vg_replace_malloc.c:299)
   by 0x9A0C90E: g_malloc (gmem.c:94)
   by 0x9A26A55: g_slice_alloc (gslice.c:1025)
   by 0x9A26A95: g_slice_alloc0 (gslice.c:1051)
   by 0x99E8DC4: g_date_time_alloc (gdatetime.c:428)
   by 0x99E95C1: g_date_time_new (gdatetime.c:957)
   by 0x99E97B2: g_date_time_new_local (gdatetime.c:1012)
   by 0x42481C: calendar_compute_days (gcal-date-chooser.c:150)
   by 0x425F3B: gcal_date_chooser_set_date (gcal-date-chooser.c:743)
   by 0x4251CD: multi_choice_changed (gcal-date-chooser.c:420)
   by 0x9567F16: g_cclosure_marshal_VOID__PARAM (gmarshal.c:1832)
   by 0x95638B9: g_closure_invoke (gclosure.c:804)

https://bugzilla.gnome.org/show_bug.cgi?id=772272
2016-10-01 19:20:01 -03:00
Georges Basile Stavracas Neto 62aa66b8da year-view: implement scrolling to change year
Following the previous work on month view, this commit
implements scrolling capabilities to Year view. We do
this not only with the :scroll-event, but also using the
:edge-overshot signal of GtkScrolledWindow.
2016-10-01 19:16:18 -03:00
Georges Basile Stavracas Neto eb7ad4959b month-view: allow changing months with scrolling
It is very natural and intuitive to try and change the current date
by scrolling. The current implementation of the Month view, however,
blatantly ignores scroll events.

Fix that by hearing to the scrolling events and changing the month
when the scroll is enough.
2016-10-01 19:15:54 -03:00
Georges Basile Stavracas Neto 55b21874a7 event-widget: propagate scrolling event
When the event widget's GdkWindow receives an event scroll,
the event is lost because it doesn't handle it. It should,
however, propagate the scroll event so that the container
is able to properly parse it.

Fix that by making GcalEventWidget listen and propagate
scrolled events.
2016-10-01 18:32:24 -03:00
Georges Basile Stavracas Neto 81b178acff search-view: fix segfault 2016-09-28 21:04:51 -03:00
Georges Basile Stavracas Neto be3833b977 quick-add-popover: only increase day on single day events 2016-09-28 01:11:14 -03:00
Georges Basile Stavracas Neto 653fb86d16 quick-add-popover: fix single all-day events 2016-09-28 01:02:45 -03:00
Georges Basile Stavracas Neto a8f4346e1c edit-dialog: setup the correct label when selecting a calendar
Since now we manually manage the headerbar title and subtitle, setting
them via GtkHeaderBar API won't have any effect.

Fix that by directly setting the subtitle label.

https://bugzilla.gnome.org/show_bug.cgi?id=771565
2016-09-28 00:34:23 -03:00
Georges Basile Stavracas Neto 1e1452810e quick-add-popover: only today events are timed
Everything else is all day.

https://bugzilla.gnome.org/show_bug.cgi?id=770713
2016-09-28 00:29:52 -03:00
Georges Basile Stavracas Neto f1069c96d6 event: implement GInitable
Since the event creation can fail, lets make it a GInitable
so that we can fail during initialization.

https://bugzilla.gnome.org/show_bug.cgi?id=763166
2016-09-28 00:07:28 -03:00
Georges Basile Stavracas Neto e79bdfb933 search-view: fix time label
We want to show "All day" when the event is all day, not
when it ~isn't~ all day.

https://bugzilla.gnome.org/show_bug.cgi?id=771677
2016-09-27 23:16:20 -03:00
Georges Basile Stavracas Neto 81873994da views: protect against invalid drop
If the user tries to drop a e.g. file, GNOME Calendar crashes
immediately.

While the desired behavior would be checking if that's an ics file,
lets just not crash for now.

https://bugzilla.gnome.org/show_bug.cgi?id=771680
2016-09-27 22:41:17 -03:00
Georges Basile Stavracas Neto 10391ae6a9 manager: setup default calendar on event creation
When an event is successfully created, make that the default source.

https://bugzilla.gnome.org/show_bug.cgi?id=771570
2016-09-27 22:35:48 -03:00
Georges Basile Stavracas Neto df13ac2a59 quick-add-popover: track default calendar
Update the selected calendar when the default one changes.

https://bugzilla.gnome.org/show_bug.cgi?id=771570
2016-09-27 22:30:11 -03:00
Georges Basile Stavracas Neto dfdcb7c29c manager: add ::default-calendar property
This property acts as a proxy to ESourceRegistry::default-calendar
and will be used by future patches to track when the default calendar
changes.

https://bugzilla.gnome.org/show_bug.cgi?id=771570
2016-09-27 22:28:59 -03:00