diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2021-08-22 09:58:25 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2021-08-22 09:58:25 +0200 |
commit | 55d274a13c2524d55e07f2395316aa9d2cae912b (patch) | |
tree | ed56dbd62e0ce978ab83e8ffe2d6034e612d028f /src/events | |
parent | fa96deefd4bc785c2937e40df3eb0742e2353c13 (diff) | |
parent | 63876b56fcba61ef061c5f0edd924551bc079354 (diff) |
Merge branch 'release/debian/0.30.14-1'debian/0.30.14-1
Diffstat (limited to 'src/events')
-rw-r--r-- | src/events/EventPage.vala | 25 | ||||
-rw-r--r-- | src/events/EventsDirectoryPage.vala | 3 |
2 files changed, 15 insertions, 13 deletions
diff --git a/src/events/EventPage.vala b/src/events/EventPage.vala index a482ab8..1375c39 100644 --- a/src/events/EventPage.vala +++ b/src/events/EventPage.vala @@ -50,7 +50,8 @@ public class EventPage : CollectionPage { private const GLib.ActionEntry[] entries = { { "MakePrimary", on_make_primary }, { "Rename", on_rename }, - { "EditEventComment", on_edit_comment } + { "EditComment", on_edit_comment }, + { "EditEventComment", on_edit_event_comment } }; protected override void add_actions(GLib.ActionMap map) { @@ -96,19 +97,19 @@ public class EventPage : CollectionPage { set_page_name(page_event.get_name()); } - protected override void on_edit_comment() { - if (get_view().get_selected_count() == 0) { - EditCommentDialog edit_comment_dialog = new EditCommentDialog(page_event.get_comment(), - true); - string? new_comment = edit_comment_dialog.execute(); - if (new_comment == null) - return; - - EditEventCommentCommand command = new EditEventCommentCommand(page_event, new_comment); - get_command_manager().execute(command); + private void on_edit_event_comment() { + EditCommentDialog edit_comment_dialog = new EditCommentDialog(page_event.get_comment(), + true); + string? new_comment = edit_comment_dialog.execute(); + if (new_comment == null) return; - } + EditEventCommentCommand command = new EditEventCommentCommand(page_event, new_comment); + get_command_manager().execute(command); + return; + } + + protected override void on_edit_comment() { base.on_edit_comment(); } diff --git a/src/events/EventsDirectoryPage.vala b/src/events/EventsDirectoryPage.vala index e88b1a7..7ead1a0 100644 --- a/src/events/EventsDirectoryPage.vala +++ b/src/events/EventsDirectoryPage.vala @@ -190,7 +190,8 @@ public abstract class EventsDirectoryPage : CheckerboardPage { EventDirectoryItem item = (EventDirectoryItem) get_view().get_selected_at(0); - EditCommentDialog edit_comment_dialog = new EditCommentDialog(item.event.get_comment()); + EditCommentDialog edit_comment_dialog = new EditCommentDialog(item.event.get_comment(), + true); string? new_comment = edit_comment_dialog.execute(); if (new_comment == null) return; |