Skip to content

Commit

Permalink
Added missing ifdef HAVE_LIBVTE, fixes #394
Browse files Browse the repository at this point in the history
  • Loading branch information
giox069 committed Dec 7, 2014
1 parent 38fb86f commit f765bbf
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 8 deletions.
16 changes: 8 additions & 8 deletions remmina/src/remmina_connection_window.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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)
{
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
4 changes: 4 additions & 0 deletions remmina/src/remmina_masterthread_exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 4 additions & 0 deletions remmina/src/remmina_masterthread_exec.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
4 changes: 4 additions & 0 deletions remmina/src/remmina_ssh_plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit f765bbf

Please sign in to comment.