gnome-screensaver r1581 - in trunk: . src
- From: mccann svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-screensaver r1581 - in trunk: . src
- Date: Mon, 19 Jan 2009 00:54:18 +0000 (UTC)
Author: mccann
Date: Mon Jan 19 00:54:18 2009
New Revision: 1581
URL: http://svn.gnome.org/viewvc/gnome-screensaver?rev=1581&view=rev
Log:
2009-01-18 William Jon McCann <jmccann redhat com>
* src/gs-listener-dbus.c (listener_set_session_idle_internal),
(listener_get_property), (do_introspect),
(listener_dbus_handle_session_message):
* src/gs-monitor.c (disconnect_manager_signals),
(connect_manager_signals):
Remove obsolete signals and properties.
Modified:
trunk/ChangeLog
trunk/src/gs-listener-dbus.c
trunk/src/gs-monitor.c
Modified: trunk/src/gs-listener-dbus.c
==============================================================================
--- trunk/src/gs-listener-dbus.c (original)
+++ trunk/src/gs-listener-dbus.c Mon Jan 19 00:54:18 2009
@@ -207,41 +207,6 @@
}
static void
-send_dbus_void_signal (GSListener *listener,
- const char *name)
-{
- DBusMessage *message;
-
- g_return_if_fail (listener != NULL);
-
- message = dbus_message_new_signal (GS_LISTENER_PATH,
- GS_LISTENER_SERVICE,
- name);
-
- if (! send_dbus_message (listener->priv->connection, message)) {
- gs_debug ("Could not send %s signal", name);
- }
-
- dbus_message_unref (message);
-}
-
-void
-gs_listener_emit_auth_request_begin (GSListener *listener)
-{
- g_return_if_fail (listener != NULL);
-
- send_dbus_void_signal (listener, "AuthenticationRequestBegin");
-}
-
-void
-gs_listener_emit_auth_request_end (GSListener *listener)
-{
- g_return_if_fail (listener != NULL);
-
- send_dbus_void_signal (listener, "AuthenticationRequestEnd");
-}
-
-static void
gs_listener_send_signal_active_changed (GSListener *listener)
{
g_return_if_fail (listener != NULL);
@@ -252,14 +217,6 @@
send_dbus_boolean_signal (listener, "ActiveChanged", listener->priv->active);
}
-static void
-gs_listener_send_signal_session_idle_changed (GSListener *listener)
-{
- g_return_if_fail (listener != NULL);
-
- send_dbus_boolean_signal (listener, "SessionIdleChanged", listener->priv->session_idle);
-}
-
static const char *
get_name_for_entry_type (int entry_type)
{
@@ -410,8 +367,6 @@
listener->priv->session_idle_start = 0;
}
- gs_listener_send_signal_session_idle_changed (listener);
-
return TRUE;
}
@@ -1089,13 +1044,6 @@
dbus_message_iter_append_basic (&iter, DBUS_TYPE_BOOLEAN, &b);
}
break;
- case PROP_SESSION_IDLE:
- {
- dbus_bool_t b;
- b = listener->priv->session_idle;
- dbus_message_iter_append_basic (&iter, DBUS_TYPE_BOOLEAN, &b);
- }
- break;
default:
gs_debug ("Unsupported property id %u", prop_id);
break;
@@ -1158,53 +1106,6 @@
}
static DBusHandlerResult
-listener_get_session_idle_time (GSListener *listener,
- DBusConnection *connection,
- DBusMessage *message)
-{
- DBusMessageIter iter;
- DBusMessage *reply;
- dbus_uint32_t secs;
-
- reply = dbus_message_new_method_return (message);
-
- if (reply == NULL) {
- g_error ("No memory");
- }
-
- dbus_message_iter_init_append (reply, &iter);
-
- if (listener->priv->session_idle) {
- time_t now = time (NULL);
-
- if (now < listener->priv->session_idle_start) {
- /* shouldn't happen */
- gs_debug ("Session idle start time is in the future");
- secs = 0;
- } else if (listener->priv->session_idle_start <= 0) {
- /* shouldn't happen */
- gs_debug ("Session idle start time was not set");
- secs = 0;
- } else {
- secs = now - listener->priv->session_idle_start;
- }
- } else {
- secs = 0;
- }
-
- gs_debug ("Returning session idle for %u seconds", secs);
- dbus_message_iter_append_basic (&iter, DBUS_TYPE_UINT32, &secs);
-
- if (! dbus_connection_send (connection, reply, NULL)) {
- g_error ("No memory");
- }
-
- dbus_message_unref (reply);
-
- return DBUS_HANDLER_RESULT_HANDLED;
-}
-
-static DBusHandlerResult
do_introspect (DBusConnection *connection,
DBusMessage *message,
dbus_bool_t local_interface)
@@ -1260,22 +1161,9 @@
" <method name=\"SetActive\">\n"
" <arg name=\"value\" direction=\"in\" type=\"b\"/>\n"
" </method>\n"
- " <method name=\"GetSessionIdle\">\n"
- " <arg name=\"value\" direction=\"out\" type=\"b\"/>\n"
- " </method>\n"
- " <method name=\"GetSessionIdleTime\">\n"
- " <arg name=\"seconds\" direction=\"out\" type=\"u\"/>\n"
- " </method>\n"
" <signal name=\"ActiveChanged\">\n"
" <arg name=\"new_value\" type=\"b\"/>\n"
" </signal>\n"
- " <signal name=\"SessionIdleChanged\">\n"
- " <arg name=\"new_value\" type=\"b\"/>\n"
- " </signal>\n"
- " <signal name=\"AuthenticationRequestBegin\">\n"
- " </signal>\n"
- " <signal name=\"AuthenticationRequestEnd\">\n"
- " </signal>\n"
" </interface>\n");
reply = dbus_message_new_method_return (message);
@@ -1357,12 +1245,6 @@
if (dbus_message_is_method_call (message, GS_LISTENER_SERVICE, "GetActiveTime")) {
return listener_get_active_time (listener, connection, message);
}
- if (dbus_message_is_method_call (message, GS_LISTENER_SERVICE, "GetSessionIdle")) {
- return listener_get_property (listener, connection, message, PROP_SESSION_IDLE);
- }
- if (dbus_message_is_method_call (message, GS_LISTENER_SERVICE, "GetSessionIdleTime")) {
- return listener_get_session_idle_time (listener, connection, message);
- }
if (dbus_message_is_method_call (message, GS_LISTENER_SERVICE, "SimulateUserActivity")) {
g_signal_emit (listener, signals [SIMULATE_USER_ACTIVITY], 0);
return DBUS_HANDLER_RESULT_HANDLED;
Modified: trunk/src/gs-monitor.c
==============================================================================
--- trunk/src/gs-monitor.c (original)
+++ trunk/src/gs-monitor.c Mon Jan 19 00:54:18 2009
@@ -86,20 +86,6 @@
gs_listener_set_active (monitor->priv->listener, FALSE);
}
-static void
-manager_auth_request_begin_cb (GSManager *manager,
- GSMonitor *monitor)
-{
- gs_listener_emit_auth_request_begin (monitor->priv->listener);
-}
-
-static void
-manager_auth_request_end_cb (GSManager *manager,
- GSMonitor *monitor)
-{
- gs_listener_emit_auth_request_end (monitor->priv->listener);
-}
-
static gboolean
watcher_idle_cb (GSWatcher *watcher,
gboolean is_idle,
@@ -379,8 +365,6 @@
{
g_signal_handlers_disconnect_by_func (monitor->priv->manager, manager_activated_cb, monitor);
g_signal_handlers_disconnect_by_func (monitor->priv->manager, manager_deactivated_cb, monitor);
- g_signal_handlers_disconnect_by_func (monitor->priv->manager, manager_auth_request_begin_cb, monitor);
- g_signal_handlers_disconnect_by_func (monitor->priv->manager, manager_auth_request_end_cb, monitor);
}
static void
@@ -390,10 +374,6 @@
G_CALLBACK (manager_activated_cb), monitor);
g_signal_connect (monitor->priv->manager, "deactivated",
G_CALLBACK (manager_deactivated_cb), monitor);
- g_signal_connect (monitor->priv->manager, "auth-request-begin",
- G_CALLBACK (manager_auth_request_begin_cb), monitor);
- g_signal_connect (monitor->priv->manager, "auth-request-end",
- G_CALLBACK (manager_auth_request_end_cb), monitor);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]