[gdm/wip/shell-greeter] libgdmgreeter: rename connect call
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm/wip/shell-greeter] libgdmgreeter: rename connect call
- Date: Fri, 24 Jun 2011 19:27:30 +0000 (UTC)
commit c86441b419192dd3523b88efc2f2963dbabf016b
Author: Ray Strode <rstrode redhat com>
Date: Fri Jun 24 15:25:34 2011 -0400
libgdmgreeter: rename connect call
This is more introspection friendly, since
"connect" conflicts with g_signal_connect
gui/libgdmgreeter/gdm-greeter-client.c | 17 +++++++++--------
gui/libgdmgreeter/gdm-greeter-client.h | 2 +-
2 files changed, 10 insertions(+), 9 deletions(-)
---
diff --git a/gui/libgdmgreeter/gdm-greeter-client.c b/gui/libgdmgreeter/gdm-greeter-client.c
index 01c89f6..ac2cdf0 100644
--- a/gui/libgdmgreeter/gdm-greeter-client.c
+++ b/gui/libgdmgreeter/gdm-greeter-client.c
@@ -50,6 +50,8 @@ struct GdmGreeterClientPrivate
char *display_id;
gboolean display_is_local;
+
+ guint32 is_connected : 1;
};
enum {
@@ -934,7 +936,7 @@ client_dbus_filter_function (DBusConnection *connection,
}
/**
- * gdm_greeter_client_connect:
+ * gdm_greeter_client_open_connection:
*
* @client: a #GdmGreeterClient
*
@@ -945,15 +947,13 @@ client_dbus_filter_function (DBusConnection *connection,
* Returns: %TRUE if connected, or %FALSE if unavailable
*/
gboolean
-gdm_greeter_client_connect (GdmGreeterClient *client,
- GError **error)
+gdm_greeter_client_open_connection (GdmGreeterClient *client,
+ GError **error)
{
- gboolean ret;
DBusError local_error;
g_return_val_if_fail (GDM_IS_GREETER_CLIENT (client), FALSE);
-
- ret = FALSE;
+ g_return_val_if_fail (!client->priv->is_connected, TRUE);
if (client->priv->address == NULL) {
g_warning ("GDM_GREETER_DBUS_ADDRESS not set");
@@ -992,10 +992,11 @@ gdm_greeter_client_connect (GdmGreeterClient *client,
cache_display_values (client);
- ret = TRUE;
+
+ client->priv->is_connected = TRUE;
out:
- return ret;
+ return client->priv->is_connected;
}
static void
diff --git a/gui/libgdmgreeter/gdm-greeter-client.h b/gui/libgdmgreeter/gdm-greeter-client.h
index 9b2be8d..3440214 100644
--- a/gui/libgdmgreeter/gdm-greeter-client.h
+++ b/gui/libgdmgreeter/gdm-greeter-client.h
@@ -87,7 +87,7 @@ GQuark gdm_greeter_client_error_quark (void);
GdmGreeterClient * gdm_greeter_client_new (void);
-gboolean gdm_greeter_client_connect (GdmGreeterClient *client,
+gboolean gdm_greeter_client_open_connection (GdmGreeterClient *client,
GError **error);
gboolean gdm_greeter_client_get_display_is_local (GdmGreeterClient *client);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]