Re: [Spice-devel] [spice-gtk] Drop glib < 2.28 support

2014-10-30 Thread Christophe Fergeau
On Thu, Oct 30, 2014 at 01:10:05PM -0400, Marc-André Lureau wrote:
> 
> 
> - Original Message -
> > With el6 now shipping glib 2.28, there is no very good reason to keep
> > support for older glib versions alive, especially as it will barely be
> > tested.
> > ---
> >  configure.ac  | 16 ++---
> >  gtk/Makefile.am   |  9 ++---
> >  gtk/bio-gio.c | 26 ++
> >  gtk/bio-gio.h |  4 ---
> >  gtk/desktop-integration.c | 49 +++
> >  gtk/glib-compat.c | 86
> >  ---
> >  gtk/glib-compat.h | 84 
> > -
> >  gtk/map-file  |  1 -
> >  gtk/spice-channel.c   | 17 --
> >  gtk/spice-session.c   | 38 -
> >  gtk/wocky-http-proxy.c|  8 -
> >  11 files changed, 11 insertions(+), 327 deletions(-)
> > 
> > diff --git a/configure.ac b/configure.ac
> > index f304e52..3bd09f3 100644
> > --- a/configure.ac
> > +++ b/configure.ac
> > @@ -255,7 +255,7 @@ fi
> >  
> >  AC_CHECK_FUNCS(clearenv strtok_r)
> >  
> > -PKG_CHECK_MODULES(GLIB2, glib-2.0 >= 2.22)
> > +PKG_CHECK_MODULES(GLIB2, glib-2.0 >= 2.26)
> 
> I guess you wanted 2.28 here

Right, thanks, that's what I get for doing things in 2 steps (first 2.26
then 2.28). Fixed.

Christophe


pgpnKdHGsZPrI.pgp
Description: PGP signature
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] [spice-gtk] Drop glib < 2.28 support

2014-10-30 Thread Marc-André Lureau


- Original Message -
> With el6 now shipping glib 2.28, there is no very good reason to keep
> support for older glib versions alive, especially as it will barely be
> tested.
> ---
>  configure.ac  | 16 ++---
>  gtk/Makefile.am   |  9 ++---
>  gtk/bio-gio.c | 26 ++
>  gtk/bio-gio.h |  4 ---
>  gtk/desktop-integration.c | 49 +++
>  gtk/glib-compat.c | 86
>  ---
>  gtk/glib-compat.h | 84 -
>  gtk/map-file  |  1 -
>  gtk/spice-channel.c   | 17 --
>  gtk/spice-session.c   | 38 -
>  gtk/wocky-http-proxy.c|  8 -
>  11 files changed, 11 insertions(+), 327 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index f304e52..3bd09f3 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -255,7 +255,7 @@ fi
>  
>  AC_CHECK_FUNCS(clearenv strtok_r)
>  
> -PKG_CHECK_MODULES(GLIB2, glib-2.0 >= 2.22)
> +PKG_CHECK_MODULES(GLIB2, glib-2.0 >= 2.26)

I guess you wanted 2.28 here

>  AC_SUBST(GLIB2_CFLAGS)
>  AC_SUBST(GLIB2_LIBS)
>  
> @@ -267,9 +267,6 @@ PKG_CHECK_MODULES(GIO, gio-2.0 >= 2.10.0 $gio_os)
>  AC_SUBST(GIO_CFLAGS)
>  AC_SUBST(GIO_LIBS)
>  
> -PKG_CHECK_EXISTS([gio-2.0 >= 2.26], [have_gio26=yes])
> -AM_CONDITIONAL([WITH_GPROXY], [test "x$have_gio26" = "xyes"])
> -
>  PKG_CHECK_MODULES(CAIRO, cairo >= 1.2.0)
>  AC_SUBST(CAIRO_CFLAGS)
>  AC_SUBST(CAIRO_LIBS)
> @@ -690,15 +687,8 @@ AC_ARG_ENABLE([dbus],
>  
>  have_dbus=no
>  if test "x$enable_dbus" != "xno"; then
> -  if test "x$have_gio26" = "xyes"; then
> -AC_DEFINE([USE_GDBUS], [1], [Define if supporting gdbus])
> -have_dbus=gdbus
> -  else
> -PKG_CHECK_EXISTS([DBUS_GLIB], [dbus-glib-1], [
> -  AC_DEFINE([USE_DBUS_GLIB], [1], [Define if supporting dbus-glib])
> -  have_dbus=dbus-glib
> -])
> -  fi
> +  AC_DEFINE([USE_GDBUS], [1], [Define if supporting gdbus])
> +  have_dbus=yes
>  
>if test "x$enable_dbus" = "xyes" && test "x$have_dbus" = "xno"; then
>  AC_MSG_ERROR([D-Bus support explicitly requested, but some required
>  packages are not available])
> diff --git a/gtk/Makefile.am b/gtk/Makefile.am
> index 7bc5842..f11cfb9 100644
> --- a/gtk/Makefile.am
> +++ b/gtk/Makefile.am
> @@ -272,6 +272,8 @@ libspice_client_glib_2_0_la_SOURCES = 
> \
>   $(USB_ACL_HELPER_SRCS)  \
>   vmcstream.c \
>   vmcstream.h \
> + wocky-http-proxy.c  \
> + wocky-http-proxy.h  \
>   \
>   decode.h\
>   decode-glz.c\
> @@ -282,13 +284,6 @@ libspice_client_glib_2_0_la_SOURCES =
> \
>   client_sw_canvas.h  \
>   $(NULL)
>  
> -if WITH_GPROXY
> -libspice_client_glib_2_0_la_SOURCES +=   \
> - wocky-http-proxy.c  \
> - wocky-http-proxy.h  \
> - $(NULL)
> -endif
> -
>  nodist_libspice_client_glib_2_0_la_SOURCES = \
>   spice-glib-enums.c  \
>   spice-marshal.c \
> diff --git a/gtk/bio-gio.c b/gtk/bio-gio.c
> index cad904e..108ac1a 100644
> --- a/gtk/bio-gio.c
> +++ b/gtk/bio-gio.c
> @@ -25,11 +25,7 @@
>  
>  typedef struct bio_gsocket_method {
>  BIO_METHOD method;
> -#if GLIB_CHECK_VERSION(2, 28, 0)
>  GIOStream *stream;
> -#else
> -GSocket *gsocket;
> -#endif
>  } bio_gsocket_method;
>  
>  #define BIO_GET_GSOCKET(bio)  (((bio_gsocket_method*)bio->method)->gsocket)
> @@ -41,12 +37,8 @@ static int bio_gio_write(BIO *bio, const char *in, int
> inl)
>  gssize ret;
>  GError *error = NULL;
>  
> -#if GLIB_CHECK_VERSION(2, 28, 0)
>  ret =
>  
> g_pollable_output_stream_write_nonblocking(G_POLLABLE_OUTPUT_STREAM(BIO_GET_OSTREAM(bio)),
> -#else
> -ret = g_socket_send(BIO_GET_GSOCKET(bio),
> -#endif
> -in, inl, NULL, &error);
> + in, inl, NULL, &error);
>  BIO_clear_retry_flags(bio);
>  
>  if (g_error_matches(error, G_IO_ERROR, G_IO_ERROR_WOULD_BLOCK))
> @@ -64,12 +56,8 @@ static int bio_gio_read(BIO *bio, char *out, int outl)
>  gssize ret;
>  GError *error = NULL;
>  
> -#if GLIB_CHECK_VERSION(2, 28, 0)
>  ret =
>  
> g_pollable_input_stream_read_nonblocking(G_POLLABLE_INPUT_STREAM(BIO_GET_ISTREAM(bio)),
> -#else
> -ret = g_socket_receive(BIO_GET_GSOCKET(bio),
> -#endif
> -   out, outl, NULL, &error);
> +   out, outl, NULL, &error);
>  BIO_clear_retry_flags(bio);
>  
>  if (g_error_matches(error, G_

[Spice-devel] [spice-gtk] Drop glib < 2.28 support

2014-10-30 Thread Christophe Fergeau
With el6 now shipping glib 2.28, there is no very good reason to keep
support for older glib versions alive, especially as it will barely be
tested.
---
 configure.ac  | 16 ++---
 gtk/Makefile.am   |  9 ++---
 gtk/bio-gio.c | 26 ++
 gtk/bio-gio.h |  4 ---
 gtk/desktop-integration.c | 49 +++
 gtk/glib-compat.c | 86 ---
 gtk/glib-compat.h | 84 -
 gtk/map-file  |  1 -
 gtk/spice-channel.c   | 17 --
 gtk/spice-session.c   | 38 -
 gtk/wocky-http-proxy.c|  8 -
 11 files changed, 11 insertions(+), 327 deletions(-)

diff --git a/configure.ac b/configure.ac
index f304e52..3bd09f3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -255,7 +255,7 @@ fi
 
 AC_CHECK_FUNCS(clearenv strtok_r)
 
-PKG_CHECK_MODULES(GLIB2, glib-2.0 >= 2.22)
+PKG_CHECK_MODULES(GLIB2, glib-2.0 >= 2.26)
 AC_SUBST(GLIB2_CFLAGS)
 AC_SUBST(GLIB2_LIBS)
 
@@ -267,9 +267,6 @@ PKG_CHECK_MODULES(GIO, gio-2.0 >= 2.10.0 $gio_os)
 AC_SUBST(GIO_CFLAGS)
 AC_SUBST(GIO_LIBS)
 
-PKG_CHECK_EXISTS([gio-2.0 >= 2.26], [have_gio26=yes])
-AM_CONDITIONAL([WITH_GPROXY], [test "x$have_gio26" = "xyes"])
-
 PKG_CHECK_MODULES(CAIRO, cairo >= 1.2.0)
 AC_SUBST(CAIRO_CFLAGS)
 AC_SUBST(CAIRO_LIBS)
@@ -690,15 +687,8 @@ AC_ARG_ENABLE([dbus],
 
 have_dbus=no
 if test "x$enable_dbus" != "xno"; then
-  if test "x$have_gio26" = "xyes"; then
-AC_DEFINE([USE_GDBUS], [1], [Define if supporting gdbus])
-have_dbus=gdbus
-  else
-PKG_CHECK_EXISTS([DBUS_GLIB], [dbus-glib-1], [
-  AC_DEFINE([USE_DBUS_GLIB], [1], [Define if supporting dbus-glib])
-  have_dbus=dbus-glib
-])
-  fi
+  AC_DEFINE([USE_GDBUS], [1], [Define if supporting gdbus])
+  have_dbus=yes
 
   if test "x$enable_dbus" = "xyes" && test "x$have_dbus" = "xno"; then
 AC_MSG_ERROR([D-Bus support explicitly requested, but some required 
packages are not available])
diff --git a/gtk/Makefile.am b/gtk/Makefile.am
index 7bc5842..f11cfb9 100644
--- a/gtk/Makefile.am
+++ b/gtk/Makefile.am
@@ -272,6 +272,8 @@ libspice_client_glib_2_0_la_SOURCES =   
\
$(USB_ACL_HELPER_SRCS)  \
vmcstream.c \
vmcstream.h \
+   wocky-http-proxy.c  \
+   wocky-http-proxy.h  \
\
decode.h\
decode-glz.c\
@@ -282,13 +284,6 @@ libspice_client_glib_2_0_la_SOURCES =  
\
client_sw_canvas.h  \
$(NULL)
 
-if WITH_GPROXY
-libspice_client_glib_2_0_la_SOURCES += \
-   wocky-http-proxy.c  \
-   wocky-http-proxy.h  \
-   $(NULL)
-endif
-
 nodist_libspice_client_glib_2_0_la_SOURCES =   \
spice-glib-enums.c  \
spice-marshal.c \
diff --git a/gtk/bio-gio.c b/gtk/bio-gio.c
index cad904e..108ac1a 100644
--- a/gtk/bio-gio.c
+++ b/gtk/bio-gio.c
@@ -25,11 +25,7 @@
 
 typedef struct bio_gsocket_method {
 BIO_METHOD method;
-#if GLIB_CHECK_VERSION(2, 28, 0)
 GIOStream *stream;
-#else
-GSocket *gsocket;
-#endif
 } bio_gsocket_method;
 
 #define BIO_GET_GSOCKET(bio)  (((bio_gsocket_method*)bio->method)->gsocket)
@@ -41,12 +37,8 @@ static int bio_gio_write(BIO *bio, const char *in, int inl)
 gssize ret;
 GError *error = NULL;
 
-#if GLIB_CHECK_VERSION(2, 28, 0)
 ret = 
g_pollable_output_stream_write_nonblocking(G_POLLABLE_OUTPUT_STREAM(BIO_GET_OSTREAM(bio)),
-#else
-ret = g_socket_send(BIO_GET_GSOCKET(bio),
-#endif
-in, inl, NULL, &error);
+ in, inl, NULL, &error);
 BIO_clear_retry_flags(bio);
 
 if (g_error_matches(error, G_IO_ERROR, G_IO_ERROR_WOULD_BLOCK))
@@ -64,12 +56,8 @@ static int bio_gio_read(BIO *bio, char *out, int outl)
 gssize ret;
 GError *error = NULL;
 
-#if GLIB_CHECK_VERSION(2, 28, 0)
 ret = 
g_pollable_input_stream_read_nonblocking(G_POLLABLE_INPUT_STREAM(BIO_GET_ISTREAM(bio)),
-#else
-ret = g_socket_receive(BIO_GET_GSOCKET(bio),
-#endif
-   out, outl, NULL, &error);
+   out, outl, NULL, &error);
 BIO_clear_retry_flags(bio);
 
 if (g_error_matches(error, G_IO_ERROR, G_IO_ERROR_WOULD_BLOCK))
@@ -105,24 +93,14 @@ static int bio_gio_puts(BIO *bio, const char *str)
 }
 
 G_GNUC_INTERNAL
-#if GLIB_CHECK_VERSION(2, 28, 0)
 BIO* bio_new_giostream(GIOStream *stream)
 {
 // TODO: make an actual new BIO type, or just switch to GTls already...
 BIO *bio = BIO_new_socket(-1, BI

Re: [Spice-devel] [Spice-commits] 9 commits - TODO configure.ac data/Makefile.am data/spice-mime.xml.in data/spicy.desktop.in.in doc/reference gtk/channel-display.c gtk/channel-usbredir.c gtk/continua

2014-10-30 Thread Marc-André Lureau
On Thu, Oct 30, 2014 at 5:53 PM, Christophe Fergau <
t...@kemper.freedesktop.org> wrote:

> commit 20316442a5f80fc475543ceb79cdee98907dba61
> Author: Christophe Fergeau 
> Date:   Wed Oct 29 17:07:43 2014 +0100
>
> Add missing (C) to Red Hat copyright line
>
> gnulib's make syntax-check comes with a rule enforcing that Red Hat
> copyright lines contain both "(C)" and "Copyright".
>

gnulib? you mean libvirt I suppose.


-- 
Marc-André Lureau
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] [PATCH][spice-gtk] Add GStreamer 1.0 support

2014-10-30 Thread Alon Levy
On 10/30/2014 06:39 PM, vtoso...@redhat.com wrote:
> From: Christophe Fergeau 
> 
> This commit adds GStreamer 1.0 support.
> To enable GStreamer 1.0: --with-audio=gstreamer1

commit first line should say audio somewhere.

> 
> There is only a few changes between those versions, worth mentioning:
> - audio capabilities "audio/x-raw,format=..." instead of
>   "audio/x-raw-int,..."
> - appsink signal for new data changed from "new-buffer" to "new-sample"
> ---
>  configure.ac | 17 +++---
>  gtk/spice-audio.c|  4 ++--
>  gtk/spice-gstaudio.c | 64 
> +++-
>  3 files changed, 79 insertions(+), 6 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 0d65823..17680e6 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -288,7 +288,7 @@ AS_IF([test "x$have_phodav" = "xyes"],
> AC_DEFINE(USE_PHODAV, [1], [Define if supporting phodav]))
>  
>  AC_ARG_WITH([audio],
> -  AS_HELP_STRING([--with-audio=@<:@gstreamer/pulse/auto/no@:>@], [Select 
> audio backend @<:@default=auto@:>@]),
> +  AS_HELP_STRING([--with-audio=@<:@gstreamer/gstreamer1/pulse/auto/no@:>@], 
> [Select audio backend @<:@default=auto@:>@]),
>[],
>[with_audio="auto"])
>  
> @@ -297,7 +297,7 @@ AS_IF([test "x$with_audio" = "xauto"], [
>  ])
>  
>  case "$with_audio" in
> -  gstreamer|pulse|no*)
> +  gstreamer|gstreamer1|pulse|no*)
>  ;;
>*) AC_MSG_ERROR(Unsupported audio backend)
>  esac
> @@ -326,7 +326,18 @@ AS_IF([test "x$have_gst" = "xyes"],
>   [AC_MSG_ERROR([GStreamer requested but not found])
>])
>  ])
> -AM_CONDITIONAL([WITH_GSTAUDIO], [test "x$have_gst" = "xyes"])
> +
> +AS_IF([test "x$with_audio" = "xgstreamer1"],
> +  [PKG_CHECK_MODULES(GST, gstreamer-1.0 gstreamer-base-1.0 
> gstreamer-app-1.0 gstreamer-audio-1.0, [have_gst1=yes], [have_gst1=no])],
> +  [have_gst1=no])
> +
> +AS_IF([test "x$have_gst1" = "xyes"],
> +  [AC_DEFINE([WITH_GST1AUDIO], 1, [Have GStreamer 1.0?])],
> +  [AS_IF([test "x$with_audio" = "xgstreamer1"],
> + [AC_MSG_ERROR([GStreamer 1.0 requested but not found])
> +  ])
> +])
> +AM_CONDITIONAL([WITH_GSTAUDIO], [test "x$have_gst" = "xyes" -o "x$have_gst1" 
> = "xyes"])
>  AC_SUBST(GST_CFLAGS)
>  AC_SUBST(GST_LIBS)
>  
> diff --git a/gtk/spice-audio.c b/gtk/spice-audio.c
> index dbd3a8b..34c1b69 100644
> --- a/gtk/spice-audio.c
> +++ b/gtk/spice-audio.c
> @@ -47,7 +47,7 @@
>  #ifdef WITH_PULSE
>  #include "spice-pulse.h"
>  #endif
> -#ifdef WITH_GSTAUDIO
> +#if defined(WITH_GSTAUDIO) || defined(WITH_GST1AUDIO)
>  #include "spice-gstaudio.h"
>  #endif
>  
> @@ -219,7 +219,7 @@ SpiceAudio *spice_audio_new(SpiceSession *session, 
> GMainContext *context,
>  #ifdef WITH_PULSE
>  self = SPICE_AUDIO(spice_pulse_new(session, context, name));
>  #endif
> -#ifdef WITH_GSTAUDIO
> +#if defined(WITH_GSTAUDIO) || defined(WITH_GST1AUDIO)
>  self = SPICE_AUDIO(spice_gstaudio_new(session, context, name));
>  #endif
>  if (!self)
> diff --git a/gtk/spice-gstaudio.c b/gtk/spice-gstaudio.c
> index faa0c74..d3c091a 100644
> --- a/gtk/spice-gstaudio.c
> +++ b/gtk/spice-gstaudio.c
> @@ -21,9 +21,13 @@
>  
>  #include 
>  #include 
> -#include 
>  #include 
> +#ifdef WITH_GST1AUDIO
> +#include 
> +#else
> +#include 
>  #include 
> +#endif
>  
>  #include "spice-gstaudio.h"
>  #include "spice-common.h"
> @@ -133,7 +137,12 @@ static void record_new_buffer(GstAppSink *appsink, 
> gpointer data)
>  
>  g_return_if_fail(p != NULL);
>  
> +#ifdef WITH_GST1AUDIO
> +msg = gst_message_new_application(GST_OBJECT(p->record.pipe),
> +  gst_structure_new_empty 
> ("new-sample"));
> +#else
>  msg = gst_message_new_application(GST_OBJECT(p->record.pipe), NULL);
> +#endif
>  gst_element_post_message(p->record.pipe, msg);
>  }
>  
> @@ -155,6 +164,38 @@ static gboolean record_bus_cb(GstBus *bus, GstMessage 
> *msg, gpointer data)
>  g_return_val_if_fail(p != NULL, FALSE);
>  
>  switch (GST_MESSAGE_TYPE(msg)) {
> +#ifdef WITH_GST1AUDIO
> +case GST_MESSAGE_APPLICATION: {
> +GstSample *s;
> +GstBuffer *buffer;
> +GstMapInfo mapping;
> +
> +s = gst_app_sink_pull_sample(GST_APP_SINK(p->record.sink));
> +if (!s) {
> +if (!gst_app_sink_is_eos(GST_APP_SINK(p->record.sink)))
> +g_warning("eos not reached, but can't pull new sample");
> +return TRUE;
> +}
> +
> +buffer = gst_sample_get_buffer(s);
> +if (!buffer) {
> +if (!gst_app_sink_is_eos(GST_APP_SINK(p->record.sink)))
> +g_warning("eos not reached, but can't pull new buffer");
> +return TRUE;
> +}
> +if (!gst_buffer_map(buffer, &mapping, GST_MAP_READ)) {
> +return TRUE;
> +}
> +
> +spice_record_send_data(SPICE_RECORD_CHANNEL(p->rchannel),
> +   /* FIXME: server side doesn't care

[Spice-devel] [PATCH][spice-gtk] Add GStreamer 1.0 support

2014-10-30 Thread vtosodec
From: Christophe Fergeau 

This commit adds GStreamer 1.0 support.
To enable GStreamer 1.0: --with-audio=gstreamer1

There is only a few changes between those versions, worth mentioning:
- audio capabilities "audio/x-raw,format=..." instead of
  "audio/x-raw-int,..."
- appsink signal for new data changed from "new-buffer" to "new-sample"
---
 configure.ac | 17 +++---
 gtk/spice-audio.c|  4 ++--
 gtk/spice-gstaudio.c | 64 +++-
 3 files changed, 79 insertions(+), 6 deletions(-)

diff --git a/configure.ac b/configure.ac
index 0d65823..17680e6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -288,7 +288,7 @@ AS_IF([test "x$have_phodav" = "xyes"],
AC_DEFINE(USE_PHODAV, [1], [Define if supporting phodav]))
 
 AC_ARG_WITH([audio],
-  AS_HELP_STRING([--with-audio=@<:@gstreamer/pulse/auto/no@:>@], [Select audio 
backend @<:@default=auto@:>@]),
+  AS_HELP_STRING([--with-audio=@<:@gstreamer/gstreamer1/pulse/auto/no@:>@], 
[Select audio backend @<:@default=auto@:>@]),
   [],
   [with_audio="auto"])
 
@@ -297,7 +297,7 @@ AS_IF([test "x$with_audio" = "xauto"], [
 ])
 
 case "$with_audio" in
-  gstreamer|pulse|no*)
+  gstreamer|gstreamer1|pulse|no*)
 ;;
   *) AC_MSG_ERROR(Unsupported audio backend)
 esac
@@ -326,7 +326,18 @@ AS_IF([test "x$have_gst" = "xyes"],
  [AC_MSG_ERROR([GStreamer requested but not found])
   ])
 ])
-AM_CONDITIONAL([WITH_GSTAUDIO], [test "x$have_gst" = "xyes"])
+
+AS_IF([test "x$with_audio" = "xgstreamer1"],
+  [PKG_CHECK_MODULES(GST, gstreamer-1.0 gstreamer-base-1.0 
gstreamer-app-1.0 gstreamer-audio-1.0, [have_gst1=yes], [have_gst1=no])],
+  [have_gst1=no])
+
+AS_IF([test "x$have_gst1" = "xyes"],
+  [AC_DEFINE([WITH_GST1AUDIO], 1, [Have GStreamer 1.0?])],
+  [AS_IF([test "x$with_audio" = "xgstreamer1"],
+ [AC_MSG_ERROR([GStreamer 1.0 requested but not found])
+  ])
+])
+AM_CONDITIONAL([WITH_GSTAUDIO], [test "x$have_gst" = "xyes" -o "x$have_gst1" = 
"xyes"])
 AC_SUBST(GST_CFLAGS)
 AC_SUBST(GST_LIBS)
 
diff --git a/gtk/spice-audio.c b/gtk/spice-audio.c
index dbd3a8b..34c1b69 100644
--- a/gtk/spice-audio.c
+++ b/gtk/spice-audio.c
@@ -47,7 +47,7 @@
 #ifdef WITH_PULSE
 #include "spice-pulse.h"
 #endif
-#ifdef WITH_GSTAUDIO
+#if defined(WITH_GSTAUDIO) || defined(WITH_GST1AUDIO)
 #include "spice-gstaudio.h"
 #endif
 
@@ -219,7 +219,7 @@ SpiceAudio *spice_audio_new(SpiceSession *session, 
GMainContext *context,
 #ifdef WITH_PULSE
 self = SPICE_AUDIO(spice_pulse_new(session, context, name));
 #endif
-#ifdef WITH_GSTAUDIO
+#if defined(WITH_GSTAUDIO) || defined(WITH_GST1AUDIO)
 self = SPICE_AUDIO(spice_gstaudio_new(session, context, name));
 #endif
 if (!self)
diff --git a/gtk/spice-gstaudio.c b/gtk/spice-gstaudio.c
index faa0c74..d3c091a 100644
--- a/gtk/spice-gstaudio.c
+++ b/gtk/spice-gstaudio.c
@@ -21,9 +21,13 @@
 
 #include 
 #include 
-#include 
 #include 
+#ifdef WITH_GST1AUDIO
+#include 
+#else
+#include 
 #include 
+#endif
 
 #include "spice-gstaudio.h"
 #include "spice-common.h"
@@ -133,7 +137,12 @@ static void record_new_buffer(GstAppSink *appsink, 
gpointer data)
 
 g_return_if_fail(p != NULL);
 
+#ifdef WITH_GST1AUDIO
+msg = gst_message_new_application(GST_OBJECT(p->record.pipe),
+  gst_structure_new_empty ("new-sample"));
+#else
 msg = gst_message_new_application(GST_OBJECT(p->record.pipe), NULL);
+#endif
 gst_element_post_message(p->record.pipe, msg);
 }
 
@@ -155,6 +164,38 @@ static gboolean record_bus_cb(GstBus *bus, GstMessage 
*msg, gpointer data)
 g_return_val_if_fail(p != NULL, FALSE);
 
 switch (GST_MESSAGE_TYPE(msg)) {
+#ifdef WITH_GST1AUDIO
+case GST_MESSAGE_APPLICATION: {
+GstSample *s;
+GstBuffer *buffer;
+GstMapInfo mapping;
+
+s = gst_app_sink_pull_sample(GST_APP_SINK(p->record.sink));
+if (!s) {
+if (!gst_app_sink_is_eos(GST_APP_SINK(p->record.sink)))
+g_warning("eos not reached, but can't pull new sample");
+return TRUE;
+}
+
+buffer = gst_sample_get_buffer(s);
+if (!buffer) {
+if (!gst_app_sink_is_eos(GST_APP_SINK(p->record.sink)))
+g_warning("eos not reached, but can't pull new buffer");
+return TRUE;
+}
+if (!gst_buffer_map(buffer, &mapping, GST_MAP_READ)) {
+return TRUE;
+}
+
+spice_record_send_data(SPICE_RECORD_CHANNEL(p->rchannel),
+   /* FIXME: server side doesn't care about ts?
+  what is the unit? ms apparently */
+   mapping.data, mapping.size, 0);
+gst_buffer_unmap(buffer, &mapping);
+gst_sample_unref(s);
+break;
+}
+#else
 case GST_MESSAGE_APPLICATION: {
 GstBuffer *b;
 
@@ -171,6 +212,7 @@ static gboolean record_bus_cb(GstBus *bus, GstMessage *msg, 
gpoint

Re: [Spice-devel] [PATCH] SPICE-HTML5: Improve error message

2014-10-30 Thread Jeremy White

ack as well, seems like a nice change.

Cheers,

Jeremy

On 10/30/2014 04:35 AM, Frantisek Kobzik wrote:

Current error message in SPICE-HTML5 error is poor (error-logging function
prints error.toString() which doesn't contain anything detailed).

This patch enhances this message in the following way:
  - error event contains target attribute ([1]),
  - the code in this patch checks for presence of 'url' attribute (which is
contained in WebSocket object[2]). If the target contains url then
meaningful message is logged.

[1]: https://developer.mozilla.org/en-US/docs/Web/API/Event
[2]: https://developer.mozilla.org/en-US/docs/Web/API/WebSocket
---
  spiceconn.js | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/spiceconn.js b/spiceconn.js
index e33227e..ceebd5d 100644
--- a/spiceconn.js
+++ b/spiceconn.js
@@ -78,7 +78,9 @@ function SpiceConn(o)
  this.parent.state = "start";
  });
  this.ws.addEventListener('error', function(e) {
-this.parent.log_err(">> WebSockets.onerror" + e.toString());
+if ('url' in e.target) {
+this.parent.log_err("WebSocket error: Can't connect to websocket on 
URL: " + e.target.url);
+}
  this.parent.report_error(e);
  });
  this.ws.addEventListener('close', function(e) {



___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] [spice-gtk 03/11] Add missing (C) to copyright line

2014-10-30 Thread Christophe Fergeau
On Thu, Oct 30, 2014 at 02:27:48PM +, Daniel P. Berrange wrote:
> On Thu, Oct 30, 2014 at 02:55:05PM +0100, Christophe Fergeau wrote:
> > On Thu, Oct 30, 2014 at 01:38:26PM +, Daniel P. Berrange wrote:
> > > On Thu, Oct 30, 2014 at 02:28:25PM +0100, Marc-André Lureau wrote:
> > > > On Thu, Oct 30, 2014 at 2:22 PM, Christophe Fergeau 
> > > > 
> > > > wrote:
> > > > 
> > > > > On Thu, Oct 30, 2014 at 02:02:27PM +0100, Marc-André Lureau wrote:
> > > > > > Quoting GNU maintainer manual:
> > > > > > https://www.gnu.org/prep/maintain/html_node/Copyright-Notices.html
> > > > > >
> > > > > > "Alternatively, the ‘(C)’ or C-in-a-circle can be omitted entirely; 
> > > > > > the
> > > > > > word ‘Copyright’ suffices."
> > > > >
> > > > > The rule which asks for that to be done is:
> > > > > sc_copyright_format:
> > > > > @require='Copyright .*Red 'Hat', Inc\.'   
> > > > >   \
> > > > > containing='Copyright .*Red 'Hat  
> > > > >   \
> > > > > halt='Red Hat copyright is missing Inc.'  
> > > > >   \
> > > > >   $(_sc_search_regexp)
> > > > > @prohibit='Copyright [^(].*Red 'Hat   
> > > > >   \
> > > > > halt='consistently use (C) in Red Hat copyright'  
> > > > >   \
> > > > >   $(_sc_search_regexp)
> > > > > @prohibit='\'  
> > > > >   \
> > > > > halt='spell Red Hat as two words' 
> > > > >   \
> > > > >   $(_sc_search_regexp)
> > > > >
> > > > > I don't know if Red Hat legal department insists on the (C) being 
> > > > > present.
> > > > > I can reword the commit log to explicit it's only being enforced for 
> > > > > Red
> > > > > Hat's
> > > > > copyright, or I can drop the patch.
> > > > >
> > > > >
> > > > It might be specified by Red Hat legal somewhere, but then I wonder why
> > > > there wouldn't be checks for that (in RH builds checks), so it's 
> > > > probably
> > > > unneeded.
> > > 
> > > This syntax-check rule isn't about enforcing a legal requirement
> > > but rather ensuring that we use a consist copyright header across
> > > all source files. 
> > 
> > Do you know why it's not enforced for all copyright lines, but only for
> > Red Hat? It's up to other companies/individual to decide how they want
> > their copyright line to look with respect to (C)/Copyright/... ?
> 
> Yep, the license terms don't allow us change any Copyright line
> that other copyright holders have added.

Ah, makes sense, thanks for all the details!
I'll keep this patch then to have a consistent (C) Red Hat line in all
files and mention in the log that it only applies to RH copyright.

Christophe


pgpS4TZoHJWP0.pgp
Description: PGP signature
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] [spice-gtk 03/11] Add missing (C) to copyright line

2014-10-30 Thread Daniel P. Berrange
On Thu, Oct 30, 2014 at 02:55:05PM +0100, Christophe Fergeau wrote:
> On Thu, Oct 30, 2014 at 01:38:26PM +, Daniel P. Berrange wrote:
> > On Thu, Oct 30, 2014 at 02:28:25PM +0100, Marc-André Lureau wrote:
> > > On Thu, Oct 30, 2014 at 2:22 PM, Christophe Fergeau 
> > > wrote:
> > > 
> > > > On Thu, Oct 30, 2014 at 02:02:27PM +0100, Marc-André Lureau wrote:
> > > > > Quoting GNU maintainer manual:
> > > > > https://www.gnu.org/prep/maintain/html_node/Copyright-Notices.html
> > > > >
> > > > > "Alternatively, the ‘(C)’ or C-in-a-circle can be omitted entirely; 
> > > > > the
> > > > > word ‘Copyright’ suffices."
> > > >
> > > > The rule which asks for that to be done is:
> > > > sc_copyright_format:
> > > > @require='Copyright .*Red 'Hat', Inc\.' 
> > > > \
> > > > containing='Copyright .*Red 'Hat
> > > > \
> > > > halt='Red Hat copyright is missing Inc.'
> > > > \
> > > >   $(_sc_search_regexp)
> > > > @prohibit='Copyright [^(].*Red 'Hat 
> > > > \
> > > > halt='consistently use (C) in Red Hat copyright'
> > > > \
> > > >   $(_sc_search_regexp)
> > > > @prohibit='\'
> > > > \
> > > > halt='spell Red Hat as two words'   
> > > > \
> > > >   $(_sc_search_regexp)
> > > >
> > > > I don't know if Red Hat legal department insists on the (C) being 
> > > > present.
> > > > I can reword the commit log to explicit it's only being enforced for Red
> > > > Hat's
> > > > copyright, or I can drop the patch.
> > > >
> > > >
> > > It might be specified by Red Hat legal somewhere, but then I wonder why
> > > there wouldn't be checks for that (in RH builds checks), so it's probably
> > > unneeded.
> > 
> > This syntax-check rule isn't about enforcing a legal requirement
> > but rather ensuring that we use a consist copyright header across
> > all source files. 
> 
> Do you know why it's not enforced for all copyright lines, but only for
> Red Hat? It's up to other companies/individual to decide how they want
> their copyright line to look with respect to (C)/Copyright/... ?

Yep, the license terms don't allow us change any Copyright line
that other copyright holders have added.


Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc :|
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] [spice-gtk 03/11] Add missing (C) to copyright line

2014-10-30 Thread Christophe Fergeau
On Thu, Oct 30, 2014 at 01:38:26PM +, Daniel P. Berrange wrote:
> On Thu, Oct 30, 2014 at 02:28:25PM +0100, Marc-André Lureau wrote:
> > On Thu, Oct 30, 2014 at 2:22 PM, Christophe Fergeau 
> > wrote:
> > 
> > > On Thu, Oct 30, 2014 at 02:02:27PM +0100, Marc-André Lureau wrote:
> > > > Quoting GNU maintainer manual:
> > > > https://www.gnu.org/prep/maintain/html_node/Copyright-Notices.html
> > > >
> > > > "Alternatively, the ‘(C)’ or C-in-a-circle can be omitted entirely; the
> > > > word ‘Copyright’ suffices."
> > >
> > > The rule which asks for that to be done is:
> > > sc_copyright_format:
> > > @require='Copyright .*Red 'Hat', Inc\.' \
> > > containing='Copyright .*Red 'Hat\
> > > halt='Red Hat copyright is missing Inc.'\
> > >   $(_sc_search_regexp)
> > > @prohibit='Copyright [^(].*Red 'Hat \
> > > halt='consistently use (C) in Red Hat copyright'\
> > >   $(_sc_search_regexp)
> > > @prohibit='\'\
> > > halt='spell Red Hat as two words'   \
> > >   $(_sc_search_regexp)
> > >
> > > I don't know if Red Hat legal department insists on the (C) being present.
> > > I can reword the commit log to explicit it's only being enforced for Red
> > > Hat's
> > > copyright, or I can drop the patch.
> > >
> > >
> > It might be specified by Red Hat legal somewhere, but then I wonder why
> > there wouldn't be checks for that (in RH builds checks), so it's probably
> > unneeded.
> 
> This syntax-check rule isn't about enforcing a legal requirement
> but rather ensuring that we use a consist copyright header across
> all source files. 

Do you know why it's not enforced for all copyright lines, but only for
Red Hat? It's up to other companies/individual to decide how they want
their copyright line to look with respect to (C)/Copyright/... ?

Christophe


pgpMLcxvzGd_0.pgp
Description: PGP signature
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] [spice-gtk 03/11] Add missing (C) to copyright line

2014-10-30 Thread Daniel P. Berrange
On Thu, Oct 30, 2014 at 02:28:25PM +0100, Marc-André Lureau wrote:
> On Thu, Oct 30, 2014 at 2:22 PM, Christophe Fergeau 
> wrote:
> 
> > On Thu, Oct 30, 2014 at 02:02:27PM +0100, Marc-André Lureau wrote:
> > > Quoting GNU maintainer manual:
> > > https://www.gnu.org/prep/maintain/html_node/Copyright-Notices.html
> > >
> > > "Alternatively, the ‘(C)’ or C-in-a-circle can be omitted entirely; the
> > > word ‘Copyright’ suffices."
> >
> > The rule which asks for that to be done is:
> > sc_copyright_format:
> > @require='Copyright .*Red 'Hat', Inc\.' \
> > containing='Copyright .*Red 'Hat\
> > halt='Red Hat copyright is missing Inc.'\
> >   $(_sc_search_regexp)
> > @prohibit='Copyright [^(].*Red 'Hat \
> > halt='consistently use (C) in Red Hat copyright'\
> >   $(_sc_search_regexp)
> > @prohibit='\'\
> > halt='spell Red Hat as two words'   \
> >   $(_sc_search_regexp)
> >
> > I don't know if Red Hat legal department insists on the (C) being present.
> > I can reword the commit log to explicit it's only being enforced for Red
> > Hat's
> > copyright, or I can drop the patch.
> >
> >
> It might be specified by Red Hat legal somewhere, but then I wonder why
> there wouldn't be checks for that (in RH builds checks), so it's probably
> unneeded.

This syntax-check rule isn't about enforcing a legal requirement
but rather ensuring that we use a consist copyright header across
all source files. 

Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc :|
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] [spice-gtk 03/11] Add missing (C) to copyright line

2014-10-30 Thread Marc-André Lureau
On Thu, Oct 30, 2014 at 2:22 PM, Christophe Fergeau 
wrote:

> On Thu, Oct 30, 2014 at 02:02:27PM +0100, Marc-André Lureau wrote:
> > Quoting GNU maintainer manual:
> > https://www.gnu.org/prep/maintain/html_node/Copyright-Notices.html
> >
> > "Alternatively, the ‘(C)’ or C-in-a-circle can be omitted entirely; the
> > word ‘Copyright’ suffices."
>
> The rule which asks for that to be done is:
> sc_copyright_format:
> @require='Copyright .*Red 'Hat', Inc\.' \
> containing='Copyright .*Red 'Hat\
> halt='Red Hat copyright is missing Inc.'\
>   $(_sc_search_regexp)
> @prohibit='Copyright [^(].*Red 'Hat \
> halt='consistently use (C) in Red Hat copyright'\
>   $(_sc_search_regexp)
> @prohibit='\'\
> halt='spell Red Hat as two words'   \
>   $(_sc_search_regexp)
>
> I don't know if Red Hat legal department insists on the (C) being present.
> I can reword the commit log to explicit it's only being enforced for Red
> Hat's
> copyright, or I can drop the patch.
>
>
It might be specified by Red Hat legal somewhere, but then I wonder why
there wouldn't be checks for that (in RH builds checks), so it's probably
unneeded.



-- 
Marc-André Lureau
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] [spice-gtk 03/11] Add missing (C) to copyright line

2014-10-30 Thread Christophe Fergeau
On Thu, Oct 30, 2014 at 02:02:27PM +0100, Marc-André Lureau wrote:
> Quoting GNU maintainer manual:
> https://www.gnu.org/prep/maintain/html_node/Copyright-Notices.html
> 
> "Alternatively, the ‘(C)’ or C-in-a-circle can be omitted entirely; the
> word ‘Copyright’ suffices."

The rule which asks for that to be done is:
sc_copyright_format:
@require='Copyright .*Red 'Hat', Inc\.' \
containing='Copyright .*Red 'Hat\
halt='Red Hat copyright is missing Inc.'\
  $(_sc_search_regexp)
@prohibit='Copyright [^(].*Red 'Hat \
halt='consistently use (C) in Red Hat copyright'\
  $(_sc_search_regexp)
@prohibit='\'\
halt='spell Red Hat as two words'   \
  $(_sc_search_regexp)

I don't know if Red Hat legal department insists on the (C) being present.
I can reword the commit log to explicit it's only being enforced for Red Hat's
copyright, or I can drop the patch.

Christophe


pgpHZlR8wS5ZS.pgp
Description: PGP signature
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] [spice-gtk 10/11] Replace tabs with 8 spaces in source files

2014-10-30 Thread Christophe Fergeau
On Thu, Oct 30, 2014 at 02:08:32PM +0100, Marc-André Lureau wrote:
> I would rather not do that massive tab cleanup, because it is a pain in
> reading history with git blame.

Well, it's a one off pain as then new tabs should not be introduced,
and this just adds one extra step when using git annotate. This avoids
having to cope with mixed tabs/spaces in the future, so worth it imo.
Not really important, it's easy to skip that test in make syntax-check,
I'll disable it.

Christophe


> 
> On Thu, Oct 30, 2014 at 1:56 PM, Christophe Fergeau 
> wrote:
> 
> > Some source files inconsistently use space VS tabs. Most of the codebase
> > uses 8 spaces for indentation, this commit changes the remaining tabs to
> > spaces.
> > ---
> >  gtk/channel-display.h|   2 +-
> >  gtk/channel-main.c   |  14 +-
> >  gtk/channel-record.h |   2 +-
> >  gtk/continuation.c   |  66 -
> >  gtk/continuation.h   |  18 +--
> >  gtk/controller/namedpipe.c   |  14 +-
> >  gtk/controller/namedpipeconnection.c |   6 +-
> >  gtk/coroutine.h  |  24 ++--
> >  gtk/coroutine_gthread.c  | 166 +++
> >  gtk/coroutine_ucontext.c | 106 +++
> >  gtk/coroutine_winfibers.c|  98 +++---
> >  gtk/gio-coroutine.c  |  10 +-
> >  gtk/glib-compat.c|   2 +-
> >  gtk/glib-compat.h|   6 +-
> >  gtk/spice-audio.h|   6 +-
> >  gtk/spice-channel.c  |   2 +-
> >  gtk/spice-grabsequence.c |  94 ++---
> >  gtk/spice-grabsequence.h |   6 +-
> >  gtk/spice-gtk-session.c  |   6 +-
> >  gtk/spice-session.c  |  36 ++---
> >  gtk/spice-util.c |   2 +-
> >  gtk/spice-widget.h   |   8 +-
> >  gtk/spicy-screenshot.c   |   4 +-
> >  gtk/spicy.c  |  12 +-
> >  gtk/vncdisplaykeymap.c   | 250
> > +--
> >  25 files changed, 480 insertions(+), 480 deletions(-)
> >
> > diff --git a/gtk/channel-display.h b/gtk/channel-display.h
> > index 88e60d9..10c2813 100644
> > --- a/gtk/channel-display.h
> > +++ b/gtk/channel-display.h
> > @@ -93,7 +93,7 @@ struct _SpiceDisplayChannelClass {
> >  /*< private >*/
> >  };
> >
> > -GType  spice_display_channel_get_type(void);
> > +GType   spice_display_channel_get_type(void);
> >  gbooleanspice_display_get_primary(SpiceChannel *channel, guint32
> > surface_id,
> >SpiceDisplayPrimary *primary);
> >
> > diff --git a/gtk/channel-main.c b/gtk/channel-main.c
> > index 1ad090f..14899b9 100644
> > --- a/gtk/channel-main.c
> > +++ b/gtk/channel-main.c
> > @@ -256,13 +256,13 @@ static void spice_main_get_property(GObject
> > *object,
> >  switch (prop_id) {
> >  case PROP_MOUSE_MODE:
> >  g_value_set_int(value, c->mouse_mode);
> > -   break;
> > +break;
> >  case PROP_AGENT_CONNECTED:
> >  g_value_set_boolean(value, c->agent_connected);
> > -   break;
> > +break;
> >  case PROP_AGENT_CAPS_0:
> >  g_value_set_int(value, c->agent_caps[0]);
> > -   break;
> > +break;
> >  case PROP_DISPLAY_DISABLE_WALLPAPER:
> >  g_value_set_boolean(value, c->display_disable_wallpaper);
> >  break;
> > @@ -285,8 +285,8 @@ static void spice_main_get_property(GObject*object,
> >  g_value_set_int(value, spice_main_get_max_clipboard(self));
> >  break;
> >  default:
> > -   G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
> > -   break;
> > +G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
> > +break;
> >  }
> >  }
> >
> > @@ -322,8 +322,8 @@ static void spice_main_set_property(GObject *gobject,
> > guint prop_id,
> >  spice_main_set_max_clipboard(self, g_value_get_int(value));
> >  break;
> >  default:
> > -   G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, pspec);
> > -   break;
> > +G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, pspec);
> > +break;
> >  }
> >  }
> >
> > diff --git a/gtk/channel-record.h b/gtk/channel-record.h
> > index 20a9ad3..31c0f7b 100644
> > --- a/gtk/channel-record.h
> > +++ b/gtk/channel-record.h
> > @@ -68,7 +68,7 @@ struct _SpiceRecordChannelClass {
> >  /* Do not add fields to this struct */
> >  };
> >
> > -GType  spice_record_channel_get_type(void);
> > +GType   spice_record_channel_get_type(void);
> >  voidspice_record_send_data(SpiceRecordChannel *channel,
> > gpointer data,
> > gsize bytes, guint32 time);
> >
> > diff --git a/gtk/continuation.c b/gtk/continuation.c
> > index adce858..3c348a9 100644
> > --- a/gtk/continuation.c
> > ++

Re: [Spice-devel] [spice-gtk 05/11] Remove trailing whitespace

2014-10-30 Thread Marc-André Lureau
ack

On Thu, Oct 30, 2014 at 1:56 PM, Christophe Fergeau 
wrote:

> ---
>  gtk/decode-glz-tmpl.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/gtk/decode-glz-tmpl.c b/gtk/decode-glz-tmpl.c
> index ab09bba..b337a8b 100644
> --- a/gtk/decode-glz-tmpl.c
> +++ b/gtk/decode-glz-tmpl.c
> @@ -133,7 +133,7 @@
>  out->b = (out->b << 3) | ((out->b >> 2) & 0x07);
>  \
>  out->pad = 0;
>   \
>  out++;
>  \
> -}
> +}
>  #endif
>  #endif
>
> --
> 2.1.0
>
> ___
> Spice-devel mailing list
> Spice-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
>



-- 
Marc-André Lureau
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] [spice-gtk 04/11] Remove blank lines at end of files

2014-10-30 Thread Marc-André Lureau
On Thu, Oct 30, 2014 at 1:59 PM, Marc-André Lureau <
marcandre.lur...@gmail.com> wrote:

> In general, I am against this kind of cleanups which make git blame harder
> to use, but here it is small enough, so why not?


ok this patch is actually just removing lines (I thought it was also
trailing whitespace)


-- 
Marc-André Lureau
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] [spice-gtk 09/11] Always use #include "config.h"

2014-10-30 Thread Marc-André Lureau
ack

On Thu, Oct 30, 2014 at 1:56 PM, Christophe Fergeau 
wrote:

> gnulib 'make syntax-check' prohibits use of #ifdef HAVE_CONFIG_H so this
> commit removes it from where it's used. It also makes sure we always use
> the same syntax for including config.h (#include "config.h" VS #include
> ) as a consistent way of doing that is expected.
> ---
>  gtk/channel-display.c| 2 --
>  gtk/continuation.c   | 2 +-
>  gtk/controller/dump.c| 2 --
>  gtk/controller/namedpipe.c   | 2 +-
>  gtk/controller/namedpipeconnection.c | 2 +-
>  gtk/controller/namedpipelistener.c   | 2 +-
>  gtk/controller/spice-controller-listener.c   | 1 +
>  gtk/controller/spice-foreign-menu-listener.c | 1 +
>  gtk/controller/test.c| 2 --
>  gtk/controller/win32-util.c  | 2 +-
>  gtk/coroutine_gthread.c  | 2 +-
>  gtk/coroutine_ucontext.c | 2 +-
>  gtk/coroutine_winfibers.c| 2 +-
>  gtk/smartcard-manager-priv.h | 2 --
>  gtk/spice-audio.c| 2 --
>  gtk/spice-channel-priv.h | 2 --
>  gtk/spice-client-glib-usb-acl-helper.c   | 4 +---
>  gtk/spice-client-gtk-module.c| 1 +
>  gtk/spice-cmdline.c  | 4 +---
>  gtk/spice-grabsequence.c | 2 +-
>  gtk/spice-gstaudio.c | 2 --
>  gtk/spice-option.c   | 4 +---
>  gtk/spice-util.c | 4 +---
>  gtk/spice-widget-priv.h  | 2 --
>  gtk/spicy-screenshot.c   | 4 +---
>  gtk/spicy-stats.c| 4 +---
>  gtk/spicy.c  | 4 +---
>  gtk/usbutil.c| 4 +---
>  gtk/win-usb-dev.c| 2 --
>  gtk/win-usb-driver-install.c | 2 --
>  30 files changed, 20 insertions(+), 53 deletions(-)
>
> diff --git a/gtk/channel-display.c b/gtk/channel-display.c
> index 1e1312c..940a5a7 100644
> --- a/gtk/channel-display.c
> +++ b/gtk/channel-display.c
> @@ -15,9 +15,7 @@
> 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
>
>  #ifdef HAVE_SYS_TYPES_H
>  #include 
> diff --git a/gtk/continuation.c b/gtk/continuation.c
> index e33d05a..adce858 100644
> --- a/gtk/continuation.c
> +++ b/gtk/continuation.c
> @@ -17,7 +17,7 @@
>   * License along with this library; if not, write to the Free Software
>   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
> 02110-1301 USA
>   */
> -#include 
> +#include "config.h"
>
>  /* keep this above system headers, but below config.h */
>  #ifdef _FORTIFY_SOURCE
> diff --git a/gtk/controller/dump.c b/gtk/controller/dump.c
> index 5e951df..831a1d7 100644
> --- a/gtk/controller/dump.c
> +++ b/gtk/controller/dump.c
> @@ -13,9 +13,7 @@
>  /* 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 
>  #include 
> diff --git a/gtk/controller/namedpipe.c b/gtk/controller/namedpipe.c
> index 6859770..5312218 100644
> --- a/gtk/controller/namedpipe.c
> +++ b/gtk/controller/namedpipe.c
> @@ -14,7 +14,7 @@
> 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/>.
>  */
> -
> +#include "config.h"
>  #include "namedpipe.h"
>
>  #include 
> diff --git a/gtk/controller/namedpipeconnection.c
> b/gtk/controller/namedpipeconnection.c
> index 1e84e9f..3173b61 100644
> --- a/gtk/controller/namedpipeconnection.c
> +++ b/gtk/controller/namedpipeconnection.c
> @@ -14,7 +14,7 @@
> 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/>.
>  */
> -
> +#include "config.h"
>  #include "namedpipeconnection.h"
>
>  #include 
> diff --git a/gtk/controller/namedpipelistener.c
> b/gtk/controller/namedpipelistener.c
> index 28b2a4d..820c606 100644
> --- a/gtk/controller/namedpipelistener.c
> +++ b/gtk/controller/namedpipelistener.c
> @@ -14,7 +14,7 @@
> 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/>.
>  */
> -
> +#include "config.h"
>  #include "namedpipelistener.h"
>
>  #include 
> diff --git a/gtk/controller/spice-controller-listener.c
> b/gtk/controller/spice-controller-listener.c
> index 0189848..98baf33 100644
> --- a/gtk/controller/spice-controller-listener.c
> +++ b/gtk/controller/spice-controller-listener.c
> @@ -15,6 +15,7 @

Re: [Spice-devel] [spice-gtk 07/11] Fix "can not" typo in comment

2014-10-30 Thread Marc-André Lureau
ack

On Thu, Oct 30, 2014 at 1:56 PM, Christophe Fergeau 
wrote:

> ---
>  gtk/usb-device-widget.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/gtk/usb-device-widget.c b/gtk/usb-device-widget.c
> index 69c74b3..74862ee 100644
> --- a/gtk/usb-device-widget.c
> +++ b/gtk/usb-device-widget.c
> @@ -373,7 +373,7 @@ static void check_can_redirect(GtkWidget *widget,
> gpointer user_data)
>  device,
> &err);
>  gtk_widget_set_sensitive(widget, can_redirect);
>
> -/* If we can not redirect this device, append the error message to
> +/* If we cannot redirect this device, append the error message to
> err_msg, but only if it is *not* already there! */
>  if (!can_redirect) {
>  if (priv->err_msg) {
> --
> 2.1.0
>
> ___
> Spice-devel mailing list
> Spice-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
>



-- 
Marc-André Lureau
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] [spice-gtk 08/11] Remove spice-mime.xml/spicy.desktop

2014-10-30 Thread Marc-André Lureau
ack

On Thu, Oct 30, 2014 at 1:56 PM, Christophe Fergeau 
wrote:

> They were never translated from .in files to actual files, and now it's
> clear we don't want to promote spicy as a first-class desktop
> application.
> ---
>  configure.ac |  1 -
>  data/Makefile.am | 20 
>  data/spice-mime.xml.in   |  8 
>  data/spicy.desktop.in.in | 10 --
>  po/POTFILES.in   |  2 --
>  5 files changed, 41 deletions(-)
>  delete mode 100644 data/spice-mime.xml.in
>  delete mode 100644 data/spicy.desktop.in.in
>
> diff --git a/configure.ac b/configure.ac
> index 8bec7a1..6b8bff9 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -734,7 +734,6 @@ spice-client-gtk-2.0.pc
>  spice-client-gtk-3.0.pc
>  spice-controller.pc
>  data/Makefile
> -data/spicy.desktop.in
>  data/spicy.nsis
>  po/Makefile.in
>  gtk/Makefile
> diff --git a/data/Makefile.am b/data/Makefile.am
> index 71934af..a289c23 100644
> --- a/data/Makefile.am
> +++ b/data/Makefile.am
> @@ -1,33 +1,13 @@
>  NULL=
>
> -# TODO: not sure if we want to do that
> -#desktopdir   = $(datadir)/applications
> -#desktop_in_files = spicy.desktop.in
> -#desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
> -#@INTLTOOL_DESKTOP_RULE@
> -#
> -#MIMEFILES = spice-mime.xml.in
> -#mimedir = $(datadir)/mime/packages
> -#mime_DATA = spice-mime.xml
> -#@INTLTOOL_XML_RULE@
> -
>  EXTRA_DIST =   \
> spicy.nsis  \
> -   spice-mime.xml.in spicy.desktop.in  \
> spice-protocol.vapi \
> gtkrc   \
> $(desktop_in_files) \
> org.spice-space.lowlevelusbaccess.policy \
> $(NULL)
>
> -CLEANFILES =   \
> -   $(desktop_DATA) \
> -   $(NULL)
> -
> -DISTCLEANFILES =   \
> -   $(desktop_DATA) \
> -   $(NULL)
> -
>  vapidir = $(VAPIDIR)
>  vapi_DATA = spice-protocol.vapi
>
> diff --git a/data/spice-mime.xml.in b/data/spice-mime.xml.in
> deleted file mode 100644
> index 3bfd575..000
> --- a/data/spice-mime.xml.in
> +++ /dev/null
> @@ -1,8 +0,0 @@
> -
> -http://www.freedesktop.org/standards/shared-mime-info";>
> -   
> -   
> -   <_comment>Remote Desktop (SPICE) file
> -   
> -   
> -
> diff --git a/data/spicy.desktop.in.in b/data/spicy.desktop.in.in
> deleted file mode 100644
> index b2e5b30..000
> --- a/data/spicy.desktop.in.in
> +++ /dev/null
> @@ -1,10 +0,0 @@
> -[Desktop Entry]
> -_Name=SPICE Remote Desktop Viewer
> -_Comment=Access remote SPICE desktops
> -Exec=spicy
> -#Icon=spice
> -Terminal=false
> -MimeType=x-scheme-handler/spice
> -Type=Application
> -StartupNotify=true
> -Categories=GNOME;GTK;Network;RemoteAccess;
> diff --git a/po/POTFILES.in b/po/POTFILES.in
> index 3375ab5..d7bf614 100644
> --- a/po/POTFILES.in
> +++ b/po/POTFILES.in
> @@ -1,5 +1,3 @@
> -data/spice-mime.xml.in
> -data/spicy.desktop.in.in
>  gtk/channel-usbredir.c
>  gtk/desktop-integration.c
>  gtk/spice-channel.c
> --
> 2.1.0
>
> ___
> Spice-devel mailing list
> Spice-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
>



-- 
Marc-André Lureau
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] [spice-gtk 06/11] Remove redundant use of const

2014-10-30 Thread Marc-André Lureau
ack

On Thu, Oct 30, 2014 at 1:56 PM, Christophe Fergeau 
wrote:

> const guint16 const * has one extra 'const' which is removed by that
> commit
> ---
>  gtk/spice-widget-priv.h | 2 +-
>  gtk/vncdisplaykeymap.c  | 6 +++---
>  gtk/vncdisplaykeymap.h  | 4 ++--
>  3 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/gtk/spice-widget-priv.h b/gtk/spice-widget-priv.h
> index 597ce10..8be0644 100644
> --- a/gtk/spice-widget-priv.h
> +++ b/gtk/spice-widget-priv.h
> @@ -104,7 +104,7 @@ struct _SpiceDisplayPrivate {
>  boolkeyboard_grab_active;
>  boolkeyboard_have_focus;
>
> -const guint16 const *keycode_map;
> +const guint16  *keycode_map;
>  size_t  keycode_maplen;
>  uint32_tkey_state[512 / 32];
>  int key_delayed_scancode;
> diff --git a/gtk/vncdisplaykeymap.c b/gtk/vncdisplaykeymap.c
> index b2da5e5..340a86f 100644
> --- a/gtk/vncdisplaykeymap.c
> +++ b/gtk/vncdisplaykeymap.c
> @@ -158,8 +158,8 @@ static gboolean check_for_xquartz(GdkDisplay *dpy)
>  }
>  #endif
>
> -const guint16 const *vnc_display_keymap_gdk2xtkbd_table(GdkWindow *window,
> -size_t *maplen)
> +const guint16 *vnc_display_keymap_gdk2xtkbd_table(GdkWindow *window,
> +  size_t *maplen)
>  {
>  #ifdef GDK_WINDOWING_X11
> if (GDK_IS_X11_WINDOW(window)) {
> @@ -262,7 +262,7 @@ const guint16 const
> *vnc_display_keymap_gdk2xtkbd_table(GdkWindow *window,
> return NULL;
>  }
>
> -guint16 vnc_display_keymap_gdk2xtkbd(const guint16 const *keycode_map,
> +guint16 vnc_display_keymap_gdk2xtkbd(const guint16 *keycode_map,
>  size_t keycode_maplen,
>  guint16 keycode)
>  {
> diff --git a/gtk/vncdisplaykeymap.h b/gtk/vncdisplaykeymap.h
> index 3cb2abb..3ec55d5 100644
> --- a/gtk/vncdisplaykeymap.h
> +++ b/gtk/vncdisplaykeymap.h
> @@ -24,8 +24,8 @@
>
>  #include 
>
> -const guint16 const *vnc_display_keymap_gdk2xtkbd_table(GdkWindow *window,
> -size_t *maplen);
> +const guint16 *vnc_display_keymap_gdk2xtkbd_table(GdkWindow *window,
> +  size_t *maplen);
>  guint16 vnc_display_keymap_gdk2xtkbd(const guint16 *keycode_map,
>   size_t keycode_maplen,
>   guint16 keycode);
> --
> 2.1.0
>
> ___
> Spice-devel mailing list
> Spice-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
>



-- 
Marc-André Lureau
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] [spice-gtk 03/11] Add missing (C) to copyright line

2014-10-30 Thread Marc-André Lureau
Quoting GNU maintainer manual:
https://www.gnu.org/prep/maintain/html_node/Copyright-Notices.html

"Alternatively, the ‘(C)’ or C-in-a-circle can be omitted entirely; the
word ‘Copyright’ suffices."

On Thu, Oct 30, 2014 at 1:56 PM, Christophe Fergeau 
wrote:

> ---
>  gtk/channel-usbredir.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/gtk/channel-usbredir.c b/gtk/channel-usbredir.c
> index a52476a..5238566 100644
> --- a/gtk/channel-usbredir.c
> +++ b/gtk/channel-usbredir.c
> @@ -1,6 +1,6 @@
>  /* -*- Mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */
>  /*
> -   Copyright 2010-2012 Red Hat, Inc.
> +   Copyright (C) 2010-2012 Red Hat, Inc.
>
> Red Hat Authors:
> Hans de Goede 
> --
> 2.1.0
>
> ___
> Spice-devel mailing list
> Spice-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
>



-- 
Marc-André Lureau
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] [spice-gtk 02/11] Add quoting around AC_DEFINE* first argument

2014-10-30 Thread Marc-André Lureau
ack

On Thu, Oct 30, 2014 at 1:56 PM, Christophe Fergeau 
wrote:

> ---
>  configure.ac | 28 ++--
>  1 file changed, 14 insertions(+), 14 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index c2faedc..8bec7a1 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -285,7 +285,7 @@ else
>fi
>  fi
>  AS_IF([test "x$have_phodav" = "xyes"],
> -   AC_DEFINE(USE_PHODAV, [1], [Define if supporting phodav]))
> +   AC_DEFINE([USE_PHODAV], [1], [Define if supporting phodav]))
>
>  AC_ARG_WITH([audio],
>AS_HELP_STRING([--with-audio=@<:@gstreamer/pulse/auto/no@:>@], [Select
> audio backend @<:@default=auto@:>@]),
> @@ -360,7 +360,7 @@ if test "x$enable_smartcard" != "xno"; then
>  AC_MSG_ERROR("Smartcard support requested but libcacard could not be
> found")
>fi
>if test "x$have_smartcard" = "xyes"; then
> -AC_DEFINE(USE_SMARTCARD, [1], [Define if supporting smartcard
> proxying])
> +AC_DEFINE([USE_SMARTCARD], [1], [Define if supporting smartcard
> proxying])
>fi
>  fi
>  AM_CONDITIONAL([WITH_SMARTCARD], [test "x$have_smartcard" = "xyes"])
> @@ -394,7 +394,7 @@ else
>  PKG_CHECK_MODULES([LIBUSB_HOTPLUG], [libusb-1.0 >= 1.0.16],
>[have_libusb_hotplug=yes], [have_libusb_hotplug=no])
>  if test "x$have_libusb_hotplug" = "xyes"; then
> -  AC_DEFINE(USE_LIBUSB_HOTPLUG, [1], [Define if libusb has hotplug
> support])
> +  AC_DEFINE([USE_LIBUSB_HOTPLUG], [1], [Define if libusb has hotplug
> support])
>with_usbredir_hotplug="with libusb hotplug"
>  else
>PKG_CHECK_MODULES([GUDEV],
> @@ -406,7 +406,7 @@ else
>  AC_MSG_ERROR([usbredir requested but required gudev is not
> available])
>fi
>if test "x$have_gudev" = "xyes"; then
> -AC_DEFINE(USE_GUDEV, [1], [Define if supporting gudev])
> +AC_DEFINE([USE_GUDEV], [1], [Define if supporting gudev])
>  with_usbredir_hotplug="with gudev hotplug"
>else
>  have_usbredir=no
> @@ -415,7 +415,7 @@ else
>fi
>
>if test "x$have_usbredir" = "xyes"; then
> -AC_DEFINE(USE_USBREDIR, [1], [Define if supporting usbredir proxying])
> +AC_DEFINE([USE_USBREDIR], [1], [Define if supporting usbredir
> proxying])
>fi
>  fi
>  AM_CONDITIONAL([WITH_USBREDIR], [test "x$have_usbredir" = "xyes"])
> @@ -438,16 +438,16 @@ if test "x$have_usbredir" = "xyes" && test
> "x$enable_polkit" != "xno"; then
>
>if test "x$have_polkit" = "xyes"; then
>  AC_SUBST(ACL_LIBS)
> -AC_DEFINE(USE_POLKIT, [1], [Define if supporting polkit])
> +AC_DEFINE([USE_POLKIT], [1], [Define if supporting polkit])
>fi
>AM_CONDITIONAL([WITH_POLKIT], [test "x$have_polkit" = "xyes"])
>POLICYDIR=`${PKG_CONFIG} polkit-gobject-1 --variable=policydir`
>AC_SUBST(POLICYDIR)
># Check for polkit_authority_get_sync()
>AC_CHECK_LIB([polkit-gobject-1], [polkit_authority_get_sync],
> ac_have_pk_auth_get_sync="1", ac_have_pk_auth_get_sync="0")
> -  AC_DEFINE_UNQUOTED(HAVE_POLKIT_AUTHORITY_GET_SYNC,
> $ac_have_pk_auth_get_sync, [Define if you have a polkit with
> polkit_authority_get_sync()])
> +  AC_DEFINE_UNQUOTED([HAVE_POLKIT_AUTHORITY_GET_SYNC],
> $ac_have_pk_auth_get_sync, [Define if you have a polkit with
> polkit_authority_get_sync()])
>AC_CHECK_LIB([polkit-gobject-1],
> [polkit_authorization_result_get_dismissed],
> ac_have_pk_authorization_result_get_dismissed="1",
> ac_have_pk_authorization_result_get_dismissed="0")
> -  AC_DEFINE_UNQUOTED(HAVE_POLKIT_AUTHORIZATION_RESULT_GET_DISMISSED,
> $ac_have_pk_authorization_result_get_dismissed, [Define if you have a
> polkit with polkit_authorization_result_get_dismissed()])
> +  AC_DEFINE_UNQUOTED([HAVE_POLKIT_AUTHORIZATION_RESULT_GET_DISMISSED],
> $ac_have_pk_authorization_result_get_dismissed, [Define if you have a
> polkit with polkit_authorization_result_get_dismissed()])
>  else
>AM_CONDITIONAL(WITH_POLKIT, false)
>  fi
> @@ -508,7 +508,7 @@ fi
>  if test -n "$USB_IDS"; then
>AC_MSG_RESULT([$USB_IDS])
>AC_SUBST(USB_IDS)
> -  AC_DEFINE(WITH_USBIDS, [1], [Define if compiling with usb.ids support])
> +  AC_DEFINE([WITH_USBIDS], [1], [Define if compiling with usb.ids
> support])
>  else
>AC_MSG_RESULT([not found])
>  fi
> @@ -549,13 +549,13 @@ case $with_coroutine in
>*) AC_MSG_ERROR(Unsupported coroutine type)
>  esac
>
> -AC_DEFINE_UNQUOTED(WITH_UCONTEXT,[$WITH_UCONTEXT], [Whether to use
> ucontext coroutine impl])
> +AC_DEFINE_UNQUOTED([WITH_UCONTEXT],[$WITH_UCONTEXT], [Whether to use
> ucontext coroutine impl])
>  AM_CONDITIONAL(WITH_UCONTEXT, [test "x$WITH_UCONTEXT" = "x1"])
>
> -AC_DEFINE_UNQUOTED(WITH_WINFIBER,[$WITH_WINFIBER], [Whether to use fiber
> coroutine impl])
> +AC_DEFINE_UNQUOTED([WITH_WINFIBER],[$WITH_WINFIBER], [Whether to use
> fiber coroutine impl])
>  AM_CONDITIONAL(WITH_WINFIBER, [test "x$WITH_WINFIBER" = "x1"])
>
> -AC_DEFINE_UNQUOTED(WITH_GTHREAD,[$WITH_GTHREAD], [Whether to use gthread
> coroutine impl])

Re: [Spice-devel] [spice-gtk 04/11] Remove blank lines at end of files

2014-10-30 Thread Marc-André Lureau
In general, I am against this kind of cleanups which make git blame harder
to use, but here it is small enough, so why not?

ack

On Thu, Oct 30, 2014 at 1:56 PM, Christophe Fergeau 
wrote:

> ---
>  TODO   | 1 -
>  doc/reference/spice-gtk.types  | 2 +-
>  gtk/controller/dump.c  | 1 -
>  gtk/controller/namedpipelistener.h | 1 -
>  gtk/controller/spice-controller-listener.h | 3 ---
>  gtk/controller/util.vala   | 2 +-
>  gtk/decode-glz-tmpl.c  | 1 -
>  gtk/smartcard-manager.h| 1 -
>  gtk/spice-audio-priv.h | 1 -
>  gtk/spice-channel-enums.h  | 4 
>  gtk/spice-client.c | 1 -
>  11 files changed, 2 insertions(+), 16 deletions(-)
>
> diff --git a/TODO b/TODO
> index 73742ba..34e2c39 100644
> --- a/TODO
> +++ b/TODO
> @@ -5,4 +5,3 @@
>  See also list of bugs open:
>
>
> https://bugs.freedesktop.org/buglist.cgi?product=Spice&component=gtk-client&resolution=---&list_id=281013
> -
> diff --git a/doc/reference/spice-gtk.types b/doc/reference/spice-gtk.types
> index db0374a..acd616d 100644
> --- a/doc/reference/spice-gtk.types
> +++ b/doc/reference/spice-gtk.types
> @@ -44,4 +44,4 @@ spice_usb_device_get_type
>  spice_usb_device_manager_get_type
>  spice_usb_device_widget_get_type
>  spice_port_channel_get_type
> -spice_webdav_channel_get_type
> \ No newline at end of file
> +spice_webdav_channel_get_type
> diff --git a/gtk/controller/dump.c b/gtk/controller/dump.c
> index 306ff3a..5e951df 100644
> --- a/gtk/controller/dump.c
> +++ b/gtk/controller/dump.c
> @@ -118,4 +118,3 @@ int main (int argc, char *argv[])
>
>  return 0;
>  }
> -
> diff --git a/gtk/controller/namedpipelistener.h
> b/gtk/controller/namedpipelistener.h
> index 3084d00..c2dbd0a 100644
> --- a/gtk/controller/namedpipelistener.h
> +++ b/gtk/controller/namedpipelistener.h
> @@ -68,4 +68,3 @@ SpiceNamedPipeConnection *
> spice_named_pipe_listener_accept_finish  (SpiceNamed
>  G_END_DECLS
>
>  #endif /* __NAMED_PIPE_LISTENER_H__ */
> -
> diff --git a/gtk/controller/spice-controller-listener.h
> b/gtk/controller/spice-controller-listener.h
> index fc6ba3d..a50bdea 100644
> --- a/gtk/controller/spice-controller-listener.h
> +++ b/gtk/controller/spice-controller-listener.h
> @@ -45,6 +45,3 @@ GIOStream* spice_controller_listener_accept_finish
> (GObject *listener,
>  G_END_DECLS
>
>  #endif /* __SPICE_CONTROLLER_LISTENER_H__ */
> -
> -
> -
> diff --git a/gtk/controller/util.vala b/gtk/controller/util.vala
> index 16f546c..acd677e 100644
> --- a/gtk/controller/util.vala
> +++ b/gtk/controller/util.vala
> @@ -39,4 +39,4 @@ namespace SpiceCtrl {
> }
> }
>
> -}
> \ No newline at end of file
> +}
> diff --git a/gtk/decode-glz-tmpl.c b/gtk/decode-glz-tmpl.c
> index 63e3a36..ab09bba 100644
> --- a/gtk/decode-glz-tmpl.c
> +++ b/gtk/decode-glz-tmpl.c
> @@ -334,4 +334,3 @@ static size_t FNAME(decode)(SpiceGlzDecoderWindow
> *window,
>  #undef COPY_COMP_PIXEL
>  #undef COPY_PLT_ENTRY
>  #undef CAST_PLT_DISTANCE
> -
> diff --git a/gtk/smartcard-manager.h b/gtk/smartcard-manager.h
> index 698357b..4811083 100644
> --- a/gtk/smartcard-manager.h
> +++ b/gtk/smartcard-manager.h
> @@ -78,4 +78,3 @@ GList
> *spice_smartcard_manager_get_readers(SpiceSmartcardManager *manager);
>  G_END_DECLS
>
>  #endif /* __SPICE_SMARTCARD_MANAGER_H__ */
> -
> diff --git a/gtk/spice-audio-priv.h b/gtk/spice-audio-priv.h
> index 71cc8ed..898c5a7 100644
> --- a/gtk/spice-audio-priv.h
> +++ b/gtk/spice-audio-priv.h
> @@ -32,4 +32,3 @@ struct _SpiceAudioPrivate {
>  G_END_DECLS
>
>  #endif /* __SPICE_AUDIO_PRIVATE_H__ */
> -
> diff --git a/gtk/spice-channel-enums.h b/gtk/spice-channel-enums.h
> index 30bfa51..02df762 100644
> --- a/gtk/spice-channel-enums.h
> +++ b/gtk/spice-channel-enums.h
> @@ -5,7 +5,3 @@
>  #include "spice-glib-enums.h"
>
>  #endif /* SPICE_CHANNEL_ENUMS_H */
> -
> -
> -
> -
> diff --git a/gtk/spice-client.c b/gtk/spice-client.c
> index 4e7242f..5fd511f 100644
> --- a/gtk/spice-client.c
> +++ b/gtk/spice-client.c
> @@ -25,4 +25,3 @@ GQuark spice_client_error_quark(void)
>  {
>  return g_quark_from_static_string("spice-client-error-quark");
>  }
> -
> --
> 2.1.0
>
> ___
> Spice-devel mailing list
> Spice-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
>



-- 
Marc-André Lureau
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] [spice-gtk 01/11] build-sys: Don't use test -a/-o

2014-10-30 Thread Marc-André Lureau
ack

On Thu, Oct 30, 2014 at 1:56 PM, Christophe Fergeau 
wrote:

> They are not portable, it's recommended to use test && test or test ||
> test instead
> ---
>  configure.ac | 8 
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index f47ee20..c2faedc 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -121,7 +121,7 @@ SASL_CFLAGS=
>  SASL_LIBS=
>  enable_sasl=no
>  if test "x$with_sasl" != "xno"; then
> -  if test "x$with_sasl" != "xyes" -a "x$with_sasl" != "xauto"; then
> +  if test "x$with_sasl" != "xyes" && test "x$with_sasl" != "xauto"; then
>  SASL_CFLAGS="-I$with_sasl"
>  SASL_LIBS="-L$with_sasl"
>fi
> @@ -133,7 +133,7 @@ if test "x$with_sasl" != "xno"; then
>if test "x$with_sasl" = "xyes" ; then
>  AC_CHECK_LIB([sasl2],
> [sasl_client_init],[with_sasl2=yes],[with_sasl2=no])
>fi
> -  if test "x$with_sasl2" = "xno" -a "x$with_sasl" = "xyes" ; then
> +  if test "x$with_sasl2" = "xno" && test "x$with_sasl" = "xyes" ; then
>  AC_CHECK_LIB([sasl],
> [sasl_client_init],[with_sasl=yes],[with_sasl=no])
>fi
>if test "x$with_sasl2" = "xyes"; then
> @@ -145,13 +145,13 @@ if test "x$with_sasl" != "xno"; then
>fi
>CFLAGS="$old_cflags"
>LIBS="$old_libs"
> -  if test "x$with_sasl2" = "xyes" -o "x$with_sasl" = "xyes" ; then
> +  if test "x$with_sasl2" = "xyes" || test "x$with_sasl" = "xyes" ; then
>  AC_DEFINE_UNQUOTED([HAVE_SASL], 1,
>[whether Cyrus SASL is available for authentication])
>  enable_sasl=yes
>fi
>  fi
> -AM_CONDITIONAL([HAVE_SASL], [test "x$with_sasl2" = "xyes" -o
> "x$with_sasl" = "xyes"])
> +AM_CONDITIONAL([HAVE_SASL], [test "x$with_sasl2" = "xyes" || test
> "x$with_sasl" = "xyes"])
>  AC_SUBST([SASL_CFLAGS])
>  AC_SUBST([SASL_LIBS])
>
> --
> 2.1.0
>
> ___
> Spice-devel mailing list
> Spice-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
>



-- 
Marc-André Lureau
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] [spice-gtk 09/11] Always use #include "config.h"

2014-10-30 Thread Christophe Fergeau
gnulib 'make syntax-check' prohibits use of #ifdef HAVE_CONFIG_H so this
commit removes it from where it's used. It also makes sure we always use
the same syntax for including config.h (#include "config.h" VS #include
) as a consistent way of doing that is expected.
---
 gtk/channel-display.c| 2 --
 gtk/continuation.c   | 2 +-
 gtk/controller/dump.c| 2 --
 gtk/controller/namedpipe.c   | 2 +-
 gtk/controller/namedpipeconnection.c | 2 +-
 gtk/controller/namedpipelistener.c   | 2 +-
 gtk/controller/spice-controller-listener.c   | 1 +
 gtk/controller/spice-foreign-menu-listener.c | 1 +
 gtk/controller/test.c| 2 --
 gtk/controller/win32-util.c  | 2 +-
 gtk/coroutine_gthread.c  | 2 +-
 gtk/coroutine_ucontext.c | 2 +-
 gtk/coroutine_winfibers.c| 2 +-
 gtk/smartcard-manager-priv.h | 2 --
 gtk/spice-audio.c| 2 --
 gtk/spice-channel-priv.h | 2 --
 gtk/spice-client-glib-usb-acl-helper.c   | 4 +---
 gtk/spice-client-gtk-module.c| 1 +
 gtk/spice-cmdline.c  | 4 +---
 gtk/spice-grabsequence.c | 2 +-
 gtk/spice-gstaudio.c | 2 --
 gtk/spice-option.c   | 4 +---
 gtk/spice-util.c | 4 +---
 gtk/spice-widget-priv.h  | 2 --
 gtk/spicy-screenshot.c   | 4 +---
 gtk/spicy-stats.c| 4 +---
 gtk/spicy.c  | 4 +---
 gtk/usbutil.c| 4 +---
 gtk/win-usb-dev.c| 2 --
 gtk/win-usb-driver-install.c | 2 --
 30 files changed, 20 insertions(+), 53 deletions(-)

diff --git a/gtk/channel-display.c b/gtk/channel-display.c
index 1e1312c..940a5a7 100644
--- a/gtk/channel-display.c
+++ b/gtk/channel-display.c
@@ -15,9 +15,7 @@
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, see .
 */
-#ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
 
 #ifdef HAVE_SYS_TYPES_H
 #include 
diff --git a/gtk/continuation.c b/gtk/continuation.c
index e33d05a..adce858 100644
--- a/gtk/continuation.c
+++ b/gtk/continuation.c
@@ -17,7 +17,7 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 
USA
  */
-#include 
+#include "config.h"
 
 /* keep this above system headers, but below config.h */
 #ifdef _FORTIFY_SOURCE
diff --git a/gtk/controller/dump.c b/gtk/controller/dump.c
index 5e951df..831a1d7 100644
--- a/gtk/controller/dump.c
+++ b/gtk/controller/dump.c
@@ -13,9 +13,7 @@
 /* You should have received a copy of the GNU Lesser General Public */
 /* License along with this library; if not, see 
. */
 
-#ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
 
 #include 
 #include 
diff --git a/gtk/controller/namedpipe.c b/gtk/controller/namedpipe.c
index 6859770..5312218 100644
--- a/gtk/controller/namedpipe.c
+++ b/gtk/controller/namedpipe.c
@@ -14,7 +14,7 @@
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, see .
 */
-
+#include "config.h"
 #include "namedpipe.h"
 
 #include 
diff --git a/gtk/controller/namedpipeconnection.c 
b/gtk/controller/namedpipeconnection.c
index 1e84e9f..3173b61 100644
--- a/gtk/controller/namedpipeconnection.c
+++ b/gtk/controller/namedpipeconnection.c
@@ -14,7 +14,7 @@
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, see .
 */
-
+#include "config.h"
 #include "namedpipeconnection.h"
 
 #include 
diff --git a/gtk/controller/namedpipelistener.c 
b/gtk/controller/namedpipelistener.c
index 28b2a4d..820c606 100644
--- a/gtk/controller/namedpipelistener.c
+++ b/gtk/controller/namedpipelistener.c
@@ -14,7 +14,7 @@
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, see .
 */
-
+#include "config.h"
 #include "namedpipelistener.h"
 
 #include 
diff --git a/gtk/controller/spice-controller-listener.c 
b/gtk/controller/spice-controller-listener.c
index 0189848..98baf33 100644
--- a/gtk/controller/spice-controller-listener.c
+++ b/gtk/controller/spice-controller-listener.c
@@ -15,6 +15,7 @@
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, see .
 */
+#include "config.h"
 
 #include 
 #include 
diff --git a/gtk/controller/spice-foreign-menu-listener.c 
b/gtk/controller/spice-foreign-menu-listener.c
index

[Spice-devel] [spice-gtk 00/11] Add make syntax-check rules

2014-10-30 Thread Christophe Fergeau
Hey,

libvirt and various related projects have a make syntax-check rule which makes
various static check on the source files regarding indentation, formatting,
common coding mistakes, ...
I wanted to add a check that spice-gtk map-file are alphabetically sorted
and mistakenly though that we would get that for free with make syntax-check,
but that's actually unrelated. As most of the cleanups triggered by
make syntax-check errors are useful anyway, I'm sending this series.
The first 10 patches make sure a make syntax-check run is clean, and
the last commit adds the 'syntax-check' make target and the related rules.

Christophe

___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] [spice-gtk 11/11] Add make syntax-check support

2014-10-30 Thread Christophe Fergeau
This is copied and pasted from gnulib, and adds a bunch of static checks
on the format/content of the source files being used. Running make
syntax-check will trigger these checks, and error out if one fails.
cfg.mk can be used to tweak the behaviour of some tests (eg exclude some
files).
---
 GNUmakefile |  132 +
 Makefile.am |3 +
 build-aux/vc-list-files |  113 
 cfg.mk  |  130 
 configure.ac|   11 +
 maint.mk| 1511 +++
 6 files changed, 1900 insertions(+)
 create mode 100644 GNUmakefile
 create mode 100755 build-aux/vc-list-files
 create mode 100644 cfg.mk
 create mode 100644 maint.mk

diff --git a/GNUmakefile b/GNUmakefile
new file mode 100644
index 000..ca88b6b
--- /dev/null
+++ b/GNUmakefile
@@ -0,0 +1,132 @@
+# Having a separate GNUmakefile lets me `include' the dynamically
+# generated rules created via cfg.mk (package-local configuration)
+# as well as maint.mk (generic maintainer rules).
+# This makefile is used only if you run GNU Make.
+# It is necessary if you want to build targets usually of interest
+# only to the maintainer.
+
+# Copyright (C) 2001, 2003, 2006-2011 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program 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 General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see .
+
+# Systems where /bin/sh is not the default shell need this.  The $(shell)
+# command below won't work with e.g. stock DOS/Windows shells.
+ifeq ($(wildcard /bin/s[h]),/bin/sh)
+SHELL = /bin/sh
+else
+# will be used only with the next shell-test line, then overwritten
+# by a configured-in value
+SHELL = sh
+endif
+
+# If the user runs GNU make but has not yet run ./configure,
+# give them a diagnostic.
+_have-Makefile := $(shell test -f Makefile && echo yes)
+ifeq ($(_have-Makefile),yes)
+
+# Make tar archive easier to reproduce.
+export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner
+
+# Allow the user to add to this in the Makefile.
+ALL_RECURSIVE_TARGETS =
+
+include Makefile
+
+# Some projects override e.g., _autoreconf here.
+-include $(srcdir)/cfg.mk
+
+# Allow cfg.mk to override these.
+_build-aux ?= build-aux
+_autoreconf ?= autoreconf -v
+
+include $(srcdir)/maint.mk
+
+# Ensure that $(VERSION) is up to date for dist-related targets, but not
+# for others: rerunning autoreconf and recompiling everything isn't cheap.
+_have-git-version-gen := \
+  $(shell test -f $(srcdir)/$(_build-aux)/git-version-gen && echo yes)
+ifeq ($(_have-git-version-gen)0,yes$(MAKELEVEL))
+  _is-dist-target ?= $(filter-out %clean, \
+$(filter maintainer-% dist% alpha beta stable,$(MAKECMDGOALS)))
+  _is-install-target ?= $(filter-out %check, $(filter 
install%,$(MAKECMDGOALS)))
+  ifneq (,$(_is-dist-target)$(_is-install-target))
+_curr-ver := $(shell cd $(srcdir)  \
+   && $(_build-aux)/git-version-gen\
+ .tarball-version  \
+ $(git-version-gen-tag-sed-script))
+ifneq ($(_curr-ver),$(VERSION))
+  ifeq ($(_curr-ver),UNKNOWN)
+$(info WARNING: unable to verify if $(VERSION) is the correct version)
+  else
+ifneq (,$(_is-install-target))
+  # GNU Coding Standards state that 'make install' should not cause
+  # recompilation after 'make all'.  But as long as changing the 
version
+  # string alters config.h, the cost of having 'make all' always have 
an
+  # up-to-date version is prohibitive.  So, as a compromise, we merely
+  # warn when installing a version string that is out of date; the user
+  # should run 'autoreconf' (or something like 'make distcheck') to
+  # fix the version, 'make all' to propagate it, then 'make install'.
+  $(info WARNING: version string $(VERSION) is out of date;)
+  $(info run '$(MAKE) _version' to fix it)
+else
+  $(info INFO: running autoreconf for new version string: $(_curr-ver))
+GNUmakefile: _version
+   touch GNUmakefile
+endif
+  endif
+endif
+  endif
+endif
+
+.PHONY: _version
+_version:
+   cd $(srcdir) && rm -rf autom4te.cache .version && $(_autoreconf)
+   $(MAKE) $(AM_MAKEFLAGS) Makefile
+
+else
+
+.DEFAULT_GOAL := abort-due-to-no-makefile
+srcdir = .
+
+# The package can override .DEFAULT_GOAL to run actions like autoreconf.
+-include ./cfg.m

[Spice-devel] [spice-gtk 08/11] Remove spice-mime.xml/spicy.desktop

2014-10-30 Thread Christophe Fergeau
They were never translated from .in files to actual files, and now it's
clear we don't want to promote spicy as a first-class desktop
application.
---
 configure.ac |  1 -
 data/Makefile.am | 20 
 data/spice-mime.xml.in   |  8 
 data/spicy.desktop.in.in | 10 --
 po/POTFILES.in   |  2 --
 5 files changed, 41 deletions(-)
 delete mode 100644 data/spice-mime.xml.in
 delete mode 100644 data/spicy.desktop.in.in

diff --git a/configure.ac b/configure.ac
index 8bec7a1..6b8bff9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -734,7 +734,6 @@ spice-client-gtk-2.0.pc
 spice-client-gtk-3.0.pc
 spice-controller.pc
 data/Makefile
-data/spicy.desktop.in
 data/spicy.nsis
 po/Makefile.in
 gtk/Makefile
diff --git a/data/Makefile.am b/data/Makefile.am
index 71934af..a289c23 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -1,33 +1,13 @@
 NULL=
 
-# TODO: not sure if we want to do that
-#desktopdir   = $(datadir)/applications
-#desktop_in_files = spicy.desktop.in
-#desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
-#@INTLTOOL_DESKTOP_RULE@
-#
-#MIMEFILES = spice-mime.xml.in
-#mimedir = $(datadir)/mime/packages
-#mime_DATA = spice-mime.xml
-#@INTLTOOL_XML_RULE@
-
 EXTRA_DIST =   \
spicy.nsis  \
-   spice-mime.xml.in spicy.desktop.in  \
spice-protocol.vapi \
gtkrc   \
$(desktop_in_files) \
org.spice-space.lowlevelusbaccess.policy \
$(NULL)
 
-CLEANFILES =   \
-   $(desktop_DATA) \
-   $(NULL)
-
-DISTCLEANFILES =   \
-   $(desktop_DATA) \
-   $(NULL)
-
 vapidir = $(VAPIDIR)
 vapi_DATA = spice-protocol.vapi
 
diff --git a/data/spice-mime.xml.in b/data/spice-mime.xml.in
deleted file mode 100644
index 3bfd575..000
--- a/data/spice-mime.xml.in
+++ /dev/null
@@ -1,8 +0,0 @@
-
-http://www.freedesktop.org/standards/shared-mime-info";>
-   
-   
-   <_comment>Remote Desktop (SPICE) file
-   
-   
-
diff --git a/data/spicy.desktop.in.in b/data/spicy.desktop.in.in
deleted file mode 100644
index b2e5b30..000
--- a/data/spicy.desktop.in.in
+++ /dev/null
@@ -1,10 +0,0 @@
-[Desktop Entry]
-_Name=SPICE Remote Desktop Viewer
-_Comment=Access remote SPICE desktops
-Exec=spicy
-#Icon=spice
-Terminal=false
-MimeType=x-scheme-handler/spice
-Type=Application
-StartupNotify=true
-Categories=GNOME;GTK;Network;RemoteAccess;
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 3375ab5..d7bf614 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,5 +1,3 @@
-data/spice-mime.xml.in
-data/spicy.desktop.in.in
 gtk/channel-usbredir.c
 gtk/desktop-integration.c
 gtk/spice-channel.c
-- 
2.1.0

___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] [spice-gtk 06/11] Remove redundant use of const

2014-10-30 Thread Christophe Fergeau
const guint16 const * has one extra 'const' which is removed by that
commit
---
 gtk/spice-widget-priv.h | 2 +-
 gtk/vncdisplaykeymap.c  | 6 +++---
 gtk/vncdisplaykeymap.h  | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/gtk/spice-widget-priv.h b/gtk/spice-widget-priv.h
index 597ce10..8be0644 100644
--- a/gtk/spice-widget-priv.h
+++ b/gtk/spice-widget-priv.h
@@ -104,7 +104,7 @@ struct _SpiceDisplayPrivate {
 boolkeyboard_grab_active;
 boolkeyboard_have_focus;
 
-const guint16 const *keycode_map;
+const guint16  *keycode_map;
 size_t  keycode_maplen;
 uint32_tkey_state[512 / 32];
 int key_delayed_scancode;
diff --git a/gtk/vncdisplaykeymap.c b/gtk/vncdisplaykeymap.c
index b2da5e5..340a86f 100644
--- a/gtk/vncdisplaykeymap.c
+++ b/gtk/vncdisplaykeymap.c
@@ -158,8 +158,8 @@ static gboolean check_for_xquartz(GdkDisplay *dpy)
 }
 #endif
 
-const guint16 const *vnc_display_keymap_gdk2xtkbd_table(GdkWindow *window,
-size_t *maplen)
+const guint16 *vnc_display_keymap_gdk2xtkbd_table(GdkWindow *window,
+  size_t *maplen)
 {
 #ifdef GDK_WINDOWING_X11
if (GDK_IS_X11_WINDOW(window)) {
@@ -262,7 +262,7 @@ const guint16 const 
*vnc_display_keymap_gdk2xtkbd_table(GdkWindow *window,
return NULL;
 }
 
-guint16 vnc_display_keymap_gdk2xtkbd(const guint16 const *keycode_map,
+guint16 vnc_display_keymap_gdk2xtkbd(const guint16 *keycode_map,
 size_t keycode_maplen,
 guint16 keycode)
 {
diff --git a/gtk/vncdisplaykeymap.h b/gtk/vncdisplaykeymap.h
index 3cb2abb..3ec55d5 100644
--- a/gtk/vncdisplaykeymap.h
+++ b/gtk/vncdisplaykeymap.h
@@ -24,8 +24,8 @@
 
 #include 
 
-const guint16 const *vnc_display_keymap_gdk2xtkbd_table(GdkWindow *window,
-size_t *maplen);
+const guint16 *vnc_display_keymap_gdk2xtkbd_table(GdkWindow *window,
+  size_t *maplen);
 guint16 vnc_display_keymap_gdk2xtkbd(const guint16 *keycode_map,
  size_t keycode_maplen,
  guint16 keycode);
-- 
2.1.0

___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] [spice-gtk 05/11] Remove trailing whitespace

2014-10-30 Thread Christophe Fergeau
---
 gtk/decode-glz-tmpl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gtk/decode-glz-tmpl.c b/gtk/decode-glz-tmpl.c
index ab09bba..b337a8b 100644
--- a/gtk/decode-glz-tmpl.c
+++ b/gtk/decode-glz-tmpl.c
@@ -133,7 +133,7 @@
 out->b = (out->b << 3) | ((out->b >> 2) & 0x07);   \
 out->pad = 0;  \
 out++; \
-}
+}
 #endif
 #endif
 
-- 
2.1.0

___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] [spice-gtk 10/11] Replace tabs with 8 spaces in source files

2014-10-30 Thread Christophe Fergeau
Some source files inconsistently use space VS tabs. Most of the codebase
uses 8 spaces for indentation, this commit changes the remaining tabs to
spaces.
---
 gtk/channel-display.h|   2 +-
 gtk/channel-main.c   |  14 +-
 gtk/channel-record.h |   2 +-
 gtk/continuation.c   |  66 -
 gtk/continuation.h   |  18 +--
 gtk/controller/namedpipe.c   |  14 +-
 gtk/controller/namedpipeconnection.c |   6 +-
 gtk/coroutine.h  |  24 ++--
 gtk/coroutine_gthread.c  | 166 +++
 gtk/coroutine_ucontext.c | 106 +++
 gtk/coroutine_winfibers.c|  98 +++---
 gtk/gio-coroutine.c  |  10 +-
 gtk/glib-compat.c|   2 +-
 gtk/glib-compat.h|   6 +-
 gtk/spice-audio.h|   6 +-
 gtk/spice-channel.c  |   2 +-
 gtk/spice-grabsequence.c |  94 ++---
 gtk/spice-grabsequence.h |   6 +-
 gtk/spice-gtk-session.c  |   6 +-
 gtk/spice-session.c  |  36 ++---
 gtk/spice-util.c |   2 +-
 gtk/spice-widget.h   |   8 +-
 gtk/spicy-screenshot.c   |   4 +-
 gtk/spicy.c  |  12 +-
 gtk/vncdisplaykeymap.c   | 250 +--
 25 files changed, 480 insertions(+), 480 deletions(-)

diff --git a/gtk/channel-display.h b/gtk/channel-display.h
index 88e60d9..10c2813 100644
--- a/gtk/channel-display.h
+++ b/gtk/channel-display.h
@@ -93,7 +93,7 @@ struct _SpiceDisplayChannelClass {
 /*< private >*/
 };
 
-GType  spice_display_channel_get_type(void);
+GType   spice_display_channel_get_type(void);
 gbooleanspice_display_get_primary(SpiceChannel *channel, guint32 
surface_id,
   SpiceDisplayPrimary *primary);
 
diff --git a/gtk/channel-main.c b/gtk/channel-main.c
index 1ad090f..14899b9 100644
--- a/gtk/channel-main.c
+++ b/gtk/channel-main.c
@@ -256,13 +256,13 @@ static void spice_main_get_property(GObject*object,
 switch (prop_id) {
 case PROP_MOUSE_MODE:
 g_value_set_int(value, c->mouse_mode);
-   break;
+break;
 case PROP_AGENT_CONNECTED:
 g_value_set_boolean(value, c->agent_connected);
-   break;
+break;
 case PROP_AGENT_CAPS_0:
 g_value_set_int(value, c->agent_caps[0]);
-   break;
+break;
 case PROP_DISPLAY_DISABLE_WALLPAPER:
 g_value_set_boolean(value, c->display_disable_wallpaper);
 break;
@@ -285,8 +285,8 @@ static void spice_main_get_property(GObject*object,
 g_value_set_int(value, spice_main_get_max_clipboard(self));
 break;
 default:
-   G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
-   break;
+G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
+break;
 }
 }
 
@@ -322,8 +322,8 @@ static void spice_main_set_property(GObject *gobject, guint 
prop_id,
 spice_main_set_max_clipboard(self, g_value_get_int(value));
 break;
 default:
-   G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, pspec);
-   break;
+G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, pspec);
+break;
 }
 }
 
diff --git a/gtk/channel-record.h b/gtk/channel-record.h
index 20a9ad3..31c0f7b 100644
--- a/gtk/channel-record.h
+++ b/gtk/channel-record.h
@@ -68,7 +68,7 @@ struct _SpiceRecordChannelClass {
 /* Do not add fields to this struct */
 };
 
-GType  spice_record_channel_get_type(void);
+GType   spice_record_channel_get_type(void);
 voidspice_record_send_data(SpiceRecordChannel *channel, gpointer 
data,
gsize bytes, guint32 time);
 
diff --git a/gtk/continuation.c b/gtk/continuation.c
index adce858..3c348a9 100644
--- a/gtk/continuation.c
+++ b/gtk/continuation.c
@@ -35,63 +35,63 @@
  * union is a quick hack to let us do that
  */
 union cc_arg {
-   void *p;
-   int i[2];
+void *p;
+int i[2];
 };
 
 static void continuation_trampoline(int i0, int i1)
 {
-   union cc_arg arg;
-   struct continuation *cc;
-   arg.i[0] = i0;
-   arg.i[1] = i1;
-   cc = arg.p;
+union cc_arg arg;
+struct continuation *cc;
+arg.i[0] = i0;
+arg.i[1] = i1;
+cc = arg.p;
 
-   if (_setjmp(cc->jmp) == 0) {
-   ucontext_t tmp;
-   swapcontext(&tmp, &cc->last);
-   }
+if (_setjmp(cc->jmp) == 0) {
+ucontext_t tmp;
+swapcontext(&tmp, &cc->last);
+}
 
-   cc->entry(cc);
+cc->entry(cc);
 }
 
 void cc_init(struct continuation *cc)
 {
-   volatile union cc_arg arg;
-   arg.p = cc;
-   if (getcontext(&cc->uc) == -1)
-   g_error("getconte

[Spice-devel] [spice-gtk 07/11] Fix "can not" typo in comment

2014-10-30 Thread Christophe Fergeau
---
 gtk/usb-device-widget.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gtk/usb-device-widget.c b/gtk/usb-device-widget.c
index 69c74b3..74862ee 100644
--- a/gtk/usb-device-widget.c
+++ b/gtk/usb-device-widget.c
@@ -373,7 +373,7 @@ static void check_can_redirect(GtkWidget *widget, gpointer 
user_data)
 device, &err);
 gtk_widget_set_sensitive(widget, can_redirect);
 
-/* If we can not redirect this device, append the error message to
+/* If we cannot redirect this device, append the error message to
err_msg, but only if it is *not* already there! */
 if (!can_redirect) {
 if (priv->err_msg) {
-- 
2.1.0

___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] [spice-gtk 02/11] Add quoting around AC_DEFINE* first argument

2014-10-30 Thread Christophe Fergeau
---
 configure.ac | 28 ++--
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/configure.ac b/configure.ac
index c2faedc..8bec7a1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -285,7 +285,7 @@ else
   fi
 fi
 AS_IF([test "x$have_phodav" = "xyes"],
-   AC_DEFINE(USE_PHODAV, [1], [Define if supporting phodav]))
+   AC_DEFINE([USE_PHODAV], [1], [Define if supporting phodav]))
 
 AC_ARG_WITH([audio],
   AS_HELP_STRING([--with-audio=@<:@gstreamer/pulse/auto/no@:>@], [Select audio 
backend @<:@default=auto@:>@]),
@@ -360,7 +360,7 @@ if test "x$enable_smartcard" != "xno"; then
 AC_MSG_ERROR("Smartcard support requested but libcacard could not be 
found")
   fi
   if test "x$have_smartcard" = "xyes"; then
-AC_DEFINE(USE_SMARTCARD, [1], [Define if supporting smartcard proxying])
+AC_DEFINE([USE_SMARTCARD], [1], [Define if supporting smartcard proxying])
   fi
 fi
 AM_CONDITIONAL([WITH_SMARTCARD], [test "x$have_smartcard" = "xyes"])
@@ -394,7 +394,7 @@ else
 PKG_CHECK_MODULES([LIBUSB_HOTPLUG], [libusb-1.0 >= 1.0.16],
   [have_libusb_hotplug=yes], [have_libusb_hotplug=no])
 if test "x$have_libusb_hotplug" = "xyes"; then
-  AC_DEFINE(USE_LIBUSB_HOTPLUG, [1], [Define if libusb has hotplug 
support])
+  AC_DEFINE([USE_LIBUSB_HOTPLUG], [1], [Define if libusb has hotplug 
support])
   with_usbredir_hotplug="with libusb hotplug"
 else
   PKG_CHECK_MODULES([GUDEV],
@@ -406,7 +406,7 @@ else
 AC_MSG_ERROR([usbredir requested but required gudev is not available])
   fi
   if test "x$have_gudev" = "xyes"; then
-AC_DEFINE(USE_GUDEV, [1], [Define if supporting gudev])
+AC_DEFINE([USE_GUDEV], [1], [Define if supporting gudev])
 with_usbredir_hotplug="with gudev hotplug"
   else
 have_usbredir=no
@@ -415,7 +415,7 @@ else
   fi
 
   if test "x$have_usbredir" = "xyes"; then
-AC_DEFINE(USE_USBREDIR, [1], [Define if supporting usbredir proxying])
+AC_DEFINE([USE_USBREDIR], [1], [Define if supporting usbredir proxying])
   fi
 fi
 AM_CONDITIONAL([WITH_USBREDIR], [test "x$have_usbredir" = "xyes"])
@@ -438,16 +438,16 @@ if test "x$have_usbredir" = "xyes" && test 
"x$enable_polkit" != "xno"; then
 
   if test "x$have_polkit" = "xyes"; then
 AC_SUBST(ACL_LIBS)
-AC_DEFINE(USE_POLKIT, [1], [Define if supporting polkit])
+AC_DEFINE([USE_POLKIT], [1], [Define if supporting polkit])
   fi
   AM_CONDITIONAL([WITH_POLKIT], [test "x$have_polkit" = "xyes"])
   POLICYDIR=`${PKG_CONFIG} polkit-gobject-1 --variable=policydir`
   AC_SUBST(POLICYDIR)
   # Check for polkit_authority_get_sync()
   AC_CHECK_LIB([polkit-gobject-1], [polkit_authority_get_sync], 
ac_have_pk_auth_get_sync="1", ac_have_pk_auth_get_sync="0")
-  AC_DEFINE_UNQUOTED(HAVE_POLKIT_AUTHORITY_GET_SYNC, 
$ac_have_pk_auth_get_sync, [Define if you have a polkit with 
polkit_authority_get_sync()])
+  AC_DEFINE_UNQUOTED([HAVE_POLKIT_AUTHORITY_GET_SYNC], 
$ac_have_pk_auth_get_sync, [Define if you have a polkit with 
polkit_authority_get_sync()])
   AC_CHECK_LIB([polkit-gobject-1], 
[polkit_authorization_result_get_dismissed], 
ac_have_pk_authorization_result_get_dismissed="1", 
ac_have_pk_authorization_result_get_dismissed="0")
-  AC_DEFINE_UNQUOTED(HAVE_POLKIT_AUTHORIZATION_RESULT_GET_DISMISSED, 
$ac_have_pk_authorization_result_get_dismissed, [Define if you have a polkit 
with polkit_authorization_result_get_dismissed()])
+  AC_DEFINE_UNQUOTED([HAVE_POLKIT_AUTHORIZATION_RESULT_GET_DISMISSED], 
$ac_have_pk_authorization_result_get_dismissed, [Define if you have a polkit 
with polkit_authorization_result_get_dismissed()])
 else
   AM_CONDITIONAL(WITH_POLKIT, false)
 fi
@@ -508,7 +508,7 @@ fi
 if test -n "$USB_IDS"; then
   AC_MSG_RESULT([$USB_IDS])
   AC_SUBST(USB_IDS)
-  AC_DEFINE(WITH_USBIDS, [1], [Define if compiling with usb.ids support])
+  AC_DEFINE([WITH_USBIDS], [1], [Define if compiling with usb.ids support])
 else
   AC_MSG_RESULT([not found])
 fi
@@ -549,13 +549,13 @@ case $with_coroutine in
   *) AC_MSG_ERROR(Unsupported coroutine type)
 esac
 
-AC_DEFINE_UNQUOTED(WITH_UCONTEXT,[$WITH_UCONTEXT], [Whether to use ucontext 
coroutine impl])
+AC_DEFINE_UNQUOTED([WITH_UCONTEXT],[$WITH_UCONTEXT], [Whether to use ucontext 
coroutine impl])
 AM_CONDITIONAL(WITH_UCONTEXT, [test "x$WITH_UCONTEXT" = "x1"])
 
-AC_DEFINE_UNQUOTED(WITH_WINFIBER,[$WITH_WINFIBER], [Whether to use fiber 
coroutine impl])
+AC_DEFINE_UNQUOTED([WITH_WINFIBER],[$WITH_WINFIBER], [Whether to use fiber 
coroutine impl])
 AM_CONDITIONAL(WITH_WINFIBER, [test "x$WITH_WINFIBER" = "x1"])
 
-AC_DEFINE_UNQUOTED(WITH_GTHREAD,[$WITH_GTHREAD], [Whether to use gthread 
coroutine impl])
+AC_DEFINE_UNQUOTED([WITH_GTHREAD],[$WITH_GTHREAD], [Whether to use gthread 
coroutine impl])
 AM_CONDITIONAL(WITH_GTHREAD, [test "x$WITH_GTHREAD" = "x1"])
 
 AM_CONDITIONAL([HAVE_INTROSPECTION], [test "0" = "1"])
@@ -680,11 +680,11 @@ AC_ARG_ENABLE([dbus],
 have_dbus=no
 if

[Spice-devel] [spice-gtk 01/11] build-sys: Don't use test -a/-o

2014-10-30 Thread Christophe Fergeau
They are not portable, it's recommended to use test && test or test ||
test instead
---
 configure.ac | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index f47ee20..c2faedc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -121,7 +121,7 @@ SASL_CFLAGS=
 SASL_LIBS=
 enable_sasl=no
 if test "x$with_sasl" != "xno"; then
-  if test "x$with_sasl" != "xyes" -a "x$with_sasl" != "xauto"; then
+  if test "x$with_sasl" != "xyes" && test "x$with_sasl" != "xauto"; then
 SASL_CFLAGS="-I$with_sasl"
 SASL_LIBS="-L$with_sasl"
   fi
@@ -133,7 +133,7 @@ if test "x$with_sasl" != "xno"; then
   if test "x$with_sasl" = "xyes" ; then
 AC_CHECK_LIB([sasl2], [sasl_client_init],[with_sasl2=yes],[with_sasl2=no])
   fi
-  if test "x$with_sasl2" = "xno" -a "x$with_sasl" = "xyes" ; then
+  if test "x$with_sasl2" = "xno" && test "x$with_sasl" = "xyes" ; then
 AC_CHECK_LIB([sasl], [sasl_client_init],[with_sasl=yes],[with_sasl=no])
   fi
   if test "x$with_sasl2" = "xyes"; then
@@ -145,13 +145,13 @@ if test "x$with_sasl" != "xno"; then
   fi
   CFLAGS="$old_cflags"
   LIBS="$old_libs"
-  if test "x$with_sasl2" = "xyes" -o "x$with_sasl" = "xyes" ; then
+  if test "x$with_sasl2" = "xyes" || test "x$with_sasl" = "xyes" ; then
 AC_DEFINE_UNQUOTED([HAVE_SASL], 1,
   [whether Cyrus SASL is available for authentication])
 enable_sasl=yes
   fi
 fi
-AM_CONDITIONAL([HAVE_SASL], [test "x$with_sasl2" = "xyes" -o "x$with_sasl" = 
"xyes"])
+AM_CONDITIONAL([HAVE_SASL], [test "x$with_sasl2" = "xyes" || test 
"x$with_sasl" = "xyes"])
 AC_SUBST([SASL_CFLAGS])
 AC_SUBST([SASL_LIBS])
 
-- 
2.1.0

___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] [spice-gtk 04/11] Remove blank lines at end of files

2014-10-30 Thread Christophe Fergeau
---
 TODO   | 1 -
 doc/reference/spice-gtk.types  | 2 +-
 gtk/controller/dump.c  | 1 -
 gtk/controller/namedpipelistener.h | 1 -
 gtk/controller/spice-controller-listener.h | 3 ---
 gtk/controller/util.vala   | 2 +-
 gtk/decode-glz-tmpl.c  | 1 -
 gtk/smartcard-manager.h| 1 -
 gtk/spice-audio-priv.h | 1 -
 gtk/spice-channel-enums.h  | 4 
 gtk/spice-client.c | 1 -
 11 files changed, 2 insertions(+), 16 deletions(-)

diff --git a/TODO b/TODO
index 73742ba..34e2c39 100644
--- a/TODO
+++ b/TODO
@@ -5,4 +5,3 @@
 See also list of bugs open:
 
 
https://bugs.freedesktop.org/buglist.cgi?product=Spice&component=gtk-client&resolution=---&list_id=281013
-
diff --git a/doc/reference/spice-gtk.types b/doc/reference/spice-gtk.types
index db0374a..acd616d 100644
--- a/doc/reference/spice-gtk.types
+++ b/doc/reference/spice-gtk.types
@@ -44,4 +44,4 @@ spice_usb_device_get_type
 spice_usb_device_manager_get_type
 spice_usb_device_widget_get_type
 spice_port_channel_get_type
-spice_webdav_channel_get_type
\ No newline at end of file
+spice_webdav_channel_get_type
diff --git a/gtk/controller/dump.c b/gtk/controller/dump.c
index 306ff3a..5e951df 100644
--- a/gtk/controller/dump.c
+++ b/gtk/controller/dump.c
@@ -118,4 +118,3 @@ int main (int argc, char *argv[])
 
 return 0;
 }
-
diff --git a/gtk/controller/namedpipelistener.h 
b/gtk/controller/namedpipelistener.h
index 3084d00..c2dbd0a 100644
--- a/gtk/controller/namedpipelistener.h
+++ b/gtk/controller/namedpipelistener.h
@@ -68,4 +68,3 @@ SpiceNamedPipeConnection *  
spice_named_pipe_listener_accept_finish  (SpiceNamed
 G_END_DECLS
 
 #endif /* __NAMED_PIPE_LISTENER_H__ */
-
diff --git a/gtk/controller/spice-controller-listener.h 
b/gtk/controller/spice-controller-listener.h
index fc6ba3d..a50bdea 100644
--- a/gtk/controller/spice-controller-listener.h
+++ b/gtk/controller/spice-controller-listener.h
@@ -45,6 +45,3 @@ GIOStream* spice_controller_listener_accept_finish (GObject 
*listener,
 G_END_DECLS
 
 #endif /* __SPICE_CONTROLLER_LISTENER_H__ */
-
-
-
diff --git a/gtk/controller/util.vala b/gtk/controller/util.vala
index 16f546c..acd677e 100644
--- a/gtk/controller/util.vala
+++ b/gtk/controller/util.vala
@@ -39,4 +39,4 @@ namespace SpiceCtrl {
}
}
 
-}
\ No newline at end of file
+}
diff --git a/gtk/decode-glz-tmpl.c b/gtk/decode-glz-tmpl.c
index 63e3a36..ab09bba 100644
--- a/gtk/decode-glz-tmpl.c
+++ b/gtk/decode-glz-tmpl.c
@@ -334,4 +334,3 @@ static size_t FNAME(decode)(SpiceGlzDecoderWindow *window,
 #undef COPY_COMP_PIXEL
 #undef COPY_PLT_ENTRY
 #undef CAST_PLT_DISTANCE
-
diff --git a/gtk/smartcard-manager.h b/gtk/smartcard-manager.h
index 698357b..4811083 100644
--- a/gtk/smartcard-manager.h
+++ b/gtk/smartcard-manager.h
@@ -78,4 +78,3 @@ GList 
*spice_smartcard_manager_get_readers(SpiceSmartcardManager *manager);
 G_END_DECLS
 
 #endif /* __SPICE_SMARTCARD_MANAGER_H__ */
-
diff --git a/gtk/spice-audio-priv.h b/gtk/spice-audio-priv.h
index 71cc8ed..898c5a7 100644
--- a/gtk/spice-audio-priv.h
+++ b/gtk/spice-audio-priv.h
@@ -32,4 +32,3 @@ struct _SpiceAudioPrivate {
 G_END_DECLS
 
 #endif /* __SPICE_AUDIO_PRIVATE_H__ */
-
diff --git a/gtk/spice-channel-enums.h b/gtk/spice-channel-enums.h
index 30bfa51..02df762 100644
--- a/gtk/spice-channel-enums.h
+++ b/gtk/spice-channel-enums.h
@@ -5,7 +5,3 @@
 #include "spice-glib-enums.h"
 
 #endif /* SPICE_CHANNEL_ENUMS_H */
-
-
-
-
diff --git a/gtk/spice-client.c b/gtk/spice-client.c
index 4e7242f..5fd511f 100644
--- a/gtk/spice-client.c
+++ b/gtk/spice-client.c
@@ -25,4 +25,3 @@ GQuark spice_client_error_quark(void)
 {
 return g_quark_from_static_string("spice-client-error-quark");
 }
-
-- 
2.1.0

___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] [spice-gtk 03/11] Add missing (C) to copyright line

2014-10-30 Thread Christophe Fergeau
---
 gtk/channel-usbredir.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gtk/channel-usbredir.c b/gtk/channel-usbredir.c
index a52476a..5238566 100644
--- a/gtk/channel-usbredir.c
+++ b/gtk/channel-usbredir.c
@@ -1,6 +1,6 @@
 /* -*- Mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */
 /*
-   Copyright 2010-2012 Red Hat, Inc.
+   Copyright (C) 2010-2012 Red Hat, Inc.
 
Red Hat Authors:
Hans de Goede 
-- 
2.1.0

___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] [PATCH spice-gtk 0/4] build-sys clean-ups

2014-10-30 Thread Marc-André Lureau
Pushed unreviewed as trivial cleanups.

Marc-André Lureau (4):
  build-sys: change default libtool options
  build-sys: generate gitignore in tests dir
  build-sys: add some missing MAINTAINERCLEANFILES
  mailmap: add Dietmar Maurer

 .mailmap  | 1 +
 Makefile.am   | 2 ++
 configure.ac  | 2 +-
 tests/Makefile.am | 2 ++
 4 files changed, 6 insertions(+), 1 deletion(-)

-- 
1.9.3

___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] [PATCH spice-gtk 3/4] build-sys: add some missing MAINTAINERCLEANFILES

2014-10-30 Thread Marc-André Lureau
---
 Makefile.am | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Makefile.am b/Makefile.am
index 5029497..8ac2028 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -56,6 +56,7 @@ MAINTAINERCLEANFILES =\
m4/ltsugar.m4   \
m4/ltversion.m4 \
m4/lt~obsolete.m4   \
+   build-aux/ar-lib\
build-aux/compile   \
build-aux/config.guess  \
build-aux/config.rpath  \
@@ -65,6 +66,7 @@ MAINTAINERCLEANFILES =\
build-aux/ltmain.sh \
build-aux/missing   \
build-aux/mkinstalldirs \
+   build-aux/test-driver   \
po/Makefile.in.in   \
gtk-doc.make\
$(NULL)
-- 
1.9.3

___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] [PATCH spice-gtk 4/4] mailmap: add Dietmar Maurer

2014-10-30 Thread Marc-André Lureau
---
 .mailmap | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.mailmap b/.mailmap
index 2eb4488..f7fdf30 100644
--- a/.mailmap
+++ b/.mailmap
@@ -5,3 +5,4 @@
  
  
 Tiziano Müller  
+Dietmar Maurer  
\ No newline at end of file
-- 
1.9.3

___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] [PATCH spice-gtk 2/4] build-sys: generate gitignore in tests dir

2014-10-30 Thread Marc-André Lureau
---
 tests/Makefile.am | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/Makefile.am b/tests/Makefile.am
index 6f80d93..b236b12 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -20,3 +20,5 @@ LDADD =   
\
 
 util_SOURCES = util.c
 coroutine_SOURCES = coroutine.c
+
+-include $(top_srcdir)/git.mk
-- 
1.9.3

___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] [PATCH spice-gtk 1/4] build-sys: change default libtool options

2014-10-30 Thread Marc-André Lureau
- disable-static: it's quite uncommon to use static build of gtk libraries
- win32-dll: the shared libs build cleanly for win32 already
---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index f47ee20..0d65823 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,7 @@ AC_CONFIG_AUX_DIR([build-aux])
 
 AM_INIT_AUTOMAKE([foreign dist-bzip2 -Wall -Werror -Wno-portability])
 m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
-LT_INIT
+LT_INIT([disable-static win32-dll])
 AM_MAINTAINER_MODE
 
 IT_PROG_INTLTOOL([0.40.0])
-- 
1.9.3

___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] [PATCH spice-html5] Use a modern number of agent tokens.

2014-10-30 Thread Christophe Fergeau
On Wed, Oct 29, 2014 at 04:35:23PM -0500, Jeremy White wrote:
> This keeps an XSpice server from spin looping, which it will do if
> data is presented, but num_send_tokens == 0.

This is consistent with what spice-gtk is doing, ACK.

Christophe

> 
> Signed-off-by: Jeremy White 
> ---
>  main.js |2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/main.js b/main.js
> index 91f1963..e487551 100644
> --- a/main.js
> +++ b/main.js
> @@ -204,7 +204,7 @@ SpiceMainConn.prototype.connect_agent = function()
>  {
>  this.agent_connected = true;
>  
> -var agent_start = new SpiceMsgcMainAgentStart(0);
> +var agent_start = new SpiceMsgcMainAgentStart(~0);
>  var mr = new SpiceMiniData();
>  mr.build_msg(SPICE_MSGC_MAIN_AGENT_START, agent_start);
>  this.send_msg(mr);
> -- 
> 1.7.10.4
> 
> ___
> Spice-devel mailing list
> Spice-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel


pgpVO3LsdLf2l.pgp
Description: PGP signature
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] [PATCH] SPICE-HTML5: Improve error message

2014-10-30 Thread Christophe Fergeau
On Thu, Oct 30, 2014 at 06:35:36AM -0400, Frantisek Kobzik wrote:
> Yeah, I know about this.
> 
> The thing is that error is logged anyway using this.parent.report_log
> on the next line. I didn't want to duplicate the (useless) information
> in the debug div.

Yeah, I've noticed the report_log() call. I'm not familiar with
javascript, if you think report_log() is explicit enough to get an idea about
what's going on without the additional log which was there previously,
I'm fine with the initial version of the patch.

Christophe


pgpo4ZoR1jnHT.pgp
Description: PGP signature
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] [PATCH] SPICE-HTML5: Improve error message

2014-10-30 Thread Frantisek Kobzik
Yeah, I know about this.

The thing is that error is logged anyway using this.parent.report_log on the 
next line. I didn't want to duplicate the (useless) information in the debug 
div.

But I can change the patch so that it prints the error the old way and concats 
it with my message which is a little bit more detailed.

If you think I should choose this way, let me know.

Cheers,
F.


- Original Message -
From: "Christophe Fergeau" 
To: "Frantisek Kobzik" 
Cc: spice-de...@freedesktop.org
Sent: Thursday, October 30, 2014 11:28:15 AM
Subject: Re: [Spice-devel] [PATCH] SPICE-HTML5: Improve error message

On Thu, Oct 30, 2014 at 10:35:15AM +0100, Frantisek Kobzik wrote:
> Current error message in SPICE-HTML5 error is poor (error-logging function
> prints error.toString() which doesn't contain anything detailed).
> 
> This patch enhances this message in the following way:
>  - error event contains target attribute ([1]),
>  - the code in this patch checks for presence of 'url' attribute (which is
>contained in WebSocket object[2]). If the target contains url then
>meaningful message is logged.
> 
> [1]: https://developer.mozilla.org/en-US/docs/Web/API/Event
> [2]: https://developer.mozilla.org/en-US/docs/Web/API/WebSocket
> ---
>  spiceconn.js | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/spiceconn.js b/spiceconn.js
> index e33227e..ceebd5d 100644
> --- a/spiceconn.js
> +++ b/spiceconn.js
> @@ -78,7 +78,9 @@ function SpiceConn(o)
>  this.parent.state = "start";
>  });
>  this.ws.addEventListener('error', function(e) {
> -this.parent.log_err(">> WebSockets.onerror" + e.toString());
> +if ('url' in e.target) {
> +this.parent.log_err("WebSocket error: Can't connect to websocket 
> on URL: " + e.target.url);
> +}

We lost the "WebSockets.onerror" log if there is no 'url' in e.target, I
don't know if this is likely to happen?

ACK for this version if you think this is fine.

Christophe
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] [PATCH] SPICE-HTML5: Improve error message

2014-10-30 Thread Christophe Fergeau
On Thu, Oct 30, 2014 at 10:35:15AM +0100, Frantisek Kobzik wrote:
> Current error message in SPICE-HTML5 error is poor (error-logging function
> prints error.toString() which doesn't contain anything detailed).
> 
> This patch enhances this message in the following way:
>  - error event contains target attribute ([1]),
>  - the code in this patch checks for presence of 'url' attribute (which is
>contained in WebSocket object[2]). If the target contains url then
>meaningful message is logged.
> 
> [1]: https://developer.mozilla.org/en-US/docs/Web/API/Event
> [2]: https://developer.mozilla.org/en-US/docs/Web/API/WebSocket
> ---
>  spiceconn.js | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/spiceconn.js b/spiceconn.js
> index e33227e..ceebd5d 100644
> --- a/spiceconn.js
> +++ b/spiceconn.js
> @@ -78,7 +78,9 @@ function SpiceConn(o)
>  this.parent.state = "start";
>  });
>  this.ws.addEventListener('error', function(e) {
> -this.parent.log_err(">> WebSockets.onerror" + e.toString());
> +if ('url' in e.target) {
> +this.parent.log_err("WebSocket error: Can't connect to websocket 
> on URL: " + e.target.url);
> +}

We lost the "WebSockets.onerror" log if there is no 'url' in e.target, I
don't know if this is likely to happen?

ACK for this version if you think this is fine.

Christophe


pgpzQtJWaoaZZ.pgp
Description: PGP signature
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] [PATCH] SPICE-HTML5: Improve error message

2014-10-30 Thread Frantisek Kobzik
Current error message in SPICE-HTML5 error is poor (error-logging function
prints error.toString() which doesn't contain anything detailed).

This patch enhances this message in the following way:
 - error event contains target attribute ([1]),
 - the code in this patch checks for presence of 'url' attribute (which is
   contained in WebSocket object[2]). If the target contains url then
   meaningful message is logged.

[1]: https://developer.mozilla.org/en-US/docs/Web/API/Event
[2]: https://developer.mozilla.org/en-US/docs/Web/API/WebSocket
---
 spiceconn.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/spiceconn.js b/spiceconn.js
index e33227e..ceebd5d 100644
--- a/spiceconn.js
+++ b/spiceconn.js
@@ -78,7 +78,9 @@ function SpiceConn(o)
 this.parent.state = "start";
 });
 this.ws.addEventListener('error', function(e) {
-this.parent.log_err(">> WebSockets.onerror" + e.toString());
+if ('url' in e.target) {
+this.parent.log_err("WebSocket error: Can't connect to websocket 
on URL: " + e.target.url);
+}
 this.parent.report_error(e);
 });
 this.ws.addEventListener('close', function(e) {
-- 
1.9.3

___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel