mirror of
https://gitlab.com/virt-viewer/virt-viewer.git
synced 2025-01-06 13:17:45 +03:00
build: fix build without gtk-vnc
Without gtk-vnc we get implicit function declaration for
VIRT_VIEWER_IS_SESSION_VNC. Introduced at 8bc91ac
"session: remove
"session-error" signal" in 2021-02-18
As we are already using #ifdef here, I've also changed the ternary to
an if for clarity.
Signed-off-by: Victor Toso <victortoso@redhat.com>
This commit is contained in:
parent
04c2c4a035
commit
81129f8eb1
@ -748,8 +748,12 @@ static void hide_one_window(gpointer value,
|
|||||||
{
|
{
|
||||||
VirtViewerApp* self = VIRT_VIEWER_APP(user_data);
|
VirtViewerApp* self = VIRT_VIEWER_APP(user_data);
|
||||||
VirtViewerAppPrivate *priv = virt_viewer_app_get_instance_private(self);
|
VirtViewerAppPrivate *priv = virt_viewer_app_get_instance_private(self);
|
||||||
gboolean connect_error = !priv->cancelled &&
|
gboolean connect_error = !priv->cancelled && !priv->connected;
|
||||||
!(VIRT_VIEWER_IS_SESSION_VNC(priv->session) ? priv->initialized : priv->connected);
|
#ifdef HAVE_GTK_VNC
|
||||||
|
if (VIRT_VIEWER_IS_SESSION_VNC(priv->session)) {
|
||||||
|
connect_error = !priv->cancelled && !priv->initialized;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (connect_error || priv->main_window != value)
|
if (connect_error || priv->main_window != value)
|
||||||
virt_viewer_window_hide(VIRT_VIEWER_WINDOW(value));
|
virt_viewer_window_hide(VIRT_VIEWER_WINDOW(value));
|
||||||
@ -1773,8 +1777,12 @@ virt_viewer_app_disconnected(VirtViewerSession *session G_GNUC_UNUSED, const gch
|
|||||||
VirtViewerApp *self)
|
VirtViewerApp *self)
|
||||||
{
|
{
|
||||||
VirtViewerAppPrivate *priv = virt_viewer_app_get_instance_private(self);
|
VirtViewerAppPrivate *priv = virt_viewer_app_get_instance_private(self);
|
||||||
gboolean connect_error = !priv->cancelled &&
|
gboolean connect_error = !priv->cancelled && !priv->connected;
|
||||||
!(VIRT_VIEWER_IS_SESSION_VNC(session) ? priv->initialized : priv->connected);
|
#ifdef HAVE_GTK_VNC
|
||||||
|
if (VIRT_VIEWER_IS_SESSION_VNC(priv->session)) {
|
||||||
|
connect_error = !priv->cancelled && !priv->initialized;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!priv->kiosk)
|
if (!priv->kiosk)
|
||||||
virt_viewer_app_hide_all_windows(self);
|
virt_viewer_app_hide_all_windows(self);
|
||||||
|
Loading…
Reference in New Issue
Block a user