1213 Commits

Author SHA1 Message Date
Pavel Grunt
233c61eaea monitor-mapping: Do not allow to skip a display
Skipping a display does not have an effect because displays will be
reconfigured and shifted on the guest side anyway.

these monitor mappings are not valid:
 'monitor-mapping=1:2;3:1' - display #2 is not specified
 'monitor-mapping=4:2;2:1' - displays #1, #3 are not specified
 'monitor-mapping=3:3'     - displays #1, #2 are not specified
2015-06-04 10:58:09 +02:00
Fabiano Fidêncio
ad438e0b96 session-spice: Only update displays geometry if the agent is connected 2015-06-02 17:29:03 +02:00
Lukas Venhoda
596aea6912 virt-viewer: Fix choose VM dialog alt-tab in gnome2
Choose VM dialog was not visible in taskbar and alt-tab when running on
system with gnome2.

rhbz#1223285
2015-05-21 13:06:31 +02:00
Fabiano Fidêncio
921318e42f Revert "display-vnc: fix zoom-level set by command line"
This reverts commit 68148e1bd1a47ff370c78e2569a57ae0f3d8a400.

The commit in question was causing a regression about a tiny window
being displayed when opening a vnc guest.
The issue only happens with the gtk2 version of virt-viewer.

rhbz#1170071 that was solved by the reverted commit is avoided by
the commit c45a30e909656434aa842d48d828ef038ec7364a.

Resolves: rhbz#1201679
2015-05-21 13:06:31 +02:00
Pavel Grunt
61a1bc4dcb session-vnc: Set window for display to avoid gtk-vnc v0.3.8 crash
The VNC display widget of gtk-vnc v0.3.8 needs a window at the moment
it is initialized otherwise it would crash.

Resolves: rhbz#1196517
2015-05-21 13:06:31 +02:00
Lukas Venhoda
fc2add5827 virt-viewer-display-vnc: Set uuid when using VNC
Notify user, that VNC does not provide uuid.

Set uuid to string "VNC does not provide guid".
This is more informative then just plain "Unknown".
User will now know WHY the GUID is unknown, when using remote-viewer.
2015-05-21 13:06:30 +02:00
Lukas Venhoda
772698a8a6 virt-viewer-display-vnc: Set guest name when using VNC
If it's not already set, set guest name field in virt-viewer-app when using VNC.

Wait for VNC to be initialized (virt_viewer_display_vnc_initialized()).
In this callback get field guest name from app and check whether it
was already set before (FE from libvirt).
If not, set the guest name to name provided by VNC from
vnc_display_get_name().

This fill fix issue in remote-viewer: Guest name is Unknown when using VNC.
2015-05-21 13:06:30 +02:00
Michal Privoznik
35c5f7f745 Fix syntax-check
Commit c45a30e9 broke syntax-check:

trailing_blank
src/virt-viewer-window.c:1478:
maint.mk: found trailing blank(s)
maint.mk:700: recipe for target 'sc_trailing_blank' failed
make: *** [sc_trailing_blank] Error 1

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2015-04-29 10:29:52 +02:00
Pavel Grunt
4219a7ec69 virt-viewer-window: Set initial zoom only once
It is not needed to do it more times as it may cause unnecessary resize
events especially when leaving the fullscreen mode

related: rhbz#1206460
2015-04-22 15:20:05 +02:00
Pavel Grunt
41645a0eb5 virt-viewer-window: Make sure that minimum zoom level is lower than NORMAL_ZOOM_LEVEL
The minimum size of the desktop is 100x100 if the minimum window size
is greater than this, the zoom level is greater than NORMAL_ZOOM_LEVEL

related: rhbz#1206460
2015-04-22 15:20:05 +02:00
Lukas Venhoda
82d6280e5c virt-viewer: Set toolbar buttons not sensitive when needed
File->Screenshot, File->Preferences, View->Zoom and Send keys are now
sensitive only while quest is connected.

Changed behaviour of zoom:

Previously, zoom could be set while quest wasn't connected. The zoom
would then be set on connection. There was no indication of current zoom
level while not connected to guest.

Now, the menu is not sensitive while not connected to guest. Zoom can
now be only modified while connected to guest, or from the command line.
2015-04-22 11:03:13 +02:00
Lukas Venhoda
2b7d8717f9 app/window: Set display menu not sensitive when needed
Displays menu must be sensitive only when at least one display is
enabled.
2015-04-22 10:46:02 +02:00
Fabiano Fidêncio
7a32e58f2d cosmetic: move the "break" to inside the {} block 2015-04-22 10:40:29 +02:00
Fabiano Fidêncio
64e7b604d3 spice-session: use the error message, when available, on _channel_destroy() 2015-04-22 10:40:29 +02:00
Fabiano Fidêncio
f3fe9ffe7b session-spice: Destroy the channel instead of emit a "session-disconnect" signal
Whenever we reach these branches, we will abort or have to create a new
spice session (from the dialog showed to the user). So, destroying the
channel on these situations seems sane enough.
It also avoids an error dialog to be popped out twice with (basically)
the same information.
2015-04-22 10:40:29 +02:00
Fabiano Fidêncio
98d892d811 session-spice: Do not use _UNUSED for used attributes
channel attribute is actually used for error treatment
2015-04-22 10:40:29 +02:00
Fabiano Fidêncio
70569de4d8 display: remove useless identation level 2015-04-22 10:40:29 +02:00
Jonathon Jongsma
f0c6bb27f4 SessionSpice: Protect against unreffing window twice
In theory, the dispose method can be called multiple times, so any
member variables that are unreffed should be set to NULL so that we
don't accidentally unref them multiple times.
2015-04-15 09:18:16 -05:00
Christophe Fergeau
d316c04345 build-sys: Ship mingw-virt-viewer.spec in tarballs
virt-viewer.spec is already shipped in tarballs, it's convenient to have
a pregenerated mingw-virt-viewer.spec in there as well.
2015-04-15 11:51:08 +02:00
Pavel Grunt
69a5077a8a virt-viewer-main: '--wait' should not be used without domain name
Commit a830275344c88aef12166661b68ea2b4429c7212 required the domain
name to be placed just after the '--wait' option. It broke the
command line api, because running 'virt-viewer $vm --wait' was considered
as the error.

This patch rather checks whether the domain name was specified.

Related: rhbz#1209398, rhbz#1211573
2015-04-14 18:22:01 +02:00
Pavel Grunt
d71c2a673d Revert "virt-viewer-main: Require domain name as argument for '--wait'"
This reverts commit a830275344c88aef12166661b68ea2b4429c7212.

Commit a830275344c88aef12166661b68ea2b4429c7212 required the domain
name to be placed just after the '--wait' option. It broke the
command line api, because running 'virt-viewer $vm --wait' was considered
as the error.

Related: rhbz#1209398, rhbz#1211573
2015-04-14 18:21:38 +02:00
Pavel Grunt
ea42d03027 Revert "man: document that '--wait' requires domain as parameter"
This reverts commit 9ba2d28a0f35b69befd26d7c122bbe4cd626422f.

Commit a830275344c88aef12166661b68ea2b4429c7212 required the domain
name to be placed just after the '--wait' option. It broke the
command line api, because running 'virt-viewer $vm --wait' was considered
as the error.

Related: rhbz#1209398, rhbz#1211573
2015-04-14 18:21:11 +02:00
Pavel Grunt
5c95093c82 Revert "virt-viewer-main: exit when domain names doesn't match"
This reverts commit 10264d0d1ecbd67d3e59e3a1a3032936b0635eda.

Commit a830275344c88aef12166661b68ea2b4429c7212 required the domain
name to be placed just after the '--wait' option. It broke the
command line api, because running 'virt-viewer $vm --wait' was considered
as the error.

Related: rhbz#1209398, rhbz#1211573
2015-04-14 18:20:20 +02:00
Pavel Grunt
10264d0d1e virt-viewer-main: exit when domain names doesn't match
Since the domain name is required as a parameter for the '--wait'
option (commit a830275344c88aef12166661b68ea2b4429c7212 ), it is
neccessary to check whether all domains names are the same. Otherwise
it wouldn't be clear which name should be used.

related: rhbz#1211573
2015-04-14 15:05:11 +02:00
Pavel Grunt
9ba2d28a0f man: document that '--wait' requires domain as parameter
related: rhbz#1211573
2015-04-14 15:05:11 +02:00
Pavel Grunt
5fa7ef636e man: document usage of domain name as optional
related: rhbz#1211573
2015-04-14 15:05:11 +02:00
Pavel Grunt
0443bd113f ovirt: Allow to cancel authentication without showing error dialog
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1201604
2015-04-14 15:03:48 +02:00
Christophe Fergeau
0c8f07ea64 ovirt: Add support for an 'admin' key in vv file
When using a user with administrator rights, the VMs this user can
access from the user portal and the admin portal are different, and
REST API users must indicate which set of VMs they want through a
specific header. libgovirt already has support for that in its API, but
virt-viewer was not making use of that API.
This commit adds support for an 'admin' field in the [ovirt] section of
.vv files so oVirt can indicate remote-viewer whether this header should
be set or not.
2015-04-09 11:34:48 +02:00
Pavel Grunt
07def4d4aa virt-viewer-app: Do not show error dialog twice for unknown graphic
Related: rhbz#1085216
2015-04-09 10:49:47 +02:00
Jonathon Jongsma
c543941a17 Cleanup: only add display when it's created
This wasn't causing any problems because the _add_display() function has
an early return for the case that the display has already been added to
the session, but it's quite confusing when reading the code to see this
_add_display() function being called for every display every time we get
a monitor configuration update.
2015-04-09 10:47:57 +02:00
Jonathon Jongsma
7ddbd28756 Emit one show-hint notification when enabling a display
Freeze notifications before setting the show hints to prevent multiple
notification signals from being emitted.
2015-04-09 10:47:57 +02:00
Pavel Grunt
3109799475 display-spice: Do not ignore change of position
Positions of displays can be changed by guest, it is important to
react to this change by rearranging client's windows otherwise
mouse actions can be assigned to a wrong window.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1206216
2015-04-09 10:47:57 +02:00
Pavel Grunt
01249f7032 virt-viewer-window: Return early when zoom of window and zoom of display are same
The zoom level should be changed when zoom levels of the window and
the display are different. It is wrong to check the previous value of
the window because it could be set just for the window and not for
the display (e.g. when setting zoom level using the command line).

Related to: https://bugzilla.redhat.com/show_bug.cgi?id=1206460
2015-04-09 10:47:57 +02:00
Pavel Grunt
998b13c881 virt-viewer-window: Set zoom when display is enabled and ready.
The display has default dimensions (100x100) when it is disabled.
Calculating the minimal zoom for the display will give wrong value
for the newly opened display.

It is better to wait for setting the zoom level to the moment when
the display is enabled and ready.

Related to: https://bugzilla.redhat.com/show_bug.cgi?id=1206460
2015-04-09 10:47:57 +02:00
Pavel Grunt
a830275344 virt-viewer-main: Require domain name as argument for '--wait'
As since 88f634179e56742a21fb4c7efc270e4203322d74 virt-viewer can be
used without a domain-name, let's require it when using --wait.

Resolves: rhbz#1209398
2015-04-07 12:32:02 +02:00
Christophe Fergeau
8f5c9969f3 Fix leak in virt_viewer_session_spice_clear_displays()
The GList returned by spice_session_get_channels() must be freed after
use.
2015-04-07 12:30:39 +02:00
Fabiano Fidêncio
26c2eccd96 Fix crash when disabling last enabled display
Using virt_viewer_signal_connect_object() instead of g_signal_connect()
ensures that menu_display_visible_toggled_cb() won't be executed after
the display object be disposed.

Backtrace for the crash:

 #0  0x00007ffff070592b in g_type_check_instance_is_a (type_instance=0x8851f0, iface_type=<optimized out>) at gtype.c:4016
 #1  0x000000000041ee06 in virt_viewer_display_get_session (self=0x8851f0) at ../../src/virt-viewer-display.c:702
 #2  0x0000000000417be7 in menu_display_visible_toggled_cb (checkmenuitem=0x93f790 [GtkCheckMenuItem], display=0x8851f0) at ../../src/virt-viewer-app.c:2187
 #6  0x00007ffff06fe29f in <emit signal ??? on instance 0x93f790 [GtkCheckMenuItem]> (instance=instance@entry=0x93f790, signal_id=<optimized out>, detail=detail@entry=0) at gsignal.c:3361
 #3  0x00007ffff06e3b9f in g_closure_invoke (closure=0x93faa0, return_value=return_value@entry=0x0, n_param_values=1, param_values=param_values@entry=0x7fffffffc230, invocation_hint=invocation_hint@entry=0x7fffffffc1b0) at gclosure.c:768
 #4  0x00007ffff06f54c9 in signal_emit_unlocked_R (node=node@entry=0x6d73e0, detail=detail@entry=0, instance=instance@entry=0x93f790, emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0x7fffffffc230) at gsignal.c:3549
 #5  0x00007ffff06fded0 in g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args@entry=0x7fffffffc3f0) at gsignal.c:3305
 #7  0x00007ffff5eb6158 in gtk_check_menu_item_activate (check_menu_item=0x93f790 [GtkCheckMenuItem]) at gtkcheckmenuitem.c:299
 #8  0x00007ffff5eb6158 in gtk_check_menu_item_activate (menu_item=0x93f790 [GtkCheckMenuItem]) at gtkcheckmenuitem.c:419
 #12 0x00007ffff06fe29f in <emit signal ??? on instance 0x93f790 [GtkCheckMenuItem]> (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>) at gsignal.c:3361
 #9  0x00007ffff06e3b9f in g_closure_invoke (closure=closure@entry=0x6d5aa0, return_value=return_value@entry=0x0, n_param_values=1, param_values=param_values@entry=0x7fffffffc6b0, invocation_hint=invocation_hint@entry=0x7fffffffc630) at gclosure.c:768
 #10 0x00007ffff06f51bd in signal_emit_unlocked_R (node=node@entry=0x6d5ba0, detail=detail@entry=0, instance=instance@entry=0x93f790, emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0x7fffffffc6b0) at gsignal.c:3479
 #11 0x00007ffff06fded0 in g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args@entry=0x7fffffffc870) at gsignal.c:3305
 #13 0x0000000000417c5e in menu_display_visible_toggled_cb (checkmenuitem=0x93f790 [GtkCheckMenuItem], display=0x8851f0) at ../../src/virt-viewer-app.c:2200
 #17 0x00007ffff06fe29f in <emit signal ??? on instance 0x93f790 [GtkCheckMenuItem]> (instance=instance@entry=0x93f790, signal_id=<optimized out>, detail=detail@entry=0) at gsignal.c:3361
 #14 0x00007ffff06e3c45 in g_closure_invoke (closure=0x93faa0, return_value=return_value@entry=0x0, n_param_values=1, param_values=param_values@entry=0x7fffffffcb50, invocation_hint=invocation_hint@entry=0x7fffffffcad0) at gclosure.c:768
 #15 0x00007ffff06f54c9 in signal_emit_unlocked_R (node=node@entry=0x6d73e0, detail=detail@entry=0, instance=instance@entry=0x93f790, emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0x7fffffffcb50) at gsignal.c:3549
 #16 0x00007ffff06fded0 in g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args@entry=0x7fffffffcd10) at gsignal.c:3305
 #18 0x00007ffff5eb6158 in gtk_check_menu_item_activate (check_menu_item=0x93f790 [GtkCheckMenuItem]) at gtkcheckmenuitem.c:299
 #19 0x00007ffff5eb6158 in gtk_check_menu_item_activate (menu_item=0x93f790 [GtkCheckMenuItem]) at gtkcheckmenuitem.c:419
 #23 0x00007ffff06fe29f in <emit signal ??? on instance 0x93f790 [GtkCheckMenuItem]> (instance=instance@entry=0x93f790, signal_id=<optimized out>, detail=detail@entry=0) at gsignal.c:3361
 #20 0x00007ffff06e3c45 in g_closure_invoke (closure=closure@entry=0x6d5aa0, return_value=return_value@entry=0x0, n_param_values=1, param_values=param_values@entry=0x7fffffffcfd0, invocation_hint=invocation_hint@entry=0x7fffffffcf50) at gclosure.c:768
 #21 0x00007ffff06f51bd in signal_emit_unlocked_R (node=node@entry=0x6d5ba0, detail=detail@entry=0, instance=instance@entry=0x93f790, emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0x7fffffffcfd0) at gsignal.c:3479
 #22 0x00007ffff06fded0 in g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args@entry=0x7fffffffd190) at gsignal.c:3305
 #24 0x00007ffff608648e in IA__gtk_widget_activate (widget=widget@entry=0x93f790 [GtkCheckMenuItem]) at gtkwidget.c:5048
 #25 0x00007ffff5f6cacd in IA__gtk_menu_shell_activate_item (menu_shell=0x70ece0 [GtkMenu], menu_item=0x93f790 [GtkCheckMenuItem], force_deactivate=<optimized out>) at gtkmenushell.c:1303
 #26 0x00007ffff5f6ce96 in gtk_menu_shell_button_release (widget=0x70ece0 [GtkMenu], event=<optimized out>) at gtkmenushell.c:730
 #31 0x00007ffff06fe29f in <emit signal ??? on instance 0x70ece0 [GtkMenu]> (instance=instance@entry=0x70ece0, signal_id=<optimized out>, detail=detail@entry=0) at gsignal.c:3361
 #27 0x00007ffff5f578ad in _gtk_marshal_BOOLEAN__BOXED (closure=0x6c7180, return_value=0x7fffffffd4e0, n_param_values=<optimized out>, param_values=0x7fffffffd540, invocation_hint=<optimized out>, marshal_data=<optimized out>) at gtkmarshalers.c:86
 #28 0x00007ffff06e3c45 in g_closure_invoke (closure=closure@entry=0x6c7180, return_value=return_value@entry=0x7fffffffd4e0, n_param_values=2, param_values=param_values@entry=0x7fffffffd540, invocation_hint=invocation_hint@entry=0x7fffffffd4c0) at gclosure.c:768
 #29 0x00007ffff06f5cef in signal_emit_unlocked_R (node=node@entry=0x6c73f0, detail=detail@entry=0, instance=instance@entry=0x70ece0, emission_return=emission_return@entry=0x7fffffffd660, instance_and_params=instance_and_params@entry=0x7fffffffd540) at gsignal.c:3587
 #30 0x00007ffff06fdac2 in g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args@entry=0x7fffffffd710) at gsignal.c:3315
 #32 0x00007ffff608790c in gtk_widget_event_internal (widget=widget@entry=0x70ece0 [GtkMenu], event=event@entry=0x944f90) at gtkwidget.c:5017
 #33 0x00007ffff6087be7 in IA__gtk_widget_event (widget=widget@entry=0x70ece0 [GtkMenu], event=event@entry=0x944f90) at gtkwidget.c:4814
 #34 0x00007ffff5f55b94 in IA__gtk_propagate_event (widget=0x70ece0 [GtkMenu], event=0x944f90) at gtkmain.c:2501
 #35 0x00007ffff5f55f5b in IA__gtk_main_do_event (event=0x944f90) at gtkmain.c:1696
 #36 0x00007ffff5bae7dc in gdk_event_dispatch (source=<optimized out>, callback=<optimized out>, user_data=<optimized out>) at gdkevents-x11.c:2425
 #37 0x00007ffff03e40ba in g_main_context_dispatch (context=0x693d50) at gmain.c:3122
 #38 0x00007ffff03e40ba in g_main_context_dispatch (context=context@entry=0x693d50) at gmain.c:3737
 #39 0x00007ffff03e4450 in g_main_context_iterate (context=0x693d50, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3808
 #40 0x00007ffff03e4772 in g_main_loop_run (loop=0x748980) at gmain.c:4002
2015-04-03 01:13:48 +02:00
Pavel Grunt
6c8ec50c15 session-spice: Remove spice-gtk version checks
Since 77ac0d8892837a117f9ca10020c1ac7f1944fca7 virt-viewer requires
spice-gtk v0.28
2015-04-02 09:21:32 +02:00
Pavel Grunt
a66a8fbc92 virt-viewer-app: Set hotkeys when app is constructed
virt_viewer_app_set_hotkeys() calls virt_viewer_app_set_enable_accel()
which notify the display about "enable-accel". However the display
begins to exist after the virt_viewer_app initialization.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1206106
2015-04-02 09:21:32 +02:00
Pavel Grunt
c45a30e909 virt-viewer-window: Change zoom of the display only when it is possible
Do not allow to zoom out if it is not possible due to the width of
the top menu. It avoids emitting size allocation events that will
change the display resolution of the spice guest.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1206460
2015-04-02 09:21:32 +02:00
Pavel Grunt
5d4d1fe54c virt-viewer-window: Return NULL instead of FALSE for display 2015-04-02 09:21:32 +02:00
Pavel Grunt
0b653558ad virt-viewer-display: Use MIN_DISPLAY_WIDTH/HEIGHT instead of numbers 2015-04-02 09:21:32 +02:00
Pavel Grunt
2e5ae1550f Use ZOOM constants instead of numbers 2015-04-02 09:21:31 +02:00
Christophe Fergeau
30b7e299b0 Fix virt-viewer --reconnect crash with SPICE VMs
When using virt-viewer --reconnect, virt-viewer currently crashes when
a SPICE VM is destroyed with "virsh destroy"

What happens is that when the guest is destroyed, virt-viewer receives a
SPICE_CHANNEL_ERROR_IO notification in
virt_viewer_session_spice_main_channel_event().  This triggers the
emission of the "session-disconnected" signal, which will end up calling
spice_session_disconnect() (indirectly through
virt_viewer_app_disconnected/virt_viewer_app_deactivate).

Since spice-gtk commit ff25f3e, the actual session disconnection is
done from an idle.  When the "session-disconnected" emission stops, the
VirtViewerSession instance is destroyed. However, the associated
VirtViewerDisplaySpice are still alive as the various SpiceChannels
instances hold a reference through the "virt-viewer-displays" GObject
data.
These channels are destroyed when the idle queued by spice_session_disconnect()
run. The associated VirtViewerDisplay are in turn destroyed too, but
this causes attempts to use the VirtViewerSession associated with the
displays, which has already been destroyed. This causes a crash.

This commit adds a virt_viewer_session_spice_clear_displays() which is
similar to virt_viewer_session_clear_displays(), but makes sure the
"virt-viewer-displays" references are dropped too. This ensures the
VirtViewerDisplay instances don't outlive the VirtViewerSession
they are associated with.

Backtrace for the crash:

 #0  0x0000000000413f0f in display_show_hint (display=0x85ab50 [VirtViewerDisplaySpice], pspec=0x939bd0 [GParamFlags], user_data=0x0) at virt-viewer-app.c:949
 #4  0x00000031ff22a29f in <emit signal notify:show-hint on instance 0x85ab50 [VirtViewerDisplaySpice]> (instance=instance@entry=0x85ab50, signal_id=<optimized out>, detail=<optimized out>) at gsignal.c:3361
     #1  0x00000031ff20fc45 in g_closure_invoke (closure=0xa98f50, return_value=return_value@entry=0x0, n_param_values=2, param_values=param_values@entry=0x7fffffffc700, invocation_hint=invocation_hint@entry=0x7fffffffc680) at gclosure.c:768
     #2  0x00000031ff2214c9 in signal_emit_unlocked_R (node=node@entry=0x674f80, detail=detail@entry=1678, instance=instance@entry=0x85ab50, emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0x7fffffffc700) at gsignal.c:3549
     #3  0x00000031ff229ed0 in g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args@entry=0x7fffffffc8d0) at gsignal.c:3305
 #5  0x00000031ff214175 in g_object_dispatch_properties_changed (object=0x85ab50 [VirtViewerDisplaySpice], n_pspecs=<optimized out>, pspecs=<optimized out>) at gobject.c:1056
 #6  0x00000031ff216661 in g_object_notify (pspec=0x939bd0 [GParamFlags], object=0x85ab50 [VirtViewerDisplaySpice]) at gobject.c:1149
 #7  0x00000031ff216661 in g_object_notify (object=0x85ab50 [VirtViewerDisplaySpice], property_name=<optimized out>) at gobject.c:1197
 #8  0x000000000041e5ab in virt_viewer_display_set_show_hint (self=0x85ab50 [VirtViewerDisplaySpice], mask=1, enable=0) at virt-viewer-display.c:691
 #9  0x000000000042b62d in update_display_ready (self=0x85ab50 [VirtViewerDisplaySpice])
     at virt-viewer-display-spice.c:145
 #13 0x00000031ff22a29f in <emit signal notify:ready on instance 0x898590 [SpiceDisplay]> (instance=instance@entry=0x898590, signal_id=<optimized out>, detail=<optimized out>) at gsignal.c:3361
     #10 0x00000031ff20fc45 in g_closure_invoke (closure=0x99b280, return_value=return_value@entry=0x0, n_param_values=2, param_values=param_values@entry=0x7fffffffcc50, invocation_hint=invocation_hint@entry=0x7fffffffcbd0) at gclosure.c:768
     #11 0x00000031ff2214c9 in signal_emit_unlocked_R (node=node@entry=0x674f80, detail=detail@entry=1696, instance=instance@entry=0x898590, emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0x7fffffffcc50) at gsignal.c:3549
     #12 0x00000031ff229ed0 in g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args@entry=0x7fffffffce20) at gsignal.c:3305
 #14 0x00000031ff214175 in g_object_dispatch_properties_changed (object=0x898590 [SpiceDisplay], n_pspecs=<optimized out>, pspecs=<optimized out>) at gobject.c:1056
 #15 0x00000031ff216661 in g_object_notify (pspec=0xa83370 [GParamBoolean], object=0x898590 [SpiceDisplay]) at gobject.c:1149
 #16 0x00000031ff216661 in g_object_notify (object=0x898590 [SpiceDisplay], property_name=<optimized out>) at gobject.c:1197
 #17 0x00007ffff7522525 in update_ready (display=0x898590 [SpiceDisplay]) at spice-widget.c:236
 #18 0x00007ffff752257e in set_monitor_ready (self=0x898590 [SpiceDisplay], ready=0)
     at spice-widget.c:244
 #19 0x00007ffff75274e6 in primary_destroy (channel=0x89f5c0 [SpiceDisplayChannel], data=0x898590)
     at spice-widget.c:2169
 #20 0x00007ffff7528918 in channel_destroy (s=0x909fa0 [SpiceSession], channel=0x89f5c0 [SpiceDisplayChannel], data=0x898590) at spice-widget.c:2484
 #24 0x00000031ff22a29f in <emit signal ??? on instance 0x909fa0 [SpiceSession]> (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>) at gsignal.c:3361
     #21 0x00000031ff20fc45 in g_closure_invoke (closure=0xa9bda0, return_value=return_value@entry=0x0, n_param_values=2, param_values=param_values@entry=0x7fffffffd280, invocation_hint=invocation_hint@entry=0x7fffffffd200) at gclosure.c:768
     #22 0x00000031ff2214c9 in signal_emit_unlocked_R (node=node@entry=0x9c17d0, detail=detail@entry=0, instance=instance@entry=0x909fa0, emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0x7fffffffd280) at gsignal.c:3549
     #23 0x00000031ff229ed0 in g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args@entry=0x7fffffffd450) at gsignal.c:3305
 #25 0x00007ffff71c3248 in spice_session_channel_destroy (session=0x909fa0 [SpiceSession], channel=0x89f5c0 [SpiceDisplayChannel]) at spice-session.c:2217
 #26 0x00007ffff71bd8b2 in session_disconnect (self=0x909fa0 [SpiceSession], keep_main=0)
     at spice-session.c:281
 #27 0x00007ffff71c1b27 in session_disconnect_idle (self=0x909fa0 [SpiceSession]) at spice-session.c:1853
 #28 0x00000031fee4a0ba in g_main_context_dispatch (context=0x6a4400) at gmain.c:3122
 #29 0x00000031fee4a0ba in g_main_context_dispatch (context=context@entry=0x6a4400) at gmain.c:3737
 #30 0x00000031fee4a450 in g_main_context_iterate (context=0x6a4400, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3808
 #31 0x00000031fee4a772 in g_main_loop_run (loop=0x9890f0) at gmain.c:4002
 #32 0x0000003babc05f75 in gtk_main () at gtkmain.c:1219
 #33 0x000000000043143b in main (argc=1, argv=0x7fffffffda48) at virt-viewer-main.c:12
2015-04-01 14:27:57 +02:00
Fabiano Fidêncio
69dcde3c89 virt-viewer: Make update_display() more readable 2015-03-27 16:53:44 +01:00
Fabiano Fidêncio
dc2dd055d4 virt-viewer: Do not wait for a guest that will never show up
All the situations where virt_viewer_update_display() can fail are
those when we won't be able to connect regardless of what changes on the
remote host. So, propagate the error instead of waiting for the guest to
start.

Related: rhbz#1085216
2015-03-27 16:52:54 +01:00
Fabiano Fidêncio
f580f1ea54 remote-viewer: Avoid simple_message_dialog() when errors can be propagated
Remove the dialog used to report errors when create_session() fails,
propagating the error is enough and it is already done.

Related: rhbz#1085216
2015-03-27 16:49:53 +01:00
Fabiano Fidêncio
ffe19f6ece virt-viewer: Avoid simple_message_dialog() when errors can be propagated
Remove all the dialogs used to report errors on extract_connect_info()
and just propagate the errors we got from it.
The only exception is virt_viewer_domain_event(), that is a callback
that doesn't have GError as argument. In this specific case, we show the
error dialog instead of propagating it.

Related: rhbz#1085216
2015-03-27 16:48:31 +01:00
Fabiano Fidêncio
f1204f0e69 virt-viewer-app: create_session() should return a boolean
By convention functions that take GError parameters should return FALSE
(or NULL) or error.

Related: rhbz#1085216
2015-03-27 16:35:35 +01:00
Fabiano Fidêncio
f9c4a03bd7 virt-viewer-app: Add a GError arg to create_session()
This is part of a small re-factoring that will have all connection
errors, when we won't be able to connect regardless of what changes on
the remote host, being treated by virt_viewer_app_initial_connect(),
avoiding weird behaviors as we have nowadays (like more than one error
dialog being shown or having the virt-viewer waiting forever for a guest
that will never show up).

Related: rhbz#1085216
2015-03-27 16:12:58 +01:00