Your message dated Thu, 10 Nov 2011 13:04:17 +0100
with message-id <[email protected]>
and subject line Fixed with last upload
has caused the Debian Bug report #645769,
regarding virt-viewer: cherrypick upstream zoom and title fixes from upstream
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.)


-- 
645769: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=645769
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: virt-viewer
Version: 0.4.1-1
Severity: normal
Tags: patch
User: [email protected]
Usertags: origin-ubuntu precise ubuntu-patch

In Ubuntu, the attached patch was applied to achieve the following:

  * 0003-set-window-title-with-domain-name.patch: set window title to use
    domain name (LP: #842317)
  * fix zoom issues:
    - 0001-initial-zoom.patch: Fix setting of initial zoom level on display
    - 0002-propagate-primary-window-zoom.patch: Propagate primary window zoom
      level to secondary windows

We cherrypicked upstream patches to fix some zoom issues and for setting the
title bar to include the VM name[1]. Thank you for considering the patch.


[1]https://bugs.launchpad.net/ubuntu/+source/virt-viewer/+bug/842317

-- System Information:
Debian Release: wheezy/sid
  APT prefers oneiric-updates
  APT policy: (500, 'oneiric-updates'), (500, 'oneiric-security'), (500, 
'oneiric')
Architecture: amd64 (x86_64)

Kernel: Linux 3.0.0-12-generic (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff -Nru virt-viewer-0.4.1/debian/patches/0001-initial-zoom.patch virt-viewer-0.4.1/debian/patches/0001-initial-zoom.patch
--- virt-viewer-0.4.1/debian/patches/0001-initial-zoom.patch	1969-12-31 18:00:00.000000000 -0600
+++ virt-viewer-0.4.1/debian/patches/0001-initial-zoom.patch	2011-09-16 06:03:02.000000000 -0500
@@ -0,0 +1,16 @@
+Origin: 8bd178c8a81073c70360ce6af6629ad6bf0e921a
+Description: Fix setting of initial zoom level on display.
+
+Index: virt-viewer-0.4.1/src/virt-viewer-window.c
+===================================================================
+--- virt-viewer-0.4.1.orig/src/virt-viewer-window.c	2011-09-16 06:01:05.000000000 -0500
++++ virt-viewer-0.4.1/src/virt-viewer-window.c	2011-09-16 06:02:23.000000000 -0500
+@@ -855,6 +855,8 @@
+ 	if (display != NULL) {
+ 		priv->display = g_object_ref(display);
+ 
++		virt_viewer_display_set_zoom_level(VIRT_VIEWER_DISPLAY(priv->display), priv->zoomlevel);
++
+ 		gtk_notebook_append_page(GTK_NOTEBOOK(priv->notebook), GTK_WIDGET(display), NULL);
+ 		if (gtk_bin_get_child(GTK_BIN(display)))
+ 			gtk_widget_realize(GTK_WIDGET(gtk_bin_get_child(GTK_BIN(display))));
diff -Nru virt-viewer-0.4.1/debian/patches/0002-propagate-primary-window-zoom.patch virt-viewer-0.4.1/debian/patches/0002-propagate-primary-window-zoom.patch
--- virt-viewer-0.4.1/debian/patches/0002-propagate-primary-window-zoom.patch	1969-12-31 18:00:00.000000000 -0600
+++ virt-viewer-0.4.1/debian/patches/0002-propagate-primary-window-zoom.patch	2011-09-16 06:08:05.000000000 -0500
@@ -0,0 +1,56 @@
+Origin: fe8551efbaa1425e7db4d59e10a25fa94788e949
+Description: Propagate primary window zoom level to secondary windows
+ Ensure that all windows get a default zoom level of 100. Propagate
+ the primary window's zoom level to all secondary windows  when
+ initially creating them
+Index: virt-viewer-0.4.1/src/virt-viewer-app.c
+===================================================================
+--- virt-viewer-0.4.1.orig/src/virt-viewer-app.c	2011-09-16 06:04:11.000000000 -0500
++++ virt-viewer-0.4.1/src/virt-viewer-app.c	2011-09-16 06:05:25.000000000 -0500
+@@ -446,6 +446,8 @@
+ 			      "app", self,
+ 			      "container", container,
+ 			      NULL);
++	if (self->priv->main_window)
++		virt_viewer_window_set_zoom_level(window, virt_viewer_window_get_zoom_level(self->priv->main_window));
+ 	virt_viewer_app_set_nth_window(self, nth, window);
+ 	w = virt_viewer_window_get_window(window);
+ 
+Index: virt-viewer-0.4.1/src/virt-viewer-window.c
+===================================================================
+--- virt-viewer-0.4.1.orig/src/virt-viewer-window.c	2011-09-16 06:04:11.000000000 -0500
++++ virt-viewer-0.4.1/src/virt-viewer-window.c	2011-09-16 06:05:25.000000000 -0500
+@@ -310,6 +310,8 @@
+ 		priv->accel_list = g_slist_append(priv->accel_list, accels->data);
+ 		g_object_ref(G_OBJECT(accels->data));
+ 	}
++
++	priv->zoomlevel = 100;
+ }
+ 
+ static void
+@@ -884,6 +886,12 @@
+ 	self->priv->zoomlevel = zoom_level;
+ }
+ 
++gint virt_viewer_window_get_zoom_level(VirtViewerWindow *self)
++{
++	g_return_val_if_fail(VIRT_VIEWER_IS_WINDOW(self), 100);
++	return self->priv->zoomlevel;
++}
++
+ GtkMenuItem*
+ virt_viewer_window_get_menu_displays(VirtViewerWindow *self)
+ {
+Index: virt-viewer-0.4.1/src/virt-viewer-window.h
+===================================================================
+--- virt-viewer-0.4.1.orig/src/virt-viewer-window.h	2011-09-16 06:04:11.000000000 -0500
++++ virt-viewer-0.4.1/src/virt-viewer-window.h	2011-09-16 06:05:25.000000000 -0500
+@@ -65,6 +65,7 @@
+ void virt_viewer_window_set_display(VirtViewerWindow *self, VirtViewerDisplay *display);
+ void virt_viewer_window_update_title(VirtViewerWindow *self);
+ void virt_viewer_window_set_zoom_level(VirtViewerWindow *self, gint zoom_level);
++gint virt_viewer_window_get_zoom_level(VirtViewerWindow *self);
+ void virt_viewer_window_leave_fullscreen(VirtViewerWindow *self);
+ void virt_viewer_window_enter_fullscreen(VirtViewerWindow *self, gboolean move, gint x, gint y);
+ GtkMenuItem *virt_viewer_window_get_menu_displays(VirtViewerWindow *self);
diff -Nru virt-viewer-0.4.1/debian/patches/0003-set-window-title-with-domain-name.patch virt-viewer-0.4.1/debian/patches/0003-set-window-title-with-domain-name.patch
--- virt-viewer-0.4.1/debian/patches/0003-set-window-title-with-domain-name.patch	1969-12-31 18:00:00.000000000 -0600
+++ virt-viewer-0.4.1/debian/patches/0003-set-window-title-with-domain-name.patch	2011-09-16 06:10:31.000000000 -0500
@@ -0,0 +1,139 @@
+Origin: 46cf6410c11dc8369dcf74283656f4bb0e14be8a
+Description: Fix setting of initial zoom level on display
+Bug: https://bugzilla.redhat.com/show_bug.cgi?id=737204
+Bug-Ubuntu: https://launchpad.net/bugs/842317
+
+Index: virt-viewer-0.4.1/src/virt-viewer-app.c
+===================================================================
+--- virt-viewer-0.4.1.orig/src/virt-viewer-app.c	2011-09-16 06:08:58.000000000 -0500
++++ virt-viewer-0.4.1/src/virt-viewer-app.c	2011-09-16 06:09:34.000000000 -0500
+@@ -121,6 +121,7 @@
+ 	char *pretty_address;
+ 	gchar *guest_name;
+ 	gboolean grabbed;
++	char *title;
+ };
+ 
+ 
+@@ -135,6 +136,7 @@
+ 	PROP_SESSION,
+ 	PROP_GUEST_NAME,
+ 	PROP_FULLSCREEN,
++	PROP_TITLE,
+ };
+ 
+ void
+@@ -386,6 +388,34 @@
+ 	}
+ }
+ 
++static void
++virt_viewer_app_set_window_subtitle(VirtViewerApp *app,
++				    VirtViewerWindow *window,
++				    int nth)
++{
++	gchar *subtitle = app->priv->title ? g_strdup_printf("%s (%d)", app->priv->title, nth + 1) : NULL;
++	g_object_set(window, "subtitle", subtitle, NULL);
++	g_free(subtitle);
++}
++
++static void
++set_title(gpointer key,
++	  gpointer value,
++	  gpointer user_data)
++{
++	gint *nth = key;
++	VirtViewerApp *app = user_data;
++	VirtViewerWindow *window = value;
++	virt_viewer_app_set_window_subtitle(app, window, *nth);
++}
++
++static void
++virt_viewer_app_set_all_window_subtitles(VirtViewerApp *app)
++{
++	virt_viewer_app_set_window_subtitle(app, app->priv->main_window, 0);
++	g_hash_table_foreach(app->priv->windows, set_title, app);
++}
++
+ static void update_title(gpointer key G_GNUC_UNUSED,
+ 			 gpointer value,
+ 			 gpointer user_data G_GNUC_UNUSED)
+@@ -426,6 +456,7 @@
+ 	key = g_malloc(sizeof(gint));
+ 	*key = nth;
+ 	g_hash_table_insert(self->priv->windows, key, win);
++	virt_viewer_app_set_window_subtitle(self, win, nth);
+ }
+ 
+ static void
+@@ -943,6 +974,10 @@
+ 		g_value_set_boolean(value, priv->fullscreen);
+ 		break;
+ 
++	case PROP_TITLE:
++		g_value_set_string(value, priv->title);
++		break;
++
+         default:
+ 		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+         }
+@@ -975,6 +1010,12 @@
+ 		virt_viewer_app_set_fullscreen(self, g_value_get_boolean(value));
+ 		break;
+ 
++	case PROP_TITLE:
++		g_free(priv->title);
++		priv->title = g_value_dup_string(value);
++		virt_viewer_app_set_all_window_subtitles(self);
++		break;
++
+         default:
+ 		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+         }
+@@ -1000,6 +1041,7 @@
+ 		g_object_unref(priv->container);
+ 		priv->container = NULL;
+ 	}
++	g_free(priv->title);
+ 
+ 	virt_viewer_app_free_connect_info(self);
+ 
+@@ -1128,6 +1170,16 @@
+ 							     G_PARAM_READABLE |
+ 							     G_PARAM_WRITABLE |
+ 							     G_PARAM_STATIC_STRINGS));
++	g_object_class_install_property(object_class,
++					PROP_TITLE,
++					g_param_spec_string("title",
++							    "Title",
++							    "Title",
++							    "",
++							    G_PARAM_READABLE |
++							    G_PARAM_WRITABLE |
++							    G_PARAM_STATIC_STRINGS));
++
+ }
+ 
+ void
+Index: virt-viewer-0.4.1/src/virt-viewer.c
+===================================================================
+--- virt-viewer-0.4.1.orig/src/virt-viewer.c	2011-09-16 06:08:59.000000000 -0500
++++ virt-viewer-0.4.1/src/virt-viewer.c	2011-09-16 06:09:34.000000000 -0500
+@@ -49,7 +49,6 @@
+ 	char *uri;
+ 	virConnectPtr conn;
+ 	char *domkey;
+-	char *domtitle;
+ 	gboolean withEvents;
+ 	gboolean waitvm;
+ 	gboolean reconnect;
+@@ -414,8 +413,7 @@
+ 		}
+ 	}
+ 
+-	free(priv->domtitle);
+-	priv->domtitle = g_strdup(virDomainGetName(dom));
++	g_object_set(app, "title", virDomainGetName(dom), NULL);
+ 
+ 	virt_viewer_app_show_status(app, _("Checking guest domain status"));
+ 	if (virDomainGetInfo(dom, &info) < 0) {
diff -Nru virt-viewer-0.4.1/debian/patches/series virt-viewer-0.4.1/debian/patches/series
--- virt-viewer-0.4.1/debian/patches/series	1969-12-31 18:00:00.000000000 -0600
+++ virt-viewer-0.4.1/debian/patches/series	2011-09-16 06:08:48.000000000 -0500
@@ -0,0 +1,3 @@
+0001-initial-zoom.patch
+0002-propagate-primary-window-zoom.patch
+0003-set-window-title-with-domain-name.patch

--- End Message ---
--- Begin Message ---
Version: 0.4.2-1

This was fixed with the 0.4.2-1 upload.
Cheers,
 -- Guido


--- End Message ---

Reply via email to