gnome-media r4234 - in trunk: . gnome-volume-control/data gnome-volume-control/data/sounds gnome-volume-control/src gst-mixer/src sound-theme sound-theme/sounds



Author: bcameron
Date: Wed Mar  4 21:14:22 2009
New Revision: 4234
URL: http://svn.gnome.org/viewvc/gnome-media?rev=4234&view=rev

Log:
2009-03-04  Brian Cameron  <brian cameron sun com>

        * configure.ac, Makefile.am, gst-mixer/src/Makefile.am,
          gst-mixer/src/element.c, gnome-volume-control/src/Makefile.am,
          gnome-volume-control/data/Makefile.am: Now the sound-theme widgets
          and the sound files are built in the sound-theme directory.  The
          sound-theme widgets are built into a static library that is linked
          into both gst-mixer and gnome-volume-control so that both
          applications can provide the ability to edit the Sound Theme
          configuration.
        * sound-theme/Makefile.am, sound-theme/gvc-sound-theme-editor.[ch],
          sound-theme/gvc-sound-theme-chooser.[ch],
          sound-theme/sound-theme-file-utils.[ch]: Move sound-theme widget
          files from gnome-volume-control/src and provide Makefile.am to build
          them into a static library.
        * sound-theme/sounds: Move from gnome-volume-control/data/sounds.


Added:
   trunk/sound-theme/
   trunk/sound-theme/Makefile.am
   trunk/sound-theme/gvc-sound-theme-chooser.c
      - copied unchanged from r4233, /trunk/gnome-volume-control/src/gvc-sound-theme-chooser.c
   trunk/sound-theme/gvc-sound-theme-chooser.h
      - copied unchanged from r4233, /trunk/gnome-volume-control/src/gvc-sound-theme-chooser.h
   trunk/sound-theme/gvc-sound-theme-editor.c
      - copied unchanged from r4233, /trunk/gnome-volume-control/src/gvc-sound-theme-editor.c
   trunk/sound-theme/gvc-sound-theme-editor.h
      - copied unchanged from r4233, /trunk/gnome-volume-control/src/gvc-sound-theme-editor.h
   trunk/sound-theme/sound-theme-file-utils.c
      - copied unchanged from r4233, /trunk/gnome-volume-control/src/sound-theme-file-utils.c
   trunk/sound-theme/sound-theme-file-utils.h
      - copied unchanged from r4233, /trunk/gnome-volume-control/src/sound-theme-file-utils.h
   trunk/sound-theme/sounds/
      - copied from r4233, /trunk/gnome-volume-control/data/sounds/
Removed:
   trunk/gnome-volume-control/data/sounds/
   trunk/gnome-volume-control/src/gvc-sound-theme-chooser.c
   trunk/gnome-volume-control/src/gvc-sound-theme-chooser.h
   trunk/gnome-volume-control/src/gvc-sound-theme-editor.c
   trunk/gnome-volume-control/src/gvc-sound-theme-editor.h
   trunk/gnome-volume-control/src/sound-theme-file-utils.c
   trunk/gnome-volume-control/src/sound-theme-file-utils.h
Modified:
   trunk/ChangeLog
   trunk/Makefile.am
   trunk/configure.ac
   trunk/gnome-volume-control/data/Makefile.am
   trunk/gnome-volume-control/src/Makefile.am
   trunk/gst-mixer/src/Makefile.am
   trunk/gst-mixer/src/element.c

Modified: trunk/Makefile.am
==============================================================================
--- trunk/Makefile.am	(original)
+++ trunk/Makefile.am	Wed Mar  4 21:14:22 2009
@@ -22,6 +22,10 @@
 SUBDIRS += gnome-cd
 endif
 
+if HAVE_SOUND_THEME
+SUBDIRS += sound-theme
+endif
+
 if HAVE_PULSEAUDIO
 SUBDIRS += gnome-volume-control
 endif

Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac	(original)
+++ trunk/configure.ac	Wed Mar  4 21:14:22 2009
@@ -83,6 +83,28 @@
 AC_SUBST(MEDIA_LIBS)
 
 dnl=======================================================================
+dnl Check for libcanberra
+dnl=======================================================================
+
+PKG_CHECK_MODULES(SOUND_THEME,
+        gobject-2.0 >= $GLIB_REQUIRED_VERSION
+        gtk+-2.0 >= $GTK_REQUIRED_VERSION
+        gio-2.0
+        gconf-2.0 >= $GCONF_REQUIRED_VERSION
+        libcanberra-gtk >= $CANBERRA_REQUIRED_VERSION
+        libxml-2.0,
+        have_soundtheme=yes,
+        have_soundtheme=no)
+
+if test "x$have_soundtheme" = "xyes" ; then
+  AC_DEFINE(HAVE_SOUND_THEME, [], [Define if we can build sound theme])
+fi
+AM_CONDITIONAL(HAVE_SOUND_THEME, test x$have_soundtheme = xyes)
+AC_SUBST(HAVE_SOUND_THEME)
+AC_SUBST(SOUNDTHEME_CFLAGS)
+AC_SUBST(SOUNDTHEME_LIBS)
+
+dnl=======================================================================
 dnl Check for the new volume control modules
 dnl=======================================================================
 
@@ -649,6 +671,8 @@
 AC_CONFIG_FILES([
 Makefile
 po/Makefile.in
+sound-theme/Makefile
+sound-theme/sounds/Makefile
 gnome-volume-control/Makefile
 gnome-volume-control/data/Makefile
 gnome-volume-control/data/gnome-volume-control.desktop.in
@@ -670,7 +694,6 @@
 gnome-volume-control/data/icons/scalable/Makefile
 gnome-volume-control/data/icons/scalable/apps/Makefile
 gnome-volume-control/data/icons/scalable/status/Makefile
-gnome-volume-control/data/sounds/Makefile
 gnome-volume-control/src/Makefile
 vu-meter/Makefile
 cddb-slave2/Makefile

Modified: trunk/gnome-volume-control/data/Makefile.am
==============================================================================
--- trunk/gnome-volume-control/data/Makefile.am	(original)
+++ trunk/gnome-volume-control/data/Makefile.am	Wed Mar  4 21:14:22 2009
@@ -2,7 +2,6 @@
 
 SUBDIRS =			\
 	icons			\
-	sounds			\
 	$(NULL)
 
 @INTLTOOL_DESKTOP_RULE@

Modified: trunk/gnome-volume-control/src/Makefile.am
==============================================================================
--- trunk/gnome-volume-control/src/Makefile.am	(original)
+++ trunk/gnome-volume-control/src/Makefile.am	Wed Mar  4 21:14:22 2009
@@ -7,13 +7,12 @@
 
 AM_CPPFLAGS =					\
 	$(WARN_CFLAGS)				\
+	-I../../sound-theme			\
 	$(VOLUME_CONTROL_CFLAGS)		\
 	$(PULSEAUDIO_CFLAGS)			\
 	-DLOCALE_DIR=\""$(datadir)/locale"\"	\
 	-DLIBEXECDIR=\"$(libexecdir)\"		\
 	-DGLADEDIR=\""$(pkgdatadir)"\"		\
-	-DSOUND_DATA_DIR="\"$(datadir)/sounds\"" \
-	-DSOUND_SET_DIR="\"$(pkgdatadir)/sounds\"" \
 	-DICON_DATA_DIR="\"$(pkgdatadir)/icons\"" \
 	$(NULL)
 
@@ -49,6 +48,8 @@
 	$(NULL)
 
 gnome_volume_control_LDADD =			\
+	-L$(top_builddir)/sound-theme		\
+	-lsoundtheme				\
 	$(VOLUME_CONTROL_LIBS)			\
 	$(PULSEAUDIO_LIBS)			\
 	$(NULL)
@@ -74,10 +75,6 @@
 	gvc-balance-bar.c			\
 	gvc-channel-bar.h			\
 	gvc-channel-bar.c			\
-	gvc-sound-theme-chooser.h		\
-	gvc-sound-theme-chooser.c		\
-	sound-theme-file-utils.h		\
-	sound-theme-file-utils.c		\
 	gvc-mixer-dialog.h			\
 	gvc-mixer-dialog.c			\
 	gvc-level-bar.h				\
@@ -88,8 +85,6 @@
 BUILT_SOURCES =				\
 	$(NULL)
 
-EXTRA_DIST = gvc-sound-theme-editor.c gvc-sound-theme-editor.h
-
 CLEANFILES =				\
 	$(BUILT_SOURCES)		\
 	$(NULL)

Modified: trunk/gst-mixer/src/Makefile.am
==============================================================================
--- trunk/gst-mixer/src/Makefile.am	(original)
+++ trunk/gst-mixer/src/Makefile.am	Wed Mar  4 21:14:22 2009
@@ -1,5 +1,13 @@
+
+if HAVE_SOUND_THEME
+GVC_ST_LIBS = $(SOUND_THEME_LIBS) \
+	 -L$(top_builddir)/sound-theme \
+	 -lsoundtheme
+endif
+
 AM_CPPFLAGS = \
 	$(GSTMIXER_CFLAGS)				\
+	-I../../sound-theme				\
 	-DGNOMELOCALEDIR=\""$(datadir)/locale"\"	\
 	-DDATA_DIR=\""$(pkgdatadir)"\"			\
 	-DPIX_DIR=\""$(pkgdatadir)/pixmaps"\"
@@ -27,4 +35,6 @@
 	misc.h
 
 gnome_volume_control_LDFLAGS = \
+	$(GVC_ST_LIBS) \
 	$(GSTMIXER_LIBS)
+

Modified: trunk/gst-mixer/src/element.c
==============================================================================
--- trunk/gst-mixer/src/element.c	(original)
+++ trunk/gst-mixer/src/element.c	Wed Mar  4 21:14:22 2009
@@ -32,6 +32,9 @@
 #include "preferences.h"
 #include "track.h"
 #include "misc.h"
+#ifdef HAVE_SOUND_THEME
+#include "gvc-sound-theme-chooser.h"
+#endif
 
 G_DEFINE_TYPE (GnomeVolumeControlElement, gnome_volume_control_element, GTK_TYPE_NOTEBOOK)
 
@@ -378,6 +381,41 @@
        i >= 0; i--) {
     gtk_notebook_set_current_page (GTK_NOTEBOOK (el), i);
   }
+
+#ifdef HAVE_SOUND_THEME
+  /* Add tab for managing themes */
+  {
+    GtkWidget *label, *view, *viewport, *sound_theme_chooser, *vbox;
+    GtkAdjustment *hadjustment, *vadjustment;
+
+    label = gtk_label_new (_("Sound Theme"));
+
+    view = gtk_scrolled_window_new (NULL, NULL);
+    gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (view),
+				    GTK_POLICY_AUTOMATIC,
+				    GTK_POLICY_AUTOMATIC);
+
+    hadjustment = gtk_scrolled_window_get_hadjustment (GTK_SCROLLED_WINDOW (view));
+    vadjustment = gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (view));
+    viewport = gtk_viewport_new (hadjustment, vadjustment);
+    gtk_viewport_set_shadow_type (GTK_VIEWPORT (viewport), GTK_SHADOW_NONE);
+    gtk_viewport_set_shadow_type (GTK_VIEWPORT (viewport), GTK_SHADOW_NONE);
+
+    sound_theme_chooser = gvc_sound_theme_chooser_new ();
+    vbox = gtk_vbox_new (FALSE, 0);
+    gtk_box_pack_start (GTK_BOX (vbox), sound_theme_chooser, TRUE, TRUE, 6);
+    gtk_container_add (GTK_CONTAINER (viewport), vbox);
+    gtk_container_add (GTK_CONTAINER (view), viewport);
+
+    gtk_widget_show_all (vbox);
+    gtk_widget_show (sound_theme_chooser);
+    gtk_widget_show (viewport);
+    gtk_widget_show (view);
+    gtk_widget_show (label);
+
+    gtk_notebook_append_page (GTK_NOTEBOOK (el), view, label);
+  }
+#endif
 }
 
 /*

Added: trunk/sound-theme/Makefile.am
==============================================================================
--- (empty file)
+++ trunk/sound-theme/Makefile.am	Wed Mar  4 21:14:22 2009
@@ -0,0 +1,32 @@
+NULL =
+
+SUBDIRS = sounds
+
+noinst_LIBRARIES = libsoundtheme.a
+
+AM_CPPFLAGS =						\
+        $(WARN_CFLAGS)					\
+        $(SOUND_THEME_CFLAGS)				\
+        -DSOUND_DATA_DIR="\"$(datadir)/sounds\""	\
+        -DSOUND_SET_DIR="\"$(pkgdatadir)/sounds\""	\
+        $(NULL)
+
+libsoundtheme_a_SOURCES = \
+	gvc-sound-theme-chooser.h		\
+	gvc-sound-theme-chooser.c		\
+	sound-theme-file-utils.h		\
+	sound-theme-file-utils.c		\
+	$(NULL)
+
+BUILT_SOURCES =				\
+	$(NULL)
+
+EXTRA_DIST = gvc-sound-theme-editor.c gvc-sound-theme-editor.h
+
+CLEANFILES =				\
+	$(BUILT_SOURCES)		\
+	$(NULL)
+
+MAINTAINERCLEANFILES =                  \
+        *~                              \
+        Makefile.in



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