Commit b9d91a03 authored by Alberts Muktupāvels's avatar Alberts Muktupāvels
Browse files

sound-applet: remove GtkStatusIcon

parent fa42cabb
......@@ -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 = \
......
......@@ -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,
......
/*
* Copyright (C) 2008 Red Hat, Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __GVC_STREAM_STATUS_ICON_H
#define __GVC_STREAM_STATUS_ICON_H
#include <glib-object.h>
#include "gvc-mixer-stream.h"
G_BEGIN_DECLS
#define GVC_TYPE_STREAM_STATUS_ICON (gvc_stream_status_icon_get_type ())
#define GVC_STREAM_STATUS_ICON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GVC_TYPE_STREAM_STATUS_ICON, GvcStreamStatusIcon))
#define GVC_STREAM_STATUS_ICON_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GVC_TYPE_STREAM_STATUS_ICON, GvcStreamStatusIconClass))
#define GVC_IS_STREAM_STATUS_ICON(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GVC_TYPE_STREAM_STATUS_ICON))
#define GVC_IS_STREAM_STATUS_ICON_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GVC_TYPE_STREAM_STATUS_ICON))
#define GVC_STREAM_STATUS_ICON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GVC_TYPE_STREAM_STATUS_ICON, GvcStreamStatusIconClass))
typedef struct GvcStreamStatusIconPrivate GvcStreamStatusIconPrivate;
typedef struct
{
GtkStatusIcon parent;
GvcStreamStatusIconPrivate *priv;
} GvcStreamStatusIcon;
typedef struct
{
GtkStatusIconClass parent_class;
} GvcStreamStatusIconClass;
GType gvc_stream_status_icon_get_type (void);
GvcStreamStatusIcon * gvc_stream_status_icon_new (GvcMixerStream *stream,
const char **icon_names);
void gvc_stream_status_icon_set_icon_names (GvcStreamStatusIcon *icon,
const char **icon_names);
void gvc_stream_status_icon_set_display_name (GvcStreamStatusIcon *icon,
const char *display_name);
void gvc_stream_status_icon_set_mixer_stream (GvcStreamStatusIcon *icon,
GvcMixerStream *stream);
G_END_DECLS
#endif /* __GVC_STREAM_STATUS_ICON_H */
......@@ -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
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment