[gnome-session] tools: Use new inhibitor flags header



commit a2636d3fafc737679f485fd03d89261d46563010
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Nov 7 12:50:41 2012 +0100

    tools: Use new inhibitor flags header

 tools/gnome-session-inhibit.c |   18 ++++++------------
 1 files changed, 6 insertions(+), 12 deletions(-)
---
diff --git a/tools/gnome-session-inhibit.c b/tools/gnome-session-inhibit.c
index 6473735..ea5c7a9 100644
--- a/tools/gnome-session-inhibit.c
+++ b/tools/gnome-session-inhibit.c
@@ -30,17 +30,11 @@
 #include <glib/gi18n.h>
 #include <gio/gio.h>
 
-typedef enum {
-        GSM_INHIBITOR_FLAG_LOGOUT      = 1 << 0,
-        GSM_INHIBITOR_FLAG_SWITCH_USER = 1 << 1,
-        GSM_INHIBITOR_FLAG_SUSPEND     = 1 << 2,
-        GSM_INHIBITOR_FLAG_IDLE        = 1 << 3,
-        GSM_INHIBITOR_FLAG_AUTOMOUNT   = 1 << 4
-} GsmInhibitorFlags;
-
-static GsmInhibitorFlags parse_flags (const gchar *arg)
+#include "gnome-session/gsm-inhibitor-flag.h"
+
+static GsmInhibitorFlag parse_flags (const gchar *arg)
 {
-  GsmInhibitorFlags flags;
+  GsmInhibitorFlag flags;
   gchar **args;
   gint i;
 
@@ -70,7 +64,7 @@ static GsmInhibitorFlags parse_flags (const gchar *arg)
 
 static gboolean inhibit (const gchar       *app_id,
                          const gchar       *reason,
-                         GsmInhibitorFlags flags)
+                         GsmInhibitorFlag flags)
 {
   GDBusConnection *bus;
   GVariant *ret;
@@ -136,7 +130,7 @@ static void version (void)
 int main (int argc, char *argv[])
 {
   gchar *prgname;
-  GsmInhibitorFlags inhibit_flags = 0;
+  GsmInhibitorFlag inhibit_flags = 0;
   gboolean show_help = FALSE;
   gboolean show_version = FALSE;
   gint i;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]