Commit Graph
2760 Commits
Author SHA1 Message Date
Guenther Wutz 0f6efd8668 utils: reworked uri splitting with help of libsoup
Currently we split a URI string with a Regex which is error prone. As
libsoup already provides a facility to parse a URI into its parts
we should use this instead. Therefore our utility method is not necessary anymore.
2017-12-11 20:08:09 +01:00
Georges Basile Stavracas Neto 4f02a3e97f Merge branch 'add-className' into 'master'
Add a topWindow class with the app's reversed domain name

See merge request GNOME/gnome-calendar!13
2017-12-07 12:50:50 +00:00
alex285 868e0de889 window: add org-gnome-Calendar style class
Currently there is no way for a theme to add some specific styles (eg colors) on Calendar widgets, without upstreaming their CSS.
This commit adds the org-gnome-Calendar CSS class on the main window, as a helper selector. (See bug #227)
2017-12-07 14:34:58 +02:00
Sveinn í Felli 35dc995ff7 Update Icelandic translation
(cherry picked from commit 618c3fb9c045ed53c30ae6d210d0c4cae68b8b9b)
2017-12-07 08:42:32 +00:00
Mohammed Sadiq f1a8aaed5f window: Simplify navigation code
Using <accelerator> in GtkBuilder can simplify lots of C code.
2017-12-06 21:40:15 +05:30
Mohammed Sadiq fd3cb3e9b5 window: Reuse window-state-changed callback
window-state-changed signal is already handled in window_state_method.
It is better not to override it again in class_init function.
2017-12-06 21:40:15 +05:30
Georges Basile Stavracas Neto d3232e664f Merge branch 'wip/sadiq' into 'master'
window: Simplify saving/loading window states

See merge request GNOME/gnome-calendar!9
2017-12-06 13:53:05 +00:00
Mohammed Sadiq 75ad9228f6 window: Simplify saving/loading window states
Follow https://wiki.gnome.org/HowDoI/SaveWindowState

* Use tuples in gsetting schema to save size and position
* Save changes to variable instead of saving to gsettings after every timemout
* Save the changes back to gsettings when the window is finalized.
2017-12-06 19:16:40 +05:30
Georges Basile Stavracas Neto 06f4a5b182 Merge branch 'mcatanzaro/leak' into 'master'
event: Fix a minor leak

See merge request GNOME/gnome-calendar!6
2017-12-06 11:04:02 +00:00
Georges Basile Stavracas Neto 89e90fec6d Merge branch 'wip/mcatanzaro/timezone' into 'master'
Events created in month or year view are created with incorrect time and missing timezone

Closes #168

See merge request GNOME/gnome-calendar!7
2017-12-06 10:45:42 +00:00
Georges Basile Stavracas Neto 276ecef0eb Merge branch 'wip/mcatanzaro/tooltips' into 'master'
event-widget: Fix time in tooltip text

Closes #225

See merge request GNOME/gnome-calendar!8
2017-12-06 10:40:51 +00:00
Michael Catanzaro 0724d4092e event: Save local time correctly
The old code here was not setting tzid correctly. It me took hours to
figure out how to do this, but it turned out to be simple once I found
the right place, buried deep in the e-d-s source code.

Now, ideally we would not change the timezone of the event every time we
edit it. But some big changes in how GNOME Calendar tracks timezone are
going to be required if we do that. In particular, I believe we would
have to stop saving all day events in UTC, and give up on using
GDateTime as we do now, and track timezone completely separately
everywhere using icaltimezone. This is what e-d-s does, and it's
probably what we should be doing too. But that would be a big change.
This commit solves the basic problem, which is to ensure the event is
scheduled for the right time, regardless of timezone.

This finally completely fixes #168.
2017-12-05 21:54:39 -06:00
Michael Catanzaro a7304ed9b0 event: Restore handling of all day events
This brings back the original handling of all day events that we had
before I reverted the previous commit.
2017-12-05 21:54:39 -06:00
Michael Catanzaro 281ed44f1c Revert "event: correctly store timezones"
This reverts commit ce2c955269.

This commit is not right. Lots of code in Calendar relies on being able
to set the timezone of a GcalEvent, and this results in us always
ignoring the timezone set by Calendar in preference to whatever happened
to be in the ECalComponentDateTime previously. That might not be so bad,
but additionally, the time is not adjusted accordingly, so this actually
results in the time of events changing unexpectedly from what Calendar
is trying to set.

The code to explicitly store UTC times for all day events is OK (I
guess) and will be restored in a subsequent commit.
2017-12-05 21:54:39 -06:00
Michael Catanzaro 1d8a164634 event: Fix changing the timezone
g_date_time_equal() corrects for timezone offsets to ensure that, e.g.,
6 AM CST is treated as equal to 12 PM UTC. This means attempts to change
the start and end times of events to the same time in another timezone
are currently failing. We need to remove this attempt at optimization
because it prevents gcal_event_set_timezone() from ever doing anything.
2017-12-05 21:53:00 -06:00
Michael Catanzaro 8740ca2df1 event-widget: Fix time in tooltip text
The tooltips think all events start and end between 1:00 and 1:59,
because we are missing a % in the format string and the I looks like 1.

I like it when bugs turn out to be easy. Fixes #225.
2017-12-05 21:50:32 -06:00
Georges Basile Stavracas Neto bbbabecc58 Merge branch 'master' into 'master'
Add <Ctrl>+f shortcut to activate search bar.

See merge request GNOME/gnome-calendar!5
2017-12-05 23:13:44 +00:00
Michael Catanzaro ce8e8c217e edit-dialog: Fix timezone for events created in month view
In month view, when clicking on a day of the month, every event is
initially an All Day event until the user opens the Edit Details dialog
and unchecks the checkbox. This means that the event is originally
created in UTC time, and needs to be explicitly switched to local time.
2017-12-05 16:28:18 -06:00
Michael Catanzaro 2cca96c349 event: Fix a minor leak 2017-12-05 13:36:29 -06:00
George Willian Condomitti 7c2ca40f0b window: Add <Ctrl>+f shortcut to toggle search bar.
[221]
2017-12-04 16:04:41 -02:00
Kukuh Syafaat 91beda2687 Update Indonesian translation 2017-12-03 08:21:25 +00:00
Georges Basile Stavracas Neto 8c4a0ca613 event-widget: always hide color box on vertical events
Otherwise we get weird borders on Week view.
2017-12-01 11:26:59 -02:00
Georges Basile Stavracas Neto a2b66f212f project: ignore more folders 2017-11-30 14:45:47 -02:00
Georges Basile Stavracas Neto e8468ec0df event-widget: use a 16px rounded rectangle for event colors
This looks better than the thin borders, helps a lot colorblind
people and makes the overall layout just as good.

Ship it!

[#211]
2017-11-30 14:45:47 -02:00
Georges Basile Stavracas Neto 3c6df94be9 Merge branch 'nextcould-translations' into 'master'
project: update Nextcloud in translations

See merge request GNOME/gnome-calendar!4
2017-11-28 23:56:59 +00:00
Valtteri Tastula dd30a6598f project: update Nextcloud in translations
Update "ownCloud" to "Nextcloud" in all translation files.

Related to #163
2017-11-29 01:49:11 +02:00
Günther Wutz fff12ced31 source-dialog: fixed URI label in dialog
Show new the correct URI scheme and port for calendar location in
source dialog. We had a hard coded URI label and always showed https
even when the calendar source used http, and no port. So the showed
label was most of the time wrong.

Related to #41
2017-11-28 18:10:17 -02:00
Georges Basile Stavracas Neto 141e631f22 Merge branch 'issues/220' into 'master'
doc: add an issue template

Closes #220

See merge request GNOME/gnome-calendar!2
2017-11-28 14:41:48 +00:00
Thiago Mendes 641c8c22e1 doc: add an issue template
This adds two new templates whenever an user decides to open a new issue:

Bug.md is a template for new bugs
Feature.md is a template for new features

Both files came from the gnome-todo project.

Fixes: #220
2017-11-27 17:05:55 -02:00
Georges Basile Stavracas Neto 0e1404a11b flatpak: use GitLab url 2017-11-27 13:30:51 +00:00
Georges Basile Stavracas Neto ea8b9e76e7 event-widget: use a stack to handle orientation
Instead of setting the position of the labels in a grid,
use two different grids and switch between them using a
stack.
2017-11-25 11:43:52 -02:00
Georges Basile Stavracas Neto f8ce4937c2 month-view: move variables around
Just to make it clear that these variables are only used when
we really need to reprocess the event widgets.
2017-11-25 11:43:52 -02:00
Georges Basile Stavracas Neto 63f3078a80 week-grid: don't try to optimize allocation
This is making the week grid miss some valid reallocation
cases.
2017-11-25 11:43:52 -02:00
Jeremy Bicha 710b661afe CONTRIBUTING.md: tweak formatting
so that it displays better when viewed on the website
2017-11-24 23:48:36 +00:00
Caio Marcelo de Oliveira Filho ad404c26ed utils: simplify gcal_dup_icaltime
Instead of copying member by member, copy the entire struct contents.
It works as before, but doesn't depend on the member names.

This fixes compiling gnome-calendar with libical 3.0.0, since the
struct icaltimetype had one of the members removed (is_utc).

https://bugzilla.gnome.org/show_bug.cgi?id=790072
2017-11-24 15:13:02 -02:00
Georges Basile Stavracas Neto cbcffe3bcd trivial: remove obsolete TODO 2017-11-21 22:51:57 -02:00
Georges Basile Stavracas Neto e73240bc9a trivial: style fix 2017-11-21 20:13:28 -02:00
Georges Basile Stavracas Neto e34964802c month-view: remove unused variable 2017-11-21 20:13:28 -02:00
Kjartan Maraas 715842ede4 Updated Norwegian bokmål translation. 2017-11-20 12:16:33 +01:00
Georges Basile Stavracas Neto 7e2601e1a2 project: add the right file to the resources 2017-11-19 13:52:39 -02:00
Georges Basile Stavracas Neto a3d1bfcfc5 application: load custom css files
So that theme maintainers can drop their CSS here,
and make Calendar look beautiful everywhere.
2017-11-19 13:42:11 -02:00
Georges Basile Stavracas Neto 41fb5c83d6 theme: fine tune line color 2017-11-19 13:34:23 -02:00
Georges Basile Stavracas Neto bb2566dab8 month-view: hide last row if it's empty
This can make it put up to 5 events in my 1366x768 screen!

\o/
2017-11-19 12:29:29 -02:00
Georges Basile Stavracas Neto 0f1a8c93f2 month-view: fix hiding event widgets when removing 2017-11-19 12:18:32 -02:00
Georges Basile Stavracas Neto 1f1e351c47 month-view: remove useless field
This also fixes the bug where changing the text
direction doesn't reposition the event widgets.
2017-11-19 12:11:02 -02:00
Georges Basile Stavracas Neto 2e750b69e5 month-view: reorganize code
This is another major reorganization of the Month view's
allocation code. The goal is not to reduce the number
of lines, but to make them readable and maintainable.

During this reorganization, multiple bugs that were never
hit were ironed out! That itself would be a major win, but
since the code is actually more readable, we can expect
more improvements from now on.
2017-11-19 12:05:52 -02:00
Georges Basile Stavracas Neto 192e860edc trivial: style fix 2017-11-18 21:57:25 -02:00
Georges Basile Stavracas Neto 9fa9de2df7 month-view: use a custom structure to help multiday allocation
Instead of using 3 different, barely synchronized arrays. This
makes the code easier to read, and is more semantic too.
2017-11-18 21:57:25 -02:00
Marek Cernocky 89d5b4ae4b Updated Czech translation 2017-11-17 21:49:29 +01:00
Günther Wutz 35c8d0d363 event-widget: reposition drag source to initial position 2017-11-16 18:35:25 -02:00