[Xfce4-commits] <postler:master> Show a dialog if trying to send without a subject
Christian Dywan
noreply at xfce.org
Sat Jun 26 03:22:12 CEST 2010
Updating branch refs/heads/master
to 5650a2e00b8a943a35d50b159fb459dc2b59a441 (commit)
from db5787cdae6435db7f76001a9137023dfa17e26d (commit)
commit 5650a2e00b8a943a35d50b159fb459dc2b59a441
Author: Christian Dywan <christian at twotoasts.de>
Date: Thu Jun 24 22:41:33 2010 +0200
Show a dialog if trying to send without a subject
postler/postler-composer.vala | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/postler/postler-composer.vala b/postler/postler-composer.vala
index 29c7b5b..f392cf6 100644
--- a/postler/postler-composer.vala
+++ b/postler/postler-composer.vala
@@ -67,6 +67,21 @@ public class Postler.Composer : Gtk.Window {
""";
void action_mail_send () {
+ if (entry_subject.text == "") {
+ var dialog = new Gtk.MessageDialog (this, 0,
+ Gtk.MessageType.WARNING, Gtk.ButtonsType.NONE,
+ _("You did not enter a subject."));
+ dialog.format_secondary_text (_("Do you want to send the message "
+ + "without a subject?"));
+ dialog.add_buttons (Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL,
+ _("_Send message without subject"), Gtk.ResponseType.OK);
+ dialog.set_default_response (Gtk.ResponseType.CANCEL);
+ int response = dialog.run ();
+ dialog.destroy ();
+ if (response != Gtk.ResponseType.OK)
+ return;
+ }
+
string from = combo_from.get_active_text ();
foreach (var info in accounts.get_infos ()) {
if (info.address != null && from in info.address) {
More information about the Xfce4-commits
mailing list