[Xfce4-commits] <xfce4-notifyd:master> Show preview on theme change.

Jérôme Guelfucci noreply at xfce.org
Sun May 8 12:14:03 CEST 2011


Updating branch refs/heads/master
         to e37072e06d9ad0b223ee109319622865cc27158f (commit)
       from 578731da48c2cdb3ceb21623aab902f2a521c540 (commit)

commit e37072e06d9ad0b223ee109319622865cc27158f
Author: Jérôme Guelfucci <jeromeg at xfce.org>
Date:   Sun May 8 12:11:41 2011 +0200

    Show preview on theme change.

 xfce4-notifyd-config/main.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/xfce4-notifyd-config/main.c b/xfce4-notifyd-config/main.c
index 807142f..1267da8 100644
--- a/xfce4-notifyd-config/main.c
+++ b/xfce4-notifyd-config/main.c
@@ -110,10 +110,21 @@ xfce4_notifyd_config_theme_changed(XfconfChannel *channel,
     {
         gtk_tree_model_get(GTK_TREE_MODEL(ls), &iter, 0, &theme, -1);
         if(!strcmp(theme, new_theme)) {
+            GError *error = NULL;
+
             gtk_combo_box_set_active_iter(GTK_COMBO_BOX(theme_combo),
                                           &iter);
             g_free(theme);
             xfce4_notifyd_config_kill_daemon();
+
+            if(!g_spawn_command_line_async(_("notify-send \"Notification Preview\""
+                                             " \"This is how notifications will look like\""),
+                                           &error)) {
+                xfce_dialog_show_error(GTK_WINDOW(gtk_widget_get_toplevel(theme_combo)),
+                                       error, _("Notification preview failed"));
+                g_error_free(error);
+            }
+
             return;
         }
         g_free(theme);



More information about the Xfce4-commits mailing list