summaryrefslogtreecommitdiffstats
path: root/src/virt-viewer-app.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Reconnect to libvirtd after connection breaksMichal Privoznik2012-11-131-0/+2
| | | | | | | | Currently, if user wants to reconnect to a domain he can use '-r' cmd line argument. This makes virt-viewer listen to domain events. However, if connection to libvirtd breaks somehow, we will receive no longer any event. Hence we must reconnect to the libvirt.
* spice: only autoresize once with screen size in fullscreenMarc-André Lureau2012-10-181-0/+8
| | | | | | | | | | | | It's currently not possible to configure guest with higher resolution than native, as it will switch back to native, since the gtk widget allocation will always end up being the size of the screen. We special-case fullscreen mode, and only resize when entering fullscreen. Furthermore, it avoids sending extra unnecessary resize events to the guest whenever gtk+ call size allocate in various stages, with different values. https://bugzilla.redhat.com/show_bug.cgi?id=864929
* Allow user to set a window title for remote-viewerDaniel P. Berrange2012-10-091-3/+17
| | | | | | | | | Currently the remote viewer windows get the URI as their title. Provide a --title STRING arg to remote-viewer to let the user override the title with something more meaningful to them. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* Append \n to message in virt_viewer_app_traceChristophe Fergeau2012-09-181-8/+9
| | | | | | | Callers manually add a trailing \n when they call virt_viewer_app_trace, but it's sometimes forgotten, leading to rhbz#822794. This commit removes the \n from all callers (it was missing in a few of them) and adds it in virt_viewer_app_trace.
* Add VirtViewerSession::session-display-updatedMarc-André Lureau2012-07-231-0/+9
| | | | | Rebuild menu when agent is connected. Only when the agent is running may a display be enabled/disabled.
* Make the display submenu insensitive if display can't be selectedMarc-André Lureau2012-07-231-1/+17
|
* Number display starting from 1Marc-André Lureau2012-07-231-1/+1
|
* Add a DISABLED display hintMarc-André Lureau2012-07-231-5/+7
| | | | | | | | This flag will help to track whether the display has been removed/closed and whether it really has a valid display. Ready in contrast, is used to "hide" temporarily the display (when starting or redrawing the display, to avoid artifacts)
* Use virt_viewer_connect_object() for displayMarc-André Lureau2012-07-231-2/+2
| | | | | | | When display is released, detach signal automatically. Fix various crash related to not cleaning up signal handlers properly, due to no longer 1-1 only relation between display widget and channel.
* Rebuild display menu when a window is added or removedMarc-André Lureau2012-07-231-0/+3
|
* Mark a menu string as translatableMarc-André Lureau2012-07-231-1/+1
|
* Turn display:show-hint into flags typeMarc-André Lureau2012-07-231-2/+3
|
* Destroy dialog immediately after runMarc-André Lureau2012-07-231-1/+1
| | | | | If the parent is already destroyed, it looks like the dialog is destroyed too. This avoids a crash when calling app_quit().
* Revert "Fix virt_viewer_app_activate return value"Christophe Fergeau2012-06-151-7/+4
| | | | | | | This reverts commit 3ce6df7c309068f36e2602692da809a153ed5688. This commit broke virt-viewer which expects this function to return -1 or 0 on error, and a positive value on success in virt_viewer_initial_connect.
* Fix virt_viewer_app_activate return valueChristophe Fergeau2012-06-131-4/+7
| | | | | | | | VirtViewerApp::activate is expected to return -1 on errors. It calls the VirtViewerSession::open_* methods, which return FALSE on error. However, VirtViewerApp::activate directly returns these boolean instead of testing the returned value and properly returning -1 on errors. This caused errors in these open methodes to be ignored.
* Fix various memory leaksChristophe Fergeau2012-06-131-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ==25063== 59 bytes in 1 blocks are definitely lost in loss record 5,163 of 9,502 ==25063== at 0x4A0884D: malloc (vg_replace_malloc.c:263) ==25063== by 0x3DE384D2BE: g_malloc (gmem.c:159) ==25063== by 0x3DE3862D0B: g_strdup (gstrfuncs.c:356) ==25063== by 0x41F40A: connected (remote-viewer-main.c:186) ==25063== by 0x3DE400F663: g_closure_invoke (gclosure.c:777) ==25063== by 0x3DE40206D7: signal_emit_unlocked_R (gsignal.c:3547) ==25063== by 0x3DE402866C: g_signal_emit_valist (gsignal.c:3296) ==25063== by 0x3DE4028CCF: g_signal_emit_by_name (gsignal.c:3389) ==25063== by 0x41AA53: reemit_signal_VOID (virt-viewer-session-ovirt.c:211) ==25063== by 0x3DE400F942: _g_closure_invoke_va (gclosure.c:840) ==25063== by 0x3DE4027D87: g_signal_emit_valist (gsignal.c:3207) ==25063== by 0x3DE4028CCF: g_signal_emit_by_name (gsignal.c:3389) ==25063== 14 bytes in 1 blocks are definitely lost in loss record 623 of 9,502 ==25063== at 0x4A0884D: malloc (vg_replace_malloc.c:263) ==25063== by 0x34561092F7: __vasprintf_chk (vasprintf_chk.c:82) ==25063== by 0x3DE3882F1A: g_vasprintf (stdio2.h:199) ==25063== by 0x3DE3862EDC: g_strdup_vprintf (gstrfuncs.c:509) ==25063== by 0x3DE3862F7B: g_strdup_printf (gstrfuncs.c:535) ==25063== by 0x40CBAE: virt_viewer_app_update_pretty_address (virt-viewer-app.c:1538) ==25063== by 0x40FB55: virt_viewer_app_free_connect_info (virt-viewer-app.c:1707) ==25063== by 0x40FBE9: virt_viewer_app_dispose (virt-viewer-app.c:1291) ==25063== by 0x3DE40144F7: g_object_unref (gobject.c:2981) ==25063== by 0x40C31A: main (remote-viewer-main.c:336) ==25063== 10 bytes in 1 blocks are definitely lost in loss record 491 of 9,502 ==25063== at 0x4A0884D: malloc (vg_replace_malloc.c:263) ==25063== by 0x34561092F7: __vasprintf_chk (vasprintf_chk.c:82) ==25063== by 0x3DE3882F1A: g_vasprintf (stdio2.h:199) ==25063== by 0x3DE3862EDC: g_strdup_vprintf (gstrfuncs.c:509) ==25063== by 0x3DE3862F7B: g_strdup_printf (gstrfuncs.c:535) ==25063== by 0x40DE36: window_update_menu_displays_cb (virt-viewer-app.c:1640) ==25063== by 0x3DE383833F: g_hash_table_foreach (ghash.c:1524) ==25063== by 0x3DE400F663: g_closure_invoke (gclosure.c:777) ==25063== by 0x3DE40206D7: signal_emit_unlocked_R (gsignal.c:3547) ==25063== by 0x3DE402866C: g_signal_emit_valist (gsignal.c:3296) ==25063== by 0x3DE40287C1: g_signal_emit (gsignal.c:3352) ==25063== by 0x5772F95: gtk_widget_show (gtkwidget.c:3225) ==25063== 8,431 (72 direct, 8,359 indirect) bytes in 1 blocks are definitely lost in loss record 9,468 of 9,502 ==25063== at 0x4A0884D: malloc (vg_replace_malloc.c:263) ==25063== by 0x3DE384D2BE: g_malloc (gmem.c:159) ==25063== by 0x3DE38616B1: g_slice_alloc (gslice.c:1003) ==25063== by 0x3DE3861C05: g_slice_alloc0 (gslice.c:1029) ==25063== by 0x3DE402F96F: g_type_create_instance (gtype.c:1872) ==25063== by 0x3DE40147A7: g_object_constructor (gobject.c:1849) ==25063== by 0x3DE4016260: g_object_newv (gobject.c:1632) ==25063== by 0x3DE40168AB: g_object_new (gobject.c:1542) ==25063== by 0x40C4BD: virt_viewer_util_load_ui (virt-viewer-util.c:41) ==25063== by 0x40C7EB: virt_viewer_auth_collect_credentials (virt-viewer-auth.c:43) ==25063== by 0x41B391: authenticate_cb (virt-viewer-session-ovirt.c:430) ==25063== by 0x3458C05E8F: ffi_call_unix64 (unix64.S:75) ==25063== 32 (16 direct, 16 indirect) bytes in 1 blocks are definitely lost in loss record 3,962 of 9,502 ==25063== at 0x4A0884D: malloc (vg_replace_malloc.c:263) ==25063== by 0x3DE384D2BE: g_malloc (gmem.c:159) ==25063== by 0x3DE38616B1: g_slice_alloc (gslice.c:1003) ==25063== by 0x3DE38629F2: g_slist_append (gslist.c:222) ==25063== by 0x41483C: virt_viewer_window_init (virt-viewer-window.c:323) ==25063== by 0x3DE402FA05: g_type_create_instance (gtype.c:1892) ==25063== by 0x3DE40147A7: g_object_constructor (gobject.c:1849) ==25063== by 0x3DE4015D70: g_object_newv (gobject.c:1713) ==25063== by 0x3DE401655F: g_object_new_valist (gobject.c:1830) ==25063== by 0x3DE4016893: g_object_new (gobject.c:1545) ==25063== by 0x40DA34: virt_viewer_app_window_new (virt-viewer-app.c:590) ==25063== by 0x40E300: virt_viewer_app_constructor (virt-viewer-app.c:1336) ==30355== 4 bytes in 1 blocks are definitely lost in loss record 53 of 9,267 ==30355== at 0x4A0884D: malloc (vg_replace_malloc.c:263) ==30355== by 0x3DE384D2BE: g_malloc (gmem.c:159) ==30355== by 0x3DE3862D0B: g_strdup (gstrfuncs.c:356) ==30355== by 0x3DE40360FC: value_copy_string (gvaluetypes.c:276) ==30355== by 0x3DE40340CA: g_value_transform (gvalue.c:535) ==30355== by 0x3FDAE621DD: gdk_screen_get_setting (gdkevents-x11.c:3022) ==30355== by 0x3FDB3C7415: gtk_settings_get_property (gtksettings.c:1152) ==30355== by 0x3DE4017A74: g_object_get_property (gobject.c:1289) ==30355== by 0x414991: virt_viewer_window_disable_modifiers (virt-viewer-window.c:616) ==30355== by 0x415922: virt_viewer_window_keyboard_grab (virt-viewer-window.c:931) ==30355== by 0x3DE400F942: _g_closure_invoke_va (gclosure.c:840) ==30355== by 0x3DE4027D87: g_signal_emit_valist (gsignal.c:3207)
* Avoid race condition when disposing of appDaniel P. Berrange2012-05-081-1/+7
| | | | | | | | | | | When disposing of the VirtViewerApp, we free the hash table containing the windows. This causes each window to be freed, which in turn causes the visibility callback to be invoked. This can then get NULL pointers from the self->priv->windows usage. Blank out priv->windows before unrefing the hashs and add a check to ensure priv->windows is non-NULL.
* Ensure windows are destroyed when display closesDaniel P. Berrange2012-05-041-0/+2
| | | | | | | | | | | When running virt-viewer with the --reconnect argument, when the session closes, the VirtViewerWindow instances were being freed, but not the GtkWindow itself. So the orphaned window stayed around doing nothing. The GtkBuilder instance was also leaked. Fix these two leaks & also add some debugging to help future troubleshooting
* g_getenv returns a const stringChristophe Fergeau2012-04-271-1/+1
| | | | | | When switching from getenv to g_getenv, 'doms' declaration wasn't changed from char * to const char *, which causes a gcc warning.
* Replace getenv/setenv with g_getenv/g_setenv for Win32 portabilityDaniel P. Berrange2012-04-261-3/+3
|
* Really fix debug output on glib >= 2.31Daniel P. Berrange2012-04-251-0/+12
|
* spice: implement --fullscreen=auto-confMarc-André Lureau2012-03-211-5/+25
| | | | | | | - auto-conf is an optionnal argument to --fullscreen: it will set the guest display configuration to match the client display configuration, by sending the client monitors size and position to capable guests.
* Fix indentationMarc-André Lureau2012-03-181-13/+13
|
* Do not crash so easily when given invalid uriMarc-André Lureau2012-03-161-0/+1
| | | | 'remote-viewer foobar' shouldn't crash
* virt-viewer-window: Add show / hide utility functionsHans de Goede2012-03-071-23/+9
| | | | Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* virt_viewer_app_quit: Cleanly close the connection before quitingHans de Goede2012-03-061-1/+11
| | | | | | | | | Even though the previous patches in this series ensure that the session gets properly finalized, we still need to wait for the disconnect signal, as spice-glib uses co-routines which need some time to cleanly close the connection / session. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* virt-viewer-app: unref the session on disposeHans de Goede2012-03-061-0/+5
| | | | | | | With this patch combined with the previous patches in this series, the VirtViewerSession (finally) gets properly finalized on exit. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* virt-viewer-app: main_window is part of our windows hashtableHans de Goede2012-03-061-5/+0
| | | | | | | | | | | | | This means that: 1) There is no need to explictly set its title separately 2) It is unref-ed when we do g_hash_table_unref(priv->windows), so it should not be unref-ed separately otherwise it is unref-ed twice! Notice that 2 was never a problem because of circular references between VirtViewerApp and VirtViewerWindow, but once the follow up patch to this one breaks the circle 2 becomes an issue. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* Add property app:has-focusMarc-André Lureau2012-03-011-0/+44
|
* Fix compilation with gtk 2.18Marc-André Lureau2012-03-011-4/+5
|
* Small code simplificationMarc-André Lureau2012-02-221-11/+3
|
* Use the accelgroup to define key bindingsMarc-André Lureau2012-02-221-0/+5
| | | | With accelgroups, we can redefine the keybindings
* Add virt_viewer_app_get_session()Marc-André Lureau2012-02-221-0/+8
|
* Add VirtViewerApp:enable-accel propertyMarc-André Lureau2012-02-221-0/+28
|
* First %d in controller title should be substituted with window nthMarc-André Lureau2012-02-141-1/+12
|
* Extract tlsPort for SPICE and use it to enable secure connectionsDaniel P. Berrange2012-02-141-6/+10
|
* Ensure auth popup windows have correct transient parentDaniel P. Berrange2012-02-081-2/+4
|
* Update copyright headersDaniel P. Berrange2012-02-061-2/+2
|
* Convert TABS to spaces & reindent everywhereDaniel P. Berrange2012-02-061-998/+997
|
* Only make the USB device selection sensitive when the vm is USB capableHans de Goede2012-02-061-0/+19
|
* Add a menu entry for USB device selectionHans de Goede2012-02-061-0/+9
|
* Disconnect virt-viewer when receiving signal session-cancelledGuannan Ren2012-01-311-1/+16
|
* Support for virDomainOpenGraphics APIDaniel P. Berrange2012-01-311-4/+53
| | | | | | Add a new flag --attach, which instructs virt-viewer to attach to the target display using virDomainOpenGraphics, instead of initiating a VNC/SPICE connection directly.
* Add error dialog for USB redirection failureMarc-André Lureau2012-01-311-4/+14
|
* Add a few property getters, used by controllerMarc-André Lureau2012-01-301-0/+7
| | | | | | - virt_viewer_app_get_windows() - virt_viewer_window_get_builder() - "VirtViewerSessionSpice:spice-session" property
* Make virt_viewer_activate() a vfuncMarc-André Lureau2012-01-301-18/+31
| | | | since other equivalent methods are already overridable.
* Add window-added & window-removed signalsMarc-André Lureau2012-01-301-1/+43
|
* Use graphical URI for connectionMarc-André Lureau2012-01-301-3/+34
| | | | If specified, use URI for connection details
* build: replace deprecated functionsMarc-André Lureau2012-01-301-4/+4
|
* build: make gtk-vnc optionalMarc-André Lureau2011-11-071-0/+4
|