Commit f765bbf9 authored by Giovanni Panozzo's avatar Giovanni Panozzo

Added missing ifdef HAVE_LIBVTE, fixes #394

parent 38fb86f4
......@@ -14,7 +14,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330,
* Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307, USA.
*
* In addition, as a special exception, the copyright holders give
......@@ -197,12 +197,12 @@ static void remmina_connection_holder_keyboard_grab(RemminaConnectionHolder* cnn
if (keyboard != NULL)
{
if ( gdk_device_get_source (keyboard) != GDK_SOURCE_KEYBOARD)
{
keyboard = gdk_device_get_associated_device( keyboard );
}
if (remmina_file_get_int(cnnobj->remmina_file, "keyboard_grab", FALSE))
{
gdk_device_grab(keyboard, gtk_widget_get_window(GTK_WIDGET(cnnhld->cnnwin)), GDK_OWNERSHIP_WINDOW, TRUE, GDK_KEY_PRESS | GDK_KEY_RELEASE, NULL, GDK_CURRENT_TIME);
......@@ -1550,7 +1550,7 @@ static gboolean remmina_connection_window_on_leave(GtkWidget* widget, GdkEventCr
GdkDisplay *display;
GdkDeviceManager *manager;
GdkDevice *device = NULL;
if (event->detail == GDK_NOTIFY_VIRTUAL || event->detail == GDK_NOTIFY_NONLINEAR
|| event->detail == GDK_NOTIFY_NONLINEAR_VIRTUAL)
{
......@@ -1972,7 +1972,7 @@ static void remmina_connection_window_initialize_notebook(GtkNotebook* to, GtkNo
tab = remmina_connection_object_create_tab(cnnobj);
remmina_connection_object_append_page(cnnobj, to, tab, view_mode);
#if GTK_VERSION == 3
#if GTK_VERSION == 3
/* Reparent cnnobj->viewport */
g_object_ref(cnnobj->viewport);
gtk_container_remove(GTK_CONTAINER(gtk_widget_get_parent(cnnobj->viewport)), cnnobj->viewport);
......@@ -2001,7 +2001,7 @@ static void remmina_connection_window_initialize_notebook(GtkNotebook* to, GtkNo
tab = remmina_connection_object_create_tab(cnnobj);
remmina_connection_object_append_page(cnnobj, to, tab, view_mode);
#if GTK_VERSION == 3
#if GTK_VERSION == 3
/* Reparent cnnobj->viewport */
g_object_ref(cnnobj->viewport);
gtk_container_remove(GTK_CONTAINER(gtk_widget_get_parent(cnnobj->viewport)), cnnobj->viewport);
......@@ -2508,8 +2508,8 @@ static void remmina_connection_object_on_connect(RemminaProtocolWidget* gp, Remm
tab = remmina_connection_object_create_tab(cnnobj);
i = remmina_connection_object_append_page(cnnobj, GTK_NOTEBOOK(cnnhld->cnnwin->priv->notebook), tab,
cnnhld->cnnwin->priv->view_mode);
#if GTK_VERSION == 3
#if GTK_VERSION == 3
/* Reparent cnnobj->viewport */
g_object_ref(cnnobj->viewport);
gtk_container_remove(GTK_CONTAINER(gtk_widget_get_parent(cnnobj->viewport)), cnnobj->viewport);
......
......@@ -97,12 +97,16 @@ static gboolean remmina_masterthread_exec_callback(RemminaMTExecData *d)
d->p.ftp_client_get_waiting_task.retval = remmina_ftp_client_get_waiting_task( d->p.ftp_client_get_waiting_task.client );
break;
case FUNC_SFTP_CLIENT_CONFIRM_RESUME:
#ifdef HAVE_LIBSSH
d->p.sftp_client_confirm_resume.retval = remmina_sftp_client_confirm_resume( d->p.sftp_client_confirm_resume.client,
d->p.sftp_client_confirm_resume.path );
#endif
break;
case FUNC_VTE_TERMINAL_SET_ENCODING_AND_PTY:
#if defined (HAVE_LIBSSH) && defined (HAVE_LIBVTE)
remmina_plugin_ssh_vte_terminal_set_encoding_and_pty( d->p.vte_terminal_set_encoding_and_pty.terminal,
d->p.vte_terminal_set_encoding_and_pty.codeset, d->p.vte_terminal_set_encoding_and_pty.pty );
#endif
break;
}
pthread_mutex_unlock(&d->mu);
......
......@@ -117,16 +117,20 @@ typedef struct remmina_masterthread_exec_data {
RemminaFTPClient *client;
RemminaFTPTask* retval;
} ftp_client_get_waiting_task;
#if defined (HAVE_LIBSSH) && defined (HAVE_LIBVTE)
struct {
RemminaSFTPClient *client;
const gchar *path;
gint retval;
} sftp_client_confirm_resume;
#endif
#ifdef HAVE_LIBVTE
struct {
VteTerminal *terminal;
const char *codeset;
VtePty *pty;
} vte_terminal_set_encoding_and_pty;
#endif
} p;
/* Mutex for thread synchronization */
......
......@@ -35,14 +35,18 @@
#ifndef __REMMINASSHPLUGIN_H__
#define __REMMINASSHPLUGIN_H__
#ifdef HAVE_LIBVTE
#include <vte/vte.h>
#endif
G_BEGIN_DECLS
void remmina_ssh_plugin_register(void);
/* For callback in main thread */
#if defined (HAVE_LIBSSH) && defined (HAVE_LIBVTE)
void remmina_plugin_ssh_vte_terminal_set_encoding_and_pty(VteTerminal *terminal, const char *codeset, VtePty *pty);
#endif
G_END_DECLS
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment