Commit Graph
1705 Commits
Author SHA1 Message Date
Georges Basile Stavracas Neto a853376629 event-widget: turn into a GtkBin subclass
The current GcalEventWidget implementation is a direct
GtkWidget subclass, which means we have to take care of
all the implementation details such as raising GdkWindows
and managing the drawing all by ourselves.

The event widget, however, can be easily described through
a GtkBuilder file. This would simplify the implementation
and makes us maintain less code.

Fix that by making GcalEventWidget a GtkBin subclass.
2017-09-14 13:26:28 -03:00
Georges Basile Stavracas Neto b3cfbe3d31 event-widget: update style 2017-09-14 13:26:28 -03:00
Georges Basile Stavracas Neto f3f2ba271b event-widget: update code style 2017-09-14 13:26:28 -03:00
Georges Basile Stavracas Neto d2d4e7a9b6 event-widget: remove unused prototypes
These are not implemented anymore, and just add more noise
to the header file.
2017-09-14 13:26:28 -03:00
Nidhi Gupta a5d1d9dc99 edit-dialog: set minimum number of occurrence to 2
An event should be considered as recurring only when it occurs
at least 2 times.

So to make sure the number of occurrences are at least 2,
set minimum value of recurrence spin button as 2.

https://bugzilla.gnome.org/show_bug.cgi?id=787054
2017-09-12 20:07:54 +05:30
Georges Basile Stavracas Neto 8f7230cf5f window: remove stray debug message 2017-09-08 22:59:47 -03:00
Georges Basile Stavracas Neto 5a0a3fcd9c event: fix various reference ownership issues 2017-09-08 22:25:18 -03:00
Georges Basile Stavracas Neto 242db0436a main: remove double ; 2017-09-08 22:23:44 -03:00
Georges Basile Stavracas Neto 9c50ae9b9c main: simplify code even more 2017-09-08 21:04:02 -03:00
Georges Basile Stavracas Neto 27a44c3092 project: don't install private library
Instead, bring back building all the objects into
calendar itself, and only use the private library
internally.
2017-09-08 21:04:02 -03:00
Georges Basile Stavracas Neto 68c2b7d3ac project: remove GcalSubscriberView
The subscriber view was an unecessary layer and only
added more complication than it actually helped.

This commit merges GcalSubscriberView and GcalMonthView
into a single class.
2017-09-07 16:07:04 -03:00
Georges Basile Stavracas Neto 6d19e30973 project: libgcal library 2017-09-07 16:06:21 -03:00
Georges Basile Stavracas Neto 7c587e896e edit-dialog: reduce header circle icon 2017-09-07 15:01:50 -03:00
Georges Basile Stavracas Neto 8927e10ae0 edit-dialog: wrap in a scrolled window
As we're adding more and more widgets in the Edit dialog,
it is now growing too tall to fit normal screens. Thus, wrap
it in a scrolled window, and let the content height cover
75% of the main window at most.
2017-09-07 14:58:14 -03:00
Georges Basile Stavracas Neto e68dc3aebf project: move GcalView to views/
It makes sense to put the interface together with
the other classes.
2017-09-07 14:37:37 -03:00
Georges Basile Stavracas Neto e60c8593dd window: propagate manager using properties 2017-09-07 14:35:44 -03:00
Georges Basile Stavracas Neto 36a39e6c5c window: simplify constructor
We don't need to pass information that can easily be
retrieved by the GSettings instance from GcalManager.
2017-09-07 13:21:09 -03:00
Georges Basile Stavracas Neto a0b6bdb04a application: move GSettings object to GcalManager
The first outcome of the test suite. This separation does
not make much sense now, and GcalManager is basically a
holder for all data types.

This commit moves the GSettings to the GcalManager instance
of the application. Of course, in the future, the plan is to
split GcalManager nicely.
2017-09-07 12:52:49 -03:00
Georges Basile Stavracas Neto 110c6be7c8 application: style fixes 2017-09-07 12:08:11 -03:00
Georges Basile Stavracas Neto 647e243bd5 project: don't compile source files twice
We can just link with the private library, and use the
main file to make it an executable. This drops the compile
time by 43% here.
2017-09-07 12:07:22 -03:00
Mohammed Sadiq 24a2e97df2 application: handle command line options right
Commandline arguments are now handled by the primary instance of the
application. And so outputs for --help, and --version are shown there.
Not where the application is invoked.

So hook to handle-local-options so that the arguments are parsed locally,
and sent unparsed ones to primary instance in case it is required.

As a side effect, the arguments passed to --date and --uuid are not updated
in the primary instance on subsequent runs (ie, when the primary instance
is already up and running). So check the commandline arguments as they
arrives rather than saving them to a variable, which won't then be updated.

https://bugzilla.gnome.org/show_bug.cgi?id=773152
2017-09-07 11:45:12 -03:00
Georges Basile Stavracas Neto c7f7506d52 project: move evolution files to contrib/
It's better for the project organization if we nicely
organize external projects' files in contrib/, and our
own files in src/.
2017-09-07 11:41:05 -03:00
Georges Basile Stavracas Neto ebcf3f38df shell-search-provider: remove private field
This is a private class, and doesn't need private fields.
2017-09-07 02:37:39 -03:00
Georges Basile Stavracas Neto de780276f9 manager: user the new code style 2017-09-07 02:23:56 -03:00
Georges Basile Stavracas Neto 00b9c1c7a7 project: style improvements in meson files 2017-09-07 02:15:37 -03:00
Georges Basile Stavracas Neto 941f3ee77d event: cache events
This speeds up Calendar a little bit, and more importantly,
allows me to sleep well at night now.
2017-09-07 02:09:53 -03:00
Georges Basile Stavracas Neto 2f52962f01 utils: remove debug spew 2017-09-07 01:52:21 -03:00
Georges Basile Stavracas Neto 53a8278953 views: correctly hide events according to the mod type
When deleting events with recurrence, we want to hide the event
widgets according to the modification type. So that selecting
e.g. subsequent in the modification type dialog hides the event,
and the subsequent ones, truly reflecting the operation that will
happen.

Currently, however, the views don't do that, and only hide the
event that was asked to be deleted.

Fix that by passing the object modification type, and adapting the
views to take that into account.
2017-09-07 00:02:40 -03:00
Georges Basile Stavracas Neto 1a496eea17 subscriber-view: update comments 2017-09-07 00:02:40 -03:00
Georges Basile Stavracas Neto 3b6b536663 recurrence: add GcalRecurrenceModType
Instead of reusing the ECalObjModType and mixing the
prefixes all around, do this small cleanup and add a
gcal-prefixed enum.
2017-09-07 00:02:40 -03:00
Georges Basile Stavracas Neto edce0ab076 recurrence: use refcount instead of copy/free 2017-09-06 22:15:13 -03:00
Georges Basile Stavracas Neto 0cb6f20aea view: update style 2017-09-06 21:53:17 -03:00
Georges Basile Stavracas Neto 6004123ba2 edit-dialog: fix time widgets sensitive when all day 2017-08-24 07:16:15 +09:00
Georges Basile Stavracas Neto 3eec69c559 edit-dialog: update style
Calendar matured its code style over time and
edit dialog kept the old style.
2017-08-24 07:07:36 +09:00
newtodisworld@yandex.com e5024de887 edit-dialog: fix date span calculation
https://bugzilla.gnome.org/show_bug.cgi?id=772100
2017-08-24 06:53:32 +09:00
Georges Basile Stavracas Neto 316aeb9c67 quick-add-popover: properly place translator comment 2017-08-22 21:21:19 -03:00
Carlo Lobrano 66fa49b166 year-view: Mark working days according to locale
Currently, on the year view, Saturday and Sunday are marked
as non working days by default, despite the Locale settings and the
fact that in some Countries Sunday and/or Saturday are workdays.

This patch introduces a new function "is_workday" to check
whether a day is a working day according to the territory part of
Locale.

https://bugzilla.gnome.org/show_bug.cgi?id=746927
2017-08-22 21:10:07 -03:00
Abdullahi Usman e56bbc78a8 edit-dialog : correct time row visibility
The revealer widget in edit dialog's event time interval row uses to hide the
time selector widgets when the event is checked as all-day and also reveal the
widgets when not checked as all-day.

Sometimes edit dialog may turn on the visibility of the time selector
widgets when the revealer's animation already starts, causing a flickering of the widgets.

We remove the revealer widget and leave edit dialog to toggle the
visibility of time selector widgets when needed.

https://bugzilla.gnome.org/show_bug.cgi?id=771572
2017-08-22 21:01:20 -03:00
Abdullahi Usman d9a775e2fe month-view : correct overflow label position on rtl
The overflow layout displays "Other n events" when there are too much event
that a cell can accomodate.

But on rtl languages, due to the layering out of the cell, the position of the
overflow is not renderend on the mirrored date.

We fix that by mirroring the positon of the day on which the events occur so
that the events can appear on the right day.

https://bugzilla.gnome.org/show_bug.cgi?id=777427
2017-08-22 20:57:01 -03:00
Georges Basile Stavracas Neto 13d6f85d1f quick-add-popover: put day placeholder in the translatable string
As fairly pointed out, we should never split sentences [1].

[1] https://wiki.gnome.org/TranslationProject/DevGuidelines/Never%20split%20sentences

https://bugzilla.gnome.org/show_bug.cgi?id=786022
2017-08-22 20:51:16 -03:00
Abdullahi Usman df08daad68 month-view: improve dates calculation for RTL languages.
Month view used to calculate the event's start date and end date from
the physical layout of the month and compare it with the event's
original start date and end date to see if there is a change and then
update as necessary by either slanted start or end, when either is/are
not equal to the one in the original start and end dates.

However, the way in which the start date and end date in RTL language are
calculated must be different since the layering of the days in the weeks
are opposite.  Month view uses precalculated days number to mirror the
last week, which already chop off the days_delay number from cell_idx value.
In RTL, this cause issues such that the days are calculated wrongly and a
slanted start or end is visible.  Because the date is not the same as the
original events date, month view thinks that the view needs an update and
so tries to update the view wrongly.

We can fix this by using the cell_idx value to calculate the days and then
substracting the days_delay value after that.

https://bugzilla.gnome.org/show_bug.cgi?id=777426
2017-08-18 23:53:04 -03:00
Iñigo Martínez 1b04e6f4f5 project: Minor meson improvements.
This patch makes some minor improvements to the meson build system.
The changes are as follows:

* Avoid conditional statements when setting config.h values.
* Ordered calendar dependencies.
* Reused variables derived from options.
* Removed unnecessary new line in the output at the configuration's
  end.
* Use set10 function avoiding the trinary operator.
* Removed dependencies on the libgcal dependency, as they are not
  needed.

https://bugzilla.gnome.org/show_bug.cgi?id=786481
2017-08-18 23:06:29 -03:00
Georges Basile Stavracas Neto 282fb5fc33 month-view: don't draw dnd highlight on empty cells
https://bugzilla.gnome.org/show_bug.cgi?id=786102
2017-08-14 23:42:49 -03:00
Iñigo Martínez a1d25d2d7e project: Remove autotools
https://bugzilla.gnome.org/show_bug.cgi?id=782843
2017-08-10 07:49:16 -03:00
Iñigo Martínez 4c115249a7 project: Port to meson build system
https://bugzilla.gnome.org/show_bug.cgi?id=782843
2017-08-10 07:19:28 -03:00
Alex Benishek 311195857f Move from GPL 2 to GPL 3
Right now the project contains a mix of GPL 2 and GPL 3 code.
This commit moves all of the perviously GPL 2 code to GPL 3

https://bugzilla.gnome.org/show_bug.cgi?id=752649
2017-08-10 07:16:36 -03:00
Philip Withnall 30fc0b5bc5 src: Drop unused variables
Fixes a compiler warning.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://bugzilla.gnome.org/show_bug.cgi?id=785670
2017-08-10 07:14:39 -03:00
Yash Singh 1ad72b61a3 edit-dialog: make number of occurrences accept only numeric input
Set the numeric property of number of occurrences spin button
to TRUE so that it only accepts numeric input.

https://bugzilla.gnome.org/show_bug.cgi?id=782755
2017-08-10 07:12:10 -03:00
Yash Singh b7de0f3e1f edit-dialog: set proper limits for number of occurrences
Set the lower value as 1 and upper value as G_MAXDOUBLE
to make sure that any negative number, or a number greater
than G_MAXDOUBLE is not accepted.

https://bugzilla.gnome.org/show_bug.cgi?id=782755
2017-08-10 07:12:10 -03:00
Georges Basile Stavracas Neto d11ed85a7f month-view: grey out invalid days
It should be very clear that days outside the current
month are actually not valid. The current drawing
algorithm does not differentiate that, thought, and
draws everything at the same color.

Fix that by greying out the days outside the current
month.

https://bugzilla.gnome.org/show_bug.cgi?id=763771
2017-07-30 16:03:39 +01:00