[Xfce4-commits] [apps/xfce4-notifyd] 18/29: Drop the "never" option from logging

noreply at xfce.org noreply at xfce.org
Sun Jan 29 20:52:08 CET 2017


This is an automated email from the git hooks/post-receive script.

ochosi pushed a commit to branch master
in repository apps/xfce4-notifyd.

commit 97a14e849674b59b2977e31d2cac66264587566b
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date:   Fri Jan 6 23:08:38 2017 +0100

    Drop the "never" option from logging
---
 xfce4-notifyd-config/main.c                     | 11 +++++------
 xfce4-notifyd-config/xfce4-notifyd-config.glade |  5 +----
 xfce4-notifyd/xfce-notify-daemon.c              | 10 +++++-----
 3 files changed, 11 insertions(+), 15 deletions(-)

diff --git a/xfce4-notifyd-config/main.c b/xfce4-notifyd-config/main.c
index 7b0a109..7783b5c 100644
--- a/xfce4-notifyd-config/main.c
+++ b/xfce4-notifyd-config/main.c
@@ -754,15 +754,14 @@ xfce4_notifyd_config_setup_dialog(GtkBuilder *builder)
     gtk_widget_show_all (placeholder_label);
     xfce4_notifyd_log_populate (log_listbox);
 
-    log_clear_button = gtk_tool_button_new (NULL, _("Clear"));
-    gtk_toolbar_insert(log_toolbar, GTK_TOOL_ITEM(log_clear_button), 0);
-    g_signal_connect (G_OBJECT (log_clear_button), "clicked",
-                      G_CALLBACK (xfce_notify_log_clear_button_clicked), log_listbox);
-
     log_refresh_button = gtk_tool_button_new (NULL, _("Refresh"));
-    gtk_toolbar_insert(log_toolbar, GTK_TOOL_ITEM(log_refresh_button), 1);
+    gtk_toolbar_insert(log_toolbar, GTK_TOOL_ITEM(log_refresh_button), 0);
     g_signal_connect (G_OBJECT (log_refresh_button), "clicked",
                       G_CALLBACK (xfce4_notifyd_log_refresh), log_listbox);
+    log_clear_button = gtk_tool_button_new (NULL, _("Clear"));
+    gtk_toolbar_insert(log_toolbar, GTK_TOOL_ITEM(log_clear_button), 1);
+    g_signal_connect (G_OBJECT (log_clear_button), "clicked",
+                      G_CALLBACK (xfce_notify_log_clear_button_clicked), log_listbox);
     gtk_widget_show_all (GTK_WIDGET(log_toolbar));
 
     help_button = GTK_WIDGET(gtk_builder_get_object(builder, "help_btn"));
diff --git a/xfce4-notifyd-config/xfce4-notifyd-config.glade b/xfce4-notifyd-config/xfce4-notifyd-config.glade
index 7d80953..30a295f 100644
--- a/xfce4-notifyd-config/xfce4-notifyd-config.glade
+++ b/xfce4-notifyd-config/xfce4-notifyd-config.glade
@@ -24,10 +24,7 @@
     </columns>
     <data>
       <row>
-        <col id="0" translatable="yes">never</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">during "Do not disturb"</col>
+        <col id="0" translatable="yes">only during "Do not disturb"</col>
       </row>
       <row>
         <col id="0" translatable="yes">always</col>
diff --git a/xfce4-notifyd/xfce-notify-daemon.c b/xfce4-notifyd/xfce-notify-daemon.c
index f7147f8..5b6bc4c 100644
--- a/xfce4-notifyd/xfce-notify-daemon.c
+++ b/xfce4-notifyd/xfce-notify-daemon.c
@@ -1231,8 +1231,8 @@ notify_notify (XfceNotifyGBus *skeleton,
             if (xndaemon->notification_log == TRUE &&
                 transient == FALSE) {
                 /* Either log in DND mode or always for muted apps */
-                if (xndaemon->log_level == 1 && xndaemon->do_not_disturb == TRUE ||
-                    xndaemon->log_level == 2)
+                if (xndaemon->log_level == 0 && xndaemon->do_not_disturb == TRUE ||
+                    xndaemon->log_level == 1)
                       /* Log either all, all except muted or only muted applications */
                       if (xndaemon->log_level_apps == 0 ||
                           xndaemon->log_level_apps == 1 && application_is_muted == FALSE ||
@@ -1337,7 +1337,7 @@ notify_notify (XfceNotifyGBus *skeleton,
     // app_name, summary, body, app_icon, expire_timeout, actions
     // TODO: icons need to be handled, app_icon is bad - what shall be done with image_data??
     if (xndaemon->notification_log == TRUE &&
-        xndaemon->log_level == 2 &&
+        xndaemon->log_level == 1 &&
         xndaemon->log_level_apps <= 1 &&
         transient == FALSE)
         xfce_notify_log_insert (new_app_name, summary, body, app_icon, expire_timeout, actions);
@@ -1621,10 +1621,10 @@ xfce_notify_daemon_load_config (XfceNotifyDaemon *xndaemon,
                                                          FALSE);
     xndaemon->log_level = xfconf_channel_get_uint(xndaemon->settings,
                                                         "/log-level",
-                                                        FALSE);
+                                                        0);
     xndaemon->log_level_apps = xfconf_channel_get_uint(xndaemon->settings,
                                                         "/log-level-apps",
-                                                        FALSE);
+                                                        0);
     /* Clean up old notifications from the backlog */
     xfconf_channel_reset_property (xndaemon->settings, "/backlog", TRUE);
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list