Commit Graph
346 Commits
Author SHA1 Message Date
Yash Singh 16bce2425e window: pop up recurrence-dialog only when required
Earlier, the recurrence-dialog would pop up even when user only
wanted to change the recurrence-property of an already recurring
event. This is incorrect behavior.

This patch fixes this issue by making sure that recurrence-dialog
doesn't pop up when the new recurrence-property chosen by the
user is different from what the event already has. In this case,
the user only wants to change the recurence-property of the event
and there's no use of the recurrence-dialog.

https://bugzilla.gnome.org/show_bug.cgi?id=782755
2017-07-13 13:32:55 -03:00
Milan Crha e07590d1cf window: remove refresh timeout on exit
https://bugzilla.gnome.org/show_bug.cgi?id=783441
2017-06-18 14:54:50 -03:00
Yash Singh 5a5dc6716a window: pop up recurrence-dialog right after edit-dialog
The recurrence-dialog opens only if the event to be modified
is a recurring event and only if the user doesn't cancel
the modification in the edit-dialog. If the user presses
'Cancel' in the recurrence-dialog after making modifications
in the edit-dialog, then no changes are applied.

https://bugzilla.gnome.org/show_bug.cgi?id=782755
2017-06-10 09:02:31 -03:00
Yash Singh 9ffa913ad4 manager: pass ECalObjModType to update and remove
Currently, GcalManager always assumes E_CAL_OBJ_MOD_THIS
when modifying or deleting events. Since we're landing
the groundwork for recurrence management, we can't assume
this anymore.

This patch, then, allows GcalManager:modify_event() and
:remove_event() receive the ECalObjModType instead of
assuming E_CAL_OBJ_MOD_THIS. However, this commit does
not add recurrence support yet, and every call to these
functions are still passing E_CAL_OBJ_MOD_THIS.

https://bugzilla.gnome.org/show_bug.cgi?id=782755
2017-05-27 11:36:05 -03:00
Milan Crha a53581ed53 window: connect search view when manager is set
https://bugzilla.gnome.org/show_bug.cgi?id=782475
2017-05-27 11:01:41 -03:00
Georges Basile Stavracas Neto 4323990138 window: fix style 2017-05-16 14:57:17 -03:00
Georges Basile Stavracas Neto 09fe510937 views: use the new GcalClock to redraw
Instead of having each view manage it's own timeout (or
even worse, making GcalWindow manage it), use the newly
introduced GcalClock API to do that.
2017-05-16 14:57:15 -03:00
Kevin Lopez ec3ef0d0a3 search-view: hide if click is performed outside
Result drop down should disappear when any click is performed outside
that drop down.

https://bugzilla.gnome.org/show_bug.cgi?id=74796

https://bugzilla.gnome.org/show_bug.cgi?id=747962
2017-05-04 08:55:50 -03:00
Evgeny Shulgin 7798f38ad9 window: use case-insensitive sorting in the calendar list
g_strcmp0() is used when comparing the display name of the ESource.
This is not a valid sort, because in this case we will get an order
like "a" < "z" < "B" < "Z", but it should be like "a", "B", "z", "Z".

We will use g_ascii_strcasecmp to fix it.

https://bugzilla.gnome.org/show_bug.cgi?id=781231
2017-04-24 09:54:17 -03:00
Georges Basile Stavracas Neto 141f8d87b8 window: attach update date timeout to window
So we can properly remove the timeout source whenever the
window is finalized.

https://bugzilla.gnome.org/show_bug.cgi?id=781431
2017-04-18 09:55:56 -03:00
Mohammed Sadiq 1c9686b937 window: remove GSourceFunc once run
The function is supposed to run once every minute. So after
the function is run, just remove it from main thread. So that it won't
act as a time bomb.

https://bugzilla.gnome.org/show_bug.cgi?id=781081
2017-04-18 07:54:04 -03:00
Georges Basile Stavracas Neto 78eb9a7435 window: add more shortcuts
Add the following new shortcuts:

 - Home: moves to today
 - PageUp: previous week/month/year
 - PageDn: next week/month/year

https://bugzilla.gnome.org/show_bug.cgi?id=740844
2017-04-13 07:32:21 -03:00
Georges Basile Stavracas Neto aa5b963412 view: rework active-date
The current implementation is deficient in many ways, the
worst one being the it relying on GObject semi-synchronous
property emission.

This issue was exposed by the Week view code, where the active
date was updated, but delayed to reach the Week header and some
events were being added ~before~ the active date changed.

With this work, I was also able to figure out a bunch of code
that relied on this (i.e. luck) to work.
2017-04-12 20:51:23 -03:00
Georges Basile Stavracas Neto 7681b7a2da project: document classes 2017-04-12 15:17:17 -03:00
Georges Basile Stavracas Neto 3bbd6b64e4 window: show quick add popover with a nice animation
Instead of plain show and hide it, let's add a smooth
animation.
2017-03-25 17:46:08 -03:00
Georges Basile Stavracas Neto 2544773645 manager: use EDS selectable property to track disabled agendas
This way, we can keep GNOME Calendar and Evolution synchronized.
And we can save some code too.
2017-03-17 21:25:23 -03:00
Georges Basile Stavracas Neto fa7f579592 window: correctly check today for week view 2017-03-17 16:11:42 -03:00
Georges Basile Stavracas Neto 002271ebb1 views: get rid of current date
We can easily track the current date with GDateTime API,
so we don't actually need the current date field.
2017-03-17 15:49:12 -03:00
Georges Basile Stavracas Neto be137fca02 manager: unify completion flags
Instead of having a completion flag for GOA and calendars,
unify both of them and simplify some code.
2017-03-17 12:46:40 -03:00
Georges Basile Stavracas Neto 0d44471546 window: cleanup code 2017-03-17 10:51:37 -03:00
Georges Basile Stavracas Neto cf6cdfd2aa project: use cairo_surface_t when possible
We can avoid an entire roundtrip from surface > pixbuf > surface
if we simply pass the surface to GtkImage. We also save quite
a bunch of debug lines.
2017-03-17 10:14:25 -03:00
Georges Basile Stavracas Neto 478db350e3 project: intrument functions
Add the newly added macros to provide useful tracing
information.
2017-03-17 10:14:25 -03:00
Georges Basile Stavracas Neto d5825bbd35 project: override log domains
This way, we can have more useful debug spils.
2017-03-17 10:14:25 -03:00
Kevin Lopez c3bffd5eeb search-view: no show search view if field is empty
When the search field is empty is not needed show the result drop down.

https://bugzilla.gnome.org/show_bug.cgi?id=747962
2017-03-16 21:32:04 -03:00
Georges Basile Stavracas Neto 8102912541 window: set the correct date range for week view
Previous commits broke the week view's date range (more
than it was already broken). This patch fixes that by
using the correct method to get the week start.

https://bugzilla.gnome.org/show_bug.cgi?id=779967
2017-03-15 00:02:17 +05:30
Yash Singh 6f87ada70d window: set edit dialog's event to NULL after saving
Earlier the app used to crash when a new event was added using the
'Edit Details' buttion/dialog. This was happening because edit dialog's
event was set to NULL before the event was being stored in the calendar
through the 'edit_dialog' and hence the app was crashing.

This patch fixes the above-mentioned issue by saving the event before
setting the edit dialog's event to NULL.

https://bugzilla.gnome.org/show_bug.cgi?id=779733
2017-03-12 12:42:02 -03:00
Georges Basile Stavracas Neto eb10c84811 window: fix warning 2017-03-05 20:36:41 -03:00
Georges Basile Stavracas Neto 0d27d36218 window: correctly subscribe the week view
The week view was being subscribed to the wrong dates,
because the window was miscalculating the start of week
on sundays.

Fix that by properly calculating the start of week offset.
2017-03-05 20:31:34 -03:00
Georges Basile Stavracas Neto 1d8993d450 window: use gcal_clear_datetime
We have our own macro to make the code a little bit
more pleasant to read, let's just use it.
2017-03-05 20:30:08 -03:00
Georges Basile Stavracas Neto aa9b83a92e window: reset edit dialog's event on response
Currently, we keep the to-be-edited event of the Edit
dialog when it sends any response. However, this can
cause issues since we can edit the event, press Esc and
see that the event didn't change but Edit dialog keeps
the changes.

Fix that by always resetting the edited event to NULL
after a response.

https://bugzilla.gnome.org/show_bug.cgi?id=778644
2017-02-20 08:29:59 -03:00
Yash Singh 6ce45743c6 gcal-window: Declare 'view' as type guint32
Earlier 'view' was declared as a 'guint' but was used as 'gint'.
This patch changes the declaration of 'view' to gint32.

https://bugzilla.gnome.org/show_bug.cgi?id=778299
2017-02-09 10:36:05 -02:00
Georges Basile Stavracas Neto 23010afa1a window: fix today button sensitivitiness on week view 2016-12-08 19:20:45 -02:00
Georges Basile Stavracas Neto c66029d49f window: fix week view range 2016-12-01 23:48:54 -02:00
Georges Basile Stavracas Neto 154a01f4c1 week-view, week-grid: various fixed
This commit is a rebase, compile-warning remover and a
misbehaviour fixer too.
2016-12-01 23:48:53 -02:00
pandusonu2 a94a15ebba window: add week-view shortcut
Add the shortcut to switch between views to the week-view
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 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
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 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 cd50bec506 project: fix build warnings
https://bugzilla.gnome.org/show_bug.cgi?id=770466
2016-08-29 23:08:39 -03:00
Lapo Calamandrei 679796b403 window: remove the separator from calendar rows 2016-07-08 20:59:03 -03:00
Georges Basile Stavracas Neto 3d033e1f5f window: toggle calendar visibility when selecting the row
Instead of opening the calendar for editing, toggle its visibility
when clicking the listbox row.
2016-07-08 20:59:03 -03:00
Georges Basile Stavracas Neto d7e082af0f window: add "calendar-color-image" in calendar popover 2016-07-08 16:53:57 -03:00
Georges Basile Stavracas Neto f528a36bdb window: use a circle icon for calendars' popover 2016-07-08 16:17:32 -03:00
Georges Basile Stavracas Neto 9fcb224032 window: avoid a crashing timeout
If the user quickly performs a search, open up the calendar
and close it immediately after, the timeout for showing the
event is mistakenly called after the window is destroyed and
causes Calendar to crash.

Fix that by keeping the source id tracked, and realizing it
on finalize().
2016-06-30 00:01:06 -03:00
Georges Basile Stavracas Neto 1f534aa97e month-view: hold a pointer to the singleton GcalManager
It'll be used in the next commit to save the DnD'ed event.
2016-05-21 18:54:47 -03:00
Georges Basile Stavracas Neto 46deb620e7 app-menu: add a Calendars... item in the app menu
I won't hurt to have 2 ways to access this dialog and,
appearently, the current behavior happens to bother
some users.

https://bugzilla.gnome.org/show_bug.cgi?id=762705
2016-05-20 22:33:35 -03:00
Georges Basile Stavracas Neto 7553d5191f window: change check button state when a source is enabled
Instead of destroying and readding the rows, simply set the
checkbutton's active state when the source is enabled or
disabled.

https://bugzilla.gnome.org/show_bug.cgi?id=766259
2016-05-20 11:41:22 -03:00
Javier Sánchez Ochando 043cca24b6 window: make Today button insensitive when today is visible
When a view shows the current day, the Today button should be insensitive.
This patch makes today button sensitive only when today is not shown.

https://bugzilla.gnome.org/show_bug.cgi?id=747963
2016-03-27 11:26:39 -03:00