[gtk+] Add a trivial implementation of the new apis



commit 916009b5d6212761843a8b61b3215716ab2fafba
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Jan 7 00:38:57 2012 -0500

    Add a trivial implementation of the new apis
    
    For non-X11, this is just a placeholder until we get around
    to moving the EggSMClient implementations over.

 gtk/gtkapplication.c |   48 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 48 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkapplication.c b/gtk/gtkapplication.c
index f5826a8..4705c25 100644
--- a/gtk/gtkapplication.c
+++ b/gtk/gtkapplication.c
@@ -1444,6 +1444,54 @@ gtk_application_end_session (GtkApplication         *application,
                          NULL, NULL, NULL);
       break;
     }
+
+#else
+
+/* Trivial implementation.
+ *
+ * EggSMClient has working Win32 and OSX implementations of
+ * ::quit-requested, ::quit, ::quit-cancelled that should be
+ * copied here eventually.
+ *
+ * For the inhibit API, see
+ * http://msdn.microsoft.com/en-us/library/ms700677%28VS.85%29.aspx
+ */
+
+void
+gtk_application_quit_response (GtkApplication *application,
+                               gboolean        will_quit,
+                               const gchar    *reason)
+{
+}
+
+guint
+gtk_application_inhibit (GtkApplication             *application,
+                         GtkWindow                  *window,
+                         GtkApplicationInhibitFlags  flags,
+                         const gchar                *reason)
+{
+  return 0;
+}
+
+void
+gtk_application_uninhibit (GtkApplication *application,
+                           guint           cookie)
+{
+}
+
+gboolean
+gtk_application_is_inhibited (GtkApplication             *application,
+                              GtkApplicationInhibitFlags  flags)
+{
+  return FALSE;
+}
+
+gboolean
+gtk_application_end_session (GtkApplication         *application,
+                             GtkApplicationEndStyle *style,
+                             gboolean                request_confirmation)
+{
+  return FALSE;
 }
 
 #endif



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