rpms/sound-juicer/devel sound-juicer-2.28.0-use-gnome-session-inhibit.patch, NONE, 1.1 sound-juicer.spec, 1.121, 1.122

Richard Hughes rhughes at fedoraproject.org
Mon Sep 28 14:12:02 UTC 2009


Author: rhughes

Update of /cvs/pkgs/rpms/sound-juicer/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv4476

Modified Files:
	sound-juicer.spec 
Added Files:
	sound-juicer-2.28.0-use-gnome-session-inhibit.patch 
Log Message:
* Mon Sep 28 2009 Richard Hughes  <rhughes at redhat.com> - 2.28.0-3
- Apply a patch from upstream to inhibit gnome-session, rather than
  gnome-power-manager. This fixes a warning on rawhide when using sound-juicer.


sound-juicer-2.28.0-use-gnome-session-inhibit.patch:
 sj-extracting.c |    4 +++-
 sj-inhibit.c    |   16 +++++++++-------
 sj-inhibit.h    |    2 +-
 3 files changed, 13 insertions(+), 9 deletions(-)

--- NEW FILE sound-juicer-2.28.0-use-gnome-session-inhibit.patch ---
diff --git a/src/sj-extracting.c b/src/sj-extracting.c
index e44a589..b7118b1 100644
--- a/src/sj-extracting.c
+++ b/src/sj-extracting.c
@@ -30,6 +30,7 @@
 #include <glib.h>
 #include <gio/gio.h>
 #include <gtk/gtk.h>
+#include <gdk/gdkx.h>
 
 #include <brasero-volume.h>
 #include <canberra-gtk.h>
@@ -821,7 +822,8 @@ on_extract_activate (GtkWidget *button, gpointer user_data)
   }
   
   cookie = sj_inhibit (g_get_application_name (),
-                       _("Extracting audio from CD"));
+                       _("Extracting audio from CD"),
+                       GDK_WINDOW_XID(main_window->window));
 
   /* Save the genre */
   save_genre (genre_entry);
diff --git a/src/sj-inhibit.c b/src/sj-inhibit.c
index 7fc60e0..fc804d2 100644
--- a/src/sj-inhibit.c
+++ b/src/sj-inhibit.c
@@ -26,13 +26,13 @@
 #include "sj-inhibit.h"
  
 /* PowerManagent defines */
-#define	PM_DBUS_SERVICE    "org.freedesktop.PowerManagement"
-#define	PM_DBUS_INHIBIT_PATH   "/org/freedesktop/PowerManagement/Inhibit"
-#define	PM_DBUS_INHIBIT_INTERFACE    "org.freedesktop.PowerManagement.Inhibit"
+#define	PM_DBUS_SERVICE    "org.gnome.SessionManager"
+#define	PM_DBUS_INHIBIT_PATH   "/org/gnome/SessionManager"
+#define	PM_DBUS_INHIBIT_INTERFACE    "org.gnome.SessionManager"
 
 /** cookie is returned as an unsigned integer */
 guint
-sj_inhibit (const gchar * appname, const gchar * reason)
+sj_inhibit (const gchar * appname, const gchar * reason, guint xid)
 {
   gboolean res;
   guint cookie;
@@ -60,8 +60,10 @@ sj_inhibit (const gchar * appname, const gchar * reason)
 
   res = dbus_g_proxy_call (proxy,
 			    "Inhibit", &error,
-			    G_TYPE_STRING, appname,
+			    G_TYPE_STRING, appname, /* app-id */
+			    G_TYPE_UINT, xid,
 			    G_TYPE_STRING, reason,
+			    G_TYPE_UINT, 4+8, /* flags, inhibit being marked idle and allowing suspend */
 			    G_TYPE_INVALID,
 			    G_TYPE_UINT, &cookie,
                             G_TYPE_INVALID);
@@ -116,7 +118,7 @@ sj_uninhibit (guint cookie)
   }
 
   res = dbus_g_proxy_call (proxy,
-			    "UnInhibit",
+			    "Uninhibit",
 			    &error,
 			    G_TYPE_UINT, cookie,
 			    G_TYPE_INVALID,
@@ -124,7 +126,7 @@ sj_uninhibit (guint cookie)
 
   /* check the return value */
   if (!res) {
-    g_warning ("UnInhibit method failed");
+    g_warning ("Uninhibit method failed");
   }
 
   /* check the error value */
diff --git a/src/sj-inhibit.h b/src/sj-inhibit.h
index b93fbf9..3498cfe 100644
--- a/src/sj-inhibit.h
+++ b/src/sj-inhibit.h
@@ -25,7 +25,7 @@
 
 #include <glib.h>
  
-guint sj_inhibit (const gchar * appname, const gchar * reason);
+guint sj_inhibit (const gchar * appname, const gchar * reason, guint xid);
 void sj_uninhibit (guint cookie);
 
 #endif /* SJ_INHIBIT_H */


Index: sound-juicer.spec
===================================================================
RCS file: /cvs/pkgs/rpms/sound-juicer/devel/sound-juicer.spec,v
retrieving revision 1.121
retrieving revision 1.122
diff -u -p -r1.121 -r1.122
--- sound-juicer.spec	25 Sep 2009 09:01:00 -0000	1.121
+++ sound-juicer.spec	28 Sep 2009 14:11:58 -0000	1.122
@@ -8,7 +8,7 @@
 Name:		sound-juicer
 Summary:	Clean and lean CD ripper
 Version:	2.28.0
-Release:	2%{?dist}
+Release:	3%{?dist}
 License:	GPLv2+
 Group:		Applications/Multimedia
 Source:		http://download.gnome.org/sources/sound-juicer/2.28/%{name}-%{version}.tar.bz2
@@ -40,6 +40,9 @@ BuildRequires:  gnome-common
 BuildRequires:  automake autoconf libtool
 BuildRequires:  desktop-file-utils
 
+# already upstream, bfc60ae0bc2e8e41a234f4017600088b22af13d6
+Patch0: sound-juicer-2.28.0-use-gnome-session-inhibit.patch
+
 ExcludeArch: s390 s390x
 
 %description
@@ -47,6 +50,7 @@ GStreamer-based CD ripping tool. Saves a
 
 %prep
 %setup -q
+%patch0 -p1 -b .inhibit-gnome-session
 
 %build
 # work around a gstreamer problem where it
@@ -125,6 +129,10 @@ fi
 %{_mandir}/man1/*
 
 %changelog
+* Mon Sep 28 2009 Richard Hughes  <rhughes at redhat.com> - 2.28.0-3
+- Apply a patch from upstream to inhibit gnome-session, rather than
+  gnome-power-manager. This fixes a warning on rawhide when using sound-juicer.
+
 * Fri Sep 25 2009 Bastien Nocera <bnocera at redhat.com> 2.28.0-2
 - Remove old libmusicbrainz BR
 




More information about the fedora-extras-commits mailing list