gnome-media r4181 - in trunk/gnome-volume-control: . src



Author: hadess
Date: Wed Feb 11 08:42:10 2009
New Revision: 4181
URL: http://svn.gnome.org/viewvc/gnome-media?rev=4181&view=rev

Log:
2009-02-11  Bastien Nocera  <hadess hadess net>

	* src/gvc-channel-bar.c (on_scale_button_release_event):
	* src/gvc-sound-theme-chooser.c (play_preview_for_path):
	* src/gvc-sound-theme-editor.c (play_sound_preview),
	(play_sound_at_path): Don't call ca_gtk_context_get () when
	we're not going to use the returned context, set the
	application id for all the calls to ca_gtk_play_*()



Modified:
   trunk/gnome-volume-control/ChangeLog
   trunk/gnome-volume-control/src/gvc-channel-bar.c
   trunk/gnome-volume-control/src/gvc-sound-theme-chooser.c
   trunk/gnome-volume-control/src/gvc-sound-theme-editor.c

Modified: trunk/gnome-volume-control/src/gvc-channel-bar.c
==============================================================================
--- trunk/gnome-volume-control/src/gvc-channel-bar.c	(original)
+++ trunk/gnome-volume-control/src/gvc-channel-bar.c	Wed Feb 11 08:42:10 2009
@@ -409,6 +409,7 @@
         ca_gtk_play_for_widget (GTK_WIDGET (bar), 0,
                                 CA_PROP_EVENT_ID, "audio-volume-change",
                                 CA_PROP_EVENT_DESCRIPTION, "foobar event happened",
+                                CA_PROP_APPLICATION_ID, "org.gnome.VolumeControl",
                                 NULL);
 
         return FALSE;

Modified: trunk/gnome-volume-control/src/gvc-sound-theme-chooser.c
==============================================================================
--- trunk/gnome-volume-control/src/gvc-sound-theme-chooser.c	(original)
+++ trunk/gnome-volume-control/src/gvc-sound-theme-chooser.c	Wed Feb 11 08:42:10 2009
@@ -686,7 +686,6 @@
         GtkTreeIter   iter;
         GtkTreeIter   theme_iter;
         char         *id;
-        ca_context   *ctx;
         char         *parent_theme;
 
         model = gtk_tree_view_get_model (GTK_TREE_VIEW (chooser->priv->treeview));
@@ -721,7 +720,6 @@
                 g_free (parent_id);
         }
 
-        ctx = ca_gtk_context_get ();
         /* special case: for the default item on custom themes
          * play the alert for the parent theme */
         if (strcmp (id, DEFAULT_ALERT_ID) == 0) {
@@ -732,6 +730,7 @@
                                                 CA_PROP_CANBERRA_XDG_THEME_NAME, parent_theme,
                                                 CA_PROP_EVENT_DESCRIPTION, _("Testing event sound"),
                                                 CA_PROP_CANBERRA_CACHE_CONTROL, "never",
+                                                CA_PROP_APPLICATION_ID, "org.gnome.VolumeControl",
 #ifdef CA_PROP_CANBERRA_ENABLE
                                                 CA_PROP_CANBERRA_ENABLE, "1",
 #endif
@@ -742,6 +741,7 @@
                                                 CA_PROP_EVENT_ID, "bell-window-system",
                                                 CA_PROP_EVENT_DESCRIPTION, _("Testing event sound"),
                                                 CA_PROP_CANBERRA_CACHE_CONTROL, "never",
+                                                CA_PROP_APPLICATION_ID, "org.gnome.VolumeControl",
 #ifdef CA_PROP_CANBERRA_ENABLE
                                                 CA_PROP_CANBERRA_ENABLE, "1",
 #endif
@@ -753,6 +753,7 @@
                                         CA_PROP_MEDIA_FILENAME, id,
                                         CA_PROP_EVENT_DESCRIPTION, _("Testing event sound"),
                                         CA_PROP_CANBERRA_CACHE_CONTROL, "never",
+                                        CA_PROP_APPLICATION_ID, "org.gnome.VolumeControl",
 #ifdef CA_PROP_CANBERRA_ENABLE
                                         CA_PROP_CANBERRA_ENABLE, "1",
 #endif

Modified: trunk/gnome-volume-control/src/gvc-sound-theme-editor.c
==============================================================================
--- trunk/gnome-volume-control/src/gvc-sound-theme-editor.c	(original)
+++ trunk/gnome-volume-control/src/gvc-sound-theme-editor.c	Wed Feb 11 08:42:10 2009
@@ -551,19 +551,18 @@
                     gpointer user_data)
 {
         char       *filename;
-        ca_context *ctx;
 
         filename = gtk_file_editor_get_preview_filename (GTK_FILE_EDITOR (editor));
         if (filename == NULL) {
                 return;
         }
 
-        ctx = ca_gtk_context_get ();
         ca_gtk_play_for_widget (GTK_WIDGET (editor), 0,
                                 CA_PROP_APPLICATION_NAME, _("Sound Preferences"),
                                 CA_PROP_MEDIA_FILENAME, filename,
                                 CA_PROP_EVENT_DESCRIPTION, _("Testing event sound"),
                                 CA_PROP_CANBERRA_CACHE_CONTROL, "never",
+                                CA_PROP_APPLICATION_ID, "org.gnome.VolumeControl",
 #ifdef CA_PROP_CANBERRA_ENABLE
                                 CA_PROP_CANBERRA_ENABLE, "1",
 #endif
@@ -933,7 +932,6 @@
         GtkTreeIter   iter;
         char        **sound_names;
         gboolean      sensitive;
-        ca_context   *ctx;
 
         model = gtk_tree_view_get_model (GTK_TREE_VIEW (tree_view));
         if (gtk_tree_model_get_iter (model, &iter, path) == FALSE) {
@@ -948,12 +946,12 @@
                 return FALSE;
         }
 
-        ctx = ca_gtk_context_get ();
         ca_gtk_play_for_widget (GTK_WIDGET (tree_view), 0,
                                 CA_PROP_APPLICATION_NAME, _("Sound Preferences"),
                                 CA_PROP_EVENT_ID, sound_names[0],
                                 CA_PROP_EVENT_DESCRIPTION, _("Testing event sound"),
                                 CA_PROP_CANBERRA_CACHE_CONTROL, "never",
+                                CA_PROP_APPLICATION_ID, "org.gnome.VolumeControl",
 #ifdef CA_PROP_CANBERRA_ENABLE
                                 CA_PROP_CANBERRA_ENABLE, "1",
 #endif



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]