[geary] Use the correct plural form when controller is closing composers.
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary] Use the correct plural form when controller is closing composers.
- Date: Wed, 10 Jan 2018 08:05:37 +0000 (UTC)
commit 49963daf0584cb8aef07174fed7282743a73cadf
Author: Michael James Gratton <mike vee net>
Date: Wed Jan 10 18:33:15 2018 +1100
Use the correct plural form when controller is closing composers.
Fixes Bug 730607.
src/client/application/geary-controller.vala | 20 +++++++++++++-------
1 files changed, 13 insertions(+), 7 deletions(-)
---
diff --git a/src/client/application/geary-controller.vala b/src/client/application/geary-controller.vala
index 65cd6b4..6cd04ef 100644
--- a/src/client/application/geary-controller.vala
+++ b/src/client/application/geary-controller.vala
@@ -2259,14 +2259,20 @@ public class GearyController : Geary.BaseObject {
// Find out what to do with the inline composers.
// TODO: Remove this in favor of automatically saving drafts
main_window.present();
- ConfirmationDialog dialog = new ConfirmationDialog(main_window, _("Close open draft messages?"),
- null, Stock._CLOSE, "destructive-action");
+ Gee.List<ComposerWidget> composers_to_destroy = new Gee.ArrayList<ComposerWidget>();
+ foreach (ComposerWidget cw in composer_widgets) {
+ if (cw.state != ComposerWidget.ComposerState.DETACHED)
+ composers_to_destroy.add(cw);
+ }
+ string message = ngettext(
+ "Close the draft message?",
+ "Close all draft messages?",
+ composers_to_destroy.size
+ );
+ ConfirmationDialog dialog = new ConfirmationDialog(
+ main_window, message, null, Stock._CLOSE, "destructive-action"
+ );
if (dialog.run() == Gtk.ResponseType.OK) {
- Gee.List<ComposerWidget> composers_to_destroy = new Gee.ArrayList<ComposerWidget>();
- foreach (ComposerWidget cw in composer_widgets) {
- if (cw.state != ComposerWidget.ComposerState.DETACHED)
- composers_to_destroy.add(cw);
- }
foreach(ComposerWidget cw in composers_to_destroy)
((ComposerContainer) cw.parent).close_container();
return true;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]