Commit Graph
1975 Commits
Author SHA1 Message Date
Georges Basile Stavracas Neto 802c6948e8 manager: Move GSettings to GcalContext 2019-04-25 16:30:54 -03:00
Georges Basile Stavracas Neto dc9d1d0d9b weahter-settings: Receive a context 2019-04-25 16:30:54 -03:00
Georges Basile Stavracas Neto 14c6544b95 night-light-monitor: Receive a context 2019-04-25 16:30:53 -03:00
Georges Basile Stavracas Neto b98801a621 window: Receive the context
Instead of the manager. This adds multiple lines retrieving
the manager from the context, but throughout the course of
this rework, they will probably be simplified.
2019-04-25 16:30:53 -03:00
Georges Basile Stavracas Neto beeecdf6b3 application: Use the GcalContext internally
Most was left as it is, such as the "manager" property.
2019-04-24 12:55:20 -03:00
Georges Basile Stavracas Neto 9a13fb5c2a context: Introduce GcalContext
This is just the bare minimum of what will become
the main context class of GNOME Calendar. As of
now, nothing creates or uses it.
2019-04-24 11:44:51 -03:00
Michael Catanzaro 6a7cbf2d9f Fixup for the previous commit
e-d-s has added an autoptr type for only one of the two types we use
from e-d-s.

Related to https://gitlab.gnome.org/GNOME/evolution-data-server/issues/73
2019-01-14 13:29:52 -06:00
Michael Catanzaro e6d248699e Fix build against new eds
This build failure was surfaced by
https://gitlab.gnome.org/GNOME/evolution-data-server/issues/73, but
gnome-calendar is at fault for defining autoptrs for types it doesn't
control.
2019-01-14 12:48:26 -06:00
Christopher Davis 5cffec4456 Retire app-menu
For https://gitlab.gnome.org/GNOME/Initiatives/issues/4,
the application menu is being retired, with it's contents
being moved into the in-window primary window.

When removing a menu, the shortcuts for it's actions (if defined
in the menu) are also removed. The "Quit" shortcut is now
defined in src/gcal-window.c.

Related to https://gitlab.gnome.org/GNOME/gnome-calendar/issues/319
2018-11-06 13:29:17 +00:00
Ralph Plawetzki 3f42719ebe Repair application icon
Fixes #306
2018-11-05 23:46:16 +00:00
Georges Basile Stavracas Neto 13a375f483 edit-dialog: fix code style 2018-09-14 20:16:54 -03:00
Georges Basile Stavracas Neto e6d7651c50 edit-dialog: use 'self' instead of 'dialog' 2018-09-14 20:16:54 -03:00
Georges Basile Stavracas Neto a799678f68 event: rewrite timezone support
Now with something that hopefully works.

https://gitlab.gnome.org/GNOME/gnome-calendar/issues/43
https://gitlab.gnome.org/GNOME/gnome-calendar/issues/302
2018-09-14 20:16:54 -03:00
Georges Basile Stavracas Neto 84324b3a6f event: remove unimplemented and unused prototype 2018-09-14 17:08:15 -03:00
Ralph Plawetzki 47cf68e701 source-dialog: Handle 401 status codes
A 401 also tiggers the prompt_credentials dialog

Fixes #287
2018-08-17 13:05:32 +00:00
Georges Basile Stavracas Neto af095fce48 application: Free icaltimetype with g_free
g_date_time_unref is reserved to GDateTime pointers.
2018-07-31 12:35:56 -03:00
Georges Basile Stavracas Neto 474ce8b9da application: Integrate with Night Light
This is mostly a nice touch of integration for when
using the Night Light feature. It can be disabled by
switching the 'follow-night-light' dconf key to false,
but no user interface widgetry was added.
2018-07-29 00:54:02 -03:00
Georges Basile Stavracas Neto 7d99af9c36 window: Simplify window menu
We could have relied on the popover menu automatic
menu handling capabilities from the very beginning.
2018-07-29 00:54:02 -03:00
Georges Basile Stavracas Neto 89e80e688b appmenu: Remove "New Event" entry
The "New Event" menu item is confusing and misleading, since
it is contextless item that has a context-aware action. The
result varies depending on which view you are, but this is in
no way communicated.

So just remove that, and all the GcalWindow API that is not
used anymore altogether.
2018-07-29 00:54:02 -03:00
Georges Basile Stavracas Neto 7e9ef5e055 date-chooser: Ensure selected day is contained in new month
When navigating through the dates of GcalDateChooser, if we
select a day (e.g. 31) that is not contained inside the next
or previous month, Calendar crashes.

Fix that by ensuring that the selected day is always contained
in the new month.

https://gitlab.gnome.org/GNOME/gnome-calendar/issues/284
2018-07-24 19:40:38 -03:00
Elias Entrup ac879dd8ec gcal-edit-dialog: Use event timezone if available
Changing the time of an event with a different
timezone was automatically changing the timezone
to the local one.
This patch checks whether a timezone is already
set and uses that.

Fixes #273
2018-06-15 14:58:10 +00:00
Mohammed Sadiq 1b004fd1d9 window: Remove ununsed macro 2018-06-07 14:40:15 +00:00
Georges Basile Stavracas Neto 34c7a16390 event: really fix multiday check
The time difference should've been greater than
zero since the beginning.
2018-05-05 23:06:14 -03:00
Georges Basile Stavracas Neto d66a76af88 event-widget: React to time changes
When an event is timed, and we move past its end
date and time, the event does not react to that
and continues with the opacity of a regular event.

Fix that by reacting to minute changes.
2018-05-04 21:49:30 -03:00
Georges Basile Stavracas Neto cfa8794313 manager: Move GcalClock to GcalApplication
GcalManager is basically an object that is shared
among classes that need to modify calendars, while
GcalClock is just a wall clock implementation.

Move it to GcalApplication, so that objects without
access to GcalManager can still access the clock.
2018-05-04 21:37:53 -03:00
Georges Basile Stavracas Neto df7216f2f5 month-popover: don't be so small
This commit limits the month popover at least
250px wide. To make it actually usable.
2018-05-01 20:29:57 -03:00
Georges Basile Stavracas Neto 1da2151bb9 month-popover: popdown when adding new event 2018-05-01 20:29:36 -03:00
Georges Basile Stavracas Neto d272bbe3c8 week-view: use the correct inclusive end date
Event dates are, by definition, inclusive on their
start dates, but exclusives on their end dates. That
means that end dates don't actually contain the date
they represent.

Week grid code, however, was considering that end date
as inclusive, and the layout code was miscalculated
because of that.

Fix that by using an inclusive end date when calculating
the event span. Since Calendar does not support subsecond
precision, we do that by subtracting one second from the
exclusive end date.

Issue: #279
2018-05-01 18:50:27 -03:00
Georges Basile Stavracas Neto 93b22f2c43 month-view: reorganize code 2018-05-01 11:06:47 -03:00
Georges Basile Stavracas Neto fd5e6daf13 event-widget: use correct end date on tooltip
The end date of all-day events should have one day decreased,
since the final day is not technically what the user expects
it to be.

Issue: #257
2018-04-30 22:19:13 -03:00
Georges Basile Stavracas Neto b6df8cde7b manager: fix reference management
GcalManager:remove_event() is an asynchronous function
that, by the time the callback is executed, unreferences
the event that is being removed. This implies that, when
the function was called, a reference was taken -- we don't
want the event to be finalized during the operation, after
all.

The problem is that the reference was never taken.

Fix that by properly owning a reference to the event when
removing it, and dropping it when the removal is finished.

Issue: #268
2018-04-30 21:26:03 -03:00
Georges Basile Stavracas Neto 91fdf1783b event: improve documentation for gcal_event_is_multiday
Add some examples, so I can remember them in a few days from
now.
2018-04-30 20:45:01 -03:00
Georges Basile Stavracas Neto bedc98b192 event: fix multiday check
Checking if an event is multiday is currently broken
because g_date_time_difference() returns raw time spans,
and that value means "there is 24h of difference between
these dates", when what we're looking for is "how many
days are between these two dates".

To fix that, use the GDate API instead of GDateTime.
2018-04-30 19:31:01 -03:00
Andrea Azzarone 9d0b44d4e3 view: Auto disconnect weather-changed signal handler
Use g_signal_connect_object in order to auto disconnect the weather-changed
signal handler when the view object is finalized.

https://gitlab.gnome.org/GNOME/gnome-calendar/issues/271
2018-04-11 17:45:02 +02:00
Rafal Luzynski e6483e96e2 utils: Use nominative/genitive month names correctly
These changes are needed since the standalone (nominative) vs. full date
format (genitive) month names support has been introduced in Linux with
glibc 2.27.  They are also supported in *BSD systems.

See also:
https://bugzilla.gnome.org/show_bug.cgi?id=749206
https://sourceware.org/bugzilla/show_bug.cgi?id=10871

https://gitlab.gnome.org/GNOME/gnome-calendar/issues/125
2018-03-05 15:57:03 -03:00
Georges Basile Stavracas Neto a8350555da event: trivial cleanups 2018-02-27 14:57:20 -03:00
Georges Basile Stavracas Neto 3b860ece2e utils: add autoptr support to ECalComponent 2018-02-26 23:18:10 -03:00
Georges Basile Stavracas Neto 1234dd8292 manager: small cleanup
Use g_clear_pointer()
2018-02-23 15:48:15 -03:00
Elias Entrup 5f4c5f5cbe event-widget: Handle NULL in event sorting
The application crashes when e_cal_component_get_last_modified
returns NULL which is used for sorting events.
2018-02-11 23:30:34 +00:00
Iñigo Martínez 11fb4717a2 tests: Fix GCalManager test
The unit test that checks GCalManager test fails due to missing
schemas.

This patch allows schemas to be compiled in the build tree and also
sets the environment variables so tests can found them and run
properly.

Additional code and testing from Mohammed Sadiq <sadiq@sadiqpk.org>
2018-02-11 23:17:12 +00:00
Piotr Drąg d9e306bb86 main: Mark g_set_application_name for translation
According to [1], it should be marked for translation.

[1] https://developer.gnome.org/glib/stable/glib-Miscellaneous-Utility-Functions.html#g-set-application-name
2018-02-05 17:19:41 +01:00
Georges Basile Stavracas Neto c60a881ca3 event: Use G_DEFINE_QUARK 2018-01-30 02:07:47 -02:00
Georges Basile Stavracas Neto 503191377f application: More code style cleanup and reorganization 2018-01-30 01:30:59 -02:00
Georges Basile Stavracas Neto ab259fe57b date-selector: Use parameter specs to declare properties 2018-01-30 01:10:43 -02:00
Georges Basile Stavracas Neto f83826515e edit-dialog: Use parameter specs to define properties 2018-01-30 01:10:25 -02:00
Georges Basile Stavracas Neto f3b4f68bf0 event: Use parameter specs to declare properties 2018-01-30 01:10:08 -02:00
Georges Basile Stavracas Neto 8892c31379 week-view: Remove embarrassing debug message 2018-01-28 12:50:04 -02:00
Georges Basile Stavracas Neto 09b986f526 quick-add-popover: Only remove existing rows
We can receive the source-changed signal on read-only sources,
and these sources have no row associated. Trying to remove the
non-existing row would yield a warning.
2018-01-28 12:45:57 -02:00
Georges Basile Stavracas Neto f698981aa8 application: Improve order of statup
This commit makes sure that logging is set before
actually logging anything. It also sychronizes the
application startup with the manager startup.
2018-01-28 12:39:13 -02:00
Georges Basile Stavracas Neto 194407ecfb views: Instrument and fix reference leaks 2018-01-28 12:08:04 -02:00