diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cc95b7e3e..b35af735c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,7 @@ jobs: - name: Install Dependencies run: | apt update - apt install -y desktop-file-utils gettext libdistinst-dev libgtk-3-dev libgee-0.8-dev libgranite-dev libhandy-1-dev libxml2-dev libjson-glib-dev libgnomekbd-dev libpwquality-dev libxml2-utils meson valac + apt install -y desktop-file-utils gettext libdistinst-dev libgtk-3-dev libgee-0.8-dev libgranite-dev libhandy-1-dev libxml2-dev libjson-glib-dev libpwquality-dev libxml2-utils meson valac - name: Build run: | meson build diff --git a/meson.build b/meson.build index ef9254f97..0eaf4bad7 100644 --- a/meson.build +++ b/meson.build @@ -22,8 +22,6 @@ granite_dep = dependency('granite', version: '>=0.5') handy_dep = dependency('libhandy-1', version: '>=0.90.0') json_glib_dep = dependency('json-glib-1.0') xml2_dep = dependency('libxml-2.0') -gnome_keyboard_dep = dependency('libgnomekbd') -gnome_keyboard_ui_dep = meson.get_compiler('c').find_library('gnomekbdui') pwquality_dep = dependency('pwquality') systemd_dep = dependency('systemd') diff --git a/po/POTFILES b/po/POTFILES index 258982ba0..c84aa9638 100644 --- a/po/POTFILES +++ b/po/POTFILES @@ -22,7 +22,6 @@ src/Widgets/DecryptMenu.vala src/Widgets/DiskBar.vala src/Widgets/DiskGrid.vala src/Widgets/InstallTypeGrid.vala -src/Widgets/LayoutWidget.vala src/Widgets/PartitionBar.vala src/Widgets/PartitionMenu.vala src/Widgets/VariantWidget.vala diff --git a/src/Views/KeyboardLayoutView.vala b/src/Views/KeyboardLayoutView.vala index dc82bce06..a7da33e50 100644 --- a/src/Views/KeyboardLayoutView.vala +++ b/src/Views/KeyboardLayoutView.vala @@ -157,8 +157,6 @@ public class KeyboardLayoutView : AbstractInstallerView { }); keyboard_test_entry.icon_release.connect (() => { - var layout = new LayoutWidget (); - string layout_string; unowned Gtk.ListBoxRow row = input_variant_widget.main_listbox.get_selected_row (); if (row != null) { @@ -173,11 +171,12 @@ public class KeyboardLayoutView : AbstractInstallerView { layout_string = "us"; } - layout.set_layout (layout_string); - - var popover = new Gtk.Popover (keyboard_test_entry); - popover.add (layout); - popover.show_all (); + string command = "gkbd-keyboard-display --layout=%s".printf (layout_string); + try { + AppInfo.create_from_commandline (command, null, NONE).launch (null, null); + } catch (Error e) { + warning ("Error launching keyboard layout display: %s", e.message); + } }); foreach (var layout in KeyboardLayoutHelper.get_layouts ()) { diff --git a/src/Widgets/LayoutWidget.vala b/src/Widgets/LayoutWidget.vala deleted file mode 100644 index eff0c7de6..000000000 --- a/src/Widgets/LayoutWidget.vala +++ /dev/null @@ -1,52 +0,0 @@ -// -*- Mode: vala; indent-tabs-mode: nil; tab-width: 4 -*- -/*- - * Copyright (c) 2017 elementary LLC. (https://elementary.io) - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -public class LayoutWidget : Gtk.Grid { - private Gkbd.KeyboardDrawing gkbd_drawing; - - static Gkbd.KeyboardDrawingGroupLevel top_left = { 0, 1 }; - static Gkbd.KeyboardDrawingGroupLevel top_right = { 0, 3 }; - static Gkbd.KeyboardDrawingGroupLevel bottom_left = { 0, 0 }; - static Gkbd.KeyboardDrawingGroupLevel bottom_right = { 0, 2 }; - static Gkbd.KeyboardDrawingGroupLevel*[] group = { &top_left, &top_right, &bottom_left, &bottom_right }; - - construct { - gkbd_drawing = new Gkbd.KeyboardDrawing (); - gkbd_drawing.parent = this; - width_request = 600; - height_request = 230; - gkbd_drawing.set_groups_levels (((unowned Gkbd.KeyboardDrawingGroupLevel)[])group); - set_layout ("gb\tcolemak"); - gkbd_drawing.show_all (); - } - - public void set_layout (string layout_id) { - gkbd_drawing.set_layout (layout_id); - } - - public override bool draw (Cairo.Context cr) { - gkbd_drawing.render (cr, - Pango.cairo_create_layout (cr), 0, 0, - get_allocated_width (), - get_allocated_height (), - 50, - 50 - ); - return true; - } -} diff --git a/src/meson.build b/src/meson.build index 39dbd5913..e03557d41 100644 --- a/src/meson.build +++ b/src/meson.build @@ -24,7 +24,6 @@ vala_files = [ 'Widgets/DiskBar.vala', 'Widgets/DiskGrid.vala', 'Widgets/InstallTypeGrid.vala', - 'Widgets/LayoutWidget.vala', 'Widgets/PartitionBar.vala', 'Widgets/PartitionMenu.vala', 'Widgets/Terminal.vala', @@ -57,8 +56,6 @@ gui_dependencies = [ distinst_dep, gee_dep, glib_dep, - gnome_keyboard_dep, - gnome_keyboard_ui_dep, gobject_dep, granite_dep, gtk_dep,