diff -Nru vino-3.4.0/debian/changelog vino-3.4.0/debian/changelog --- vino-3.4.0/debian/changelog 2012-03-27 00:57:59.000000000 +0000 +++ vino-3.4.0/debian/changelog 2012-03-29 17:11:19.000000000 +0000 @@ -1,3 +1,11 @@ +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: diff -Nru vino-3.4.0/debian/patches/12_app-indicators-only.patch vino-3.4.0/debian/patches/12_app-indicators-only.patch --- vino-3.4.0/debian/patches/12_app-indicators-only.patch 2012-03-27 00:57:59.000000000 +0000 +++ vino-3.4.0/debian/patches/12_app-indicators-only.patch 2012-03-29 17:11:19.000000000 +0000 @@ -1,79 +1,39 @@ -=== modified file 'configure.in' -Index: vino-2.32.1/configure.in +--- + Makefile.am | 13 + configure.ac | 17 + 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 | 6 + server/vino-tube-servers-manager.c | 4 + 13 files changed, 1462 insertions(+), 3 deletions(-) + +Index: b/server/vino-tube-server.h =================================================================== ---- vino-2.32.1.orig/configure.in 2010-12-24 00:54:26.000000000 +1100 -+++ vino-2.32.1/configure.in 2011-01-05 11:25:36.266705402 +1100 -@@ -112,6 +112,23 @@ - fi - fi - -+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, -+ appindicator-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) -+ - dnl -- check for NetworkManager ----------------------------------------------- - AC_ARG_ENABLE(network-manager, - AS_HELP_STRING([--enable-network-manager],[use NetworkManager to be notified when network status changes [default=auto]]), -@@ -442,4 +459,5 @@ - Libunique support...........: ${have_libunique} - DEBUG messages..............: ${enable_debug} - Telepathy support...........: ${have_telepathy} -+ Application indicator support: ${enable_appindicator} - " -Index: vino-2.32.1/server/Makefile.am -=================================================================== ---- vino-2.32.1.orig/server/Makefile.am 2010-07-02 08:13:38.000000000 +1000 -+++ vino-2.32.1/server/Makefile.am 2011-01-05 11:25:36.266705402 +1100 -@@ -67,6 +67,7 @@ - vino-server.h \ - vino-util.c \ - vino-util.h \ -+ vino-icon-visibility.h \ - vino-status-icon.c \ - vino-status-icon.h \ - vino-dbus-listener.c \ -@@ -97,6 +98,12 @@ - - endif - -+if VINO_ENABLE_APP_INDICATOR -+INCLUDES += $(APP_INDICATOR_CFLAGS) -DVINO_ENABLE_APP_INDICATOR -+vino_server_LDADD += $(APP_INDICATOR_LIBS) -+vino_server_SOURCES += vino-tube-app-indicator.c vino-tube-app-indicator.h vino-app-indicator.c vino-app-indicator.h -+endif +--- a/server/vino-tube-server.h ++++ b/server/vino-tube-server.h +@@ -27,6 +27,10 @@ + + #include "vino-types.h" + #include "vino-server.h" + - dbus-interface-glue.h: dbus-interface.xml - dbus-binding-tool --prefix=vino_dbus_listener --mode=glib-server $< > dbus-interface-glue.h - -@@ -110,8 +117,8 @@ - vino_enum_headers = \ - $(top_srcdir)/server/vino-server.h \ - $(top_srcdir)/server/vino-prompt.h \ -- $(top_srcdir)/server/vino-status-icon.h \ -- $(top_srcdir)/server/vino-status-tube-icon.h \ -+ $(top_srcdir)/server/vino-icon-visibility.h \ -+ $(top_srcdir)/server/vino-tube-icon-visibility.h \ - $(NULL) - - vino-enums.c: @REBUILD@ $(vino_enum_headers) -Index: vino-2.32.1/server/vino-app-indicator.c ++#ifdef VINO_ENABLE_APP_INDICATOR ++#include "vino-tube-app-indicator.h" ++#endif + #include "vino-status-tube-icon.h" + + G_BEGIN_DECLS +Index: b/server/vino-app-indicator.c =================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ vino-2.32.1/server/vino-app-indicator.c 2011-01-05 11:25:36.266705402 +1100 -@@ -0,0 +1,701 @@ +--- /dev/null ++++ b/server/vino-app-indicator.c +@@ -0,0 +1,712 @@ +/* + * Copyright (C) 2010 Canonical Ltd + * @@ -98,6 +58,7 @@ + +#include +#include ++#include +#include +#ifdef VINO_ENABLE_LIBNOTIFY +#include @@ -116,7 +77,7 @@ + VinoServer *server; + GSList *clients; + GtkWidget *disconnect_dialog; -+ VinoIconVisibility visibility; ++ VinoStatusIconVisibility visibility; + +#ifdef VINO_ENABLE_LIBNOTIFY + NotifyNotification *new_client_notification; @@ -201,11 +162,11 @@ + "%d people are connected", + n_clients), + n_clients); -+ visible = (visible) && ( (indicator->priv->visibility == VINO_ICON_VISIBILITY_CLIENT) || -+ (indicator->priv->visibility == VINO_ICON_VISIBILITY_ALWAYS) ); ++ 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_ICON_VISIBILITY_ALWAYS); ++ visible = visible && (indicator->priv->visibility == VINO_STATUS_ICON_VISIBILITY_ALWAYS); + + gtk_menu_item_set_label (GTK_MENU_ITEM (indicator->priv->status_menu_item), tooltip); + @@ -225,6 +186,9 @@ + "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); +} + @@ -294,16 +258,23 @@ +vino_app_indicator_preferences (VinoAppIndicator *indicator) +{ + GdkScreen *screen; ++ GDesktopAppInfo *info; ++ GdkAppLaunchContext *context; + GError *error = NULL; + -+ screen = gdk_screen_get_default (); -+ if (!gdk_spawn_command_line_on_screen (screen, "vino-preferences", &error)) ++ 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); ++ error->message, ++ NULL); + g_error_free (error); + } ++ ++ g_object_unref (info); ++ g_object_unref (context); +} + +static void @@ -367,7 +338,7 @@ + + gtk_show_about_dialog (NULL, + "comments", _("Share your desktop with other users"), -+ "version", VERSION, ++ "version", PACKAGE_VERSION, + "license", license, + "authors", authors, + "translator-credits", translators, @@ -460,7 +431,7 @@ + "%s", secondary_msg); + + g_signal_connect_swapped (indicator->priv->disconnect_dialog, "response", -+ G_CALLBACK (vino_app_indicator_disconnect_client), (gpointer) a); ++ G_CALLBACK (vino_app_indicator_disconnect_client), (gpointer) a); + gtk_widget_show_all (GTK_WIDGET (indicator->priv->disconnect_dialog)); + + g_free (primary_msg); @@ -646,8 +617,8 @@ + g_param_spec_enum ("visibility", + "Indicator visibility", + "When the indicator must be shown", -+ VINO_TYPE_ICON_VISIBILITY, -+ VINO_ICON_VISIBILITY_CLIENT, ++ VINO_TYPE_STATUS_ICON_VISIBILITY, ++ VINO_STATUS_ICON_VISIBILITY_ALWAYS, + G_PARAM_READWRITE | + G_PARAM_CONSTRUCT | + G_PARAM_STATIC_NAME | @@ -756,10 +727,10 @@ + +void +vino_app_indicator_set_visibility (VinoAppIndicator *indicator, -+ VinoIconVisibility visibility) ++ VinoStatusIconVisibility visibility) +{ + g_return_if_fail (VINO_IS_APP_INDICATOR (indicator)); -+ g_return_if_fail (visibility != VINO_ICON_VISIBILITY_INVALID); ++ g_return_if_fail (visibility != VINO_STATUS_ICON_VISIBILITY_INVALID); + + if (visibility != indicator->priv->visibility) + { @@ -768,18 +739,18 @@ + } +} + -+VinoIconVisibility ++guint +vino_app_indicator_get_visibility (VinoAppIndicator *indicator) +{ -+ g_return_val_if_fail (VINO_IS_APP_INDICATOR (indicator), VINO_ICON_VISIBILITY_INVALID); ++ g_return_val_if_fail (VINO_IS_APP_INDICATOR (indicator), VINO_STATUS_ICON_VISIBILITY_INVALID); + + return indicator->priv->visibility; +} -Index: vino-2.32.1/server/vino-app-indicator.h +Index: b/server/vino-app-indicator.h =================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ vino-2.32.1/server/vino-app-indicator.h 2011-01-05 11:25:36.266705402 +1100 -@@ -0,0 +1,74 @@ +--- /dev/null ++++ b/server/vino-app-indicator.h +@@ -0,0 +1,75 @@ +/* + * Copyright (C) 2010 Canonical Ltd + * @@ -806,7 +777,6 @@ +#define __VINO_APP_INDICATOR_H__ + +#include -+#include "vino-icon-visibility.h" + +G_BEGIN_DECLS + @@ -834,6 +804,7 @@ +}; + +#include "vino-server.h" ++#include "vino-status-icon.h" + +GType vino_app_indicator_get_type (void) G_GNUC_CONST; + @@ -847,134 +818,29 @@ + VinoClient *client); + +void vino_app_indicator_update_state (VinoAppIndicator *indicator); ++ +void vino_app_indicator_set_visibility (VinoAppIndicator *indicator, -+ VinoIconVisibility visibility); -+VinoIconVisibility vino_app_indicator_get_visibility (VinoAppIndicator *indicator); ++ VinoStatusIconVisibility visibility); ++VinoStatusIconVisibility vino_app_indicator_get_visibility (VinoAppIndicator *indicator); + +G_END_DECLS + +#endif /* __VINO_APP_INDICATOR_H__ */ -Index: vino-2.32.1/server/vino-icon-visibility.h -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ vino-2.32.1/server/vino-icon-visibility.h 2011-01-05 11:25:36.266705402 +1100 -@@ -0,0 +1,40 @@ -+/* -+ * Copyright (C) 2006 Jonh Wendell -+ * 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: -+ * Jonh Wendell -+ * Travis B. Hartwell -+ */ -+ -+#ifndef __VINO_ICON_VISIBILITY_H__ -+#define __VINO_ICON_VISIBILITY_H__ -+ -+G_BEGIN_DECLS -+ -+typedef enum -+{ -+ VINO_ICON_VISIBILITY_INVALID = 0, -+ VINO_ICON_VISIBILITY_ALWAYS, -+ VINO_ICON_VISIBILITY_CLIENT, -+ VINO_ICON_VISIBILITY_NEVER -+} VinoIconVisibility; -+ -+G_END_DECLS -+ -+#endif /* __VINO_ICON_VISIBILITY_H__ */ -Index: vino-2.32.1/server/vino-prefs.c +Index: b/server/vino-prefs.c =================================================================== ---- vino-2.32.1.orig/server/vino-prefs.c 2010-02-10 00:35:58.000000000 +1100 -+++ vino-2.32.1/server/vino-prefs.c 2011-01-05 11:25:36.266705402 +1100 -@@ -31,7 +31,11 @@ +--- a/server/vino-prefs.c ++++ b/server/vino-prefs.c +@@ -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" -+#else - #include "vino-status-icon.h" -+#endif /* VINO_ENABLE_APP_INDICATOR */ - #include "vino-background.h" - - #define VINO_PREFS_DIR "/desktop/gnome/remote_access" -@@ -72,7 +76,7 @@ - static gboolean vino_disable_background = FALSE; - static gboolean vino_use_upnp = TRUE; - static gboolean vino_disable_xdamage = FALSE; --static VinoStatusIconVisibility vino_icon_visibility = VINO_STATUS_ICON_VISIBILITY_CLIENT; -+static VinoIconVisibility vino_icon_visibility = VINO_ICON_VISIBILITY_CLIENT; - - static void - vino_prefs_enabled_changed (GConfClient *client, -@@ -375,17 +379,17 @@ - vino_server_set_lock_screen (l->data, lock_screen); - } - --static VinoStatusIconVisibility -+static VinoIconVisibility - vino_prefs_icon_visibility_from_string (const char *value) - { -- VinoStatusIconVisibility ret_value = VINO_STATUS_ICON_VISIBILITY_INVALID; -+ VinoIconVisibility ret_value = VINO_ICON_VISIBILITY_INVALID; - - if (!g_ascii_strcasecmp (value, "always")) -- ret_value = VINO_STATUS_ICON_VISIBILITY_ALWAYS; -+ ret_value = VINO_ICON_VISIBILITY_ALWAYS; - else if (!g_ascii_strcasecmp (value, "client")) -- ret_value = VINO_STATUS_ICON_VISIBILITY_CLIENT; -+ ret_value = VINO_ICON_VISIBILITY_CLIENT; - else if (!g_ascii_strcasecmp (value, "never")) -- ret_value = VINO_STATUS_ICON_VISIBILITY_NEVER; -+ ret_value = VINO_ICON_VISIBILITY_NEVER; - - return ret_value; - } -@@ -397,7 +401,7 @@ - { - const gchar *entry_str; - GSList *l; -- VinoStatusIconVisibility visibility; -+ VinoIconVisibility visibility; - - if (!entry->value || entry->value->type != GCONF_VALUE_STRING) - return; -@@ -414,10 +418,17 @@ - - for (l = vino_servers; l; l = l->next) - { -+#ifdef VINO_ENABLE_APP_INDICATOR -+ VinoAppIndicator *indicator; -+ -+ indicator = vino_server_get_app_indicator (l->data); -+ vino_app_indicator_set_visibility (indicator, visibility); -+#else - VinoStatusIcon *icon; - - icon = vino_server_get_status_icon (l->data); - vino_status_icon_set_visibility (icon, visibility); +#endif /* VINO_ENABLE_APP_INDICATOR */ - } - } + #include "vino-status-icon.h" -@@ -497,8 +508,11 @@ + static GSettings *settings = NULL; +@@ -52,7 +55,11 @@ VinoServer * vino_prefs_create_server (GdkScreen *screen) { VinoServer *server; @@ -982,88 +848,77 @@ + 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, - "prompt-enabled", vino_prompt_enabled, -@@ -525,8 +539,13 @@ - g_signal_connect (server, "notify::use-alternative-port", G_CALLBACK(vino_prefs_restart_mdns), NULL); - g_signal_connect (server, "notify::network-interface", G_CALLBACK (vino_prefs_restart_mdns), NULL); - +@@ -60,7 +67,11 @@ vino_prefs_create_server (GdkScreen *scr + "on-hold", TRUE, + "screen", screen, + NULL); +#ifdef VINO_ENABLE_APP_INDICATOR + indicator = vino_server_get_app_indicator (server); -+ vino_app_indicator_set_visibility (indicator, vino_icon_visibility); +#else icon = vino_server_get_status_icon (server); - vino_status_icon_set_visibility (icon, vino_icon_visibility); +#endif /* VINO_ENABLE_APP_INDICATOR */ - } - static void -Index: vino-2.32.1/server/vino-server.c + g_settings_bind (settings, "prompt-enabled", + server, "prompt-enabled", G_SETTINGS_BIND_GET); +@@ -93,8 +104,13 @@ vino_prefs_create_server (GdkScreen *scr + 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: b/server/vino-server.c =================================================================== ---- vino-2.32.1.orig/server/vino-server.c 2010-02-10 00:35:58.000000000 +1100 -+++ vino-2.32.1/server/vino-server.c 2011-01-05 11:25:36.266705402 +1100 -@@ -61,8 +61,13 @@ +--- a/server/vino-server.c ++++ b/server/vino-server.c +@@ -58,6 +58,9 @@ struct _VinoServerPrivate VinoFB *fb; VinoCursorData *cursor_data; VinoPrompt *prompt; +#ifdef VINO_ENABLE_APP_INDICATOR + VinoAppIndicator *indicator; -+ gboolean display_app_indicator; -+#else ++#endif /* VINO_ENABLE_APP_INDICATOR */ VinoStatusIcon *icon; gboolean display_status_icon; -+#endif /* VINO_ENABLE_APP_INDICATOR */ - VinoDBusListener *listener; - gboolean use_dbus_listener; VinoUpnp *upnp; -@@ -114,7 +119,11 @@ - PROP_ON_HOLD, - PROP_PROMPT_ENABLED, - PROP_VIEW_ONLY, -+#ifdef VINO_ENABLE_APP_INDICATOR -+ PROP_DISPLAY_APP_INDICATOR, -+#else - PROP_DISPLAY_STATUS_ICON, -+#endif /* VINO_ENABLE_APP_INDICATOR */ - PROP_USE_DBUS_LISTENER, - PROP_NETWORK_INTERFACE, - PROP_USE_ALTERNATIVE_PORT, -@@ -303,8 +312,13 @@ - vino_server_client_accepted (VinoServer *server, +@@ -302,7 +305,11 @@ vino_server_client_accepted (VinoServer VinoClient *client) { + if (server->priv->display_status_icon) +#ifdef VINO_ENABLE_APP_INDICATOR -+ if (server->priv->display_app_indicator) + vino_app_indicator_add_client (server->priv->indicator, client); +#else - if (server->priv->display_status_icon) vino_status_icon_add_client (server->priv->icon, client); +#endif /* VINO_ENABLE_APP_INDICATOR */ vino_server_unlock_screen (); -@@ -317,9 +331,15 @@ - vino_server_client_disconnected (VinoServer *server, - VinoClient *client) +@@ -317,7 +324,11 @@ vino_server_client_disconnected (VinoSer { + if (server->priv->display_status_icon) + { +#ifdef VINO_ENABLE_APP_INDICATOR -+ if (server->priv->display_app_indicator) -+ { + if (vino_app_indicator_remove_client (server->priv->indicator, client)) +#else - if (server->priv->display_status_icon) - { if (vino_status_icon_remove_client (server->priv->icon, client)) +#endif /* VINO_ENABLE_APP_INDICATOR */ { vino_server_lock_screen (server); -@@ -1122,9 +1142,15 @@ - g_object_unref (server->priv->listener); - server->priv->listener = NULL; +@@ -1126,9 +1137,15 @@ vino_server_finalize (GObject *object) + g_object_unref (server->priv->fb); + server->priv->fb = NULL; +#ifdef VINO_ENABLE_APP_INDICATOR + if (server->priv->indicator) @@ -1077,49 +932,26 @@ if (server->priv->upnp) g_object_unref (server->priv->upnp); -@@ -1159,9 +1185,15 @@ - case PROP_VIEW_ONLY: - vino_server_set_view_only (server, g_value_get_boolean (value)); - break; -+#ifdef VINO_ENABLE_APP_INDICATOR -+ case PROP_DISPLAY_APP_INDICATOR: -+ vino_server_set_display_app_indicator (server, g_value_get_boolean (value)); -+ break; -+#else - case PROP_DISPLAY_STATUS_ICON: - vino_server_set_display_status_icon (server, g_value_get_boolean (value)); - break; -+#endif /* VINO_ENABLE_APP_INDICATOR */ - case PROP_USE_DBUS_LISTENER: - vino_server_set_use_dbus_listener (server, g_value_get_boolean (value)); +@@ -1196,6 +1213,10 @@ vino_server_set_property (GObject * + case PROP_DISABLE_XDAMAGE: + vino_server_set_disable_xdamage (server, g_value_get_boolean (value)); break; -@@ -1223,9 +1255,15 @@ - case PROP_VIEW_ONLY: - g_value_set_boolean (value, server->priv->view_only); - break; -+#ifdef VINO_ENABLE_APP_INDICATOR -+ case PROP_DISPLAY_APP_INDICATOR: -+ g_value_set_boolean (value, server->priv->display_app_indicator); ++ case PROP_NOTIFY_ON_CONNECT: ++ server->priv->notify_on_connect = g_value_get_boolean (value); ++ g_object_notify (G_OBJECT (server), "notify-on-connect"); + break; -+#else - case PROP_DISPLAY_STATUS_ICON: - g_value_set_boolean (value, server->priv->display_status_icon); - break; -+#endif /* VINO_ENABLE_APP_INDICATOR */ - case PROP_USE_DBUS_LISTENER: - g_value_set_boolean (value, server->priv->use_dbus_listener); + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; -@@ -1278,10 +1316,17 @@ - else - server->priv->listener = NULL; +@@ -1275,9 +1296,15 @@ vino_server_constructed (GObject *object + VinoServer *server = VINO_SERVER (object); + if (server->priv->display_status_icon) +#ifdef VINO_ENABLE_APP_INDICATOR -+ if (server->priv->display_app_indicator) + server->priv->indicator = vino_app_indicator_new (server); + else + server->priv->indicator = NULL; +#else - if (server->priv->display_status_icon) server->priv->icon = vino_status_icon_new (server, server->priv->screen); else server->priv->icon = NULL; @@ -1127,58 +959,7 @@ } -@@ -1351,6 +1396,17 @@ - G_PARAM_STATIC_NICK | - G_PARAM_STATIC_BLURB)); - -+#ifdef VINO_ENABLE_APP_INDICATOR -+ g_object_class_install_property (gobject_class, -+ PROP_DISPLAY_APP_INDICATOR, -+ g_param_spec_boolean ("display-app-indicator", -+ "Display the application indicator", -+ "Allow to display the application indicator", -+ TRUE, -+ G_PARAM_READWRITE | -+ G_PARAM_CONSTRUCT | -+ G_PARAM_STATIC_STRINGS)); -+#else - g_object_class_install_property (gobject_class, - PROP_DISPLAY_STATUS_ICON, - g_param_spec_boolean ("display-status-icon", -@@ -1360,6 +1416,7 @@ - G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | - G_PARAM_STATIC_STRINGS)); -+#endif /* VINO_ENABLE_APP_INDICATOR */ - - g_object_class_install_property (gobject_class, - PROP_USE_DBUS_LISTENER, -@@ -1555,6 +1612,16 @@ - } - } - -+#ifdef VINO_ENABLE_APP_INDICATOR -+void -+vino_server_set_display_app_indicator (VinoServer *server, -+ gboolean display_app_indicator) -+{ -+ g_return_if_fail (VINO_IS_SERVER (server)); -+ -+ server->priv->display_app_indicator = display_app_indicator; -+} -+#else - void - vino_server_set_display_status_icon (VinoServer *server, - gboolean display_status_icon) -@@ -1563,6 +1630,7 @@ - - server->priv->display_status_icon = display_status_icon; - } -+#endif /* VINO_ENABLE_APP_INDICATOR */ - - void - vino_server_set_use_dbus_listener (VinoServer *server, -@@ -1707,8 +1775,13 @@ +@@ -1695,8 +1722,13 @@ vino_server_set_on_hold (VinoServer *ser g_object_notify (G_OBJECT (server), "on-hold"); @@ -1192,8 +973,8 @@ vino_server_control_upnp (server); } -@@ -1897,6 +1970,15 @@ - } +@@ -1910,6 +1942,16 @@ vino_server_get_notify_on_connect (VinoS + return server->priv->notify_on_connect; } +#ifdef VINO_ENABLE_APP_INDICATOR @@ -1204,230 +985,32 @@ + + return server->priv->indicator; +} -+#else ++#endif /* VINO_ENABLE_APP_INDICATOR */ ++ VinoStatusIcon * vino_server_get_status_icon (VinoServer *server) { -@@ -1904,4 +1986,4 @@ - - return server->priv->icon; - } -- -+#endif /* VINO_ENABLE_APP_INDICATOR */ -Index: vino-2.32.1/server/vino-server.h +Index: b/server/vino-server.h =================================================================== ---- vino-2.32.1.orig/server/vino-server.h 2010-02-10 00:35:58.000000000 +1100 -+++ vino-2.32.1/server/vino-server.h 2011-01-05 11:25:36.266705402 +1100 -@@ -79,8 +79,13 @@ - void vino_server_set_view_only (VinoServer *server, - gboolean view_only); - gboolean vino_server_get_view_only (VinoServer *server); -+#ifdef VINO_ENABLE_APP_INDICATOR -+void vino_server_set_display_app_indicator (VinoServer *server, -+ gboolean display_app_indicator); -+#else - void vino_server_set_display_status_icon (VinoServer *server, - gboolean display_status_icon); -+#endif /* VINO_ENABLE_APP_INDICATOR */ - void vino_server_set_use_dbus_listener (VinoServer *server, - gboolean use_dbus_listener); - gboolean vino_server_get_use_alternative_port (VinoServer *server); -@@ -120,8 +125,13 @@ - gboolean disable_xdamage); - gboolean vino_server_get_disable_xdamage (VinoServer *server); +--- a/server/vino-server.h ++++ b/server/vino-server.h +@@ -124,6 +124,11 @@ gboolean vino_server_get_dis + #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); -+#else - #include "vino-status-icon.h" - VinoStatusIcon *vino_server_get_status_icon (VinoServer *server); +#endif /* VINO_ENABLE_APP_INDICATOR */ - - G_CONST_RETURN char *vino_client_get_hostname (VinoClient *client); ++ + const char *vino_client_get_hostname (VinoClient *client); void vino_client_disconnect (VinoClient *client); -Index: vino-2.32.1/server/vino-status-icon.c -=================================================================== ---- vino-2.32.1.orig/server/vino-status-icon.c 2010-12-24 00:47:05.000000000 +1100 -+++ vino-2.32.1/server/vino-status-icon.c 2011-01-05 11:25:36.266705402 +1100 -@@ -39,7 +39,7 @@ - VinoServer *server; - GSList *clients; - GtkWidget *disconnect_dialog; -- VinoStatusIconVisibility visibility; -+ VinoIconVisibility visibility; - - #ifdef VINO_ENABLE_LIBNOTIFY - NotifyNotification *new_client_notification; -@@ -111,11 +111,11 @@ - "%d people are connected", - n_clients), - n_clients); -- visible = (visible) && ( (icon->priv->visibility == VINO_STATUS_ICON_VISIBILITY_CLIENT) || -- (icon->priv->visibility == VINO_STATUS_ICON_VISIBILITY_ALWAYS) ); -+ visible = (visible) && ( (icon->priv->visibility == VINO_ICON_VISIBILITY_CLIENT) || -+ (icon->priv->visibility == VINO_ICON_VISIBILITY_ALWAYS) ); - } - else -- visible = visible && (icon->priv->visibility == VINO_STATUS_ICON_VISIBILITY_ALWAYS); -+ visible = visible && (icon->priv->visibility == VINO_ICON_VISIBILITY_ALWAYS); - - gtk_status_icon_set_tooltip_text (GTK_STATUS_ICON (icon), tooltip); - gtk_status_icon_set_visible (GTK_STATUS_ICON (icon), visible); -@@ -544,8 +544,8 @@ - g_param_spec_enum ("visibility", - "Icon visibility", - "When the icon must be shown", -- VINO_TYPE_STATUS_ICON_VISIBILITY, -- VINO_STATUS_ICON_VISIBILITY_CLIENT, -+ VINO_TYPE_ICON_VISIBILITY, -+ VINO_ICON_VISIBILITY_CLIENT, - G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | - G_PARAM_STATIC_NAME | -@@ -660,10 +660,10 @@ - - void - vino_status_icon_set_visibility (VinoStatusIcon *icon, -- VinoStatusIconVisibility visibility) -+ VinoIconVisibility visibility) - { - g_return_if_fail (VINO_IS_STATUS_ICON (icon)); -- g_return_if_fail (visibility != VINO_STATUS_ICON_VISIBILITY_INVALID); -+ g_return_if_fail (visibility != VINO_ICON_VISIBILITY_INVALID); - - if (visibility != icon->priv->visibility) - { -@@ -672,10 +672,10 @@ - } - } - --VinoStatusIconVisibility -+VinoIconVisibility - vino_status_icon_get_visibility (VinoStatusIcon *icon) - { -- g_return_val_if_fail (VINO_IS_STATUS_ICON (icon), VINO_STATUS_ICON_VISIBILITY_INVALID); -+ g_return_val_if_fail (VINO_IS_STATUS_ICON (icon), VINO_ICON_VISIBILITY_INVALID); - - return icon->priv->visibility; - } -Index: vino-2.32.1/server/vino-status-icon.h -=================================================================== ---- vino-2.32.1.orig/server/vino-status-icon.h 2010-02-10 00:35:58.000000000 +1100 -+++ vino-2.32.1/server/vino-status-icon.h 2011-01-05 11:25:36.266705402 +1100 -@@ -24,17 +24,10 @@ - #define __VINO_STATUS_ICON_H__ - #include -+#include "vino-icon-visibility.h" - - G_BEGIN_DECLS - --typedef enum --{ -- VINO_STATUS_ICON_VISIBILITY_INVALID = 0, -- VINO_STATUS_ICON_VISIBILITY_ALWAYS, -- VINO_STATUS_ICON_VISIBILITY_CLIENT, -- VINO_STATUS_ICON_VISIBILITY_NEVER --} VinoStatusIconVisibility; -- - #define VINO_TYPE_STATUS_ICON (vino_status_icon_get_type ()) - #define VINO_STATUS_ICON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), VINO_TYPE_STATUS_ICON, VinoStatusIcon)) - #define VINO_STATUS_ICON_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), VINO_TYPE_STATUS_ICON, VinoStatusIconClass)) -@@ -74,8 +67,8 @@ - - void vino_status_icon_update_state (VinoStatusIcon *icon); - void vino_status_icon_set_visibility (VinoStatusIcon *icon, -- VinoStatusIconVisibility visibility); --VinoStatusIconVisibility vino_status_icon_get_visibility (VinoStatusIcon *icon); -+ VinoIconVisibility visibility); -+VinoIconVisibility vino_status_icon_get_visibility (VinoStatusIcon *icon); - - G_END_DECLS - -Index: vino-2.32.1/server/vino-status-tube-icon.c -=================================================================== ---- vino-2.32.1.orig/server/vino-status-tube-icon.c 2010-12-24 00:47:05.000000000 +1100 -+++ vino-2.32.1/server/vino-status-tube-icon.c 2011-01-05 11:25:36.266705402 +1100 -@@ -37,7 +37,7 @@ - GtkMenu *menu; - VinoTubeServer *server; - GtkWidget *disconnect_dialog; -- VinoStatusTubeIconVisibility visibility; -+ VinoTubeIconVisibility visibility; - - #ifdef VINO_ENABLE_LIBNOTIFY - NotifyNotification *new_client_notification; -@@ -94,7 +94,7 @@ - - tooltip = g_strdup (_("Desktop sharing is enabled")); - -- visible = visible && (icon->priv->visibility == VINO_STATUS_TUBE_ICON_VISIBILITY_ALWAYS); -+ visible = visible && (icon->priv->visibility == VINO_TUBE_ICON_VISIBILITY_ALWAYS); - - gtk_status_icon_set_tooltip_text (GTK_STATUS_ICON (icon), tooltip); - gtk_status_icon_set_visible (GTK_STATUS_ICON (icon), visible); -@@ -341,8 +341,8 @@ - g_param_spec_enum ("visibility", - "Icon visibility", - "When the icon must be shown", -- VINO_TYPE_STATUS_TUBE_ICON_VISIBILITY, -- VINO_STATUS_TUBE_ICON_VISIBILITY_CLIENT, -+ VINO_TYPE_TUBE_ICON_VISIBILITY, -+ VINO_TUBE_ICON_VISIBILITY_CLIENT, - G_PARAM_READWRITE | - G_PARAM_CONSTRUCT | - G_PARAM_STATIC_NAME | -@@ -354,10 +354,10 @@ - - void - vino_status_tube_icon_set_visibility (VinoStatusTubeIcon *icon, -- VinoStatusTubeIconVisibility visibility) -+ VinoTubeIconVisibility visibility) - { - g_return_if_fail (VINO_IS_STATUS_TUBE_ICON (icon)); -- g_return_if_fail (visibility != VINO_STATUS_TUBE_ICON_VISIBILITY_INVALID); -+ g_return_if_fail (visibility != VINO_TUBE_ICON_VISIBILITY_INVALID); - - if (visibility != icon->priv->visibility) - { -Index: vino-2.32.1/server/vino-status-tube-icon.h +Index: b/server/vino-tube-app-indicator.c =================================================================== ---- vino-2.32.1.orig/server/vino-status-tube-icon.h 2010-02-10 00:35:58.000000000 +1100 -+++ vino-2.32.1/server/vino-status-tube-icon.h 2011-01-05 11:25:36.266705402 +1100 -@@ -26,17 +26,10 @@ - #include - - #include "vino-tube-server.h" -+#include "vino-tube-icon-visibility.h" - - G_BEGIN_DECLS - --typedef enum --{ -- VINO_STATUS_TUBE_ICON_VISIBILITY_INVALID = 0, -- VINO_STATUS_TUBE_ICON_VISIBILITY_ALWAYS, -- VINO_STATUS_TUBE_ICON_VISIBILITY_CLIENT, -- VINO_STATUS_TUBE_ICON_VISIBILITY_NEVER --} VinoStatusTubeIconVisibility; -- - #define VINO_TYPE_STATUS_TUBE_ICON (vino_status_tube_icon_get_type ()) - #define VINO_STATUS_TUBE_ICON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), \ - VINO_TYPE_STATUS_TUBE_ICON, VinoStatusTubeIcon)) -@@ -72,7 +65,7 @@ - void vino_status_tube_icon_update_state (VinoStatusTubeIcon *icon); - - void vino_status_tube_icon_set_visibility (VinoStatusTubeIcon *icon, -- VinoStatusTubeIconVisibility visibility); -+ VinoTubeIconVisibility visibility); - - void vino_status_tube_icon_show_notif (VinoStatusTubeIcon *icon, - const gchar *summary, const gchar *body, gboolean invalidated); -Index: vino-2.32.1/server/vino-tube-app-indicator.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ vino-2.32.1/server/vino-tube-app-indicator.c 2011-01-05 11:25:36.266705402 +1100 -@@ -0,0 +1,456 @@ +--- /dev/null ++++ b/server/vino-tube-app-indicator.c +@@ -0,0 +1,464 @@ +/* + * © 2010, Canonical Ltd + * @@ -1453,6 +1036,7 @@ +#include +#include +#include ++#include +#ifdef VINO_ENABLE_LIBNOTIFY +#include +#include @@ -1474,7 +1058,7 @@ + GtkMenuItem *status_menu_item; + VinoTubeServer *server; + GtkWidget *disconnect_dialog; -+ VinoTubeIconVisibility visibility; ++ VinoStatusTubeIconVisibility visibility; + +#ifdef VINO_ENABLE_LIBNOTIFY + NotifyNotification *new_client_notification; @@ -1543,7 +1127,7 @@ + + tooltip = g_strdup (_("Desktop sharing is enabled")); + -+ visible = visible && (indicator->priv->visibility == VINO_TUBE_ICON_VISIBILITY_ALWAYS); ++ 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); + @@ -1583,7 +1167,6 @@ + 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"), @@ -1687,15 +1270,23 @@ +vino_tube_app_indicator_preferences (VinoTubeAppIndicator *indicator) +{ + GdkScreen *screen; ++ GDesktopAppInfo *info; ++ GdkAppLaunchContext *context; + GError *error = NULL; + + screen = gdk_screen_get_default (); -+ if (!gdk_spawn_command_line_on_screen (screen, "vino-preferences", &error)) ++ 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); ++ error->message, ++ NULL); + g_error_free (error); + } ++ ++ g_object_unref (info); ++ g_object_unref (context); +} + +static void @@ -1795,8 +1386,8 @@ + g_param_spec_enum ("visibility", + "Icon visibility", + "When the icon must be shown", -+ VINO_TYPE_TUBE_ICON_VISIBILITY, -+ VINO_TUBE_ICON_VISIBILITY_CLIENT, ++ VINO_TYPE_STATUS_ICON_VISIBILITY, ++ VINO_STATUS_ICON_VISIBILITY_CLIENT, + G_PARAM_READWRITE | + G_PARAM_CONSTRUCT | + G_PARAM_STATIC_NAME | @@ -1808,10 +1399,10 @@ + +void +vino_tube_app_indicator_set_visibility (VinoTubeAppIndicator *indicator, -+ VinoTubeIconVisibility visibility) ++ VinoStatusTubeIconVisibility visibility) +{ + g_return_if_fail (VINO_IS_TUBE_APP_INDICATOR (indicator)); -+ g_return_if_fail (visibility != VINO_TUBE_ICON_VISIBILITY_INVALID); ++ g_return_if_fail (visibility != VINO_STATUS_TUBE_ICON_VISIBILITY_INVALID); + + if (visibility != indicator->priv->visibility) + { @@ -1823,7 +1414,7 @@ +#ifdef VINO_ENABLE_LIBNOTIFY +static void +vino_tube_app_indicator_show_invalidated_notif_closed -+ (VinoTubeAppIndicator *indicator) ++ (VinoStatusTubeAppIndicator *indicator) +{ + dprintf (TUBE, "Notification was closed"); + vino_tube_server_fire_closed (indicator->priv->server); @@ -1884,11 +1475,11 @@ +#endif /* VINO_ENABLE_LIBNOTIFY */ +} + -Index: vino-2.32.1/server/vino-tube-app-indicator.h +Index: b/server/vino-tube-app-indicator.h =================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ vino-2.32.1/server/vino-tube-app-indicator.h 2011-01-05 11:25:36.266705402 +1100 -@@ -0,0 +1,73 @@ +--- /dev/null ++++ b/server/vino-tube-app-indicator.h +@@ -0,0 +1,72 @@ +/* + * © 2010, Canonical Ltd + * @@ -1917,7 +1508,6 @@ +#include + +#include "vino-tube-server.h" -+#include "vino-tube-icon-visibility.h" + +G_BEGIN_DECLS + @@ -1955,63 +1545,18 @@ +void vino_tube_app_indicator_update_state (VinoTubeAppIndicator *indicator); + +void vino_tube_app_indicator_set_visibility (VinoTubeAppIndicator *indicator, -+ VinoTubeIconVisibility visibility); ++ 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-2.32.1/server/vino-tube-icon-visibility.h -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ vino-2.32.1/server/vino-tube-icon-visibility.h 2011-01-05 11:25:36.266705402 +1100 -@@ -0,0 +1,40 @@ -+/* -+ * © 2009, Collabora Ltd -+ * © 2009, 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: -+ * Arnaud Maillet -+ * Travis B. Hartwell -+ */ -+ -+#ifndef __VINO_TUBE_ICON_VISIBILITY_H__ -+#define __VINO_TUBE_ICON_VISIBILITY_H__ -+ -+G_BEGIN_DECLS -+ -+typedef enum -+{ -+ VINO_TUBE_ICON_VISIBILITY_INVALID = 0, -+ VINO_TUBE_ICON_VISIBILITY_ALWAYS, -+ VINO_TUBE_ICON_VISIBILITY_CLIENT, -+ VINO_TUBE_ICON_VISIBILITY_NEVER -+} VinoTubeIconVisibility; -+ -+G_END_DECLS -+ -+#endif /* __VINO_TUBE_ICON_VISIBILITY_H__ */ -Index: vino-2.32.1/server/vino-tube-server.c +Index: b/server/vino-tube-server.c =================================================================== ---- vino-2.32.1.orig/server/vino-tube-server.c 2010-07-02 08:13:38.000000000 +1000 -+++ vino-2.32.1/server/vino-tube-server.c 2011-01-05 11:25:36.266705402 +1100 -@@ -29,7 +29,6 @@ +--- a/server/vino-tube-server.c ++++ b/server/vino-tube-server.c +@@ -30,7 +30,6 @@ #include #include @@ -2019,7 +1564,7 @@ #include "vino-tube-server.h" #include "vino-dbus-error.h" #include "vino-util.h" -@@ -47,7 +46,11 @@ +@@ -48,7 +47,11 @@ struct _VinoTubeServerPrivate TpConnection *connection; gchar *filename; gulong signal_invalidated_id; @@ -2031,7 +1576,7 @@ TpTubeChannelState state; }; -@@ -80,11 +83,19 @@ +@@ -81,11 +84,19 @@ vino_tube_server_dispose (GObject *objec server->priv->tp_channel = NULL; } @@ -2051,7 +1596,7 @@ if (G_OBJECT_CLASS (vino_tube_server_parent_class)->dispose) G_OBJECT_CLASS (vino_tube_server_parent_class)->dispose (object); -@@ -187,7 +198,11 @@ +@@ -188,7 +199,11 @@ vino_tube_server_init (VinoTubeServer *s { self->priv = VINO_TUBE_SERVER_GET_PRIVATE (self); self->priv->tp_channel = NULL; @@ -2063,49 +1608,43 @@ self->priv->state = TP_TUBE_CHANNEL_STATE_NOT_OFFERED; } -@@ -276,8 +291,13 @@ +@@ -277,7 +292,11 @@ vino_tube_server_invalidated_cb (TpProxy 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, -+ (const gchar *)body, TRUE); +#else vino_status_tube_icon_show_notif (self->priv->icon_tube, summary, - (const gchar *)body, TRUE); +#endif /* VINO_ENABLE_APP_INDICATOR */ + (const gchar *)body, TRUE); g_free (body); - -@@ -302,8 +322,13 @@ +@@ -303,7 +322,11 @@ vino_tube_server_state_changed (TpChanne /* 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, -+ (const gchar*) body, FALSE); +#else vino_status_tube_icon_show_notif (server->priv->icon_tube, summary, - (const gchar*) body, FALSE); +#endif /* VINO_ENABLE_APP_INDICATOR */ + (const gchar*) body, FALSE); g_free (body); server->priv->state = TP_TUBE_STATE_OPEN; - break; -@@ -311,8 +336,13 @@ +@@ -312,7 +335,11 @@ vino_tube_server_state_changed (TpChanne /* 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, -+ (const gchar*) body, FALSE); +#else vino_status_tube_icon_show_notif (server->priv->icon_tube, summary, - (const gchar*) body, FALSE); +#endif /* VINO_ENABLE_APP_INDICATOR */ + (const gchar*) body, FALSE); g_free (body); server->priv->state = TP_TUBE_STATE_REMOTE_PENDING; - break; -@@ -408,6 +438,7 @@ +@@ -409,6 +436,7 @@ vino_tube_server_factory_handle_cb (TpCo server->priv->filename = vino_tube_server_contact_get_avatar_filename (contact, token, self); } @@ -2113,87 +1652,98 @@ } gboolean -@@ -425,11 +456,17 @@ +@@ -426,10 +454,15 @@ vino_tube_server_share_with_tube (VinoTu 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, -+ VINO_TUBE_ICON_VISIBILITY_ALWAYS); +#else server->priv->icon_tube = vino_status_tube_icon_new (server, screen); vino_status_tube_icon_set_visibility (server->priv->icon_tube, -- VINO_STATUS_TUBE_ICON_VISIBILITY_ALWAYS); -+ VINO_TUBE_ICON_VISIBILITY_ALWAYS); +#endif /* VINO_ENABLE_APP_INDICATOR */ + VINO_STATUS_TUBE_ICON_VISIBILITY_ALWAYS); tp_cli_channel_interface_tube_connect_to_tube_channel_state_changed - (server->priv->tp_channel, vino_tube_server_state_changed, server, -Index: vino-2.32.1/server/vino-tube-server.h +Index: b/server/vino-tube-servers-manager.c =================================================================== ---- vino-2.32.1.orig/server/vino-tube-server.h 2010-02-10 00:35:58.000000000 +1100 -+++ vino-2.32.1/server/vino-tube-server.h 2011-01-05 11:25:36.266705402 +1100 -@@ -27,7 +27,12 @@ +--- a/server/vino-tube-servers-manager.c ++++ b/server/vino-tube-servers-manager.c +@@ -196,6 +197,9 @@ handle_channels_cb (TpSimpleHandler *han - #include "vino-types.h" - #include "vino-server.h" -+ -+#ifdef VINO_ENABLE_APP_INDICATOR -+#include "vino-tube-app-indicator.h" -+#else - #include "vino-status-tube-icon.h" -+#endif + server = g_object_new (VINO_TYPE_TUBE_SERVER, + "display-status-icon", 0, ++ #ifdef VINO_ENABLE_APP_INDICATOR ++ "use-dbus-listener", 0, ++ #endif /* VINO_ENABLE_APP_INDICATOR */ + "prompt-enabled", 0, + "view-only", 0, + "network-interface", network_interface, +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -97,6 +97,23 @@ AS_IF([test "x$have_libnotify" = "xyes"] + AS_IF([test "x$have_libnotify" = "xyes"], + [AC_MSG_ERROR([libnotify support requested but not found])])]) - G_BEGIN_DECLS ++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-2.32.1/server/vino-tube-servers-manager.c +Index: b/Makefile.am =================================================================== ---- vino-2.32.1.orig/server/vino-tube-servers-manager.c 2010-07-02 08:13:38.000000000 +1000 -+++ vino-2.32.1/server/vino-tube-servers-manager.c 2011-01-05 11:25:36.266705402 +1100 -@@ -30,6 +30,7 @@ - #include "vino-server.h" - #include "vino-tube-server.h" - #include "vino-dbus-error.h" -+#include "vino-tube-app-indicator.h" - #include "vino-status-tube-icon.h" - #include "vino-util.h" +--- a/Makefile.am ++++ b/Makefile.am +@@ -158,6 +158,16 @@ vino_server_SOURCES = \ + $(VINO_HTTP_sources) \ + $(VINO_TELEPATHY_GLIB_sources) -@@ -194,6 +195,27 @@ - display = gdk_display_get_default (); - screen = gdk_display_get_default_screen (display); - -+ #ifdef VINO_ENABLE_APP_INDICATOR -+ server = g_object_new (VINO_TYPE_TUBE_SERVER, -+ "display-app-indicator", 0, -+ "use-dbus-listener", 0, -+ "prompt-enabled", 0, -+ "view-only", 0, -+ "network-interface", network_interface, -+ "use-alternative-port", 1, -+ "alternative-port", self->priv->alternative_port, -+ "auth-methods", 1, -+ "require-encryption", 0, -+ "vnc-password", NULL, -+ "on-hold", 0, -+ "screen", screen, -+ "lock-screen", 0, -+ "disable-background", 0, -+ "use-upnp", 0, -+ "connection", connection, -+ "tube", channel, -+ NULL); -+ #else - server = g_object_new (VINO_TYPE_TUBE_SERVER, - "display-status-icon", 0, - "use-dbus-listener", 0, -@@ -213,6 +235,7 @@ - "connection", connection, - "tube", channel, - NULL); -+ #endif /* VINO_ENABLE_APP_INDICATOR */ ++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: b/server/vino-main.c +=================================================================== +--- a/server/vino-main.c ++++ b/server/vino-main.c +@@ -150,7 +150,11 @@ name_acquired (GDBusConnection *connecti + 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); - self->priv->vino_tube_servers = g_slist_prepend - (self->priv->vino_tube_servers, server); + vino_dbus_listener_set_server (vino->listeners[i], server); diff -Nru vino-3.4.0/debian/patches/series vino-3.4.0/debian/patches/series --- vino-3.4.0/debian/patches/series 2012-03-27 00:57:59.000000000 +0000 +++ vino-3.4.0/debian/patches/series 2012-03-29 17:11:19.000000000 +0000 @@ -2,5 +2,5 @@ 05_use-system-miniupnpc.patch 06_use-ubuntu-help.patch 11_hurd_maxhostnamelen.patch -#12_app-indicators-only.patch +12_app-indicators-only.patch nodisplay_autostart.patch diff -Nru vino-3.4.0/debian/rules vino-3.4.0/debian/rules --- vino-3.4.0/debian/rules 2012-03-27 00:57:59.000000000 +0000 +++ vino-3.4.0/debian/rules 2012-03-29 17:11:19.000000000 +0000 @@ -17,7 +17,7 @@ --with-gnome-keyring \ --with-telepathy \ --with-zlib \ - --with-appindicator + --enable-appindicator # Request NetworkManager support only for Linux ifeq ($(DEB_HOST_ARCH_OS),linux)