Commit Graph
105 Commits
Author SHA1 Message Date
Mohammed Sadiq 6cf5c0317d edit-dialog: check if event is new the right way
Checking if a new event is already having a source succeeds
for some reason (which should actually fail).

But thankfully we already have an event_is_new gboolean flag.
Check the status of that flag and add or update the event.

https://bugzilla.gnome.org/show_bug.cgi?id=771566
2016-11-22 09:54:28 -02: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 18c5607d87 edit-dialog: fix typo 2016-09-14 16:11:22 -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 cd50bec506 project: fix build warnings
https://bugzilla.gnome.org/show_bug.cgi?id=770466
2016-08-29 23:08:39 -03:00
Ernestas Kulik 46a05e5d00 edit-dialog: fake inclusive end date for all-day events
Currently, all-day multi-day events are displayed inconsistently with
regard to other calendar applications. That is due to strict following
of RFC 5545, which mandates non-inclusive all-day multi-day event end
dates. This commit makes the edit dialog display a faked date for such
events.

https://bugzilla.gnome.org/show_bug.cgi?id=769300
2016-08-03 16:41:14 +03:00
Ernestas Kulik dd4142f255 edit-dialog: set time format unconditionally
If GcalEditDialog.format_24h is initialized to zero, the call to
gcal_edit_dialog_set_time_format() from GcalWindow will not make
period_combo boxes visible on systems, where 12-hour clocks are used.
This commit fixes that by removing the if statement from the function.

https://bugzilla.gnome.org/show_bug.cgi?id=765370
2016-07-27 16:36:36 -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 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 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 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 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
Anwar Sadath 14dc32891b edit-dialog: Respecting GNOME's 12/24 hour format
The edit dialog time picker didnt take into account GNOME's hour format.

The edit dialog time picker didnt take into account GNOME's hour format because the desktop settings clock-format from gcal-window was not passed to gcal-edit-dialog.

Now the data is passed through the function gcal_edit_dialog_time_format and everything works as required.

https://bugzilla.gnome.org/show_bug.cgi?id=703321
2016-03-14 17:40:22 -03:00
fosero 2244503a52 edit-dialog: don't try to update locked events
https://bugzilla.gnome.org/show_bug.cgi?id=763187
2016-03-06 19:27:32 -03:00
Georges Basile Stavracas Neto 9a3baf726c edit-dialog: correctly transform the edited datetime 2016-02-29 15:49:36 -03:00
Georges Basile Stavracas Neto 9df6a37fd9 edit-dialog: fix more timezone issues 2016-02-18 10:27:53 +01:00
Georges Basile Stavracas Neto fd6d6e97c9 quick-add-popover: fix event creation again 2016-02-18 04:02:46 -02:00
Georges Basile Stavracas Neto 6775ffd7b3 edit-dialog: edit datetimes in the system timezone
The dates are adjusted to the system timezone when an
event is set, and we adjust it back to the event's zone
when we save and close the dialog.
2016-02-18 01:28:42 -02:00
Georges Basile Stavracas Neto e5cd5ba7f5 edit-dialog: set UTC timezone when event is all day
This is part of the definition of an all day event.
2016-02-18 04:02:37 +01:00
Georges Basile Stavracas Neto 2bb5f42b66 edit-dialog: forbid editing times when source is readonly 2016-02-18 03:34:48 +01:00
Georges Basile Stavracas Neto 070bc681fc edit-dialog: simplify code
We don't need to have 2 functions that do exactly
the same thing.
2016-02-14 12:17:37 -02:00
Georges Basile Stavracas Neto 34ff93ce3f time-selector: use GDateTime
Pretty much like the previous commit, but porting the
GcalTimeSelector class.
2016-02-14 12:17:37 -02:00
Georges Basile Stavracas Neto afe8def60c date-selector: use GDateTime internally
Using a GDateTime improves consistency with the
other components (ideally, we'll move completely
to GDateTime) and simplifies the code.

This commit adds a new property GcalDateSelector::date
and adapts the API to use GDateTime.
2016-02-14 12:17:37 -02:00
Georges Basile Stavracas Neto e31e6eeac0 edit-dialog: use GcalEvent internally
Instead of using the ESource + ECalComponent combination,
use the new GcalEvent class, which wraps up and simplifies
most of the code.

This commit adds a GcalEditDialog::event property, and
adapts the dialog (and everything dependant on it's code)
to use the GcalEvent class.
2016-02-14 12:17:37 -02:00
Georges Basile Stavracas Neto 0ec0ea8121 event-widget: use GcalEvent internally
This saves a lot of code, and is much saner to maintain.
2016-02-14 12:17:37 -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 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 5f6bd95750 Fix gcal_manager_is_client_writable() semantics
Fix all the calls to it accordingly.
2015-10-07 08:39:51 -05:00
Erick Pérez Castellanos e5c7dee5d8 misc: code style fixing 2015-03-16 13:07:54 -04:00
Erick Pérez Castellanos cac370e6b7 edit-dialog: handle timezone properly 2015-03-16 13:07:34 -04:00
Erick Pérez Castellanos c7563da2d0 app: handle calendars colours better
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=745487
2015-03-06 11:32:32 -05:00
Erick Pérez Castellanos 9f20c3f2f9 edit-dialog: fix ref leak when selecting a calendar 2015-03-06 10:35:25 -05:00
Erick Pérez Castellanos 264492580e edit-dialog: convert time to timezone 2015-02-16 09:31:21 -05:00
Erick Pérez Castellanos b1df382ee3 app: use get_color_name_from_source() 2015-02-06 09:21:36 -05:00
Rishabh Raj 57ebe7aed9 time-selector: fix handler unblocked 2015-01-27 10:33:39 -05:00
Erick Pérez Castellanos 0b2367200b copyright: update year 2015-01-20 13:11:58 -05:00
Georges Basile Stavracas Neto 5423280398 edit-dialog: use UI file to connect signals
Fixes bug #739313.
2015-01-13 17:02:07 -02:00
Georges Basile Stavracas Neto c799acf482 edit-dialog: calculate all_day before using it to set the dates
It was using the all_day var before actually using it.

This caused an issue where the start time showed as the current time.
2015-01-13 16:18:40 -02:00