~unity8-desktop-session-team/indicator-session/indicator-session-using-upstart

« back to all changes in this revision

Viewing changes to src/backend-dbus/actions.c

  • Committer: Charles Kerr
  • Date: 2013-07-01 17:33:08 UTC
  • mto: This revision was merged to the branch mainline in revision 399.
  • Revision ID: charles.kerr@canonical.com-20130701173308-n1colbxquhc5vpgn
in backend-dbus/actions.c's set_login1_seat(), disconnect from the previous seat's signals before unreff'ing it

Show diffs side-by-side

added added

removed removed

Lines of Context:
99
99
{
100
100
  priv_t * p = self->priv;
101
101
 
102
 
  g_clear_object (&p->login1_seat);
 
102
  if (p->login1_seat != NULL)
 
103
    {
 
104
      g_signal_handlers_disconnect_by_data (p->login1_seat, self);
 
105
      g_clear_object (&p->login1_seat);
 
106
    }
103
107
 
104
108
  if (seat != NULL)
105
109
    {
106
110
      p->login1_seat = g_object_ref (seat);
107
111
 
108
 
      g_signal_connect_swapped (seat, "notify::can-multi-session", G_CALLBACK(on_seat_notify_multi_session), self);
 
112
      g_signal_connect_swapped (seat, "notify::can-multi-session",
 
113
                                G_CALLBACK(on_seat_notify_multi_session), self);
109
114
    }
110
115
}
111
116