virt-viewer: use name of appvm applications as a title

This commit is contained in:
dump_stack() 2020-01-22 02:21:19 +00:00
parent 680aff06f7
commit 19b92aec1b
Signed by: dump_stack
GPG Key ID: BE44DA8C062D87DC
4 changed files with 29 additions and 2 deletions

View File

@ -4,6 +4,7 @@ let
patches = [ patches = [
./patches/0001-Remove-menu-bar.patch ./patches/0001-Remove-menu-bar.patch
./patches/0002-Do-not-grab-keyboard-mouse.patch ./patches/0002-Do-not-grab-keyboard-mouse.patch
./patches/0003-Use-name-of-appvm-applications-as-a-title.patch
]; ];
}); });
in with pkgs; in with pkgs;

View File

@ -1,7 +1,7 @@
From c26580442a4ac18f805b1795ec250d6cf5857a49 Mon Sep 17 00:00:00 2001 From c26580442a4ac18f805b1795ec250d6cf5857a49 Mon Sep 17 00:00:00 2001
From: Mikhail Klementev <blame@dumpstack.io> From: Mikhail Klementev <blame@dumpstack.io>
Date: Wed, 22 Jan 2020 00:25:16 +0000 Date: Wed, 22 Jan 2020 00:25:16 +0000
Subject: [PATCH 1/2] Remove menu bar Subject: [PATCH 1/3] Remove menu bar
--- ---
src/resources/ui/virt-viewer.ui | 2 +- src/resources/ui/virt-viewer.ui | 2 +-

View File

@ -1,7 +1,7 @@
From eac430d01f486e15b55d6fa992e77ded77bb4b1a Mon Sep 17 00:00:00 2001 From eac430d01f486e15b55d6fa992e77ded77bb4b1a Mon Sep 17 00:00:00 2001
From: Mikhail Klementev <blame@dumpstack.io> From: Mikhail Klementev <blame@dumpstack.io>
Date: Wed, 22 Jan 2020 00:41:34 +0000 Date: Wed, 22 Jan 2020 00:41:34 +0000
Subject: [PATCH 2/2] Do not grab keyboard/mouse Subject: [PATCH 2/3] Do not grab keyboard/mouse
--- ---
src/virt-viewer-display-spice.c | 4 ++-- src/virt-viewer-display-spice.c | 4 ++--

View File

@ -0,0 +1,26 @@
From c5b51c0a540af34499f2b2a49cb64599c06ba293 Mon Sep 17 00:00:00 2001
From: Mikhail Klementev <blame@dumpstack.io>
Date: Wed, 22 Jan 2020 01:24:57 +0000
Subject: [PATCH 3/3] Use name of appvm applications as a title
---
src/virt-viewer-window.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/virt-viewer-window.c b/src/virt-viewer-window.c
index 4c08423..cc8a440 100644
--- a/src/virt-viewer-window.c
+++ b/src/virt-viewer-window.c
@@ -1362,6 +1362,9 @@ virt_viewer_window_update_title(VirtViewerWindow *self)
if (!ungrab && !priv->subtitle)
title = g_strdup(g_get_application_name());
+ else if (g_str_has_prefix(priv->subtitle, "appvm_"))
+ /* Use name of the application as a title */
+ title = g_strdup_printf(_("%s"), &priv->subtitle[strlen("appvm_")]);
else
/* translators:
* This is "<ungrab (or empty)><space (or empty)><subtitle (or empty)> - <appname>"
--
2.23.1