[sound-juicer] Use gtk_application_inhibit()
- From: Phillip Wood <pwood src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sound-juicer] Use gtk_application_inhibit()
- Date: Mon, 1 Sep 2014 14:21:32 +0000 (UTC)
commit 325abe31d659a5566602bc31cd76ba9aea27abf8
Author: Phillip Wood <phillip wood dunelm org uk>
Date: Tue Aug 19 16:46:04 2014 +0100
Use gtk_application_inhibit()
Now that we require Gtk 3.4 it makes sense use the inhibit
functionality provided by GtkApplication rather than doing the DBus
calls ourselves.
https://bugzilla.gnome.org/show_bug.cgi?id=735093
src/Makefile.am | 2 -
src/sj-extracting.c | 12 +++--
src/sj-inhibit.c | 130 ---------------------------------------------------
src/sj-inhibit.h | 30 ------------
4 files changed, 7 insertions(+), 167 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index e9094c5..bff1baa 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -14,8 +14,6 @@ sound_juicer_SOURCES = \
sj-about.c \
sj-extracting.h \
sj-extracting.c \
- sj-inhibit.h \
- sj-inhibit.c \
sj-genres.h \
sj-genres.c \
sj-tree-view.h \
diff --git a/src/sj-extracting.c b/src/sj-extracting.c
index ea04e19..9e1feb2 100644
--- a/src/sj-extracting.c
+++ b/src/sj-extracting.c
@@ -43,7 +43,6 @@
#include "sj-main.h"
#include "sj-util.h"
#include "sj-play.h"
-#include "sj-inhibit.h"
#include "sj-genres.h"
#include "egg-play-preview.h"
@@ -213,7 +212,8 @@ cleanup (void)
brasero_drive_unlock (drive);
- sj_uninhibit (cookie);
+ gtk_application_uninhibit (GTK_APPLICATION (g_application_get_default ()),
+ cookie);
/* Remove any state icons from the model */
if (current.stamp) {
@@ -823,9 +823,11 @@ on_extract_activate (GtkWidget *button, gpointer user_data)
g_free (reason);
}
- cookie = sj_inhibit (g_get_application_name (),
- _("Extracting audio from CD"),
- GDK_WINDOW_XID(gtk_widget_get_window (main_window)));
+ cookie = gtk_application_inhibit (GTK_APPLICATION (g_application_get_default ()),
+ GTK_WINDOW (main_window),
+ GTK_APPLICATION_INHIBIT_SUSPEND | GTK_APPLICATION_INHIBIT_IDLE,
+ _("Extracting audio from CD"));
+
/* Save the genre */
save_genre (genre_entry);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]