[nautilus] file-operations: use gtk_application_inhibit/uninhibit()
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] file-operations: use gtk_application_inhibit/uninhibit()
- Date: Thu, 26 Apr 2012 19:25:38 +0000 (UTC)
commit 8468037daa13bf17d3190b31a997389b6f489e78
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Thu Apr 26 15:13:28 2012 -0400
file-operations: use gtk_application_inhibit/uninhibit()
Instead of our custom code that does the same thing.
libnautilus-private/nautilus-file-operations.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/libnautilus-private/nautilus-file-operations.c b/libnautilus-private/nautilus-file-operations.c
index 460fa9a..00326b7 100644
--- a/libnautilus-private/nautilus-file-operations.c
+++ b/libnautilus-private/nautilus-file-operations.c
@@ -946,7 +946,8 @@ finalize_common (CommonJob *common)
nautilus_progress_info_finish (common->progress);
if (common->inhibit_cookie != -1) {
- nautilus_uninhibit_power_manager (common->inhibit_cookie);
+ gtk_application_uninhibit (GTK_APPLICATION (g_application_get_default ()),
+ common->inhibit_cookie);
}
common->inhibit_cookie = -1;
@@ -1266,7 +1267,11 @@ run_question (CommonJob *job,
static void
inhibit_power_manager (CommonJob *job, const char *message)
{
- job->inhibit_cookie = nautilus_inhibit_power_manager (message);
+ job->inhibit_cookie = gtk_application_inhibit (GTK_APPLICATION (g_application_get_default ()),
+ GTK_WINDOW (job->parent_window),
+ GTK_APPLICATION_INHIBIT_LOGOUT |
+ GTK_APPLICATION_INHIBIT_SUSPEND,
+ message);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]