Commit Graph
2178 Commits
Author SHA1 Message Date
Georges Basile Stavracas Neto 5e0d4018f4 event: add a wrapper around events
Instead of relying on confusing structures, raw data
and direct access to components, add a wrapper for
events.
2016-02-14 12:17:37 -02:00
Georges Basile Stavracas Neto 9515c5e627 build: alphabetically sort source files 2016-02-12 15:17:48 -02:00
Isaque Galdino 9646d4f543 year-view: Fix for 01-01-2017 date
Previous fix was considering Jan 1st and Dec 31st to find the week
number, using ISO 8601 standard, and that was causing an issue with some
dates like Jan 1st, 2017 which was displaying week# 52 instead of
week #1.

The issue happened because ISO 8601 always consider Monday as the first
weekday, so as Jan 1st, 2017 is a Sunday, it' still considered week# 52
and not week# 1.

After checking GtkCalendar code I noticed it uses the same ISO 8601
standard but instead of using Jan 1st or Dec 31st, it always get the
week number based on the last day of that week, taking account if the
week starts on Sunday or Monday, depending on the locale. In our
example, using a calendar based on Sunday, Jan 1st, 2017 is the first
day of the week and Jan 7th, 2017 is the last one. Therefore I changed
week number code to always use the last day of the week.

https://bugzilla.gnome.org/show_bug.cgi?id=757622
2016-02-02 14:44:04 -02:00
Cosimo Cecchi f4d015759d Rename icon to match app ID
In preparation for xdg-app.

https://bugzilla.gnome.org/show_bug.cgi?id=761375
2016-01-31 15:13:55 -06:00
Isaque Galdino e8c75cea32 year-view: Added visual clue for days with events
Year view didn't have hints for days with events and this feature was
requested to be added to gnome-calendar.

This is an old request but in the past gnome-design team though it would
be better to keep the layout simple without hints for days with events.
Now with the changes in gnome-shell calendar and in order to keep them
in sync, this feature was added to gnome-calendar.

In order to implement this code we had to add a few css styles and a
code to add a small circle below everyday with events. Although
gnome-shell calendar uses an svg image with a 3x3 dot, we chose to use a
pango function to draw the dot.

https://bugzilla.gnome.org/show_bug.cgi?id=743317
2016-01-29 22:51:12 -02:00
Georges Basile Stavracas Neto ca327e2ce5 time-selector: turn into a final class 2016-01-19 21:12:19 -02:00
Georges Basile Stavracas Neto 65cfea9609 search-view: turn into a final class 2016-01-19 20:55:17 -02:00
Georges Basile Stavracas Neto f9101b9bc8 year-view: turn into a final class 2016-01-19 20:45:05 -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 50ce09617e source-dialog: remove private field 2016-01-19 20:03:19 -02:00
Georges Basile Stavracas Neto 80b03531f2 manager: turn into a final class 2016-01-19 19:31:04 -02:00
Georges Basile Stavracas Neto f001fb48b7 event-widget: turn into a final class 2016-01-19 19:12:13 -02:00
Georges Basile Stavracas Neto 5fe6578b16 date-selector: turn into a final class
There is no subclass of GcalDateSelector, and
actually it isn't needed. So, turn the class
into a final class and get rid of the needless
private field.
2016-01-19 18:54:29 -02:00
Georges Basile Stavracas Neto adc83a7a93 application: turn into a final class
GcalApplication is not derivable, so turn it
into a final class and get rid of the private
field.
2016-01-19 18:43:11 -02:00
Isaque Galdino c4853dd855 gnome-calendar: Fix week #s in year view
Changed year view to use ISO 8601 standard to display the week #s
correctly when showing first and last weeks.

Year view was always starting week #s as 1, based on Jan 1st, and it
kept count the weeks until Dec 31st. But according to ISO 8601 standard,
that's not always true, i.e. Jan 1st 2016, is still in the 53th week of
2015, while Dec 31st 2014 is already in the 1st week of 2015.

Now the code is using ISO 8601 GDate function to get the correct week
number for the first and the last weeks of the year only. Other weeks
continue to use the same logic.

More about ISO 6801: https://en.wikipedia.org/wiki/ISO_8601#Week_dates

https://bugzilla.gnome.org/show_bug.cgi?id=757622
2016-01-19 18:09:30 -02:00
Georges Basile Stavracas Neto 7b28416361 month-view: make lines stronger
The current lines are very light and people
with visual issues may not find them easy.

To fix that, make these lines slightly stronger,
enough to make them clearly visible.

https://bugzilla.gnome.org/show_bug.cgi?id=758679
2016-01-12 17:00:07 -02:00
Georges Basile Stavracas Neto df9af0e8f9 month-view: remove leftover
This was supposed to be removed, since there's no
use in setting a state and immediately restore the
context.
2016-01-04 22:24:10 -02:00
Georges Basile Stavracas Neto 6de0376ab6 month-view: fix warnings
We were calling gtk_style_context_get() with a state
different than that of the style_context, which yiels
warnings.

Fix that by saving, setting the flag and restoring the
context.
2016-01-04 16:50:47 -02:00
Georges Basile Stavracas Neto 21f3ed1ef1 project: more css names fixups 2016-01-04 16:50:46 -02:00
Georges Basile Stavracas Neto 5b8a26ec71 year-view: port to css nodes
Mainly by removing the gtk_widget_get_state_flags()
calls.
2016-01-04 16:50:40 -02:00
Georges Basile Stavracas Neto ef9868a0d7 event-widget: port to css nodes
This commit add a css name, and use the style
context's state flags as well.
2016-01-04 16:27:40 -02:00
Georges Basile Stavracas Neto 8b1054f638 month-view: set a css name
This will add a CSS Node in the style context,
and keep Calendar in sync with latest gtk+
upstream changes.
2016-01-04 16:27:40 -02:00
Georges Basile Stavracas Neto 2280a74856 edit-dialog: notify property before manually check sensitivity
When we check start & end time selector's sensitivity before
notifying the property change, the check is overriden by the
binding.

Fix that by performing the checks after the notification of the
property change.
2016-01-04 02:18:19 -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 13c4145507 edit-dialog: add ::writable and ::manager properties
By using these properties, we gain the possibility to
bind them to the widgets and save some needless code.

This commit adds GcalEditDialog::writable and ::manager
properties. Other needed properties will be eventually
added in the subsequent commits.
2015-12-30 17:34:29 -02:00
Georges Basile Stavracas Neto de207f9c63 edit-dialog: move bindings to UI file
We don't need to manually bind these properties in
the source code if we can make it on the UI files.
2015-12-30 15:05:20 -02:00
Georges Basile Stavracas Neto 4d19950c2c edit-dialog: cosmetic changes
Fixes some alignment issues, as well as some
needless checks. Also, use some handy glib
functions to shrink the code even more.
2015-12-30 14:59:16 -02:00
Georges Basile Stavracas Neto 3396291e3e edit-dialog: remove needless casts
These widgets are already stored as GtkWidgets,
and there is no need to do these casts.
2015-12-30 14:40:34 -02:00
Georges Basile Stavracas Neto 6f1eb7ca9d edit-dialog: turn into a final class
This commit updates GcalEditDialog's code for
it to be a final class. As such, we don't need
the GcalEditDialogPrivate type - we can simply
move our data to the GcalEditDialog struct.
2015-12-30 14:36:27 -02:00
Georges Basile Stavracas Neto 0ac827d87d edit-dialog: remove dead code
This is already set in the UI definition file
for the dialog.
2015-12-30 14:12:02 -02:00
Erick Perez Castellanos 9be7233f28 date-selector: fix typo
The parsing of the date mask was never happening because it was always assuming
it was wrong.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=758391
2015-12-22 23:55:12 -06:00
Erick Perez Castellanos cb25af0164 year-view: Get selected date before hiding popover
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=757931
2015-12-21 22:53:33 -06:00
Miguel Vaello Martínez 2001273c28 Fix uninitialized variable
In the 'icaltime_compare_with_current' function, the 'result' was
uninitialized. As a consequence, this simplifies the if-else
condition.

https://bugzilla.gnome.org/show_bug.cgi?id=759588
2015-12-21 20:11:42 -06:00
Georges Basile Stavracas Neto b6bec55185 month-view: don't show popover when clicking an invalid cell
Because we're using a simple (gint) cast to round y value of
the clicked point, a negative y was rounding to a valid cell
position and showing the popover even when the user clicked
on the blank cells before the actual month view.

Fix that by properly checking if y is negative.

https://bugzilla.gnome.org/show_bug.cgi?id=755910
2015-10-27 12:00:49 -02:00
Georges Basile Stavracas Neto 6afa9b98f6 month-view: fix mirroring macro
It was using a local variable, which is a bad idea. It
only worked because we were using it in the context of
that local variable, but it was luck.
2015-10-27 11:57:51 -02:00
Erick Perez Castellanos e611f87d6a manager: prevent excessive logging.
Skip "Job failed" warning when the error is caused by ouselves cancelling the
thread.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=749337
2015-10-21 08:49:55 -05:00
Erick Perez Castellanos e81f7090f4 date-selector: use glib string translations
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=756412
2015-10-20 09:35:54 -05:00
Erick Perez Castellanos 5f6bd95750 Fix gcal_manager_is_client_writable() semantics
Fix all the calls to it accordingly.
2015-10-07 08:39:51 -05:00
Alexandre Franke 8e38b15129 Unmark properties for translation
It makes no sense here to have those translatable
2015-08-31 22:31:24 +02:00
Georges Basile Stavracas Neto d644cbc8bf search-view: update UI to match upstream
Latest GNOME applications follow a clear style of
searching and displaying results, with a no results
page.

To create a coherent usage between GNOME applications,
add the No results page to search popover.
2015-07-17 02:19:44 -03:00
Georges Basile Stavracas Neto 6080b62368 manager: implement ::move method 2015-07-16 00:22:54 -03:00
Georges Basile Stavracas Neto d3a806a684 year-view: improve font rendering
By using doubles instead of integers, we give a very
fluid resize effect for year view.
2015-07-15 23:55:08 -03:00
Georges Basile Stavracas Neto 10e340c20f manager: initialize value
Avoids calling g_free on uninitialized memory,
which results in a nasty segfault.
2015-07-15 21:18:52 -03: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
Milan Crha 6a39614e38 Bug 751206 - correct trust prompt for collection sources
This enables trust prompts for collection sources. Note the changes from the
above cited bug are needed to have this fully and properly working.

https://bugzilla.gnome.org/show_bug.cgi?id=751206
2015-06-20 23:04:10 -03:00
Milan Crha 3e97490e1d Bug 751211 - crash on ESource::read-only property change notification
Two things changes:
a) the actual crash cause in on_client_readonly_changed(), to test whether
   the 'unit' is valid at all before dereferencing it
b) the callback doesn't seem to be disconnected at all, thus added a disconnect
   of it on the source removal as well

The b) might be enough, but just to be sure I included also a).

https://bugzilla.gnome.org/show_bug.cgi?id=751211
2015-06-20 23:00:40 -03:00
Milan Crha afdd726daf manager: fix bug #751209
https://bugzilla.gnome.org/show_bug.cgi?id=751209
2015-06-20 22:56:47 -03:00
Georges Basile Stavracas Neto 1f666ba405 window: move forward/backward according to locale 2015-06-04 15:44:48 -03:00