diff options
Diffstat (limited to 'src/service.c')
-rw-r--r-- | src/service.c | 46 |
1 files changed, 4 insertions, 42 deletions
diff --git a/src/service.c b/src/service.c index 59728d1..4a62bd1 100644 --- a/src/service.c +++ b/src/service.c @@ -17,16 +17,13 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include <locale.h> - #include <glib/gi18n.h> #include <gio/gio.h> #include "backend.h" #include "service.h" -/* FIXME: remove -test */ -#define BUS_NAME "com.canonical.indicator.session-test" +#define BUS_NAME "com.canonical.indicator.session" #define BUS_PATH "/com/canonical/indicator/session" #define ICON_DEFAULT "system-devices-panel" @@ -49,7 +46,6 @@ static guint signals[LAST_SIGNAL] = { 0 }; enum { PROP_0, - PROP_REPLACE, PROP_MAX_USERS, PROP_LAST }; @@ -109,8 +105,6 @@ struct _IndicatorSessionServicePrivate int rebuild_flags; GDBusConnection * conn; GCancellable * cancellable; - - gboolean replace; }; typedef IndicatorSessionServicePrivate priv_t; @@ -1025,23 +1019,10 @@ indicator_session_service_init (IndicatorSessionService * self) gp = p->keybinding_settings; g_signal_connect_swapped (gp, "changed::screensaver", G_CALLBACK(rebuild_switch_section_soon), self); -} - -static void -my_constructed (GObject * o) -{ - GBusNameOwnerFlags owner_flags; - IndicatorSessionService * self = INDICATOR_SESSION_SERVICE(o); - - /* own the name in constructed() instead of init() so that - we'll know the value of the 'replace' property */ - owner_flags = G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT; - if (self->priv->replace) - owner_flags |= G_BUS_NAME_OWNER_FLAGS_REPLACE; self->priv->own_id = g_bus_own_name (G_BUS_TYPE_SESSION, BUS_NAME, - owner_flags, + G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT, on_bus_acquired, NULL, on_name_lost, @@ -1063,10 +1044,6 @@ my_get_property (GObject * o, switch (property_id) { - case PROP_REPLACE: - g_value_set_boolean (value, self->priv->replace); - break; - case PROP_MAX_USERS: g_value_set_uint (value, self->priv->max_users); break; @@ -1086,10 +1063,6 @@ my_set_property (GObject * o, switch (property_id) { - case PROP_REPLACE: - self->priv->replace = g_value_get_boolean (value); - break; - case PROP_MAX_USERS: self->priv->max_users = g_value_get_uint (value); rebuild_switch_section_soon (self); @@ -1157,7 +1130,6 @@ indicator_session_service_class_init (IndicatorSessionServiceClass * klass) GObjectClass * object_class = G_OBJECT_CLASS (klass); object_class->dispose = my_dispose; - object_class->constructed = my_constructed; object_class->get_property = my_get_property; object_class->set_property = my_set_property; @@ -1173,14 +1145,6 @@ indicator_session_service_class_init (IndicatorSessionServiceClass * klass) properties[PROP_0] = NULL; - properties[PROP_REPLACE] = g_param_spec_boolean ("replace", - "Replace Service", - "Replace existing service", - FALSE, - G_PARAM_READWRITE | - G_PARAM_CONSTRUCT_ONLY | - G_PARAM_STATIC_STRINGS); - properties[PROP_MAX_USERS] = g_param_spec_uint ("max-users", "Max Users", "Max visible users", @@ -1193,11 +1157,9 @@ indicator_session_service_class_init (IndicatorSessionServiceClass * klass) } IndicatorSessionService * -indicator_session_service_new (gboolean replace) +indicator_session_service_new (void) { - GObject * o = g_object_new (INDICATOR_TYPE_SESSION_SERVICE, - "replace", replace, - NULL); + GObject * o = g_object_new (INDICATOR_TYPE_SESSION_SERVICE, NULL); return INDICATOR_SESSION_SERVICE (o); } |