debian/0000755000000000000000000000000012242425046007167 5ustar debian/copyright0000644000000000000000000002213412242425046011124 0ustar This package was debianized by Matthew Garrett on Tue, 1 Jun 2004 03:41:45 +0100. It was downloaded from http://ftp.gnome.org/pub/GNOME/sources/vino/ Upstream Authors: Mark McLoughlin Calum Benson Federico Mena Quintero Sebastien Estienne Shaya Potter Steven Zhang Srirama Sharma Jonh Wendell Copyright: Copyright (c) 1987, 1994 X Consortium Copyright (c) 1988,1989,1990,1991,1992 by Richard Outerbridge Copyright (C) 1999 AT&T Laboratories Cambridge. All Rights Reserved. Copyright (C) 2000-2002 Constantin Kaplinsky. All Rights Reserved. Copyright (C) 2000 - Eazel, Inc. Copyright (C) 2000 heXoNet Support GmbH, D-66424 Homburg. Copyright (C) 2000 Tridia Corporation. All Rights Reserved. Copyright (c) 2001 James "Wez" Weatherall, Johannes E. Schindelin Copyright (c) 2002-2003 Karl J. Runge Copyright (C) 2002-2004 Marco Pesenti Gritti Copyright (C) 2002 RealVNC Ltd. All Rights Reserved. Copyright (C) 2003, 2008 Sun Microsystems, Inc. Copyright (C) 2004-2006 William Jon McCann Copyright (C) 2004 Christian Persch Copyright (C) 2004 Novell, Inc. Copyright (C) 2004 Red Hat, Inc. Copyright (C) 2005-2006 Christian Hammond Copyright (c) 2005-2008 Thomas Bernard Copyright (C) 2005 Ethium, Inc. Copyright (C) 2005 - Paolo Maggi Copyright (C) 2006-2009 Jonh Wendell. Copyright (C) 2008 Jorge Pereira License: * 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 2 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. On Debian systems, the complete text of the GNU General Public License can be found in the file '/usr/share/common-licenses/GPL-2' * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. On Debian systems, the complete text of the GNU Lesser General Public License can be found in the file '/usr/share/common-licenses/LGPL-2.1' * vino-message-box.c 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. * * vino-message-box.c 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 . On Debian systems, the complete text of the GNU General Public License can be found in the file '/usr/share/common-licenses/GPL-3' server/libvncserver/rfb/keysym.h is licensed under the following terms: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of the X Consortium shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from the X Consortium. Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. server/miniupnp/bsdqueue.h is licensed under the terms of the BSD license: Copyright (c) 1991, 1993 The Regents of the University of California. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the University nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. server/miniupnp/minixml.c is licensed under the terms of the BSD license: Copyright (c) 2005-2007, Thomas BERNARD All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. debian/changelog0000644000000000000000000005032712242425046011050 0ustar vino (3.8.1-0ubuntu1) trusty; urgency=low * New upstream version, drop changes included in the new version * debian/patches/revert_use_prompt_notification.patch: - revert upstream change to use a notification with actions to accept or deny clients, since notify-osd doesn't support those, we keep using the old standalone dialog instead * debian/patches/git_tls_read.patch: - "Fix reading of TLS data to account for cached data" -- Sebastien Bacher Mon, 18 Nov 2013 15:53:41 +0100 vino (3.6.2-0ubuntu5) saucy; urgency=low * SECURITY UPDATE: denial of service via malformed data - debian/patches/CVE-2013-5745.patch: close clients in a deferred state in server/libvncserver/rfbserver.c. - CVE-2013-5745 -- Marc Deslauriers Thu, 26 Sep 2013 22:37:17 -0400 vino (3.6.2-0ubuntu4) raring; urgency=low * debian/patches/git_auth_methods_setting.patch: - updated with the upstream solution (lp: #1027086) -- Ritesh Khadgaray Wed, 27 Mar 2013 17:58:47 +0530 vino (3.6.2-0ubuntu3) raring; urgency=low * debian/patches/git_auth_methods_setting.patch: - incorrect schema setting used for authentication-methods in vino server ( lp: #1027086) -- Ritesh Khadgaray Wed, 20 Mar 2013 22:12:06 +0530 vino (3.6.2-0ubuntu2) raring; urgency=low * SECURITY UPDATE: clipboard leak to unauthenticated clients - debian/patches/CVE-2012-4429.patch: make sure client is authenticated in server/libvncserver/rfbserver.c. - CVE-2012-4429 -- Marc Deslauriers Fri, 18 Jan 2013 11:23:12 -0500 vino (3.6.2-0ubuntu1) raring; urgency=low * New upstream release -- Robert Ancell Tue, 13 Nov 2012 13:54:40 +1300 vino (3.6.1-0ubuntu1) raring; urgency=low * New upstream bugfix release (LP: #1070618). * debian/rules: - Explicitly build --with-secret -- Jeremy Bicha Sun, 04 Nov 2012 08:44:05 -0500 vino (3.6.0-0ubuntu1) quantal; urgency=low * New upstream stable release -- Robert Ancell Tue, 25 Sep 2012 10:44:42 +1200 vino (3.5.92-0ubuntu1) quantal; urgency=low * New upstream bugfix release -- Robert Ancell Tue, 18 Sep 2012 16:59:23 +1200 vino (3.5.90-0ubuntu1) quantal; urgency=low * New upstream release -- Robert Ancell Tue, 21 Aug 2012 17:07:41 +1200 vino (3.5.2-0ubuntu2) quantal; urgency=low * debian/patches/disable_webservices_check.patch: really disable the connectivity check using webservices: the resulting message update was already disabled upstream, but vino was still silently sending the requests. (LP: #608701) -- Mathieu Trudel-Lapierre Thu, 21 Jun 2012 11:40:29 -0400 vino (3.5.2-0ubuntu1) quantal-proposed; urgency=low * New upstream release * debian/control: - Bump build-depends on intltool -- Robert Ancell Wed, 06 Jun 2012 13:22:46 +1200 vino (3.5.1-0ubuntu1) quantal; urgency=low * New upstream release * debian/control: - Bump build-depends on libtelepathy-glib-dev -- Robert Ancell Mon, 14 May 2012 14:37:36 +1200 vino (3.4.1-0ubuntu2) quantal; urgency=low * debian/patches/12_app-indicators-only.patch - Removed non-existing property which was only set if using the appindicator (LP: #997699) * debian/control.in - use latest standards version -- Ken VanDine Thu, 10 May 2012 14:43:03 -0700 vino (3.4.1-0ubuntu1) precise-proposed; urgency=low * New upstream version -- Sebastien Bacher Mon, 16 Apr 2012 21:53:35 +0200 vino (3.4.0-0ubuntu3) precise; urgency=low * debian/patches/12_app-indicators-only.patch: add app indicator C files to POTFILES.in to allow translations to be shown (the translated strings are already available). (LP: #969510) -- Mathieu Trudel-Lapierre Wed, 04 Apr 2012 14:45:41 -0400 vino (3.4.0-0ubuntu2) precise; urgency=low * debian/rules: use --enable-appindicator instead of --with-indicator. * debian/patches/12_app-indicators-only.patch: re-enabled after being updated and refreshed. (LP: #884003) -- Mathieu Trudel-Lapierre Thu, 29 Mar 2012 13:11:08 -0400 vino (3.4.0-0ubuntu1) precise-proposed; urgency=low * New upstream release: - Translation changes -- Robert Ancell Tue, 27 Mar 2012 11:53:15 +1100 vino (3.3.92-0ubuntu1) precise; urgency=low * New upstream version -- Sebastien Bacher Mon, 19 Mar 2012 23:11:45 +0100 vino (3.3.3-0ubuntu2) precise; urgency=low * debian/patches/05_use-system-miniupnpc.patch: - update to the current libminiupnpc abi, the previous version was still using the source .h copies and the functions prototypes and code were different from the runtime (lp: #840696, #841384, #854512, #903879). -- Sebastien Bacher Thu, 26 Jan 2012 16:26:41 +0100 vino (3.3.3-0ubuntu1) precise; urgency=low * New upstream release. * debian/watch: Watch unstable series -- Jeremy Bicha Tue, 20 Dec 2011 01:03:21 -0500 vino (3.2.2-1ubuntu2) precise; urgency=low * Rebuild with the new libminiupnp soname -- Sebastien Bacher Tue, 06 Dec 2011 17:11:10 +0100 vino (3.2.2-1ubuntu1) precise; urgency=low * Resynchronize on Debian, remaining difference: * debian/control: - Build with libappindicator, dh_autoreconf * debian/rules: - Use autoreconf, enable appindicator - Don't use Debian's autostart location * debian/patches/06_use-ubuntu-help.patch: Use Ubuntu system help instead of GNOME's * debian/patches/12_app-indicators-only.patch - indicator support (disabled, needs updating) * debian/patches/nodisplay_autostart.patch: - Don't show in "Startup Applications" -- Sebastien Bacher Tue, 22 Nov 2011 11:30:37 +0100 vino (3.2.2-1) unstable; urgency=low [ Jeremy Bicha ] * debian/patches/05_use-system-miniupnpc.patch: Use system installed miniupnpc instead of bundled library [ Michael Biebl ] * New upstream release. * Refresh debian/patches/05_use-system-miniupnpc.patch. -- Michael Biebl Tue, 15 Nov 2011 21:53:35 +0100 vino (3.2.1-1) unstable; urgency=low * New upstream release. * debian/watch: - Track .xz tarballs. -- Michael Biebl Tue, 18 Oct 2011 02:31:29 +0200 vino (3.2.0-1) unstable; urgency=low [ Josselin Mouette ] * Break gnome-session-bin (<< 3.0) so that the new autostart condition is taken into account. Closes: #639088. [ Michael Biebl ] * New upstream release. - Do not use deprecated GnuTLS functions. Closes: #624045 * Bump Build-Depends on libgnutls-dev to (>= 2.2.0). * Refresh debian/patches/02_server_sm-disable.patch. -- Michael Biebl Wed, 28 Sep 2011 16:15:08 +0200 vino (3.0.3-1) unstable; urgency=low * New upstream release. * debian/watch: Switch to .bz2 tarballs. * Remove patches merged upstream: - debian/patches/20_fix_ifdefs.patch - debian/patches/25_fix_property_usage.patch * Bump debhelper compatibility level to 8. Update Build-Depends accordingly. * Upload to unstable, remove check-dist.mk include. -- Michael Biebl Sun, 31 Jul 2011 13:42:15 +0200 vino (3.0.2-1) experimental; urgency=low * New upstream release * Removed patches which have been comitted upstream + debian/patches/01_ipv6-fix.patch + debian/patches/05_avoid_out-of-bounds_memory_accesses.patch + debian/patches/03_config_h_defines.patch * debian/patches/25_fix_property_usage.patch + Added: Don't use non-existing properties in the Telepathy backend * debian/patches/20_fix_ifdefs.patch + Added: fix typos in the telepathy ifdefs -- Sjoerd Simons Sun, 05 Jun 2011 17:45:01 -0700 vino (3.0.0-3) experimental; urgency=high * 05_avoid_out-of-bounds_memory_accesses.patch: from upstream fixing CVE-2011-0904 and CVE-2011-0905 -- Andreas Henriksson Fri, 29 Apr 2011 20:49:28 +0200 vino (3.0.0-2) experimental; urgency=low * Request NetworkManager support only if building on a Linux arch. * Remove reference to BSD from common-licenses and instead add the headers of server/miniupnp/minixml.c and server/miniupnp/bsdqueue.h. * Add a 03_ prefix to config_h_defines.patch for consistency. -- Jordi Mallach Wed, 20 Apr 2011 22:26:55 +0200 vino (3.0.0-1) experimental; urgency=low * New upstream stable release. * Adjust Build-Depends for the GTK+3 port. * Update ipv6 patch to use new config.h names. * Switch to source format 3.0 (quilt). Drop usage of simple-patchsys and adapt patch headers to add an extra patch prefix. * Drop obsolete Suggests on gnome2-user-guide. * Add a Homepage field. * Bump Standards-Version to 3.9.2. * Use --with-* switches for features with configure. * Add config_h_defines.patch to fix the mess of mismatches between defines declared by configure and what the code actually checked for. -- Jordi Mallach Wed, 20 Apr 2011 17:52:35 +0200 vino (2.28.2-2) unstable; urgency=low [ Josselin Mouette ] * Drop type-handling usage. Closes: #587865. * Bump standards version accordingly. [ Jordi Mallach ] * Set the GNOME team as primary maintainer. [ Josselin Mouette ] * 11_hurd_maxhostnamelen.patch: updated to not just crash dumbly. Closes: #600704, #570615. -- Josselin Mouette Sat, 06 Nov 2010 22:37:41 +0100 vino (2.28.2-1) unstable; urgency=low [ Emilio Pozuelo Monfort ] * debian/patches/11_hurd_maxhostnamelen.patch: - Fix build on GNU/Hurd by malloc'ing enough memory for the hostname rather than using MAXHOSTNAMELEN, which is undefined on some OS'es. [ Sebastian Dröge ] * Ack NMU 2.28.1-2.1. * New upstream bugfix release: * debian/control.in: + Update Standards-Version to 3.8.4. -- Sebastian Dröge Wed, 14 Apr 2010 07:09:10 +0200 vino (2.28.1-2.1) unstable; urgency=low * Non-maintainer upload. * debian/patches/01_ipv6-fix.patch: New, use two listening sockets (one for IPv4, one for IPv6) and disable use of ipv4-mapped IPv6 addresses. (Closes: #561440) -- Thorsten Glaser Sat, 23 Jan 2010 13:01:31 +0000 vino (2.28.1-2) unstable; urgency=low * Only require NM on Linux architectures. * Pass configure argument to store the server password in the keyring. -- Josselin Mouette Fri, 20 Nov 2009 11:24:03 +0100 vino (2.28.1-1) unstable; urgency=low * New upstream release. -- Emilio Pozuelo Monfort Thu, 22 Oct 2009 20:45:56 +0200 vino (2.28.0-1) unstable; urgency=low [ Josselin Mouette ] * Important update to build-dependencies, adds NM support. [ Emilio Pozuelo Monfort ] * New upstream release. - debian/control.in: + Bump libgtk2.0-dev build dependency to >= 2.16.0. + Build depend on libtelepathy-glib-dev for Telepathy Tubes support. + Remove libglade2-dev build dependency, vino uses GtkBuilder now. * Standards-Version is 3.8.3, no changes needed. * debian/rules: - Remove unneeded clean rule, those files are cleaned by the upstream Makefiles now. -- Emilio Pozuelo Monfort Mon, 21 Sep 2009 21:19:16 +0200 vino (2.26.2-1) unstable; urgency=low [ Emilio Pozuelo Monfort ] * New upstream release. * debian/patches/01_localonly_ipv4.patch: removed, fixed upstream. * Update build-dependencies. * Standards-Version is 3.8.1, no changes needed. * debian/copyright: rewritten * Update Vcs-Browser and Vcs-Svn to point to the unstable branch. * Install the autostart file in /usr/share/gnome/autostart. -- Josselin Mouette Thu, 11 Jun 2009 00:04:45 +0200 vino (2.24.1-3) unstable; urgency=low * 02_server_sm-disable.patch: new patch. Do not register the server to the session, otherwise it will be loaded even though it is not necessary. Closes: #518862. -- Josselin Mouette Thu, 09 Apr 2009 18:43:32 +0200 vino (2.24.1-2) unstable; urgency=low * Upload to unstable. -- Josselin Mouette Thu, 05 Mar 2009 15:28:24 +0100 vino (2.24.1-1) experimental; urgency=low [ Emilio Pozuelo Monfort ] * New upstream release - Update build dependencies. - Enable libunique support. Build depend on libunique-dev. * debian/watch: Only track stable releases. Don't uupdate. * debian/control: - Update Standards-Version to 3.8.0. - Add Vcs-* fields. * debian/patches, debian/rules: - Remove patch system, there are no patches to apply. [ Josselin Mouette ] * Recommend gvfs for gtk_show_uri. * Use simple-patchsys. * 01_localonly_ipv4.patch: patch from Andreas Henriksson to work with IPv4 when only local connections are accepted. Closes: #480863. -- Josselin Mouette Wed, 10 Dec 2008 18:35:27 +0100 vino (2.22.2-1) unstable; urgency=low * New upstream bugfix release. -- Sebastian Dröge Tue, 27 May 2008 09:06:36 +0200 vino (2.22.1-1) unstable; urgency=low [ Emilio Pozuelo Monfort ] * Suggest vinagre instead of tsclient. [ Sebastian Dröge ] * New upstream bugfix release. -- Sebastian Dröge Mon, 07 Apr 2008 14:56:19 +0200 vino (2.22.0-1) unstable; urgency=low * New upstream stable release: + debian/control.in: - Updated Standards-Version to 3.7.3, no additional changes needed. - Update build dependencies. -- Sebastian Dröge Sat, 15 Mar 2008 11:54:09 +0100 vino (2.20.1-1) unstable; urgency=low * New upstream release, with translation updates only. -- Sebastian Dröge Thu, 25 Oct 2007 13:55:08 +0200 vino (2.20.0-1) unstable; urgency=low [ Loic Minier ] * Disable GNOME Keyring support as per discussion in GNOME #344839; closes: #421222. [ Josselin Mouette ] * Remove outdated README.Debian. * Disable session support as it is now included in gnome-session. * Remove postinst, useless as vino doesn't use bonobo anymore. [ Sebastian Dröge ] * New upstream release: + debian/control.in: - Raise build dependency for libnotify-dev. -- Sebastian Dröge Mon, 17 Sep 2007 16:05:33 +0200 vino (2.18.1-2) unstable; urgency=low * Upload to unstable; drop check-dist include. * Wrap build-deps and deps. -- Loic Minier Mon, 16 Apr 2007 13:40:03 +0200 vino (2.18.1-1) experimental; urgency=low * Drop TCP wrappers LDFLAGS and CFLAGS, not supported upstream anymore. * New upstream release. -- Loic Minier Mon, 09 Apr 2007 17:46:55 +0200 vino (2.18.0-1) experimental; urgency=low * New upstream major stable release. - Bump up build-deps to libglib2.0-dev >= 2.12.0, libgtk2.0-dev >= 2.10.0. - Add build-deps: libdbus-glib-1-dev, libnotify-dev (>= 0.4.3), libnotify-dev-gtk2.10 (vino uses notify_notification_new_with_status_icon()), libgnome-keyring-dev. - Pass --enable-libnotify and --enable-gnome-keyring to configure. - Drop patch 01_fix_password_free, merged upstream. - Drop patch 10_fix-corre-encoding, merged upstream. - Drop relibtoolizing patch, upstream used a Debian libtool. * Fix watch file to track all stable branches. * Include the new check-dist Makefile to prevent accidental uploads to unstable; bump build-dep on gnome-pkg-tools to >= 0.10. * Add http:// to URL in copyright. * Bump up Debhelper compatibility level to 5. * Drop useless debian/dirs. * Add -z defs to LDFLAGS. -- Loic Minier Sun, 08 Apr 2007 11:00:10 +0200 vino (2.16.0-5) unstable; urgency=low * Add a get-orig-source target to retrieve the upstream tarball. * Bump insufficient build-dep: cdbs (>= 0.4.41) for LDFLAGS. -- Loic Minier Wed, 10 Jan 2007 11:03:00 +0100 vino (2.16.0-4) unstable; urgency=low * Enable session support, thanks Vincent Bernat (closes: #267118). -- Josselin Mouette Thu, 28 Dec 2006 11:02:52 +0100 vino (2.16.0-3) unstable; urgency=medium * New patch, 01_fix_password_free, fixes password authentication in some cases; taken from Ubuntu #65795; from a CVS fix; thanks Sander Roobol; closes: #400108, #401346. * Build with tcp wrappers support; closes: #384060. - Build-depend on libwrap0-dev. - Link with -lwrap. - Define USE_LIBWRAP for cpp. -- Loic Minier Wed, 6 Dec 2006 09:57:31 +0100 vino (2.16.0-2) unstable; urgency=medium * New patch, 10_fix-corre-encoding, to fix an issue with the CoRRE encoding saying its only sending a single rectangle, but sending lots more; thanks Detlef Schmicker; from upstream CVS; closes: #395994. -- Loic Minier Sun, 29 Oct 2006 22:20:58 +0100 vino (2.16.0-1) unstable; urgency=low * New upstream release. - Relibtoolize and rename relibtoolizing patch to 70_relibtoolize. - Drop patch 01_no_client_on_hold_loop, merged upstream. -- Loic Minier Wed, 25 Oct 2006 12:10:27 +0200 vino (2.13.5-3) unstable; urgency=low * Suggest gnome-user-guide | gnome2-user-guide, thanks Noèl Köthe. (Closes: #382044) * Bump up Standards-Version to 3.7.2. -- Loic Minier Tue, 8 Aug 2006 16:49:44 +0200 vino (2.13.5-2) unstable; urgency=low * debian/patches/01_no_client_on_hold_loop.patch: - patch by Gary Coady - The IO socket for clients on hold should not be included in the GTK main loop. Ubuntu: #31037 * debian/rules: - build with LDFLAGS="-Wl,-O1 -Wl,--as-needed" -- Sebastien Bacher Sun, 9 Jul 2006 12:43:19 +0200 vino (2.13.5-1) unstable; urgency=low [ Jordi Mallach ] * New upstream release. * debian/control.in: add avahi and libxdamage to Build-Depends (closes: #341581). * debian/rules: enable avahi support. * debian/watch: added. [ J.H.M. Dassen (Ray) ] * [patches/00_relibtoolise.patch] New, do away with unneeded direct dependencies. -- Jordi Mallach Thu, 30 Mar 2006 00:28:57 +0200 vino (2.12.0-1) unstable; urgency=low * New upstream version. - should help problems with shift key (closes: #316977). * debian/control.in: Suggest tsclient. -- Jordi Mallach Mon, 24 Oct 2005 12:01:39 +0200 vino (2.10.0-2) unstable; urgency=low * Upload to unstable. * debian/vino.postinst: fix bashism (closes: #301000). * ACK Non-maintainer upload, thanks djpig! (closes: #299308) -- Jordi Mallach Tue, 7 Jun 2005 22:31:38 +0200 vino (2.10.0-1) experimental; urgency=low * New upstream release. * debian/control.in: - set myself as primary maintainer. - build-depend on cdbs and update debhelper to the minimum required version. * debian/rules: move to cdbs. -- Jordi Mallach Mon, 9 May 2005 16:07:57 +0200 vino (2.8.1-1.1) unstable; urgency=high * Non-maintainer upload. * Recompile to get rid of libhowl0 dependency (Closes: #299308) -- Frank Lichtenheld Fri, 18 Mar 2005 22:57:04 +0100 vino (2.8.1-1) unstable; urgency=low * New upstream version * Add suggests on gnome2-user-guide - the vino docs are in there -- Matthew Garrett Tue, 30 Nov 2004 14:32:48 +0000 vino (2.7.91-1) unstable; urgency=medium * New upstream version * Tightened build-depends (closes: #263662) -- Matthew Garrett Thu, 19 Aug 2004 16:24:55 +0100 vino (0.14-4) unstable; urgency=low * Add libxtst-dev to the build-depends (closes: #259705) -- Matthew Garrett Fri, 16 Jul 2004 11:53:03 +0100 vino (0.14-3) unstable; urgency=low * Build against packages that actually exist. Je suis un cretin. (closes #259041) -- Matthew Garrett Tue, 13 Jul 2004 12:25:37 +0100 vino (0.14-2) unstable; urgency=low * Avoid conflicting icon names (closes: #257943) -- Matthew Garrett Tue, 10 Jul 2004 19:26:58 +0100 vino (0.14-1) unstable; urgency=low * Initial Release (closes: #231269) -- Matthew Garrett Tue, 1 Jun 2004 03:41:45 +0100 debian/rules0000755000000000000000000000204612242425046010251 0ustar #! /usr/bin/make -f include /usr/share/cdbs/1/rules/autoreconf.mk include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/class/gnome.mk include /usr/share/gnome-pkg-tools/1/rules/uploaders.mk include /usr/share/gnome-pkg-tools/1/rules/check-dist.mk -include /usr/share/gnome-pkg-tools/1/rules/gnome-get-source.mk DEB_CONFIGURE_EXTRA_FLAGS += \ --enable-ipv6 \ --with-avahi \ --with-jpeg \ --with-libnotify \ --with-gcrypt \ --with-gnutls \ --with-gnome-keyring \ --with-secret \ --with-telepathy \ --with-zlib \ --enable-appindicator # Request NetworkManager support only for Linux ifeq ($(DEB_HOST_ARCH_OS),linux) DEB_CONFIGURE_EXTRA_FLAGS += \ --with-network-manager endif # drop unneeded ELF deps LDFLAGS += -Wl,-z,defs -Wl,-O1 -Wl,--as-needed binary-install/vino:: # Move the autostart file to /usr/share/gnome/autostart #mkdir -p debian/vino/usr/share/gnome/autostart #mv debian/vino/etc/xdg/autostart/vino-server.desktop \ # debian/vino/usr/share/gnome/autostart #cd debian/vino && rmdir -p etc/xdg/autostart debian/source/0000755000000000000000000000000012242425046010467 5ustar debian/source/format0000644000000000000000000000001412242425046011675 0ustar 3.0 (quilt) debian/control.in0000644000000000000000000000347012242425046011203 0ustar Source: vino Section: gnome Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Debian GNOME Maintainers Uploaders: @GNOME_TEAM@ Build-Depends: cdbs (>= 0.4.41), debhelper (>= 8), gnome-common, gnome-pkg-tools (>= 0.10), intltool (>= 0.50.0), libavahi-client-dev (>= 0.6), libavahi-glib-dev (>= 0.6), libglib2.0-dev (>= 2.26.0), libsecret-1-dev, libgcrypt11-dev (>= 1.1.90), libgnutls-dev (>= 2.2.0), libgtk-3-dev (>= 3.0.0), libjpeg-dev, libminiupnpc-dev (>= 1.6), libnotify-dev (>= 0.7.0), libsoup2.4-dev (>= 2.24.0), libtelepathy-glib-dev (>= 0.18.0), libxt-dev, libx11-dev, libxdamage-dev, libxext-dev, libxfixes-dev, libxtst-dev, network-manager-dev (>= 0.7) [linux-any], pkg-config (>= 0.16), libappindicator3-dev (>= 0.0.7), dh-autoreconf, zlib1g-dev Standards-Version: 3.9.3 Vcs-Bzr: http://bazaar.launchpad.net/~ubuntu-desktop/vino/ubuntu Homepage: http://live.gnome.org/Vino Package: vino Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Recommends: gvfs Suggests: vinagre, gnome-user-guide Breaks: gnome-session-bin (<< 3.0) Description: VNC server for GNOME VNC is a protocol that allows remote display of a user's desktop. This package provides a VNC server that integrates with GNOME, allowing you to export your running desktop to another computer for remote use or diagnosis. debian/control0000644000000000000000000000407712242425051010576 0ustar # This file is autogenerated. DO NOT EDIT! # # Modifications should be made to debian/control.in instead. # This file is regenerated automatically in the clean target. Source: vino Section: gnome Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Debian GNOME Maintainers Uploaders: Debian GNOME Maintainers , Jeremy Bicha Build-Depends: cdbs (>= 0.4.41), debhelper (>= 8), gnome-common, gnome-pkg-tools (>= 0.10), intltool (>= 0.50.0), libavahi-client-dev (>= 0.6), libavahi-glib-dev (>= 0.6), libglib2.0-dev (>= 2.26.0), libsecret-1-dev, libgcrypt11-dev (>= 1.1.90), libgnutls-dev (>= 2.2.0), libgtk-3-dev (>= 3.0.0), libjpeg-dev, libminiupnpc-dev (>= 1.6), libnotify-dev (>= 0.7.0), libsoup2.4-dev (>= 2.24.0), libtelepathy-glib-dev (>= 0.18.0), libxt-dev, libx11-dev, libxdamage-dev, libxext-dev, libxfixes-dev, libxtst-dev, network-manager-dev (>= 0.7) [linux-any], pkg-config (>= 0.16), libappindicator3-dev (>= 0.0.7), dh-autoreconf, zlib1g-dev Standards-Version: 3.9.3 Vcs-Bzr: http://bazaar.launchpad.net/~ubuntu-desktop/vino/ubuntu Homepage: http://live.gnome.org/Vino Package: vino Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Recommends: gvfs Suggests: vinagre, gnome-user-guide Breaks: gnome-session-bin (<< 3.0) Description: VNC server for GNOME VNC is a protocol that allows remote display of a user's desktop. This package provides a VNC server that integrates with GNOME, allowing you to export your running desktop to another computer for remote use or diagnosis. debian/compat0000644000000000000000000000000212242425046010365 0ustar 8 debian/watch0000644000000000000000000000013012242425046010212 0ustar version=3 http://ftp.gnome.org/pub/GNOME/sources/vino/([\d\.]+)/vino-([\d\.]+)\.tar\.xz debian/docs0000644000000000000000000000001412242425046010035 0ustar NEWS README debian/patches/0000755000000000000000000000000012242425046010616 5ustar debian/patches/02_server_sm-disable.patch0000644000000000000000000000105412242425046015546 0ustar Index: vino-3.8.1/server/vino-server.desktop.in.in =================================================================== --- vino-3.8.1.orig/server/vino-server.desktop.in.in 2013-11-18 15:14:13.518555628 +0100 +++ vino-3.8.1/server/vino-server.desktop.in.in 2013-11-18 15:15:30.000000000 +0100 @@ -2,7 +2,7 @@ _Name=Desktop Sharing _Comment=GNOME Desktop Sharing Server _Keywords=vnc;share;remote; -Exec=@LIBEXECDIR@/vino-server +Exec=@LIBEXECDIR@/vino-server --sm-disable Icon=preferences-desktop-remote-desktop OnlyShowIn=GNOME;Unity; Terminal=false debian/patches/12_app-indicators-only.patch0000644000000000000000000016311312242425046016042 0ustar --- Makefile.am | 10 configure.ac | 17 po/POTFILES.in | 2 server/vino-app-indicator.c | 712 +++++++++++++++++++++++++++++++++++++ server/vino-app-indicator.h | 75 +++ server/vino-main.c | 4 server/vino-prefs.c | 16 server/vino-server.c | 42 ++ server/vino-server.h | 5 server/vino-tube-app-indicator.c | 464 ++++++++++++++++++++++++ server/vino-tube-app-indicator.h | 72 +++ server/vino-tube-server.c | 35 + server/vino-tube-server.h | 4 server/vino-tube-servers-manager.c | 3 14 files changed, 1460 insertions(+), 1 deletion(-) Index: vino-3.8.1/server/vino-tube-server.h =================================================================== --- vino-3.8.1.orig/server/vino-tube-server.h 2013-11-18 15:14:13.638555622 +0100 +++ vino-3.8.1/server/vino-tube-server.h 2013-11-18 15:14:13.626555623 +0100 @@ -27,6 +27,10 @@ #include "vino-types.h" #include "vino-server.h" + +#ifdef VINO_ENABLE_APP_INDICATOR +#include "vino-tube-app-indicator.h" +#endif #include "vino-status-tube-icon.h" G_BEGIN_DECLS Index: vino-3.8.1/server/vino-app-indicator.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ vino-3.8.1/server/vino-app-indicator.c 2013-11-18 15:14:13.626555623 +0100 @@ -0,0 +1,712 @@ +/* + * Copyright (C) 2010 Canonical Ltd + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + * 02111-1307, USA. + * + * Authors: + * Travis B. Hartwell + */ + +#include +#include +#include +#include +#ifdef VINO_ENABLE_LIBNOTIFY +#include +#endif +#include + +#include "vino-app-indicator.h" +#include "vino-enums.h" +#include "vino-util.h" + +struct _VinoAppIndicatorPrivate +{ + AppIndicator *indicator; + GtkMenu *menu; + GtkMenuItem *status_menu_item; + VinoServer *server; + GSList *clients; + GtkWidget *disconnect_dialog; + VinoStatusIconVisibility visibility; + +#ifdef VINO_ENABLE_LIBNOTIFY + NotifyNotification *new_client_notification; +#endif +}; + +G_DEFINE_TYPE (VinoAppIndicator, vino_app_indicator, G_TYPE_OBJECT); + +enum +{ + PROP_0, + PROP_SERVER, + PROP_VISIBILITY +}; + +typedef struct +{ + VinoAppIndicator *indicator; + VinoClient *client; +} VinoAppIndicatorNotify; + +static gboolean vino_app_indicator_show_new_client_notification (gpointer user_data); +static void vino_app_indicator_build_menu (VinoAppIndicator *indicator); +static void vino_app_indicator_setup_menu (VinoAppIndicator *indicator); + +static void +vino_app_indicator_finalize (GObject *object) +{ + VinoAppIndicator *indicator = VINO_APP_INDICATOR (object); + +#ifdef VINO_ENABLE_LIBNOTIFY + if (indicator->priv->new_client_notification) + g_object_unref (indicator->priv->new_client_notification); + indicator->priv->new_client_notification = NULL; +#endif + + if (indicator->priv->status_menu_item) + gtk_widget_destroy (GTK_WIDGET (indicator->priv->status_menu_item)); + indicator->priv->status_menu_item = NULL; + + if (indicator->priv->menu) + gtk_widget_destroy (GTK_WIDGET (indicator->priv->menu)); + indicator->priv->menu = NULL; + + if (indicator->priv->clients) + g_slist_free (indicator->priv->clients); + indicator->priv->clients = NULL; + + if (indicator->priv->disconnect_dialog) + gtk_widget_destroy (indicator->priv->disconnect_dialog); + indicator->priv->disconnect_dialog = NULL; + + if (indicator->priv->indicator) + g_object_unref (indicator->priv->indicator); + indicator->priv->indicator = NULL; + + G_OBJECT_CLASS (vino_app_indicator_parent_class)->finalize (object); +} + +void +vino_app_indicator_update_state (VinoAppIndicator *indicator) +{ + char *tooltip; + gboolean visible; + AppIndicatorStatus status; + + g_return_if_fail (VINO_IS_APP_INDICATOR (indicator)); + + vino_app_indicator_setup_menu (indicator); + + visible = !vino_server_get_on_hold (indicator->priv->server); + + tooltip = g_strdup (_("Desktop sharing is enabled")); + + if (indicator->priv->clients != NULL) + { + int n_clients; + + n_clients = g_slist_length (indicator->priv->clients); + + tooltip = g_strdup_printf (ngettext ("One person is connected", + "%d people are connected", + n_clients), + n_clients); + visible = (visible) && ( (indicator->priv->visibility == VINO_STATUS_ICON_VISIBILITY_CLIENT) || + (indicator->priv->visibility == VINO_STATUS_ICON_VISIBILITY_ALWAYS) ); + } + else + visible = visible && (indicator->priv->visibility == VINO_STATUS_ICON_VISIBILITY_ALWAYS); + + gtk_menu_item_set_label (GTK_MENU_ITEM (indicator->priv->status_menu_item), tooltip); + + status = visible ? APP_INDICATOR_STATUS_ACTIVE : APP_INDICATOR_STATUS_PASSIVE; + if (indicator->priv->indicator != NULL) + app_indicator_set_status (APP_INDICATOR (indicator->priv->indicator), status); + + g_free (tooltip); +} + +static void +vino_app_indicator_init (VinoAppIndicator *indicator) +{ + indicator->priv = G_TYPE_INSTANCE_GET_PRIVATE (indicator, VINO_TYPE_APP_INDICATOR, VinoAppIndicatorPrivate); + + indicator->priv->indicator = app_indicator_new ("vino-app-indicator", + "preferences-desktop-remote-desktop", + APP_INDICATOR_CATEGORY_APPLICATION_STATUS); + + indicator->priv->menu = NULL; + indicator->priv->status_menu_item = NULL; + + vino_app_indicator_setup_menu (indicator); +} + +static void +vino_app_indicator_set_property (GObject *object, + guint prop_id, + const GValue *value, + GParamSpec *pspec) +{ + VinoAppIndicator *indicator = VINO_APP_INDICATOR (object); + + switch (prop_id) + { + case PROP_SERVER: + indicator->priv->server = g_value_get_object (value); + break; + case PROP_VISIBILITY: + vino_app_indicator_set_visibility (indicator, g_value_get_enum (value)); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} + +static void +vino_app_indicator_get_property (GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec) +{ + VinoAppIndicator *indicator = VINO_APP_INDICATOR (object); + + switch (prop_id) + { + case PROP_SERVER: + g_value_set_object (value, indicator->priv->server); + break; + case PROP_VISIBILITY: + g_value_set_enum (value, indicator->priv->visibility); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} + +VinoAppIndicator * +vino_app_indicator_new (VinoServer *server) +{ + g_return_val_if_fail (VINO_IS_SERVER (server), NULL); + + return g_object_new (VINO_TYPE_APP_INDICATOR, + "server", server, + NULL); +} + +VinoServer * +vino_app_indicator_get_server (VinoAppIndicator *indicator) +{ + g_return_val_if_fail (VINO_IS_APP_INDICATOR (indicator), NULL); + + return indicator->priv->server; +} + +static void +vino_app_indicator_preferences (VinoAppIndicator *indicator) +{ + GdkScreen *screen; + GDesktopAppInfo *info; + GdkAppLaunchContext *context; + GError *error = NULL; + + screen = gdk_screen_get_default(); + info = g_desktop_app_info_new ("vino-preferences.desktop"); + context = gdk_display_get_app_launch_context (gdk_screen_get_display (screen)); + if (!g_app_info_launch (G_APP_INFO (info), NULL, G_APP_LAUNCH_CONTEXT (context), &error)) + { + vino_util_show_error (_("Error displaying preferences"), + error->message, + NULL); + g_error_free (error); + } + + g_object_unref (info); + g_object_unref (context); +} + +static void +vino_app_indicator_help (VinoAppIndicator *indicator) +{ + GdkScreen *screen; + GError *error = NULL; + + screen = gdk_screen_get_default (); + if (!gtk_show_uri (screen, + "ghelp:user-guide?goscustdesk-90", + GDK_CURRENT_TIME, + &error)) + { + vino_util_show_error (_("Error displaying help"), + error->message, + NULL); + g_error_free (error); + } +} + +static void +vino_app_indicator_about (VinoAppIndicator *indicator) +{ + + g_return_if_fail (VINO_IS_APP_INDICATOR (indicator)); + + const char *authors[] = { + "Mark McLoughlin ", + "Calum Benson ", + "Federico Mena Quintero ", + "Sebastien Estienne ", + "Shaya Potter ", + "Steven Zhang ", + "Srirama Sharma ", + "Jonh Wendell ", + NULL + }; + char *license; + char *translators; + + license = _("Licensed under the GNU General Public License Version 2\n\n" + "Vino is free software; you can redistribute it and/or\n" + "modify it under the terms of the GNU General Public License\n" + "as published by the Free Software Foundation; either version 2\n" + "of the License, or (at your option) any later version.\n\n" + "Vino is distributed in the hope that it will be useful,\n" + "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" + "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" + "GNU General Public License for more details.\n\n" + "You should have received a copy of the GNU General Public License\n" + "along with this program; if not, write to the Free Software\n" + "Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA\n" + "02110-1301, USA.\n"); + + /* Translators comment: put your own name here to appear in the about dialog. */ + translators = _("translator-credits"); + + if (!strcmp (translators, "translator-credits")) + translators = NULL; + + gtk_show_about_dialog (NULL, + "comments", _("Share your desktop with other users"), + "version", PACKAGE_VERSION, + "license", license, + "authors", authors, + "translator-credits", translators, + "logo-icon-name", "preferences-desktop-remote-desktop", + NULL); +} + +static void +vino_app_indicator_disconnect_client (VinoAppIndicatorNotify *a, gint response) +{ + + GSList *l; + GSList *next; + + VinoAppIndicator *indicator = a->indicator; + VinoClient *client = a->client; + + gtk_widget_destroy (indicator->priv->disconnect_dialog); + indicator->priv->disconnect_dialog = NULL; + + if (response != GTK_RESPONSE_OK) + { + g_free (a); + return; + } + + if (client) + { + if (g_slist_find (indicator->priv->clients, client)) + vino_client_disconnect (client); + } + else + for (l = indicator->priv->clients; l; l = next) + { + VinoClient *client = l->data; + + next = l->next; + + vino_client_disconnect (client); + } + + g_free (a); +} + +static void +vino_app_indicator_disconnect_confirm (VinoAppIndicatorNotify *a) +{ + char *primary_msg; + char *secondary_msg; + + VinoAppIndicator *indicator = a->indicator; + VinoClient *client = a->client; + + if (indicator->priv->disconnect_dialog) + { + gtk_window_present (GTK_WINDOW (indicator->priv->disconnect_dialog)); + return; + } + + if (client != NULL) + { + /* Translators: %s is a hostname */ + primary_msg = g_strdup_printf + (_("Are you sure you want to disconnect '%s'?"), + vino_client_get_hostname (client)); + secondary_msg = g_strdup_printf + (_("The remote user from '%s' will be disconnected. Are you sure?"), + vino_client_get_hostname (client)); + } + else + { + primary_msg = g_strdup + (_("Are you sure you want to disconnect all clients?")); + secondary_msg = g_strdup + (_("All remote users will be disconnected. Are you sure?")); + } + + indicator->priv->disconnect_dialog = gtk_message_dialog_new (NULL, + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_QUESTION, + GTK_BUTTONS_CANCEL, + "%s", + primary_msg); + + gtk_window_set_skip_taskbar_hint (GTK_WINDOW (indicator->priv->disconnect_dialog), FALSE); + + gtk_dialog_add_button (GTK_DIALOG (indicator->priv->disconnect_dialog), _("Disconnect"), GTK_RESPONSE_OK); + + gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (indicator->priv->disconnect_dialog), + "%s", secondary_msg); + + g_signal_connect_swapped (indicator->priv->disconnect_dialog, "response", + G_CALLBACK (vino_app_indicator_disconnect_client), (gpointer) a); + gtk_widget_show_all (GTK_WIDGET (indicator->priv->disconnect_dialog)); + + g_free (primary_msg); + g_free (secondary_msg); +} + +static void +vino_app_indicator_setup_menu (VinoAppIndicator *indicator) +{ + if (indicator->priv->status_menu_item) + gtk_widget_destroy (GTK_WIDGET (indicator->priv->status_menu_item)); + indicator->priv->status_menu_item = NULL; + + if (indicator->priv->menu) + gtk_widget_destroy (GTK_WIDGET (indicator->priv->menu)); + indicator->priv->menu = NULL; + + vino_app_indicator_build_menu (indicator); + + app_indicator_set_menu (indicator->priv->indicator, indicator->priv->menu); +} + +static void +vino_app_indicator_build_menu (VinoAppIndicator *indicator) +{ + GtkWidget *item; + GSList *l; + VinoAppIndicatorNotify *a; + guint n_clients; + + indicator->priv->menu = (GtkMenu*) gtk_menu_new (); + + indicator->priv->status_menu_item = (GtkMenuItem*) gtk_menu_item_new (); + gtk_widget_set_sensitive (GTK_WIDGET (indicator->priv->status_menu_item), FALSE); + gtk_widget_show (GTK_WIDGET (indicator->priv->status_menu_item)); + gtk_menu_shell_append (GTK_MENU_SHELL (indicator->priv->menu), GTK_WIDGET (indicator->priv->status_menu_item)); + + item = gtk_separator_menu_item_new (); + gtk_widget_show (item); + gtk_menu_shell_append (GTK_MENU_SHELL (indicator->priv->menu), item); + + item = gtk_image_menu_item_new_with_mnemonic (_("_Preferences")); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), + gtk_image_new_from_stock (GTK_STOCK_PREFERENCES, GTK_ICON_SIZE_MENU)); + g_signal_connect_swapped (item, "activate", + G_CALLBACK (vino_app_indicator_preferences), indicator); + gtk_widget_show (item); + gtk_menu_shell_append (GTK_MENU_SHELL (indicator->priv->menu), item); + + item = gtk_separator_menu_item_new (); + gtk_widget_show (item); + gtk_menu_shell_append (GTK_MENU_SHELL (indicator->priv->menu), item); + + n_clients = g_slist_length (indicator->priv->clients); + if (n_clients > 1) + { + item = gtk_image_menu_item_new_with_label (_("Disconnect all")); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), + gtk_image_new_from_stock (GTK_STOCK_NETWORK, GTK_ICON_SIZE_MENU)); + + a = g_new (VinoAppIndicatorNotify, 1); + a->indicator = indicator; + a->client = NULL; + + g_signal_connect_swapped (item, "activate", + G_CALLBACK (vino_app_indicator_disconnect_confirm), (gpointer) a); + gtk_widget_show (item); + gtk_menu_shell_append (GTK_MENU_SHELL (indicator->priv->menu), item); + } + + for (l = indicator->priv->clients; l; l = l->next) + { + VinoClient *client = l->data; + char *str; + + a = g_new (VinoAppIndicatorNotify, 1); + a->indicator = indicator; + a->client = client; + + /* Translators: %s is a hostname */ + str = g_strdup_printf (_("Disconnect %s"), + vino_client_get_hostname (client)); + + item = gtk_image_menu_item_new_with_label (str); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), + gtk_image_new_from_stock (GTK_STOCK_NETWORK, GTK_ICON_SIZE_MENU)); + g_signal_connect_swapped (item, "activate", + G_CALLBACK (vino_app_indicator_disconnect_confirm), (gpointer) a); + gtk_widget_show (item); + gtk_menu_shell_append (GTK_MENU_SHELL (indicator->priv->menu), item); + + g_free (str); + } + + if (n_clients) + { + item = gtk_separator_menu_item_new (); + gtk_widget_show (item); + gtk_menu_shell_append (GTK_MENU_SHELL (indicator->priv->menu), item); + } + + item = gtk_image_menu_item_new_with_mnemonic (_("_Help")); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), + gtk_image_new_from_stock (GTK_STOCK_HELP, GTK_ICON_SIZE_MENU)); + g_signal_connect_swapped (item, "activate", + G_CALLBACK (vino_app_indicator_help), indicator); + gtk_widget_show (item); + gtk_menu_shell_append (GTK_MENU_SHELL (indicator->priv->menu), item); + + item = gtk_image_menu_item_new_with_mnemonic (_("_About")); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), + gtk_image_new_from_stock (GTK_STOCK_ABOUT, GTK_ICON_SIZE_MENU)); + g_signal_connect_swapped (item, "activate", + G_CALLBACK (vino_app_indicator_about), indicator); + gtk_widget_show (item); + gtk_menu_shell_append (GTK_MENU_SHELL (indicator->priv->menu), item); +} + +void +vino_app_indicator_add_client (VinoAppIndicator *indicator, + VinoClient *client) +{ + g_return_if_fail (VINO_IS_APP_INDICATOR (indicator)); + g_return_if_fail (client != NULL); + + indicator->priv->clients = g_slist_append (indicator->priv->clients, client); + + vino_app_indicator_update_state (indicator); + + /* Visible if not APP_INDICATOR_STATUS_PASSIVE */ + if (app_indicator_get_status (indicator->priv->indicator) != APP_INDICATOR_STATUS_PASSIVE) + { + VinoAppIndicatorNotify *a; + + a = g_new (VinoAppIndicatorNotify, 1); + a->indicator = indicator; + a->client = client; + g_timeout_add_seconds (1, + vino_app_indicator_show_new_client_notification, + (gpointer) a); + } +} + +gboolean +vino_app_indicator_remove_client (VinoAppIndicator *indicator, + VinoClient *client) +{ + g_return_val_if_fail (VINO_IS_APP_INDICATOR (indicator), TRUE); + g_return_val_if_fail (client != NULL, TRUE); + + if (!indicator->priv->clients) + return FALSE; + + indicator->priv->clients = g_slist_remove (indicator->priv->clients, client); + + vino_app_indicator_update_state (indicator); + + return indicator->priv->clients == NULL; +} + +static void +vino_app_indicator_class_init (VinoAppIndicatorClass *klass) +{ + GObjectClass *gobject_class = G_OBJECT_CLASS (klass); + + gobject_class->finalize = vino_app_indicator_finalize; + gobject_class->set_property = vino_app_indicator_set_property; + gobject_class->get_property = vino_app_indicator_get_property; + + g_object_class_install_property (gobject_class, + PROP_SERVER, + g_param_spec_object ("server", + "Server", + "The server", + VINO_TYPE_SERVER, + G_PARAM_READWRITE | + G_PARAM_CONSTRUCT_ONLY | + G_PARAM_STATIC_NAME | + G_PARAM_STATIC_NICK | + G_PARAM_STATIC_BLURB)); + g_object_class_install_property (gobject_class, + PROP_VISIBILITY, + g_param_spec_enum ("visibility", + "Indicator visibility", + "When the indicator must be shown", + VINO_TYPE_STATUS_ICON_VISIBILITY, + VINO_STATUS_ICON_VISIBILITY_ALWAYS, + G_PARAM_READWRITE | + G_PARAM_CONSTRUCT | + G_PARAM_STATIC_NAME | + G_PARAM_STATIC_NICK | + G_PARAM_STATIC_BLURB)); + + g_type_class_add_private (gobject_class, sizeof (VinoAppIndicatorPrivate)); +} + +#ifdef VINO_ENABLE_LIBNOTIFY +static void +vino_status_handle_new_client_notification_closed (VinoAppIndicator *indicator) +{ + g_object_unref (indicator->priv->new_client_notification); + indicator->priv->new_client_notification = NULL; +} +#endif /* VINO_ENABLE_LIBNOTIFY */ + +static gboolean +vino_app_indicator_show_new_client_notification (gpointer user_data) +{ +#ifdef VINO_ENABLE_LIBNOTIFY +#define NOTIFICATION_TIMEOUT 5 + + GError *error; + const char *summary; + char *body; + + VinoAppIndicatorNotify *a = (VinoAppIndicatorNotify *)user_data; + VinoAppIndicator *indicator = a->indicator; + VinoClient *client = a->client; + + if (vino_server_get_prompt_enabled (indicator->priv->server)) + { + g_free (user_data); + return FALSE; + } + + if (!notify_is_initted () && !notify_init (g_get_application_name ())) + { + g_printerr (_("Error initializing libnotify\n")); + g_free (user_data); + return FALSE; + } + + if (g_slist_index (indicator->priv->clients, client) == -1) + { + g_free (user_data); + return FALSE; + } + + if (indicator->priv->new_client_notification) + { + notify_notification_close (indicator->priv->new_client_notification, NULL); + g_object_unref (indicator->priv->new_client_notification); + indicator->priv->new_client_notification = NULL; + } + + if (vino_server_get_view_only (indicator->priv->server)) + { + /* Translators: %s is a hostname */ + summary = _("Another user is viewing your desktop"); + body = g_strdup_printf + (_("A user on the computer '%s' is remotely viewing your desktop."), + vino_client_get_hostname (client)); + } + else + { + /* Translators: %s is a hostname */ + summary = _("Another user is controlling your desktop"); + body = g_strdup_printf + (_("A user on the computer '%s' is remotely controlling " + "your desktop."), vino_client_get_hostname (client)); + } + + indicator->priv->new_client_notification = + notify_notification_new (summary, + body, + "preferences-desktop-remote-desktop" + ); + + g_free (body); + + g_signal_connect_swapped (indicator->priv->new_client_notification, "closed", + G_CALLBACK (vino_status_handle_new_client_notification_closed), + indicator); + + notify_notification_set_timeout (indicator->priv->new_client_notification, + NOTIFICATION_TIMEOUT * 1000); + + error = NULL; + if (!notify_notification_show (indicator->priv->new_client_notification, &error)) + { + g_printerr (_("Error while displaying notification bubble: %s\n"), + error->message); + g_error_free (error); + } + + g_free (user_data); + +#undef NOTIFICATION_TIMEOUT +#endif /* VINO_ENABLE_LIBNOTIFY */ + + return FALSE; +} + +void +vino_app_indicator_set_visibility (VinoAppIndicator *indicator, + VinoStatusIconVisibility visibility) +{ + g_return_if_fail (VINO_IS_APP_INDICATOR (indicator)); + g_return_if_fail (visibility != VINO_STATUS_ICON_VISIBILITY_INVALID); + + if (visibility != indicator->priv->visibility) + { + indicator->priv->visibility = visibility; + vino_app_indicator_update_state (indicator); + } +} + +guint +vino_app_indicator_get_visibility (VinoAppIndicator *indicator) +{ + g_return_val_if_fail (VINO_IS_APP_INDICATOR (indicator), VINO_STATUS_ICON_VISIBILITY_INVALID); + + return indicator->priv->visibility; +} Index: vino-3.8.1/server/vino-app-indicator.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ vino-3.8.1/server/vino-app-indicator.h 2013-11-18 15:14:13.626555623 +0100 @@ -0,0 +1,75 @@ +/* + * Copyright (C) 2010 Canonical Ltd + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + * 02111-1307, USA. + * + * Authors: + * Travis B. Hartwell + */ + +#ifndef __VINO_APP_INDICATOR_H__ +#define __VINO_APP_INDICATOR_H__ + +#include + +G_BEGIN_DECLS + +#define VINO_TYPE_APP_INDICATOR (vino_app_indicator_get_type ()) +#define VINO_APP_INDICATOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), VINO_TYPE_APP_INDICATOR, VinoAppIndicator)) +#define VINO_APP_INDICATOR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), VINO_TYPE_APP_INDICATOR, VinoAppIndicatorClass)) +#define VINO_IS_APP_INDICATOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), VINO_TYPE_APP_INDICATOR)) +#define VINO_IS_APP_INDICATOR_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), VINO_TYPE_APP_INDICATOR)) +#define VINO_APP_INDICATOR_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), VINO_TYPE_APP_INDICATOR, VinoAppIndicatorClass)) + +typedef struct _VinoAppIndicator VinoAppIndicator; +typedef struct _VinoAppIndicatorClass VinoAppIndicatorClass; +typedef struct _VinoAppIndicatorPrivate VinoAppIndicatorPrivate; + +struct _VinoAppIndicator +{ + GObject base; + + VinoAppIndicatorPrivate *priv; +}; + +struct _VinoAppIndicatorClass +{ + GObjectClass base_class; +}; + +#include "vino-server.h" +#include "vino-status-icon.h" + +GType vino_app_indicator_get_type (void) G_GNUC_CONST; + +VinoAppIndicator *vino_app_indicator_new (VinoServer *server); + +VinoServer *vino_app_indicator_get_server (VinoAppIndicator *indicator); + +void vino_app_indicator_add_client (VinoAppIndicator *indicator, + VinoClient *client); +gboolean vino_app_indicator_remove_client (VinoAppIndicator *indicator, + VinoClient *client); + +void vino_app_indicator_update_state (VinoAppIndicator *indicator); + +void vino_app_indicator_set_visibility (VinoAppIndicator *indicator, + VinoStatusIconVisibility visibility); +VinoStatusIconVisibility vino_app_indicator_get_visibility (VinoAppIndicator *indicator); + +G_END_DECLS + +#endif /* __VINO_APP_INDICATOR_H__ */ Index: vino-3.8.1/server/vino-prefs.c =================================================================== --- vino-3.8.1.orig/server/vino-prefs.c 2013-11-18 15:14:13.638555622 +0100 +++ vino-3.8.1/server/vino-prefs.c 2013-11-18 15:14:13.626555623 +0100 @@ -34,6 +34,9 @@ #include "vino-prefs.h" #include "vino-util.h" #include "vino-mdns.h" +#ifdef VINO_ENABLE_APP_INDICATOR +#include "vino-app-indicator.h" +#endif /* VINO_ENABLE_APP_INDICATOR */ #include "vino-status-icon.h" static GSettings *settings = NULL; @@ -52,7 +55,11 @@ vino_prefs_create_server (GdkScreen *screen) { VinoServer *server; +#ifdef VINO_ENABLE_APP_INDICATOR + VinoAppIndicator *indicator; +#else VinoStatusIcon *icon; +#endif /* VINO_ENABLE_APP_INDICATOR */ /* Start the server 'on-hold' until all the settings are in, then go. */ server = g_object_new (VINO_TYPE_SERVER, @@ -60,7 +67,11 @@ "on-hold", TRUE, "screen", screen, NULL); +#ifdef VINO_ENABLE_APP_INDICATOR + indicator = vino_server_get_app_indicator (server); +#else icon = vino_server_get_status_icon (server); +#endif /* VINO_ENABLE_APP_INDICATOR */ g_settings_bind (settings, "prompt-enabled", server, "prompt-enabled", G_SETTINGS_BIND_GET); @@ -93,8 +104,13 @@ server, "disable-xdamage", G_SETTINGS_BIND_GET); g_settings_bind (settings, "notify-on-connect", server, "notify-on-connect", G_SETTINGS_BIND_GET); +#ifdef VINO_ENABLE_APP_INDICATOR + g_settings_bind (settings, "icon-visibility", + indicator, "visibility", G_SETTINGS_BIND_GET); +#else g_settings_bind (settings, "icon-visibility", icon, "visibility", G_SETTINGS_BIND_GET); +#endif /* VINO_ENABLE_APP_INDICATOR */ vino_server_set_on_hold (server, FALSE); Index: vino-3.8.1/server/vino-server.c =================================================================== --- vino-3.8.1.orig/server/vino-server.c 2013-11-18 15:14:13.638555622 +0100 +++ vino-3.8.1/server/vino-server.c 2013-11-18 15:14:13.630555623 +0100 @@ -58,6 +58,9 @@ VinoFB *fb; VinoCursorData *cursor_data; VinoPrompt *prompt; +#ifdef VINO_ENABLE_APP_INDICATOR + VinoAppIndicator *indicator; +#endif /* VINO_ENABLE_APP_INDICATOR */ VinoStatusIcon *icon; gboolean display_status_icon; VinoUpnp *upnp; @@ -310,7 +313,11 @@ VinoClient *client) { if (server->priv->display_status_icon) +#ifdef VINO_ENABLE_APP_INDICATOR + vino_app_indicator_add_client (server->priv->indicator, client); +#else vino_status_icon_add_client (server->priv->icon, client); +#endif /* VINO_ENABLE_APP_INDICATOR */ server->priv->num_clients++; @@ -331,7 +338,11 @@ { if (server->priv->display_status_icon) { +#ifdef VINO_ENABLE_APP_INDICATOR + if (vino_app_indicator_remove_client (server->priv->indicator, client)) +#else if (vino_status_icon_remove_client (server->priv->icon, client)) +#endif /* VINO_ENABLE_APP_INDICATOR */ { vino_server_lock_screen (server); @@ -1151,9 +1162,15 @@ g_object_unref (server->priv->fb); server->priv->fb = NULL; +#ifdef VINO_ENABLE_APP_INDICATOR + if (server->priv->indicator) + g_object_unref (server->priv->indicator); + server->priv->indicator = NULL; +#else if (server->priv->icon) g_object_unref (server->priv->icon); server->priv->icon = NULL; +#endif /* VINO_ENABLE_APP_INDICATOR */ if (server->priv->upnp) g_object_unref (server->priv->upnp); @@ -1222,6 +1239,8 @@ vino_server_set_disable_xdamage (server, g_value_get_boolean (value)); break; case PROP_NOTIFY_ON_CONNECT: + server->priv->notify_on_connect = g_value_get_boolean (value); + g_object_notify (G_OBJECT (server), "notify-on-connect"); vino_server_set_notify_on_connect (server, g_value_get_boolean (value)); break; case PROP_REJECT_INCOMING: @@ -1312,9 +1331,15 @@ VinoServer *server = VINO_SERVER (object); if (server->priv->display_status_icon) +#ifdef VINO_ENABLE_APP_INDICATOR + server->priv->indicator = vino_app_indicator_new (server); + else + server->priv->indicator = NULL; +#else server->priv->icon = vino_status_icon_new (server, server->priv->screen); else server->priv->icon = NULL; +#endif /* VINO_ENABLE_APP_INDICATOR */ } @@ -1752,8 +1777,13 @@ g_object_notify (G_OBJECT (server), "on-hold"); +#ifdef VINO_ENABLE_APP_INDICATOR + if (server->priv->indicator) + vino_app_indicator_update_state (server->priv->indicator); +#else if (server->priv->icon) vino_status_icon_update_state (server->priv->icon); +#endif /* VINO_ENABLE_APP_INDICATOR */ vino_server_control_upnp (server); } @@ -1988,6 +2018,16 @@ return server->priv->notify_on_connect; } +#ifdef VINO_ENABLE_APP_INDICATOR +VinoAppIndicator * +vino_server_get_app_indicator (VinoServer *server) +{ + g_return_val_if_fail (VINO_IS_SERVER (server), NULL); + + return server->priv->indicator; +} +#endif /* VINO_ENABLE_APP_INDICATOR */ + VinoStatusIcon * vino_server_get_status_icon (VinoServer *server) { Index: vino-3.8.1/server/vino-server.h =================================================================== --- vino-3.8.1.orig/server/vino-server.h 2013-11-18 15:14:13.638555622 +0100 +++ vino-3.8.1/server/vino-server.h 2013-11-18 15:14:13.630555623 +0100 @@ -129,6 +129,11 @@ #include "vino-status-icon.h" VinoStatusIcon *vino_server_get_status_icon (VinoServer *server); +#ifdef VINO_ENABLE_APP_INDICATOR +#include "vino-app-indicator.h" +VinoAppIndicator *vino_server_get_app_indicator (VinoServer *server); +#endif /* VINO_ENABLE_APP_INDICATOR */ + const char *vino_client_get_hostname (VinoClient *client); void vino_client_disconnect (VinoClient *client); Index: vino-3.8.1/server/vino-tube-app-indicator.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ vino-3.8.1/server/vino-tube-app-indicator.c 2013-11-18 15:14:13.630555623 +0100 @@ -0,0 +1,464 @@ +/* + * © 2010, Canonical Ltd + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + * 02111-1307, USA. + * + * Authors: + * Travis B. Hartwell + */ + +#include +#include +#include +#include +#ifdef VINO_ENABLE_LIBNOTIFY +#include +#include +#endif +#include + +#include "vino-tube-app-indicator.h" +#include "vino-enums.h" +#include "vino-util.h" + +static void vino_tube_app_indicator_disconnect_confirm (VinoTubeAppIndicator *indicator); +static void vino_tube_app_indicator_help (VinoTubeAppIndicator *indicator); +static void vino_tube_app_indicator_preferences (VinoTubeAppIndicator *indicator); + +struct _VinoTubeAppIndicatorPrivate +{ + AppIndicator *indicator; + GtkMenu *menu; + GtkMenuItem *status_menu_item; + VinoTubeServer *server; + GtkWidget *disconnect_dialog; + VinoStatusTubeIconVisibility visibility; + +#ifdef VINO_ENABLE_LIBNOTIFY + NotifyNotification *new_client_notification; +#endif +}; + +G_DEFINE_TYPE (VinoTubeAppIndicator, vino_tube_app_indicator, G_TYPE_OBJECT); + +enum +{ + PROP_0, + PROP_SERVER, + PROP_VISIBILITY +}; + +static void +vino_tube_app_indicator_finalize (GObject *object) +{ + VinoTubeAppIndicator *indicator = VINO_TUBE_APP_INDICATOR (object); + +#ifdef VINO_ENABLE_LIBNOTIFY + if (indicator->priv->new_client_notification != NULL) + { + notify_notification_close (indicator->priv->new_client_notification, NULL); + g_object_unref (indicator->priv->new_client_notification); + indicator->priv->new_client_notification = NULL; + } + #endif + + if (indicator->priv->status_menu_item != NULL) + { + gtk_widget_destroy (GTK_WIDGET (indicator->priv->status_menu_item)); + indicator->priv->status_menu_item = NULL; + } + if (indicator->priv->menu != NULL) + { + gtk_widget_destroy (GTK_WIDGET (indicator->priv->menu)); + indicator->priv->menu = NULL; + } + + if (indicator->priv->disconnect_dialog != NULL) + { + gtk_widget_destroy (indicator->priv->disconnect_dialog); + indicator->priv->disconnect_dialog = NULL; + } + + if (indicator->priv->indicator != NULL) + { + g_object_unref (indicator->priv->indicator); + indicator->priv->indicator = NULL; + } + + G_OBJECT_CLASS (vino_tube_app_indicator_parent_class)->finalize (object); +} + +void +vino_tube_app_indicator_update_state (VinoTubeAppIndicator *indicator) +{ + char *tooltip; + gboolean visible; + AppIndicatorStatus status; + + g_return_if_fail (VINO_IS_TUBE_APP_INDICATOR (indicator)); + + visible = !vino_server_get_on_hold (VINO_SERVER (indicator->priv->server)); + + tooltip = g_strdup (_("Desktop sharing is enabled")); + + visible = visible && (indicator->priv->visibility == VINO_STATUS_TUBE_ICON_VISIBILITY_ALWAYS); + + gtk_menu_item_set_label (GTK_MENU_ITEM (indicator->priv->status_menu_item), tooltip); + + status = visible ? APP_INDICATOR_STATUS_ACTIVE : APP_INDICATOR_STATUS_PASSIVE; + app_indicator_set_status (indicator->priv->indicator, status); + + g_free (tooltip); +} + + +static void +vino_tube_app_indicator_create_menu (VinoTubeAppIndicator *indicator) +{ + GtkWidget *item; + char *str; + + indicator->priv->menu = (GtkMenu*) gtk_menu_new (); + + indicator->priv->status_menu_item = (GtkMenuItem*) gtk_menu_item_new (); + gtk_widget_set_sensitive (GTK_WIDGET (indicator->priv->status_menu_item), FALSE); + gtk_widget_show (GTK_WIDGET (indicator->priv->status_menu_item)); + gtk_menu_shell_append (GTK_MENU_SHELL (indicator->priv->menu), GTK_WIDGET (indicator->priv->status_menu_item)); + + item = gtk_separator_menu_item_new (); + gtk_widget_show (item); + gtk_menu_shell_append (GTK_MENU_SHELL (indicator->priv->menu), item); + + item = gtk_image_menu_item_new_with_mnemonic (_("_Preferences")); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), + gtk_image_new_from_stock (GTK_STOCK_PREFERENCES, GTK_ICON_SIZE_MENU)); + g_signal_connect_swapped (item, "activate", + G_CALLBACK (vino_tube_app_indicator_preferences), indicator); + gtk_widget_show (item); + gtk_menu_shell_append (GTK_MENU_SHELL (indicator->priv->menu), item); + + item = gtk_separator_menu_item_new (); + gtk_widget_show (item); + gtk_menu_shell_append (GTK_MENU_SHELL (indicator->priv->menu), item); + + /* Translators: %s is the alias of the telepathy contact */ + if (indicator->priv->server != NULL) { + str = g_strdup_printf (_("Disconnect %s"), + vino_tube_server_get_alias (indicator->priv->server)); + } else { + str = g_strdup_printf (_("Disconnect")); + } + + item = gtk_image_menu_item_new_with_label (str); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), + gtk_image_new_from_stock (GTK_STOCK_NETWORK, GTK_ICON_SIZE_MENU)); + + g_signal_connect_swapped (item, "activate", + G_CALLBACK (vino_tube_app_indicator_disconnect_confirm), indicator); + + gtk_widget_show (item); + gtk_menu_shell_append (GTK_MENU_SHELL (indicator->priv->menu), item); + + g_free (str); + + item = gtk_separator_menu_item_new (); + gtk_widget_show (item); + gtk_menu_shell_append (GTK_MENU_SHELL (indicator->priv->menu), item); + + item = gtk_image_menu_item_new_with_mnemonic (_("_Help")); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), + gtk_image_new_from_stock (GTK_STOCK_HELP, GTK_ICON_SIZE_MENU)); + g_signal_connect_swapped (item, "activate", + G_CALLBACK (vino_tube_app_indicator_help), indicator); + gtk_widget_show (item); + gtk_menu_shell_append (GTK_MENU_SHELL (indicator->priv->menu), item); + app_indicator_set_menu (indicator->priv->indicator, indicator->priv->menu); +} + +static void +vino_tube_app_indicator_init (VinoTubeAppIndicator *indicator) +{ + indicator->priv = G_TYPE_INSTANCE_GET_PRIVATE (indicator, VINO_TYPE_TUBE_APP_INDICATOR, VinoTubeAppIndicatorPrivate); + + indicator->priv->indicator = app_indicator_new ("vino-tube-app-indicator", + "preferences-desktop-remote-desktop", + APP_INDICATOR_CATEGORY_APPLICATION_STATUS); + + vino_tube_app_indicator_create_menu (indicator); + app_indicator_set_menu (indicator->priv->indicator, indicator->priv->menu); + +#ifdef VINO_ENABLE_LIBNOTIFY + indicator->priv->new_client_notification = NULL; +#endif +} + +static void +vino_tube_app_indicator_set_property (GObject *object, guint prop_id, + const GValue *value, GParamSpec *pspec) +{ + VinoTubeAppIndicator *indicator = VINO_TUBE_APP_INDICATOR (object); + + switch (prop_id) + { + case PROP_SERVER: + indicator->priv->server = g_value_get_object (value); + break; + case PROP_VISIBILITY: + vino_tube_app_indicator_set_visibility (indicator, g_value_get_enum (value)); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} + +static void +vino_tube_app_indicator_get_property (GObject *object, guint prop_id, + GValue *value, GParamSpec *pspec) +{ + VinoTubeAppIndicator *indicator = VINO_TUBE_APP_INDICATOR (object); + + switch (prop_id) + { + case PROP_SERVER: + g_value_set_object (value, indicator->priv->server); + break; + case PROP_VISIBILITY: + g_value_set_enum (value, indicator->priv->visibility); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} + +VinoTubeAppIndicator* +vino_tube_app_indicator_new (VinoTubeServer *server) +{ + g_return_val_if_fail (VINO_IS_TUBE_SERVER (server), NULL); + + return g_object_new (VINO_TYPE_TUBE_APP_INDICATOR, "server", server, NULL); +} + +static void +vino_tube_app_indicator_preferences (VinoTubeAppIndicator *indicator) +{ + GdkScreen *screen; + GDesktopAppInfo *info; + GdkAppLaunchContext *context; + GError *error = NULL; + + screen = gdk_screen_get_default (); + info = g_desktop_app_info_new ("vino-preferences.desktop"); + context = gdk_display_get_app_launch_context (gdk_screen_get_display (screen)); + if (!g_app_info_launch (G_APP_INFO (info), NULL, G_APP_LAUNCH_CONTEXT (context), &error)) + { + vino_util_show_error (_("Error displaying preferences"), + error->message, + NULL); + g_error_free (error); + } + + g_object_unref (info); + g_object_unref (context); +} + +static void +vino_tube_app_indicator_help (VinoTubeAppIndicator *indicator) +{ + GdkScreen *screen; + GError *error = NULL; + + screen = gdk_screen_get_default (); + if (!gtk_show_uri (screen, "ghelp:user-guide?goscustdesk-90", + GDK_CURRENT_TIME, &error)) + { + vino_util_show_error (_("Error displaying help"), error->message, NULL); + g_error_free (error); + } +} + +static void +vino_tube_app_indicator_disconnect_client (VinoTubeAppIndicator *indicator, + gint response) +{ + gtk_widget_destroy (indicator->priv->disconnect_dialog); + indicator->priv->disconnect_dialog = NULL; + + if (response == GTK_RESPONSE_OK) + { + vino_tube_server_close_tube (indicator->priv->server); + } +} + +static void +vino_tube_app_indicator_disconnect_confirm (VinoTubeAppIndicator *indicator) +{ + char *primary_msg; + char *secondary_msg; + + if (indicator->priv->disconnect_dialog) + { + gtk_window_present (GTK_WINDOW (indicator->priv->disconnect_dialog)); + return; + } + + /* Translators: %s is the alias of the telepathy contact */ + primary_msg = g_strdup_printf + (_("Are you sure you want to disconnect '%s'?"), + vino_tube_server_get_alias (indicator->priv->server)); + secondary_msg = g_strdup_printf + (_("The remote user '%s' will be disconnected. Are you sure?"), + vino_tube_server_get_alias (indicator->priv->server)); + + indicator->priv->disconnect_dialog = gtk_message_dialog_new (NULL, + GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_QUESTION, + GTK_BUTTONS_CANCEL, "%s", primary_msg); + + gtk_window_set_skip_taskbar_hint (GTK_WINDOW + (indicator->priv->disconnect_dialog), FALSE); + + gtk_dialog_add_button (GTK_DIALOG (indicator->priv->disconnect_dialog), + _("Disconnect"), GTK_RESPONSE_OK); + + gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG + (indicator->priv->disconnect_dialog), "%s", secondary_msg); + + g_signal_connect_swapped (indicator->priv->disconnect_dialog, "response", + G_CALLBACK (vino_tube_app_indicator_disconnect_client), + indicator); + + gtk_widget_show_all (GTK_WIDGET (indicator->priv->disconnect_dialog)); + + g_free (primary_msg); + g_free (secondary_msg); + +} + +static void +vino_tube_app_indicator_class_init (VinoTubeAppIndicatorClass *klass) +{ + GObjectClass *gobject_class = G_OBJECT_CLASS (klass); + + gobject_class->finalize = vino_tube_app_indicator_finalize; + gobject_class->set_property = vino_tube_app_indicator_set_property; + gobject_class->get_property = vino_tube_app_indicator_get_property; + + g_object_class_install_property (gobject_class, + PROP_SERVER, + g_param_spec_object ("server", + "Server", + "The server", + VINO_TYPE_SERVER, + G_PARAM_READWRITE | + G_PARAM_CONSTRUCT_ONLY | + G_PARAM_STATIC_NAME | + G_PARAM_STATIC_NICK | + G_PARAM_STATIC_BLURB)); + g_object_class_install_property (gobject_class, + PROP_VISIBILITY, + g_param_spec_enum ("visibility", + "Icon visibility", + "When the icon must be shown", + VINO_TYPE_STATUS_ICON_VISIBILITY, + VINO_STATUS_ICON_VISIBILITY_CLIENT, + G_PARAM_READWRITE | + G_PARAM_CONSTRUCT | + G_PARAM_STATIC_NAME | + G_PARAM_STATIC_NICK | + G_PARAM_STATIC_BLURB)); + + g_type_class_add_private (gobject_class, sizeof (VinoTubeAppIndicatorPrivate)); +} + +void +vino_tube_app_indicator_set_visibility (VinoTubeAppIndicator *indicator, + VinoStatusTubeIconVisibility visibility) +{ + g_return_if_fail (VINO_IS_TUBE_APP_INDICATOR (indicator)); + g_return_if_fail (visibility != VINO_STATUS_TUBE_ICON_VISIBILITY_INVALID); + + if (visibility != indicator->priv->visibility) + { + indicator->priv->visibility = visibility; + vino_tube_app_indicator_update_state (indicator); + } +} + +#ifdef VINO_ENABLE_LIBNOTIFY +static void +vino_tube_app_indicator_show_invalidated_notif_closed + (VinoStatusTubeAppIndicator *indicator) +{ + dprintf (TUBE, "Notification was closed"); + vino_tube_server_fire_closed (indicator->priv->server); +} +#endif + +void +vino_tube_app_indicator_show_notif (VinoTubeAppIndicator *indicator, + const gchar *summary, const gchar *body, gboolean invalidated) +{ +#ifdef VINO_ENABLE_LIBNOTIFY +#define NOTIFICATION_TIMEOUT 5 + + GError *error; + const gchar *filename = NULL; + + if (!notify_is_initted () && !notify_init (g_get_application_name ())) + { + g_printerr (_("Error initializing libnotify\n")); + return; + } + + if (indicator->priv->new_client_notification != NULL) + { + notify_notification_close (indicator->priv->new_client_notification, NULL); + g_object_unref (indicator->priv->new_client_notification); + indicator->priv->new_client_notification = NULL; + } + + filename = vino_tube_server_get_avatar_filename (indicator->priv->server); + + if (filename == NULL) + filename = "stock_person"; + + indicator->priv->new_client_notification = + notify_notification_new (summary, body, filename); + + notify_notification_set_timeout (indicator->priv->new_client_notification, + NOTIFICATION_TIMEOUT * 1000); + + if (invalidated) + g_signal_connect_swapped (indicator->priv->new_client_notification, "closed", + G_CALLBACK (vino_tube_app_indicator_show_invalidated_notif_closed), + indicator); + + error = NULL; + if (!notify_notification_show (indicator->priv->new_client_notification, &error)) + { + g_printerr (_("Error while displaying notification bubble: %s\n"), + error->message); + g_error_free (error); + } + +#undef NOTIFICATION_TIMEOUT +#else + if (invalidated) + vino_tube_server_fire_closed (indicator->priv->server); +#endif /* VINO_ENABLE_LIBNOTIFY */ +} + Index: vino-3.8.1/server/vino-tube-app-indicator.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ vino-3.8.1/server/vino-tube-app-indicator.h 2013-11-18 15:14:13.630555623 +0100 @@ -0,0 +1,72 @@ +/* + * © 2010, Canonical Ltd + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + * 02111-1307, USA. + * + * Authors: + * Travis B. Hartwell + */ + +#ifndef __VINO_TUBE_APP_INDICATOR_H__ +#define __VINO_TUBE_APP_INDICATOR_H__ + +#include + +#include "vino-tube-server.h" + +G_BEGIN_DECLS + +#define VINO_TYPE_TUBE_APP_INDICATOR (vino_tube_app_indicator_get_type ()) +#define VINO_TUBE_APP_INDICATOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), \ + VINO_TYPE_TUBE_APP_INDICATOR, VinoTubeAppIndicator)) +#define VINO_TUBE_APP_INDICATOR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), \ + VINO_TYPE_TUBE_APP_INDICATOR, VinoTubeAppIndicatorClass)) +#define VINO_IS_TUBE_APP_INDICATOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), \ + VINO_TYPE_TUBE_APP_INDICATOR)) +#define VINO_IS_TUBE_APP_INDICATOR_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), \ + VINO_TYPE_TUBE_APP_INDICATOR)) +#define VINO_TUBE_APP_INDICATOR_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), \ + VINO_TYPE_TUBE_APP_INDICATOR, VinoTubeAppIndicatorClass)) + +typedef struct _VinoTubeAppIndicator VinoTubeAppIndicator; +typedef struct _VinoTubeAppIndicatorClass VinoTubeAppIndicatorClass; +typedef struct _VinoTubeAppIndicatorPrivate VinoTubeAppIndicatorPrivate; + +struct _VinoTubeAppIndicator +{ + GObject base; + VinoTubeAppIndicatorPrivate *priv; +}; + +struct _VinoTubeAppIndicatorClass +{ + GObjectClass base_class; +}; + +GType vino_tube_app_indicator_get_type (void) G_GNUC_CONST; + +VinoTubeAppIndicator* vino_tube_app_indicator_new (VinoTubeServer *server); + +void vino_tube_app_indicator_update_state (VinoTubeAppIndicator *indicator); + +void vino_tube_app_indicator_set_visibility (VinoTubeAppIndicator *indicator, + guint visibility); + +void vino_tube_app_indicator_show_notif (VinoTubeAppIndicator *indicator, + const gchar *summary, const gchar *body, gboolean invalidated); +G_END_DECLS + +#endif /* __VINO_TUBE_APP_INDICATOR_H__ */ Index: vino-3.8.1/server/vino-tube-server.c =================================================================== --- vino-3.8.1.orig/server/vino-tube-server.c 2013-11-18 15:14:13.638555622 +0100 +++ vino-3.8.1/server/vino-tube-server.c 2013-11-18 15:14:13.630555623 +0100 @@ -30,7 +30,6 @@ #include #include - #include "vino-tube-server.h" #include "vino-dbus-error.h" #include "vino-util.h" @@ -45,7 +44,11 @@ { TpChannel *tube; gulong signal_invalidated_id; +#ifdef VINO_ENABLE_APP_INDICATOR + VinoTubeAppIndicator *indicator; +#else VinoStatusTubeIcon *icon_tube; +#endif TpTubeChannelState state; }; @@ -78,11 +81,19 @@ server->priv->tube = NULL; } +#ifdef VINO_ENABLE_APP_INDICATOR + if (server->priv->indicator != NULL) + { + g_object_unref (server->priv->indicator); + server->priv->indicator = NULL; + } +#else if (server->priv->icon_tube != NULL) { g_object_unref (server->priv->icon_tube); server->priv->icon_tube = NULL; } +#endif /* VINO_ENABLE_APP_INDICATOR */ if (G_OBJECT_CLASS (vino_tube_server_parent_class)->dispose) G_OBJECT_CLASS (vino_tube_server_parent_class)->dispose (object); @@ -149,7 +160,11 @@ { self->priv = VINO_TUBE_SERVER_GET_PRIVATE (self); self->priv->tube = NULL; +#ifdef VINO_ENABLE_APP_INDICATOR + self->priv->indicator = NULL; +#else self->priv->icon_tube = NULL; +#endif /* VINO_ENABLE_APP_INDICATOR */ self->priv->state = TP_TUBE_CHANNEL_STATE_NOT_OFFERED; } @@ -228,7 +243,11 @@ body = g_strdup_printf (_("'%s' disconnected"), vino_tube_server_get_alias (self)); +#ifdef VINO_ENABLE_APP_INDICATOR + vino_tube_app_indicator_show_notif (self->priv->indicator, summary, +#else vino_status_tube_icon_show_notif (self->priv->icon_tube, summary, +#endif /* VINO_ENABLE_APP_INDICATOR */ (const gchar *)body, TRUE); g_free (body); @@ -254,7 +273,11 @@ /* Translators: '%s' is the name of a contact, buddy coming from Empathy */ body = g_strdup_printf (_("'%s' is remotely controlling your desktop."), vino_tube_server_get_alias (server)); +#ifdef VINO_ENABLE_APP_INDICATOR + vino_tube_app_indicator_show_notif (server->priv->indicator, summary, +#else vino_status_tube_icon_show_notif (server->priv->icon_tube, summary, +#endif /* VINO_ENABLE_APP_INDICATOR */ (const gchar*) body, FALSE); g_free (body); server->priv->state = TP_TUBE_STATE_OPEN; @@ -263,7 +286,11 @@ /* Translators: '%s' is the name of a contact, buddy coming from Empathy */ body = g_strdup_printf (_("Waiting for '%s' to connect to the screen."), vino_tube_server_get_alias (server)); +#ifdef VINO_ENABLE_APP_INDICATOR + vino_tube_app_indicator_show_notif (server->priv->indicator, summary, +#else vino_status_tube_icon_show_notif (server->priv->icon_tube, summary, +#endif /* VINO_ENABLE_APP_INDICATOR */ (const gchar*) body, FALSE); g_free (body); server->priv->state = TP_TUBE_STATE_REMOTE_PENDING; @@ -282,6 +309,7 @@ dprintf (TUBE, "Impossible to offer the stream tube: %s\n", error->message); return; } + } gboolean @@ -296,10 +324,15 @@ parameters = g_hash_table_new (g_str_hash, g_str_equal); screen = gdk_screen_get_default (); +#ifdef VINO_ENABLE_APP_INDICATOR + server->priv->indicator = vino_tube_app_indicator_new (VINO_TUBE_SERVER (server)); + vino_tube_app_indicator_set_visibility (server->priv->indicator, +#else server->priv->icon_tube = vino_status_tube_icon_new (server, screen); vino_status_tube_icon_set_visibility (server->priv->icon_tube, +#endif /* VINO_ENABLE_APP_INDICATOR */ VINO_STATUS_TUBE_ICON_VISIBILITY_ALWAYS); tp_cli_channel_interface_tube_connect_to_tube_channel_state_changed Index: vino-3.8.1/configure.ac =================================================================== --- vino-3.8.1.orig/configure.ac 2013-11-18 15:14:13.638555622 +0100 +++ vino-3.8.1/configure.ac 2013-11-18 15:14:13.630555623 +0100 @@ -71,6 +71,23 @@ AM_CONDITIONAL([VINO_HAVE_TELEPATHY_GLIB], [test "x$have_telepathy" = "xyes"]) +dnl -- check for application indicators --------------------------------------- +APPINDICATOR_VERSION=0.0.7 + +AC_ARG_ENABLE(appindicator, + AS_HELP_STRING([--enable-appindicator],[Build support for application indicators [[default=yes]]]), + [enable_appindicator=$enableval], + [enable_appindicator="yes"]) + +if test x$enable_appindicator = xyes ; then + PKG_CHECK_MODULES(APP_INDICATOR, + appindicator3-0.1 >= $APPINDICATOR_VERSION) + AC_SUBST(APP_INDICATOR_CFLAGS) + AC_SUBST(APP_INDICATOR_LIBS) + AC_DEFINE(VINO_ENABLE_APP_INDICATOR, 1, [Have AppIndicator]) +fi +AM_CONDITIONAL(VINO_ENABLE_APP_INDICATOR, test x"$enable_appindicator" = xyes) + # Check for NetworkManager NETWORKMANAGER_DEPS="NetworkManager >= 0.7" Index: vino-3.8.1/Makefile.am =================================================================== --- vino-3.8.1.orig/Makefile.am 2013-11-18 15:14:13.638555622 +0100 +++ vino-3.8.1/Makefile.am 2013-11-18 15:14:20.000000000 +0100 @@ -158,6 +158,16 @@ $(VINO_HTTP_sources) \ $(VINO_TELEPATHY_GLIB_sources) +if VINO_ENABLE_APP_INDICATOR +vino_server_CPPFLAGS += $(APP_INDICATOR_CFLAGS) -DVINO_ENABLE_APP_INDICATOR +vino_server_LDADD += $(APP_INDICATOR_LIBS) +vino_server_SOURCES += \ + server/vino-app-indicator.c \ + server/vino-app-indicator.h \ + server/vino-tube-app-indicator.c \ + server/vino-tube-app-indicator.h +endif + marshal_data = \ server/vino-marshal.c \ server/vino-marshal.h Index: vino-3.8.1/server/vino-main.c =================================================================== --- vino-3.8.1.orig/server/vino-main.c 2013-11-18 15:14:13.638555622 +0100 +++ vino-3.8.1/server/vino-main.c 2013-11-18 15:14:13.630555623 +0100 @@ -244,7 +244,11 @@ g_settings_bind (vino->settings, "disable-xdamage", server, "disable-xdamage", G_SETTINGS_BIND_GET); g_settings_bind (vino->settings, "icon-visibility", +#ifdef VINO_ENABLE_APP_INDICATOR + vino_server_get_app_indicator (server), +#else vino_server_get_status_icon (server), +#endif "visibility", G_SETTINGS_BIND_GET); vino_dbus_listener_set_server (vino->listeners[i], server); Index: vino-3.8.1/po/POTFILES.in =================================================================== --- vino-3.8.1.orig/po/POTFILES.in 2013-11-18 15:14:13.638555622 +0100 +++ vino-3.8.1/po/POTFILES.in 2013-11-18 15:14:13.630555623 +0100 @@ -16,6 +16,8 @@ server/vino-server.c server/vino-server.desktop.in.in server/vino-status-icon.c +server/vino-app-indicator.c +server/vino-tube-app-indicator.c server/vino-status-tube-icon.c server/vino-tube-server.c server/vino-util.c debian/patches/06_use-ubuntu-help.patch0000644000000000000000000000351512242425046015212 0ustar Description: Use Ubuntu system help instead of GNOME's Forwarded: Not needed Index: vino-3.8.1/server/vino-status-icon.c =================================================================== --- vino-3.8.1.orig/server/vino-status-icon.c 2013-11-18 15:14:13.574555625 +0100 +++ vino-3.8.1/server/vino-status-icon.c 2013-11-18 15:14:13.566555625 +0100 @@ -223,7 +223,7 @@ screen = gtk_status_icon_get_screen (GTK_STATUS_ICON (icon)); if (!gtk_show_uri (screen, - "help:gnome-help/sharing-desktop", + "help:ubuntu-help/sharing-desktop", GDK_CURRENT_TIME, &error)) { Index: vino-3.8.1/server/vino-status-tube-icon.c =================================================================== --- vino-3.8.1.orig/server/vino-status-tube-icon.c 2013-11-18 15:14:13.574555625 +0100 +++ vino-3.8.1/server/vino-status-tube-icon.c 2013-11-18 15:14:13.570555625 +0100 @@ -186,7 +186,7 @@ GError *error = NULL; screen = gtk_status_icon_get_screen (GTK_STATUS_ICON (icon)); - if (!gtk_show_uri (screen, "help:gnome-help/sharing-desktop", + if (!gtk_show_uri (screen, "help:ubuntu-help/sharing-desktop", GDK_CURRENT_TIME, &error)) { vino_util_show_error (_("Error displaying help"), error->message, NULL); Index: vino-3.8.1/capplet/vino-preferences.c =================================================================== --- vino-3.8.1.orig/capplet/vino-preferences.c 2013-11-18 15:14:13.574555625 +0100 +++ vino-3.8.1/capplet/vino-preferences.c 2013-11-18 15:14:27.000000000 +0100 @@ -232,7 +232,7 @@ case GTK_RESPONSE_HELP: screen = gtk_widget_get_screen (widget); - if (!gtk_show_uri (screen, "help:gnome-help/sharing-desktop", + if (!gtk_show_uri (screen, "help:ubuntu-help/sharing-desktop", GDK_CURRENT_TIME, &error)) { GtkWidget *message_dialog; debian/patches/nodisplay_autostart.patch0000644000000000000000000000131712242425046015751 0ustar Description: Clean up Startup Applications dialog by hiding default apps Author: Michael Terry Bug-Ubuntu: https://launchpad.net/bugs/803917 Forwarded: not-needed Index: vino-3.8.1/server/vino-server.desktop.in.in =================================================================== --- vino-3.8.1.orig/server/vino-server.desktop.in.in 2013-11-18 15:14:13.662555621 +0100 +++ vino-3.8.1/server/vino-server.desktop.in.in 2013-11-18 15:15:13.826553021 +0100 @@ -2,6 +2,7 @@ _Name=Desktop Sharing _Comment=GNOME Desktop Sharing Server _Keywords=vnc;share;remote; +NoDisplay=true Exec=@LIBEXECDIR@/vino-server --sm-disable Icon=preferences-desktop-remote-desktop OnlyShowIn=GNOME;Unity; debian/patches/05_use-system-miniupnpc.patch0000644000000000000000000001266112242425046016267 0ustar Description: Use system-installed miniupnpc instead of bundled library Needs to be made optional before forwarding upstream, see https://trac.transmissionbt.com/ticket/4323 for similar code Author: Jeremy Bicha Forwarded: no Index: vino-3.8.1/Makefile.am =================================================================== --- vino-3.8.1.orig/Makefile.am 2013-11-18 15:14:13.546555626 +0100 +++ vino-3.8.1/Makefile.am 2013-11-18 15:15:34.000000000 +0100 @@ -39,29 +39,6 @@ server/smclient/eggdesktopfile.c \ server/smclient/eggdesktopfile.h -VINO_MINIUPNP_cppflags = -DNDEBUG - -VINO_MINIUPNP_sources = \ - server/miniupnp/bsdqueue.h \ - server/miniupnp/codelength.h \ - server/miniupnp/declspec.h \ - server/miniupnp/igd_desc_parse.c \ - server/miniupnp/igd_desc_parse.h \ - server/miniupnp/minisoap.c \ - server/miniupnp/minisoap.h \ - server/miniupnp/minissdpc.c \ - server/miniupnp/minissdpc.h \ - server/miniupnp/miniupnpc.c \ - server/miniupnp/miniupnpc.h \ - server/miniupnp/miniwget.c \ - server/miniupnp/miniwget.h \ - server/miniupnp/minixml.c \ - server/miniupnp/minixml.h \ - server/miniupnp/upnpcommands.c \ - server/miniupnp/upnpcommands.h \ - server/miniupnp/upnpreplyparse.c \ - server/miniupnp/upnpreplyparse.h - if VINO_HAVE_SELF_IFADDRS VINO_IFADDRS_sources = \ server/libvncserver/ifaddr/getifaddrs.c \ @@ -104,12 +81,10 @@ -I$(top_srcdir) \ -I$(top_srcdir)/common \ -I$(top_srcdir)/server/libvncserver \ - -I$(top_srcdir)/server/miniupnp \ -I$(top_srcdir)/server/smclient \ -I$(top_builddir) \ -I$(top_builddir)/server \ $(VINO_SERVER_CFLAGS) \ - $(VINO_MINIUPNP_cppflags) \ $(LIBGCRYPT_CFLAGS) \ $(WARN_CFLAGS) \ $(DISABLE_DEPRECATED) \ @@ -125,6 +100,7 @@ $(VINO_SERVER_LIBS) \ $(LIBGCRYPT_LIBS) \ $(JPEG_LIBS) \ + $(LIBUPNP_LIBS) \ $(X_LIBS) $(XTEST_LIBS) $(XSHM_LIBS) $(XDAMAGE_LIBS) $(ZLIB_LIBS) if VINO_ENABLE_HTTP_SERVER @@ -177,7 +153,6 @@ server/vino-dbus-error.h \ server/vino-upnp.h \ server/vino-upnp.c \ - $(VINO_MINIUPNP_sources) \ $(VINO_IFADDR_sources) \ $(VINO_LIBVNCSERVER_sources) \ $(VINO_HTTP_sources) \ @@ -346,8 +321,6 @@ server/libvncserver/tabletranstemplate.c \ server/libvncserver/tableinitcmtemplate.c \ server/libvncserver/zrleencodetemplate.c \ - server/miniupnp/README \ - server/miniupnp/LICENCE \ \ ChangeLog.pre-git \ intltool-extract.in \ Index: vino-3.8.1/configure.ac =================================================================== --- vino-3.8.1.orig/configure.ac 2013-11-18 15:14:13.546555626 +0100 +++ vino-3.8.1/configure.ac 2013-11-18 15:15:34.000000000 +0100 @@ -296,6 +296,13 @@ [AC_MSG_ERROR([IPv6 support requested but not found])])]) AC_MSG_RESULT([$have_ipv6]) +dnl ---------------------------------------------------------------------------- +dnl +dnl Allow use of system miniupnp library + +LIBUPNP_LIBS="-lminiupnpc" +AC_SUBST(LIBUPNP_LIBS) + # GNOME libraries GTK_VERSION=3.0.0 GLIB_VERSION=2.17.0 Index: vino-3.8.1/server/vino-upnp.c =================================================================== --- vino-3.8.1.orig/server/vino-upnp.c 2013-11-18 15:14:13.546555626 +0100 +++ vino-3.8.1/server/vino-upnp.c 2013-11-18 15:14:13.542555626 +0100 @@ -27,8 +27,8 @@ #endif #include -#include "miniupnp/miniupnpc.h" -#include "miniupnp/upnpcommands.h" +#include +#include #ifdef VINO_HAVE_NETWORKMANAGER #include @@ -75,6 +75,7 @@ { struct UPNPDev * devlist; int res; + int upnperror = 0; if (upnp->priv->have_igd) return TRUE; @@ -82,7 +83,7 @@ clean_upnp_data (upnp); dprintf (UPNP, "UPnP: Doing the discovery... "); - devlist = upnpDiscover (2000, NULL, NULL, 0); + devlist = upnpDiscover (2000, NULL, NULL, 0, 0, &upnperror); if (!devlist) { dprintf (UPNP, "nothing found, aborting."); @@ -207,7 +208,7 @@ return NULL; UPNP_GetExternalIPAddress (upnp->priv->urls->controlURL, - upnp->priv->data->servicetype, + upnp->priv->data->first.servicetype, ip); if (ip[0]) if (strcmp (ip, "0.0.0.0") == 0) @@ -238,11 +239,14 @@ ext_port = g_strdup_printf ("%d", local_port); dprintf (UPNP, "UPnP: Trying to forward port %d...: ", local_port); UPNP_GetSpecificPortMappingEntry (upnp->priv->urls->controlURL, - upnp->priv->data->servicetype, + upnp->priv->data->first.servicetype, ext_port, "TCP", int_client_tmp, - int_port_tmp); + int_port_tmp, + NULL, + NULL, + NULL); if ( (strcmp (int_client_tmp, upnp->priv->lanaddr) == 0) && (strcmp (int_port_tmp, ext_port) == 0) ) { dprintf (UPNP, "UPnP: Found a previous redirect\n"); @@ -274,12 +278,14 @@ g_get_host_name ()); err = UPNP_AddPortMapping (upnp->priv->urls->controlURL, - upnp->priv->data->servicetype, + upnp->priv->data->first.servicetype, ext_port, int_port, upnp->priv->lanaddr, desc, - "TCP"); + "TCP", + NULL, + NULL); if (err == 0) { upnp->priv->port = local_port; @@ -312,9 +318,10 @@ port = g_strdup_printf ("%d", upnp->priv->port); err = UPNP_DeletePortMapping (upnp->priv->urls->controlURL, - upnp->priv->data->servicetype, + upnp->priv->data->first.servicetype, port, - "TCP"); + "TCP", + NULL); if (err == 0) dprintf (UPNP, "UPnP: Removed forwarded port %d\n", upnp->priv->port); else debian/patches/CVE-2013-5745.patch0000644000000000000000000000217312242425046013244 0ustar From 51435d3f946d6d2b99b876b7919b9d41022fc408 Mon Sep 17 00:00:00 2001 From: David King Date: Wed, 11 Sep 2013 15:08:47 +0000 Subject: Reject new clients if in the deferred state As mentioned in bug 641811, Vino can get stuck trying to process the same data in an infinite loop if an authentication request is received from a client while that client is in the deferred state. Avoid this situation by closing new connections from the same client when it is in the deferred state. --- Index: vino-3.8.1/server/libvncserver/rfbserver.c =================================================================== --- vino-3.8.1.orig/server/libvncserver/rfbserver.c 2013-11-18 15:14:13.714555619 +0100 +++ vino-3.8.1/server/libvncserver/rfbserver.c 2013-11-18 15:14:13.706555619 +0100 @@ -387,7 +387,8 @@ rfbAuthProcessClientMessage(cl); return; case RFB_AUTH_DEFERRED: - rfbLog("Authentication deferred - ignoring client message\n"); + rfbLog("Authentication deferred for this client - closing connection\n"); + rfbCloseClient(cl); return; case RFB_INITIALISATION: rfbProcessClientInitMessage(cl); debian/patches/11_hurd_maxhostnamelen.patch0000644000000000000000000001103612242425046016206 0ustar Index: vino-3.8.1/server/miniupnp/miniupnpc.c =================================================================== --- vino-3.8.1.orig/server/miniupnp/miniupnpc.c 2013-11-18 15:14:13.602555624 +0100 +++ vino-3.8.1/server/miniupnp/miniupnpc.c 2013-11-18 15:14:13.598555624 +0100 @@ -13,7 +13,6 @@ #include #define snprintf _snprintf #define strncasecmp memicmp -#define MAXHOSTNAMELEN 64 #else #include #include @@ -132,7 +131,7 @@ char * buffer, int * bufsize) { struct sockaddr_in dest; - char hostname[MAXHOSTNAMELEN+1]; + char *hostname; unsigned short port = 0; char * path; char soapact[128]; @@ -206,7 +205,7 @@ strncpy(p, ">\r\n", soapbody + sizeof(soapbody) - p); } - if(!parseURL(url, hostname, &port, &path)) return -1; + if(!parseURL(url, &hostname, &port, &path)) return -1; if(s<0) { s = socket(PF_INET, SOCK_STREAM, 0); @@ -214,6 +213,7 @@ { PRINT_SOCKET_ERROR("socket"); *bufsize = 0; + free (hostname); return -1; } dest.sin_family = AF_INET; @@ -224,11 +224,13 @@ PRINT_SOCKET_ERROR("connect"); closesocket(s); *bufsize = 0; + free (hostname); return -1; } } n = soapPostSubmit(s, path, hostname, port, soapact, soapbody); + free (hostname); if(n<=0) { #ifdef DEBUG printf("Error sending SOAP request\n"); Index: vino-3.8.1/server/miniupnp/miniwget.c =================================================================== --- vino-3.8.1.orig/server/miniupnp/miniwget.c 2013-11-18 15:14:13.602555624 +0100 +++ vino-3.8.1/server/miniupnp/miniwget.c 2013-11-18 15:14:13.598555624 +0100 @@ -15,7 +15,6 @@ #ifdef WIN32 #include #include -#define MAXHOSTNAMELEN 64 #define MIN(x,y) (((x)<(y))?(x):(y)) #define snprintf _snprintf #define herror @@ -151,14 +150,14 @@ /* parseURL() * arguments : * url : source string not modified - * hostname : hostname destination string (size of MAXHOSTNAMELEN+1) + * hostname : hostname destination string (must be freed by the caller if there was no error) * port : port (destination) * path : pointer to the path part of the URL * * Return values : * 0 - Failure * 1 - Success */ -int parseURL(const char * url, char * hostname, unsigned short * port, char * * path) +int parseURL(const char * url, char ** hostname, unsigned short * port, char * * path) { char * p1, *p2, *p3; p1 = strstr(url, "://"); @@ -172,15 +171,18 @@ p3 = strchr(p1, '/'); if(!p3) return 0; - memset(hostname, 0, MAXHOSTNAMELEN + 1); if(!p2 || (p2>p3)) { - strncpy(hostname, p1, MIN(MAXHOSTNAMELEN, (int)(p3-p1))); + *hostname = malloc ((int)(p3-p1) + 1); + strncpy(*hostname, p1, (int)(p3-p1)); + (*hostname)[(int)(p3-p1)] = '\0'; *port = 80; } else { - strncpy(hostname, p1, MIN(MAXHOSTNAMELEN, (int)(p2-p1))); + *hostname = malloc ((int)(p2-p1) + 1); + strncpy(*hostname, p1, (int)(p2-p1)); + (*hostname)[(int)(p2-p1)] = '\0'; *port = 0; p2++; while( (*p2 >= '0') && (*p2 <= '9')) @@ -199,11 +201,14 @@ unsigned short port; char * path; /* protocol://host:port/chemin */ - char hostname[MAXHOSTNAMELEN+1]; + char *hostname; + void *ret; *size = 0; - if(!parseURL(url, hostname, &port, &path)) + if(!parseURL(url, &hostname, &port, &path)) return NULL; - return miniwget2(url, hostname, port, path, size, 0, 0); + ret = miniwget2(url, hostname, port, path, size, 0, 0); + free (hostname); + return ret; } void * miniwget_getaddr(const char * url, int * size, char * addr, int addrlen) @@ -211,12 +216,15 @@ unsigned short port; char * path; /* protocol://host:port/chemin */ - char hostname[MAXHOSTNAMELEN+1]; + char *hostname; + void *ret; *size = 0; if(addr) addr[0] = '\0'; - if(!parseURL(url, hostname, &port, &path)) + if(!parseURL(url, &hostname, &port, &path)) return NULL; - return miniwget2(url, hostname, port, path, size, addr, addrlen); + ret = miniwget2(url, hostname, port, path, size, addr, addrlen); + free (hostname); + return ret; } Index: vino-3.8.1/server/miniupnp/miniwget.h =================================================================== --- vino-3.8.1.orig/server/miniupnp/miniwget.h 2013-11-18 15:14:13.602555624 +0100 +++ vino-3.8.1/server/miniupnp/miniwget.h 2013-11-18 15:14:13.598555624 +0100 @@ -18,7 +18,7 @@ LIBSPEC void * miniwget_getaddr(const char *, int *, char *, int); -int parseURL(const char *, char *, unsigned short *, char * *); +int parseURL(const char *, char **, unsigned short *, char * *); #ifdef __cplusplus } debian/patches/series0000644000000000000000000000042212242425046012031 0ustar 02_server_sm-disable.patch 05_use-system-miniupnpc.patch 06_use-ubuntu-help.patch 11_hurd_maxhostnamelen.patch 12_app-indicators-only.patch nodisplay_autostart.patch disable_webservices_check.patch CVE-2013-5745.patch revert_use_prompt_notification.patch git_tls_read.patch debian/patches/git_tls_read.patch0000644000000000000000000000630412242425046014302 0ustar From 3b38cf49321924ff2ec657a6e4db8a1932245ef9 Mon Sep 17 00:00:00 2001 From: Daniel P. Berrange Date: Mon, 16 Sep 2013 15:44:30 +0000 Subject: Fix reading of TLS data to account for cached data When you ask GnuTLS to read 'n' bytes of data it is free to read many more than just 'n' bytes, since there is no 1-1 mapping between encrypted and unencrypted byte counts. The Vino I/O handle triggered when POLLIN reads one single RFB message, then checks if POLLIN is still set. This is broken if gnutls has previously read more than one RFB message worth of data. A symptom of this brokeness is that when connecting to a Vino server with gtk-vnc, the screen will be initially black until the user moves the mouse or presses a key. Even then there will be periodic delays in updates if the pending data condition arises again. Fortunately GnuTLS has a function gnutls_record_check_pending which lets apps determine if there is any cached data read off the wire. Signed-off-by: Daniel P. Berrange https://bugzilla.gnome.org/show_bug.cgi?id=703326 --- diff --git a/server/libvncserver/rfb/rfb.h b/server/libvncserver/rfb/rfb.h index 368a4cf..0de79a4 100644 --- a/server/libvncserver/rfb/rfb.h +++ b/server/libvncserver/rfb/rfb.h @@ -397,6 +397,7 @@ extern void rfbSetLocalOnly(rfbScreenInfoPtr rfbScreen, rfbBool localOnly); extern void rfbCloseClient(rfbClientPtr cl); extern int ReadExact(rfbClientPtr cl, char *buf, int len); extern int ReadExactTimeout(rfbClientPtr cl, char *buf, int len,int timeout); +extern int ReadPending(rfbClientPtr cl); extern int WriteExact(rfbClientPtr cl, const char *buf, int len); extern void rfbProcessNewConnection(rfbScreenInfoPtr rfbScreen, int insock); extern void rfbCheckFds(rfbScreenInfoPtr rfbScreen,long usec); diff --git a/server/libvncserver/sockets.c b/server/libvncserver/sockets.c index bbdaf3d..746a3e5 100644 --- a/server/libvncserver/sockets.c +++ b/server/libvncserver/sockets.c @@ -457,6 +457,21 @@ int ReadExact(rfbClientPtr cl,char* buf,int len) } #ifdef VINO_HAVE_GNUTLS +extern int ReadPending(rfbClientPtr cl) +{ + if (cl->useTLS && cl->tlsSession) + return gnutls_record_check_pending(cl->tlsSession); + else + return 0; +} +#else +extern int ReadPending(rfbClientPtr cl) +{ + return 0; +} +#endif + +#ifdef VINO_HAVE_GNUTLS static int WriteExactOverTLS(rfbClientPtr cl, const char* buf, int len) { diff --git a/server/vino-server.c b/server/vino-server.c index fc70e68..a3edf9d 100644 --- a/server/vino-server.c +++ b/server/vino-server.c @@ -445,9 +445,12 @@ vino_server_update_client_timeout (rfbClientPtr rfb_client) } static inline gboolean -more_data_pending (int fd) +more_data_pending (rfbClientPtr rfb_client) { - struct pollfd pollfd = { fd, POLLIN|POLLPRI, 0 }; + struct pollfd pollfd = { rfb_client->sock, POLLIN|POLLPRI, 0 }; + + if (ReadPending(rfb_client) > 0) + return TRUE; return poll (&pollfd, 1, 0) == 1; } @@ -462,7 +465,7 @@ vino_server_client_data_pending (GIOChannel *source, do { rfbProcessClientMessage (rfb_client); - } while (more_data_pending (rfb_client->sock)); + } while (more_data_pending (rfb_client)); return vino_server_update_client (rfb_client); } debian/patches/revert_use_prompt_notification.patch0000644000000000000000000003315112242425046020174 0ustar Index: vino-3.8.1/Makefile.am =================================================================== --- vino-3.8.1.orig/Makefile.am 2013-11-18 15:14:13.738555618 +0100 +++ vino-3.8.1/Makefile.am 2013-11-18 15:14:13.734555618 +0100 @@ -274,7 +274,8 @@ uidir = $(pkgdatadir) dist_ui_DATA = \ capplet/vino-preferences.ui \ - capplet/webservices + capplet/webservices \ + server/vino-prompt.ui autostartdir = $(sysconfdir)/xdg/autostart autostart_in_files = server/vino-server.desktop.in Index: vino-3.8.1/server/vino-prompt.c =================================================================== --- vino-3.8.1.orig/server/vino-prompt.c 2013-11-18 15:14:13.738555618 +0100 +++ vino-3.8.1/server/vino-prompt.c 2013-11-18 15:14:13.734555618 +0100 @@ -25,17 +25,18 @@ #include "vino-prompt.h" #include -#include #include "vino-util.h" #include "vino-enums.h" #include "vino-marshal.h" struct _VinoPromptPrivate { - GdkScreen *screen; - NotifyNotification *notification; - rfbClientPtr current_client; - GSList *pending_clients; + GdkScreen *screen; + GtkWidget *dialog; + GtkWidget *sharing_icon; + GtkWidget *host_label; + rfbClientPtr current_client; + GSList *pending_clients; }; enum @@ -58,14 +59,6 @@ G_DEFINE_TYPE (VinoPrompt, vino_prompt, G_TYPE_OBJECT); static void -clear_notification (VinoPrompt *prompt) -{ - if (prompt->priv->notification) - notify_notification_close (prompt->priv->notification, NULL); - g_clear_object (&prompt->priv->notification); -} - -static void vino_prompt_finalize (GObject *object) { VinoPrompt *prompt = VINO_PROMPT (object); @@ -73,7 +66,11 @@ g_slist_free (prompt->priv->pending_clients); prompt->priv->pending_clients = NULL; - clear_notification (prompt); + if (prompt->priv->dialog) + gtk_widget_destroy (prompt->priv->dialog); + prompt->priv->dialog = NULL; + prompt->priv->sharing_icon = NULL; + prompt->priv->host_label = NULL; g_free (prompt->priv); prompt->priv = NULL; @@ -225,27 +222,36 @@ } static void -vino_prompt_handle_response (NotifyNotification *notification, - char *response, - gpointer user_data) +vino_prompt_handle_dialog_response (VinoPrompt *prompt, + int response, + GtkDialog *dialog) { - VinoPrompt *prompt = user_data; rfbClientPtr rfb_client; int prompt_response = VINO_RESPONSE_INVALID; dprintf (PROMPT, "Got a response for client %p: %s\n", prompt->priv->current_client, - response); + response == GTK_RESPONSE_ACCEPT ? "accept" : + response == GTK_RESPONSE_REJECT ? "reject" : "unknown"); - if (g_strcmp0 (response, "accept") == 0) - prompt_response = VINO_RESPONSE_ACCEPT; - else - prompt_response = VINO_RESPONSE_REJECT; + switch (response) + { + case GTK_RESPONSE_ACCEPT: + prompt_response = VINO_RESPONSE_ACCEPT; + break; + case GTK_RESPONSE_REJECT: + default: + prompt_response = VINO_RESPONSE_REJECT; + break; + } rfb_client = prompt->priv->current_client; prompt->priv->current_client = NULL; - clear_notification (prompt); + prompt->priv->dialog = NULL; + prompt->priv->sharing_icon = NULL; + prompt->priv->host_label = NULL; + gtk_widget_destroy (GTK_WIDGET (dialog)); if (rfb_client != NULL) { @@ -255,16 +261,67 @@ vino_prompt_process_pending_clients (prompt); } +static void +vino_prompt_setup_icons (VinoPrompt *prompt, + GtkBuilder *builder) +{ +#define ICON_SIZE_STANDARD 48 + + prompt->priv->sharing_icon = GTK_WIDGET (gtk_builder_get_object (builder, + "sharing_icon")); + g_assert (prompt->priv->sharing_icon != NULL); + + gtk_window_set_icon_name (GTK_WINDOW (prompt->priv->dialog), + "preferences-desktop-remote-desktop"); + gtk_image_set_from_icon_name (GTK_IMAGE (prompt->priv->sharing_icon), + "preferences-desktop-remote-desktop", GTK_ICON_SIZE_DIALOG); + +#undef ICON_SIZE_STANDARD +} + static gboolean vino_prompt_setup_dialog (VinoPrompt *prompt) { - if (!notify_is_initted () && !notify_init (g_get_application_name ())) - { - g_printerr (_("Error initializing libnotify\n")); - return FALSE; - } +#define VINO_UI_FILE "vino-prompt.ui" + + GtkBuilder *builder; + const char *ui_file; + GtkWidget *help_button; + GError *error = NULL; + + if (g_file_test (VINO_UI_FILE, G_FILE_TEST_EXISTS)) + ui_file = VINO_UI_FILE; + else + ui_file = VINO_UIDIR "/" VINO_UI_FILE; + + builder = gtk_builder_new (); + if (!gtk_builder_add_from_file (builder, ui_file, &error)) + { + g_warning ("Unable to locate ui file '%s'", ui_file); + g_error_free (error); + return FALSE; + } + + prompt->priv->dialog = GTK_WIDGET (gtk_builder_get_object (builder, "vino_dialog")); + g_assert (prompt->priv->dialog != NULL); + + g_signal_connect_swapped (prompt->priv->dialog, "response", + G_CALLBACK (vino_prompt_handle_dialog_response), prompt); + + vino_prompt_setup_icons (prompt, builder); + + prompt->priv->host_label = GTK_WIDGET (gtk_builder_get_object (builder, "host_label")); + g_assert (prompt->priv->host_label != NULL); + + help_button = GTK_WIDGET (gtk_builder_get_object (builder, "help_button")); + g_assert (help_button != NULL); + gtk_widget_hide (help_button); + + g_object_unref (builder); return TRUE; + +#undef VINO_UI_FILE } static gboolean @@ -274,7 +331,13 @@ char *host_label; if (prompt->priv->current_client) - return prompt->priv->current_client == rfb_client; + { + g_assert (prompt->priv->dialog); + gtk_window_present (GTK_WINDOW (prompt->priv->dialog)); + return prompt->priv->current_client == rfb_client; + } + + g_assert (prompt->priv->dialog == NULL); if (!vino_prompt_setup_dialog (prompt)) return FALSE; @@ -282,28 +345,13 @@ host_label = g_strdup_printf (_("A user on the computer '%s' is trying to remotely view or control your desktop."), rfb_client->host); - prompt->priv->notification = notify_notification_new (_("Another user is trying to view your desktop."), - host_label, - "preferences-desktop-remote-desktop"); - notify_notification_set_hint_string (prompt->priv->notification, "desktop-entry", "vino-server"); - notify_notification_add_action (prompt->priv->notification, - "refuse", - _("Refuse"), - vino_prompt_handle_response, - prompt, - NULL); - notify_notification_add_action (prompt->priv->notification, - "accept", - _("Accept"), - vino_prompt_handle_response, - prompt, - NULL); + gtk_label_set_text (GTK_LABEL (prompt->priv->host_label), host_label); g_free (host_label); prompt->priv->current_client = rfb_client; - notify_notification_show (prompt->priv->notification, NULL); + gtk_widget_show_all (prompt->priv->dialog); dprintf (PROMPT, "Prompting for client %p\n", rfb_client); @@ -335,7 +383,11 @@ if (prompt->priv->current_client == rfb_client) { - clear_notification (prompt); + g_assert (prompt->priv->dialog != NULL); + + gtk_widget_destroy (prompt->priv->dialog); + prompt->priv->dialog = NULL; + prompt->priv->current_client = NULL; } else { Index: vino-3.8.1/server/vino-prompt.ui =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ vino-3.8.1/server/vino-prompt.ui 2013-11-18 15:14:13.734555618 +0100 @@ -0,0 +1,137 @@ + + + + + + 5 + Question + False + GDK_WINDOW_TYPE_HINT_NORMAL + + + True + vertical + + + True + horizontal + 12 + 12 + + + True + 0 + gtk-missing-image + + + + + True + vertical + 6 + + + True + 0 + Another user is trying to view your desktop. + + + + + True + + + False + False + + + + + True + 0 + A user on another computer is trying to remotely view or control your desktop. + True + + + False + False + 1 + + + + + True + 0 + Do you want to allow them to do so? + True + + + False + False + 2 + + + + + 1 + + + + + 1 + + + + + True + GTK_BUTTONBOX_END + + + True + True + True + gtk-help + True + + + + + True + True + True + True + True + _Refuse + True + + + 1 + + + + + True + True + True + _Allow + True + + + 2 + + + + + False + GTK_PACK_END + + + + + + help_button + refuse_button + allow_button + + + debian/patches/disable_webservices_check.patch0000644000000000000000000000357212242425046017007 0ustar From: Mathieu Trudel-Lapierre Subject: Really disable the connectivity check. Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/vino/+bug/608701 This was disabled upstream due to IPv4/IPv6 reachability concerns with the implementation of the external webservices. However, it's not been totally disabled: just the message update from the check result was removed. Completely disable the connectivity check so that no traffic is sent out, since any such check done silently really isn't very nice. --- capplet/vino-preferences.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) Index: vino-3.8.1/capplet/vino-preferences.c =================================================================== --- vino-3.8.1.orig/capplet/vino-preferences.c 2013-11-18 15:14:13.686555620 +0100 +++ vino-3.8.1/capplet/vino-preferences.c 2013-11-18 15:14:13.682555620 +0100 @@ -382,11 +382,11 @@ g_signal_connect (window, "response", G_CALLBACK (vino_preferences_dialog_response), NULL); - app->info = vino_connectivity_info_new (gdk_screen_get_number (gtk_window_get_screen (window))); /* Remove reporting of reachability from network to workaround GNOME bug * 596190. * TODO: Fix the bug and remove this workaround. */ #if 0 + app->info = vino_connectivity_info_new (gdk_screen_get_number (gtk_window_get_screen (window))); g_signal_connect (app->info, "changed", G_CALLBACK (vino_preferences_info_changed), gtk_builder_get_object (builder, "message")); @@ -436,7 +436,12 @@ { VinoPreferences *app = (VinoPreferences *) object; +/* Remove reporting of reachability from network to workaround GNOME bug + * 596190. + * TODO: Fix the bug and remove this workaround. */ +#if 0 g_object_unref (app->info); +#endif G_OBJECT_CLASS (vino_preferences_parent_class)->finalize (object); }