[gnome-flashback] sound-applet: remove unused functions
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-flashback] sound-applet: remove unused functions
- Date: Wed, 25 Dec 2019 19:37:59 +0000 (UTC)
commit 4b3257072beb1af06be21dc1cf7a6c185591dfa6
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Wed Dec 25 21:33:56 2019 +0200
sound-applet: remove unused functions
gnome-flashback/libsound-applet/gvc-channel-bar.c | 82 -----------------------
gnome-flashback/libsound-applet/gvc-channel-bar.h | 11 ---
2 files changed, 93 deletions(-)
---
diff --git a/gnome-flashback/libsound-applet/gvc-channel-bar.c
b/gnome-flashback/libsound-applet/gvc-channel-bar.c
index 9deba94..71a3f7a 100644
--- a/gnome-flashback/libsound-applet/gvc-channel-bar.c
+++ b/gnome-flashback/libsound-applet/gvc-channel-bar.c
@@ -49,9 +49,6 @@ struct GvcChannelBarPrivate
GtkAdjustment *adjustment;
GtkAdjustment *zero_adjustment;
gboolean is_muted;
- char *icon_name;
- char *low_icon_name;
- char *high_icon_name;
gboolean click_lock;
gboolean is_amplified;
guint32 base_volume;
@@ -65,8 +62,6 @@ enum
PROP_IS_MUTED,
};
-static void gvc_channel_bar_finalize (GObject *object);
-
static gboolean on_scale_button_press_event (GtkWidget *widget,
GdkEventButton *event,
GvcChannelBar *bar);
@@ -149,20 +144,6 @@ _scale_box_new (GvcChannelBar *bar)
return box;
}
-static void
-update_image (GvcChannelBar *bar)
-{
- gtk_image_set_from_icon_name (GTK_IMAGE (bar->priv->image),
- bar->priv->icon_name,
- GTK_ICON_SIZE_DIALOG);
-
- if (bar->priv->icon_name != NULL) {
- gtk_widget_show (bar->priv->image);
- } else {
- gtk_widget_hide (bar->priv->image);
- }
-}
-
static void
update_layout (GvcChannelBar *bar)
{
@@ -205,47 +186,6 @@ update_layout (GvcChannelBar *bar)
gtk_widget_show_all (frame);
}
-void
-gvc_channel_bar_set_icon_name (GvcChannelBar *bar,
- const char *name)
-{
- g_return_if_fail (GVC_IS_CHANNEL_BAR (bar));
-
- g_free (bar->priv->icon_name);
- bar->priv->icon_name = g_strdup (name);
- update_image (bar);
-}
-
-void
-gvc_channel_bar_set_low_icon_name (GvcChannelBar *bar,
- const char *name)
-{
- g_return_if_fail (GVC_IS_CHANNEL_BAR (bar));
-
- if (name != NULL && strcmp (bar->priv->low_icon_name, name) != 0) {
- g_free (bar->priv->low_icon_name);
- bar->priv->low_icon_name = g_strdup (name);
- gtk_image_set_from_icon_name (GTK_IMAGE (bar->priv->low_image),
- bar->priv->low_icon_name,
- GTK_ICON_SIZE_MENU);
- }
-}
-
-void
-gvc_channel_bar_set_high_icon_name (GvcChannelBar *bar,
- const char *name)
-{
- g_return_if_fail (GVC_IS_CHANNEL_BAR (bar));
-
- if (name != NULL && strcmp (bar->priv->high_icon_name, name) != 0) {
- g_free (bar->priv->high_icon_name);
- bar->priv->high_icon_name = g_strdup (name);
- gtk_image_set_from_icon_name (GTK_IMAGE (bar->priv->high_image),
- bar->priv->high_icon_name,
- GTK_ICON_SIZE_MENU);
- }
-}
-
void
gvc_channel_bar_set_orientation (GvcChannelBar *bar,
GtkOrientation orientation)
@@ -587,8 +527,6 @@ gvc_channel_bar_constructed (GObject *object)
vol_max_normal = gvc_mixer_control_get_vol_max_norm (bar->priv->mixer_control);
bar->priv->base_volume = vol_max_normal;
- bar->priv->low_icon_name = g_strdup ("audio-volume-low");
- bar->priv->high_icon_name = g_strdup ("audio-volume-high");
bar->priv->orientation = GTK_ORIENTATION_VERTICAL;
bar->priv->adjustment = GTK_ADJUSTMENT (gtk_adjustment_new (0.0,
@@ -658,7 +596,6 @@ gvc_channel_bar_class_init (GvcChannelBarClass *klass)
object_class->constructed = gvc_channel_bar_constructed;
object_class->dispose = gvc_channel_bar_dispose;
- object_class->finalize = gvc_channel_bar_finalize;
object_class->set_property = gvc_channel_bar_set_property;
object_class->get_property = gvc_channel_bar_get_property;
@@ -693,25 +630,6 @@ gvc_channel_bar_init (GvcChannelBar *bar)
bar->priv = gvc_channel_bar_get_instance_private (bar);
}
-static void
-gvc_channel_bar_finalize (GObject *object)
-{
- GvcChannelBar *channel_bar;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (GVC_IS_CHANNEL_BAR (object));
-
- channel_bar = GVC_CHANNEL_BAR (object);
-
- g_return_if_fail (channel_bar->priv != NULL);
-
- g_free (channel_bar->priv->icon_name);
- g_free (channel_bar->priv->low_icon_name);
- g_free (channel_bar->priv->high_icon_name);
-
- G_OBJECT_CLASS (gvc_channel_bar_parent_class)->finalize (object);
-}
-
GtkWidget *
gvc_channel_bar_new (GvcMixerControl *mixer_control)
{
diff --git a/gnome-flashback/libsound-applet/gvc-channel-bar.h
b/gnome-flashback/libsound-applet/gvc-channel-bar.h
index 75bda05..0a0954d 100644
--- a/gnome-flashback/libsound-applet/gvc-channel-bar.h
+++ b/gnome-flashback/libsound-applet/gvc-channel-bar.h
@@ -47,20 +47,9 @@ GType gvc_channel_bar_get_type (void);
GtkWidget *gvc_channel_bar_new (GvcMixerControl *mixer_control);
-void gvc_channel_bar_set_icon_name (GvcChannelBar *bar,
- const char *icon_name);
-
-void gvc_channel_bar_set_low_icon_name (GvcChannelBar *bar,
- const char *icon_name);
-
-void gvc_channel_bar_set_high_icon_name (GvcChannelBar *bar,
- const char *icon_name);
-
void gvc_channel_bar_set_orientation (GvcChannelBar *bar,
GtkOrientation orientation);
-GtkOrientation gvc_channel_bar_get_orientation (GvcChannelBar *bar);
-
GtkAdjustment *gvc_channel_bar_get_adjustment (GvcChannelBar *bar);
gboolean gvc_channel_bar_get_is_muted (GvcChannelBar *bar);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]