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:
authorheadkaze <headkaze@gmail.com>2021-12-17 18:21:37 +0300
committerheadkaze <headkaze@gmail.com>2021-12-17 18:21:37 +0300
commit470e517b31dd4eaf7ac53f7dfd8df91d44e64a96 (patch)
tree9252aa9aa2325fb3f25e2af6ac04a5b91c72557a /plugins
parent2143beac690d085506a02fd6038d5dae8e16e724 (diff)
Add remmina_pref_keymap_get_table
Diffstat (limited to 'plugins')
-rw-r--r--plugins/rdp/rdp_plugin.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/plugins/rdp/rdp_plugin.c b/plugins/rdp/rdp_plugin.c
index 6d33531ac..7d33cd2cd 100644
--- a/plugins/rdp/rdp_plugin.c
+++ b/plugins/rdp/rdp_plugin.c
@@ -80,7 +80,6 @@
#include <pthread_np.h>
#endif
-#include "../remmina_pref.h"
#include <freerdp/locale/keyboard.h>
#define REMMINA_RDP_FEATURE_TOOL_REFRESH 1
@@ -1299,21 +1298,17 @@ static gchar *remmina_get_rdp_kbd_remap(const gchar *keymap)
gchar *rdp_kbd_remap = NULL;
gint i;
Display *display;
-
- if (!keymap || keymap[0] == '\0')
- return rdp_kbd_remap;
- table = (guint *)g_hash_table_lookup(remmina_keymap_table, keymap);
+ table = remmina_plugin_service->pref_keymap_get_table(keymap);
if (!table)
return rdp_kbd_remap;
rdp_kbd_remap = g_malloc0(512);
display = XOpenDisplay(0);
for (i = 0; table[i] > 0; i += 2) {
- g_snprintf(keys, sizeof(keys), "0x%02x=0x%02x", freerdp_keyboard_get_rdp_scancode_from_x11_keycode(XKeysymToKeycode(display, table[i])), freerdp_keyboard_get_rdp_scancode_from_x11_keycode(XKeysymToKeycode(display, table[i + 1])));
-
+ g_snprintf(keys, sizeof(keys), "0x%02x=0x%02x", freerdp_keyboard_get_rdp_scancode_from_x11_keycode(XKeysymToKeycode(display, table[i])),
+ freerdp_keyboard_get_rdp_scancode_from_x11_keycode(XKeysymToKeycode(display, table[i + 1])));
if (i > 0)
g_strlcat(rdp_kbd_remap, ",", 512);
-
g_strlcat(rdp_kbd_remap, keys, 512);
}
XCloseDisplay(display);
@@ -2775,6 +2770,7 @@ static const RemminaProtocolSetting remmina_rdp_basic_settings[] =
{ REMMINA_PROTOCOL_SETTING_TYPE_RESOLUTION, "resolution", NULL, FALSE, NULL, NULL, NULL, NULL },
{ REMMINA_PROTOCOL_SETTING_TYPE_SELECT, "colordepth", N_("Colour depth"), FALSE, colordepth_list, NULL, NULL, NULL },
{ REMMINA_PROTOCOL_SETTING_TYPE_SELECT, "network", N_("Network connection type"), FALSE, network_list, network_tooltip, NULL, NULL },
+ { REMMINA_PROTOCOL_SETTING_TYPE_KEYMAP, "keymap", NULL, FALSE, NULL, NULL, NULL, NULL },
{ REMMINA_PROTOCOL_SETTING_TYPE_END, NULL, NULL, FALSE, NULL, NULL, NULL, NULL }
};