[gnome-flashback] sound-applet: build also status notifier item



commit 20e53bcfcf93e2ef04874caeb641d476596c2244
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Sat Nov 5 21:44:08 2016 +0200

    sound-applet: build also status notifier item

 gnome-flashback/libsound-applet/gf-sound-applet.c |   19 -------------------
 gnome-flashback/libsound-applet/gf-sound-item.c   |    2 --
 gnome-flashback/libsound-applet/gf-sound-item.h   |    2 +-
 3 files changed, 1 insertions(+), 22 deletions(-)
---
diff --git a/gnome-flashback/libsound-applet/gf-sound-applet.c 
b/gnome-flashback/libsound-applet/gf-sound-applet.c
index 2d7f2cd..315333e 100644
--- a/gnome-flashback/libsound-applet/gf-sound-applet.c
+++ b/gnome-flashback/libsound-applet/gf-sound-applet.c
@@ -33,10 +33,7 @@
 #include "gf-sound-applet.h"
 #include "gvc-mixer-control.h"
 #include "gvc-stream-status-icon.h"
-
-#ifdef WITH_LIBSTATUS_NOTIFIER
 #include "gf-sound-item.h"
-#endif
 
 static const gchar *output_icons[] =
 {
@@ -64,10 +61,8 @@ struct _GfSoundApplet
   GvcStreamStatusIcon *output_status_icon;
   GvcMixerControl     *control;
 
-#ifdef WITH_LIBSTATUS_NOTIFIER
   GfSoundItem         *output_item;
   GfSoundItem         *input_item;
-#endif
 };
 
 G_DEFINE_TYPE (GfSoundApplet, gf_sound_applet, G_TYPE_OBJECT)
@@ -90,12 +85,10 @@ maybe_show_status_icons (GfSoundApplet *applet)
   gtk_status_icon_set_visible (GTK_STATUS_ICON (applet->output_status_icon), show);
   G_GNUC_END_IGNORE_DEPRECATIONS
 
-#ifdef WITH_LIBSTATUS_NOTIFIER
   if (show)
     sn_item_register (SN_ITEM (applet->output_item));
   else
     sn_item_unregister (SN_ITEM (applet->output_item));
-#endif
 
   show = FALSE;
   stream = gvc_mixer_control_get_default_source (applet->control);
@@ -130,12 +123,10 @@ maybe_show_status_icons (GfSoundApplet *applet)
   gtk_status_icon_set_visible (GTK_STATUS_ICON (applet->input_status_icon), show);
   G_GNUC_END_IGNORE_DEPRECATIONS
 
-#ifdef WITH_LIBSTATUS_NOTIFIER
   if (show)
     sn_item_register (SN_ITEM (applet->input_item));
   else
     sn_item_unregister (SN_ITEM (applet->input_item));
-#endif
 
   g_slist_free (source_outputs);
 }
@@ -150,9 +141,7 @@ update_default_sink (GfSoundApplet *applet)
   if (stream != NULL)
     {
       gvc_stream_status_icon_set_mixer_stream (applet->output_status_icon, stream);
-#ifdef WITH_LIBSTATUS_NOTIFIER
       gf_sound_item_set_mixer_stream (applet->output_item, stream);
-#endif
       maybe_show_status_icons (applet);
     }
   else
@@ -171,9 +160,7 @@ update_default_source (GfSoundApplet *applet)
   if (stream != NULL)
     {
       gvc_stream_status_icon_set_mixer_stream (applet->input_status_icon, stream);
-#ifdef WITH_LIBSTATUS_NOTIFIER
       gf_sound_item_set_mixer_stream (applet->input_item, stream);
-#endif
       maybe_show_status_icons (applet);
     }
   else
@@ -288,10 +275,8 @@ gf_sound_applet_dispose (GObject *object)
   g_clear_object (&applet->input_status_icon);
   g_clear_object (&applet->control);
 
-#ifdef WITH_LIBSTATUS_NOTIFIER
   g_clear_object (&applet->output_item);
   g_clear_object (&applet->input_item);
-#endif
 
   G_OBJECT_CLASS (gf_sound_applet_parent_class)->dispose (object);
 }
@@ -311,9 +296,7 @@ static void
 gf_sound_applet_init (GfSoundApplet *applet)
 {
   GvcStreamStatusIcon *icon;
-#ifdef WITH_LIBSTATUS_NOTIFIER
   SnItemCategory category;
-#endif
 
   /* Output icon */
   icon = gvc_stream_status_icon_new (NULL, output_icons);
@@ -335,7 +318,6 @@ gf_sound_applet_init (GfSoundApplet *applet)
 
   applet->input_status_icon = icon;
 
-#ifdef WITH_LIBSTATUS_NOTIFIER
   category = SN_ITEM_CATEGORY_HARDWARE;
 
   applet->output_item = gf_sound_item_new (category,
@@ -349,7 +331,6 @@ gf_sound_applet_init (GfSoundApplet *applet)
                                           _("Microphone Volume"),
                                           _("Input"),
                                           input_icons);
-#endif
 }
 
 GfSoundApplet *
diff --git a/gnome-flashback/libsound-applet/gf-sound-item.c b/gnome-flashback/libsound-applet/gf-sound-item.c
index df23d41..dd9cd5d 100644
--- a/gnome-flashback/libsound-applet/gf-sound-item.c
+++ b/gnome-flashback/libsound-applet/gf-sound-item.c
@@ -16,7 +16,6 @@
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 
-#if 0
 #include "config.h"
 
 #include <glib/gi18n.h>
@@ -687,4 +686,3 @@ gf_sound_item_set_mixer_stream (GfSoundItem    *item,
 
   update_icon (item);
 }
-#endif
diff --git a/gnome-flashback/libsound-applet/gf-sound-item.h b/gnome-flashback/libsound-applet/gf-sound-item.h
index d6e3adb..d4d5950 100644
--- a/gnome-flashback/libsound-applet/gf-sound-item.h
+++ b/gnome-flashback/libsound-applet/gf-sound-item.h
@@ -19,9 +19,9 @@
 #define GF_SOUND_ITEM_H
 
 #include <glib-object.h>
-#include <libstatus-notifier/sn.h>
 
 #include "gvc-mixer-stream.h"
+#include "libstatus-notifier/sn-item.h"
 
 G_BEGIN_DECLS
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]