rpms/control-center/devel gcc-libcanberra-support-8.patch, NONE, 1.1 control-center.spec, 1.382, 1.383 gcc-libcanberra-support-5.patch, 1.1, NONE
Bastien Nocera (hadess)
fedora-extras-commits at redhat.com
Thu Jul 24 23:11:11 UTC 2008
- Previous message: rpms/perl-DateTime-Format-DBI/F-9 import.log, NONE, 1.1 perl-DateTime-Format-DBI.spec, NONE, 1.1 sources, 1.1, 1.2
- Next message: rpms/gparted/devel .cvsignore, 1.15, 1.16 gparted.spec, 1.40, 1.41 sources, 1.15, 1.16 gparted-refresh_crash-fix.patch, 1.3, NONE run-gparted, 1.3, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: hadess
Update of /cvs/pkgs/rpms/control-center/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv16709
Modified Files:
control-center.spec
Added Files:
gcc-libcanberra-support-8.patch
Removed Files:
gcc-libcanberra-support-5.patch
Log Message:
* Thu Jul 24 2008 - Bastien Nocera <bnocera at redhat.com> - 2.23.5-2
- Update the libcanberra patch
gcc-libcanberra-support-8.patch:
--- NEW FILE gcc-libcanberra-support-8.patch ---
Index: configure.in
===================================================================
--- configure.in (revision 8795)
+++ configure.in (working copy)
@@ -244,30 +244,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
@@ -302,15 +278,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 ==============================================
@@ -379,7 +362,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 8795)
+++ Makefile.am (working copy)
@@ -1,4 +1,4 @@
-SUBDIRS = po libsounds libwindow-settings libslab capplets shell help
+SUBDIRS = po libwindow-settings libslab capplets shell help
if HAVE_TYPING_BREAK
SUBDIRS += typing-break
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,152 @@
+/* -*- 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 <glib/gstdio.h>
+#include <gio/gio.h>
+
+#define CUSTOM_THEME_NAME "__custom"
+
+char *
+custom_theme_dir_path (const char *child)
+{
+ static char *dir = NULL;
+ const char *data_dir;
+
+ if (dir == NULL) {
+ data_dir = g_get_user_data_dir ();
+ dir = g_build_filename (data_dir, "sounds", CUSTOM_THEME_NAME, NULL);
+ }
+ if (child == NULL)
+ return g_strdup (dir);
+
+ return g_build_filename (dir, child, NULL);
+}
+
+void
+delete_custom_theme_dir (void)
+{
+ char *dir;
+ GFile *file;
+
+ dir = custom_theme_dir_path (NULL);
+ file = g_file_new_for_path (dir);
+ g_free (dir);
+ /* 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 (const char *sound_name, const char *pattern)
+{
+ GFile *file;
+ char *name, *filename;
+
+ name = g_strdup_printf (pattern, sound_name);
+ filename = custom_theme_dir_path (name);
+ g_free (name);
+ file = g_file_new_for_path (filename);
+ g_free (filename);
+ /* 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)
+{
+ guint i;
+
+ for (i = 0; sounds[i] != NULL; i++) {
+ delete_one_file (sounds[i], "%s.ogg");
+ }
+}
+
+void
+delete_disabled_files (char **sounds)
+{
+ guint i;
+
+ for (i = 0; sounds[i] != NULL; i++)
+ delete_one_file (sounds[i], "%s.disabled");
+}
+
+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)
+{
+ guint i;
+
+ for (i = 0; sounds[i] != NULL; i++) {
+ GFile *file;
+ char *name, *filename;
[...1754 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);
+ g_free (filename);
+ }
+ return FALSE;
+}
+
+static void
+treeview_row_activated (GtkTreeView *tree_view,
+ GtkTreePath *path,
+ GtkTreeViewColumn *column,
+ GladeXML *dialog)
+{
+ GtkTreeModel *model;
+ GtkTreeIter iter;
+ char **sound_names;
+ ca_context *ctx;
+
+ model = gtk_tree_view_get_model (tree_view);
+ if (gtk_tree_model_get_iter (model, &iter, path) == FALSE)
+ return;
+
+ gtk_tree_model_get (model, &iter, SOUND_NAMES_COL, &sound_names, -1);
+ if (sound_names == NULL)
+ return;
+
+ 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"),
+ NULL);
+ g_strfreev (sound_names);
+}
+
+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);
+
+ g_signal_connect (G_OBJECT (WID ("sounds_treeview")), "row-activated",
+ G_CALLBACK (treeview_row_activated), dialog);
+
+ /* 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/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.382
retrieving revision 1.383
diff -u -r1.382 -r1.383
--- control-center.spec 24 Jul 2008 22:01:59 -0000 1.382
+++ control-center.spec 24 Jul 2008 23:10:26 -0000 1.383
@@ -34,14 +34,8 @@
# minor build breakage in gtk, will be fixed in the next gtk release
Patch8: gtkmarshal.patch
-# http://bugzilla.gnome.org/show_bug.cgi?id=539336
-# http://bugzilla.gnome.org/show_bug.cgi?id=539338
-# http://bugzilla.gnome.org/show_bug.cgi?id=539339
-# http://bugzilla.gnome.org/show_bug.cgi?id=539340
-# http://bugzilla.gnome.org/show_bug.cgi?id=539343
-
# http://bugzilla.gnome.org/show_bug.cgi?id=542979
-#Patch10: gcc-libcanberra-support-5.patch
+Patch10: gcc-libcanberra-support-8.patch
# call the Fedora/RHEL graphical passwd changing apps
Patch95: control-center-2.23.2-passwd.patch
@@ -166,7 +160,7 @@
%patch3 -p1 -b .no-gnome-common
%patch8 -p1 -b .gtkmarshal
-#%patch10 -p0 -b .libcanberra
+%patch10 -p0 -b .libcanberra
# vendor configuration patches
%patch95 -p1 -b .passwd
@@ -343,6 +337,9 @@
%dir %{_datadir}/gnome-control-center/keybindings
%changelog
+* Thu Jul 24 2008 - Bastien Nocera <bnocera at redhat.com> - 2.23.5-2
+- Update the libcanberra patch
+
* Thu Jul 24 2008 Soren Sandmann <sandmann at redhat.com> - 2.23.5-1
- Update the packaged files to match reality.
--- gcc-libcanberra-support-5.patch DELETED ---
- Previous message: rpms/perl-DateTime-Format-DBI/F-9 import.log, NONE, 1.1 perl-DateTime-Format-DBI.spec, NONE, 1.1 sources, 1.1, 1.2
- Next message: rpms/gparted/devel .cvsignore, 1.15, 1.16 gparted.spec, 1.40, 1.41 sources, 1.15, 1.16 gparted-refresh_crash-fix.patch, 1.3, NONE run-gparted, 1.3, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the scm-commits
mailing list