summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* session-vnc: Set window for display to avoid gtk-vnc v0.3.8 crashPavel Grunt2015-05-211-0/+5
| | | | | | | 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
* virt-viewer-display-vnc: Set uuid when using VNCLukas Venhoda2015-05-211-1/+7
| | | | | | | | 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.
* virt-viewer-display-vnc: Set guest name when using VNCLukas Venhoda2015-05-211-0/+14
| | | | | | | | | | | | 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.
* Fix syntax-checkMichal Privoznik2015-04-291-1/+1
| | | | | | | | | | | | 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>
* virt-viewer-window: Set initial zoom only oncePavel Grunt2015-04-221-1/+3
| | | | | | | 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
* virt-viewer-window: Make sure that minimum zoom level is lower than ↵Pavel Grunt2015-04-221-1/+2
| | | | | | | | | 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
* virt-viewer: Set toolbar buttons not sensitive when neededLukas Venhoda2015-04-225-0/+43
| | | | | | | | | | | | | | 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.
* app/window: Set display menu not sensitive when neededLukas Venhoda2015-04-223-1/+19
| | | | | Displays menu must be sensitive only when at least one display is enabled.
* cosmetic: move the "break" to inside the {} blockFabiano Fidêncio2015-04-221-1/+1
|
* spice-session: use the error message, when available, on _channel_destroy()Fabiano Fidêncio2015-04-221-1/+4
|
* session-spice: Destroy the channel instead of emit a "session-disconnect" signalFabiano Fidêncio2015-04-221-2/+2
| | | | | | | | 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.
* session-spice: Do not use _UNUSED for used attributesFabiano Fidêncio2015-04-221-1/+1
| | | | channel attribute is actually used for error treatment
* display: remove useless identation levelFabiano Fidêncio2015-04-221-23/+21
|
* SessionSpice: Protect against unreffing window twiceJonathon Jongsma2015-04-151-2/+1
| | | | | | 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.
* virt-viewer-main: '--wait' should not be used without domain namePavel Grunt2015-04-141-0/+5
| | | | | | | | | | | 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
* Revert "virt-viewer-main: Require domain name as argument for '--wait'"Pavel Grunt2015-04-141-5/+4
| | | | | | | | | | | 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
* Revert "virt-viewer-main: exit when domain names doesn't match"Pavel Grunt2015-04-141-5/+0
| | | | | | | | | | | 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
* virt-viewer-main: exit when domain names doesn't matchPavel Grunt2015-04-141-0/+5
| | | | | | | | | 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
* man: document usage of domain name as optionalPavel Grunt2015-04-141-1/+1
| | | | related: rhbz#1211573
* ovirt: Allow to cancel authentication without showing error dialogPavel Grunt2015-04-141-0/+12
| | | | Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1201604
* ovirt: Add support for an 'admin' key in vv fileChristophe Fergeau2015-04-093-0/+31
| | | | | | | | | | | 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.
* virt-viewer-app: Do not show error dialog twice for unknown graphicPavel Grunt2015-04-091-2/+0
| | | | Related: rhbz#1085216
* Cleanup: only add display when it's createdJonathon Jongsma2015-04-091-3/+2
| | | | | | | | 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.
* Emit one show-hint notification when enabling a displayJonathon Jongsma2015-04-091-1/+4
| | | | | Freeze notifications before setting the show hints to prevent multiple notification signals from being emitted.
* display-spice: Do not ignore change of positionPavel Grunt2015-04-093-2/+32
| | | | | | | | 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
* virt-viewer-window: Return early when zoom of window and zoom of display are ↵Pavel Grunt2015-04-091-3/+2
| | | | | | | | | | | 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
* virt-viewer-window: Set zoom when display is enabled and ready.Pavel Grunt2015-04-091-1/+4
| | | | | | | | | | | 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
* virt-viewer-main: Require domain name as argument for '--wait'Pavel Grunt2015-04-071-4/+5
| | | | | | | As since 88f634179e56742a21fb4c7efc270e4203322d74 virt-viewer can be used without a domain-name, let's require it when using --wait. Resolves: rhbz#1209398
* Fix leak in virt_viewer_session_spice_clear_displays()Christophe Fergeau2015-04-071-0/+1
| | | | | The GList returned by spice_session_get_channels() must be freed after use.
* Fix crash when disabling last enabled displayFabiano Fidêncio2015-04-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* session-spice: Remove spice-gtk version checksPavel Grunt2015-04-021-11/+0
| | | | | Since 77ac0d8892837a117f9ca10020c1ac7f1944fca7 virt-viewer requires spice-gtk v0.28
* virt-viewer-app: Set hotkeys when app is constructedPavel Grunt2015-04-021-1/+1
| | | | | | | | 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
* virt-viewer-window: Change zoom of the display only when it is possiblePavel Grunt2015-04-021-1/+71
| | | | | | | | 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
* virt-viewer-window: Return NULL instead of FALSE for displayPavel Grunt2015-04-021-1/+1
|
* virt-viewer-display: Use MIN_DISPLAY_WIDTH/HEIGHT instead of numbersPavel Grunt2015-04-022-4/+7
|
* Use ZOOM constants instead of numbersPavel Grunt2015-04-024-23/+25
|
* Fix virt-viewer --reconnect crash with SPICE VMsChristophe Fergeau2015-04-011-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* virt-viewer: Make update_display() more readableFabiano Fidêncio2015-03-271-5/+3
|
* virt-viewer: Do not wait for a guest that will never show upFabiano Fidêncio2015-03-271-1/+1
| | | | | | | | | 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
* remote-viewer: Avoid simple_message_dialog() when errors can be propagatedFabiano Fidêncio2015-03-271-1/+1
| | | | | | | Remove the dialog used to report errors when create_session() fails, propagating the error is enough and it is already done. Related: rhbz#1085216
* virt-viewer: Avoid simple_message_dialog() when errors can be propagatedFabiano Fidêncio2015-03-271-10/+6
| | | | | | | | | | 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
* virt-viewer-app: create_session() should return a booleanFabiano Fidêncio2015-03-274-11/+11
| | | | | | | By convention functions that take GError parameters should return FALSE (or NULL) or error. Related: rhbz#1085216
* virt-viewer-app: Add a GError arg to create_session()Fabiano Fidêncio2015-03-274-13/+11
| | | | | | | | | | | 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
* virt-viewer: Add a GError arg to update_display()Fabiano Fidêncio2015-03-271-4/+4
| | | | | | | | | | | 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
* virt-viewer: Add a GError arg to extract_connect_info()Fabiano Fidêncio2015-03-271-2/+19
| | | | | | | | | | | 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
* Do not use comments that are not in EnglishFabiano Fidêncio2015-03-261-1/+1
|
* virt-viewer: Clean up if no vm was chosenPavel Grunt2015-03-241-1/+1
| | | | | | | | It is safe to clean up when running virt-viewer without specifying vm name if no vm was chosen. It brings back behavior before 88f6341. The 'if (dom == NULL && err != NULL)' part was affected by commits 824c4b9, 1eaaf8c, 15c7d17 so the check for 'err' is not needed anymore.
* Report errors in one placePavel Grunt2015-03-234-29/+23
| | | | | | Since the error is propagated to the main, report the error there. To make it work GError VIRT_VIEWER_ERROR_FAILED is set for all failing states and it is reported using virt_viewer_app_simple_message_dialog().
* Clear GError in cleanup sectionPavel Grunt2015-03-232-4/+2
|
* Exit normally when canceling dialogPavel Grunt2015-03-238-36/+62
| | | | | | | | | This applies for: libvirt authentication dialog (e.g. virt-viewer --attach guest) 'recent connection' dialog (e.g. remote-viewer) 'vm choose' dialog when connecting without specifying the vm name This is done by using a new GError VIRT_VIEWER_ERROR_CANCELLED.