This should rather be done in GObjectClass.constructed()
On Mon, Oct 10, 2011 at 2:34 PM, Hans de Goede <[email protected]> wrote: > The auto-clipboard setting now lives in the SpiceGtkSession, if that > was changed to FALSE (from the default of TRUE) and later another SpiceDisplay > was created for this session that would change it back to TRUE again. > This patch fixes this. > > Signed-off-by: Hans de Goede <[email protected]> > --- > gtk/spice-widget.c | 12 ++++++++++-- > 1 files changed, 10 insertions(+), 2 deletions(-) > > diff --git a/gtk/spice-widget.c b/gtk/spice-widget.c > index 06e5113..5678a81 100644 > --- a/gtk/spice-widget.c > +++ b/gtk/spice-widget.c > @@ -1659,8 +1659,16 @@ static void channel_destroy(SpiceSession *s, > SpiceChannel *channel, gpointer dat > **/ > SpiceDisplay *spice_display_new(SpiceSession *session, int id) > { > - return g_object_new(SPICE_TYPE_DISPLAY, "session", session, > - "channel-id", id, NULL); > + gboolean auto_clipboard; > + > + g_object_get(spice_gtk_session_get(session), > + "auto-clipboard", &auto_clipboard, NULL); > + > + return g_object_new(SPICE_TYPE_DISPLAY, > + "session", session, > + "channel-id", id, > + "auto-clipboard", auto_clipboard, > + NULL); > } > > /** > -- > 1.7.6.4 > > _______________________________________________ > Spice-devel mailing list > [email protected] > http://lists.freedesktop.org/mailman/listinfo/spice-devel > -- Marc-André Lureau _______________________________________________ Spice-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/spice-devel
