From 89c324c026abbcb7eed27f1d08443c52f33eae15 Mon Sep 17 00:00:00 2001 From: myheroyuki Date: Wed, 9 Nov 2022 21:28:32 +0900 Subject: [Rem-2564] Allow for runtime adjustment of color depth --- plugins/vnc/vnc_plugin.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/plugins/vnc/vnc_plugin.c b/plugins/vnc/vnc_plugin.c index f98eea56c..da36360aa 100644 --- a/plugins/vnc/vnc_plugin.c +++ b/plugins/vnc/vnc_plugin.c @@ -46,6 +46,7 @@ #define REMMINA_PLUGIN_VNC_FEATURE_SCALE 6 #define REMMINA_PLUGIN_VNC_FEATURE_UNFOCUS 7 #define REMMINA_PLUGIN_VNC_FEATURE_TOOL_SENDCTRLALTDEL 8 +#define REMMINA_PLUGIN_VNC_FEATURE_PREF_COLOR 9 #define VNC_DEFAULT_PORT 5900 @@ -1841,9 +1842,13 @@ static void remmina_plugin_vnc_call_feature(RemminaProtocolWidget *gp, const Rem remmina_plugin_vnc_update_quality((rfbClient *)(gpdata->client), remmina_plugin_service->file_get_int(remminafile, "quality", 9)); remmina_plugin_vnc_update_colordepth((rfbClient *)(gpdata->client), - remmina_plugin_service->file_get_int(remminafile, "colordepth", 32)); + remmina_plugin_service->file_get_int(remminafile, "color", 32)); SetFormatAndEncodings((rfbClient *)(gpdata->client)); break; + case REMMINA_PLUGIN_VNC_FEATURE_PREF_COLOR: + remmina_plugin_vnc_update_colordepth((rfbClient *)(gpdata->client), + remmina_plugin_service->file_get_int(remminafile, "color", 32)); + SetFormatAndEncodings((rfbClient *)(gpdata->client)); case REMMINA_PLUGIN_VNC_FEATURE_PREF_VIEWONLY: break; case REMMINA_PLUGIN_VNC_FEATURE_PREF_DISABLESERVERINPUT: @@ -2084,6 +2089,8 @@ static const RemminaProtocolFeature remmina_plugin_vnc_features[] = { { REMMINA_PROTOCOL_FEATURE_TYPE_PREF, REMMINA_PLUGIN_VNC_FEATURE_PREF_QUALITY, GINT_TO_POINTER(REMMINA_PROTOCOL_FEATURE_PREF_RADIO), "quality", quality_list }, + { REMMINA_PROTOCOL_FEATURE_TYPE_PREF, REMMINA_PLUGIN_VNC_FEATURE_PREF_COLOR, GINT_TO_POINTER(REMMINA_PROTOCOL_FEATURE_PREF_RADIO), "color", + colordepth_list }, { REMMINA_PROTOCOL_FEATURE_TYPE_PREF, REMMINA_PLUGIN_VNC_FEATURE_PREF_VIEWONLY, GINT_TO_POINTER(REMMINA_PROTOCOL_FEATURE_PREF_CHECK), "viewonly", N_("View only") }, { REMMINA_PROTOCOL_FEATURE_TYPE_PREF, REMMINA_PLUGIN_VNC_FEATURE_PREF_DISABLESERVERINPUT, GINT_TO_POINTER(REMMINA_PROTOCOL_FEATURE_PREF_CHECK), "disableserverinput",N_("Prevent local interaction on the server") }, -- cgit v1.2.3 From f21b8b65d80bdfce51462648bf0d70908f335969 Mon Sep 17 00:00:00 2001 From: myheroyuki Date: Wed, 9 Nov 2022 21:37:12 +0900 Subject: [Rem-2564] fixed color naming scheme --- plugins/vnc/vnc_plugin.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/vnc/vnc_plugin.c b/plugins/vnc/vnc_plugin.c index da36360aa..3bc632323 100644 --- a/plugins/vnc/vnc_plugin.c +++ b/plugins/vnc/vnc_plugin.c @@ -1842,12 +1842,12 @@ static void remmina_plugin_vnc_call_feature(RemminaProtocolWidget *gp, const Rem remmina_plugin_vnc_update_quality((rfbClient *)(gpdata->client), remmina_plugin_service->file_get_int(remminafile, "quality", 9)); remmina_plugin_vnc_update_colordepth((rfbClient *)(gpdata->client), - remmina_plugin_service->file_get_int(remminafile, "color", 32)); + remmina_plugin_service->file_get_int(remminafile, "colordepth", 32)); SetFormatAndEncodings((rfbClient *)(gpdata->client)); break; case REMMINA_PLUGIN_VNC_FEATURE_PREF_COLOR: remmina_plugin_vnc_update_colordepth((rfbClient *)(gpdata->client), - remmina_plugin_service->file_get_int(remminafile, "color", 32)); + remmina_plugin_service->file_get_int(remminafile, "colordepth", 32)); SetFormatAndEncodings((rfbClient *)(gpdata->client)); case REMMINA_PLUGIN_VNC_FEATURE_PREF_VIEWONLY: break; @@ -2089,7 +2089,7 @@ static const RemminaProtocolFeature remmina_plugin_vnc_features[] = { { REMMINA_PROTOCOL_FEATURE_TYPE_PREF, REMMINA_PLUGIN_VNC_FEATURE_PREF_QUALITY, GINT_TO_POINTER(REMMINA_PROTOCOL_FEATURE_PREF_RADIO), "quality", quality_list }, - { REMMINA_PROTOCOL_FEATURE_TYPE_PREF, REMMINA_PLUGIN_VNC_FEATURE_PREF_COLOR, GINT_TO_POINTER(REMMINA_PROTOCOL_FEATURE_PREF_RADIO), "color", + { REMMINA_PROTOCOL_FEATURE_TYPE_PREF, REMMINA_PLUGIN_VNC_FEATURE_PREF_COLOR, GINT_TO_POINTER(REMMINA_PROTOCOL_FEATURE_PREF_RADIO), "colordepth", colordepth_list }, { REMMINA_PROTOCOL_FEATURE_TYPE_PREF, REMMINA_PLUGIN_VNC_FEATURE_PREF_VIEWONLY, GINT_TO_POINTER(REMMINA_PROTOCOL_FEATURE_PREF_CHECK), "viewonly", N_("View only") }, -- cgit v1.2.3