Hello community,

here is the log from the commit of package xfce4-panel-plugin-pulseaudio for 
openSUSE:Factory checked in at 2016-06-14 23:09:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/xfce4-panel-plugin-pulseaudio (Old)
 and      /work/SRC/openSUSE:Factory/.xfce4-panel-plugin-pulseaudio.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "xfce4-panel-plugin-pulseaudio"

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/xfce4-panel-plugin-pulseaudio/xfce4-panel-plugin-pulseaudio.changes
      2015-05-15 07:43:32.000000000 +0200
+++ 
/work/SRC/openSUSE:Factory/.xfce4-panel-plugin-pulseaudio.new/xfce4-panel-plugin-pulseaudio.changes
 2016-06-14 23:09:06.000000000 +0200
@@ -1,0 +2,9 @@
+Mon Jun 13 08:03:47 UTC 2015 - sb73...@yahoo.com
+
+- update to version 0.2.4
+  - Added a GUI control for show-notifications
+  - Added a configuration option "show-notifications"
+  - Reconnect to the PA server if the connection is lost
+  - Use volume-changed signal to update notifications
+
+-------------------------------------------------------------------

Old:
----
  xfce4-pulseaudio-plugin-0.2.3.tar.bz2

New:
----
  xfce4-pulseaudio-plugin-0.2.4.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ xfce4-panel-plugin-pulseaudio.spec ++++++
--- /var/tmp/diff_new_pack.gpKPMP/_old  2016-06-14 23:09:07.000000000 +0200
+++ /var/tmp/diff_new_pack.gpKPMP/_new  2016-06-14 23:09:07.000000000 +0200
@@ -21,7 +21,7 @@
 %define plugin_name xfce4-pulseaudio-plugin
 
 Name:           xfce4-panel-plugin-pulseaudio
-Version:        0.2.3
+Version:        0.2.4
 Release:        0
 Summary:        Pulseaudio Volume Control Plugin for the Xfce Panel
 License:        GPL-2.0+

++++++ xfce4-pulseaudio-plugin-0.2.3.tar.bz2 -> 
xfce4-pulseaudio-plugin-0.2.4.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xfce4-pulseaudio-plugin-0.2.3/ChangeLog 
new/xfce4-pulseaudio-plugin-0.2.4/ChangeLog
--- old/xfce4-pulseaudio-plugin-0.2.3/ChangeLog 2015-05-12 03:22:45.000000000 
+0200
+++ new/xfce4-pulseaudio-plugin-0.2.4/ChangeLog 2015-10-27 01:44:26.000000000 
+0100
@@ -1,4 +1,11 @@
 # created with git log --pretty=format:"%ad %h %s %aN <%aE>" --no-merges 
--date=short
+2015-07-12 1bae523 Removed autogenerated po/Makefile.in.in Andrzej 
<ndrwr...@gmail.com>
+2015-06-10 398d3ee Add a gui control for show-notifications Andrzej 
<ndrwr...@gmail.com>
+2015-06-10 e676501 Added a configuration option "show-notifications" Andrzej 
<ndrwr...@gmail.com>
+2015-06-06 ad8d820 Reconnect to the PA server if the connection is lost 
Andrzej <ndrwr...@gmail.com>
+2015-06-06 f528da4 Use volume-changed signal to update notifications Andrzej 
<ndrwr...@gmail.com>
+2015-05-12 ce71544 Back to development Andrzej <ndrwr...@gmail.com>
+2015-05-12 9371397 Updates for a release Andrzej <ndrwr...@gmail.com>
 2015-05-12 7cfc9a3 make distcheck fix Andrzej <ndrwr...@gmail.com>
 2015-04-19 405f94a Corrected copyright and author list Andrzej 
<ndrwr...@gmail.com>
 2015-04-19 f4b6b6c Added OSD notifications Andrzej <ndrwr...@gmail.com>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xfce4-pulseaudio-plugin-0.2.3/configure 
new/xfce4-pulseaudio-plugin-0.2.4/configure
--- old/xfce4-pulseaudio-plugin-0.2.3/configure 2015-05-12 03:23:19.000000000 
+0200
+++ new/xfce4-pulseaudio-plugin-0.2.4/configure 2015-10-27 01:52:54.000000000 
+0100
@@ -1,7 +1,7 @@
 #! /bin/sh
-# From configure.ac 9371397.
+# From configure.ac 3f0796f.
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for xfce4-pulseaudio-plugin 0.2.3.
+# Generated by GNU Autoconf 2.69 for xfce4-pulseaudio-plugin 0.2.4.
 #
 # Report bugs to <http://bugzilla.xfce.org/>.
 #
@@ -594,8 +594,8 @@
 # Identity of this package.
 PACKAGE_NAME='xfce4-pulseaudio-plugin'
 PACKAGE_TARNAME='xfce4-pulseaudio-plugin'
-PACKAGE_VERSION='0.2.3'
-PACKAGE_STRING='xfce4-pulseaudio-plugin 0.2.3'
+PACKAGE_VERSION='0.2.4'
+PACKAGE_STRING='xfce4-pulseaudio-plugin 0.2.4'
 PACKAGE_BUGREPORT='http://bugzilla.xfce.org/'
 PACKAGE_URL=''
 
@@ -1438,7 +1438,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures xfce4-pulseaudio-plugin 0.2.3 to adapt to many kinds 
of systems.
+\`configure' configures xfce4-pulseaudio-plugin 0.2.4 to adapt to many kinds 
of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1514,7 +1514,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of xfce4-pulseaudio-plugin 
0.2.3:";;
+     short | recursive ) echo "Configuration of xfce4-pulseaudio-plugin 
0.2.4:";;
    esac
   cat <<\_ACEOF
 
@@ -1644,7 +1644,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-xfce4-pulseaudio-plugin configure 0.2.3
+xfce4-pulseaudio-plugin configure 0.2.4
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2016,7 +2016,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by xfce4-pulseaudio-plugin $as_me 0.2.3, which was
+It was created by xfce4-pulseaudio-plugin $as_me 0.2.4, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2994,7 +2994,7 @@
 
 # Define the identity of the package.
  PACKAGE='xfce4-pulseaudio-plugin'
- VERSION='0.2.3'
+ VERSION='0.2.4'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -16561,7 +16561,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by xfce4-pulseaudio-plugin $as_me 0.2.3, which was
+This file was extended by xfce4-pulseaudio-plugin $as_me 0.2.4, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -16627,7 +16627,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; 
s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-xfce4-pulseaudio-plugin config.status 0.2.3
+xfce4-pulseaudio-plugin config.status 0.2.4
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xfce4-pulseaudio-plugin-0.2.3/configure.ac 
new/xfce4-pulseaudio-plugin-0.2.4/configure.ac
--- old/xfce4-pulseaudio-plugin-0.2.3/configure.ac      2015-05-12 
03:23:15.000000000 +0200
+++ new/xfce4-pulseaudio-plugin-0.2.4/configure.ac      2015-10-27 
01:52:50.000000000 +0100
@@ -13,9 +13,9 @@
 dnl ***************************
 m4_define([pulseaudio_version_major], [0])
 m4_define([pulseaudio_version_minor], [2])
-m4_define([pulseaudio_version_micro], [3])
+m4_define([pulseaudio_version_micro], [4])
 m4_define([pulseaudio_version_nano],  []) dnl leave this empty to have no nano 
version
-m4_define([pulseaudio_version_build], [9371397])
+m4_define([pulseaudio_version_build], [3f0796f])
 m4_define([pulseaudio_version_tag],   [])
 m4_define([pulseaudio_version], 
[pulseaudio_version_major().pulseaudio_version_minor().pulseaudio_version_micro()ifelse(pulseaudio_version_nano(),
 [], [], [.pulseaudio_version_nano()])ifelse(pulseaudio_version_tag(), [git], 
[pulseaudio_version_tag()-pulseaudio_version_build()], 
[pulseaudio_version_tag()])])
 
@@ -28,7 +28,7 @@
 AC_PREREQ([2.50])
 AC_CONFIG_HEADERS([config.h])
 AC_CANONICAL_TARGET()
-AC_REVISION([9371397])
+AC_REVISION([3f0796f])
 
 dnl ***************************
 dnl *** Initialize automake ***
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/xfce4-pulseaudio-plugin-0.2.3/panel-plugin/pulseaudio-button.c 
new/xfce4-pulseaudio-plugin-0.2.4/panel-plugin/pulseaudio-button.c
--- old/xfce4-pulseaudio-plugin-0.2.3/panel-plugin/pulseaudio-button.c  
2015-05-03 22:52:14.000000000 +0200
+++ new/xfce4-pulseaudio-plugin-0.2.4/panel-plugin/pulseaudio-button.c  
2015-06-06 23:57:55.000000000 +0200
@@ -239,8 +239,6 @@
   pulseaudio_volume_set_volume (button->volume, new_volume);
   //g_debug ("dir: %d %f -> %f", event->direction, volume, new_volume);
 
-  pulseaudio_notify (button->plugin);
-
   return TRUE;
 }
 
@@ -282,6 +280,7 @@
                           gboolean          force_update)
 {
   gdouble      volume;
+  gboolean     connected;
   gboolean     muted;
   gchar       *tip_text;
   const gchar *icon_name;
@@ -291,7 +290,10 @@
 
   volume = pulseaudio_volume_get_volume (button->volume);
   muted = pulseaudio_volume_get_muted (button->volume);
-  if (muted)
+  connected = pulseaudio_volume_get_connected (button->volume);
+  if (!connected)
+    icon_name = icons[V_MUTED];
+  else if (muted)
     icon_name = icons[V_MUTED];
   else if (volume <= 0.0)
     icon_name = icons[V_MUTED];
@@ -302,7 +304,9 @@
   else
     icon_name = icons[V_HIGH];
 
-  if (muted)
+  if (!connected)
+    tip_text = g_strdup_printf (_("Not connected to the PulseAudio server"));
+  else if (muted)
     tip_text = g_strdup_printf (_("Volume %d%% (muted)"), (gint) round (volume 
* 100));
   else
     tip_text = g_strdup_printf (_("Volume %d%%"), (gint) round (volume * 100));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/xfce4-pulseaudio-plugin-0.2.3/panel-plugin/pulseaudio-config.c 
new/xfce4-pulseaudio-plugin-0.2.4/panel-plugin/pulseaudio-config.c
--- old/xfce4-pulseaudio-plugin-0.2.3/panel-plugin/pulseaudio-config.c  
2015-05-03 22:52:14.000000000 +0200
+++ new/xfce4-pulseaudio-plugin-0.2.4/panel-plugin/pulseaudio-config.c  
2015-06-10 23:52:28.000000000 +0200
@@ -46,6 +46,7 @@
 
 
 #define DEFAULT_ENABLE_KEYBOARD_SHORTCUTS         TRUE
+#define DEFAULT_SHOW_NOTIFICATIONS                TRUE
 #define DEFAULT_VOLUME_STEP                       6
 #define DEFAULT_VOLUME_MAX                        153
 
@@ -73,6 +74,7 @@
   GObject          __parent__;
 
   gboolean         enable_keyboard_shortcuts;
+  gboolean         show_notifications;
   guint            volume_step;
   guint            volume_max;
   gchar           *mixer_command;
@@ -84,6 +86,7 @@
   {
     PROP_0,
     PROP_ENABLE_KEYBOARD_SHORTCUTS,
+    PROP_SHOW_NOTIFICATIONS,
     PROP_VOLUME_STEP,
     PROP_VOLUME_MAX,
     PROP_MIXER_COMMAND,
@@ -123,6 +126,15 @@
 
 
   g_object_class_install_property (gobject_class,
+                                   PROP_SHOW_NOTIFICATIONS,
+                                   g_param_spec_boolean ("show-notifications", 
NULL, NULL,
+                                                         
DEFAULT_SHOW_NOTIFICATIONS,
+                                                         G_PARAM_READWRITE |
+                                                         
G_PARAM_STATIC_STRINGS));
+
+
+
+  g_object_class_install_property (gobject_class,
                                    PROP_VOLUME_STEP,
                                    g_param_spec_uint ("volume-step", NULL, 
NULL,
                                                       1, 50, 
DEFAULT_VOLUME_STEP,
@@ -164,6 +176,7 @@
 pulseaudio_config_init (PulseaudioConfig *config)
 {
   config->enable_keyboard_shortcuts = DEFAULT_ENABLE_KEYBOARD_SHORTCUTS;
+  config->show_notifications        = DEFAULT_SHOW_NOTIFICATIONS;
   config->volume_step               = DEFAULT_VOLUME_STEP;
   config->volume_max                = DEFAULT_VOLUME_MAX;
   config->mixer_command             = g_strdup (DEFAULT_MIXER_COMMAND);
@@ -198,6 +211,10 @@
       g_value_set_boolean (value, config->enable_keyboard_shortcuts);
       break;
 
+    case PROP_SHOW_NOTIFICATIONS:
+      g_value_set_boolean (value, config->show_notifications);
+      break;
+
     case PROP_VOLUME_STEP:
       g_value_set_uint (value, config->volume_step);
       break;
@@ -240,6 +257,16 @@
         }
       break;
 
+    case PROP_SHOW_NOTIFICATIONS:
+      val_bool = g_value_get_boolean (value);
+      if (config->show_notifications != val_bool)
+        {
+          config->show_notifications = val_bool;
+          g_object_notify (G_OBJECT (config), "show-notifications");
+          g_signal_emit (G_OBJECT (config), pulseaudio_config_signals 
[CONFIGURATION_CHANGED], 0);
+        }
+      break;
+
     case PROP_VOLUME_STEP:
       val_uint = g_value_get_uint (value);
       if (config->volume_step != val_uint)
@@ -285,6 +312,17 @@
 
 
 
+gboolean
+pulseaudio_config_get_show_notifications (PulseaudioConfig *config)
+{
+  g_return_val_if_fail (IS_PULSEAUDIO_CONFIG (config), 
DEFAULT_SHOW_NOTIFICATIONS);
+
+  return config->show_notifications;
+}
+
+
+
+
 guint
 pulseaudio_config_get_volume_step (PulseaudioConfig *config)
 {
@@ -335,6 +373,10 @@
       xfconf_g_property_bind (channel, property, G_TYPE_BOOLEAN, config, 
"enable-keyboard-shortcuts");
       g_free (property);
 
+      property = g_strconcat (property_base, "/show-notifications", NULL);
+      xfconf_g_property_bind (channel, property, G_TYPE_BOOLEAN, config, 
"show-notifications");
+      g_free (property);
+
       property = g_strconcat (property_base, "/volume-step", NULL);
       xfconf_g_property_bind (channel, property, G_TYPE_UINT, config, 
"volume-step");
       g_free (property);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/xfce4-pulseaudio-plugin-0.2.3/panel-plugin/pulseaudio-config.h 
new/xfce4-pulseaudio-plugin-0.2.4/panel-plugin/pulseaudio-config.h
--- old/xfce4-pulseaudio-plugin-0.2.3/panel-plugin/pulseaudio-config.h  
2015-05-03 22:52:14.000000000 +0200
+++ new/xfce4-pulseaudio-plugin-0.2.4/panel-plugin/pulseaudio-config.h  
2015-06-10 23:52:56.000000000 +0200
@@ -39,6 +39,7 @@
 PulseaudioConfig  *pulseaudio_config_new                            (const 
gchar          *property_base);
 
 gboolean           pulseaudio_config_get_enable_keyboard_shortcuts  
(PulseaudioConfig     *config);
+gboolean           pulseaudio_config_get_show_notifications         
(PulseaudioConfig     *config);
 guint              pulseaudio_config_get_volume_step                
(PulseaudioConfig     *config);
 guint              pulseaudio_config_get_volume_max                 
(PulseaudioConfig     *config);
 const gchar       *pulseaudio_config_get_mixer_command              
(PulseaudioConfig     *config);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/xfce4-pulseaudio-plugin-0.2.3/panel-plugin/pulseaudio-dialog.c 
new/xfce4-pulseaudio-plugin-0.2.4/panel-plugin/pulseaudio-dialog.c
--- old/xfce4-pulseaudio-plugin-0.2.3/panel-plugin/pulseaudio-dialog.c  
2015-05-03 22:50:31.000000000 +0200
+++ new/xfce4-pulseaudio-plugin-0.2.4/panel-plugin/pulseaudio-dialog.c  
2015-06-11 00:13:09.000000000 +0200
@@ -182,6 +182,16 @@
                               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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/xfce4-pulseaudio-plugin-0.2.3/panel-plugin/pulseaudio-dialog.glade 
new/xfce4-pulseaudio-plugin-0.2.4/panel-plugin/pulseaudio-dialog.glade
--- old/xfce4-pulseaudio-plugin-0.2.3/panel-plugin/pulseaudio-dialog.glade      
2015-05-03 22:50:31.000000000 +0200
+++ new/xfce4-pulseaudio-plugin-0.2.4/panel-plugin/pulseaudio-dialog.glade      
2015-06-11 00:16:47.000000000 +0200
@@ -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>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/xfce4-pulseaudio-plugin-0.2.3/panel-plugin/pulseaudio-dialog_ui.h 
new/xfce4-pulseaudio-plugin-0.2.4/panel-plugin/pulseaudio-dialog_ui.h
--- old/xfce4-pulseaudio-plugin-0.2.3/panel-plugin/pulseaudio-dialog_ui.h       
2015-05-03 23:32:09.000000000 +0200
+++ new/xfce4-pulseaudio-plugin-0.2.4/panel-plugin/pulseaudio-dialog_ui.h       
2015-06-11 00:16:51.000000000 +0200
@@ -62,70 +62,79 @@
   "ine\">True</property><property name=\"draw_indicator\">True</property><"
   "/object><packing><property name=\"expand\">True</property><property nam"
   "e=\"fill\">True</property><property name=\"position\">0</property></pac"
-  "king></child></object></child></object></child><child type=\"label\"><o"
-  "bject class=\"GtkLabel\" id=\"label1\"><property name=\"visible\">True<"
-  "/property><property name=\"can_focus\">False</property><property name=\""
-  "label\" translatable=\"yes\">Behaviour</property><attributes><attribute"
-  " name=\"weight\" value=\"bold\"/></attributes></object></child></object"
-  "><packing><property name=\"expand\">False</property><property name=\"fi"
-  "ll\">True</property><property name=\"position\">0</property></packing><"
-  "/child><child><object class=\"GtkFrame\" id=\"frame2\"><property name=\""
-  "visible\">True</property><property name=\"can_focus\">False</property><"
-  "property name=\"label_xalign\">0</property><property name=\"shadow_type"
-  "\">none</property><child><object class=\"GtkAlignment\" id=\"alignment2"
-  "\"><property name=\"visible\">True</property><property name=\"can_focus"
-  "\">False</property><property name=\"left_padding\">12</property><child>"
-  "<object class=\"GtkVBox\" id=\"vbox4\"><property name=\"visible\">True<"
-  "/property><property name=\"can_focus\">False</property><property name=\""
-  "border_width\">6</property><property name=\"spacing\">6</property><chil"
-  "d><object class=\"GtkTable\" id=\"table1\"><property name=\"visible\">T"
-  "rue</property><property name=\"can_focus\">False</property><property na"
-  "me=\"n_rows\">2</property><property name=\"n_columns\">2</property><pro"
-  "perty name=\"column_spacing\">12</property><property name=\"row_spacing"
-  "\">6</property><child><object class=\"GtkLabel\" id=\"label2\"><propert"
-  "y name=\"visible\">True</property><property name=\"can_focus\">False</p"
-  "roperty><property name=\"label\" translatable=\"yes\">Audio _Mixer</pro"
-  "perty><property name=\"use_underline\">True</property></object><packing"
-  "><property name=\"x_options\">GTK_FILL</property><property name=\"y_opt"
-  "ions\">GTK_FILL</property></packing></child><child><object class=\"GtkE"
-  "ntry\" id=\"entry-mixer-command\"><property name=\"visible\">True</prop"
-  "erty><property name=\"can_focus\">True</property><property name=\"toolt"
-  "ip_text\" translatable=\"yes\">Audio mixer command that can be executed"
-  " from the context menu, e.g. \"pavucontrol\", \"unity-control-center so"
-  "und\".</property><property name=\"invisible_char\">\342\200\242</proper"
-  "ty><property name=\"primary_icon_activatable\">False</property><propert"
-  "y name=\"secondary_icon_activatable\">False</property><property name=\""
-  "primary_icon_sensitive\">True</property><property name=\"secondary_icon"
-  "_sensitive\">True</property></object><packing><property name=\"left_att"
-  "ach\">1</property><property name=\"right_attach\">2</property><property"
-  " name=\"y_options\">GTK_FILL</property></packing></child><child><object"
-  " class=\"GtkAlignment\" id=\"alignment3\"><property name=\"visible\">Tr"
-  "ue</property><property name=\"can_focus\">False</property><property nam"
-  "e=\"xalign\">0</property><property name=\"xscale\">0</property><child><"
-  "object class=\"GtkButton\" id=\"button-run-mixer\"><property name=\"lab"
-  "el\" translatable=\"yes\">_Run Audio Mixer...</property><property name="
-  "\"visible\">True</property><property name=\"can_focus\">True</property>"
-  "<property name=\"receives_default\">True</property><property name=\"ima"
-  "ge\">image1</property><property name=\"use_underline\">True</property><"
-  "/object></child></object><packing><property name=\"right_attach\">2</pr"
-  "operty><property name=\"top_attach\">1</property><property name=\"botto"
-  "m_attach\">2</property><property name=\"y_options\">GTK_FILL</property>"
-  "</packing></child></object><packing><property name=\"expand\">False</pr"
-  "operty><property name=\"fill\">True</property><property name=\"position"
-  "\">0</property></packing></child></object></child></object></child><chi"
-  "ld type=\"label\"><object class=\"GtkLabel\" id=\"label3\"><property na"
-  "me=\"visible\">True</property><property name=\"can_focus\">False</prope"
-  "rty><property name=\"label\" translatable=\"yes\">Sound settings</prope"
-  "rty><attributes><attribute name=\"weight\" value=\"bold\"/></attributes"
-  "></object></child></object><packing><property name=\"expand\">False</pr"
-  "operty><property name=\"fill\">True</property><property name=\"position"
-  "\">1</property></packing></child></object><packing><property name=\"exp"
-  "and\">False</property><property name=\"fill\">True</property><property "
-  "name=\"position\">1</property></packing></child></object></child><actio"
-  "n-widgets><action-widget response=\"0\">close-button</action-widget><ac"
-  "tion-widget response=\"0\">help-button</action-widget></action-widgets>"
-  "</object></interface>"
+  "king></child><child><object class=\"GtkCheckButton\" id=\"checkbutton-s"
+  "how-notifications\"><property name=\"label\" translatable=\"yes\">Show "
+  "_notifications when volume changes</property><property name=\"visible\""
+  ">True</property><property name=\"can_focus\">True</property><property n"
+  "ame=\"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></ch"
+  "ild><child type=\"label\"><object class=\"GtkLabel\" id=\"label1\"><pro"
+  "perty name=\"visible\">True</property><property name=\"can_focus\">Fals"
+  "e</property><property name=\"label\" translatable=\"yes\">Behaviour</pr"
+  "operty><attributes><attribute name=\"weight\" value=\"bold\"/></attribu"
+  "tes></object></child></object><packing><property name=\"expand\">False<"
+  "/property><property name=\"fill\">True</property><property name=\"posit"
+  "ion\">0</property></packing></child><child><object class=\"GtkFrame\" i"
+  "d=\"frame2\"><property name=\"visible\">True</property><property name=\""
+  "can_focus\">False</property><property name=\"label_xalign\">0</property"
+  "><property name=\"shadow_type\">none</property><child><object class=\"G"
+  "tkAlignment\" id=\"alignment2\"><property name=\"visible\">True</proper"
+  "ty><property name=\"can_focus\">False</property><property name=\"left_p"
+  "adding\">12</property><child><object class=\"GtkVBox\" id=\"vbox4\"><pr"
+  "operty name=\"visible\">True</property><property name=\"can_focus\">Fal"
+  "se</property><property name=\"border_width\">6</property><property name"
+  "=\"spacing\">6</property><child><object class=\"GtkTable\" id=\"table1\""
+  "><property name=\"visible\">True</property><property name=\"can_focus\""
+  ">False</property><property name=\"n_rows\">2</property><property name=\""
+  "n_columns\">2</property><property name=\"column_spacing\">12</property>"
+  "<property name=\"row_spacing\">6</property><child><object class=\"GtkLa"
+  "bel\" id=\"label2\"><property name=\"visible\">True</property><property"
+  " name=\"can_focus\">False</property><property name=\"label\" translatab"
+  "le=\"yes\">Audio _Mixer</property><property name=\"use_underline\">True"
+  "</property></object><packing><property name=\"x_options\">GTK_FILL</pro"
+  "perty><property name=\"y_options\">GTK_FILL</property></packing></child"
+  "><child><object class=\"GtkEntry\" id=\"entry-mixer-command\"><property"
+  " name=\"visible\">True</property><property name=\"can_focus\">True</pro"
+  "perty><property name=\"tooltip_text\" translatable=\"yes\">Audio mixer "
+  "command that can be executed from the context menu, e.g. \"pavucontrol\""
+  ", \"unity-control-center sound\".</property><property name=\"invisible_"
+  "char\">\342\200\242</property><property name=\"primary_icon_activatable"
+  "\">False</property><property name=\"secondary_icon_activatable\">False<"
+  "/property><property name=\"primary_icon_sensitive\">True</property><pro"
+  "perty name=\"secondary_icon_sensitive\">True</property></object><packin"
+  "g><property name=\"left_attach\">1</property><property name=\"right_att"
+  "ach\">2</property><property name=\"y_options\">GTK_FILL</property></pac"
+  "king></child><child><object class=\"GtkAlignment\" id=\"alignment3\"><p"
+  "roperty name=\"visible\">True</property><property name=\"can_focus\">Fa"
+  "lse</property><property name=\"xalign\">0</property><property name=\"xs"
+  "cale\">0</property><child><object class=\"GtkButton\" id=\"button-run-m"
+  "ixer\"><property name=\"label\" translatable=\"yes\">_Run Audio Mixer.."
+  ".</property><property name=\"visible\">True</property><property name=\""
+  "can_focus\">True</property><property name=\"receives_default\">True</pr"
+  "operty><property name=\"image\">image1</property><property name=\"use_u"
+  "nderline\">True</property></object></child></object><packing><property "
+  "name=\"right_attach\">2</property><property name=\"top_attach\">1</prop"
+  "erty><property name=\"bottom_attach\">2</property><property name=\"y_op"
+  "tions\">GTK_FILL</property></packing></child></object><packing><propert"
+  "y name=\"expand\">False</property><property name=\"fill\">True</propert"
+  "y><property name=\"position\">0</property></packing></child></object></"
+  "child></object></child><child type=\"label\"><object class=\"GtkLabel\""
+  " id=\"label3\"><property name=\"visible\">True</property><property name"
+  "=\"can_focus\">False</property><property name=\"label\" translatable=\""
+  "yes\">Sound settings</property><attributes><attribute name=\"weight\" v"
+  "alue=\"bold\"/></attributes></object></child></object><packing><propert"
+  "y name=\"expand\">False</property><property name=\"fill\">True</propert"
+  "y><property name=\"position\">1</property></packing></child></object><p"
+  "acking><property name=\"expand\">False</property><property name=\"fill\""
+  ">True</property><property name=\"position\">1</property></packing></chi"
+  "ld></object></child><action-widgets><action-widget response=\"0\">close"
+  "-button</action-widget><action-widget response=\"0\">help-button</actio"
+  "n-widget></action-widgets></object></interface>"
 };
 
-static const unsigned pulseaudio_dialog_ui_length = 7868u;
+static const unsigned pulseaudio_dialog_ui_length = 8508u;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/xfce4-pulseaudio-plugin-0.2.3/panel-plugin/pulseaudio-notify.c 
new/xfce4-pulseaudio-plugin-0.2.4/panel-plugin/pulseaudio-notify.c
--- old/xfce4-pulseaudio-plugin-0.2.3/panel-plugin/pulseaudio-notify.c  
2015-05-03 22:52:14.000000000 +0200
+++ new/xfce4-pulseaudio-plugin-0.2.4/panel-plugin/pulseaudio-notify.c  
2015-06-10 23:56:50.000000000 +0200
@@ -71,6 +71,8 @@
 
   gboolean              gauge_notifications;
   NotifyNotification   *notification;
+
+  gulong                volume_changed_id;
 };
 
 struct _PulseaudioNotifyClass
@@ -102,6 +104,7 @@
 
   notify->gauge_notifications = TRUE;
   notify->notification = NULL;
+  notify->volume_changed_id = 0;
 
   //g_set_application_name ("Xfce volume control");
   notify_init ("Xfce volume control");
@@ -119,7 +122,7 @@
       g_list_free (caps_list);
     }
   notify->notification = notify_notification_new ("xfce4-pulseaudio-plugin", 
NULL, NULL);
-  notify_notification_set_timeout (notify->notification, 1500);
+  notify_notification_set_timeout (notify->notification, 2000);
 }
 
 
@@ -140,29 +143,41 @@
 
 
 
-void
+static void
 pulseaudio_notify_notify (PulseaudioNotify *notify)
 {
   GError      *error = NULL;
   gdouble      volume;
   gint         volume_i;
   gboolean     muted;
+  gboolean     connected;
   gchar       *title = NULL;
   const gchar *icon = NULL;
 
   g_return_if_fail (IS_PULSEAUDIO_NOTIFY (notify));
   g_return_if_fail (IS_PULSEAUDIO_VOLUME (notify->volume));
 
+  if (!pulseaudio_config_get_show_notifications (notify->config))
+    return;
+
   volume = pulseaudio_volume_get_volume (notify->volume);
   muted = pulseaudio_volume_get_muted (notify->volume);
+  connected = pulseaudio_volume_get_connected (notify->volume);
   volume_i = (gint) round (volume * 100);
 
-  if (muted)
+  if (!connected)
+    volume_i = 0;
+
+  if (!connected)
+    title = g_strdup_printf ( _("Not connected to the PulseAudio server"));
+  else if (muted)
     title = g_strdup_printf ( _("Volume %d%c (muted)"), volume_i, '%');
   else
     title = g_strdup_printf ( _("Volume %d%c"), volume_i, '%');
 
-  if (muted)
+  if (!connected)
+    icon = icons[V_MUTED];
+  else if (muted)
     icon = icons[V_MUTED];
   else if (volume <= 0.0)
     icon = icons[V_MUTED];
@@ -198,6 +213,17 @@
 
 
 
+static void
+pulseaudio_notify_volume_changed (PulseaudioNotify  *notify,
+                                  PulseaudioVolume  *volume)
+{
+  g_return_if_fail (IS_PULSEAUDIO_NOTIFY (notify));
+
+  pulseaudio_notify_notify (notify);
+}
+
+
+
 PulseaudioNotify *
 pulseaudio_notify_new (PulseaudioConfig *config,
                        PulseaudioVolume *volume)
@@ -211,6 +237,9 @@
 
   notify->config = config;
   notify->volume = volume;
+  notify->volume_changed_id =
+    g_signal_connect_swapped (G_OBJECT (notify->volume), "volume-changed",
+                              G_CALLBACK (pulseaudio_notify_volume_changed), 
notify);
 
   return notify;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/xfce4-pulseaudio-plugin-0.2.3/panel-plugin/pulseaudio-notify.h 
new/xfce4-pulseaudio-plugin-0.2.4/panel-plugin/pulseaudio-notify.h
--- old/xfce4-pulseaudio-plugin-0.2.3/panel-plugin/pulseaudio-notify.h  
2015-05-03 22:52:14.000000000 +0200
+++ new/xfce4-pulseaudio-plugin-0.2.4/panel-plugin/pulseaudio-notify.h  
2015-06-06 22:19:45.000000000 +0200
@@ -42,8 +42,6 @@
 PulseaudioNotify       *pulseaudio_notify_new             (PulseaudioConfig 
*config,
                                                            PulseaudioVolume 
*volume);
 
-void                    pulseaudio_notify_notify          (PulseaudioNotify 
*notify);
-
 G_END_DECLS
 
 #endif /* HAVE_LIBNOTIFY */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/xfce4-pulseaudio-plugin-0.2.3/panel-plugin/pulseaudio-plugin.c 
new/xfce4-pulseaudio-plugin-0.2.4/panel-plugin/pulseaudio-plugin.c
--- old/xfce4-pulseaudio-plugin-0.2.3/panel-plugin/pulseaudio-plugin.c  
2015-05-03 22:52:14.000000000 +0200
+++ new/xfce4-pulseaudio-plugin-0.2.4/panel-plugin/pulseaudio-plugin.c  
2015-06-06 22:22:15.000000000 +0200
@@ -306,7 +306,6 @@
     pulseaudio_volume_set_volume (pulseaudio_plugin->volume, MIN (volume + 
volume_step, MAX (volume, 1.0)));
   else if (strcmp (keystring, PULSEAUDIO_PLUGIN_LOWER_VOLUME_KEY) == 0)
     pulseaudio_volume_set_volume (pulseaudio_plugin->volume, volume - 
volume_step);
-  pulseaudio_notify (pulseaudio_plugin);
 }
 
 
@@ -319,21 +318,10 @@
   pulseaudio_debug ("%s pressed", keystring);
 
   pulseaudio_volume_toggle_muted (pulseaudio_plugin->volume);
-  pulseaudio_notify (pulseaudio_plugin);
 }
 #endif
 
 
-void
-pulseaudio_notify (PulseaudioPlugin *pulseaudio_plugin)
-{
-#ifdef HAVE_LIBNOTIFY
-  pulseaudio_notify_notify (pulseaudio_plugin->notify);
-#endif
-}
-
-
-
 static void
 pulseaudio_plugin_construct (XfcePanelPlugin *plugin)
 {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/xfce4-pulseaudio-plugin-0.2.3/panel-plugin/pulseaudio-plugin.h 
new/xfce4-pulseaudio-plugin-0.2.4/panel-plugin/pulseaudio-plugin.h
--- old/xfce4-pulseaudio-plugin-0.2.3/panel-plugin/pulseaudio-plugin.h  
2015-05-03 22:52:14.000000000 +0200
+++ new/xfce4-pulseaudio-plugin-0.2.4/panel-plugin/pulseaudio-plugin.h  
2015-06-06 22:22:23.000000000 +0200
@@ -37,8 +37,6 @@
 
 void  pulseaudio_plugin_register_type (XfcePanelTypeModule *type_module);
 
-void  pulseaudio_notify               (PulseaudioPlugin    *pulseaudio_plugin);
-
 G_END_DECLS
 
 #endif /* !__PULSEAUDIO_PLUGIN_H__ */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/xfce4-pulseaudio-plugin-0.2.3/panel-plugin/pulseaudio-volume.c 
new/xfce4-pulseaudio-plugin-0.2.4/panel-plugin/pulseaudio-volume.c
--- old/xfce4-pulseaudio-plugin-0.2.3/panel-plugin/pulseaudio-volume.c  
2015-05-03 22:52:14.000000000 +0200
+++ new/xfce4-pulseaudio-plugin-0.2.4/panel-plugin/pulseaudio-volume.c  
2015-06-06 23:55:44.000000000 +0200
@@ -37,12 +37,13 @@
 #include "pulseaudio-volume.h"
 
 
-static void                 pulseaudio_volume_finalize        (GObject         
   *object);
-static void                 pulseaudio_volume_connect         
(PulseaudioVolume   *volume);
-static gdouble              pulseaudio_volume_v2d             
(PulseaudioVolume   *volume,
-                                                               pa_volume_t     
    vol);
-static pa_volume_t          pulseaudio_volume_d2v             
(PulseaudioVolume   *volume,
-                                                               gdouble         
    vol);
+static void                 pulseaudio_volume_finalize           (GObject      
      *object);
+static void                 pulseaudio_volume_connect            
(PulseaudioVolume   *volume);
+static gdouble              pulseaudio_volume_v2d                
(PulseaudioVolume   *volume,
+                                                                  pa_volume_t  
       vol);
+static pa_volume_t          pulseaudio_volume_d2v                
(PulseaudioVolume   *volume,
+                                                                  gdouble      
       vol);
+static gboolean             pulseaudio_volume_reconnect_timeout  (gpointer     
       userdata);
 
 
 struct _PulseaudioVolume
@@ -61,7 +62,7 @@
   gdouble               volume_mic;
   gboolean              muted_mic;
 
-
+  guint                 reconnect_timer_id;
 };
 
 struct _PulseaudioVolumeClass
@@ -111,6 +112,7 @@
   volume->connected = FALSE;
   volume->volume = 0.0;
   volume->muted = FALSE;
+  volume->reconnect_timer_id = 0;
 
   volume->pa_mainloop = pa_glib_mainloop_new (NULL);
 
@@ -146,8 +148,9 @@
 
   PulseaudioVolume *volume = PULSEAUDIO_VOLUME (userdata);
   if (i == NULL) return;
+  pulseaudio_debug ("sink info: %s, %s", i->name, i->description);
 
-  muted = (gboolean) i->mute;
+  muted = !!(i->mute);
   vol = pulseaudio_volume_v2d (volume, i->volume.values[0]);
 
   if (volume->muted != muted)
@@ -163,6 +166,7 @@
       volume->volume = vol;
       g_signal_emit (G_OBJECT (volume), pulseaudio_volume_signals 
[VOLUME_CHANGED], 0);
     }
+  pulseaudio_debug ("volume: %f, muted: %d", vol, muted);
 }
 
 
@@ -175,7 +179,7 @@
   PulseaudioVolume *volume = PULSEAUDIO_VOLUME (userdata);
   if (i == NULL) return;
 
-  pulseaudio_debug ("default sink name = %s\n", i->default_sink_name);
+  pulseaudio_debug ("server: %s@%s, v.%s", i->user_name, i->server_name, 
i->server_version);
   pa_context_get_sink_info_by_name (context, i->default_sink_name, 
pulseaudio_volume_sink_info_cb, volume);
 }
 
@@ -206,19 +210,19 @@
     {
     case PA_SUBSCRIPTION_EVENT_SINK          :
       pulseaudio_volume_sink_check (volume, context);
-      pulseaudio_debug ("PulseAudio sink event");
+      pulseaudio_debug ("received sink event");
       break;
 
     case PA_SUBSCRIPTION_EVENT_SOURCE        :
-      pulseaudio_debug ("PulseAudio source event");
+      pulseaudio_debug ("received source event");
       break;
 
     case PA_SUBSCRIPTION_EVENT_SOURCE_OUTPUT :
-      pulseaudio_debug ("PulseAudio source output event");
+      pulseaudio_debug ("received source output event");
       break;
 
     default                                  :
-      pulseaudio_debug ("Unknown PulseAudio event");
+      pulseaudio_debug ("received unknown pulseaudio event");
       break;
     }
 }
@@ -240,12 +244,22 @@
 
       pulseaudio_debug ("PulseAudio connection established");
       volume->connected = TRUE;
+      // Check current sink volume manually. PA sink events usually not 
emitted.
       pulseaudio_volume_sink_check (volume, context);
+      g_signal_emit (G_OBJECT (volume), pulseaudio_volume_signals 
[VOLUME_CHANGED], 0);
       break;
 
     case PA_CONTEXT_FAILED       :
     case PA_CONTEXT_TERMINATED   :
-      g_warning ("Disconected from PulseAudio server");
+      g_warning ("Disconected from the PulseAudio server. Attempting to 
reconnect in 5 seconds.");
+      volume->pa_context = NULL;
+      volume->connected = FALSE;
+      volume->volume = 0.0;
+      volume->muted = FALSE;
+      g_signal_emit (G_OBJECT (volume), pulseaudio_volume_signals 
[VOLUME_CHANGED], 0);
+      if (volume->reconnect_timer_id == 0)
+        volume->reconnect_timer_id = g_timeout_add_seconds
+          (5, pulseaudio_volume_reconnect_timeout, volume);
       break;
 
     case PA_CONTEXT_CONNECTING   :
@@ -301,6 +315,31 @@
 
 
 
+static gboolean
+pulseaudio_volume_reconnect_timeout  (gpointer userdata)
+{
+  PulseaudioVolume *volume = PULSEAUDIO_VOLUME (userdata);
+
+  volume->reconnect_timer_id = 0;
+  pulseaudio_volume_connect (volume);
+
+  return FALSE; // stop the timer
+}
+
+
+
+
+
+gboolean
+pulseaudio_volume_get_connected (PulseaudioVolume *volume)
+{
+  g_return_val_if_fail (IS_PULSEAUDIO_VOLUME (volume), FALSE);
+
+  return volume->connected;
+}
+
+
+
 static gdouble
 pulseaudio_volume_v2d (PulseaudioVolume *volume,
                        pa_volume_t       pa_volume)
@@ -383,6 +422,7 @@
                              gboolean          muted)
 {
   g_return_if_fail (IS_PULSEAUDIO_VOLUME (volume));
+  g_return_if_fail (volume->pa_context != NULL);
   g_return_if_fail (pa_context_get_state (volume->pa_context) == 
PA_CONTEXT_READY);
 
   if (volume->muted != muted)
@@ -456,6 +496,7 @@
   gdouble vol_trim;
 
   g_return_if_fail (IS_PULSEAUDIO_VOLUME (volume));
+  g_return_if_fail (volume->pa_context != NULL);
   g_return_if_fail (pa_context_get_state (volume->pa_context) == 
PA_CONTEXT_READY);
 
   vol_max = pulseaudio_config_get_volume_max (volume->config) / 100.0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/xfce4-pulseaudio-plugin-0.2.3/panel-plugin/pulseaudio-volume.h 
new/xfce4-pulseaudio-plugin-0.2.4/panel-plugin/pulseaudio-volume.h
--- old/xfce4-pulseaudio-plugin-0.2.3/panel-plugin/pulseaudio-volume.h  
2015-05-03 22:52:14.000000000 +0200
+++ new/xfce4-pulseaudio-plugin-0.2.4/panel-plugin/pulseaudio-volume.h  
2015-06-06 22:58:25.000000000 +0200
@@ -37,6 +37,8 @@
 
 PulseaudioVolume       *pulseaudio_volume_new             (PulseaudioConfig 
*config);
 
+gboolean                pulseaudio_volume_get_connected   (PulseaudioVolume 
*volume);
+
 gdouble                 pulseaudio_volume_get_volume      (PulseaudioVolume 
*volume);
 void                    pulseaudio_volume_set_volume      (PulseaudioVolume 
*volume,
                                                            gdouble           
vol);


Reply via email to