gnome-media r4142 - in trunk/gnome-volume-control: . src
- From: mccann svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-media r4142 - in trunk/gnome-volume-control: . src
- Date: Fri, 16 Jan 2009 17:08:33 +0000 (UTC)
Author: mccann
Date: Fri Jan 16 17:08:33 2009
New Revision: 4142
URL: http://svn.gnome.org/viewvc/gnome-media?rev=4142&view=rev
Log:
2009-01-16 William Jon McCann <jmccann redhat com>
* src/gvc-stream-status-icon.c (on_menu_mute_toggled),
(on_status_icon_popup_menu):
Add a mute toggle item to the context menu.
Patch from: Paolo Borelli <pborelli katamail com>
Fixes #567510
Modified:
trunk/gnome-volume-control/ChangeLog
trunk/gnome-volume-control/src/gvc-stream-status-icon.c
Modified: trunk/gnome-volume-control/src/gvc-stream-status-icon.c
==============================================================================
--- trunk/gnome-volume-control/src/gvc-stream-status-icon.c (original)
+++ trunk/gnome-volume-control/src/gvc-stream-status-icon.c Fri Jan 16 17:08:33 2009
@@ -182,6 +182,15 @@
}
static void
+on_menu_mute_toggled (GtkMenuItem *item,
+ GvcStreamStatusIcon *icon)
+{
+ gboolean is_muted;
+ is_muted = gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM (item));
+ gvc_channel_bar_set_is_muted (GVC_CHANNEL_BAR (icon->priv->bar), is_muted);
+}
+
+static void
on_menu_activate_open_volume_control (GtkMenuItem *item,
GvcStreamStatusIcon *icon)
{
@@ -221,6 +230,16 @@
GtkWidget *image;
menu = gtk_menu_new ();
+
+ item = gtk_check_menu_item_new_with_mnemonic (_("_Mute"));
+ gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (item),
+ gvc_mixer_stream_get_is_muted (icon->priv->mixer_stream));
+ g_signal_connect (item,
+ "toggled",
+ G_CALLBACK (on_menu_mute_toggled),
+ icon);
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
+
item = gtk_image_menu_item_new_with_mnemonic (_("_Sound Preferences"));
image = gtk_image_new_from_icon_name ("multimedia-volume-control",
GTK_ICON_SIZE_MENU);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]