From 700cb826d89092a27938c19e80860923b9dc7c93 Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Fri, 11 Jan 2008 22:47:40 +0000 Subject: [PATCH] Fix window title & hide passwd chars when input --- virt-viewer-0.0.2-hide-passwd.patch | 12 +++++ virt-viewer-0.0.2-window-title.patch | 74 ++++++++++++++++++++++++++++ virt-viewer.spec | 10 +++- 3 files changed, 95 insertions(+), 1 deletion(-) create mode 100644 virt-viewer-0.0.2-hide-passwd.patch create mode 100644 virt-viewer-0.0.2-window-title.patch diff --git a/virt-viewer-0.0.2-hide-passwd.patch b/virt-viewer-0.0.2-hide-passwd.patch new file mode 100644 index 0000000..29a685a --- /dev/null +++ b/virt-viewer-0.0.2-hide-passwd.patch @@ -0,0 +1,12 @@ +diff -rup virt-viewer-0.0.2.orig/src/main.c virt-viewer-0.0.2.new/src/main.c +--- virt-viewer-0.0.2.orig/src/main.c 2008-01-11 17:30:23.000000000 -0500 ++++ virt-viewer-0.0.2.new/src/main.c 2008-01-11 17:32:00.000000000 -0500 +@@ -233,6 +233,8 @@ static void viewer_credential(GtkWidget + continue; + } + entry[row] = gtk_entry_new(); ++ if (g_value_get_enum(cred) == VNC_DISPLAY_CREDENTIAL_PASSWORD) ++ gtk_entry_set_visibility(GTK_ENTRY(entry[row]), FALSE); + + gtk_table_attach(GTK_TABLE(box), label[i], 0, 1, row, row+1, GTK_SHRINK, GTK_SHRINK, 3, 3); + gtk_table_attach(GTK_TABLE(box), entry[i], 1, 2, row, row+1, GTK_SHRINK, GTK_SHRINK, 3, 3); diff --git a/virt-viewer-0.0.2-window-title.patch b/virt-viewer-0.0.2-window-title.patch new file mode 100644 index 0000000..d6e3c2a --- /dev/null +++ b/virt-viewer-0.0.2-window-title.patch @@ -0,0 +1,74 @@ +changeset: 17:59fccec87973 +user: "Daniel P. Berrange " +date: Thu Nov 29 15:09:26 2007 -0500 +summary: Use proper domain name in title bar, rather than VNC server title + +diff -r 97f00b8df38a -r 59fccec87973 AUTHORS +--- a/AUTHORS Tue Aug 28 20:33:11 2007 -0400 ++++ b/AUTHORS Thu Nov 29 15:09:26 2007 -0500 +@@ -3,9 +3,11 @@ + + The Virt Viewer application is written by + +- Daniel P. Berrange ++ Daniel P. Berrange + + With additional patches from: ++ ++ Chris Lalancette + + ...send patches to get your name here... + +diff -r 97f00b8df38a -r 59fccec87973 src/main.c +--- a/src/main.c Tue Aug 28 20:33:11 2007 -0400 ++++ b/src/main.c Thu Nov 29 15:09:26 2007 -0500 +@@ -42,6 +42,7 @@ + #define DEBUG_LOG(s, ...) do {} while (0) + #endif + ++static char *domname = NULL; + static int verbose = 0; + #define MAX_KEY_COMBO 3 + struct keyComboDef { +@@ -66,10 +67,8 @@ static const struct keyComboDef keyCombo + { { GDK_Print }, 1, "_PrintScreen"}, + }; + +- + static void viewer_set_title(VncDisplay *vnc, GtkWidget *window, gboolean grabbed) + { +- const char *name; + char title[1024]; + const char *subtitle; + +@@ -78,9 +77,8 @@ static void viewer_set_title(VncDisplay + else + subtitle = ""; + +- name = vnc_display_get_name(VNC_DISPLAY(vnc)); + snprintf(title, sizeof(title), "%s%s - Virt Viewer", +- subtitle, name); ++ subtitle, domname); + + gtk_window_set_title(GTK_WINDOW(window), title); + } +@@ -708,6 +706,7 @@ int main(int argc, char **argv) + char *vncport = NULL; + char *transport = NULL; + char *user = NULL; ++ const char *tmpname = NULL; + int port = 0; + int fd = -1; + int direct = 0; +@@ -772,6 +771,10 @@ int main(int argc, char **argv) + if (!vncport) + usleep(300*1000); + } while (!vncport); ++ tmpname = virDomainGetName(dom); ++ if (tmpname != NULL) { ++ domname = strdup(tmpname); ++ } + virDomainFree(dom); + virConnectClose(conn); + + diff --git a/virt-viewer.spec b/virt-viewer.spec index 560b0aa..1ff1401 100644 --- a/virt-viewer.spec +++ b/virt-viewer.spec @@ -2,7 +2,7 @@ Name: virt-viewer Version: 0.0.2 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Virtual Machine Viewer Group: Applications/System @@ -10,6 +10,8 @@ License: GPLv2+ URL: http://virt-manager.org/ Source0: http://virt-manager.org/download/sources/%{name}/%{name}-%{version}.tar.gz Patch1: %{name}-%{version}-vnc-credential-name.patch +Patch2: %{name}-%{version}-hide-passwd.patch +Patch3: %{name}-%{version}-window-title.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: gtk2-devel @@ -26,6 +28,8 @@ and libvirt for looking up VNC server details. %prep %setup -q %patch1 -p1 +%patch2 -p1 +%patch3 -p1 %build %configure @@ -46,6 +50,10 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man1/%{name}* %changelog +* Fri Jan 11 2008 Daniel P. Berrange - 0.0.2-3.fc9 +- Set domain name as window title +- Hide input for passwd fields during auth + * Mon Oct 15 2007 Daniel P. Berrange - 0.0.2-2.fc8 - Change TLS x509 credential name to sync with libvirt