Commit Graph
1337 Commits
Author SHA1 Message Date
Georges Basile Stavracas Neto 4ef9f75dfb date-selector: move to use the new date chooser
After adding the new GcalDateChooser widget, change the
current date selector to use it as the internal widget
of the popover.

The next logical step is turning GcalDateSelector into
an entry.
2016-07-23 17:47:11 -03:00
Georges Basile Stavracas Neto c2dca8a3dc date-chooser: add date chooser widget
This is mainly a copy-paste from an old branch authored
by Matthias Clasen. The code style was updated to match
Calendar's one, and the theming was improved a little bit.
2016-07-23 17:47:11 -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 33d9901c49 search-view: don't subscribe to invalid dates 2016-07-08 20:53:56 -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 243c8b75da quick-add-popover: add "calendar-color-image" css class in rows 2016-07-08 16:42:23 -03:00
Georges Basile Stavracas Neto cb7f195966 utils: add "calendars-list" css class to the container
Following the previous commit, add the CSS class to the GtkBox
that is the container of the calendars.
2016-07-08 16:27:49 -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 a1882ff25e utils: add calendar-color-image css class to popover icons 2016-07-08 16:16:19 -03:00
Georges Basile Stavracas Neto a5634dc5fb edit-dialog: put the time selectors in a revealer 2016-07-06 18:54:59 -03:00
Georges Basile Stavracas Neto 025d931da8 edit-dialog: use circular icons for sources
They look nicer in the current UI.
2016-07-06 18:54:59 -03:00
Georges Basile Stavracas Neto 9e17710052 edit-dialog: implement moving events between sources
After adding the button in the headerbar, it is natural to
bring back the ability to move events between sources.

This commit finally includes the usage of GcalManager:move_event_to_source
function, which was implemented ages ago.
2016-07-06 18:54:59 -03:00
Georges Basile Stavracas Neto bbcf20cf44 edit-dialog: add a button in the headerbar
This button will be used to select the new source of the event.
2016-07-06 18:54:59 -03:00
Georges Basile Stavracas Neto 7844122dd2 event-widget: avoid crash when retrieving the DnD pixbuf
Since we're storing the GdkWindow relative to the event widget,
it's usually safer to create a pixbuf of the widget *after* it's
drawn, and not while it's being drawed.

This commit moves the pixbuf retrieval code to the draw-begin
implementation, so we only create the pixbuf when actually
using it.
2016-07-06 15:57:19 -03:00
Georges Basile Stavracas Neto c406b604e2 edit-dialog: fix Reminders dim label size 2016-07-06 12:38:09 -03:00
Georges Basile Stavracas Neto dc1f742cfe edit-dialog: make buttons sensitive when removing alarm 2016-07-06 03:13:38 -03:00
Georges Basile Stavracas Neto db2983be61 edit-dialog: sort alarms by relative date 2016-07-06 03:01:56 -03:00
Georges Basile Stavracas Neto 9723d60233 edit-dialog: make already-added alarms' buttons insensitive
Since we only support 1 alarm per time, we have to check and
eventually make insensitive the buttons related to the alarms.
2016-07-06 03:01:56 -03:00
Georges Basile Stavracas Neto 2e7d17fe63 edit-dialog: implement add alarm popover
The new popover handles all the possible alarms we support.
2016-07-06 03:01:56 -03:00
Georges Basile Stavracas Neto 2a18761908 edit-dialog: show available alarms
This commit introduces the ability in Edit dialog to
display the currently available alarms, as well as basic
editing of these alarms.

Currently, only removing the alarms and modifying it to
play a sound or not is available. The following up commit
will add the ability to add new alarms.
2016-07-06 03:01:56 -03:00
Georges Basile Stavracas Neto 19d68573dd utils: move utility method to get alarm's minutes 2016-07-06 03:01:56 -03:00
Georges Basile Stavracas Neto f518cba8e4 edit-dialog: simplify action handling
Instead of keeping a ref to the GcalEditDialog::select-calendar
action, use the builtin facilities and simplify the action
handling by using a const structure.

This is also a preparation for the next few commits where alarms
will be added.
2016-07-06 03:01:56 -03:00
Georges Basile Stavracas Neto 1ddc690810 event: add support for alarms
This commit prepares GcalEvent to handle alarms. Basically,
it is now able to load the current alarms of an event, and add
and remove alarms for them.
2016-07-06 03:01:56 -03:00
Georges Basile Stavracas Neto dfdaa3a590 year-view: simplify empty sidebar list calculation 2016-07-05 23:55:33 -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 58b193f886 manager: keep the Shell's activated event alive
Currently, the user performs a search in Shell and activates
the result. That should show the edit dialog with the event
being edited, but it's not happening correctly.

Debugging the warnings generated, it was found that the event
was being unref()d and, obviously, that was not what we wanted.

Fix that by only unref()ing the events we don't want, and keeping
the wanted event alive.
2016-06-30 00:01:06 -03:00
Georges Basile Stavracas Neto 33c7031164 project: remove GbScrolledWindow
The max-content-height property was ported to GtkScrolledWindow,
which means we don't have to use a custom class anymore.
2016-06-17 18:18:38 -03:00
Isaque Galdino 3dbe4addeb year-view: Popover position
Year view was placing popover to mouse click (x,y) position. That was a
little odd because sometimes popover was placed above the selected day.

This patch address that by placing popover always out of the day box.

When selecting the whole month or more than one day, popover will also
be placed out of the month box. reducing the chance to cover selected
days.

https://bugzilla.gnome.org/show_bug.cgi?id=743306
2016-06-17 18:00:32 -03:00
Georges Basile Stavracas Neto de921ff54b source-dialog: open file when response is ok
The source dialog currently skips the file selected by
pressing the Open button.

Fix that by also considering the response of the dialog.
2016-06-01 11:59:22 -03:00
Iain Lane 9b358eb0ba year-view: Use the new schema from gsettings-desktop-schemas
So that we don't have to depend on GNOME shell.

https://bugzilla.gnome.org/show_bug.cgi?id=764001
2016-05-31 14:18:13 -03:00
Georges Basile Stavracas Neto 82b5953b76 month-view: fix invalid cell calculation 2016-05-21 19:15:14 -03:00
Georges Basile Stavracas Neto 1c90791d3b year-view: fix hover & dnd drawing on RTL locales 2016-05-21 19:06:15 -03:00
Georges Basile Stavracas Neto 5960a45d00 month-view: consider the days delay when dealing with the cell
The cell number does not consider the days delay, thus is not
the current day. To find the current day, we must remove the
days delay.
2016-05-21 19:02:39 -03:00
Georges Basile Stavracas Neto 88730dbafb year-view: don't render DnD when it leaves 2016-05-21 18:54:47 -03:00
Georges Basile Stavracas Neto 82c7918b15 year-view: implement the ::drag-drop operation
This magical commit finally implements the Drag and Drop
on Year view, enabling users to drop events from the sidebar
to the year navigator.
2016-05-21 18:54:47 -03:00
Georges Basile Stavracas Neto 44f5cbe607 year-view: render DnD selector on hover
This commit adds the ability to render a DnD square
to give visual feedback for the hover operation.
2016-05-21 18:54:47 -03:00
Georges Basile Stavracas Neto c7d92e9f37 year-view: make the year navigator a DnD dest
This way, we can drop events at the widget.
2016-05-21 18:54:47 -03:00
Georges Basile Stavracas Neto c2bf75d151 month-view: improve rendering of DnD target
This commit makes the lines always 1px.
2016-05-21 18:54:47 -03:00
Georges Basile Stavracas Neto 220d7c88bd month-view: save the event when dragged and dropped
This magical commit finally implements the Drag n' Drop
feature for Month view by changing the start and end dates
of the events according to the cell where the user drops
the event.
2016-05-21 18:54:47 -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 982b7da02b month-view: draw a drop target background
When dragging an event, it is very important to have
a visual feedback of the possible target areas.

As such, add a gtk_render_background() call to render
the drag cell's background.
2016-05-21 18:54:47 -03:00
Georges Basile Stavracas Neto d0821d7e4d month-view: set as a drag destination
The month view will be the first one to receive
support for drag and drop. As such, it must be
set as a drag destination.
2016-05-21 18:54:47 -03:00
Georges Basile Stavracas Neto dc65a9e906 event-widget: use a gint for date compare 2016-05-21 18:54:47 -03:00
Georges Basile Stavracas Neto b90d356c7b event-widget: set a proper icon for drag n' drop 2016-05-21 18:54:47 -03:00
Georges Basile Stavracas Neto f980bbc638 event-widget: setup itself as a drag source
Ideally, every single view will support drag and drop. So
let's just assume that and make the event widget set itself
as a drag source, and let each view set itself as a drag
target.
2016-05-21 18:54:47 -03:00
Georges Basile Stavracas Neto f3da1b2cec subscriber-view: iter the single day table
When we modify an event, the start date may change
and there is no way to retrieve it back. Since we're
relying on the start date to get the cell number and,
remove the widget, it leads to a crash because the
widget is not removed.

Fix that by brute-forcely search the widget in the
correct table.
2016-05-21 18:53:37 -03:00
Georges Basile Stavracas Neto 96de78d9af trivial: style fix 2016-05-21 18:53:16 -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 9c150de822 year-view: don't cancel selection while dragging
This breaks the users' expectations that the navigator
will keep the selected dates. The old behavior was hazardous
for users with disabilities.

https://bugzilla.gnome.org/show_bug.cgi?id=762462
2016-05-20 22:18:34 -03:00