Skip to content

Commit

Permalink
don't show duplicate keyboard layout names
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Jul 11, 2024
1 parent c299b01 commit 07d51f7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion xpra/gtk_common/start_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -1108,7 +1108,14 @@ def populate_form(self):
layouts = {
"" : "auto",
}
layouts.update(kbd.get_all_x11_layouts())
x11_layouts = kbd.get_all_x11_layouts()
# many layouts can have the same name (ie: "English"),
# only keep the first one that provides it:
names = set()
for x11_layout, name in x11_layouts.items():
if name not in names:
layouts[x11_layout] = name
names.add(name)
self.combo(tb, "Keyboard Layout", "keyboard-layout", layouts)
self.bool_cb(tb, "State Synchronization", "keyboard-sync")
self.bool_cb(tb, "Raw Mode", "keyboard-raw")
Expand Down

0 comments on commit 07d51f7

Please sign in to comment.