Hello community,
here is the log from the commit of package gtk-vnc
checked in at Sat Sep 13 02:02:16 CEST 2008.
--------
--- GNOME/gtk-vnc/gtk-vnc.changes 2008-08-14 03:23:50.000000000 +0200
+++ gtk-vnc/gtk-vnc.changes 2008-09-12 16:40:43.000000000 +0200
@@ -1,0 +2,12 @@
+Fri Sep 12 09:38:04 CDT 2008 - maw@suse.de
+
+- Update to version 0.3.7:
+ + Ungrab pointer if widget loses focus
+ + Set a pixmap format if server does not default to true colour
+ mode
+ + Misc fixes to prevent crash
+ + Register internal signal handlers against class instead
+ of per object
+ + New feature: Add API to allow down-scaling to be enabled.
+
+-------------------------------------------------------------------
Old:
----
gtk-vnc-0.3.6.tar.bz2
New:
----
gtk-vnc-0.3.7.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ gtk-vnc.spec ++++++
--- /var/tmp/diff_new_pack.Qp5281/_old 2008-09-13 02:00:40.000000000 +0200
+++ /var/tmp/diff_new_pack.Qp5281/_new 2008-09-13 02:00:40.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package gtk-vnc (Version 0.3.6)
+# spec file for package gtk-vnc (Version 0.3.7)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -19,15 +19,19 @@
Name: gtk-vnc
-BuildRequires: gnome-common gnutls-devel gtk2-devel perl-XML-Parser python-devel
+BuildRequires: gnome-common
+BuildRequires: gnutls-devel
+BuildRequires: gtk2-devel
+BuildRequires: perl-XML-Parser
+BuildRequires: python-devel
%if %suse_version <= 1010
BuildRequires: python-gtk
%else
BuildRequires: python-gtk-devel
%endif
Summary: A GTK widget for VNC clients
-Version: 0.3.6
-Release: 25
+Version: 0.3.7
+Release: 1
License: LGPL v2.1 only; LGPL v2.1 or later
Group: Development/Libraries/X11
Source: http://downloads2.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2
@@ -118,7 +122,16 @@
%{_libdir}/pkgconfig/*.pc
%changelog
-* Thu Aug 14 2008 crrodriguez@suse.de
+* Fri Sep 12 2008 maw@suse.de
+- Update to version 0.3.7:
+ + Ungrab pointer if widget loses focus
+ + Set a pixmap format if server does not default to true colour
+ mode
+ + Misc fixes to prevent crash
+ + Register internal signal handlers against class instead
+ of per object
+ + New feature: Add API to allow down-scaling to be enabled.
+* Wed Aug 13 2008 crrodriguez@suse.de
- pkgconfig has an odd behaviour with "Requires.private"
* Mon Jun 23 2008 maw@suse.de
- Update to version 0.3.6:
++++++ gtk-vnc-0.3.6.tar.bz2 -> gtk-vnc-0.3.7.tar.bz2 ++++++
++++ 4148 lines of diff (skipped)
++++ retrying with extended exclude list
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gtk-vnc-0.3.6/ChangeLog new/gtk-vnc-0.3.7/ChangeLog
--- old/gtk-vnc-0.3.6/ChangeLog 2008-05-06 04:50:29.000000000 +0200
+++ new/gtk-vnc-0.3.7/ChangeLog 2008-09-05 14:32:15.000000000 +0200
@@ -1,8 +1,87 @@
+2008-09-05 "Daniel P. Berrange
+
+ * NEWS, configure.ac:
+ Update version & NEWS for 0.3.7
+ [d5ebf650aad6] [tip]
+
+ * src/vncdisplay.c:
+ Register internal signal handlers against class, instead of each
+ object
+ [ffc643772cfd]
+
+2008-06-30 Jonh Wendell
+
+ * src/libgtk-vnc_sym.version, src/vncdisplay.c, src/vncdisplay.h:
+ Added vnc_display_[gs]et_force_size(), which tell if the widget has
+ a fixed size. This helps scaling down work properly.
+ [3881365c9917]
+
+2008-06-05 Jonh Wendell
+
+ * src/vncdisplay.c:
+ Backed out changeset dba0c3d837dd
+ [6a869ca98aeb]
+
+2008-06-04 Jonh Wendell
+
+ * src/vncdisplay.c:
+ Fix an error message in destructor, when using scaling
+ [dba0c3d837dd]
+
+2008-06-01 Jonh Wendell
+
+ * src/gvnc.c:
+ Do more checks if connection is still alive in initialisation. This
+ fix a crash when closing the connection right after connecting.
+ [2396ceb7da50]
+
+2008-05-30 Jonh Wendell
+
+ * src/gvnc.c, src/gvnc.h, src/vncdisplay.c:
+ Use a preferred pixmap format when we receive true_color_flag 0 from
+ server
+ [d2f220a10a2f]
+
+2008-05-29 Jonh Wendell
+
+ * src/vncdisplay.c:
+ Ignore CTRL-ALT key combination if we are autograbbing and pointer
+ is absolute
+ [e7d57ece8227]
+
+2008-05-21 "Daniel P. Berrange
+
+ * src/vncdisplay.c:
+ Ungrab pointer upon loosing focus
+ [175e8585ff2a]
+
+2008-05-05 Anthony Liguori
+
+ * .hgtags:
+ Added tag release-0.3.6 for changeset 9daca7e451a5
+ [3ca3eea2347a]
+
+ * configure.ac:
+ branch merge
+ [9daca7e451a5] [release-0.3.6]
+
+ * .hgtags:
+ Added tag release-0.3.6 for changeset 8050c87f404b
+ [4f055a629945]
+
+ * ChangeLog, NEWS, configure.ac:
+ Update for 0.3.6
+ [8050c87f404b]
+
+ * .hgtags:
+ Added tag release-0.3.6 for changeset 854c8ce46e5a
+ [46a807b15c82]
+
2008-04-30 Jonh Wendell
* src/libgtk-vnc_sym.version, src/vncdisplay.c, src/vncdisplay.h:
Created a function to let the app take control over the shared flag.
- [281b37ee2880] [tip]
+ [281b37ee2880]
2008-04-27 Jonh Wendell
@@ -1053,11 +1132,6 @@
Merge heads
[4bf741278c01]
- * examples/gvncviewer.c, examples/gvncviewer.py, src/Makefile.am,
- src/gvnc.c, src/gvnc.h, src/vncdisplay.c, src/vncdisplay.h:
- Added support for TLS related credentials
- [6c4a0385c705]
-
2007-08-01 Jonh Wendell
* src/gvnc.c, src/vncdisplay.c:
@@ -1065,6 +1139,13 @@
when failure
[2f8878799f3c]
+2007-08-13 "Daniel P. Berrange
+
+ * examples/gvncviewer.c, examples/gvncviewer.py, src/Makefile.am,
+ src/gvnc.c, src/gvnc.h, src/vncdisplay.c, src/vncdisplay.h:
+ Added support for TLS related credentials
+ [6c4a0385c705]
+
2007-07-30 "Daniel P. Berrange
* src/gvnc.c:
@@ -1129,18 +1210,20 @@
* Merge
[7802cb9f9d47]
- * examples/gvncviewer.c, examples/gvncviewer.py, src/libgtk-
- vnc_sym.version, src/vnc.override, src/vncdisplay.c,
- src/vncdisplay.h:
- Added vnc_display_send_keys API & example usage
- [ee139f2eefc8]
-
2007-07-18 Anthony Liguori
* src/gvnc.c:
Buffer client messages to avoid race condition when write() blocks.
[2a92ce0f7cf5]
+2007-07-18 "Daniel P. Berrange
+
+ * examples/gvncviewer.c, examples/gvncviewer.py, src/libgtk-
+ vnc_sym.version, src/vnc.override, src/vncdisplay.c,
+ src/vncdisplay.h:
+ Added vnc_display_send_keys API & example usage
+ [ee139f2eefc8]
+
2007-07-15 "Daniel P. Berrange
* autobuild.sh:
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gtk-vnc-0.3.6/configure.ac new/gtk-vnc-0.3.7/configure.ac
--- old/gtk-vnc-0.3.6/configure.ac 2008-05-06 04:53:55.000000000 +0200
+++ new/gtk-vnc-0.3.7/configure.ac 2008-09-05 14:32:15.000000000 +0200
@@ -1,6 +1,6 @@
dnl Process this file with autoconf to produce a configure script.
-AC_INIT([gtk-vnc], [0.3.6], [anthony@codemonkey.ws])
+AC_INIT([gtk-vnc], [0.3.7], [anthony@codemonkey.ws])
AC_CONFIG_SRCDIR([src/gvnc.c])
GTK_REQUIRED=2.10.0
@@ -26,7 +26,7 @@
AC_CANONICAL_TARGET
-AM_INIT_AUTOMAKE(gtk-vnc, 0.3.6)
+AM_INIT_AUTOMAKE(gtk-vnc, 0.3.7)
AC_PROG_CC_STDC
AM_PROG_CC_C_O
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gtk-vnc-0.3.6/gtk-vnc.spec new/gtk-vnc-0.3.7/gtk-vnc.spec
--- old/gtk-vnc-0.3.6/gtk-vnc.spec 2008-05-06 04:54:40.000000000 +0200
+++ new/gtk-vnc-0.3.7/gtk-vnc.spec 2008-09-05 14:32:43.000000000 +0200
@@ -6,7 +6,7 @@
Summary: A GTK widget for VNC clients
Name: gtk-vnc
-Version: 0.3.6
+Version: 0.3.7
Release: 1%{?dist}%{?extra_release}
License: LGPLv2+
Group: Development/Libraries
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gtk-vnc-0.3.6/NEWS new/gtk-vnc-0.3.7/NEWS
--- old/gtk-vnc-0.3.6/NEWS 2008-05-06 04:52:36.000000000 +0200
+++ new/gtk-vnc-0.3.7/NEWS 2008-09-05 14:32:15.000000000 +0200
@@ -1,6 +1,22 @@
GTK VNC News
============
+Sep 5, 2008: Release 0.3.7
+==========================
+
+Bug fixes:
+
+ o Ungrab pointer if widget looses focus (Daniel Berrange)
+ o Set a pixmap format if server does not default to true
+ colour mode (Jonh Wendell)
+ o Misc fixes to prevent crash (Jonh Wendell)
+ o Register internal signal handlers against class instead
+ of per object (Daniel berrange)
+
+New features:
+
+ o Add API to allow down-scaling to be enabled (Jonh Wendell)
+
May 5, 2008: Release 0.3.6
==========================
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gtk-vnc-0.3.6/src/gvnc.c new/gtk-vnc-0.3.7/src/gvnc.c
--- old/gtk-vnc-0.3.6/src/gvnc.c 2008-04-22 23:33:35.000000000 +0200
+++ new/gtk-vnc-0.3.7/src/gvnc.c 2008-09-05 14:32:16.000000000 +0200
@@ -2784,6 +2784,9 @@
gvnc->width = gvnc_read_u16(gvnc);
gvnc->height = gvnc_read_u16(gvnc);
+ if (gvnc_has_error(gvnc))
+ return FALSE;
+
gvnc_read_pixel_format(gvnc, &gvnc->fmt);
n_name = gvnc_read_u32(gvnc);
@@ -2796,6 +2799,15 @@
gvnc->name[n_name] = 0;
GVNC_DEBUG("Display name '%s'\n", gvnc->name);
+ if (gvnc_has_error(gvnc))
+ return FALSE;
+
+ if (!gvnc->fmt.true_color_flag && gvnc->ops.get_preferred_pixel_format)
+ if (gvnc->ops.get_preferred_pixel_format(gvnc->ops_data, &gvnc->fmt))
+ gvnc_set_pixel_format(gvnc, &gvnc->fmt);
+ else
+ goto fail;
+
memset(&gvnc->strm, 0, sizeof(gvnc->strm));
/* FIXME what level? */
for (i = 0; i < 5; i++)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gtk-vnc-0.3.6/src/gvnc.h new/gtk-vnc-0.3.7/src/gvnc.h
--- old/gtk-vnc-0.3.6/src/gvnc.h 2008-04-22 23:33:35.000000000 +0200
+++ new/gtk-vnc-0.3.7/src/gvnc.h 2008-09-05 14:32:16.000000000 +0200
@@ -27,6 +27,7 @@
gboolean (*auth_unsupported)(void *, unsigned int);
gboolean (*render_jpeg)(void *, rgb24_render_func *render, void *,
int, int, int, int, uint8_t *, int);
+ gboolean (*get_preferred_pixel_format)(void *, struct gvnc_pixel_format *);
};
struct gvnc_pixel_format
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gtk-vnc-0.3.6/src/libgtk-vnc_sym.version new/gtk-vnc-0.3.7/src/libgtk-vnc_sym.version
--- old/gtk-vnc-0.3.6/src/libgtk-vnc_sym.version 2008-05-06 04:53:55.000000000 +0200
+++ new/gtk-vnc-0.3.7/src/libgtk-vnc_sym.version 2008-09-05 14:32:16.000000000 +0200
@@ -50,6 +50,9 @@
vnc_display_get_option_group;
+ vnc_display_set_force_size;
+ vnc_display_get_force_size;
+
local:
*;
};
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gtk-vnc-0.3.6/src/vncdisplay.c new/gtk-vnc-0.3.7/src/vncdisplay.c
--- old/gtk-vnc-0.3.6/src/vncdisplay.c 2008-05-06 04:53:56.000000000 +0200
+++ new/gtk-vnc-0.3.7/src/vncdisplay.c 2008-09-05 14:32:16.000000000 +0200
@@ -82,6 +82,7 @@
gboolean allow_lossy;
gboolean allow_scaling;
gboolean shared_flag;
+ gboolean force_size;
GSList *preferable_auths;
};
@@ -123,7 +124,8 @@
PROP_NAME,
PROP_LOSSY_ENCODING,
PROP_SCALING,
- PROP_SHARED_FLAG
+ PROP_SHARED_FLAG,
+ PROP_FORCE_SIZE
};
/* Signals */
@@ -203,6 +205,9 @@
case PROP_SHARED_FLAG:
g_value_set_boolean (value, vnc->priv->shared_flag);
break;
+ case PROP_FORCE_SIZE:
+ g_value_set_boolean (value, vnc->priv->force_size);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -240,6 +245,9 @@
case PROP_SHARED_FLAG:
vnc_display_set_shared_flag (vnc, g_value_get_boolean (value));
break;
+ case PROP_FORCE_SIZE:
+ vnc_display_set_force_size (vnc, g_value_get_boolean (value));
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -268,8 +276,7 @@
return cursor;
}
-static gboolean expose_event(GtkWidget *widget, GdkEventExpose *expose,
- gpointer data G_GNUC_UNUSED)
+static gboolean expose_event(GtkWidget *widget, GdkEventExpose *expose)
{
VncDisplay *obj = VNC_DISPLAY(widget);
VncDisplayPrivate *priv = obj->priv;
@@ -488,8 +495,7 @@
do_pointer_ungrab(obj, FALSE);
}
-static gboolean button_event(GtkWidget *widget, GdkEventButton *button,
- gpointer data G_GNUC_UNUSED)
+static gboolean button_event(GtkWidget *widget, GdkEventButton *button)
{
VncDisplayPrivate *priv = VNC_DISPLAY(widget)->priv;
int n;
@@ -520,11 +526,10 @@
0x7FFF, 0x7FFF);
}
- return FALSE;
+ return TRUE;
}
-static gboolean scroll_event(GtkWidget *widget, GdkEventScroll *scroll,
- gpointer data G_GNUC_UNUSED)
+static gboolean scroll_event(GtkWidget *widget, GdkEventScroll *scroll)
{
VncDisplayPrivate *priv = VNC_DISPLAY(widget)->priv;
int mask;
@@ -558,11 +563,10 @@
0x7FFF, 0x7FFF);
}
- return FALSE;
+ return TRUE;
}
-static gboolean motion_event(GtkWidget *widget, GdkEventMotion *motion,
- gpointer data G_GNUC_UNUSED)
+static gboolean motion_event(GtkWidget *widget, GdkEventMotion *motion)
{
VncDisplayPrivate *priv = VNC_DISPLAY(widget)->priv;
int dx, dy;
@@ -637,11 +641,10 @@
priv->last_x = (int)motion->x;
priv->last_y = (int)motion->y;
- return FALSE;
+ return TRUE;
}
-static gboolean key_event(GtkWidget *widget, GdkEventKey *key,
- gpointer data G_GNUC_UNUSED)
+static gboolean key_event(GtkWidget *widget, GdkEventKey *key)
{
VncDisplayPrivate *priv = VNC_DISPLAY(widget)->priv;
guint keyval;
@@ -737,7 +740,8 @@
}
}
- if (key->type == GDK_KEY_PRESS &&
+ if ((!priv->grab_keyboard || !priv->absolute) &&
+ key->type == GDK_KEY_PRESS &&
((keyval == GDK_Control_L && (key->state & GDK_MOD1_MASK)) ||
(keyval == GDK_Alt_L && (key->state & GDK_CONTROL_MASK)))) {
if (priv->in_pointer_grab)
@@ -746,19 +750,18 @@
do_pointer_grab(VNC_DISPLAY(widget), FALSE);
}
- return FALSE;
+ return TRUE;
}
-static gboolean enter_event(GtkWidget *widget, GdkEventCrossing *crossing,
- gpointer data G_GNUC_UNUSED)
+static gboolean enter_event(GtkWidget *widget, GdkEventCrossing *crossing)
{
VncDisplayPrivate *priv = VNC_DISPLAY(widget)->priv;
if (priv->gvnc == NULL || !gvnc_is_initialized(priv->gvnc))
- return TRUE;
+ return FALSE;
if (crossing->mode != GDK_CROSSING_NORMAL)
- return TRUE;
+ return FALSE;
if (priv->grab_keyboard)
do_keyboard_grab(VNC_DISPLAY(widget), FALSE);
@@ -766,32 +769,33 @@
return TRUE;
}
-static gboolean leave_event(GtkWidget *widget, GdkEventCrossing *crossing,
- gpointer data G_GNUC_UNUSED)
+static gboolean leave_event(GtkWidget *widget, GdkEventCrossing *crossing)
{
VncDisplayPrivate *priv = VNC_DISPLAY(widget)->priv;
if (priv->gvnc == NULL || !gvnc_is_initialized(priv->gvnc))
- return TRUE;
+ return FALSE;
if (crossing->mode != GDK_CROSSING_NORMAL)
- return TRUE;
+ return FALSE;
if (priv->grab_keyboard)
do_keyboard_ungrab(VNC_DISPLAY(widget), FALSE);
+ if (priv->grab_pointer)
+ do_pointer_ungrab(VNC_DISPLAY(widget), FALSE);
+
return TRUE;
}
-static gboolean focus_event(GtkWidget *widget, GdkEventFocus *focus G_GNUC_UNUSED,
- gpointer data G_GNUC_UNUSED)
+static gboolean focus_event(GtkWidget *widget, GdkEventFocus *focus G_GNUC_UNUSED)
{
VncDisplayPrivate *priv = VNC_DISPLAY(widget)->priv;
int i;
if (priv->gvnc == NULL || !gvnc_is_initialized(priv->gvnc))
- return TRUE;
+ return FALSE;
for (i = 0 ; i < (int)(sizeof(priv->down_keyval)/sizeof(priv->down_keyval[0])) ; i++) {
/* We are currently pressed so... */
@@ -808,10 +812,12 @@
}
#if WITH_GTKGLEXT
-static void realize_event(GtkWidget *widget, gpointer data G_GNUC_UNUSED)
+static void realize_event(GtkWidget *widget)
{
VncDisplayPrivate *priv = VNC_DISPLAY(widget)->priv;
+ GTK_WIDGET_CLASS (vnc_display_parent_class)->realize(widget);
+
if (priv->gl_config == NULL)
return;
@@ -888,7 +894,8 @@
priv->fb.data = (uint8_t *)priv->image->mem;
priv->fb.byte_order = priv->image->byte_order == GDK_LSB_FIRST ? G_LITTLE_ENDIAN : G_BIG_ENDIAN;
- gtk_widget_set_size_request(GTK_WIDGET(obj), width, height);
+ if (priv->force_size)
+ gtk_widget_set_size_request(GTK_WIDGET(obj), width, height);
}
#if WITH_GTKGLEXT
@@ -1068,6 +1075,28 @@
return do_resize(opaque, priv->fb.width, priv->fb.height, TRUE);
}
+static gboolean on_get_preferred_pixel_format(void *opaque,
+ struct gvnc_pixel_format *fmt)
+{
+ VncDisplay *obj = VNC_DISPLAY(opaque);
+ GdkVisual *v = gdk_drawable_get_visual(GTK_WIDGET(obj)->window);
+
+ GVNC_DEBUG("Setting pixel format to true color\n");
+
+ fmt->true_color_flag = 1;
+ fmt->depth = v->depth;
+ fmt->bits_per_pixel = v->depth > 16 ? 32 : v->depth;
+ fmt->red_max = v->red_mask >> v->red_shift;
+ fmt->green_max = v->green_mask >> v->green_shift;
+ fmt->blue_max = v->blue_mask >> v->blue_shift;
+ fmt->red_shift = v->red_shift;
+ fmt->green_shift = v->green_shift;
+ fmt->blue_shift = v->blue_shift;
+ fmt->byte_order = v->byte_order == GDK_LSB_FIRST ? G_BIG_ENDIAN : G_LITTLE_ENDIAN;
+
+ return TRUE;
+}
+
#if WITH_GTKGLEXT
static void build_gl_image_from_gdk(uint32_t *data, GdkImage *image)
{
@@ -1202,8 +1231,7 @@
}
}
-static gboolean configure_event(GtkWidget *widget, GdkEventConfigure *configure,
- gpointer data G_GNUC_UNUSED)
+static gboolean configure_event(GtkWidget *widget, GdkEventConfigure *configure)
{
VncDisplay *obj = VNC_DISPLAY(widget);
VncDisplayPrivate *priv = obj->priv;
@@ -1456,6 +1484,7 @@
.server_cut_text = on_server_cut_text,
.bell = on_bell,
.render_jpeg = on_render_jpeg,
+ .get_preferred_pixel_format = on_get_preferred_pixel_format
};
/* we use an idle function to allow the coroutine to exit before we actually
@@ -1781,6 +1810,23 @@
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GtkObjectClass *gtkobject_class = GTK_OBJECT_CLASS (klass);
+ GtkWidgetClass *gtkwidget_class = GTK_WIDGET_CLASS (klass);
+
+ gtkwidget_class->expose_event = expose_event;
+ gtkwidget_class->motion_notify_event = motion_event;
+ gtkwidget_class->button_press_event = button_event;
+ gtkwidget_class->button_release_event = button_event;
+ gtkwidget_class->scroll_event = scroll_event;
+ gtkwidget_class->key_press_event = key_event;
+ gtkwidget_class->key_release_event = key_event;
+ gtkwidget_class->enter_notify_event = enter_event;
+ gtkwidget_class->leave_notify_event = leave_event;
+ gtkwidget_class->focus_out_event = focus_event;
+#if WITH_GTKGLEXT
+ gtkwidget_class->realize = realize_event;
+ gtkwidget_class->configure_event = configure_event;
+#endif
+
object_class->finalize = vnc_display_finalize;
object_class->get_property = vnc_display_get_property;
@@ -1899,6 +1945,17 @@
G_PARAM_STATIC_NAME |
G_PARAM_STATIC_NICK |
G_PARAM_STATIC_BLURB));
+ g_object_class_install_property (object_class,
+ PROP_FORCE_SIZE,
+ g_param_spec_boolean ( "force-size",
+ "Force widget size",
+ "Whether we should define the widget size",
+ TRUE,
+ G_PARAM_READWRITE |
+ G_PARAM_CONSTRUCT |
+ G_PARAM_STATIC_NAME |
+ G_PARAM_STATIC_NICK |
+ G_PARAM_STATIC_BLURB));
signalCredParam = g_param_spec_enum("credential",
"credential",
@@ -2062,33 +2119,6 @@
GtkWidget *widget = GTK_WIDGET(display);
VncDisplayPrivate *priv;
- g_signal_connect(obj, "expose-event",
- G_CALLBACK(expose_event), NULL);
- g_signal_connect(obj, "motion-notify-event",
- G_CALLBACK(motion_event), NULL);
- g_signal_connect(obj, "button-press-event",
- G_CALLBACK(button_event), NULL);
- g_signal_connect(obj, "button-release-event",
- G_CALLBACK(button_event), NULL);
- g_signal_connect(obj, "scroll-event",
- G_CALLBACK(scroll_event), NULL);
- g_signal_connect(obj, "key-press-event",
- G_CALLBACK(key_event), NULL);
- g_signal_connect(obj, "key-release-event",
- G_CALLBACK(key_event), NULL);
- g_signal_connect(obj, "enter-notify-event",
- G_CALLBACK(enter_event), NULL);
- g_signal_connect(obj, "leave-notify-event",
- G_CALLBACK(leave_event), NULL);
- g_signal_connect(obj, "focus-out-event",
- G_CALLBACK(focus_event), NULL);
-#if WITH_GTKGLEXT
- g_signal_connect(obj, "realize",
- G_CALLBACK(realize_event), NULL);
- g_signal_connect(obj, "configure-event",
- G_CALLBACK(configure_event), NULL);
-#endif
-
GTK_WIDGET_SET_FLAGS(obj, GTK_CAN_FOCUS);
gtk_widget_add_events(widget,
@@ -2115,6 +2145,7 @@
priv->grab_keyboard = FALSE;
priv->local_pointer = FALSE;
priv->shared_flag = FALSE;
+ priv->force_size = TRUE;
priv->preferable_auths = g_slist_append (priv->preferable_auths, GUINT_TO_POINTER (GVNC_AUTH_VENCRYPT));
priv->preferable_auths = g_slist_append (priv->preferable_auths, GUINT_TO_POINTER (GVNC_AUTH_TLS));
@@ -2372,6 +2403,19 @@
}
#endif
+void vnc_display_set_force_size(VncDisplay *obj, gboolean enabled)
+{
+ g_return_if_fail (VNC_IS_DISPLAY (obj));
+ obj->priv->force_size = enabled;
+}
+
+gboolean vnc_display_get_force_size(VncDisplay *obj)
+{
+ g_return_val_if_fail (VNC_IS_DISPLAY (obj), FALSE);
+
+ return obj->priv->force_size;
+}
+
gboolean vnc_display_get_scaling(VncDisplay *obj)
{
g_return_val_if_fail (VNC_IS_DISPLAY (obj), FALSE);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gtk-vnc-0.3.6/src/vncdisplay.h new/gtk-vnc-0.3.7/src/vncdisplay.h
--- old/gtk-vnc-0.3.6/src/vncdisplay.h 2008-05-06 04:53:56.000000000 +0200
+++ new/gtk-vnc-0.3.7/src/vncdisplay.h 2008-09-05 14:32:16.000000000 +0200
@@ -116,6 +116,9 @@
gboolean vnc_display_set_scaling(VncDisplay *obj, gboolean enable);
gboolean vnc_display_get_scaling(VncDisplay *obj);
+void vnc_display_set_force_size(VncDisplay *obj, gboolean enable);
+gboolean vnc_display_get_force_size(VncDisplay *obj);
+
void vnc_display_set_shared_flag(VncDisplay *obj, gboolean shared);
gboolean vnc_display_get_shared_flag(VncDisplay *obj);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gtk-vnc-0.3.6/src/vncmarshal.c new/gtk-vnc-0.3.7/src/vncmarshal.c
--- old/gtk-vnc-0.3.6/src/vncmarshal.c 2008-05-06 04:54:43.000000000 +0200
+++ new/gtk-vnc-0.3.7/src/vncmarshal.c 2008-09-05 14:32:51.000000000 +0200
@@ -47,7 +47,7 @@
#endif /* !G_ENABLE_DEBUG */
-/* VOID:INT,INT (vncmarshal.txt:1) */
+/* VOID:INT,INT (../../src/vncmarshal.txt:1) */
void
g_cclosure_user_marshal_VOID__INT_INT (GClosure *closure,
GValue *return_value G_GNUC_UNUSED,
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gtk-vnc-0.3.6/src/vncmarshal.h new/gtk-vnc-0.3.7/src/vncmarshal.h
--- old/gtk-vnc-0.3.6/src/vncmarshal.h 2008-05-06 04:54:43.000000000 +0200
+++ new/gtk-vnc-0.3.7/src/vncmarshal.h 2008-09-05 14:32:49.000000000 +0200
@@ -6,7 +6,7 @@
G_BEGIN_DECLS
-/* VOID:INT,INT (vncmarshal.txt:1) */
+/* VOID:INT,INT (../../src/vncmarshal.txt:1) */
extern void g_cclosure_user_marshal_VOID__INT_INT (GClosure *closure,
GValue *return_value,
guint n_param_values,
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/gtk-vnc-0.3.6/src/vncmodule.defs.c new/gtk-vnc-0.3.7/src/vncmodule.defs.c
--- old/gtk-vnc-0.3.6/src/vncmodule.defs.c 2008-05-06 04:54:43.000000000 +0200
+++ new/gtk-vnc-0.3.7/src/vncmodule.defs.c 2008-09-05 14:32:55.000000000 +0200
@@ -4,7 +4,7 @@
-#line 3 "./vnc.override"
+#line 3 "../../src/vnc.override"
#include
#include "pygobject.h"
#include "vncdisplay.h"
@@ -98,7 +98,7 @@
return Py_None;
}
-#line 16 "./vnc.override"
+#line 16 "../../src/vnc.override"
static PyObject*
_wrap_vnc_display_send_keys(PyGObject *self,
PyObject *args, PyObject *kwargs)
@@ -397,6 +397,33 @@
}
static PyObject *
+_wrap_vnc_display_set_force_size(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "enable", NULL };
+ int enable;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,"i:VncDisplay.set_force_size", kwlist, &enable))
+ return NULL;
+
+ vnc_display_set_force_size(VNC_DISPLAY(self->obj), enable);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+static PyObject *
+_wrap_vnc_display_get_force_size(PyGObject *self)
+{
+ int ret;
+
+
+ ret = vnc_display_get_force_size(VNC_DISPLAY(self->obj));
+
+ return PyBool_FromLong(ret);
+
+}
+
+static PyObject *
_wrap_vnc_display_set_shared_flag(PyGObject *self, PyObject *args, PyObject *kwargs)
{
static char *kwlist[] = { "shared", NULL };
@@ -499,6 +526,10 @@
NULL },
{ "get_scaling", (PyCFunction)_wrap_vnc_display_get_scaling, METH_NOARGS,
NULL },
+ { "set_force_size", (PyCFunction)_wrap_vnc_display_set_force_size, METH_VARARGS|METH_KEYWORDS,
+ NULL },
+ { "get_force_size", (PyCFunction)_wrap_vnc_display_get_force_size, METH_NOARGS,
+ NULL },
{ "set_shared_flag", (PyCFunction)_wrap_vnc_display_set_shared_flag, METH_VARARGS|METH_KEYWORDS,
NULL },
{ "get_shared_flag", (PyCFunction)_wrap_vnc_display_get_shared_flag, METH_NOARGS,
@@ -599,7 +630,7 @@
}
-#line 603 "vnc.c"
+#line 634 "vnc.c"
pygobject_register_class(d, "VncDisplay", VNC_TYPE_DISPLAY, &PyVncDisplay_Type, Py_BuildValue("(O)", &PyGtkDrawingArea_Type));
pyg_set_object_has_new_constructor(VNC_TYPE_DISPLAY);
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org