Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package gnome-console for openSUSE:Factory checked in at 2023-10-23 23:41:11 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/gnome-console (Old) and /work/SRC/openSUSE:Factory/.gnome-console.new.1945 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "gnome-console" Mon Oct 23 23:41:11 2023 rev:2 rq:1119675 version:45.0 Changes: -------- --- /work/SRC/openSUSE:Factory/gnome-console/gnome-console.changes 2023-09-26 22:22:49.690291365 +0200 +++ /work/SRC/openSUSE:Factory/.gnome-console.new.1945/gnome-console.changes 2023-10-23 23:41:17.604244519 +0200 @@ -1,0 +2,6 @@ +Sun Oct 22 09:57:31 UTC 2023 - Bjørn Lie <bjorn....@gmail.com> + +- Add d259c18bc21ad83381e990b48bc66ea1dec21528.patch: close-dialog: + clamp row title to maximum length. + +------------------------------------------------------------------- New: ---- d259c18bc21ad83381e990b48bc66ea1dec21528.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ gnome-console.spec ++++++ --- /var/tmp/diff_new_pack.RpBRp1/_old 2023-10-23 23:41:18.212266592 +0200 +++ /var/tmp/diff_new_pack.RpBRp1/_new 2023-10-23 23:41:18.212266592 +0200 @@ -1,5 +1,5 @@ # -# spec file for package console +# spec file for package gnome-console # # Copyright (c) 2023 SUSE LLC # @@ -23,6 +23,8 @@ License: GPL-3.0-only URL: https://gitlab.gnome.org/GNOME/console Source: %{name}-%{version}.tar.zst +# PATCH-FIX-UPSTREAM https://gitlab.gnome.org/GNOME/console/-/commit/d259c18bc21ad83381e990b48bc66ea1dec21528.patch -- close-dialog: clamp row title to maximum length +Patch: d259c18bc21ad83381e990b48bc66ea1dec21528.patch BuildRequires: appstream-glib BuildRequires: c_compiler @@ -40,8 +42,8 @@ BuildRequires: pkgconfig(vte-2.91-gtk4) >= 0.69.91 Obsoletes: nautilus-extension-console < %{version} -Provides: nautilus-extension-console = %{version} Provides: console = %{version} +Provides: nautilus-extension-console = %{version} Obsoletes: console < 45.0 %description ++++++ d259c18bc21ad83381e990b48bc66ea1dec21528.patch ++++++ >From d259c18bc21ad83381e990b48bc66ea1dec21528 Mon Sep 17 00:00:00 2001 From: Christian Hergert <cherg...@redhat.com> Date: Fri, 22 Sep 2023 15:14:45 -0700 Subject: [PATCH] close-dialog: clamp row title to maximum length Without this, the sizing machinery can take so long that the window ends up being larger than the maximum texture size as well as just looping forever in terms glyph sizing. Handles obnoxiously long process titles. Fix: https://gitlab.gnome.org/GNOME/console/-/issues/264 --- src/kgx-close-dialog.c | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/src/kgx-close-dialog.c b/src/kgx-close-dialog.c index 09563734..3a330a30 100644 --- a/src/kgx-close-dialog.c +++ b/src/kgx-close-dialog.c @@ -32,6 +32,9 @@ #include "kgx-process.h" #include <adwaita.h> +#define MAX_TITLE_LENGTH 100 + + GtkWidget * kgx_close_dialog_new (KgxCloseDialogContext context, GPtrArray *commands) @@ -63,11 +66,29 @@ kgx_close_dialog_new (KgxCloseDialogContext context, for (int i = 0; i < commands->len; i++) { KgxProcess *process = g_ptr_array_index (commands, i); + const char *title = kgx_process_get_exec (process); GtkWidget *row; - row = g_object_new (ADW_TYPE_ACTION_ROW, - "title", kgx_process_get_exec (process), - NULL); + if (strlen (title) > MAX_TITLE_LENGTH) { + GPid pid = kgx_process_get_pid (process); + g_autofree char *pid_title = g_strdup_printf (_("Process %d"), pid); + g_autoptr (GString) short_title = g_string_new (NULL); + const char *iter = title; + + for (guint len = 0; *iter && len < MAX_TITLE_LENGTH; iter = g_utf8_next_char (iter), len++) { + g_string_append_unichar (short_title, g_utf8_get_char (iter)); + } + g_string_append (short_title, "â¦"); + + row = g_object_new (ADW_TYPE_ACTION_ROW, + "title", pid_title, + "subtitle", short_title->str, + NULL); + } else { + row = g_object_new (ADW_TYPE_ACTION_ROW, + "title", title, + NULL); + } gtk_list_box_append (GTK_LIST_BOX (list), row); } -- GitLab