[gnome-flashback] sound-applet: remove GtkStatusIcon



commit b9d91a03e0eaad5ab612bbd62294de6dfa5af257
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Sun Nov 6 15:08:23 2016 +0200

    sound-applet: remove GtkStatusIcon

 gnome-flashback/libsound-applet/Makefile.am        |    2 -
 gnome-flashback/libsound-applet/gf-sound-applet.c  |   44 +-
 .../libsound-applet/gvc-stream-status-icon.c       |  797 --------------------
 .../libsound-applet/gvc-stream-status-icon.h       |   60 --
 po/POTFILES.in                                     |    1 -
 5 files changed, 4 insertions(+), 900 deletions(-)
---
diff --git a/gnome-flashback/libsound-applet/Makefile.am b/gnome-flashback/libsound-applet/Makefile.am
index c5ef663..d57254d 100644
--- a/gnome-flashback/libsound-applet/Makefile.am
+++ b/gnome-flashback/libsound-applet/Makefile.am
@@ -23,8 +23,6 @@ libsound_applet_la_SOURCES = \
        gf-sound-item.h \
        gvc-channel-bar.c \
        gvc-channel-bar.h \
-       gvc-stream-status-icon.c \
-       gvc-stream-status-icon.h \
        $(NULL)
 
 libsound_applet_la_LDFLAGS = \
diff --git a/gnome-flashback/libsound-applet/gf-sound-applet.c 
b/gnome-flashback/libsound-applet/gf-sound-applet.c
index 315333e..aa7e8fb 100644
--- a/gnome-flashback/libsound-applet/gf-sound-applet.c
+++ b/gnome-flashback/libsound-applet/gf-sound-applet.c
@@ -32,7 +32,6 @@
 
 #include "gf-sound-applet.h"
 #include "gvc-mixer-control.h"
-#include "gvc-stream-status-icon.h"
 #include "gf-sound-item.h"
 
 static const gchar *output_icons[] =
@@ -55,14 +54,12 @@ static const gchar *input_icons[] =
 
 struct _GfSoundApplet
 {
-  GObject              parent;
+  GObject          parent;
 
-  GvcStreamStatusIcon *input_status_icon;
-  GvcStreamStatusIcon *output_status_icon;
-  GvcMixerControl     *control;
+  GvcMixerControl *control;
 
-  GfSoundItem         *output_item;
-  GfSoundItem         *input_item;
+  GfSoundItem     *output_item;
+  GfSoundItem     *input_item;
 };
 
 G_DEFINE_TYPE (GfSoundApplet, gf_sound_applet, G_TYPE_OBJECT)
@@ -81,10 +78,6 @@ maybe_show_status_icons (GfSoundApplet *applet)
   if (stream == NULL)
     show = FALSE;
 
-  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
-  gtk_status_icon_set_visible (GTK_STATUS_ICON (applet->output_status_icon), show);
-  G_GNUC_END_IGNORE_DEPRECATIONS
-
   if (show)
     sn_item_register (SN_ITEM (applet->output_item));
   else
@@ -119,10 +112,6 @@ maybe_show_status_icons (GfSoundApplet *applet)
         }
     }
 
-  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
-  gtk_status_icon_set_visible (GTK_STATUS_ICON (applet->input_status_icon), show);
-  G_GNUC_END_IGNORE_DEPRECATIONS
-
   if (show)
     sn_item_register (SN_ITEM (applet->input_item));
   else
@@ -140,7 +129,6 @@ update_default_sink (GfSoundApplet *applet)
 
   if (stream != NULL)
     {
-      gvc_stream_status_icon_set_mixer_stream (applet->output_status_icon, stream);
       gf_sound_item_set_mixer_stream (applet->output_item, stream);
       maybe_show_status_icons (applet);
     }
@@ -159,7 +147,6 @@ update_default_source (GfSoundApplet *applet)
 
   if (stream != NULL)
     {
-      gvc_stream_status_icon_set_mixer_stream (applet->input_status_icon, stream);
       gf_sound_item_set_mixer_stream (applet->input_item, stream);
       maybe_show_status_icons (applet);
     }
@@ -271,8 +258,6 @@ gf_sound_applet_dispose (GObject *object)
 
   applet = GF_SOUND_APPLET (object);
 
-  g_clear_object (&applet->output_status_icon);
-  g_clear_object (&applet->input_status_icon);
   g_clear_object (&applet->control);
 
   g_clear_object (&applet->output_item);
@@ -295,29 +280,8 @@ gf_sound_applet_class_init (GfSoundAppletClass *applet_class)
 static void
 gf_sound_applet_init (GfSoundApplet *applet)
 {
-  GvcStreamStatusIcon *icon;
   SnItemCategory category;
 
-  /* Output icon */
-  icon = gvc_stream_status_icon_new (NULL, output_icons);
-  gvc_stream_status_icon_set_display_name (icon, _("Output"));
-
-  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
-  gtk_status_icon_set_title (GTK_STATUS_ICON (icon), _("Sound Output Volume"));
-  G_GNUC_END_IGNORE_DEPRECATIONS
-
-  applet->output_status_icon = icon;
-
-  /* Input icon */
-  icon = gvc_stream_status_icon_new (NULL, input_icons);
-  gvc_stream_status_icon_set_display_name (icon, _("Input"));
-
-  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
-  gtk_status_icon_set_title (GTK_STATUS_ICON (icon), _("Microphone Volume"));
-  G_GNUC_END_IGNORE_DEPRECATIONS
-
-  applet->input_status_icon = icon;
-
   category = SN_ITEM_CATEGORY_HARDWARE;
 
   applet->output_item = gf_sound_item_new (category,
diff --git a/po/POTFILES.in b/po/POTFILES.in
index c76d5ff..0dfc83c 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -32,4 +32,3 @@ gnome-flashback/libsound-applet/gf-sound-applet.c
 gnome-flashback/libsound-applet/gf-sound-item.c
 gnome-flashback/libsound-applet/gvc-channel-bar.c
 gnome-flashback/libsound-applet/gvc/gvc-mixer-control.c
-gnome-flashback/libsound-applet/gvc-stream-status-icon.c


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