gnome-media r4023 - in trunk/gnome-volume-control: . src
- From: mccann svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-media r4023 - in trunk/gnome-volume-control: . src
- Date: Tue, 4 Nov 2008 03:01:49 +0000 (UTC)
Author: mccann
Date: Tue Nov 4 03:01:49 2008
New Revision: 4023
URL: http://svn.gnome.org/viewvc/gnome-media?rev=4023&view=rev
Log:
2008-11-03 William Jon McCann <jmccann redhat com>
* src/gvc-applet.c (on_menu_activate_sounds),
(on_status_icon_popup_menu):
Add sound properties to menu.
Modified:
trunk/gnome-volume-control/ChangeLog
trunk/gnome-volume-control/src/gvc-applet.c
Modified: trunk/gnome-volume-control/src/gvc-applet.c
==============================================================================
--- trunk/gnome-volume-control/src/gvc-applet.c (original)
+++ trunk/gnome-volume-control/src/gvc-applet.c Tue Nov 4 03:01:49 2008
@@ -243,6 +243,35 @@
}
static void
+on_menu_activate_sounds (GtkMenuItem *item,
+ GvcApplet *applet)
+{
+ GError *error;
+
+ error = NULL;
+ gdk_spawn_command_line_on_screen (gtk_widget_get_screen (applet->priv->dock),
+ "gnome-sound-properties",
+ &error);
+
+ if (error != NULL) {
+ GtkWidget *dialog;
+
+ dialog = gtk_message_dialog_new (NULL,
+ 0,
+ GTK_MESSAGE_ERROR,
+ GTK_BUTTONS_CLOSE,
+ _("Failed to start sound properties: %s"),
+ error->message);
+ g_signal_connect (dialog,
+ "response",
+ G_CALLBACK (gtk_widget_destroy),
+ NULL);
+ gtk_widget_show (dialog);
+ g_error_free (error);
+ }
+}
+
+static void
on_status_icon_popup_menu (GtkStatusIcon *status_icon,
guint button,
guint activate_time,
@@ -263,6 +292,13 @@
applet);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
+ item = gtk_menu_item_new_with_mnemonic (_("_Sounds"));
+ g_signal_connect (item,
+ "activate",
+ G_CALLBACK (on_menu_activate_sounds),
+ applet);
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
+
gtk_widget_show_all (menu);
gtk_menu_popup (GTK_MENU (menu),
NULL,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]