summaryrefslogtreecommitdiff
path: root/mixer
diff options
context:
space:
mode:
authorCallum McKenzie <callum@src.gnome.org>2008-12-02 01:07:34 +0000
committerCallum McKenzie <callum@src.gnome.org>2008-12-02 01:07:34 +0000
commitc9f2ae9e6d82dcabae73ce17b26f03f41d4fe546 (patch)
tree42d538aa0d6c8fcfefcb0e0198bf8632d1742112 /mixer
parentcea5f58a69117199d4f024f3eb473a13bce540e0 (diff)
Hook up the mixer's new Volume Control... button
svn path=/trunk/; revision=11142
Diffstat (limited to 'mixer')
-rw-r--r--mixer/ChangeLog3
-rw-r--r--mixer/applet.c2
-rw-r--r--mixer/applet.h1
-rw-r--r--mixer/dock.c11
4 files changed, 13 insertions, 4 deletions
diff --git a/mixer/ChangeLog b/mixer/ChangeLog
index fadf56512..5b205cb3b 100644
--- a/mixer/ChangeLog
+++ b/mixer/ChangeLog
@@ -4,7 +4,8 @@
* applet.[ch]: Hook the mute button into the system. Do some prep
work to separate the applet object into a model and a
viewer/control so the dock can also be a viewer/control on an
- equal footing. This will make some code a lot cleaner.
+ equal footing. This will make some code a lot cleaner. Also hook
+ up the new "Volume Control..." button.
2008-11-27 Callum McKenzie <callum@spooky-possum.org>
diff --git a/mixer/applet.c b/mixer/applet.c
index 651b916a2..6685b54dc 100644
--- a/mixer/applet.c
+++ b/mixer/applet.c
@@ -704,7 +704,7 @@ gnome_volume_applet_toggle_mute (GnomeVolumeApplet *applet)
* Run g-v-c.
*/
-static void
+void
gnome_volume_applet_run_mixer (GnomeVolumeApplet *applet)
{
GnomeDesktopItem *ditem;
diff --git a/mixer/applet.h b/mixer/applet.h
index 922a68ea6..911326c70 100644
--- a/mixer/applet.h
+++ b/mixer/applet.h
@@ -99,6 +99,7 @@ void gnome_volume_applet_adjust_volume (GstMixer *mixer,
GstMixerTrack *track,
gdouble volume);
void gnome_volume_applet_toggle_mute (GnomeVolumeApplet *applet);
+void gnome_volume_applet_run_mixer (GnomeVolumeApplet *applet);
GType gnome_volume_applet_get_type (void);
gboolean gnome_volume_applet_setup (GnomeVolumeApplet *applet,
GList *elements);
diff --git a/mixer/dock.c b/mixer/dock.c
index bab319cfb..b10452a11 100644
--- a/mixer/dock.c
+++ b/mixer/dock.c
@@ -84,16 +84,22 @@ gnome_volume_applet_dock_init (GnomeVolumeAppletDock *dock)
#endif
}
-gint mute_cb (GObject *mute_widget, GnomeVolumeAppletDock *dock)
+static void mute_cb (GtkToggleButton *mute_widget, GnomeVolumeAppletDock *dock)
{
/* Only toggle the mute if we are actually going to change the
* mute. This stops loops where the toggle_mute code calls us
* back to make sure our display is in sync with other mute buttons. */
if (mixer_is_muted (dock->model) !=
- gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (mute_widget)))
+ gtk_toggle_button_get_active (mute_widget))
gnome_volume_applet_toggle_mute (dock->model);
}
+static void launch_mixer_cb (GtkButton *button, GnomeVolumeAppletDock *dock)
+{
+ gnome_volume_applet_run_mixer (dock->model);
+}
+
+
GtkWidget *
gnome_volume_applet_dock_new (GtkOrientation orientation,
GnomeVolumeApplet *parent)
@@ -168,6 +174,7 @@ gnome_volume_applet_dock_new (GtkOrientation orientation,
gtk_box_pack_start (GTK_BOX (innerline), dock->mute, TRUE, TRUE, 0);
more = gtk_button_new_with_label (_("Volume Control..."));
+ g_signal_connect (more, "clicked", G_CALLBACK (launch_mixer_cb), dock);
gtk_box_pack_end (GTK_BOX (innerline), more, TRUE, TRUE, 0);
gtk_container_add (GTK_CONTAINER (dock), frame);