Commit Graph

1437 Commits

Author SHA1 Message Date
Daniel P. Berrangé
592cfa9821 po: minimize uk ur vi wba yo zh_CN zh_HK zh_TW zu
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-03-12 11:49:47 +00:00
Daniel P. Berrangé
c9fe1995e5 po: minimize sq sr@latin sr sv ta te tg th tr tw
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-03-12 11:49:47 +00:00
Daniel P. Berrangé
af26945352 po: minimize or pa pl pt_BR pt ro ru si sk sl
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-03-12 11:49:46 +00:00
Daniel P. Berrangé
d7ffa9280f po: minimize mn mr ms nb nds ne nl nn nso
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-03-12 11:49:46 +00:00
Daniel P. Berrangé
651901fdb2 po: minimize kw_GB kw@kkcor kw kw@uccor ky lt lv mai mk ml
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-03-12 11:49:45 +00:00
Daniel P. Berrangé
e32e576012 po: minimize id ilo is it ja ka kk km kn ko
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-03-12 11:49:44 +00:00
Daniel P. Berrangé
16339f99ce po: minimize fr gl gu he hi hr hu ia
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-03-12 11:49:44 +00:00
Daniel P. Berrangé
cadb31d389 po: minimize de_CH de el en_GB eo es et eu fa fi
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-03-12 11:49:43 +00:00
Daniel P. Berrangé
2daefdde22 po: minimize bn_IN bn bo br brx bs ca cs cy da
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-03-12 11:49:42 +00:00
Daniel P. Berrangé
5b9118f04c po: minimize af am anp ar as ast bal be bg
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-03-12 11:49:42 +00:00
Daniel P. Berrangé
99f960b944 po: minimize & canonicalize translations stored in git
Similar to the virt-viewer.pot, .po files contain line numbers and file
names identifying where in the source a translatable string comes from.
The source locations in the .po files are thrown away and replaced with
content from the virt-viewer.pot whenever msgmerge is run, so this is not
precious information that needs to be stored in git.

When msgmerge processes a .po file, it will add in any msgids from the
virt-viewer.pot that were not already present. Thus, if a particular msgid
currently has no translation, it can be considered redundant and again
does not need storing in git.

When msgmerge processes a .po file and can't find an exact existing
translation match, it will try todo fuzzy matching instead, marking such
entries with a "# fuzzy" comment to alert the translator to take a
look and either discard, edit or accept the match. Looking at the
existing fuzzy matches in .po files shows that the quality is awful,
with many having a completely different set of printf format specifiers
between the msgid and fuzzy msgstr entry. Fortunately when msgfmt
generates the .gmo, the fuzzy entries are all ignored anyway. The fuzzy
entries could be useful to translators if they were working on the .po
files directly from git, but Virt-Viewer outsourced translation to the
Fedora Zanata system, so keeping fuzzy matches in git is not much help.

Finally, by default msgids are sorted based on source location. Thus, if
a bit of code with translatable text is moved from one file to another,
it may shift around in the .po file, despite the msgid not itself changing.
If the msgids were sorted alphabetically, the .po files would have
stable ordering when code is refactored.

This patch takes advantage of the above observations to canonicalize
and minimize the content stored for .po files in git. Instead of storing
the real .po files, we now store .mini.po files.

The .mini.po files are the same file format as .po files, but have no
source location comments, are sorted alphabetically, and all fuzzy
msgstrs and msgids with no translation are discarded. This cuts the size
of content in the po directory.

Users working from a virt-viewer git checkout who need the full .po files
can run "make update-po", which merges the virt-viewer.pot and .mini.po
file to create a .po file containing all the content previously stored
in git.

Conversely if a full .po file has been modified, for example, by
downloading new content from Zanata, the .mini.po files can be updated
by running "make update-mini-po". The resulting diffs of the .mini.po
file will clearly show the changed translations without any of the noise
that previously obscured content. Being able to see content changes
clearly actually identified a bug in the zanata python client where it
was adding bogus "fuzzy" annotations to many messages:

  https://bugzilla.redhat.com/show_bug.cgi?id=1564497

Users working from virt-viewer releases should not see any difference in
behaviour, since the tarballs only contain the full .po files, not the
.mini.po files.

As an added benefit, generating tarballs with "make dist", will no
longer cause creation of dirty files in git, since it won't touch the
.mini.po files, only the .po files which are no longer kept in git.

The languages are minimized in the following commit since it is a
large mechanical process.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-03-12 11:49:41 +00:00
Daniel P. Berrangé
1ba5f91001 po: add rules for integration with zanata
Add rules to handle pushing virt-viewer.pot to zanata, and refreshing .po
files with new content from zanata.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-03-12 11:49:40 +00:00
Daniel P. Berrangé
98503e1a72 po: remove language list from zanata configuration
The <locales> element in zanata.xml is no longer relevant as this info
is recorded server side.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-03-12 11:49:39 +00:00
Daniel P. Berrangé
8089cddfcb po: provide custom make rules for po file management
Historically we have relied on intltool to install a standard
po/Makefile.in.in which has very limited scope for customization.
intltool is deprecated in favour of standard gettextize tools,
but these share the same disadvantages.

Writing make rules for po file management is no more difficult
than any other rules virt-viewer has, so stop using intltool
and don't use gettextize ether.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-03-12 11:49:38 +00:00
Daniel P. Berrangé
cebaaa22ff po: fix syntax error in plural forms for lt language
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-03-12 11:49:19 +00:00
ceb21d7894 remote-viewer: Allow toggling shared clipboard
Signed-off-by: Aleksei Nikiforov <darktemplar@basealt.ru>
Message-Id: <20190304143712.27989-1-darktemplar@basealt.ru>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2019-03-07 19:52:00 +01:00
Daniel P. Berrangé
226956eac7 Add a git-publish configuration file
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-03-04 10:43:39 +00:00
Daniel P. Berrangé
8e4683b00b rpm: remove obsolete Group tag purged from Fedora RPMs
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-03-01 17:11:36 +00:00
Daniel P. Berrangé
dffe9f090a Post release verson bump to 9.0
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-03-01 17:10:37 +00:00
Daniel P. Berrangé
30cb0ce8d0 Update NEWS for 8.0 release
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-03-01 16:43:57 +00:00
Daniel P. Berrangé
ecae4e5628 rpm: use the mingw hicolor icon theme not native
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-03-01 15:33:20 +00:00
Daniel P. Berrangé
8de486853e Add glib2-devel for mingw build
The native glib2-devel package is needed for mingw builds in order to
get the glib-compile-schemas binary.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-03-01 15:27:28 +00:00
Eduardo Lima (Etrunko)
099d86286b iso-dialog: Move type definitions from header to source file
There is no reason for this object to define a private structure, so it
is fine to make everything private to the dialog itself.

Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
2019-02-22 09:19:27 -03:00
Eduardo Lima (Etrunko)
ed4768d589 Update usage of GObject private structures
New functions and macros have been added in glib 2.38 to better handle
this case.

c8de2b11bb/NEWS

The old method is being deprecated as of version 2.58.

https://gitlab.gnome.org/GNOME/glib/merge_requests/7/commits

Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
2019-02-22 09:19:27 -03:00
Daniel P. Berrangé
7bea22aece msi: record full build environment in MSI installer
For proper compliance with the GPL and other licenses we need to be
clear about exactly what toolchain and dependent packages we used in
order to build the MSI installer we distribute.

Historically we've done this by including a "deps.txt" file which
provides a list of all the mingw{32,64}-* RPMs on the host system.

This is not sufficient information, however, because the build system
will in fact use various native packages too from the toolchain too,
notably including any program run by "configure" which covers various
shell utilities, and pkg-config, and then of course make & msitools
itself.

Rather than try to figure out which subset of host RPMs are used,
just list every single host RPM that is installed.

A key implication of this is that formal release builds should always
be done in a pristine build root populated with the minimal content
required for the build.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-02-19 14:59:18 +00:00
Daniel P. Berrangé
5daeea567c Declare VirtViewerFile variable at start of method
virt_viewer_session_vnc_auth_credential uses gotos which jump over the
declaration of 'file', meaning its contents are uninitialized in the
jump target.

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-02-19 14:52:59 +00:00
Daniel P. Berrangé
9e4cc377a5 Fix prototype of function with no arguments
Modern C standard requires the function to be "void"

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-02-19 14:52:59 +00:00
Daniel P. Berrangé
9e16ee09cf Fix signed/unsigned mixup in format args
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-02-19 14:51:29 +00:00
Eduardo Lima (Etrunko)
673e993158 window: Use proper define from glib for ignoring deprecated warning
Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2019-02-13 11:58:17 -02:00
Daniel P. Berrangé
455c9a2f36 Disable deprecation warnings for gtk_window_fullscreen_on_monitor
We use GLIB_VERSION_MAX_ALLOWED to prevent use of functions from
GTK >= 3.12. When we do conditional compilation based on a GTK
version check, we must thus suppress the warning:

  CC       libvirt_viewer_la-virt-viewer-window.lo
../../src/virt-viewer-window.c: In function 'virt_viewer_window_enter_fullscreen':
../../src/virt-viewer-window.c:608:9: error: 'gtk_window_fullscreen_on_monitor' is deprecated: Not available before 3.18 [-Werror=deprecated-declarations]
         gtk_window_fullscreen_on_monitor(GTK_WINDOW(priv->window),
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/gtk-3.0/gtk/gtkdialog.h:32,
                 from /usr/include/gtk-3.0/gtk/gtkaboutdialog.h:30,
                 from /usr/include/gtk-3.0/gtk/gtk.h:31,
                 from ../../src/virt-viewer-window.c:28:
/usr/include/gtk-3.0/gtk/gtkwindow.h:391:10: note: declared here
 void     gtk_window_fullscreen_on_monitor(GtkWindow *window,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-02-12 13:56:07 +00:00
Marc-André Lureau
8d451999be build-sys: lower spice-gtk requirement to 0.35 again
Compile out QMP channel support if spice-gtk version < 0.36.

(note: I didn't bother adding configure switch to enable it
explicitly, this could be added later if necessary)

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2019-02-04 11:42:11 +01:00
Paul Donohue
54b9d05b04 Report gtk_accel_map_change_entry() failures
Signed-off-by: Paul Donohue <virt-tools@PaulSD.com>
Message-Id: <1533340753-24176-2-git-send-email-virt-tools@PaulSD.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2019-02-01 11:21:33 +01:00
Marc-André Lureau
31cb5592a0 spice: hook into QMP port
If the "org.qemu.monitor.qmp.0" port is available:
- enable the VM UI
- get and follow the VM state
- send the requested VM actions

This requires spice-gtk version 0.36 with SpiceQmpPort helper.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2019-02-01 11:21:29 +01:00
Marc-André Lureau
951f364dc3 spice: hook into port channel to create VTE terminals
QEMU defines a few Spice port channel names in
docs/spice-port-fqdn.txt that can be interacted with a terminal.

Create VirtViewerDisplayVte display for all known terminal channel,
and redirect read/write signals.

Note that if VTE support is disabled, or if the VTE console isn't
shown, spice-gtk will still process those port channels (discarding
the read if VTE is disabled).

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2019-02-01 11:21:26 +01:00
Marc-André Lureau
ffa9c81a09 session: do not take VTE display into account for geometry changes
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2019-02-01 11:21:12 +01:00
Jonathon Jongsma
3bc3b15284 Fix regression when showing disconnect error
Commit 65ef66e42 introduced a regression due to lack of type-safety on
signals. We mistakenly passed a GError rather than a string error
message to the signal.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
2019-01-28 11:32:04 -06:00
Eduardo Lima (Etrunko)
b3017371ce Add missing G_MODULE_EXPORT to signal handler
Fixes the Windows case where the dialog fails to show with the following
message:

warning: "Could not find signal handler 'virt_viewer_window_menu_change_cd_activate'"

Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
2019-01-18 17:48:46 -02:00
Daniel P. Berrangé
9e2e894673 Add src/virt-viewer-display-vte.c to POTFILES
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-12-21 17:19:09 +00:00
Marc-André Lureau
e7b134c270 app: add "vm-running" property
Add "vm-running" property and modify "menu-vm-pause" check button
state when the running state changes.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2018-12-21 18:16:41 +04:00
Marc-André Lureau
2d8d923fd0 app: add "machine" UI
Add a new "Machine" menu, which allows to Pause/Reset/Power Down a VM.

The menu is only visible if "vm-ui" app property is set.

When the application quits, it will also send a quit action to the VM.

This is a similar behaviour/UI as qemu -display gtk.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2018-12-21 18:16:39 +04:00
Marc-André Lureau
a0a2d99fbd app: create a window for VTE displays
virt_viewer_app_display_added() now handles VTE displays. They should
be skipped for monitor configuration, and they don't emit "show-hint".

(a VTE display has a monitor nth == -1, which is now a valid value)

The associated window will be hidden when virt-viewer is started.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2018-12-21 18:16:03 +04:00
Marc-André Lureau
be5ff83dfc spice: add unix-path in .vv file support
This will allow to connect to a Spice server using a unix socket path,
for example:

[virt-viewer]
type=spice
unix-path=/var/run/user/1000/qemu/test/spice.sock

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Christophe Fergeau <cfergeau@redhat.com>
2018-12-21 16:53:35 +04:00
Marc-André Lureau
f06a882b11 display: allow display without associated monitor number
The VTE display will have monitor id -1.

Eventually, having a base "console" class without monitor id could
avoid this allowance.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2018-12-21 15:14:37 +04:00
Marc-André Lureau
fd25645c11 app: append VTE consoles to display submenu
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2018-12-21 15:14:34 +04:00
Marc-André Lureau
f6448ae6e6 app: set subtitle using VTE name
Currently, subtitle indicate the monitor number, ex: "Fedora (1)".

Custom subtitle use %d to place the monitor number.

Let's make this placeholder more generic to place the name of the
console, ex: "Fedora (Serial)".

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2018-12-21 15:14:31 +04:00
Marc-André Lureau
ad64d0a3ac session: skip monitor changes if there is no sized monitors
spice-gtk discards configurations without any sized monitors.

Also shuts extra warnings when shifting the monitors.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2018-12-21 15:14:29 +04:00
Marc-André Lureau
1ad52ea8e9 display: ignore display that do not have toplevel window
virt_viewer_display_get_preferred_monitor_geometry() may be called
during application initialization (when the VTE console is being
shown, virt_viewer_session_update_displays_geometry() is called when
the visibility menu item is toggled). But the other displays may not
yet be associated with a window, ignore them.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2018-12-21 15:14:26 +04:00
Marc-André Lureau
f23548aa33 window/zoom: deal with VTE display differently
VTE display doesn't use the desktop / window aspect ratio, let's just
call directly the functions handling zoom.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2018-12-21 15:14:24 +04:00
Marc-André Lureau
c233917495 Add a VirtViewerDisplayVte display kind
This is not a graphical display, so the application will have to deal
with it with care.

You may argue that we need a large refactoring to introduce a more
generic "console" object, that could be either graphical or textual.
For now, this does work well enough for me.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2018-12-21 15:14:22 +04:00
Marc-André Lureau
126db5f639 build-sys: check for VTE library
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2018-12-21 15:14:19 +04:00