[gdm] daemon: export a Version on the bus



commit d73f46ff9b04c8c2eeaced6346b5f2d1f9999565
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Mon Sep 10 22:08:15 2012 +0200

    daemon: export a Version on the bus
    
    This will allow clients such as gnome-shell to do runtime detection
    of gdm and fallback gracefully if not available.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=683790

 daemon/gdm-manager.c   |    2 ++
 daemon/gdm-manager.xml |    1 +
 data/gdm.conf.in       |    2 ++
 3 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c
index 394a90c..550f09d 100644
--- a/daemon/gdm-manager.c
+++ b/daemon/gdm-manager.c
@@ -1051,6 +1051,8 @@ gdm_manager_constructor (GType                  type,
                                                                                        n_construct_properties,
                                                                                        construct_properties));
 
+        gdm_dbus_manager_set_version (GDM_DBUS_MANAGER (manager), PACKAGE_VERSION);
+
         manager->priv->local_factory = gdm_local_display_factory_new (manager->priv->display_store);
 
 #ifdef HAVE_LIBXDMCP
diff --git a/daemon/gdm-manager.xml b/daemon/gdm-manager.xml
index db35b38..d3bb3b2 100644
--- a/daemon/gdm-manager.xml
+++ b/daemon/gdm-manager.xml
@@ -8,5 +8,6 @@
       <arg name="username" direction="in" type="s"/>
       <arg name="address" direction="out" type="s"/>
     </method>
+    <property name="Version" type="s" access="read"/>
   </interface>
 </node>
diff --git a/data/gdm.conf.in b/data/gdm.conf.in
index cd7fb36..e358ba3 100644
--- a/data/gdm.conf.in
+++ b/data/gdm.conf.in
@@ -39,6 +39,8 @@
     <allow send_destination="org.gnome.DisplayManager"
            send_interface="org.freedesktop.DBus.ObjectManager"/>
     <allow send_destination="org.gnome.DisplayManager"
+	   send_interface="org.freedesktop.DBus.Properties"/>
+    <allow send_destination="org.gnome.DisplayManager"
            send_interface="org.gnome.DisplayManager.Manager"/>
     <allow send_destination="org.gnome.DisplayManager"
            send_interface="org.gnome.DisplayManager.Display"



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