IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
Instead of fetching toplevel REST API query, we use the one relative
from the data center, which returns more detailed information,
especially the status of the storage domain.
This fixes https://bugzilla.redhat.com/show_bug.cgi?id=1427467
Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
This patch improves the error shown to the user when a file transfer
fails.
The previous behavior was to create a simple message dialog box, with
the error description and the full list of the files that failed to be
transferred. When the list of files was long, the dialog box would
grow bigger than the screen.
Now, the file list is inserted inside a scrollable widget, whose
height is limited to 170px.
NB: these two calls would be more adapted, but they require GTK >=
3.22:
> gtk_scrolled_window_set_max_content_height(GTK_SCROLLED_WINDOW(scrolled_window), 170);
> gtk_scrolled_window_set_propagate_natural_height(GTK_SCROLLED_WINDOW(scrolled_window), TRUE);
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1496356
Signed-off-by: Kevin Pouget <kpouget@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
With this change one can get list of domains on the command line:
$ virt-viewer -c qemu:///system <TAB><TAB>
dom1 dom2 ... domN
The list of domains is fetched using virsh, hence the dependency
on libvirt-client recorded in the spec file. I think it's fair
to assume that Linux hosts with virt-viewer will have virsh
available too. If they don't, nothing breaks and no error message
is printed.
The completer script is inspired by libvirt.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
Use saved CFLAGS and LIBS to avoid errors in the check programs.
Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
Due to changes in commit 65ef66e4, when the initial connection fails,
virt-viewer just sat quietly and didn't indicate what was wrong. It also
did not exit as it did before. This is because we were using
virt_viewer_session_spice_channel_destroy() incorrectly. This function
was intended to be a callback that is called to clean up the VV session
when the SpiceSession tells us that a channel has been destroyed. It
does not actually destroy the channel, it only cleans up references to
that channel within virt-viewer. After calling this function, the
channel is not affected in any way. If the channel object was valid
before calling the function, it will be valid and unchanged after
calling the function as well.
The problem is that before commit 65ef66e4, this function
(_channel_destroy()) also had a side-effect of emitting a signal that
made us think that the SpiceSession was disconnected when it was not.
The application responded to this signal by exiting even though the
session was not properly disconnected and cleaned up.
We now no longer exit the application until the SpiceSession is properly
disconnected and cleaned up. So we need to make sure that this happens
when our initial connection fails. Therefore, when the main channel
receives an error channel-event, we should not call
virt_viewer_session_spice_channel_destroy(). This function should only
be called when a channel has actually been destroyed, and the channel is
not destroyed at this point. We should instead explicitly disconnect
the session, which will result in the channels being destroyed properly.
After the session destroys all of the channels, the 'channel-destroy' signal
will be emitted by SpiceSession, so the _channel_destroy() function will
eventually get called by the signal handler.
To make the proper use of the function more obvious, I also changed the
function name from _channel_destroy() to _channel_destroyed() and added
a comment.
Fixes: rhbz#1666869
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>