summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* Handle virt_viewer_app_start() errorsChristophe Fergeau2013-11-131-2/+3
| | | | | | | | | | | | | | | | | remote_viewer_deactivated() can be calling virt_viewer_app_start() without checking whether it returns TRUE or FALSE. It returns FALSE when it was not successful (when it failed to parse the URI to connect to for example, or whe the user presses Cancel in the connection dialog). This means that if the user starts remote-viewer, enters a valid URI in the connection dialog to which it cannot connect to (spice://example.com:999) and then presses Cancel in the connection dialog that appears after the connection failure, then remote-viewer will be sitting there with an empty window doing nothing. This commit ensures we chain to the parent class when virt_viewer_app_start() returns FALSE, which causes remote-viewer to exit.
* Fix window title after failed connectionChristophe Fergeau2013-11-131-1/+7
| | | | | | | | | | | | | When using the connection dialog, if the user picks an invalid URI first causing a failed connection, and then picks/enters a valid URI, remote-viewer window title will be set to the first invalid URI, not to the second one which was entered. As the user may have specified a window title to use on the command line (-t option), we need to be careful not to override that when setting the window title on the second attempt. Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1024309
* Disconnect fullscreen map-event handler when leaving fullscreenJonathon Jongsma2013-11-131-10/+14
| | | | | | | | | When we enter fullscreen mode before the window is shown, we set up a signal handler to enter fullscreen mode when the window is mapped. If we then leave fullscreen mode before the window is mapped, we don't disconnect this handler, so it will still enter fullscreen mode when it is shown. Fixes rhbz #1009513
* Drop basic fullscreen modeJonathon Jongsma2013-11-134-64/+6
| | | | | | Remove the distinction between --full-screen and --full-screen=auto-conf. Just make --full-screen behave like auto-conf did. There's really no advantage to having two slightly different fullscreen startup modes.
* Unify configured hotkey behaviourMarc-André Lureau2013-11-073-11/+20
| | | | | | | | | | | Whether the hotkeys are set through command line, controller or file, we should get the same keybinding result (clear unspecified, and enable global bindings) However, when started from command line arguments, without --hotkey argument, it will have basic non-global default bindings. https://bugzilla.redhat.com/show_bug.cgi?id=1023447
* file: learn to set secure-attention hotkeyMarc-André Lureau2013-11-072-0/+28
|
* Rename internal toggle-fullscreen menu accel nameMarc-André Lureau2013-11-073-5/+5
| | | | This avoid confusion with other fullscreen state property
* file: factor a bit setting accelerators codeMarc-André Lureau2013-11-071-22/+20
|
* ovirt: Only set SPICE CA cert if it's non NULLChristophe Fergeau2013-10-301-3/+7
| | | | | | We currently reuse the oVirt CA cert for SPICE connection as well, but it may not be set. When this happens, we don't want to try to use it.
* ovirt: Don't automatically download CA certificateChristophe Fergeau2013-10-301-6/+0
| | | | | | | | | | | The CA certificate to use to authenticate the various hosts in an oVirt instance can be fetched from https://ovirt.example.com/ca.crt. However, the gio API we are using does not seem to be checking the server-side certificate of ovirt.example.com before connecting to it, which could lead to man-in-the-middle attacks. Now that the CA certificate to use can be specified from the command line using --ovirt-ca-file, we can remove this automatic fetching of the CA certificate.
* ovirt: Honour oVirt command line optionsChristophe Fergeau2013-10-302-0/+7
| | | | | | libgovirt 0.3.0 and newer can be passed from the commandline a CA certificate to use during SSL communications. This commit adds support for this option to remote-viewer.
* ovirt: Remove use of deprecated APIsChristophe Fergeau2013-10-301-3/+12
| | | | | ovirt_proxy_fetch_vms/ovirt_proxy_lookup_vm have been deprecated in govirt 0.3.0
* Clean-up spaces before/after URI in connection dialogChristophe Fergeau2013-10-291-0/+1
| | | | | | | | | | | When starting remote-viewer with no argument, a connection dialog is shown. If the URI the user types in this dialog as trailing or leading spaces, then connection will fail because remote-viewer will keep them as if they were significant. This commit makes sure we remove spaces at the beginning/end of the URI before trying to use it. This fixes https://bugzilla.redhat.com/show_bug.cgi?id=1024199
* Fix 'quiting' typo in VirtViewerApp private memberChristophe Fergeau2013-10-291-3/+3
|
* Make 'Send' menu items with defined accels work in fullscreenJonathon Jongsma2013-10-181-1/+4
|
* Set Spice display to fullscreen if owning window is pending fullscreenJonathon Jongsma2013-10-181-2/+2
| | | | | | | | | | When you call virt_viewer_window_enter_fullscreen() on a hidden window, it didn't actually change its fullscreen state. Instead, it sets up a map-event handler to enter fullscreen after it is shown. When _set_display() is called on a window that is pending fullscreen status, it initially sets the fullscreen state of the display to FALSE, which can cause an unwanted resize to be sent down to the guest. This patch changes the behavior to set its fullscreen state to TRUE even before the window is shown.
* Don't freeze property notifications when adding new displaysJonathon Jongsma2013-10-181-4/+0
| | | | | | | | | Freezing property notifications prevents VirtViewerDisplaySpice from synchronizing its fullscreen/auto-resize state with the base class until after the notifications are thawed. During the time that notifications were frozen, an allocation happens. The action we take on an allocation event depends on the current state of the auto_resize variable, so this can result in an unwanted resize.
* VirtViewerDisplaySpice: use enum type for auto_resizeJonathon Jongsma2013-10-181-7/+8
| | | | | Instead of storing the auto_resize member as an integer, use the enum, it makes it slightly easier for debugging. Also, explicitly initialize the value.
* Avoid extra zoom-level property notificationsJonathon Jongsma2013-10-181-0/+4
| | | | | When setting a display's zoom level to the same level as the current setting, return early so that we don't notify about a property change
* Don't disable fullscreen if kiosk mode is offJonathon Jongsma2013-10-181-1/+2
| | | | | | This conflicts with the --full-screen switch, because if kiosk mode is disabled, it sets disables fullscreen mode, which overrides the earlier call to enable fullscreen.
* Make 'Cancel' the default action in exit dialogChristophe Fergeau2013-10-161-0/+1
| | | | | | | | | In the 'Do you want to close the session dialog?', the default focus is currently on the 'Do not ask me again' checkbox. The purpose of this dialog is to make sure that the user does not inadvertantly exit remote-viewer, this commit changes the default action in this dialog to be 'cancel' rather than switching the 'Do not ask me again 'checkbox.
* vnc: Clear all displays before creating dummy displayChristophe Fergeau2013-10-161-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If VirtViewerSessionVnc::disconnected is called because of an authentication failure, we get: (remote-viewer:29588): gtk-vnc-DEBUG: vncdisplay.c Disconnected from VNC server (remote-viewer:29588): Gtk-WARNING **: Attempting to add a widget with type VncDisplay to a container of type VirtViewerDisplayVnc, but the widget is already inside a container of type VirtViewerDisplayVnc, please use gtk_widget_reparent() #0 0x0000003136e50499 in g_logv (log_domain=0x3f2e13e143 "Gtk", log_level=G_LOG_LEVEL_WARNING, format=<optimized out>, args=args@entry=0x7fffffffd210) at gmessages.c:989 #1 0x0000003136e505ef in g_log (log_domain=<optimized out>, log_level=<optimized out>, format=<optimized out>) at gmessages.c:1025 #2 0x00000000004230eb in virt_viewer_display_vnc_new (vnc=0x8a8250) at virt-viewer-display-vnc.c:169 #3 0x0000000000422191 in virt_viewer_session_vnc_disconnected (vnc=0x8a8250, session=0x86bf00) at virt-viewer-session-vnc.c:113 #4 0x00000031372104c7 in _g_closure_invoke_va (closure=closure@entry=0x8ad2b0, return_value=return_value@entry=0x0, instance=instance@entry=0x8a8250, args=args@entry=0x7fffffffd530, n_params=0, param_types=0x0) at gclosure.c:840 #5 0x0000003137229749 in g_signal_emit_valist (instance=0x8a8250, signal_id=<optimized out>, detail=0, var_args=var_args@entry=0x7fffffffd530) at gsignal.c:3238 #6 0x000000313722a3af in g_signal_emit (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>) at gsignal.c:3386 #7 0x00007ffff7dbeb5a in on_disconnected (conn=0x8b5aa0, opaque=0x8a8250) at vncdisplay.c:1563 #8 0x00000031372104c7 in _g_closure_invoke_va (closure=closure@entry=0x7d55f0, return_value=return_value@entry=0x0, instance=instance@entry=0x8b5aa0, args=args@entry=0x7fffffffd820, n_params=0, param_types=0x0) at gclosure.c:840 #9 0x0000003137229749 in g_signal_emit_valist (instance=0x8b5aa0, signal_id=<optimized out>, detail=0, var_args=var_args@entry=0x7fffffffd820) at gsignal.c:3238 #10 0x000000313722a3af in g_signal_emit (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>) at gsignal.c:3386 #11 0x00007ffff7b97308 in do_vnc_connection_emit_main_context (opaque=0x7fffe3c91f40) at vncconnection.c:578 #12 0x0000003136e49256 in g_main_dispatch (context=0x681840) at gmain.c:3065 #13 g_main_context_dispatch (context=context@entry=0x681840) at gmain.c:3641 #14 0x0000003136e495d8 in g_main_context_iterate (context=0x681840, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3712 #15 0x0000003136e499ea in g_main_loop_run (loop=0x830430) at gmain.c:3906 #16 0x0000003f2dfa8f75 in gtk_main () at gtkmain.c:1158 #17 0x0000000000429bf3 in main (argc=1, argv=0x7fffffffdcd8) at remote-viewer-main.c:179 This commit calls virt_viewer_session_clear_displays() before creating a dummy VNC display with virt_viewer_display_vnc_new(), which avoids this warning.
* hotkeys: send modifiers before non-modifier keyMarc-André Lureau2013-09-261-3/+5
| | | | | | | | This fixes the "send menu" for hotkeys set with non-modifiers keys. The current order of press events is wrong, as it sends first non-modifiers keys, and in general ctrl+t will work, t+ctrl will not. https://bugzilla.redhat.com/show_bug.cgi?id=846006
* Add ability to use 'End' key in hotkeysJonathon Jongsma2013-09-101-1/+1
| | | | | | | | | | ctrl_key_to_gtk_key() capitalizes all key names not explicitly specified in the translation table. So 'end' becomes 'END', which is not a valid key name according to GTK+. Un-comment out the 'end' item from the table and set it to the properly capitalized key name ("End"). This allows users to specify e.g. "ctrl+alt+end" as a hotkey for sending the secure attention sequence.
* Add ability to send Secure attention sequence via keyboardJonathon Jongsma2013-09-103-20/+29
| | | | | | | | On Windows, the OS doesn't allow applications to handle Ctrl+Alt+Del, because it's handled by the OS at a much lower level. Although we have a menu item to send this sequence to the guest, it's not possible to send via the keyboard (in the windows client). So add an alternative key sequence (defaulting to Ctrl+Alt+End) to send this sequence to the guest.
* kiosk: explicit resize window to fullscreen sizeMarc-André Lureau2013-08-201-6/+1
| | | | | | | | | | | Allow to run the client in kiosk mode with window-manager-less environment. This was a conditional workaroud on win32. I am making it non-conditional to make fullscreen work on non-wm environment. Hence I don't see the need to refer explicitely to the bug workaround, since it is no longer something that should be removed, even when bgo 652049 is fixed.
* kiosk: don't open extra monitorsMarc-André Lureau2013-08-201-2/+11
| | | | | In kiosk mode, we don't want new monitors windows that wouldn't fit on the client monitors to come up.
* kiosk: warn and prevent if app want to quit or window to hideMarc-André Lureau2013-08-201-0/+5
| | | | | These condition shouldn't happen, they are here for debugging purposes (ie file a bug if it happens).
* kiosk: add --kiosk-quit optionMarc-André Lureau2013-08-201-1/+43
| | | | | | In kiosk mode, it's useful to keep the app alive, even if the remote session ended for example. Ie, we want to prevent the app from quiting itself, even if the remote end closed, lost network, or crashed etc.
* kiosk: teach a window to become kiosk-modeMarc-André Lureau2013-08-201-0/+25
| | | | Remove the toolbar, disable modifiers.
* kiosk: keep a reference on the toolbarMarc-André Lureau2013-08-201-1/+2
| | | | | We are going to change the container content dynamically, so we need a strong reference.
* kiosk: use less verbose window/display statusMarc-André Lureau2013-08-201-2/+7
| | | | | | | | | We want extra windows to remain blank after connection. For example, if the remote has a single monitor, and client has more, we don't want extra client monitors to say "Connected to graphic server" all the time on other monitors. Instead, we leave them empty/black in kiosk mode.
* kiosk: open a window on each client monitorMarc-André Lureau2013-08-201-0/+15
| | | | | | | Open a window on each client monitor in fullscreen. If the remote display has less monitors than the client, the extra client monitors will still be used to prevent the user from accessing the windows or desktop below, and also to show some status messages when necessary.
* kiosk: add app kiosk option, pass it down to windowMarc-André Lureau2013-08-203-0/+51
| | | | See man page update for details.
* Return existing window in app_window_new()Marc-André Lureau2013-08-201-0/+4
| | | | | | | | Since the returned window is weak, it can already returns existing windows (instead of creating one and failing to insert). This allows the following set_kiosk() function to create a main window before the app constructor is called.
* Define the min/max zoom levels, so all values are syncMarc-André Lureau2013-08-203-8/+11
|
* Try to share more GOption code between r-v and v-vMarc-André Lureau2013-08-208-94/+73
|
* remote-viewer: remove -d direct optionMarc-André Lureau2013-08-141-4/+0
| | | | | | | | remote-viewer currently doesn't provide automatic ssh tunnels, and even if it would, that would be explicit in the url given to remote-viewer (such as spice+ssh://...) https://bugzilla.redhat.com/show_bug.cgi?id=991261
* spice: show an error dialog if password is invalidMarc-André Lureau2013-08-081-0/+7
| | | | | | | Error message should show up when input the wrong password for spice guests as vnc guests. https://bugzilla.redhat.com/show_bug.cgi?id=990883
* Enable smartcard shortcuts when a software reader is presentChristophe Fergeau2013-07-311-6/+74
| | | | | | | At the moment, smartcard keyboard accelerators are always enabled when specified, even if no software smartcard reader is in use. This commit only enables the smartcard keyboard accelerators when a smartcard reader has been found. This fixes rhbz#866944
* Add VirtViewerSession::software-smartcard-reader propertyChristophe Fergeau2013-07-312-7/+84
| | | | | | | This property will be set to TRUE when a software smartcard reader is available, and FALSE otherwise. This property can only be TRUE when using SPICE and when smartcard support is enabled, and when both smartcard certificates and smartcard db directory are set.
* Fix two type cast problemsDaniel P. Berrange2013-07-311-2/+2
| | | | | | | | | The g_array_free() return value is 'char *' rather than 'void *' so must be explicitly cast to 'uint8 *'. The accelerator menu callback data is a GtkMenu rather GtkWidget Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* window: auto-add hot key combos to "Send key" menuMarc-André Lureau2013-07-301-0/+73
| | | | | | | Auto-add hotkey combos to "Send key" menu. Because they are captured by virt-viewer, there is currently no way to pass them to the guest. https://bugzilla.redhat.com/show_bug.cgi?id=846006
* window: use dynamically generated menuMarc-André Lureau2013-07-302-170/+31
| | | | | Remove the static Glade menu in favour of the one generated dynamically already used for the toolbar.
* window: use a menu item property for key combosMarc-André Lureau2013-07-301-41/+53
| | | | | | | Allow to add dynamically generated key combos later on. This also removes the extra combo lookup, which used to be problematic due to translations etc.
* compat: add a few GDK_Key definesMarc-André Lureau2013-07-301-0/+2
|
* file: add missing field commentMarc-André Lureau2013-07-301-0/+1
|
* Remove restore window location codeMarc-André Lureau2013-07-301-14/+0
| | | | | | | | | It turns out gdk on win32 already restores properly the window size/positon when leaving fullscreen. On non-win32, the WM should do the job. This solves the first window having too small size after leaving fullscreen: https://bugzilla.redhat.com/show_bug.cgi?id=978362
* win32: fix first window un-shrinkable at startMarc-André Lureau2013-07-301-8/+26
| | | | | | The fix 0dca975d64fcf0782ec7b3e3bd965f1bcf47c528 make the first window unshrinkable right after start. Wait until the window is mapped and remove the dirty-resizable state after (win32/gtk2).
* Make zoom-reset a global key bindingMarc-André Lureau2013-07-304-1/+6
|