[Spice-commits] 6 commits - .gitignore doc/.gitignore doc/reference gtk/spice-client-gtk.override gtk/spice-gtk-session.c gtk/spice-widget-priv.h gtk/spice-widget.c gtk/spicy.c python_modules/.gitignore

Hans de Goede jwrdegoede at kemper.freedesktop.org
Mon Oct 10 07:54:57 PDT 2011


 .gitignore                    |  106 ------------------------------------------
 doc/.gitignore                |   22 --------
 doc/reference/.gitignore      |   45 -----------------
 gtk/spice-client-gtk.override |    1 
 gtk/spice-gtk-session.c       |   75 ++++++++++++++++++++++++++---
 gtk/spice-widget-priv.h       |    1 
 gtk/spice-widget.c            |   55 ++++-----------------
 gtk/spicy.c                   |   75 +++++++++++++++++++++++------
 python_modules/.gitignore     |   28 -----------
 9 files changed, 138 insertions(+), 270 deletions(-)

New commits:
commit 920611157d55872fbc1fea213e53dbec79d74a5c
Author: Hans de Goede <hdegoede at redhat.com>
Date:   Fri Oct 7 14:19:49 2011 +0200

    Make auto-usbredir a session setting rather then a per display setting
    
    Signed-off-by: Hans de Goede <hdegoede at redhat.com>

diff --git a/gtk/spice-gtk-session.c b/gtk/spice-gtk-session.c
index c7f9be7..7e958e5 100644
--- a/gtk/spice-gtk-session.c
+++ b/gtk/spice-gtk-session.c
@@ -20,13 +20,15 @@
 #include <spice/vd_agent.h>
 #include "spice-common.h"
 #include "spice-gtk-session.h"
+#include "spice-gtk-session-priv.h"
 
 #define CLIPBOARD_LAST (VD_AGENT_CLIPBOARD_SELECTION_SECONDARY + 1)
 
 struct _SpiceGtkSessionPrivate {
     SpiceSession            *session;
-    SpiceMainChannel        *main;
+    /* Clipboard related */
     gboolean                auto_clipboard_enable;
+    SpiceMainChannel        *main;
     GtkClipboard            *clipboard;
     GtkClipboard            *clipboard_primary;
     GtkTargetEntry          *clip_targets[CLIPBOARD_LAST];
@@ -35,6 +37,9 @@ struct _SpiceGtkSessionPrivate {
     gboolean                clip_grabbed[CLIPBOARD_LAST];
     gboolean                clipboard_by_guest[CLIPBOARD_LAST];
     gboolean                clipboard_selfgrab_pending[CLIPBOARD_LAST];
+    /* auto-usbredir related */
+    gboolean                auto_usbredir_enable;
+    gboolean                keyboard_focus;
 };
 
 /**
@@ -85,6 +90,7 @@ enum {
     PROP_0,
     PROP_SESSION,
     PROP_AUTO_CLIPBOARD,
+    PROP_AUTO_USBREDIR,
 };
 
 static void spice_gtk_session_init(SpiceGtkSession *self)
@@ -202,6 +208,9 @@ static void spice_gtk_session_get_property(GObject    *gobject,
     case PROP_AUTO_CLIPBOARD:
         g_value_set_boolean(value, s->auto_clipboard_enable);
         break;
+    case PROP_AUTO_USBREDIR:
+        g_value_set_boolean(value, s->auto_usbredir_enable);
+        break;
     default:
 	G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, pspec);
 	break;
@@ -223,6 +232,10 @@ static void spice_gtk_session_set_property(GObject      *gobject,
     case PROP_AUTO_CLIPBOARD:
         s->auto_clipboard_enable = g_value_get_boolean(value);
         break;
+    case PROP_AUTO_USBREDIR:
+        s->auto_usbredir_enable = g_value_get_boolean(value);
+        spice_gtk_session_update_keyboard_focus(self, s->keyboard_focus);
+        break;
     default:
         G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, pspec);
         break;
@@ -275,6 +288,26 @@ static void spice_gtk_session_class_init(SpiceGtkSessionClass *klass)
                               G_PARAM_CONSTRUCT |
                               G_PARAM_STATIC_STRINGS));
 
+    /**
+     * SpiceGtkSession:auto-usbredir:
+     *
+     * Automatically redirect newly plugged in USB devices. Note the auto
+     * redirection only happens when a #SpiceDisplay associated with the
+     * session had keyboard focus.
+     *
+     * Since: 0.8
+     **/
+    g_object_class_install_property
+        (gobject_class, PROP_AUTO_USBREDIR,
+         g_param_spec_boolean("auto-usbredir",
+                              "Auto USB Redirection",
+                              "Automatically redirect newly plugged in USB"
+                              "Devices to the guest.",
+                              FALSE,
+                              G_PARAM_READWRITE |
+                              G_PARAM_CONSTRUCT |
+                              G_PARAM_STATIC_STRINGS));
+
     g_type_class_add_private(klass, sizeof(SpiceGtkSessionPrivate));
 }
 
@@ -727,6 +760,26 @@ static void channel_destroy(SpiceSession *session, SpiceChannel *channel,
     }
 }
 
+/* ---------------------------------------------------------------- */
+/* private functions (usbredir related)                             */
+void spice_gtk_session_update_keyboard_focus(SpiceGtkSession *self,
+                                             gboolean state)
+{
+    SpiceGtkSessionPrivate *s = SPICE_GTK_SESSION_GET_PRIVATE(self);
+    SpiceUsbDeviceManager *manager;
+    gboolean auto_connect = FALSE;
+
+    s->keyboard_focus = state;
+
+    if (s->auto_usbredir_enable && s->keyboard_focus)
+        auto_connect = TRUE;
+
+    manager = spice_usb_device_manager_get(s->session, NULL, NULL);
+    if (manager) {
+        g_object_set(manager, "auto-connect", auto_connect, NULL);
+    }
+}
+
 /* ------------------------------------------------------------------ */
 /* public functions                                                   */
 
diff --git a/gtk/spice-widget-priv.h b/gtk/spice-widget-priv.h
index f94c8c6..a5791a4 100644
--- a/gtk/spice-widget-priv.h
+++ b/gtk/spice-widget-priv.h
@@ -48,7 +48,6 @@ struct _SpiceDisplayPrivate {
     bool                    keyboard_grab_enable;
     bool                    mouse_grab_enable;
     bool                    resize_guest_enable;
-    bool                    auto_usbredir_enable;
 
     /* state */
     enum SpiceSurfaceFmt    format;
diff --git a/gtk/spice-widget.c b/gtk/spice-widget.c
index 15a2b61..afe030d 100644
--- a/gtk/spice-widget.c
+++ b/gtk/spice-widget.c
@@ -32,6 +32,7 @@
 
 #include "spice-widget.h"
 #include "spice-widget-priv.h"
+#include "spice-gtk-session-priv.h"
 #include "vncdisplaykeymap.h"
 
 /* Some compatibility defines to let us build on both Gtk2 and Gtk3 */
@@ -84,7 +85,6 @@ enum {
     PROP_MOUSE_GRAB,
     PROP_RESIZE_GUEST,
     PROP_AUTO_CLIPBOARD,
-    PROP_AUTO_USBREDIR,
     PROP_SCALING,
 };
 
@@ -113,7 +113,6 @@ static void disconnect_display(SpiceDisplay *display);
 static void channel_new(SpiceSession *s, SpiceChannel *channel, gpointer data);
 static void channel_destroy(SpiceSession *s, SpiceChannel *channel, gpointer data);
 static void sync_keyboard_lock_modifiers(SpiceDisplay *display);
-static void update_auto_usbredir(SpiceDisplay *display);
 
 /* ---------------------------------------------------------------- */
 
@@ -146,9 +145,6 @@ static void spice_display_get_property(GObject    *object,
         g_object_get(d->gtk_session, "auto-clipboard", &boolean, NULL);
         g_value_set_boolean(value, boolean);
         break;
-    case PROP_AUTO_USBREDIR:
-        g_value_set_boolean(value, d->auto_usbredir_enable);
-        break;
     case PROP_SCALING:
         g_value_set_boolean(value, d->allow_scaling);
 	break;
@@ -211,10 +207,6 @@ static void spice_display_set_property(GObject      *object,
         g_object_set(d->gtk_session, "auto-clipboard",
                      g_value_get_boolean(value), NULL);
         break;
-    case PROP_AUTO_USBREDIR:
-        d->auto_usbredir_enable = g_value_get_boolean(value);
-        update_auto_usbredir(display);
-        break;
     default:
         G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
         break;
@@ -616,22 +608,6 @@ static void recalc_geometry(GtkWidget *widget, gboolean set_display)
     }
 }
 
-static void update_auto_usbredir(SpiceDisplay *display)
-{
-    SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display);
-    SpiceUsbDeviceManager *manager;
-    gboolean auto_connect = FALSE;
-
-    if (d->auto_usbredir_enable && d->keyboard_have_focus)
-        auto_connect = TRUE;
-
-    /* FIXME: allow specifying a different GMainContext then the default */
-    manager = spice_usb_device_manager_get(d->session, NULL /* FIXME */, NULL);
-    if (manager) {
-        g_object_set(manager, "auto-connect", auto_connect, NULL);
-    }
-}
-
 /* ---------------------------------------------------------------- */
 
 #define CONVERT_0565_TO_0888(s)                                         \
@@ -917,7 +893,8 @@ static gboolean focus_in_event(GtkWidget *widget, GdkEventFocus *focus G_GNUC_UN
     sync_keyboard_lock_modifiers(display);
     d->keyboard_have_focus = true;
     try_keyboard_grab(display);
-    update_auto_usbredir(display);
+    spice_gtk_session_update_keyboard_focus(d->gtk_session,
+                                            d->keyboard_have_focus);
 #ifdef WIN32
     focus_window = GDK_WINDOW_HWND(gtk_widget_get_window(widget));
     g_return_val_if_fail(focus_window != NULL, true);
@@ -941,7 +918,8 @@ static gboolean focus_out_event(GtkWidget *widget, GdkEventFocus *focus G_GNUC_U
 
     release_keys(display);
     d->keyboard_have_focus = false;
-    update_auto_usbredir(display);
+    spice_gtk_session_update_keyboard_focus(d->gtk_session,
+                                            d->keyboard_have_focus);
     return true;
 }
 
@@ -1231,17 +1209,6 @@ static void spice_display_class_init(SpiceDisplayClass *klass)
                               G_PARAM_STATIC_STRINGS));
 
     g_object_class_install_property
-        (gobject_class, PROP_AUTO_USBREDIR,
-         g_param_spec_boolean("auto-usbredir",
-                              "Auto USB Redirection",
-                              "Automatically redirect newly plugged in USB"
-                              "Devices to the guest.",
-                              TRUE,
-                              G_PARAM_READWRITE |
-                              G_PARAM_CONSTRUCT |
-                              G_PARAM_STATIC_STRINGS));
-
-    g_object_class_install_property
         (gobject_class, PROP_SCALING,
          g_param_spec_boolean("scaling", "Scaling",
                               "Whether we should use scaling",
diff --git a/gtk/spicy.c b/gtk/spicy.c
index 3034dbb..e837414 100644
--- a/gtk/spicy.c
+++ b/gtk/spicy.c
@@ -721,13 +721,13 @@ static const char *spice_display_properties[] = {
     "grab-mouse",
     "resize-guest",
     "scaling",
-#ifdef USE_USBREDIR
-    "auto-usbredir",
-#endif
 };
 
 static const char *spice_gtk_session_properties[] = {
     "auto-clipboard",
+#ifdef USE_USBREDIR
+    "auto-usbredir",
+#endif
 };
 
 static const GtkToggleActionEntry tentries[] = {
commit 19cf6298debead77a6365f795f15bf8ad764a828
Author: Hans de Goede <hdegoede at redhat.com>
Date:   Mon Oct 10 12:19:30 2011 +0200

    spicy: Stop using SpiceDisplay's deprecated clipboard methods
    
    Signed-off-by: Hans de Goede <hdegoede at redhat.com>

diff --git a/gtk/spicy.c b/gtk/spicy.c
index 533d7f7..3034dbb 100644
--- a/gtk/spicy.c
+++ b/gtk/spicy.c
@@ -1,6 +1,6 @@
 /* -*- Mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */
 /*
-   Copyright (C) 2010 Red Hat, Inc.
+   Copyright (C) 2010-2011 Red Hat, Inc.
 
    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
@@ -33,6 +33,7 @@
 #endif
 
 #include "spice-widget.h"
+#include "spice-gtk-session.h"
 #include "spice-audio.h"
 #include "spice-common.h"
 #include "spice-cmdline.h"
@@ -74,6 +75,7 @@ struct spice_window {
 
 struct spice_connection {
     SpiceSession     *session;
+    SpiceGtkSession  *gtk_session;
     spice_window     *wins[4];
     SpiceAudio       *audio;
     char             *mouse_state;
@@ -100,6 +102,7 @@ static void auto_connect_failed(SpiceUsbDeviceManager *manager,
                                 SpiceUsbDevice        *device,
                                 GError                *error,
                                 gpointer               data);
+static gboolean is_gtk_session_property(const gchar *property);
 
 /* ------------------------------------------------------------------ */
 
@@ -317,14 +320,14 @@ static void menu_cb_copy(GtkAction *action, void *data)
 {
     struct spice_window *win = data;
 
-    spice_display_copy_to_guest(SPICE_DISPLAY(win->spice));
+    spice_gtk_session_copy_to_guest(win->conn->gtk_session);
 }
 
 static void menu_cb_paste(GtkAction *action, void *data)
 {
     struct spice_window *win = data;
 
-    spice_display_paste_from_guest(SPICE_DISPLAY(win->spice));
+    spice_gtk_session_paste_from_guest(win->conn->gtk_session);
 }
 
 static void window_set_fullscreen(struct spice_window *win, gboolean fs)
@@ -419,17 +422,24 @@ static void menu_cb_bool_prop(GtkToggleAction *action, gpointer data)
     struct spice_window *win = data;
     gboolean state = gtk_toggle_action_get_active(action);
     const char *name;
+    gpointer object;
 
     name = gtk_action_get_name(GTK_ACTION(action));
     SPICE_DEBUG("%s: %s = %s", __FUNCTION__, name, state ? _("yes") : _("no"));
 
     g_key_file_set_boolean(keyfile, "general", name, state);
-    g_object_set(G_OBJECT(win->spice), name, state, NULL);
+
+    if (is_gtk_session_property(name)) {
+        object = win->conn->gtk_session;
+    } else {
+        object = win->spice;
+    }
+    g_object_set(object, name, state, NULL);
 }
 
-static void menu_cb_bool_prop_changed(GObject    *gobject,
-                                      GParamSpec *pspec,
-                                      gpointer    user_data)
+static void menu_cb_conn_bool_prop_changed(GObject    *gobject,
+                                           GParamSpec *pspec,
+                                           gpointer    user_data)
 {
     struct spice_window *win = user_data;
     const gchar *property = g_param_spec_get_name(pspec);
@@ -437,7 +447,7 @@ static void menu_cb_bool_prop_changed(GObject    *gobject,
     gboolean state;
 
     toggle = gtk_action_group_get_action(win->ag, property);
-    g_object_get(win->spice, property, &state, NULL);
+    g_object_get(win->conn->gtk_session, property, &state, NULL);
     gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(toggle), state);
 }
 
@@ -564,6 +574,7 @@ static void restore_configuration(struct spice_window *win)
     gchar **keys = NULL;
     gsize nkeys, i;
     GError *error = NULL;
+    gpointer object;
 
     keys = g_key_file_get_keys(keyfile, "general", &nkeys, &error);
     if (error != NULL) {
@@ -585,7 +596,13 @@ static void restore_configuration(struct spice_window *win)
             g_clear_error(&error);
             continue;
         }
-        g_object_set(G_OBJECT(win->spice), keys[i], state, NULL);
+
+        if (is_gtk_session_property(keys[i])) {
+            object = win->conn->gtk_session;
+        } else {
+            object = win->spice;
+        }
+        g_object_set(object, keys[i], state, NULL);
     }
 
     g_strfreev(keys);
@@ -699,17 +716,20 @@ static const GtkActionEntry entries[] = {
     }
 };
 
-static const char *spice_properties[] = {
+static const char *spice_display_properties[] = {
     "grab-keyboard",
     "grab-mouse",
     "resize-guest",
     "scaling",
-    "auto-clipboard",
 #ifdef USE_USBREDIR
     "auto-usbredir",
 #endif
 };
 
+static const char *spice_gtk_session_properties[] = {
+    "auto-clipboard",
+};
+
 static const GtkToggleActionEntry tentries[] = {
     {
         .name        = "grab-keyboard",
@@ -797,6 +817,18 @@ static char ui_xml[] =
 "  </toolbar>\n"
 "</ui>\n";
 
+static gboolean is_gtk_session_property(const gchar *property)
+{
+    int i;
+
+    for (i = 0; i < G_N_ELEMENTS(spice_gtk_session_properties); i++) {
+        if (!strcmp(spice_gtk_session_properties[i], property)) {
+            return TRUE;
+        }
+    }
+    return FALSE;
+}
+
 #ifndef WIN32
 static void recent_item_activated_cb(GtkRecentChooser *chooser, gpointer data)
 {
@@ -1146,16 +1178,26 @@ static spice_window *create_spice_window(spice_connection *conn, int id, SpiceCh
     restore_configuration(win);
 
     /* init toggle actions */
-    for (i = 0; i < G_N_ELEMENTS(spice_properties); i++) {
+    for (i = 0; i < G_N_ELEMENTS(spice_display_properties); i++) {
+        toggle = gtk_action_group_get_action(win->ag,
+                                             spice_display_properties[i]);
+        g_object_get(win->spice, spice_display_properties[i], &state, NULL);
+        gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(toggle), state);
+    }
+
+    for (i = 0; i < G_N_ELEMENTS(spice_gtk_session_properties); i++) {
         char notify[64];
 
-        toggle = gtk_action_group_get_action(win->ag, spice_properties[i]);
-        g_object_get(win->spice, spice_properties[i], &state, NULL);
+        toggle = gtk_action_group_get_action(win->ag,
+                                             spice_gtk_session_properties[i]);
+        g_object_get(win->conn->gtk_session, spice_gtk_session_properties[i],
+                     &state, NULL);
         gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(toggle), state);
 
-        snprintf(notify, sizeof(notify), "notify::%s", spice_properties[i]);
-        g_signal_connect(win->spice, notify,
-                         G_CALLBACK(menu_cb_bool_prop_changed), win);
+        snprintf(notify, sizeof(notify), "notify::%s",
+                 spice_gtk_session_properties[i]);
+        g_signal_connect(win->conn->gtk_session, notify,
+                         G_CALLBACK(menu_cb_conn_bool_prop_changed), win);
     }
 
     toggle = gtk_action_group_get_action(win->ag, "Toolbar");
@@ -1466,6 +1508,7 @@ static spice_connection *connection_new(void)
 
     conn = g_new0(spice_connection, 1);
     conn->session = spice_session_new();
+    conn->gtk_session = spice_gtk_session_get(conn->session);
     g_signal_connect(conn->session, "channel-new",
                      G_CALLBACK(channel_new), conn);
     g_signal_connect(conn->session, "channel-destroy",
commit d0255d46110903943024fc0c0ba2266b4aae325d
Author: Hans de Goede <hdegoede at redhat.com>
Date:   Mon Oct 10 11:28:30 2011 +0200

    SpiceDisplay: mark clipboard properties and functions as deprecated
    
    The SpiceGtkSession ones should be used instead.
    
    Signed-off-by: Hans de Goede <hdegoede at redhat.com>

diff --git a/gtk/spice-gtk-session.c b/gtk/spice-gtk-session.c
index d3cdd7d..c7f9be7 100644
--- a/gtk/spice-gtk-session.c
+++ b/gtk/spice-gtk-session.c
@@ -56,13 +56,10 @@ struct _SpiceGtkSessionPrivate {
  * and #SpiceSession objects. Therefor there is no spice_gtk_session_new,
  * instead there is spice_gtk_session_get() which ensures this 1:1 relation.
  *
- * #SpiceDisplay uses #SpiceGtkSession internally, some #SpiceDisplay
- * properties map directly to #SpiceGtkSession properties, this means that
- * changing them for one #SpiceDisplay changes them for all displays.
- *
- * Depending on your UI, you may want to not show these properties on a
- * per display basis and instead show them in a global settings menu which
- * directly uses SpiceGtkSession.
+ * Client and guest clipboards will be shared automatically if
+ * #SpiceGtkSession:auto-clipboard is set to #TRUE. Alternatively, you
+ * can send / receive clipboard data from client to guest with
+ * spice_gtk_session_copy_to_guest() / spice_gtk_session_paste_from_guest().
  */
 
 /* ------------------------------------------------------------------ */
@@ -247,6 +244,7 @@ static void spice_gtk_session_class_init(SpiceGtkSessionClass *klass)
      *
      * #SpiceSession this #SpiceGtkSession is associated with
      *
+     * Since: 0.8
      **/
     g_object_class_install_property
         (gobject_class, PROP_SESSION,
@@ -263,6 +261,8 @@ static void spice_gtk_session_class_init(SpiceGtkSessionClass *klass)
      *
      * When this is true the clipboard gets automatically shared between host
      * and guest.
+     *
+     * Since: 0.8
      **/
     g_object_class_install_property
         (gobject_class, PROP_AUTO_CLIPBOARD,
@@ -742,6 +742,8 @@ static void channel_destroy(SpiceSession *session, SpiceChannel *channel,
  * after the #SpiceSession itself has been unref-ed by the caller.
  *
  * Returns: (transfer none): a weak reference to the #SpiceGtkSession associated with the passed in #SpiceSession
+ *
+ * Since 0.8
  **/
 SpiceGtkSession *spice_gtk_session_get(SpiceSession *session)
 {
@@ -768,6 +770,8 @@ SpiceGtkSession *spice_gtk_session_get(SpiceSession *session)
  * @self:
  *
  * Copy client-side clipboard to guest clipboard.
+ *
+ * Since 0.8
  **/
 void spice_gtk_session_copy_to_guest(SpiceGtkSession *self)
 {
@@ -785,6 +789,8 @@ void spice_gtk_session_copy_to_guest(SpiceGtkSession *self)
  * @self:
  *
  * Copy guest clipboard to client-side clipboard.
+ *
+ * Since 0.8
  **/
 void spice_gtk_session_paste_from_guest(SpiceGtkSession *self)
 {
diff --git a/gtk/spice-widget.c b/gtk/spice-widget.c
index fe7dba6..15a2b61 100644
--- a/gtk/spice-widget.c
+++ b/gtk/spice-widget.c
@@ -68,11 +68,6 @@ static inline void gdk_drawable_get_size(GdkWindow *w, gint *ww, gint *wh)
  * ungrabbed with spice_display_mouse_ungrab(), and by setting a key
  * combination with spice_display_set_grab_keys().
  *
- * Client and guest clipboards will be shared automatically if
- * #SpiceDisplay:auto-clipboard is set to #TRUE. Alternatively, you
- * can send clipboard data from client to guest with
- * spice_display_copy_to_guest().
-
  * Finally, spice_display_get_pixbuf() will take a screenshot of the
  * current display and return an #GdkPixbuf (that you can then easily
  * save to disk).
@@ -1222,6 +1217,8 @@ static void spice_display_class_init(SpiceDisplayClass *klass)
      *
      * When this is true the clipboard gets automatically shared between host
      * and guest.
+     *
+     * Deprecated: 0.8: Use #SpiceGtkSession's auto-clipboard property instead
      **/
     g_object_class_install_property
         (gobject_class, PROP_AUTO_CLIPBOARD,
@@ -1678,6 +1675,8 @@ void spice_display_mouse_ungrab(SpiceDisplay *display)
  * @display:
  *
  * Copy client-side clipboard to guest clipboard.
+ *
+ * Deprecated: 0.8: Use spice_gtk_session_copy_to_guest() instead
  **/
 void spice_display_copy_to_guest(SpiceDisplay *display)
 {
@@ -1693,6 +1692,8 @@ void spice_display_copy_to_guest(SpiceDisplay *display)
  * @display:
  *
  * Copy guest clipboard to client-side clipboard.
+ *
+ * Deprecated: 0.8: Use spice_gtk_session_paste_from_guest() instead
  **/
 void spice_display_paste_from_guest(SpiceDisplay *display)
 {
commit f0abe3ac3a95f248ac6c6f344e921ca9d13af99c
Author: Hans de Goede <hdegoede at redhat.com>
Date:   Mon Oct 10 15:46:36 2011 +0200

    SpiceDisplay: Don't set auto-clipboard on construction
    
    The auto-clipboard setting now lives in the SpiceGtkSession, if that
    was changed to FALSE (from the default of TRUE) and later a SpiceDisplay
    was created for this session that would change it back to TRUE again because
    it would set it to its default from its constructor. This patch fixes this.
    
    Signed-off-by: Hans de Goede <hdegoede at redhat.com>

diff --git a/gtk/spice-widget.c b/gtk/spice-widget.c
index 06e5113..fe7dba6 100644
--- a/gtk/spice-widget.c
+++ b/gtk/spice-widget.c
@@ -1231,7 +1231,6 @@ static void spice_display_class_init(SpiceDisplayClass *klass)
                               "host and guest.",
                               TRUE,
                               G_PARAM_READWRITE |
-                              G_PARAM_CONSTRUCT |
                               G_PARAM_STATIC_STRINGS));
 
     g_object_class_install_property
commit fde996526b3c5951349e9bbee7b9aed096d50ae1
Author: Hans de Goede <hdegoede at redhat.com>
Date:   Mon Oct 10 11:54:10 2011 +0200

    Remove auto-generated .gitignore files from git
    
    Auto-generated files do not belong in git. Having these in git causes
    changes to them accidentally ending up in other commits.
    
    Signed-off-by: Hans de Goede <hdegoede at redhat.com>

diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index 0991c6d..0000000
--- a/.gitignore
+++ /dev/null
@@ -1,106 +0,0 @@
-*.bak
-*.lo
-*.o
-*.orig
-*.rej
-*.tab.c
-*~
-.*.sw[nop]
-.deps
-.libs
-*.gir
-*.typelib
-*.la
-*.stamp
-/.libs
-/.version
-/ABOUT-NLS
-/GPATH
-/GRTAGS
-/GSYMS
-/GTAGS
-/ID
-Makefile
-Makefile.in
-/TAGS
-/_libs
-/aclocal.m4
-/autom4te.cache
-/build-aux/compile
-/build-aux/config.guess
-/build-aux/config.rpath
-/build-aux/config.sub
-/build-aux/depcomp
-/build-aux/install-sh
-/build-aux/ltmain.sh
-/build-aux/missing
-/build-aux/mkinstalldirs
-/config.cache
-/config.h
-/config.h.in
-/config.log
-/config.lt
-/config.status
-/config.status.lineno
-/configure
-/configure.lineno
-/gnome-doc-utils.make
-/gtk-doc.make
-/intltool-extract
-/intltool-extract.in
-/intltool-merge
-/intltool-merge.in
-/intltool-update
-/intltool-update.in
-/libtool
-/m4/check_python.m4
-/m4/codeset.m4
-/m4/gettext.m4
-/m4/glibc2.m4
-/m4/glibc21.m4
-/m4/gtk-doc.m4
-/m4/iconv.m4
-/m4/intdiv0.m4
-/m4/intl.m4
-/m4/intldir.m4
-/m4/intlmacosx.m4
-/m4/intltool.m4
-/m4/intmax.m4
-/m4/inttypes-pri.m4
-/m4/inttypes_h.m4
-/m4/lcmessage.m4
-/m4/ld-version.m4
-/m4/lib-ld.m4
-/m4/lib-link.m4
-/m4/lib-prefix.m4
-/m4/libtool.m4
-/m4/lock.m4
-/m4/longlong.m4
-/m4/ltoptions.m4
-/m4/ltsugar.m4
-/m4/ltversion.m4
-/m4/lt~obsolete.m4
-/m4/nls.m4
-/m4/po.m4
-/m4/printf-posix.m4
-/m4/progtest.m4
-/m4/size_max.m4
-/m4/stdint_h.m4
-/m4/uintmax_t.m4
-/m4/visibility.m4
-/m4/wchar_t.m4
-/m4/wint_t.m4
-/m4/xsize.m4
-po/*
-/so_locations
-/spice-client-glib-2.0.pc
-/spice-client-gtk-2.0.pc
-/spice-client-gtk-3.0.pc
-/spice-controller.pc
-/stamp-h1
-/tags
-gtk/controller/controller.c
-gtk/controller/menu.c
-gtk/controller/spice-controller.h
-gtk/controller/test-controller
-doc/reference/spice-gtk-overrides.txt
diff --git a/doc/.gitignore b/doc/.gitignore
deleted file mode 100644
index 2e54566..0000000
--- a/doc/.gitignore
+++ /dev/null
@@ -1,22 +0,0 @@
-/*.bak
-/*.lo
-/*.o
-/*.orig
-/*.rej
-/*.tab.c
-/*~
-/.*.sw[nop]
-/.deps
-/.gitignore
-/.libs
-/GPATH
-/GRTAGS
-/GSYMS
-/GTAGS
-/ID
-/Makefile
-/Makefile.in
-/TAGS
-/_libs
-/so_locations
-/tags
diff --git a/doc/reference/.gitignore b/doc/reference/.gitignore
deleted file mode 100644
index 37508df..0000000
--- a/doc/reference/.gitignore
+++ /dev/null
@@ -1,45 +0,0 @@
-/*.bak
-/*.lo
-/*.o
-/*.orig
-/*.rej
-/*.tab.c
-/*~
-/.*.sw[nop]
-/.deps
-/.gitignore
-/.libs
-/GPATH
-/GRTAGS
-/GSYMS
-/GTAGS
-/ID
-/Makefile
-/Makefile.in
-/TAGS
-/_libs
-/html
-/html-build.stamp
-/html.stamp
-/pdf-build.stamp
-/pdf.stamp
-/scan-build.stamp
-/setup-build.stamp
-/setup.stamp
-/sgml-build.stamp
-/sgml.stamp
-/so_locations
-/spice-gtk-decl-list.txt
-/spice-gtk-decl.txt
-/spice-gtk-undeclared.txt
-/spice-gtk-undocumented.txt
-/spice-gtk-unused.txt
-/spice-gtk.args
-/spice-gtk.hierarchy
-/spice-gtk.interfaces
-/spice-gtk.prerequisites
-/spice-gtk.signals
-/tags
-/tmpl/*.bak
-/tmpl/spice-gtk-unused.sgml
-/xml
diff --git a/python_modules/.gitignore b/python_modules/.gitignore
deleted file mode 100644
index 24756af..0000000
--- a/python_modules/.gitignore
+++ /dev/null
@@ -1,28 +0,0 @@
-/*.bak
-/*.lo
-/*.o
-/*.orig
-/*.rej
-/*.tab.c
-/*~
-/.*.sw[nop]
-/.deps
-/.gitignore
-/.libs
-/GPATH
-/GRTAGS
-/GSYMS
-/GTAGS
-/ID
-/Makefile
-/Makefile.in
-/TAGS
-/__init__.pyc
-/_libs
-/codegen.pyc
-/demarshal.pyc
-/marshal.pyc
-/ptypes.pyc
-/so_locations
-/spice_parser.pyc
-/tags
commit 12ba7ad6e354873e6d6a8a3a9304167b01439f58
Author: Hans de Goede <hdegoede at redhat.com>
Date:   Mon Oct 10 11:14:18 2011 +0200

    Fix compilation of python bindings
    
    This was broken by the addition of SpiceGtkSession.
    
    Signed-off-by: Hans de Goede <hdegoede at redhat.com>

diff --git a/gtk/spice-client-gtk.override b/gtk/spice-client-gtk.override
index 7b3543a..e393037 100644
--- a/gtk/spice-client-gtk.override
+++ b/gtk/spice-client-gtk.override
@@ -4,6 +4,7 @@ headers
 #include "pygobject.h"
 #include "spice-common.h"
 #include "spice-widget.h"
+#include "spice-gtk-session.h"
 #include "spice-audio.h"
 %%
 modulename spice_client_gtk


More information about the Spice-commits mailing list