[Xfce4-commits] <xfce4-mailwatch-plugin:master> Fix running command on each change of the count

Ján Sučan noreply at xfce.org
Sat Dec 21 11:10:01 CET 2013


Updating branch refs/heads/master
         to dfe2286f1ee91ba812c785796c9c31f6ca702525 (commit)
       from db36f97aaca40ec8d52015232e95e3a2f10d295b (commit)

commit dfe2286f1ee91ba812c785796c9c31f6ca702525
Author: Ján Sučan <sucan at runbox.com>
Date:   Sat Dec 21 11:05:09 2013 +0100

    Fix running command on each change of the count
    
    Run command even on change from non-zero to zero new message count.

 panel-plugin/mailwatch-plugin.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/panel-plugin/mailwatch-plugin.c b/panel-plugin/mailwatch-plugin.c
index 79d196a..6aa0463 100644
--- a/panel-plugin/mailwatch-plugin.c
+++ b/panel-plugin/mailwatch-plugin.c
@@ -145,6 +145,11 @@ mailwatch_new_messages_changed_cb(XfceMailwatch *mailwatch,
                            mwp);
         gtk_widget_set_tooltip_text(mwp->button, _("No new mail"));
         gtk_widget_trigger_tooltip_query(mwp->button);
+        /* Run command on any change of count of new messages. */
+        if (mwp->count_changed_command)
+            xfce_spawn_command_line_on_screen(gdk_screen_get_default(),
+                                              mwp->count_changed_command,
+                                              FALSE, FALSE, NULL);
     } else if (new_messages > 0) {
         if (!mwp->newmail_icon_visible) {
             mwp->newmail_icon_visible = TRUE;


More information about the Xfce4-commits mailing list