Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/Remmina/Remmina.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Teichmann <daniel.teichmann@das-netzwerkteam.de>2021-09-23 14:21:04 +0300
committerDaniel Teichmann <daniel.teichmann@das-netzwerkteam.de>2021-10-01 15:17:27 +0300
commit34a2206531a5998e082bd2b34d02c74e08790b90 (patch)
tree4d7cf8d040126421322834bd481f97bcc3a7d379 /plugins
parente46129cb289c958edbc0fcfd3febf146374b1e28 (diff)
x2go_plugin.c: Various code style changes
Diffstat (limited to 'plugins')
-rw-r--r--plugins/x2go/x2go_plugin.c37
1 files changed, 19 insertions, 18 deletions
diff --git a/plugins/x2go/x2go_plugin.c b/plugins/x2go/x2go_plugin.c
index 2968f942a..0a2b6453e 100644
--- a/plugins/x2go/x2go_plugin.c
+++ b/plugins/x2go/x2go_plugin.c
@@ -350,16 +350,16 @@ struct onMainThread_cb_data {
static gboolean onMainThread_cb(struct onMainThread_cb_data *d) {
TRACE_CALL(__func__);
- if ( !d->cancelled ) {
- switch ( d->func ) {
+ if (!d->cancelled) {
+ switch (d->func) {
case FUNC_GTK_SOCKET_ADD_ID:
- gtk_socket_add_id( d->sk, d->w );
+ gtk_socket_add_id(d->sk, d->w);
break;
}
- pthread_mutex_unlock( &d->mu );
+ pthread_mutex_unlock(&d->mu);
} else {
/* thread has been cancelled, so we must free d memory here */
- g_free( d );
+ g_free(d);
}
return G_SOURCE_REMOVE;
}
@@ -371,22 +371,22 @@ static void onMainThread_cleanup_handler(gpointer data) {
d->cancelled = TRUE;
}
-static void onMainThread_schedule_callback_and_wait( struct onMainThread_cb_data *d) {
+static void onMainThread_schedule_callback_and_wait(struct onMainThread_cb_data *d) {
TRACE_CALL(__func__);
d->cancelled = FALSE;
- pthread_cleanup_push( onMainThread_cleanup_handler, d );
- pthread_mutex_init( &d->mu, NULL );
- pthread_mutex_lock( &d->mu );
- gdk_threads_add_idle( (GSourceFunc)onMainThread_cb, (gpointer)d );
+ pthread_cleanup_push(onMainThread_cleanup_handler, d);
+ pthread_mutex_init(&d->mu, NULL);
+ pthread_mutex_lock(&d->mu);
+ gdk_threads_add_idle((GSourceFunc)onMainThread_cb, (gpointer) d);
- pthread_mutex_lock( &d->mu );
+ pthread_mutex_lock(&d->mu);
pthread_cleanup_pop(0);
- pthread_mutex_unlock( &d->mu );
- pthread_mutex_destroy( &d->mu );
+ pthread_mutex_unlock(&d->mu);
+ pthread_mutex_destroy(&d->mu);
}
-static void onMainThread_gtk_socket_add_id( GtkSocket* sk, Window w) {
+static void onMainThread_gtk_socket_add_id(GtkSocket* sk, Window w) {
TRACE_CALL(__func__);
struct onMainThread_cb_data *d;
@@ -396,7 +396,7 @@ static void onMainThread_gtk_socket_add_id( GtkSocket* sk, Window w) {
d->sk = sk;
d->w = w;
- onMainThread_schedule_callback_and_wait( d );
+ onMainThread_schedule_callback_and_wait(d);
g_free(d);
}
@@ -1161,7 +1161,7 @@ static gboolean remmina_plugin_x2go_start_session(RemminaProtocolWidget *gp) {
remminafile = remmina_plugin_service->protocol_plugin_get_file(gp);
servstr = GET_PLUGIN_STRING("server");
- if ( servstr ) {
+ if (servstr) {
remmina_plugin_service->get_server_port(servstr, 22, &host, &sshport);
} else {
return FALSE;
@@ -1184,10 +1184,11 @@ static gboolean remmina_plugin_x2go_start_session(RemminaProtocolWidget *gp) {
/* multiple of 4 */
width = (width + 3) & ~0x3;
height = (height + 3) & ~0x3;
- if( (width > 0) && (height > 0))
+ if ((width > 0) && (height > 0)) {
res = g_strdup_printf ("%dx%d", width, height);
- else
+ } else {
res = "800x600";
+ }
REMMINA_PLUGIN_DEBUG("Resolution set by user: '%s'.", res);
REMMINA_PLUGIN_DEBUG("Attached window to socket '%d'.", gpdata->socket_id);