Sync from SUSE:SLFO:Main tecla-keyboard-layout-viewer revision 05c40530792b08071c15f553cbfbd1d6

This commit is contained in:
Adrian Schröter 2024-11-12 12:19:03 +01:00
parent ed58394f75
commit cc59a8e93e
8 changed files with 95 additions and 86 deletions

19
_service Normal file
View File

@ -0,0 +1,19 @@
<?xml version="1.0"?>
<services>
<service name="obs_scm" mode="manual">
<param name="scm">git</param>
<param name="url">https://gitlab.gnome.org/GNOME/tecla.git</param>
<param name="revision">47.0</param>
<param name="versionformat">@PARENT_TAG@+@TAG_OFFSET@</param>
<param name="versionrewrite-pattern">(.*)\+0</param>
<param name="versionrewrite-replacement">\1</param>
<!-- <param name="changesgenerate">enable</param> -->
</service>
<service name="tar" mode="buildtime"/>
<service name="recompress" mode="buildtime">
<param name="file">*.tar</param>
<param name="compression">zst</param>
</service>
<service name="set_version" mode="manual" />
</services>

BIN
tecla-45.0.tar.xz (Stored with Git LFS)

Binary file not shown.

BIN
tecla-47.0.obscpio (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -1,34 +0,0 @@
commit 931112aec0ba5a626327d8cb490b0b86e4c0b55c
Author: Carlos Garnacho <carlosg@gnome.org>
Date: Thu Sep 21 13:23:00 2023 +0200
application: Handle TeclaModel constructor possibly returning NULL
This might be the case if an unknown keymap name is passed as a
commandline argument. We ATM just show a window with empty keys,
so there's room for improvement in the future (e.g. state that
the keymap does not exist).
diff -Nura tecla-45.0/src/tecla-application.c tecla-45.0_new/src/tecla-application.c
--- tecla-45.0/src/tecla-application.c 2023-09-17 01:02:57.000000000 +0800
+++ tecla-45.0_new/src/tecla-application.c 2024-03-31 16:28:22.603133598 +0800
@@ -375,11 +375,14 @@
if (tecla_app->layout) {
tecla_app->main_model =
tecla_model_new_from_layout_name (tecla_app->layout);
- connect_model (tecla_app->main_window,
- tecla_app->main_view,
- tecla_app->main_model);
- g_clear_pointer (&tecla_app->layout, g_free);
- update_title (tecla_app->main_window, tecla_app->main_model);
+
+ if (tecla_app->main_model) {
+ connect_model (tecla_app->main_window,
+ tecla_app->main_view,
+ tecla_app->main_model);
+ g_clear_pointer (&tecla_app->layout, g_free);
+ update_title (tecla_app->main_window, tecla_app->main_model);
+ }
}
gtk_window_present (tecla_app->main_window);

View File

@ -1,5 +1,66 @@
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Mar 25 17:59:06 UTC 2024 - Cliff Zhao <qzhao@suse.com> Mon Oct 28 12:47:22 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
- Update license to GPL-2.0-pr-later, conforming to the license
declated in the source files.
-------------------------------------------------------------------
Mon Sep 16 10:01:52 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
- Update to version 47.0:
+ Updated translations.
-------------------------------------------------------------------
Tue Sep 3 15:08:36 UTC 2024 - Bjørn Lie <bjorn.lie@gmail.com>
- Update to version 47.rc:
+ Add --parent-handle command line option to integrate as a
"modal dialog".
+ Updated translations.
-------------------------------------------------------------------
Sun Aug 25 10:45:25 UTC 2024 - Bjørn Lie <bjorn.lie@gmail.com>
- Update to version 47.beta:
+ Set window icon
+ Updated translations.
-------------------------------------------------------------------
Sun Mar 17 09:38:09 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
- Update to version 46.0:
+ Updated translations.
-------------------------------------------------------------------
Tue Mar 5 08:05:47 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
- Update to version 46.rc:
+ Updated translations.
-------------------------------------------------------------------
Tue Feb 13 09:42:12 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
- Update to version 46.beta:
+ Updated translations.
-------------------------------------------------------------------
Tue Jan 16 13:23:57 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
- Update to version 46.alpha:
+ Add --version command line option.
+ Fix blurry keys.
+ Fix crash on unknown keymap.
(bsc#1220208)
+ Updated translations.
- Remove tecla-return-NULL-if-no-xkb_keymap.patch:
Since the patch is a upstream backporing and is released in this
update.
- Remove tecla-handle-TeclaModel-constructor-returning-NULL.patch:
Since the patch is a upstream backporing and is released in this
update.
-------------------------------------------------------------------
Fri Jan 12 17:59:06 UTC 2024 - Cliff Zhao <qzhao@suse.com>
- Add tecla-return-NULL-if-no-xkb_keymap.patch: - Add tecla-return-NULL-if-no-xkb_keymap.patch:
Backporting d6760195 from upstream, Fix tecla crash in Czech(QWERTY) Backporting d6760195 from upstream, Fix tecla crash in Czech(QWERTY)
@ -8,7 +69,7 @@ Mon Mar 25 17:59:06 UTC 2024 - Cliff Zhao <qzhao@suse.com>
(bsc#1220208) (bsc#1220208)
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Mar 25 17:50:12 UTC 2024 - Cliff Zhao <qzhao@suse.com> Thu Jan 11 17:50:12 UTC 2024 - Cliff Zhao <qzhao@suse.com>
- Add tecla-handle-TeclaModel-constructor-returning-NULL.patch: - Add tecla-handle-TeclaModel-constructor-returning-NULL.patch:
Backporting 931112ae from upstream, Fix tecla crash in Czech(QWERTY) Backporting 931112ae from upstream, Fix tecla crash in Czech(QWERTY)

View File

@ -1,7 +1,7 @@
# #
# spec file for package tecla-keyboard-layout-viewer # spec file for package tecla-keyboard-layout-viewer
# #
# Copyright (c) 2023 SUSE LLC # Copyright (c) 2024 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -17,23 +17,20 @@
Name: tecla-keyboard-layout-viewer Name: tecla-keyboard-layout-viewer
Version: 45.0 Version: 47.0
Release: 0 Release: 0
Summary: A keyboard layout viewer Summary: A keyboard layout viewer
License: GPL-2.0-only License: GPL-2.0-or-later
URL: https://gitlab.gnome.org/GNOME/tecla URL: https://gitlab.gnome.org/GNOME/tecla
Source: https://download.gnome.org/sources/tecla/45/tecla-%{version}.tar.xz Source: tecla-%{version}.tar.zst
# PATCH-FIX-UPSTREAM tecla-handle-TeclaModel-constructor-returning-NULL.patch bsc#1220208 qzhao@suse.com -- Handle TeclaModel constructor possibly returning NULL.
Patch0: tecla-handle-TeclaModel-constructor-returning-NULL.patch
# PATCH-FIX-UPSTREAM tecla-return-NULL-if-no-xkb_keymap.patch bsc#1220208 qzhao@suse.com -- Return NULL if no xkb_keymap could be created to avoid tecla crash.
Patch1: tecla-return-NULL-if-no-xkb_keymap.patch
BuildRequires: c_compiler BuildRequires: c_compiler
BuildRequires: meson BuildRequires: meson
BuildRequires: pkgconfig BuildRequires: pkgconfig
BuildRequires: pkgconfig(gtk4) BuildRequires: pkgconfig(gtk4)
BuildRequires: pkgconfig(gtk4-wayland) BuildRequires: pkgconfig(gtk4-wayland)
BuildRequires: pkgconfig(wayland-client)
BuildRequires: pkgconfig(libadwaita-1) >= 1.4 BuildRequires: pkgconfig(libadwaita-1) >= 1.4
BuildRequires: pkgconfig(wayland-client)
BuildRequires: pkgconfig(xkbcommon) BuildRequires: pkgconfig(xkbcommon)
%description %description

View File

@ -1,38 +0,0 @@
commit d6760195ab13d29bce1c6590638e4200cd6632f2 (HEAD -> d6760195ab13d29bce1c6590638e4200cd6632f2)
Author: Carlos Garnacho <carlosg@gnome.org>
Date: Thu Sep 21 13:24:58 2023 +0200
model: Return NULL if no xkb_keymap could be created
Right now we are somewhat optimistic that the passed keymap
name does exist, triggering crashes if it does not. Make
TeclaModel constructors return NULL if XKB does not know
about the given name/variant.
Closes: https://gitlab.gnome.org/GNOME/tecla/-/issues/16
diff -Nura tecla-45.0/src/tecla-model.c tecla-45.0_new/src/tecla-model.c
--- tecla-45.0/src/tecla-model.c 2023-09-17 01:02:57.000000000 +0800
+++ tecla-45.0_new/src/tecla-model.c 2024-03-31 16:46:54.193944659 +0800
@@ -299,7 +299,7 @@
TeclaModel *
tecla_model_new_from_layout_name (const gchar *name)
{
- TeclaModel *model;
+ TeclaModel *model = NULL;
struct xkb_context *xkb_context;
struct xkb_keymap *xkb_keymap;
g_autofree gchar *layout = NULL;
@@ -325,8 +325,10 @@
xkb_keymap = xkb_keymap_new_from_names (xkb_context, &rule_names, 0);
xkb_context_unref (xkb_context);
- model = tecla_model_new_from_xkb_keymap (xkb_keymap);
- xkb_keymap_unref (xkb_keymap);
+ if (xkb_keymap) {
+ model = tecla_model_new_from_xkb_keymap (xkb_keymap);
+ xkb_keymap_unref (xkb_keymap);
+ }
return model;
}

4
tecla.obsinfo Normal file
View File

@ -0,0 +1,4 @@
name: tecla
version: 47.0
mtime: 1726478605
commit: a950e731224d9de7fa4c3872fd84cde8293cd40f