gnome-session r5200 - in trunk: . gnome-session
- From: mccann svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-session r5200 - in trunk: . gnome-session
- Date: Thu, 15 Jan 2009 00:25:40 +0000 (UTC)
Author: mccann
Date: Thu Jan 15 00:25:40 2009
New Revision: 5200
URL: http://svn.gnome.org/viewvc/gnome-session?rev=5200&view=rev
Log:
2009-01-14 William Jon McCann <jmccann redhat com>
* gnome-session/gsm-presence.c:
* gnome-session/gsm-presence.h:
* gnome-session/org.gnome.SessionManager.Presence.xml:
Some changes based on comments from Robert McQueen.
Expose properties for status and status-text. Remove
getters.
Modified:
trunk/ChangeLog
trunk/gnome-session/gsm-presence.c
trunk/gnome-session/gsm-presence.h
trunk/gnome-session/org.gnome.SessionManager.Presence.xml
Modified: trunk/gnome-session/gsm-presence.c
==============================================================================
--- trunk/gnome-session/gsm-presence.c (original)
+++ trunk/gnome-session/gsm-presence.c Thu Jan 15 00:25:40 2009
@@ -152,34 +152,6 @@
presence->priv->idle_monitor = gs_idle_monitor_new ();
}
-gboolean
-gsm_presence_get_status_text (GsmPresence *presence,
- char **status_text,
- GError **error)
-{
- g_return_val_if_fail (GSM_IS_PRESENCE (presence), FALSE);
-
- if (presence->priv->status_text != NULL) {
- *status_text = g_strdup (presence->priv->status_text);
- } else {
- *status_text = g_strdup ("");
- }
-
- return TRUE;
-}
-
-gboolean
-gsm_presence_get_status (GsmPresence *presence,
- guint *status,
- GError **error)
-{
- g_return_val_if_fail (GSM_IS_PRESENCE (presence), FALSE);
-
- *status = presence->priv->status;
-
- return TRUE;
-}
-
static gboolean
on_idle_timeout (GSIdleMonitor *monitor,
guint id,
Modified: trunk/gnome-session/gsm-presence.h
==============================================================================
--- trunk/gnome-session/gsm-presence.h (original)
+++ trunk/gnome-session/gsm-presence.h Thu Jan 15 00:25:40 2009
@@ -84,12 +84,6 @@
guint n_seconds);
/* exported to bus */
-gboolean gsm_presence_get_status (GsmPresence *presence,
- guint *status,
- GError **error);
-gboolean gsm_presence_get_status_text (GsmPresence *presence,
- char **status_text,
- GError **error);
gboolean gsm_presence_set_status (GsmPresence *presence,
guint status,
GError **error);
Modified: trunk/gnome-session/org.gnome.SessionManager.Presence.xml
==============================================================================
--- trunk/gnome-session/org.gnome.SessionManager.Presence.xml (original)
+++ trunk/gnome-session/org.gnome.SessionManager.Presence.xml Thu Jan 15 00:25:40 2009
@@ -2,30 +2,45 @@
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
<interface name="org.gnome.SessionManager.Presence">
- <method name="GetStatus">
- <arg type="u" name="status" direction="out">
- <doc:doc>
- <doc:summary>The status value</doc:summary>
- </doc:doc>
- </arg>
+
+ <property name="status" type="u" access="readwrite">
<doc:doc>
<doc:description>
- <doc:para>Return the status of the session.</doc:para>
- </doc:description>
- </doc:doc>
- </method>
- <method name="GetStatusText">
- <arg type="s" name="status_text" direction="out">
- <doc:doc>
- <doc:summary>The status text</doc:summary>
- </doc:doc>
- </arg>
+ <doc:para>
+ The status of the session.
+ </doc:para>
+ <doc:para>
+ The status parameter must be one of the following:
+ <doc:list>
+ <doc:item>
+ <doc:term>0</doc:term>
+ <doc:definition>Available</doc:definition>
+ </doc:item>
+ <doc:item>
+ <doc:term>1</doc:term>
+ <doc:definition>Invisible</doc:definition>
+ </doc:item>
+ <doc:item>
+ <doc:term>2</doc:term>
+ <doc:definition>Busy</doc:definition>
+ </doc:item>
+ <doc:item>
+ <doc:term>3</doc:term>
+ <doc:definition>Idle</doc:definition>
+ </doc:item>
+ </doc:list>
+ </doc:para>
+ </doc:description>
+ </doc:doc>
+ </property>
+ <property name="status-text" type="s" access="readwrite">
<doc:doc>
<doc:description>
- <doc:para>Return the descriptive status of the session.</doc:para>
+ <doc:para>The descriptive status for the session.
+ </doc:para>
</doc:description>
</doc:doc>
- </method>
+ </property>
<method name="SetStatus">
<arg type="u" name="status" direction="in">
<doc:doc>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]