rpms/control-center/devel gcc-libcanberra-support-5.patch, NONE, 1.1 control-center.spec, 1.378, 1.379 control-center-2.20.0-enable-sound-by-default.patch, 1.2, NONE
Bastien Nocera (hadess)
fedora-extras-commits at redhat.com
Thu Jul 24 15:53:56 UTC 2008
Author: hadess
Update of /cvs/pkgs/rpms/control-center/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv29017
Modified Files:
control-center.spec
Added Files:
gcc-libcanberra-support-5.patch
Removed Files:
control-center-2.20.0-enable-sound-by-default.patch
Log Message:
* Thu Jul 24 2008 - Bastien Nocera <bnocera at redhat.com> - 2.23.4-6
- Add patch to support the Free Desktop sound theme spec
- Remove gnome-vfs-methods as per upstream
gcc-libcanberra-support-5.patch:
--- NEW FILE gcc-libcanberra-support-5.patch ---
Index: configure.in
===================================================================
--- configure.in (revision 8792)
+++ configure.in (working copy)
@@ -242,30 +242,6 @@
AM_GCONF_SOURCE_2
dnl ==============================================
-dnl Esd section
-dnl ==============================================
-have_esd=no
-AC_ARG_ENABLE(esd,
- AC_HELP_STRING([--disable-esd],
- [turn off ESD audio support]),
- [case "${enableval}" in
- yes) WANT_ESD=yes ;;
- no) WANT_ESD=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for --disable-esd) ;;
- esac],
- [WANT_ESD=yes]) dnl Default value
-
-if test x$WANT_ESD = xyes ; then
- PKG_CHECK_MODULES(ESD, esound >= 0.2.28,
- have_esd=yes
- AC_DEFINE(HAVE_ESD, 1, [Define if ESD sound server should be used]),
- AC_MSG_RESULT([disabled]))
-fi
-
-AC_SUBST(ESD_CFLAGS)
-AC_SUBST(ESD_LIBS)
-
-dnl ==============================================
dnl GStreamer section
dnl ==============================================
GST_MAJORMINOR=auto
@@ -300,15 +276,22 @@
AC_SUBST(GST_LIBS)
AC_SUBST(GST_CFLAGS)
-if test "x$have_gstreamer" = "xyes"; then
- SOUND_CAPPLET_LIBS="$ESD_LIBS $GST_LIBS -lgstaudio-0.10 -lgstinterfaces-0.10"
- SOUND_CAPPLET_CFLAGS="$ESD_CFLAGS $GST_CFLAGS"
+dnl ==============================================
+dnl sound capplet section
+dnl ==============================================
+
+PKG_CHECK_MODULES(CANBERRA, libcanberra-gtk gio-2.0, have_canberra=yes, AC_MSG_RESULT([no]))
+
+if test "x$have_gstreamer" = "xyes" && test "x$have_canberra" = "xyes" ; then
+ SOUND_CAPPLET_LIBS="$GST_LIBS -lgstaudio-0.10 -lgstinterfaces-0.10"
+ SOUND_CAPPLET_CFLAGS="$GST_CFLAGS"
AC_SUBST(SOUND_CAPPLET_LIBS)
AC_SUBST(SOUND_CAPPLET_CFLAGS)
else
AC_MSG_NOTICE([*** Sound capplet will not be built]);
fi
+
dnl ==============================================
dnl Define the main variables
dnl ==============================================
@@ -377,7 +360,6 @@
help/Makefile
libslab/Makefile
libslab/libslab.pc
-libsounds/Makefile
libwindow-settings/Makefile
libwindow-settings/gnome-window-settings-2.0.pc
po/Makefile.in
Index: Makefile.am
===================================================================
--- Makefile.am (revision 8792)
+++ Makefile.am (working copy)
@@ -1,4 +1,4 @@
-SUBDIRS = po libsounds libwindow-settings libslab capplets shell help vfs-methods $(TYPING_BREAK)
+SUBDIRS = po libwindow-settings libslab capplets shell help $(TYPING_BREAK)
ACLOCAL_AMFLAGS = -I m4
Index: capplets/sound/sound-theme-file-utils.c
===================================================================
--- capplets/sound/sound-theme-file-utils.c (revision 0)
+++ capplets/sound/sound-theme-file-utils.c (revision 0)
@@ -0,0 +1,154 @@
+/* -*- mode: c; style: linux -*- */
+/* -*- c-basic-offset: 2 -*- */
+
+/* sound-theme-file-utils.c
+ * Copyright (C) 2008 Bastien Nocera <hadess at hadess.net>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ */
+
+#include <config.h>
+#include <gio/gio.h>
+
+#define CUSTOM_THEME_NAME "__custom"
+
+GFile *
+custom_theme_dir_path (void)
+{
+ const char *data_dir;
+ GFile *file;
+ char *dir;
+
+ data_dir = g_get_user_data_dir ();
+ dir = g_build_filename (data_dir, "sounds", CUSTOM_THEME_NAME, NULL);
+ file = g_file_new_for_path (dir);
+ g_free (dir);
+
+ return file;
+}
+
+void
+delete_custom_theme_dir (void)
+{
+ GFile *file;
+
+ file = custom_theme_dir_path ();
+ /* FIXME we shouldn't be using the trash here, but it's faster/easier */
+ g_file_trash (file, NULL, NULL);
+ g_object_unref (file);
+
+ g_message ("deleted the custom theme dir");
+}
+
+static void
+delete_one_file (GFile *parent, const char *sound_name, const char *pattern)
+{
+ GFile *file;
+ char *name;
+
+ name = g_strdup_printf (pattern, sound_name);
+ file = g_file_get_child (parent, name);
+ g_free (name);
+ /* FIXME we shouldn't be using the trash here, but it's faster/easier */
+ g_file_trash (file, NULL, NULL);
+ g_object_unref (file);
+}
+
+void
+delete_old_files (char **sounds)
+{
+ static const char *patterns[] = { "%s.ogg", "%s.wav", NULL };
+ GFile *dir;
+ guint i, j;
+
+ dir = custom_theme_dir_path ();
+ for (i = 0; sounds[i] != NULL; i++) {
+ for (j = 0; patterns[j] != NULL; j++) {
+ delete_one_file (dir, sounds[i], patterns[j]);
+ }
+ }
+ g_object_unref (dir);
+}
+
+void
+delete_disabled_files (char **sounds)
+{
+ GFile *dir;
+ guint i;
+
+ dir = custom_theme_dir_path ();
+ for (i = 0; sounds[i] != NULL; i++)
+ delete_one_file (dir, sounds[i], "%s.disabled");
+ g_object_unref (dir);
+}
+
+static void
+create_one_file (GFile *file)
+{
+ GFileOutputStream* stream;
+
+ stream = g_file_create (file, G_FILE_CREATE_NONE, NULL, NULL);
+ if (stream != NULL) {
+ g_output_stream_close (G_OUTPUT_STREAM (stream), NULL, NULL);
+ g_object_unref (stream);
+ }
+}
+
+void
+add_disabled_file (char **sounds)
+{
+ GFile *dir;
+ guint i;
+
[...1745 lines suppressed...]
+ GtkTreePath *path,
+ GtkTreeIter *iter,
+ gpointer data)
+{
+ char **sound_names;
+
+ gtk_tree_model_get (model, iter, SOUND_NAMES_COL, &sound_names, -1);
+ if (sound_names != NULL) {
+ char *filename;
+ int type;
+
+ type = get_file_type (sound_names[0], &filename);
+
+ gtk_tree_store_set (GTK_TREE_STORE (model), iter,
+ SETTING_COL, type,
+ FILENAME_COL, filename,
+ -1);
+ g_strfreev (sound_names);
+ }
+ return FALSE;
+}
+
+void
+setup_sound_theme_custom (GladeXML *dialog, gboolean have_xkb)
+{
+ GtkTreeStore *store;
+ GtkTreeModel *custom_model;
+ GtkTreeViewColumn *column;
+ GtkCellRenderer *renderer;
+ GtkTreeIter iter, parent;
+ GConfClient *client;
+ CategoryType type;
+ gboolean input_feedback_enabled, audible_bell_enabled;
+ int visual_bell_setting;
+ char *theme_name;
+ guint i;
+
+ client = gconf_client_get_default ();
+ visual_bell_setting = visual_bell_gconf_to_setting (client);
+
+ /* Set up the model for the custom view */
+ store = gtk_tree_store_new (NUM_COLS, G_TYPE_STRING, G_TYPE_INT, G_TYPE_INT, G_TYPE_BOOLEAN, G_TYPE_STRING, G_TYPE_STRV);
+
+ renderer = gtk_cell_renderer_text_new ();
+ column = gtk_tree_view_column_new_with_attributes ("Display", renderer, "text", DISPLAY_COL, NULL);
+ gtk_tree_view_append_column (GTK_TREE_VIEW (WID ("sounds_treeview")), column);
+
+ renderer = gtk_cell_renderer_combo_new();
+ g_signal_connect (renderer, "edited", G_CALLBACK (setting_column_edited), dialog);
+ g_signal_connect (renderer, "editing-started", G_CALLBACK (combobox_editing_started), dialog);
+ custom_model = GTK_TREE_MODEL (gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_INT));
+ fill_custom_model (GTK_LIST_STORE (custom_model));
+ g_object_set (renderer, "model", custom_model, "has-entry", FALSE, "editable", TRUE, "text-column", 0, NULL);
+ column = gtk_tree_view_column_new_with_attributes ("Setting", renderer, "editable", EDITABLE_COL, "visible", TRUE, NULL);
+ gtk_tree_view_append_column (GTK_TREE_VIEW (WID ("sounds_treeview")), column);
+ gtk_tree_view_column_set_cell_data_func (column, renderer, setting_set_func, NULL, NULL);
+
+ gtk_tree_view_set_model (GTK_TREE_VIEW (WID ("sounds_treeview")), GTK_TREE_MODEL (store));
+ gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (WID ("sounds_treeview")), FALSE);
+
+ /* Fill in the model */
+ type = CATEGORY_INVALID;
+
+ for (i = 0; ; i++) {
+ GtkTreeIter *_parent;
+
+ if (sounds[i].category == -1)
+ break;
+
+ if (sounds[i].type == SOUND_TYPE_VISUAL_BELL && have_xkb == FALSE)
+ continue;
+
+ /* Is it a new type of sound? */
+ if (sounds[i].category == type && type != CATEGORY_INVALID && type != CATEGORY_BELL)
+ _parent = &parent;
+ else
+ _parent = NULL;
+
+ if (sounds[i].type == SOUND_TYPE_VISUAL_BELL)
+ gtk_tree_store_insert_with_values (store, &iter, _parent, G_MAXINT,
+ DISPLAY_COL, _(sounds[i].display_name),
+ SETTING_COL, visual_bell_setting,
+ TYPE_COL, sounds[i].type,
+ EDITABLE_COL, TRUE,
+ -1);
+ else if (sounds[i].type != -1)
+ gtk_tree_store_insert_with_values (store, &iter, _parent, G_MAXINT,
+ DISPLAY_COL, _(sounds[i].display_name),
+ SETTING_COL, SOUND_BUILTIN,
+ TYPE_COL, sounds[i].type,
+ SOUND_NAMES_COL, sounds[i].names,
+ EDITABLE_COL, TRUE,
+ -1);
+ else
+ /* Category */
+ gtk_tree_store_insert_with_values (store, &iter, _parent, G_MAXINT,
+ DISPLAY_COL, _(sounds[i].display_name),
+ SETTING_COL, SOUND_UNSET,
+ TYPE_COL, sounds[i].type,
+ EDITABLE_COL, FALSE,
+ -1);
+
+ /* If we didn't set a parent already, set one in case we need it later */
+ if (_parent == NULL)
+ parent = iter;
+ type = sounds[i].category;
+ }
+
+ gtk_tree_view_expand_all (GTK_TREE_VIEW (WID ("sounds_treeview")));
+
+ /* Listen to GConf for a bunch of keys */
+ input_feedback_enabled = gconf_client_get_bool (client, INPUT_SOUNDS_KEY, NULL);
+ if (input_feedback_enabled == FALSE)
+ set_input_feedback_enabled (dialog, FALSE);
+ gconf_client_notify_add (client, INPUT_SOUNDS_KEY,
+ (GConfClientNotifyFunc) input_feedback_changed_cb, dialog, NULL, NULL);
+
+ audible_bell_enabled = gconf_client_get_bool (client, AUDIO_BELL_KEY, NULL);
+ if (audible_bell_enabled == FALSE)
+ set_audible_bell_enabled (dialog, FALSE);
+ gconf_client_notify_add (client, AUDIO_BELL_KEY,
+ (GConfClientNotifyFunc) audible_bell_changed_cb, dialog, NULL, NULL);
+
+ /* Setup the default values if we're using the custom theme */
+ theme_name = gconf_client_get_string (client, SOUND_THEME_KEY, NULL);
+ if (theme_name != NULL && strcmp (theme_name, CUSTOM_THEME_NAME) == 0)
+ gtk_tree_model_foreach (GTK_TREE_MODEL (store), theme_changed_custom_init, NULL);
+ g_free (theme_name);
+
+ g_object_unref (G_OBJECT (client));
+}
+
Index: capplets/sound/Makefile.am
===================================================================
--- capplets/sound/Makefile.am (revision 8792)
+++ capplets/sound/Makefile.am (working copy)
@@ -4,15 +4,23 @@
bin_PROGRAMS = gnome-sound-properties
gnome_sound_properties_LDADD = \
- $(top_builddir)/libsounds/libsounds.la \
$(GNOMECC_CAPPLETS_LIBS) \
- $(SOUND_CAPPLET_LIBS) \
+ $(CANBERRA_LIBS) $(SOUND_CAPPLET_LIBS) \
$(HAL_LIBS)
-gnome_sound_properties_SOURCES = sound-properties-capplet.c pipeline-tests.h pipeline-tests.c mixer-support.h mixer-support.c
+gnome_sound_properties_SOURCES = \
+ sound-properties-capplet.c \
+ pipeline-tests.h \
+ pipeline-tests.c \
+ mixer-support.h \
+ mixer-support.c \
+ sound-theme.c \
+ sound-theme.h \
+ sound-theme-file-utils.c \
+ sound-theme-file-utils.h
INCLUDES = \
$(GNOMECC_CAPPLETS_CFLAGS) \
- $(SOUND_CAPPLET_CFLAGS) \
+ $(CANBERRA_CFLAGS) $(SOUND_CAPPLET_CFLAGS) \
$(HAL_CFLAGS) \
-DGNOMELOCALEDIR="\"$(datadir)/locale\"" \
-DGNOMECC_DATA_DIR="\"$(pkgdatadir)\"" \
Index: capplets/sound/sound-theme.h
===================================================================
--- capplets/sound/sound-theme.h (revision 0)
+++ capplets/sound/sound-theme.h (revision 0)
@@ -0,0 +1,31 @@
+/* -*- mode: c; style: linux -*- */
+/* -*- c-basic-offset: 2 -*- */
+
+/* sound-theme.h
+ * Copyright (C) 2008 Bastien Nocera <hadess at hadess.net>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ */
+#ifndef __SOUND_THEME_HH__
+#define __SOUND_THEME_HH__
+
+#include <gtk/gtk.h>
+#include <glade/glade.h>
+
+void setup_sound_theme (GladeXML *dialog);
+void setup_sound_theme_custom (GladeXML *dialog, gboolean have_xkb);
+
+#endif /* __SOUND_THEME_HH__ */
Index: control-center.spec
===================================================================
RCS file: /cvs/pkgs/rpms/control-center/devel/control-center.spec,v
retrieving revision 1.378
retrieving revision 1.379
diff -u -r1.378 -r1.379
--- control-center.spec 24 Jul 2008 15:28:33 -0000 1.378
+++ control-center.spec 24 Jul 2008 15:53:03 -0000 1.379
@@ -22,14 +22,13 @@
Summary: GNOME Control Center
Name: control-center
Version: 2.23.4
-Release: 5%{?dist}
+Release: 6%{?dist}
Epoch: 1
License: GPLv2+ and GFDL
Group: User Interface/Desktops
Source: http://download.gnome.org/sources/gnome-control-center/2.23/gnome-control-center-%{version}.tar.bz2
Source1: org.gnome.control-center.defaultbackground.policy
-Patch2: control-center-2.20.0-enable-sound-by-default.patch
Patch3: control-center-2.19.3-no-gnome-common.patch
Patch7: make-default.patch
# minor build breakage in gtk, will be fixed in the next gtk release
@@ -42,6 +41,9 @@
# http://bugzilla.gnome.org/show_bug.cgi?id=539343
Patch9: standard-icon.patch
+# http://bugzilla.gnome.org/show_bug.cgi?id=542979
+Patch10: gcc-libcanberra-support-5.patch
+
# call the Fedora/RHEL graphical passwd changing apps
Patch95: control-center-2.23.2-passwd.patch
Patch96: control-center-2.23.2-gecos.patch
@@ -76,7 +78,6 @@
Requires: pkgconfig
BuildRequires: autoconf automake libtool
-BuildRequires: esound-devel
BuildRequires: pango-devel
BuildRequires: glib2-devel >= %{glib2_version}
BuildRequires: gtk2-devel >= %{gtk2_version}
@@ -117,6 +118,7 @@
BuildRequires: dbus-glib-devel >= 0.70
BuildRequires: scrollkeeper
BuildRequires: PolicyKit-gnome-devel
+BuildRequires: libcanberra-devel
Requires(preun): GConf2
Requires(pre): GConf2
@@ -167,10 +169,10 @@
%prep
%setup -q -n gnome-control-center-%{version}
-%patch2 -p0 -b .enable-sound
%patch3 -p1 -b .no-gnome-common
%patch8 -p1 -b .gtkmarshal
%patch9 -p1 -b .standard-icon
+%patch10 -p0 -b .libcanberra
# vendor configuration patches
%patch95 -p1 -b .passwd
@@ -335,10 +337,8 @@
%{_libdir}/*.so.*
%{_sysconfdir}/gconf/schemas/fontilus.schemas
%{_sysconfdir}/gconf/schemas/control-center.schemas
-%{_sysconfdir}/gnome-vfs-2.0/modules/*.conf
%{_sysconfdir}/xdg/menus/gnomecc.menu
%{_sysconfdir}/xdg/autostart/gnome-at-session.desktop
-%{_libdir}/gnome-vfs-2.0/modules/*.so
%{_libdir}/window-manager-settings/*.so
%files devel
@@ -355,6 +355,10 @@
%dir %{_datadir}/gnome-control-center/keybindings
%changelog
+* Thu Jul 24 2008 - Bastien Nocera <bnocera at redhat.com> - 2.23.4-6
+- Add patch to support the Free Desktop sound theme spec
+- Remove gnome-vfs-methods as per upstream
+
* Thu Jul 24 2008 - Bastien Nocera <bnocera at redhat.com> - 2.23.4-5
- Remove some obsolete patches
--- control-center-2.20.0-enable-sound-by-default.patch DELETED ---
More information about the fedora-extras-commits
mailing list