Skip to content

Commit ef1ce6f

Browse files
committed
menubar.vala: Use LightDM api for showing the current keyboard
layout. Remove XApp as a dependency.
1 parent 87d10fb commit ef1ce6f

File tree

5 files changed

+4
-12
lines changed

5 files changed

+4
-12
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,4 @@ jobs:
1414
uses: linuxmint/github-actions/.github/workflows/do-builds.yml@master
1515
with:
1616
commit_id: master
17-
############################## Comma separated list - like 'linuxmint/xapp, linuxmint/cinnamon-desktop'
18-
dependencies: >
19-
linuxmint/xapp
20-
##############################
17+
dependencies:

debian/control

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ Build-Depends: debhelper-compat (= 12),
1212
liblightdm-gobject-1-dev | liblightdm-gobject-dev,
1313
liblightdm-gobject-1-dev | lightdm-vala,
1414
libpixman-1-dev,
15-
libxapp-dev,
1615
meson (>= 0.49.0),
1716
valac (>= 0.20.0)
1817
Homepage: https://github.com/linuxmint/slick-greeter
@@ -22,7 +21,6 @@ Architecture: any
2221
Depends: ${misc:Depends},
2322
${shlibs:Depends},
2423
lightdm,
25-
libxapp1,
2624
python3
2725
Suggests: lightdm-remote-session-freerdp,
2826
lightdm-remote-session-uccsconfigure,

meson.build

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ m_dep = cc.find_library('m')
2424
pixman_dep = dependency('pixman-1')
2525
posix_dep = meson.get_compiler('vala').find_library('posix')
2626
x11_dep = dependency('x11')
27-
xapp_dep = dependency('xapp')
2827
xext_dep = cc.find_library('Xext')
2928

3029
config_data = configuration_data()

src/menubar.vala

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -534,14 +534,13 @@ public class MenuBar : Gtk.MenuBar
534534
menu_item.set_submenu (all_menu);
535535
menu_item.show ();
536536

537-
538-
var xapp_controller = new XApp.KbdLayoutController();
539537
var display = get_display ();
540538
var keymap = Gdk.Keymap.get_for_display (display);
541539
keymap.state_changed.connect (() =>
542540
{
543-
label.set_label(xapp_controller.get_current_short_group_label());
544-
item.set_tooltip_text(_("Keyboard layout:").concat(" ").concat(xapp_controller.get_current_name()));
541+
var new_layout = LightDM.get_layout();
542+
label.set_label(new_layout.name);
543+
item.set_tooltip_text(_("Keyboard layout:").concat(" ").concat(new_layout.description));
545544
});
546545

547546
return item;

src/meson.build

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ dependencies = [
4747
pixman_dep,
4848
posix_dep,
4949
x11_dep,
50-
xapp_dep,
5150
xext_dep,
5251
]
5352

0 commit comments

Comments
 (0)