Commit Graph
316 Commits
Author SHA1 Message Date
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
Anwar Sadath 14dc32891b edit-dialog: Respecting GNOME's 12/24 hour format
The edit dialog time picker didnt take into account GNOME's hour format.

The edit dialog time picker didnt take into account GNOME's hour format because the desktop settings clock-format from gcal-window was not passed to gcal-edit-dialog.

Now the data is passed through the function gcal_edit_dialog_time_format and everything works as required.

https://bugzilla.gnome.org/show_bug.cgi?id=703321
2016-03-14 17:40:22 -03:00
Georges Basile Stavracas Neto af6f2141ab window: use g_clear_pointer instead of g_date_time_unref
This would handle the case where the datetime is NULL for us.
2016-02-28 14:13:19 -03:00
Georges Basile Stavracas Neto 079750561a window: remove queued event on finalize
When the user removes an event, we first hide it and,
after a timeout, we remove it. The problem is that if
the user closes the window before the timeout is fired,
the event never gets deleted.

Fix that by deleting the event on finalize if there's
any event queued.

https://bugzilla.gnome.org/show_bug.cgi?id=762284
2016-02-18 15:36:56 -02:00
Georges Basile Stavracas Neto d5cd6c7fc9 window: don't block mainloop when showing dialogs
By using gtk_dialog_run(), we enter in a recursive mainloop
which blocks the parent's one. Because of that, we see weird
things like the quick add popover not still floating around.
2016-02-18 15:28:17 -02:00
Georges Basile Stavracas Neto b1184978b1 window: use GDateTimes to pass the range
Another case where we can improve the code by porting
to GLib's api.
2016-02-18 03:31:35 +01:00
Georges Basile Stavracas Neto 710ee5fc8f window: fix start & end ranges
When we apply a timezone, the ranges change. Therefore, we
should set the timezone to the date itself and then get the
range.
2016-02-17 19:00:07 +01:00
Georges Basile Stavracas Neto 9ff5e05f9c app: automatically load resources from base path
We don't have to load most of the menus we're currently loading
by using the very handy automatic resource loading.

This patch fixup so the app loads resources automagically.
2016-02-16 18:12:18 -02:00
Georges Basile Stavracas Neto bfe18b00df window: fix new event action 2016-02-16 17:53:16 -02:00
Georges Basile Stavracas Neto 9ba89e1db6 window: update calendar colors from popover
When we change the calendar color, everything that represents
this calendar must be updated to match the changes. The calendar
popover, however, wasn't aware of these changes and did not match
updates of calendars.

Fix that by destryoing and readding the row for the given calendar
when it changes.

https://bugzilla.gnome.org/show_bug.cgi?id=762069
2016-02-16 15:09:11 -02:00
Georges Basile Stavracas Neto 7c0e3776e1 window: use GcalQuickAddPopover internally
Saves a lot of code from the window file, and makes
things better. Yay!
2016-02-16 13:37:54 -02:00
Georges Basile Stavracas Neto 3c0c3646f4 utils: use GDateTime to build component
As part of our epic journey to GDateTime, and to
prepare ground for the future work, use GDateTime
as arguments for building the ECalComponent.
2016-02-16 11:54:35 -02:00
Georges Basile Stavracas Neto a5658e3993 window: remove source when finalizing
Sometimes we crash the window right after closing it
because we set a timeout for save_geometry() before
destroying it, and the timeout is called after the
window is destroyed.
2016-02-14 12:17:37 -02:00
Georges Basile Stavracas Neto 2775012346 manager: use GcalEvent on it's API
To make things consistend and clear, use the
GcalEvent class to handle events.
2016-02-14 12:17:37 -02:00
Georges Basile Stavracas Neto c65fe989fe window: use a GcalEvent to delete events
Instead of using the GcalEventData struct, use the
deleted event. It holds a reference until the event
gets destroyed.

With this commit, we can safely drop GcalEventData
structure, since it's not used anymore.
2016-02-14 12:17:37 -02:00
Georges Basile Stavracas Neto e31e6eeac0 edit-dialog: use GcalEvent internally
Instead of using the ESource + ECalComponent combination,
use the new GcalEvent class, which wraps up and simplifies
most of the code.

This commit adds a GcalEditDialog::event property, and
adapts the dialog (and everything dependant on it's code)
to use the GcalEvent class.
2016-02-14 12:17:37 -02:00
Georges Basile Stavracas Neto 0ec0ea8121 event-widget: use GcalEvent internally
This saves a lot of code, and is much saner to maintain.
2016-02-14 12:17:37 -02:00
Georges Basile Stavracas Neto 771d227520 window: turn into a final class 2016-01-19 20:27:21 -02:00
Georges Basile Stavracas Neto abd6fa8b2d window: properly case ::manager property getter
It's a readwrite property, thus it must have an
case PROP_MANAGER set in get_property.
2015-12-31 00:37:36 -02:00
Georges Basile Stavracas Neto 961bf5dc88 window: setup edit dialog from UI file
This commit sets up the edit dialog from the window's ui
resource file, in a series of commits that tries to move
all C code to the UI definitions.

Also, GcalManager is a full GObject class, not a simple
pointer. As such, update the property spec to be of type
object, not pointer.
2015-12-30 17:37:12 -02:00
Georges Basile Stavracas Neto b1540e3f41 window: code cleanup
Remove the unneeded code to manage search bar visibility,
since it is correctly hidden now. Also, clean up some UI
code.
2015-07-15 20:57:12 -03:00
Georges Basile Stavracas Neto 0c1df74735 month-view: add keyboard navigation
This big patch implements keyboard navigation for
Month view and the main window. Also, refactor
some of it's drawing code.
2015-07-15 20:40:55 -03:00
Georges Basile Stavracas Neto 1f666ba405 window: move forward/backward according to locale 2015-06-04 15:44:48 -03:00
Erick Pérez Castellanos d5cc7efcd0 build: fix merge leftovers 2015-05-25 12:43:49 -04:00
Georges Basile Stavracas Neto 87c02b520a source-dialog: hide itself on response event 2015-05-25 12:36:55 -04:00
Georges Basile Stavracas Neto c1b14e48d4 window: comment misleading destruction of calendar row 2015-05-25 12:36:55 -04:00
Erick Pérez Castellanos b04720135f window: sources are unique
There's no need to loop through the rest of the list once the ESource has been
found
2015-05-25 12:36:53 -04:00
Erick Pérez Castellanos 44480da71a window: I rather have these lines
I prefer a clean separation between declarations and code
2015-05-25 12:36:53 -04:00
Georges Basile Stavracas Neto 2b4e46a4b6 manager: notify when sources are enabled/disabled
Add the new signal for GcalManager::source-enabled that
notifies connected widgets about the source change. With
that, we can keep checkboxes syncronizes.
2015-05-25 12:35:58 -04:00
Georges Basile Stavracas Neto c3d34ae149 window: add a nice style to the calendar listbox 2015-05-25 12:35:58 -04:00
Georges Basile Stavracas Neto 3905622420 window: don't set the manager twice 2015-05-25 12:35:57 -04:00