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
4582ade21d
edit-dialog: sync time and date widgets' sizing
...
So the time widgets don't grow over the date widgets and break
the vertical layout of the edit dialog.
https://bugzilla.gnome.org/show_bug.cgi?id=771440
2016-09-27 22:48:27 -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
Georges Basile Stavracas Neto
97f8979c53
month-view: hide overflow popover on drag and drop
...
When the user starts a drag operation from the overflow popover,
it should hide itself, otherwise it can block dropping the event
below it. Currently, this is not what happens.
Fix that by making the overflow popover a drag and drop target,
and hide it when it detects drag movement.
https://bugzilla.gnome.org/show_bug.cgi?id=771663
2016-09-27 21:48:07 -03:00
Georges Basile Stavracas Neto
a76d40d290
quick-add-popover: only show writable calendars
...
There is no reason to display read-only calendars, since the
user can't add any events on it.
Fix that by only showing writable calendars.
https://bugzilla.gnome.org/show_bug.cgi?id=768324
2016-09-27 21:30:43 -03:00
Georges Basile Stavracas Neto
9da6896105
manager: remove unused ::source-activated signal
...
We're not using it anymore, no need to keep it here.
https://bugzilla.gnome.org/show_bug.cgi?id=768324
2016-09-27 21:29:49 -03:00
Georges Basile Stavracas Neto
3ef45ccf9f
quick-add-popover: focus the summary entry when shown
...
So the user can start typing right away.
2016-09-27 21:20:45 -03:00
Georges Basile Stavracas Neto
96626352d3
month-view: calculate popover events on a per-event basis
...
Since we need to special-case the datetimes to deal with UTC
all day events, using a general local GTimeZone would cause
the cloned all-day events to show wrongly inside the popover.
Fix that by calculating each event's start and end dates according
to the all day events.
https://bugzilla.gnome.org/show_bug.cgi?id=771655
2016-09-27 21:08:09 -03:00
Georges Basile Stavracas Neto
54470d21e9
Bump 3.22.0 release
2016-09-19 16:28:45 -03:00
Georges Basile Stavracas Neto
84bcfdc4bf
Bump 3.21.92 release
2016-09-14 16:44:14 -03:00
Georges Basile Stavracas Neto
e9a5a12d5e
date-selector: remove hack
...
Seems like Gtk+ fixed the positioning code, and we don't
need this hack anymore.
2016-09-14 16:11:33 -03:00
Georges Basile Stavracas Neto
18c5607d87
edit-dialog: fix typo
2016-09-14 16:11:22 -03:00
Georges Basile Stavracas Neto
4e7706847e
project: bump gtk+ min version
...
We use features of the latest release 3.21.6, so make it a
requirement.
2016-09-14 14:16:37 -03:00
Georges Basile Stavracas Neto
08fcf33a28
event-widget: don't DnD read-only events
...
Read-only events can't be moved, so don't allow it.
https://bugzilla.gnome.org/show_bug.cgi?id=771116
2016-09-14 14:10:13 -03:00
Georges Basile Stavracas Neto
7104c95ffb
month-view: fix DnD highlight
...
https://bugzilla.gnome.org/show_bug.cgi?id=771115
2016-09-14 14:01:37 -03:00
Georges Basile Stavracas Neto
f25c3675cd
quick-add-popover: let calendar list be the same height
2016-09-14 13:47:37 -03:00
Georges Basile Stavracas Neto
50aa895347
edit-dialog: limit and ellipsize title
...
So it doesn't grow endlessly.
https://bugzilla.gnome.org/show_bug.cgi?id=771400
2016-09-14 13:18:37 -03:00
Georges Basile Stavracas Neto
faf61122fd
Bump 3.21.91 release
2016-08-30 01:14:42 -03:00
Georges Basile Stavracas Neto
56ae69d6c4
edit-dialog: keep start and end dates synchronized
...
Never let them enter in an invalid state, where the end
date is ahead of the start date.
https://bugzilla.gnome.org/show_bug.cgi?id=770263
2016-08-30 00:30:58 -03:00
Georges Basile Stavracas Neto
3560a9de43
edit-dialog: fix insensitive time choosers
...
They are hidden now, no need to handle the sensitive
state of them as well.
2016-08-30 00:30:58 -03:00
Georges Basile Stavracas Neto
a483af3741
edit-dialog: simplify sensitive state handling
...
Instead of manually handling every single widget, simply
sync the GtkWidget:sensitive property of the topmost box.
2016-08-30 00:30:58 -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
Georges Basile Stavracas Neto
cef7f02a65
date-selector: update text even for today
...
When the date selector is initialized, the text is
blank, even when the date is set for today.
Fix that by updating the text when setting the date.
2016-07-24 20:09:37 -03:00
Georges Basile Stavracas Neto
faf85a7fb0
date-chooser: support hovering days
...
Another fixup in order to make the current date chooser
more streamlined with GNOME Shell's calendar.
2016-07-23 17:47:12 -03:00
Georges Basile Stavracas Neto
93900ae9e9
date-chooser: tweak style
...
To keep the current date chooser in sync with
GNOME Shell, tweak the week names to show only
the first, upcased letter of the week name.
Also, this commit avoids making day number circles
ellipses when the week number is not present.
2016-07-23 17:47:12 -03:00
Georges Basile Stavracas Neto
2744f5acd2
date-selector: bind weekday numbers with desktop
...
The current implementation of the new calendar widget
accepts showing the week numbers in a modern and much
more consistent way.
The behavior, however, is not aligned with the rest of
the application and the desktop, which share a setting
to show or hide the week number.
Fix that by synchronizing the new calendar's week number
property with the specific setting.
2016-07-23 17:47:11 -03:00
Georges Basile Stavracas Neto
459756b2a2
edit-dialog: adapt to better display the date selectors
...
This commit is purely aesthetical, and is here in order to
make the edit dialog look more like the proposed mockups.
2016-07-23 17:47:11 -03:00
Georges Basile Stavracas Neto
bdac4e4c79
date-selector: turn into a entry
...
After making the date selector use the brand
new date chooser widget, it is now time to make
it an entry.
This commit, then turns GcalDateSelector into a
GtkEntry subclass, and add all the plumbing that
is necessary to make it work as such.
As a side effect, this commit adds rudimentary
natural language support for parsing dates.
2016-07-23 17:47:11 -03:00
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
Georges Basile Stavracas Neto
4880c68347
Bump 3.21.4 release
2016-07-20 19:11:50 -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
f8876022e1
edit-dialog: correctly center header button widgets
2016-07-08 16:39:01 -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
c548d580ea
edit-dialog: make alarms' widgets insensitive on read-only
2016-07-06 18:54:59 -03:00
Georges Basile Stavracas Neto
37061a38f4
edit-dialog: improve sizing
2016-07-06 18:54:59 -03:00
Georges Basile Stavracas Neto
5cb2e86fa6
edit-dialog: improve titlebar button
...
Make it insensitive when the event is read-only, and add
a tooltip for users to learn what does the button do.
2016-07-06 18:54:59 -03:00
Georges Basile Stavracas Neto
a2b6b478bb
edit-dialog: fix spurious properties
2016-07-06 18:54:59 -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
5dd456c81d
edit-dialog: move All Day check below time row
2016-07-06 18:54:59 -03:00
Georges Basile Stavracas Neto
b6c19e8399
edit-dialog: group dates and times
...
Instead of start and end, group the selectors by
dates and times.
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
4d30db74f5
edit-dialog: increase summary label width
...
Since we moved the Agenda button to the headerbar,
fill the now free space with the summary label.
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
Georges Basile Stavracas Neto
b0525a54f9
quick-add-popover: make it non-vertically-homogeneous
...
When there are lots of agendas, this would cause a huge
popover.
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
Georges Basile Stavracas Neto
1d7d91cd7c
Bump 3.21.2 release
2016-05-31 12:39:05 -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
Georges Basile Stavracas Neto
6a8a4dfad0
year-view: add hover effect to the navigator
...
The current implementation of the Year navigator gives
absolutely no clue that the days are actually selectable,
which may confuse some users.
A simple way to inform the user that the Year navigator
is actually interactive is the hovering effect.
Fix the lack of feedback by adding the hover effect to the
year navigator.
https://bugzilla.gnome.org/show_bug.cgi?id=762462
2016-05-20 22:09:00 -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
Georges Basile Stavracas Neto
a83e8dd972
year-view: calculate number of rows on-the-fly
...
Instead of adding another field to the structure and
do many pointer lookups, calculate the number of rows
on the fly.
2016-05-19 09:57:42 -03:00
Georges Basile Stavracas Neto
e6c9ecd7eb
month-view: clear the pointer when it's not stored in place
...
It leaks a reference, but only happens for end date.
2016-05-18 11:57:43 -03:00
Georges Basile Stavracas Neto
12e6de6383
month-view: update comments
...
Many things changed during the mean time.
2016-05-18 11:51:10 -03:00