Your message dated Mon, 12 Nov 2012 20:11:54 +0100
with message-id <[email protected]>
and subject line fixed upstream in 3.3.3
has caused the Debian Bug report #535693,
regarding vino: Add an option to disable notifications on connect
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
535693: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=535693
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: vino
Version: 2.24.1-3.1
Severity: wishlist

While I don't doubt that the notifications that pop up when a remote
user connects is a useful feature, it can be annoying at times. For
example, when I want to control my mythtv machine from another computer,
I'd rather not have the notification pop up over the video I'm watching.
It looks like I'm not the only one who wants this feature either:

http://ubuntuforums.org/showthread.php?t=690885

I have attached a patch which adds a new option to the remote desktop
settings which allows the notifications to be disabled.

 capplet/vino-preferences.c     |   64 ++++++++++++++++++++++++++++++++++++++++-
 capplet/vino-preferences.glade |   13 ++++++++
 server/vino-prefs.c            |   41 +++++++++++++++++++++++++-
 server/vino-server.c           |   44 ++++++++++++++++++++++++++++
 server/vino-server.h           |    3 +
 server/vino-server.schemas.in  |   16 ++++++++++
 server/vino-status-icon.c      |    2 -
 7 files changed, 180 insertions(+), 3 deletions(-)


-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.26-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) (ignored: LC_ALL 
set to en_GB.UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages vino depends on:
ii  gconf2                 2.26.2-1          GNOME configuration database syste
ii  libavahi-client3       0.6.25-1          Avahi client library
ii  libavahi-common3       0.6.25-1          Avahi common library
ii  libavahi-glib1         0.6.25-1          Avahi glib integration library
ii  libc6                  2.9-12            GNU C Library: Shared libraries
ii  libdbus-1-3            1.2.12-1          simple interprocess messaging syst
ii  libdbus-glib-1-2       0.80-4            simple interprocess messaging syst
ii  libgconf2-4            2.26.2-1          GNOME configuration database syste
ii  libgcrypt11            1.4.4-2           LGPL Crypto library - runtime libr
ii  libglade2-0            1:2.6.4-1         library to load .glade files at ru
ii  libglib2.0-0           2.20.1-2          The GLib library of C routines
ii  libgnome2-0            2.26.0-1          The GNOME library - runtime files
ii  libgnomeui-0           2.24.1-1          The GNOME 2 libraries (User Interf
ii  libgnutls26            2.6.6-1           the GNU TLS library - runtime libr
ii  libgtk2.0-0            2.16.1-2          The GTK+ graphical user interface 
ii  libjpeg62              6b-14             The Independent JPEG Group's JPEG 
ii  libnotify1 [libnotify1 0.4.5-1           sends desktop notifications to a n
ii  libunique-1.0-0        1.0.8-1           Library for writing single instanc
ii  libx11-6               2:1.2.1-1         X11 client-side library
ii  libxdamage1            1:1.1.1-4         X11 damaged region extension libra
ii  libxext6               2:1.0.4-1         X11 miscellaneous extension librar
ii  libxfixes3             1:4.0.3-2         X11 miscellaneous 'fixes' extensio
ii  libxtst6               2:1.0.3-1         X11 Testing -- Resource extension 
ii  zlib1g                 1:1.2.3.3.dfsg-13 compression library - runtime

Versions of packages vino recommends:
ii  gvfs                          1.2.2-2    userspace virtual filesystem - ser

Versions of packages vino suggests:
ii  gnome-user-guide [gnome2-user 2.24.2-2   GNOME user's guide
ii  vinagre                       2.24.2-3   VNC client for the GNOME Desktop

-- no debconf information
diff -burN tmp/vino-2.24.1/capplet/vino-preferences.c vino-2.24.1/capplet/vino-preferences.c
--- tmp/vino-2.24.1/capplet/vino-preferences.c	2008-10-08 20:58:36.000000000 +0100
+++ vino-2.24.1/capplet/vino-preferences.c	2009-07-04 12:29:54.000000000 +0100
@@ -47,6 +47,7 @@
 #define VINO_PREFS_DIR                    "/desktop/gnome/remote_access"
 #define VINO_PREFS_ENABLED                VINO_PREFS_DIR "/enabled"
 #define VINO_PREFS_PROMPT_ENABLED         VINO_PREFS_DIR "/prompt_enabled"
+#define VINO_PREFS_NOTIFICATION_ENABLED   VINO_PREFS_DIR "/notification_enabled"
 #define VINO_PREFS_VIEW_ONLY              VINO_PREFS_DIR "/view_only"
 #define VINO_PREFS_AUTHENTICATION_METHODS VINO_PREFS_DIR "/authentication_methods"
 #define VINO_PREFS_VNC_PASSWORD           VINO_PREFS_DIR "/vnc_password"
@@ -59,7 +60,7 @@
 #define VINO_PREFS_LOCK_SCREEN            VINO_PREFS_DIR "/lock_screen_on_disconnect"
 #define VINO_PREFS_DISABLE_BACKGROUND     VINO_PREFS_DIR "/disable_background"
 
-#define N_LISTENERS 13
+#define N_LISTENERS 14
 
 #define VINO_DBUS_BUS_NAME  "org.gnome.Vino"
 #define VINO_DBUS_INTERFACE "org.gnome.VinoScreen"
@@ -75,6 +76,7 @@
   GtkWidget   *url_label;
   GtkWidget   *allowed_toggle;
   GtkWidget   *prompt_enabled_toggle;
+  GtkWidget   *notification_enabled_toggle;
   GtkWidget   *view_only_toggle;
   GtkWidget   *password_toggle;
   GtkWidget   *password_box;
@@ -175,6 +177,7 @@
 					    gboolean               allowed)
 {
   gtk_widget_set_sensitive (dialog->prompt_enabled_toggle, allowed);
+  gtk_widget_set_sensitive (dialog->notification_enabled_toggle, allowed);
   gtk_widget_set_sensitive (dialog->view_only_toggle,      allowed);
   gtk_widget_set_sensitive (dialog->url_labels_box,        allowed);
   gtk_widget_set_sensitive (dialog->password_toggle,       allowed);
@@ -624,6 +627,64 @@
 }
 
 static void
+vino_preferences_dialog_notification_enabled_toggled (GtkToggleButton       *toggle,
+						VinoPreferencesDialog *dialog)
+{
+  gconf_client_set_bool (dialog->client,
+			 VINO_PREFS_NOTIFICATION_ENABLED,
+			 gtk_toggle_button_get_active (toggle),
+			 NULL);
+}
+
+static void
+vino_preferences_dialog_notification_enabled_notify (GConfClient           *client,
+					       guint                  cnx_id,
+					       GConfEntry            *entry,
+					       VinoPreferencesDialog *dialog)
+{
+  gboolean notification_enabled;
+
+  if (!entry->value || entry->value->type != GCONF_VALUE_BOOL)
+    return;
+
+  notification_enabled = gconf_value_get_bool (entry->value) != FALSE;
+
+  if (notification_enabled != gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->notification_enabled_toggle)))
+    {
+      gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dialog->notification_enabled_toggle), notification_enabled);
+    }
+}
+
+static void
+vino_preferences_dialog_setup_notification_enabled_toggle (VinoPreferencesDialog *dialog)
+{
+  gboolean notification_enabled;
+
+  dialog->notification_enabled_toggle = glade_xml_get_widget (dialog->xml, "notification_enabled_toggle");
+  g_assert (dialog->notification_enabled_toggle != NULL);
+
+  notification_enabled = gconf_client_get_bool (dialog->client, VINO_PREFS_NOTIFICATION_ENABLED, NULL);
+
+  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dialog->notification_enabled_toggle), notification_enabled);
+
+  g_signal_connect (dialog->notification_enabled_toggle, "toggled",
+		    G_CALLBACK (vino_preferences_dialog_notification_enabled_toggled), dialog);
+
+  if (!gconf_client_key_is_writable (dialog->client, VINO_PREFS_NOTIFICATION_ENABLED, NULL))
+    {
+      gtk_widget_set_sensitive (dialog->notification_enabled_toggle, FALSE);
+      gtk_widget_show (dialog->writability_warning);
+    }
+
+  dialog->listeners [dialog->n_listeners] =
+    gconf_client_notify_add (dialog->client,
+			     VINO_PREFS_NOTIFICATION_ENABLED,
+			     (GConfClientNotifyFunc) vino_preferences_dialog_notification_enabled_notify,
+			     dialog, NULL, NULL);
+  dialog->n_listeners++;
+}
+
+static void
 vino_preferences_dialog_view_only_toggled (GtkToggleButton       *toggle,
 					   VinoPreferencesDialog *dialog)
 {
@@ -1486,6 +1547,7 @@
   allowed = vino_preferences_dialog_setup_allowed_toggle (dialog);
 
   vino_preferences_dialog_setup_prompt_enabled_toggle (dialog);
+  vino_preferences_dialog_setup_notification_enabled_toggle (dialog);
   vino_preferences_dialog_setup_view_only_toggle      (dialog);
   vino_preferences_dialog_setup_password_toggle       (dialog);
   vino_preferences_dialog_setup_password_entry        (dialog);
diff -burN tmp/vino-2.24.1/capplet/vino-preferences.glade vino-2.24.1/capplet/vino-preferences.glade
--- tmp/vino-2.24.1/capplet/vino-preferences.glade	2008-10-08 15:42:46.000000000 +0100
+++ vino-2.24.1/capplet/vino-preferences.glade	2009-07-04 12:43:09.000000000 +0100
@@ -559,6 +559,19 @@
                                 <property name="position">1</property>
                               </packing>
                             </child>
+                            <child>
+                              <widget class="GtkCheckButton" id="notification_enabled_toggle">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="label" translatable="yes">_Display a notification when someone connects</property>
+                                <property name="use_underline">True</property>
+                                <property name="response_id">0</property>
+                                <property name="draw_indicator">True</property>
+                              </widget>
+                              <packing>
+                                <property name="position">2</property>
+                              </packing>
+                            </child>
                           </widget>
                           <packing>
                             <property name="expand">False</property>
diff -burN tmp/vino-2.24.1/server/vino-prefs.c vino-2.24.1/server/vino-prefs.c
--- tmp/vino-2.24.1/server/vino-prefs.c	2008-10-08 14:41:51.000000000 +0100
+++ vino-2.24.1/server/vino-prefs.c	2009-07-04 12:19:26.000000000 +0100
@@ -35,6 +35,7 @@
 #define VINO_PREFS_DIR                    "/desktop/gnome/remote_access"
 #define VINO_PREFS_ENABLED                VINO_PREFS_DIR "/enabled"
 #define VINO_PREFS_PROMPT_ENABLED         VINO_PREFS_DIR "/prompt_enabled"
+#define VINO_PREFS_NOTIFICATION_ENABLED   VINO_PREFS_DIR "/notification_enabled"
 #define VINO_PREFS_VIEW_ONLY              VINO_PREFS_DIR "/view_only"
 #define VINO_PREFS_LOCAL_ONLY             VINO_PREFS_DIR "/local_only"
 #define VINO_PREFS_USE_ALTERNATIVE_PORT   VINO_PREFS_DIR "/use_alternative_port"
@@ -46,7 +47,7 @@
 #define VINO_PREFS_ICON_VISIBILITY        VINO_PREFS_DIR "/icon_visibility"
 #define VINO_PREFS_DISABLE_BACKGROUND     VINO_PREFS_DIR "/disable_background"
 
-#define VINO_N_LISTENERS 12
+#define VINO_N_LISTENERS 13
 
 static GConfClient *vino_client  = NULL;
 static GSList      *vino_servers = NULL;
@@ -54,6 +55,7 @@
 
 static gboolean        vino_enabled              = FALSE;
 static gboolean        vino_prompt_enabled       = FALSE;
+static gboolean        vino_notification_enabled = TRUE;
 static gboolean        vino_view_only            = FALSE;
 static gboolean        vino_local_only           = FALSE;
 static gboolean        vino_require_encryption   = FALSE;
@@ -119,6 +121,30 @@
 }
 
 static void
+vino_prefs_notification_enabled_changed (GConfClient *client,
+				   guint        cnxn_id,
+				   GConfEntry  *entry)
+{
+  gboolean  notification_enabled;
+  GSList   *l;
+
+  if (!entry->value || entry->value->type != GCONF_VALUE_BOOL)
+    return;
+
+  notification_enabled = gconf_value_get_bool (entry->value) != FALSE;
+
+  if (vino_notification_enabled == notification_enabled)
+    return;
+
+  vino_notification_enabled = notification_enabled;
+
+  dprintf (PREFS, "Notification enabled changed: %s\n", vino_notification_enabled ? "(true)" : "(false)");
+
+  for (l = vino_servers; l; l = l->next)
+    vino_server_set_notification_enabled (l->data, notification_enabled);
+}
+
+static void
 vino_prefs_view_only_changed (GConfClient *client,
 			      guint        cnxn_id,
 			      GConfEntry  *entry)
@@ -437,6 +463,7 @@
 
   server = g_object_new (VINO_TYPE_SERVER,
 			 "prompt-enabled",       vino_prompt_enabled,
+			 "notification-enabled", vino_notification_enabled,
 			 "view-only",            vino_view_only,
 			 "local-only",           vino_local_only,
 			 "use-alternative-port", vino_use_alternative_port,
@@ -487,6 +514,11 @@
 					       NULL);
   dprintf (PREFS, "Prompt enabled: %s\n", vino_prompt_enabled ? "(true)" : "(false)");
 
+  vino_notification_enabled = gconf_client_get_bool (vino_client,
+					       VINO_PREFS_NOTIFICATION_ENABLED,
+					       NULL);
+  dprintf (PREFS, "Notification enabled: %s\n", vino_notification_enabled ? "(true)" : "(false)");
+
   if (view_only)
     {
       vino_view_only = TRUE;
@@ -572,6 +604,13 @@
 			     NULL, NULL, NULL);
   i++;
 
+  vino_listeners [i] =
+    gconf_client_notify_add (vino_client,
+			     VINO_PREFS_NOTIFICATION_ENABLED,
+			     (GConfClientNotifyFunc) vino_prefs_notification_enabled_changed,
+			     NULL, NULL, NULL);
+  i++;
+
   if (!view_only)
     {
       vino_listeners [i] =
diff -burN tmp/vino-2.24.1/server/vino-server.c vino-2.24.1/server/vino-server.c
--- tmp/vino-2.24.1/server/vino-server.c	2008-10-20 14:26:37.000000000 +0100
+++ vino-2.24.1/server/vino-server.c	2009-07-04 00:42:50.000000000 +0100
@@ -78,6 +78,7 @@
   guint             on_hold : 1;
   guint             local_only : 1;
   guint             prompt_enabled : 1;
+  guint             notification_enabled : 1;
   guint             view_only : 1;
   guint             require_encryption : 1;
   guint             last_auth_failed : 1;
@@ -105,6 +106,7 @@
   PROP_SCREEN,
   PROP_ON_HOLD,
   PROP_PROMPT_ENABLED,
+  PROP_NOTIFICATION_ENABLED,
   PROP_VIEW_ONLY,
   PROP_LOCAL_ONLY,
   PROP_USE_ALTERNATIVE_PORT,
@@ -1027,6 +1029,9 @@
     case PROP_PROMPT_ENABLED:
       vino_server_set_prompt_enabled (server, g_value_get_boolean (value));
       break;
+    case PROP_NOTIFICATION_ENABLED:
+      vino_server_set_notification_enabled (server, g_value_get_boolean (value));
+      break;
     case PROP_VIEW_ONLY:
       vino_server_set_view_only (server, g_value_get_boolean (value));
       break;
@@ -1079,6 +1084,9 @@
     case PROP_PROMPT_ENABLED:
       g_value_set_boolean (value, server->priv->prompt_enabled);
       break;
+    case PROP_NOTIFICATION_ENABLED:
+      g_value_set_boolean (value, server->priv->notification_enabled);
+      break;
     case PROP_VIEW_ONLY:
       g_value_set_boolean (value, server->priv->view_only);
       break;
@@ -1169,6 +1177,18 @@
                                                          G_PARAM_STATIC_BLURB));
 
   g_object_class_install_property (gobject_class,
+				   PROP_NOTIFICATION_ENABLED,
+				   g_param_spec_boolean ("notification-enabled",
+							 "Notification enabled",
+							 "Notify the user when a connection is made",
+							 TRUE,
+                                                         G_PARAM_READWRITE   |
+                                                         G_PARAM_CONSTRUCT   |
+                                                         G_PARAM_STATIC_NAME |
+                                                         G_PARAM_STATIC_NICK |
+                                                         G_PARAM_STATIC_BLURB));
+
+  g_object_class_install_property (gobject_class,
 				   PROP_VIEW_ONLY,
 				   g_param_spec_boolean ("view-only",
 							 "View Only",
@@ -1525,6 +1545,30 @@
     }
 }
 
+gboolean
+vino_server_get_notification_enabled (VinoServer *server)
+{
+  g_return_val_if_fail (VINO_IS_SERVER (server), FALSE);
+
+  return server->priv->notification_enabled;
+}
+
+void
+vino_server_set_notification_enabled (VinoServer *server,
+				gboolean    notification_enabled)
+{
+  g_return_if_fail (VINO_IS_SERVER (server));
+
+  notification_enabled = notification_enabled != FALSE;
+
+  if (server->priv->notification_enabled != notification_enabled)
+    {
+      server->priv->notification_enabled = notification_enabled;
+
+      g_object_notify (G_OBJECT (server), "notification-enabled");
+    }
+}
+
 static void
 vino_server_update_security_types (VinoServer *server)
 {
diff -burN tmp/vino-2.24.1/server/vino-server.h vino-2.24.1/server/vino-server.h
--- tmp/vino-2.24.1/server/vino-server.h	2008-07-26 03:04:50.000000000 +0100
+++ vino-2.24.1/server/vino-server.h	2009-07-04 00:31:34.000000000 +0100
@@ -75,6 +75,9 @@
 void                 vino_server_set_prompt_enabled       (VinoServer     *server,
 							   gboolean        enable_prompt);
 gboolean             vino_server_get_prompt_enabled       (VinoServer     *server);
+void                 vino_server_set_notification_enabled       (VinoServer     *server,
+							   gboolean        enable_notification);
+gboolean             vino_server_get_notification_enabled       (VinoServer     *server);
 void                 vino_server_set_view_only            (VinoServer     *server,
 							   gboolean        view_only);
 gboolean             vino_server_get_view_only            (VinoServer     *server);
diff -burN tmp/vino-2.24.1/server/vino-server.schemas.in vino-2.24.1/server/vino-server.schemas.in
--- tmp/vino-2.24.1/server/vino-server.schemas.in	2008-07-26 03:04:50.000000000 +0100
+++ vino-2.24.1/server/vino-server.schemas.in	2009-07-04 00:29:34.000000000 +0100
@@ -35,6 +35,22 @@
     </schema>
 
     <schema>
+      <key>/schemas/desktop/gnome/remote_access/notification_enabled</key>
+      <applyto>/desktop/gnome/remote_access/notification_enabled</applyto>
+      <owner>gnome</owner>
+      <type>bool</type>
+      <default>true</default>
+      <locale name="C">
+         <short>Notify the user when a connection is made</short>
+         <long>
+           If true, a notification will pop up when a remote user
+           connects to the host machine.
+		   Recommended especially when prompting is disabled.
+         </long>
+      </locale>
+    </schema>
+
+    <schema>
       <key>/schemas/desktop/gnome/remote_access/view_only</key>
       <applyto>/desktop/gnome/remote_access/view_only</applyto>
       <owner>gnome</owner>
diff -burN tmp/vino-2.24.1/server/vino-status-icon.c vino-2.24.1/server/vino-status-icon.c
--- tmp/vino-2.24.1/server/vino-status-icon.c	2008-05-05 21:29:44.000000000 +0100
+++ vino-2.24.1/server/vino-status-icon.c	2009-07-04 01:28:26.000000000 +0100
@@ -592,7 +592,7 @@
   VinoStatusIcon *icon    = a->icon;
   VinoClient     *client  = a->client;
 
-  if (vino_server_get_prompt_enabled (icon->priv->server))
+  if (vino_server_get_prompt_enabled (icon->priv->server) || !vino_server_get_notification_enabled(icon->priv->server))
   {
     g_free (user_data);
     return FALSE;

--- End Message ---
--- Begin Message ---
Package: vino
Version 3.4.0-1

The option was added upstream in release 3.3.3 and it seems
like 3.4.0-1 was the first packaged version to be shipped in Debian,
so this has been fixed for a while....


-- 
Andreas Henriksson

--- End Message ---

Reply via email to