[Spice-commits] 6 commits - autogen.sh .gitmodules gtk/Makefile.am gtk/snappy.c gtk/spicy-screenshot.c NEWS po/POTFILES.in README TODO

Marc-André Lureau elmarco at kemper.freedesktop.org
Thu Apr 11 02:31:04 PDT 2013


 .gitmodules            |    1 
 NEWS                   |   10 ++
 README                 |   32 +-------
 TODO                   |   12 +--
 autogen.sh             |    2 
 gtk/Makefile.am        |   14 +--
 gtk/snappy.c           |  178 --------------------------------------------
 gtk/spicy-screenshot.c |  196 +++++++++++++++++++++++++++++++++++++++++++++++++
 po/POTFILES.in         |    2 
 9 files changed, 228 insertions(+), 219 deletions(-)

New commits:
commit a879fd5cc4c742431866bd864600bda44e1478c4
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date:   Tue Apr 9 19:49:37 2013 +0200

    Release v0.19

diff --git a/NEWS b/NEWS
index 37dfd27..2a741eb 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,13 @@
+v0.19
+=====
+
+This is a bugfix only release, except the snappy name change
+- snappy has been renamed to spicy-screenshot
+- Several file-xfer fixes and improvements
+- Many win32 and USB redirection related fixes
+- Compile and work again with RHEL6 and older glib releases
+- misc fixes and improvements
+
 v0.18
 =====
 
commit a73026629061eaebd12250cecef0111f7cfc6e88
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date:   Tue Apr 9 19:36:07 2013 +0200

    build-sys: bump spice-glib version
    
    new symbols in spice-glib, bump before release

diff --git a/gtk/Makefile.am b/gtk/Makefile.am
index d05fcb0..4bf2eee 100644
--- a/gtk/Makefile.am
+++ b/gtk/Makefile.am
@@ -170,7 +170,7 @@ nodist_libspice_client_gtkinclude_HEADERS =	\
 	$(NULL)
 
 libspice_client_glib_2_0_la_LDFLAGS =	\
-	-version-info 10:0:2		\
+	-version-info 11:0:3		\
 	-no-undefined			\
 	$(GLIB_VERSION_LDFLAGS)		\
 	$(NULL)
commit fd66a627e8e41d6025f8fb642bd557dcb1ef1a78
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date:   Wed Apr 10 19:24:14 2013 +0200

    Update README/TODO

diff --git a/README b/README
index 035d95f..530a495 100644
--- a/README
+++ b/README
@@ -5,8 +5,8 @@ A Gtk client and libraries for SPICE remote desktop servers.
 
 Please report bugs at: spice-devel at lists.freedesktop.org
 
-What you can find here
-----------------------
+Project content
+---------------
 
 libspice-client-glib-2.0
    provides glib objects for spice protocol decoding and surface rendering.
@@ -20,8 +20,8 @@ libspice-client-gtk-{2.0,3.0}
       * SpiceDisplay (see spice-widget.h)
 
 spicy
-   gtk based spice client app.  Command line options are simliar
-   to the spicec ones.
+   a gtk test client. The recommended client for end user is
+   virt-viewer (http://git.fedorahosted.org/cgit/virt-viewer.git/)
 
 spicy-screenshot
    Command line tool, connects to spice server and writes out a
@@ -56,25 +56,3 @@ gstreamer-devel gstreamer-plugins-base-devel
 . If you build from git, you'll also need:
 
 libtool automake vala perl-Text-CSV
-
-
-current state
--------------
-
-There are some known bugs, check the TODO list and
-bugzilla.freedesktop.org.
-
-Copyright 2009-2011 Red Hat, Inc. and/or its affiliates.
-
-This program and libraries is free software; you can redistribute it
-and/or modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-This library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library; if not, see <http://www.gnu.org/licenses/>.
diff --git a/TODO b/TODO
index 3bff1e2..73742ba 100644
--- a/TODO
+++ b/TODO
@@ -1,6 +1,8 @@
-* Pointer/cursor issues if no agent:
-** https://bugs.freedesktop.org/show_bug.cgi?id=36323
-** https://bugs.freedesktop.org/show_bug.cgi?id=38008
-** https://bugs.freedesktop.org/show_bug.cgi?id=38024
-* TunnelChannel
 * create a ChannelBaseAudio
+* missing TunnelChannel implementation
+* revive the win32 GDI backend
+
+See also list of bugs open:
+
+https://bugs.freedesktop.org/buglist.cgi?product=Spice&component=gtk-client&resolution=---&list_id=281013
+
commit 4574ddd86c185c4a733beb3fc91a6d9fda5a5d2a
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date:   Wed Apr 10 15:30:33 2013 +0200

    spicy-ss: quit when channel error

diff --git a/gtk/spicy-screenshot.c b/gtk/spicy-screenshot.c
index 2595d0c..43664b6 100644
--- a/gtk/spicy-screenshot.c
+++ b/gtk/spicy-screenshot.c
@@ -95,10 +95,28 @@ static void invalidate(SpiceChannel *channel,
     g_main_loop_quit(mainloop);
 }
 
+static void main_channel_event(SpiceChannel *channel, SpiceChannelEvent event,
+                               gpointer data)
+{
+    switch (event) {
+    case SPICE_CHANNEL_OPENED:
+        break;
+    default:
+        g_warning("main channel event: %d", event);
+        g_main_loop_quit(mainloop);
+    }
+}
+
 static void channel_new(SpiceSession *s, SpiceChannel *channel, gpointer *data)
 {
     int id;
 
+    if (SPICE_IS_MAIN_CHANNEL(channel)) {
+        g_signal_connect(channel, "channel-event",
+                         G_CALLBACK(main_channel_event), data);
+        return;
+    }
+
     if (!SPICE_IS_DISPLAY_CHANNEL(channel))
         return;
 
commit ca0b62b593021adb53955cdefecd78b88a89bc1d
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date:   Tue Apr 9 19:49:17 2013 +0200

    Rename snappy to spicy-screenshot
    
    Following discussion on the ML:
    http://lists.freedesktop.org/archives/spice-devel/2013-April/012953.html

diff --git a/README b/README
index 06d459b..035d95f 100644
--- a/README
+++ b/README
@@ -23,7 +23,7 @@ spicy
    gtk based spice client app.  Command line options are simliar
    to the spicec ones.
 
-snappy
+spicy-screenshot
    Command line tool, connects to spice server and writes out a
    screen shot.
 
diff --git a/gtk/Makefile.am b/gtk/Makefile.am
index 3c6d3e6..d05fcb0 100644
--- a/gtk/Makefile.am
+++ b/gtk/Makefile.am
@@ -42,7 +42,7 @@ EXTRA_DIST =					\
 	spice-marshal.txt			\
 	$(NULL)
 
-bin_PROGRAMS = spicy snappy spicy-stats
+bin_PROGRAMS = spicy spicy-stats spicy-screenshot
 if WITH_POLKIT
 acldir = $(ACL_HELPER_DIR)
 acl_PROGRAMS = spice-client-glib-usb-acl-helper
@@ -424,13 +424,13 @@ install-data-hook:
 endif
 
 
-snappy_SOURCES =			\
-	snappy.c			\
-	spice-cmdline.h			\
-	spice-cmdline.c			\
+spicy_screenshot_SOURCES =			\
+	spicy-screenshot.c			\
+	spice-cmdline.h				\
+	spice-cmdline.c				\
 	$(NULL)
 
-snappy_LDADD =					\
+spicy_screenshot_LDADD =			\
 	libspice-client-glib-2.0.la		\
 	$(GOBJECT2_LIBS)			\
 	$(NULL)
diff --git a/gtk/snappy.c b/gtk/snappy.c
deleted file mode 100644
index f7d0f04..0000000
--- a/gtk/snappy.c
+++ /dev/null
@@ -1,178 +0,0 @@
-/* -*- Mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */
-/*
-   Copyright (C) 2010 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
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   This library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with this library; if not, see <http://www.gnu.org/licenses/>.
-*/
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-#include <glib/gi18n.h>
-
-#include "spice-client.h"
-#include "spice-common.h"
-#include "spice-cmdline.h"
-
-/* config */
-static const char *outf      = "snappy.ppm";
-static gboolean version = FALSE;
-
-/* state */
-static SpiceSession  *session;
-static GMainLoop     *mainloop;
-
-enum SpiceSurfaceFmt d_format;
-gint                 d_width, d_height, d_stride;
-gpointer             d_data;
-
-/* ------------------------------------------------------------------ */
-
-static void primary_create(SpiceChannel *channel, gint format,
-                           gint width, gint height, gint stride,
-                           gint shmid, gpointer imgdata, gpointer data)
-{
-    SPICE_DEBUG("%s: %dx%d, format %d", __FUNCTION__, width, height, format);
-    d_format = format;
-    d_width  = width;
-    d_height = height;
-    d_stride = stride;
-    d_data   = imgdata;
-}
-
-static int write_ppm_32(void)
-{
-    FILE *fp;
-    uint8_t *p;
-    int n;
-
-    fp = fopen(outf,"w");
-    if (NULL == fp) {
-	fprintf(stderr, _("snappy: can't open %s: %s\n"), outf, strerror(errno));
-	return -1;
-    }
-    fprintf(fp, "P6\n%d %d\n255\n",
-            d_width, d_height);
-    n = d_width * d_height;
-    p = d_data;
-    while (n > 0) {
-        fputc(p[2], fp);
-        fputc(p[1], fp);
-        fputc(p[0], fp);
-        p += 4;
-        n--;
-    }
-    fclose(fp);
-    return 0;
-}
-
-static void invalidate(SpiceChannel *channel,
-                       gint x, gint y, gint w, gint h, gpointer *data)
-{
-    int rc;
-
-    switch (d_format) {
-    case SPICE_SURFACE_FMT_32_xRGB:
-        rc = write_ppm_32();
-        break;
-    default:
-        fprintf(stderr, _("unsupported spice surface format %d\n"), d_format);
-        rc = -1;
-        break;
-    }
-    if (rc == 0)
-        fprintf(stderr, _("wrote screen shot to %s\n"), outf);
-    g_main_loop_quit(mainloop);
-}
-
-static void channel_new(SpiceSession *s, SpiceChannel *channel, gpointer *data)
-{
-    int id;
-
-    if (!SPICE_IS_DISPLAY_CHANNEL(channel))
-        return;
-
-    g_object_get(channel, "channel-id", &id, NULL);
-    if (id != 0)
-        return;
-
-    g_signal_connect(channel, "display-primary-create",
-                     G_CALLBACK(primary_create), NULL);
-    g_signal_connect(channel, "display-invalidate",
-                     G_CALLBACK(invalidate), NULL);
-    spice_channel_connect(channel);
-}
-
-/* ------------------------------------------------------------------ */
-
-static GOptionEntry app_entries[] = {
-    {
-        .long_name        = "out-file",
-        .short_name       = 'o',
-        .arg              = G_OPTION_ARG_FILENAME,
-        .arg_data         = &outf,
-        .description      = N_("Output file name (default snappy.ppm)"),
-        .arg_description  = N_("<filename>"),
-    },
-    {
-        .long_name        = "version",
-        .arg              = G_OPTION_ARG_NONE,
-        .arg_data         = &version,
-        .description      = N_("Display version and quit"),
-    },
-    {
-        /* end of list */
-    }
-};
-
-int main(int argc, char *argv[])
-{
-    GError *error = NULL;
-    GOptionContext *context;
-
-    bindtextdomain(GETTEXT_PACKAGE, SPICE_GTK_LOCALEDIR);
-    bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
-    textdomain(GETTEXT_PACKAGE);
-
-    /* parse opts */
-    context = g_option_context_new(_(" - make screen shots"));
-    g_option_context_set_summary(context, _("A Spice server client to take screenshots in ppm format."));
-    g_option_context_set_description(context, _("Report bugs to " PACKAGE_BUGREPORT "."));
-    g_option_context_set_main_group(context, spice_cmdline_get_option_group());
-    g_option_context_add_main_entries(context, app_entries, NULL);
-    if (!g_option_context_parse (context, &argc, &argv, &error)) {
-        g_print(_("option parsing failed: %s\n"), error->message);
-        exit(1);
-    }
-
-    if (version) {
-        g_print("snappy " PACKAGE_VERSION "\n");
-        exit(0);
-    }
-
-    g_type_init();
-    mainloop = g_main_loop_new(NULL, false);
-
-    session = spice_session_new();
-    g_signal_connect(session, "channel-new",
-                     G_CALLBACK(channel_new), NULL);
-    spice_cmdline_session_setup(session);
-
-    if (!spice_session_connect(session)) {
-        fprintf(stderr, _("spice_session_connect failed\n"));
-        exit(1);
-    }
-
-    g_main_loop_run(mainloop);
-    return 0;
-}
diff --git a/gtk/spicy-screenshot.c b/gtk/spicy-screenshot.c
new file mode 100644
index 0000000..2595d0c
--- /dev/null
+++ b/gtk/spicy-screenshot.c
@@ -0,0 +1,178 @@
+/* -*- Mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */
+/*
+   Copyright (C) 2010 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
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   This library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with this library; if not, see <http://www.gnu.org/licenses/>.
+*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+#include <glib/gi18n.h>
+
+#include "spice-client.h"
+#include "spice-common.h"
+#include "spice-cmdline.h"
+
+/* config */
+static const char *outf      = "spicy-screenshot.ppm";
+static gboolean version = FALSE;
+
+/* state */
+static SpiceSession  *session;
+static GMainLoop     *mainloop;
+
+enum SpiceSurfaceFmt d_format;
+gint                 d_width, d_height, d_stride;
+gpointer             d_data;
+
+/* ------------------------------------------------------------------ */
+
+static void primary_create(SpiceChannel *channel, gint format,
+                           gint width, gint height, gint stride,
+                           gint shmid, gpointer imgdata, gpointer data)
+{
+    SPICE_DEBUG("%s: %dx%d, format %d", __FUNCTION__, width, height, format);
+    d_format = format;
+    d_width  = width;
+    d_height = height;
+    d_stride = stride;
+    d_data   = imgdata;
+}
+
+static int write_ppm_32(void)
+{
+    FILE *fp;
+    uint8_t *p;
+    int n;
+
+    fp = fopen(outf,"w");
+    if (NULL == fp) {
+	fprintf(stderr, _("%s: can't open %s: %s\n"), g_get_prgname(), outf, strerror(errno));
+	return -1;
+    }
+    fprintf(fp, "P6\n%d %d\n255\n",
+            d_width, d_height);
+    n = d_width * d_height;
+    p = d_data;
+    while (n > 0) {
+        fputc(p[2], fp);
+        fputc(p[1], fp);
+        fputc(p[0], fp);
+        p += 4;
+        n--;
+    }
+    fclose(fp);
+    return 0;
+}
+
+static void invalidate(SpiceChannel *channel,
+                       gint x, gint y, gint w, gint h, gpointer *data)
+{
+    int rc;
+
+    switch (d_format) {
+    case SPICE_SURFACE_FMT_32_xRGB:
+        rc = write_ppm_32();
+        break;
+    default:
+        fprintf(stderr, _("unsupported spice surface format %d\n"), d_format);
+        rc = -1;
+        break;
+    }
+    if (rc == 0)
+        fprintf(stderr, _("wrote screen shot to %s\n"), outf);
+    g_main_loop_quit(mainloop);
+}
+
+static void channel_new(SpiceSession *s, SpiceChannel *channel, gpointer *data)
+{
+    int id;
+
+    if (!SPICE_IS_DISPLAY_CHANNEL(channel))
+        return;
+
+    g_object_get(channel, "channel-id", &id, NULL);
+    if (id != 0)
+        return;
+
+    g_signal_connect(channel, "display-primary-create",
+                     G_CALLBACK(primary_create), NULL);
+    g_signal_connect(channel, "display-invalidate",
+                     G_CALLBACK(invalidate), NULL);
+    spice_channel_connect(channel);
+}
+
+/* ------------------------------------------------------------------ */
+
+static GOptionEntry app_entries[] = {
+    {
+        .long_name        = "out-file",
+        .short_name       = 'o',
+        .arg              = G_OPTION_ARG_FILENAME,
+        .arg_data         = &outf,
+        .description      = N_("Output file name (default spicy-screenshot.ppm)"),
+        .arg_description  = N_("<filename>"),
+    },
+    {
+        .long_name        = "version",
+        .arg              = G_OPTION_ARG_NONE,
+        .arg_data         = &version,
+        .description      = N_("Display version and quit"),
+    },
+    {
+        /* end of list */
+    }
+};
+
+int main(int argc, char *argv[])
+{
+    GError *error = NULL;
+    GOptionContext *context;
+
+    bindtextdomain(GETTEXT_PACKAGE, SPICE_GTK_LOCALEDIR);
+    bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
+    textdomain(GETTEXT_PACKAGE);
+
+    /* parse opts */
+    context = g_option_context_new(_(" - make screen shots"));
+    g_option_context_set_summary(context, _("A Spice server client to take screenshots in ppm format."));
+    g_option_context_set_description(context, _("Report bugs to " PACKAGE_BUGREPORT "."));
+    g_option_context_set_main_group(context, spice_cmdline_get_option_group());
+    g_option_context_add_main_entries(context, app_entries, NULL);
+    if (!g_option_context_parse (context, &argc, &argv, &error)) {
+        g_print(_("option parsing failed: %s\n"), error->message);
+        exit(1);
+    }
+
+    if (version) {
+        g_print("%s " PACKAGE_VERSION "\n", g_get_prgname());
+        exit(0);
+    }
+
+    g_type_init();
+    mainloop = g_main_loop_new(NULL, false);
+
+    session = spice_session_new();
+    g_signal_connect(session, "channel-new",
+                     G_CALLBACK(channel_new), NULL);
+    spice_cmdline_session_setup(session);
+
+    if (!spice_session_connect(session)) {
+        fprintf(stderr, _("spice_session_connect failed\n"));
+        exit(1);
+    }
+
+    g_main_loop_run(mainloop);
+    return 0;
+}
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 8b67632..0d962f0 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -7,9 +7,9 @@ gtk/display/gnome-rr-config.c
 gtk/display/gnome-rr-generic.c
 gtk/display/gnome-rr-windows.c
 gtk/display/gnome-rr-x11.c
-gtk/snappy.c
 gtk/spice-cmdline.c
 gtk/spice-option.c
+gtk/spicy-screenshot.c
 gtk/spicy-stats.c
 gtk/spicy.c
 gtk/usb-device-manager.c
commit 5150285e1cba35570c29bd923df065d2c81f081e
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date:   Wed Apr 10 19:05:16 2013 +0200

    build-sys: keep common submodule up to date
    
    This requires git 1.8.2 to work properly. With this we should no longer
    need to update the reference, assuming the tarball is always up to
    date (that doesn't change from before, you need to update the submodule)

diff --git a/.gitmodules b/.gitmodules
index 0c618ee..57aaded 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,3 +1,4 @@
 [submodule "spice-common"]
 	path = spice-common
 	url = ../spice-common
+	branch = master
diff --git a/autogen.sh b/autogen.sh
index 0c18272..85b76a9 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -5,7 +5,7 @@ set -e # exit on errors
 srcdir=`dirname $0`
 test -z "$srcdir" && srcdir=.
 
-git submodule update --init --recursive
+git submodule update --init --recursive --remote
 
 gtkdocize
 autoreconf -v --force --install


More information about the Spice-commits mailing list