2
* Copyright 2013 Canonical Ltd.
5
* Charles Kerr <charles.kerr@canonical.com>
7
* This program is free software: you can redistribute it and/or modify it
8
* under the terms of the GNU General Public License version 3, as published
9
* by the Free Software Foundation.
11
* This program is distributed in the hope that it will be useful, but
12
* WITHOUT ANY WARRANTY; without even the implied warranties of
13
* MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
14
* PURPOSE. See the GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License along
17
* with this program. If not, see <http://www.gnu.org/licenses/>.
21
#include <glib/gi18n.h>
23
#include "dbus-end-session-dialog.h"
24
#include "dbus-login1-manager.h"
25
#include "dbus-webcredentials.h"
26
#include "gnome-screen-saver.h"
27
#include "gnome-session-manager.h"
33
END_SESSION_TYPE_LOGOUT = 0,
34
END_SESSION_TYPE_SHUTDOWN,
35
END_SESSION_TYPE_REBOOT
38
struct _IndicatorSessionActionsDbusPriv
40
GCancellable * cancellable;
42
GSettings * lockdown_settings;
43
GSettings * indicator_settings;
44
GnomeScreenSaver * screen_saver;
45
GnomeSessionManager * session_manager;
46
Login1Manager * login1_manager;
47
GCancellable * login1_manager_cancellable;
48
Login1Seat * login1_seat;
49
DisplayManagerSeat * dm_seat;
50
GCancellable * dm_seat_cancellable;
51
Webcredentials * webcredentials;
52
EndSessionDialog * end_session_dialog;
56
gboolean can_hibernate;
57
gboolean seat_allows_activation;
60
typedef IndicatorSessionActionsDbusPriv priv_t;
62
G_DEFINE_TYPE (IndicatorSessionActionsDbus,
63
indicator_session_actions_dbus,
64
INDICATOR_TYPE_SESSION_ACTIONS)
71
log_and_clear_error (GError ** err, const char * loc, const char * func)
75
if (!g_error_matches (*err, G_IO_ERROR, G_IO_ERROR_CANCELLED))
76
g_warning ("%s %s: %s", loc, func, (*err)->message);
94
static prompt_status_t
95
get_prompt_status (IndicatorSessionActionsDbus * self)
97
prompt_status_t prompt = PROMPT_NONE;
98
const priv_t * p = self->priv;
100
if (!g_settings_get_boolean (p->indicator_settings, "suppress-logout-restart-shutdown"))
102
/* can we use the Unity prompt? */
103
if ((prompt == PROMPT_NONE) && p && p->end_session_dialog)
105
GDBusProxy * proxy = G_DBUS_PROXY (p->end_session_dialog);
106
char * name = g_dbus_proxy_get_name_owner (proxy);
108
prompt = PROMPT_WITH_UNITY;
112
/* can we use zenity? */
113
if ((prompt == PROMPT_NONE) && p && p->zenity)
114
prompt = PROMPT_WITH_ZENITY;
125
on_seat_notify_multi_session (IndicatorSessionActionsDbus * self)
127
priv_t * p = self->priv;
130
b = login1_seat_get_can_multi_session (p->login1_seat);
132
if (p->seat_allows_activation != b)
134
p->seat_allows_activation = b;
136
indicator_session_actions_notify_can_switch (INDICATOR_SESSION_ACTIONS(self));
141
set_login1_seat (IndicatorSessionActionsDbus * self, Login1Seat * seat)
143
priv_t * p = self->priv;
145
if (p->login1_seat != NULL)
147
g_signal_handlers_disconnect_by_data (p->login1_seat, self);
148
g_clear_object (&p->login1_seat);
153
p->login1_seat = g_object_ref (seat);
155
g_signal_connect_swapped (seat, "notify::can-multi-session",
156
G_CALLBACK(on_seat_notify_multi_session), self);
165
set_dm_seat (IndicatorSessionActionsDbus * self, DisplayManagerSeat * seat)
167
priv_t * p = self->priv;
169
if (p->dm_seat != NULL)
171
g_cancellable_cancel (p->dm_seat_cancellable);
172
g_clear_object (&p->dm_seat_cancellable);
173
g_clear_object (&p->dm_seat);
178
p->dm_seat = g_object_ref (seat);
179
p->dm_seat_cancellable = g_cancellable_new ();
184
on_screensaver_proxy_ready (GObject * o G_GNUC_UNUSED, GAsyncResult * res, gpointer gself)
187
GnomeScreenSaver * ss;
190
ss = gnome_screen_saver_proxy_new_for_bus_finish (res, &err);
193
INDICATOR_SESSION_ACTIONS_DBUS(gself)->priv->screen_saver = ss;
196
log_and_clear_error (&err, G_STRLOC, G_STRFUNC);
200
on_can_suspend_ready (GObject * o, GAsyncResult * res, gpointer gself)
207
login1_manager_call_can_suspend_finish (LOGIN1_MANAGER(o), &str, res, &err);
210
priv_t * p = INDICATOR_SESSION_ACTIONS_DBUS(gself)->priv;
212
const gboolean b = !g_strcmp0 (str, "yes");
214
if (p->can_suspend != b)
217
indicator_session_actions_notify_can_suspend (gself);
223
log_and_clear_error (&err, G_STRLOC, G_STRFUNC);
227
on_can_hibernate_ready (GObject * o, GAsyncResult * res, gpointer gself)
234
login1_manager_call_can_hibernate_finish (LOGIN1_MANAGER(o), &str, res, &err);
237
priv_t * p = INDICATOR_SESSION_ACTIONS_DBUS(gself)->priv;
239
const gboolean b = !g_strcmp0 (str, "yes");
241
if (p->can_hibernate != b)
243
p->can_hibernate = b;
244
indicator_session_actions_notify_can_hibernate (gself);
250
log_and_clear_error (&err, G_STRLOC, G_STRFUNC);
254
set_login1_manager (IndicatorSessionActionsDbus * self,
255
Login1Manager * login1_manager)
257
priv_t * p = self->priv;
259
if (p->login1_manager != NULL)
261
g_cancellable_cancel (p->login1_manager_cancellable);
262
g_clear_object (&p->login1_manager_cancellable);
263
g_clear_object (&p->login1_manager);
266
if (login1_manager != NULL)
268
p->login1_manager_cancellable = g_cancellable_new ();
270
p->login1_manager = g_object_ref (login1_manager);
272
login1_manager_call_can_suspend (p->login1_manager,
273
p->login1_manager_cancellable,
274
on_can_suspend_ready,
277
login1_manager_call_can_hibernate (p->login1_manager,
278
p->login1_manager_cancellable,
279
on_can_hibernate_ready,
285
on_session_manager_proxy_ready (GObject * o G_GNUC_UNUSED, GAsyncResult * res, gpointer gself)
288
GnomeSessionManager * sm;
291
sm = gnome_session_manager_proxy_new_for_bus_finish (res, &err);
294
INDICATOR_SESSION_ACTIONS_DBUS(gself)->priv->session_manager = sm;
297
log_and_clear_error (&err, G_STRLOC, G_STRFUNC);
301
on_webcredentials_proxy_ready (GObject * o G_GNUC_UNUSED, GAsyncResult * res, gpointer gself)
304
Webcredentials * webcredentials;
307
webcredentials = webcredentials_proxy_new_for_bus_finish (res, &err);
310
INDICATOR_SESSION_ACTIONS_DBUS(gself)->priv->webcredentials = webcredentials;
312
g_signal_connect_swapped (webcredentials, "notify::error-status",
313
G_CALLBACK(indicator_session_actions_notify_has_online_account_error), gself);
315
if (webcredentials_get_error_status (webcredentials))
316
indicator_session_actions_notify_has_online_account_error (gself);
319
log_and_clear_error (&err, G_STRLOC, G_STRFUNC);
323
on_end_session_dialog_proxy_ready (GObject * o G_GNUC_UNUSED, GAsyncResult * res, gpointer gself)
326
EndSessionDialog * end_session_dialog;
329
end_session_dialog = end_session_dialog_proxy_new_for_bus_finish (res, &err);
332
INDICATOR_SESSION_ACTIONS_DBUS(gself)->priv->end_session_dialog = end_session_dialog;
334
indicator_session_actions_notify_can_prompt (INDICATOR_SESSION_ACTIONS(gself));
335
indicator_session_actions_notify_can_reboot (INDICATOR_SESSION_ACTIONS(gself));
338
log_and_clear_error (&err, G_STRLOC, G_STRFUNC);
342
**** Virtual Functions
346
my_can_lock (IndicatorSessionActions * self)
348
priv_t * p = INDICATOR_SESSION_ACTIONS_DBUS(self)->priv;
350
return !g_settings_get_boolean (p->lockdown_settings, "disable-lock-screen");
354
my_can_logout (IndicatorSessionActions * self)
356
priv_t * p = INDICATOR_SESSION_ACTIONS_DBUS(self)->priv;
358
if (g_settings_get_boolean (p->indicator_settings, "suppress-logout-menuitem"))
361
if (g_settings_get_boolean (p->lockdown_settings, "disable-log-out"))
368
my_can_reboot (IndicatorSessionActions * actions)
370
IndicatorSessionActionsDbus * self = INDICATOR_SESSION_ACTIONS_DBUS(actions);
371
priv_t * p = self->priv;
373
if (g_settings_get_boolean (p->indicator_settings, "suppress-restart-menuitem"))
376
/* Shutdown and Restart are the same dialog prompt in Unity,
377
so disable the redundant 'Restart' menuitem in that mode */
378
if (!g_settings_get_boolean (p->indicator_settings, "suppress-shutdown-menuitem"))
379
if (get_prompt_status(self) == PROMPT_WITH_UNITY)
386
my_can_switch (IndicatorSessionActions * self)
388
const priv_t * p = INDICATOR_SESSION_ACTIONS_DBUS(self)->priv;
390
return p->seat_allows_activation
391
&& !g_settings_get_boolean (p->lockdown_settings, "disable-user-switching");
395
my_can_suspend (IndicatorSessionActions * self)
397
const priv_t * p = INDICATOR_SESSION_ACTIONS_DBUS(self)->priv;
399
return p && p->can_suspend;
403
my_can_hibernate (IndicatorSessionActions * self)
405
const priv_t * p = INDICATOR_SESSION_ACTIONS_DBUS(self)->priv;
407
return p && p->can_hibernate;
411
my_can_prompt (IndicatorSessionActions * self)
413
return get_prompt_status(INDICATOR_SESSION_ACTIONS_DBUS(self)) != PROMPT_NONE;
417
my_has_online_account_error (IndicatorSessionActions * self)
419
const priv_t * p = INDICATOR_SESSION_ACTIONS_DBUS(self)->priv;
421
return p && (p->webcredentials) && (webcredentials_get_error_status (p->webcredentials));
425
my_suspend (IndicatorSessionActions * self)
427
priv_t * p = INDICATOR_SESSION_ACTIONS_DBUS(self)->priv;
429
g_return_if_fail (p->login1_manager != NULL);
431
login1_manager_call_suspend (p->login1_manager,
433
p->login1_manager_cancellable,
439
my_hibernate (IndicatorSessionActions * self)
441
priv_t * p = INDICATOR_SESSION_ACTIONS_DBUS(self)->priv;
443
g_return_if_fail (p->login1_manager != NULL);
445
login1_manager_call_hibernate (p->login1_manager,
447
p->login1_manager_cancellable,
453
**** End Session Dialog
457
logout_now (IndicatorSessionActionsDbus * self)
459
priv_t * p = self->priv;
461
g_return_if_fail (p->session_manager != NULL);
463
gnome_session_manager_call_logout (p->session_manager,
464
1, /* don't prompt */
471
on_reboot_response (GObject * o,
473
gpointer unused G_GNUC_UNUSED)
476
login1_manager_call_reboot_finish (LOGIN1_MANAGER(o), res, &err);
479
g_warning ("Unable to reboot: %s", err->message);
485
reboot_now (IndicatorSessionActionsDbus * self)
487
priv_t * p = self->priv;
489
g_return_if_fail (p->login1_manager != NULL);
491
login1_manager_call_reboot (p->login1_manager,
493
p->login1_manager_cancellable,
499
power_off_now (IndicatorSessionActionsDbus * self)
501
priv_t * p = self->priv;
503
g_return_if_fail (p->login1_manager != NULL);
505
login1_manager_call_power_off (p->login1_manager,
507
p->login1_manager_cancellable,
513
stop_listening_to_dialog (IndicatorSessionActionsDbus * self)
515
g_signal_handlers_disconnect_by_data (self->priv->end_session_dialog, self);
518
on_end_session_dialog_canceled (IndicatorSessionActionsDbus * self)
520
stop_listening_to_dialog (self);
523
on_end_session_dialog_closed (IndicatorSessionActionsDbus * self)
525
stop_listening_to_dialog (self);
529
on_open_end_session_dialog_ready (GObject * o,
531
gpointer gself G_GNUC_UNUSED)
534
end_session_dialog_call_open_finish (END_SESSION_DIALOG(o), res, &err);
535
log_and_clear_error (&err, G_STRLOC, G_STRFUNC);
539
show_unity_end_session_dialog (IndicatorSessionActionsDbus * self, int type)
541
priv_t * p = INDICATOR_SESSION_ACTIONS_DBUS(self)->priv;
542
gpointer o = p->end_session_dialog;
543
const char * inhibitor_paths[] = { NULL };
545
g_assert (o != NULL);
547
g_signal_connect_swapped (o, "confirmed-logout", G_CALLBACK(logout_now), self);
548
g_signal_connect_swapped (o, "confirmed-reboot", G_CALLBACK(reboot_now), self);
549
g_signal_connect_swapped (o, "confirmed-shutdown", G_CALLBACK(power_off_now), self);
550
g_signal_connect_swapped (o, "canceled", G_CALLBACK(on_end_session_dialog_canceled), self);
551
g_signal_connect_swapped (o, "closed", G_CALLBACK(on_end_session_dialog_closed), self);
553
end_session_dialog_call_open (p->end_session_dialog, type, 0, 0, inhibitor_paths,
555
on_open_end_session_dialog_ready,
560
zenity_question (IndicatorSessionActionsDbus * self,
561
const char * icon_name,
564
const char * ok_label,
565
const char * cancel_label)
571
command_line = g_strdup_printf ("%s"
573
" --icon-name=\"%s\""
577
" --cancel-label=\"%s\""
587
if (!g_spawn_command_line_sync (command_line, NULL, NULL, &exit_status, NULL))
589
/* Treat failure-to-prompt as user confirmation.
590
Otherwise how will the user ever log out? */
595
confirmed = exit_status == 0;
598
g_free (command_line);
603
my_logout (IndicatorSessionActions * actions)
605
IndicatorSessionActionsDbus * self = INDICATOR_SESSION_ACTIONS_DBUS (actions);
607
switch (get_prompt_status (self))
609
case PROMPT_WITH_UNITY:
610
show_unity_end_session_dialog (self, END_SESSION_TYPE_LOGOUT);
617
case PROMPT_WITH_ZENITY:
619
const char * primary = _("Are you sure you want to close all programs and log out?");
620
const char * secondary = _("Some software updates won't be applied until the computer next restarts.");
621
char * text = g_strdup_printf ("<big><b>%s</b></big>\n \n%s", primary, secondary);
623
gboolean confirmed = zenity_question (self,
640
my_reboot (IndicatorSessionActions * actions)
642
IndicatorSessionActionsDbus * self = INDICATOR_SESSION_ACTIONS_DBUS (actions);
644
switch (get_prompt_status (self))
646
case PROMPT_WITH_UNITY:
647
show_unity_end_session_dialog (self, END_SESSION_TYPE_REBOOT);
654
case PROMPT_WITH_ZENITY:
655
if (zenity_question (self,
658
_("Are you sure you want to close all programs and restart the computer?"),
667
my_power_off (IndicatorSessionActions * actions)
669
IndicatorSessionActionsDbus * self = INDICATOR_SESSION_ACTIONS_DBUS (actions);
671
switch (get_prompt_status (self))
673
case PROMPT_WITH_UNITY:
674
/* NB: TYPE_REBOOT instead of TYPE_SHUTDOWN because
675
the latter adds lock & logout options in Unity... */
676
show_unity_end_session_dialog (self, END_SESSION_TYPE_REBOOT);
679
case PROMPT_WITH_ZENITY:
680
if (zenity_question (self,
683
_("Are you sure you want to close all programs and shut down the computer?"),
686
power_off_now (self);
690
power_off_now (self);
700
run_outside_app (const char * cmd)
703
g_debug ("%s calling \"%s\"", G_STRFUNC, cmd);
704
g_spawn_command_line_async (cmd, &err);
705
log_and_clear_error (&err, G_STRLOC, G_STRFUNC);
709
my_help (IndicatorSessionActions * self G_GNUC_UNUSED)
711
run_outside_app ("yelp");
715
have_unity_control_center (void)
720
if (g_strcmp0 (g_getenv ("XDG_CURRENT_DESKTOP"), "Unity") != 0)
723
path = g_find_program_in_path ("unity-control-center");
724
have_ucc = path != NULL;
731
my_settings (IndicatorSessionActions * self G_GNUC_UNUSED)
733
if (have_unity_control_center ())
734
run_outside_app ("unity-control-center");
736
run_outside_app ("gnome-control-center");
740
my_online_accounts (IndicatorSessionActions * self G_GNUC_UNUSED)
742
if (have_unity_control_center ())
743
run_outside_app ("unity-control-center credentials");
745
run_outside_app ("gnome-control-center credentials");
749
my_about (IndicatorSessionActions * self G_GNUC_UNUSED)
751
if (have_unity_control_center ())
752
run_outside_app ("unity-control-center info");
754
run_outside_app ("gnome-control-center info");
762
lock_current_session (IndicatorSessionActions * self)
764
priv_t * p = INDICATOR_SESSION_ACTIONS_DBUS(self)->priv;
766
g_return_if_fail (p->screen_saver != NULL);
768
gnome_screen_saver_call_lock (p->screen_saver, p->cancellable, NULL, NULL);
772
my_switch_to_screensaver (IndicatorSessionActions * self)
774
lock_current_session (self);
778
my_switch_to_greeter (IndicatorSessionActions * self)
780
priv_t * p = INDICATOR_SESSION_ACTIONS_DBUS(self)->priv;
782
g_return_if_fail (p->dm_seat != NULL);
784
display_manager_seat_call_switch_to_greeter (p->dm_seat,
785
p->dm_seat_cancellable,
790
my_switch_to_guest (IndicatorSessionActions * self)
792
priv_t * p = INDICATOR_SESSION_ACTIONS_DBUS(self)->priv;
794
g_return_if_fail (p->dm_seat != NULL);
796
lock_current_session (self);
798
display_manager_seat_call_switch_to_guest (p->dm_seat, "",
799
p->dm_seat_cancellable,
804
my_switch_to_username (IndicatorSessionActions * self, const char * username)
806
priv_t * p = INDICATOR_SESSION_ACTIONS_DBUS(self)->priv;
808
g_return_if_fail (p->dm_seat != NULL);
810
display_manager_seat_call_switch_to_user (p->dm_seat, username, "",
811
p->dm_seat_cancellable,
816
my_dispose (GObject * o)
818
IndicatorSessionActionsDbus * self = INDICATOR_SESSION_ACTIONS_DBUS (o);
819
priv_t * p = self->priv;
821
if (p->cancellable != NULL)
823
g_cancellable_cancel (p->cancellable);
824
g_clear_object (&p->cancellable);
827
if (p->indicator_settings != NULL)
829
g_signal_handlers_disconnect_by_data (p->indicator_settings, self);
830
g_clear_object (&p->indicator_settings);
833
if (p->lockdown_settings != NULL)
835
g_signal_handlers_disconnect_by_data (p->lockdown_settings, self);
836
g_clear_object (&p->lockdown_settings);
839
if (p->webcredentials != NULL)
841
g_signal_handlers_disconnect_by_data (p->webcredentials, self);
842
g_clear_object (&p->webcredentials);
845
if (p->end_session_dialog != NULL)
847
stop_listening_to_dialog (self);
848
g_clear_object (&p->end_session_dialog);
851
g_clear_object (&p->screen_saver);
852
g_clear_object (&p->session_manager);
853
set_dm_seat (self, NULL);
854
set_login1_manager (self, NULL);
855
set_login1_seat (self, NULL);
857
G_OBJECT_CLASS (indicator_session_actions_dbus_parent_class)->dispose (o);
861
my_finalize (GObject * o)
863
IndicatorSessionActionsDbus * self = INDICATOR_SESSION_ACTIONS_DBUS (o);
864
priv_t * p = self->priv;
871
**** GObject Boilerplate
875
/* cppcheck-suppress unusedFunction */
876
indicator_session_actions_dbus_class_init (IndicatorSessionActionsDbusClass * klass)
878
GObjectClass * object_class;
879
IndicatorSessionActionsClass * actions_class;
881
object_class = G_OBJECT_CLASS (klass);
882
object_class->dispose = my_dispose;
883
object_class->finalize = my_finalize;
885
actions_class = INDICATOR_SESSION_ACTIONS_CLASS (klass);
886
actions_class->can_lock = my_can_lock;
887
actions_class->can_logout = my_can_logout;
888
actions_class->can_reboot = my_can_reboot;
889
actions_class->can_switch = my_can_switch;
890
actions_class->can_suspend = my_can_suspend;
891
actions_class->can_hibernate = my_can_hibernate;
892
actions_class->can_prompt = my_can_prompt;
893
actions_class->has_online_account_error = my_has_online_account_error;
894
actions_class->logout = my_logout;
895
actions_class->suspend = my_suspend;
896
actions_class->hibernate = my_hibernate;
897
actions_class->reboot = my_reboot;
898
actions_class->power_off = my_power_off;
899
actions_class->settings = my_settings;
900
actions_class->online_accounts = my_online_accounts;
901
actions_class->help = my_help;
902
actions_class->about = my_about;
903
actions_class->switch_to_screensaver = my_switch_to_screensaver;
904
actions_class->switch_to_greeter = my_switch_to_greeter;
905
actions_class->switch_to_guest = my_switch_to_guest;
906
actions_class->switch_to_username = my_switch_to_username;
908
g_type_class_add_private (klass, sizeof (IndicatorSessionActionsDbusPriv));
912
/* cppcheck-suppress unusedFunction */
913
indicator_session_actions_dbus_init (IndicatorSessionActionsDbus * self)
918
p = G_TYPE_INSTANCE_GET_PRIVATE (self,
919
INDICATOR_TYPE_SESSION_ACTIONS_DBUS,
920
IndicatorSessionActionsDbusPriv);
921
p->cancellable = g_cancellable_new ();
922
p->seat_allows_activation = TRUE;
925
p->zenity = g_find_program_in_path ("zenity");
927
s = g_settings_new ("org.gnome.desktop.lockdown");
928
g_signal_connect_swapped (s, "changed::disable-lock-screen",
929
G_CALLBACK(indicator_session_actions_notify_can_lock), self);
930
g_signal_connect_swapped (s, "changed::disable-log-out",
931
G_CALLBACK(indicator_session_actions_notify_can_logout), self);
932
g_signal_connect_swapped (s, "changed::disable-user-switching",
933
G_CALLBACK(indicator_session_actions_notify_can_switch), self);
934
p->lockdown_settings = s;
936
s = g_settings_new ("com.canonical.indicator.session");
937
g_signal_connect_swapped (s, "changed::suppress-logout-restart-shutdown",
938
G_CALLBACK(indicator_session_actions_notify_can_prompt), self);
939
g_signal_connect_swapped (s, "changed::suppress-logout-restart-shutdown",
940
G_CALLBACK(indicator_session_actions_notify_can_reboot), self);
941
g_signal_connect_swapped (s, "changed::suppress-restart-menuitem",
942
G_CALLBACK(indicator_session_actions_notify_can_reboot), self);
943
g_signal_connect_swapped (s, "changed::suppress-shutdown-menuitem",
944
G_CALLBACK(indicator_session_actions_notify_can_reboot), self);
945
p->indicator_settings = s;
947
gnome_screen_saver_proxy_new_for_bus (G_BUS_TYPE_SESSION,
948
G_DBUS_PROXY_FLAGS_NONE,
949
"org.gnome.ScreenSaver",
950
"/org/gnome/ScreenSaver",
952
on_screensaver_proxy_ready,
955
gnome_session_manager_proxy_new_for_bus (G_BUS_TYPE_SESSION,
956
G_DBUS_PROXY_FLAGS_NONE,
957
"org.gnome.SessionManager",
958
"/org/gnome/SessionManager",
960
on_session_manager_proxy_ready,
963
webcredentials_proxy_new_for_bus (G_BUS_TYPE_SESSION,
964
G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START,
965
"com.canonical.indicators.webcredentials",
966
"/com/canonical/indicators/webcredentials",
968
on_webcredentials_proxy_ready,
971
end_session_dialog_proxy_new_for_bus (G_BUS_TYPE_SESSION,
972
G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START,
973
"com.canonical.Unity",
974
"/org/gnome/SessionManager/EndSessionDialog",
976
on_end_session_dialog_proxy_ready,
984
IndicatorSessionActions *
985
indicator_session_actions_dbus_new (void)
987
gpointer o = g_object_new (INDICATOR_TYPE_SESSION_ACTIONS_DBUS, NULL);
989
return INDICATOR_SESSION_ACTIONS (o);
993
indicator_session_actions_dbus_set_proxies (IndicatorSessionActionsDbus * self,
994
Login1Manager * login1_manager,
995
Login1Seat * login1_seat,
996
DisplayManagerSeat * dm_seat)
998
g_return_if_fail (INDICATOR_IS_SESSION_ACTIONS_DBUS(self));
1000
set_login1_manager (self, login1_manager);
1001
set_login1_seat (self, login1_seat);
1002
set_dm_seat (self, dm_seat);