rpms/gnome-media/devel gvc-log.patch, NONE, 1.1 gnome-media.spec, 1.158, 1.159

Matthias Clasen mclasen at fedoraproject.org
Fri Mar 6 20:03:17 UTC 2009


Author: mclasen

Update of /cvs/pkgs/rpms/gnome-media/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv21992

Modified Files:
	gnome-media.spec 
Added Files:
	gvc-log.patch 
Log Message:
turn off debug spew


gvc-log.patch:

--- NEW FILE gvc-log.patch ---
diff -up gnome-media-2.25.92/gnome-volume-control/src/applet-main.c.gvc-log gnome-media-2.25.92/gnome-volume-control/src/applet-main.c
--- gnome-media-2.25.92/gnome-volume-control/src/applet-main.c.gvc-log	2009-03-03 12:20:56.000000000 -0500
+++ gnome-media-2.25.92/gnome-volume-control/src/applet-main.c	2009-03-06 14:58:27.015806564 -0500
@@ -32,6 +32,7 @@
 #include <unique/uniqueapp.h>
 
 #include "gvc-applet.h"
+#include "gvc-log.h"
 
 #define GVCA_DBUS_NAME "org.gnome.VolumeControlApplet"
 
@@ -54,11 +55,14 @@ main (int argc, char **argv)
         bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
         textdomain (GETTEXT_PACKAGE);
 
+	gvc_log_init ();
+
         error = NULL;
         gtk_init_with_args (&argc, &argv,
                             (char *) _(" - GNOME Volume Control Applet"),
                             entries, GETTEXT_PACKAGE,
                             &error);
+
         if (error != NULL) {
                 g_warning ("%s", error->message);
                 exit (1);
@@ -69,6 +73,8 @@ main (int argc, char **argv)
                 exit (1);
         }
 
+	gvc_log_set_debug (debug);
+
         app = unique_app_new (GVCA_DBUS_NAME, NULL);
         if (unique_app_is_running (app)) {
                 g_warning ("Applet is already running, exiting");
diff -up gnome-media-2.25.92/gnome-volume-control/src/dialog-main.c.gvc-log gnome-media-2.25.92/gnome-volume-control/src/dialog-main.c
--- gnome-media-2.25.92/gnome-volume-control/src/dialog-main.c.gvc-log	2009-03-03 12:20:56.000000000 -0500
+++ gnome-media-2.25.92/gnome-volume-control/src/dialog-main.c	2009-03-06 14:58:35.291048924 -0500
@@ -32,6 +32,7 @@
 #include <unique/uniqueapp.h>
 
 #include "gvc-mixer-dialog.h"
+#include "gvc-log.h"
 
 #define GVCA_DBUS_NAME "org.gnome.VolumeControl"
 #define DIALOG_POPUP_TIMEOUT 3
@@ -146,6 +147,8 @@ main (int argc, char **argv)
         bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
         textdomain (GETTEXT_PACKAGE);
 
+	gvc_log_init ();
+
         error = NULL;
         gtk_init_with_args (&argc, &argv,
                             (char *) _(" - GNOME Volume Control"),
@@ -161,6 +164,8 @@ main (int argc, char **argv)
                 exit (1);
         }
 
+	gvc_log_set_debug (debug);
+
         app = unique_app_new (GVCA_DBUS_NAME, NULL);
         if (unique_app_is_running (app)) {
                 unique_app_send_message (app, UNIQUE_ACTIVATE, NULL);
diff -up /dev/null gnome-media-2.25.92/gnome-volume-control/src/gvc-log.c
--- /dev/null	2009-03-06 10:04:35.315275556 -0500
+++ gnome-media-2.25.92/gnome-volume-control/src/gvc-log.c	2009-03-06 14:58:22.624792210 -0500
@@ -0,0 +1,63 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2009 Red Hat, Inc.
+ *
+ * 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 of the License, 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.h>
+#include <glib/gstdio.h>
+
+#include "gvc-log.h"
+
+
+static int log_levels = G_LOG_LEVEL_CRITICAL |
+                        G_LOG_LEVEL_ERROR    |
+                        G_LOG_LEVEL_WARNING  |
+                        G_LOG_LEVEL_DEBUG;
+
+static void
+gvc_log_default_handler (const gchar    *log_domain,
+                         GLogLevelFlags  log_level,
+                         const gchar    *message,
+                         gpointer        unused_data)
+{
+        if ((log_level & log_levels) == 0)
+                return;
+
+        g_log_default_handler (log_domain, log_level, message, unused_data);
+}
+
+void
+gvc_log_init (void)
+{
+        g_log_set_default_handler (gvc_log_default_handler, NULL);
+}
+
+void
+gvc_log_set_debug (gboolean debug)
+{
+        if (debug) {
+                log_levels |= G_LOG_LEVEL_DEBUG;
+                g_debug ("Enabling debugging");
+        } else {
+                g_debug ("Disabling debugging");
+                log_levels &= ~G_LOG_LEVEL_DEBUG;
+        }
+}
diff -up /dev/null gnome-media-2.25.92/gnome-volume-control/src/gvc-log.h
--- /dev/null	2009-03-06 10:04:35.315275556 -0500
+++ gnome-media-2.25.92/gnome-volume-control/src/gvc-log.h	2009-03-06 14:41:27.870798083 -0500
@@ -0,0 +1,35 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2009 Red Hat, Inc.
+ *
+ * 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 of the License, 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 __GVC_LOG_H
+#define __GVC_LOG_H
+
+#include <glib.h>
+
+G_BEGIN_DECLS
+
+
+void gvc_log_init      (void);
+void gvc_log_set_debug (gboolean debug);
+
+
+G_END_DECLS
+
+#endif /* __GVC_LOG_H */
diff -up gnome-media-2.25.92/gnome-volume-control/src/Makefile.am.gvc-log gnome-media-2.25.92/gnome-volume-control/src/Makefile.am
--- gnome-media-2.25.92/gnome-volume-control/src/Makefile.am.gvc-log	2009-03-03 12:20:56.000000000 -0500
+++ gnome-media-2.25.92/gnome-volume-control/src/Makefile.am	2009-03-06 14:38:05.977064353 -0500
@@ -45,6 +45,7 @@ gnome_volume_control_applet_SOURCES =		\
 	gvc-stream-status-icon.c		\
 	gvc-applet.h				\
 	gvc-applet.c				\
+	gvc-log.c				\
 	applet-main.c				\
 	$(NULL)
 
@@ -82,6 +83,7 @@ gnome_volume_control_SOURCES =			\
 	gvc-mixer-dialog.c			\
 	gvc-level-bar.h				\
 	gvc-level-bar.c				\
+	gvc-log.c				\
 	dialog-main.c				\
 	$(NULL)
 


Index: gnome-media.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gnome-media/devel/gnome-media.spec,v
retrieving revision 1.158
retrieving revision 1.159
diff -u -r1.158 -r1.159
--- gnome-media.spec	4 Mar 2009 18:52:31 -0000	1.158
+++ gnome-media.spec	6 Mar 2009 20:02:47 -0000	1.159
@@ -14,10 +14,12 @@
 Summary:        GNOME media programs
 Name:           gnome-media
 Version:        2.25.92
-Release:        1%{?dist}
+Release:        2%{?dist}
 License:        GPLv2+ and GFDL
 Group:          Applications/Multimedia
 Source:         http://download.gnome.org/sources/gnome-media/2.25/gnome-media-%{version}.tar.bz2
+# fixed in upstream svn
+Patch0:		gvc-log.patch
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 Obsoletes:      gnome
@@ -45,6 +47,8 @@
 BuildRequires:  gnome-doc-utils
 BuildRequires:  intltool
 BuildRequires:  unique-devel
+# for patch 0
+BuildRequires:  autoconf automake libtool
 
 %description
 This package contains a few media utilities for the GNOME desktop,
@@ -74,6 +78,9 @@
 
 %prep
 %setup -q
+%patch0 -p1 -b .gvc-log
+
+autoreconf -f -i
 
 %build
 # try to work around a problem where gst-inspect does
@@ -247,6 +254,9 @@
 %{_libdir}/pkgconfig/*
 
 %changelog
+* Fri Mar  6 2009 Matthias Clasen  <mclasen at redhat.com> 2.25.92-2
+- Turn off debug spew
+
 * Tue Mar  3 2009 Matthias Clasen  <mclasen at redhat.com> 2.25.92-1
 - Update to 2.25.92
 




More information about the fedora-extras-commits mailing list