[gdm/wip/wayland-at-login-screen: 1/68] Revert "GdmLaunchEnvironment: allow a session bus address to be passed in"



commit ffec4f0428285f677e3da2a64b4b2ccb9b6308b4
Author: Ray Strode <rstrode redhat com>
Date:   Tue Feb 17 12:38:47 2015 -0500

    Revert "GdmLaunchEnvironment: allow a session bus address to be passed in"
    
    This reverts commit 5872d0738cf0bddd66d8aeae35bacadb04baa4c6.
    
    I pushed this patch prematurely.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=693668

 daemon/gdm-launch-environment.c |   42 +-------------------------------------
 1 files changed, 2 insertions(+), 40 deletions(-)
---
diff --git a/daemon/gdm-launch-environment.c b/daemon/gdm-launch-environment.c
index e6b16dd..07a6026 100644
--- a/daemon/gdm-launch-environment.c
+++ b/daemon/gdm-launch-environment.c
@@ -71,7 +71,6 @@ struct GdmLaunchEnvironmentPrivate
         char           *x11_display_device;
         char           *x11_display_hostname;
         char           *x11_authority_file;
-        char           *dbus_session_bus_address;
         gboolean        x11_display_is_local;
 };
 
@@ -87,7 +86,6 @@ enum {
         PROP_USER_NAME,
         PROP_RUNTIME_DIR,
         PROP_COMMAND,
-        PROP_DBUS_SESSION_BUS_ADDRESS,
 };
 
 enum {
@@ -290,10 +288,6 @@ build_launch_environment (GdmLaunchEnvironment *launch_environment,
         g_hash_table_insert (hash, g_strdup ("RUNNING_UNDER_GDM"), g_strdup ("true"));
         g_hash_table_insert (hash, g_strdup ("DCONF_PROFILE"), g_strdup ("gdm"));
 
-        if (launch_environment->priv->dbus_session_bus_address) {
-                g_hash_table_insert (hash, g_strdup ("DBUS_SESSION_BUS_ADDRESS"), g_strdup 
(launch_environment->priv->dbus_session_bus_address));
-        }
-
         return hash;
 }
 
@@ -507,17 +501,7 @@ gdm_launch_environment_start (GdmLaunchEnvironment *launch_environment)
                                  0);
 
         gdm_session_start_conversation (launch_environment->priv->session, "gdm-launch-environment");
-
-        if (launch_environment->priv->dbus_session_bus_address) {
-                gdm_session_select_program (launch_environment->priv->session, 
launch_environment->priv->command);
-        } else {
-                /* wrap it in dbus-launch */
-                char *command = g_strdup_printf ("%s %s", DBUS_LAUNCH_COMMAND, 
launch_environment->priv->command);
-
-                gdm_session_select_program (launch_environment->priv->session, command);
-                g_free (command);
-        }
-
+        gdm_session_select_program (launch_environment->priv->session, launch_environment->priv->command);
         res = TRUE;
  out:
         if (local_error) {
@@ -629,19 +613,11 @@ _gdm_launch_environment_set_runtime_dir (GdmLaunchEnvironment *launch_environmen
 }
 
 static void
-_gdm_launch_environment_set_dbus_session_bus_address (GdmLaunchEnvironment *launch_environment,
-                                                      const char           *addr)
-{
-        g_free (launch_environment->priv->dbus_session_bus_address);
-        launch_environment->priv->dbus_session_bus_address = g_strdup (addr);
-}
-
-static void
 _gdm_launch_environment_set_command (GdmLaunchEnvironment *launch_environment,
                                      const char           *name)
 {
         g_free (launch_environment->priv->command);
-        launch_environment->priv->command = g_strdup (name);
+        launch_environment->priv->command = g_strdup_printf ("%s %s", DBUS_LAUNCH_COMMAND, name);
 }
 
 static void
@@ -682,9 +658,6 @@ gdm_launch_environment_set_property (GObject      *object,
         case PROP_RUNTIME_DIR:
                 _gdm_launch_environment_set_runtime_dir (self, g_value_get_string (value));
                 break;
-        case PROP_DBUS_SESSION_BUS_ADDRESS:
-                _gdm_launch_environment_set_dbus_session_bus_address (self, g_value_get_string (value));
-                break;
         case PROP_COMMAND:
                 _gdm_launch_environment_set_command (self, g_value_get_string (value));
                 break;
@@ -732,9 +705,6 @@ gdm_launch_environment_get_property (GObject    *object,
         case PROP_RUNTIME_DIR:
                 g_value_set_string (value, self->priv->runtime_dir);
                 break;
-        case PROP_DBUS_SESSION_BUS_ADDRESS:
-                g_value_set_string (value, self->priv->dbus_session_bus_address);
-                break;
         case PROP_COMMAND:
                 g_value_set_string (value, self->priv->command);
                 break;
@@ -826,13 +796,6 @@ gdm_launch_environment_class_init (GdmLaunchEnvironmentClass *klass)
                                                               "command",
                                                               NULL,
                                                               G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
-        g_object_class_install_property (object_class,
-                                         PROP_DBUS_SESSION_BUS_ADDRESS,
-                                         g_param_spec_string ("dbus-session-bus-address",
-                                                              "D-Bus session bus address",
-                                                              "D-Bus session bus address",
-                                                              NULL,
-                                                              G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
         signals [OPENED] =
                 g_signal_new ("opened",
                               G_OBJECT_CLASS_TYPE (object_class),
@@ -918,7 +881,6 @@ gdm_launch_environment_finalize (GObject *object)
         g_free (launch_environment->priv->command);
         g_free (launch_environment->priv->user_name);
         g_free (launch_environment->priv->runtime_dir);
-        g_free (launch_environment->priv->dbus_session_bus_address);
         g_free (launch_environment->priv->x11_display_name);
         g_free (launch_environment->priv->x11_display_seat_id);
         g_free (launch_environment->priv->x11_display_device);


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