[Xfce4-commits] [panel-plugins/xfce4-pulseaudio-plugin] 02/02: Add a gui control for show-notifications

noreply at xfce.org noreply at xfce.org
Thu Jun 11 00:19:09 CEST 2015


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

andrzejr pushed a commit to branch master
in repository panel-plugins/xfce4-pulseaudio-plugin.

commit 398d3eeb9c79ff1acc721b2f5113e89ce80cd90d
Author: Andrzej <ndrwrdck at gmail.com>
Date:   Wed Jun 10 23:18:56 2015 +0100

    Add a gui control for show-notifications
---
 panel-plugin/pulseaudio-dialog.c     |   10 ++++++++++
 panel-plugin/pulseaudio-dialog.glade |   16 ++++++++++++++++
 2 files changed, 26 insertions(+)

diff --git a/panel-plugin/pulseaudio-dialog.c b/panel-plugin/pulseaudio-dialog.c
index a056888..7ca3a86 100644
--- a/panel-plugin/pulseaudio-dialog.c
+++ b/panel-plugin/pulseaudio-dialog.c
@@ -182,6 +182,16 @@ pulseaudio_dialog_build (PulseaudioDialog *dialog)
                               G_OBJECT (object), "active",
                               G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL);
 
+      object = gtk_builder_get_object (builder, "checkbutton-show-notifications");
+      g_return_if_fail (GTK_IS_CHECK_BUTTON (object));
+#ifdef HAVE_LIBNOTIFY
+      g_object_bind_property (G_OBJECT (dialog->config), "show-notifications",
+                              G_OBJECT (object), "active",
+                              G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL);
+#else
+      gtk_widget_set_visible (GTK_WIDGET (object), FALSE);
+#endif
+
       object = gtk_builder_get_object (builder, "entry-mixer-command");
       g_return_if_fail (GTK_IS_ENTRY (object));
       g_object_bind_property (G_OBJECT (dialog->config), "mixer-command",
diff --git a/panel-plugin/pulseaudio-dialog.glade b/panel-plugin/pulseaudio-dialog.glade
index face85a..ad7d014 100644
--- a/panel-plugin/pulseaudio-dialog.glade
+++ b/panel-plugin/pulseaudio-dialog.glade
@@ -101,6 +101,22 @@
                             <property name="position">0</property>
                           </packing>
                         </child>
+                        <child>
+                          <object class="GtkCheckButton" id="checkbutton-show-notifications">
+                            <property name="label" translatable="yes">Show _notifications when volume changes</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="tooltip_text" translatable="yes">Enables on-screen volume notifications.</property>
+                            <property name="use_underline">True</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="expand">True</property>
+                            <property name="fill">True</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
                       </object>
                     </child>
                   </object>

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


More information about the Xfce4-commits mailing list