* [gentoo-commits] repo/proj/guru:master commit in: gnome-extra/extension-manager/files/, gnome-extra/extension-manager/
@ 2023-06-04 6:20 Viorel Munteanu
0 siblings, 0 replies; 3+ messages in thread
From: Viorel Munteanu @ 2023-06-04 6:20 UTC (permalink / raw
To: gentoo-commits
commit: eab57b2ecae661d7a5bab86bd0c7157d3dcbcbc3
Author: Yuan Liao <liaoyuan <AT> gmail <DOT> com>
AuthorDate: Sat Jun 3 17:40:10 2023 +0000
Commit: Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Sat Jun 3 17:40:10 2023 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=eab57b2e
gnome-extra/extension-manager: Add patch to remove libbacktrace dep
Signed-off-by: Yuan Liao <liaoyuan <AT> gmail.com>
...99.ebuild => extension-manager-0.4.1-r1.ebuild} | 10 +-
.../extension-manager-9999.ebuild | 10 +-
...er-0.4.1-exm-backtrace.c-include-stdint.h.patch | 31 +++++
...-manager-0.4.1-make-libbacktrace-optional.patch | 153 +++++++++++++++++++++
4 files changed, 202 insertions(+), 2 deletions(-)
diff --git a/gnome-extra/extension-manager/extension-manager-9999.ebuild b/gnome-extra/extension-manager/extension-manager-0.4.1-r1.ebuild
similarity index 88%
copy from gnome-extra/extension-manager/extension-manager-9999.ebuild
copy to gnome-extra/extension-manager/extension-manager-0.4.1-r1.ebuild
index 273d091d9..bed7abdeb 100644
--- a/gnome-extra/extension-manager/extension-manager-9999.ebuild
+++ b/gnome-extra/extension-manager/extension-manager-0.4.1-r1.ebuild
@@ -33,17 +33,25 @@ RDEPEND="
>=gui-libs/libadwaita-1.2.0:1[introspection]
gui-libs/text-engine
net-libs/libsoup:3.0
- sys-libs/libbacktrace
"
DEPEND="
${RDEPEND}
"
+PATCHES=(
+ "${FILESDIR}/${PN}-0.4.1-exm-backtrace.c-include-stdint.h.patch"
+ "${FILESDIR}/${PN}-0.4.1-make-libbacktrace-optional.patch"
+)
+
src_configure() {
local emesonargs=(
-Dpackage="ebuild"
-Ddistributor="Gentoo GURU <guru-bugs@gentoo.org>"
+
+ # sys-libs/libbacktrace has been last-rited in ::gentoo
+ # and is thus unavailable
+ -Dbacktrace=false
)
if has live ${PROPERTIES}; then
# Produce a development build for live ebuild
diff --git a/gnome-extra/extension-manager/extension-manager-9999.ebuild b/gnome-extra/extension-manager/extension-manager-9999.ebuild
index 273d091d9..bed7abdeb 100644
--- a/gnome-extra/extension-manager/extension-manager-9999.ebuild
+++ b/gnome-extra/extension-manager/extension-manager-9999.ebuild
@@ -33,17 +33,25 @@ RDEPEND="
>=gui-libs/libadwaita-1.2.0:1[introspection]
gui-libs/text-engine
net-libs/libsoup:3.0
- sys-libs/libbacktrace
"
DEPEND="
${RDEPEND}
"
+PATCHES=(
+ "${FILESDIR}/${PN}-0.4.1-exm-backtrace.c-include-stdint.h.patch"
+ "${FILESDIR}/${PN}-0.4.1-make-libbacktrace-optional.patch"
+)
+
src_configure() {
local emesonargs=(
-Dpackage="ebuild"
-Ddistributor="Gentoo GURU <guru-bugs@gentoo.org>"
+
+ # sys-libs/libbacktrace has been last-rited in ::gentoo
+ # and is thus unavailable
+ -Dbacktrace=false
)
if has live ${PROPERTIES}; then
# Produce a development build for live ebuild
diff --git a/gnome-extra/extension-manager/files/extension-manager-0.4.1-exm-backtrace.c-include-stdint.h.patch b/gnome-extra/extension-manager/files/extension-manager-0.4.1-exm-backtrace.c-include-stdint.h.patch
new file mode 100644
index 000000000..bc0e27b57
--- /dev/null
+++ b/gnome-extra/extension-manager/files/extension-manager-0.4.1-exm-backtrace.c-include-stdint.h.patch
@@ -0,0 +1,31 @@
+From 49186450ff33e4a75d966cee51bcb6446fae3639 Mon Sep 17 00:00:00 2001
+From: Yuan Liao <liaoyuan@gmail.com>
+Date: Sat, 3 Jun 2023 09:59:11 -0700
+Subject: [PATCH 1/2] exm-backtrace.c: Explicitly include stdint.h for
+ uintptr_t usage
+
+The file uses type uintptr_t from stdint.h, which is indirectly included
+by backtrace.h. Even so, the file should unconditionally include
+stdint.h just in case backtrace.h no longer includes stdint.h in the
+future.
+
+Signed-off-by: Yuan Liao <liaoyuan@gmail.com>
+---
+ src/exm-backtrace.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/exm-backtrace.c b/src/exm-backtrace.c
+index 56b253a..4951394 100644
+--- a/src/exm-backtrace.c
++++ b/src/exm-backtrace.c
+@@ -21,6 +21,7 @@
+ #include "exm-backtrace.h"
+
+ #include <glib.h>
++#include <stdint.h>
+
+ #include <backtrace-supported.h>
+ #include <backtrace.h>
+--
+2.39.3
+
diff --git a/gnome-extra/extension-manager/files/extension-manager-0.4.1-make-libbacktrace-optional.patch b/gnome-extra/extension-manager/files/extension-manager-0.4.1-make-libbacktrace-optional.patch
new file mode 100644
index 000000000..66c1a20c0
--- /dev/null
+++ b/gnome-extra/extension-manager/files/extension-manager-0.4.1-make-libbacktrace-optional.patch
@@ -0,0 +1,153 @@
+From 6365d56e120c7522bc5a2ba515a3cd6efac1b184 Mon Sep 17 00:00:00 2001
+From: Yuan Liao <liaoyuan@gmail.com>
+Date: Sat, 3 Jun 2023 09:55:38 -0700
+Subject: [PATCH 2/2] Make libbacktrace an optional dependency
+
+Signed-off-by: Yuan Liao <liaoyuan@gmail.com>
+---
+ meson.build | 1 +
+ meson_options.txt | 5 +++++
+ src/exm-application.c | 2 ++
+ src/exm-backtrace.c | 17 +++++++++++++++++
+ src/meson.build | 9 ++++++---
+ 5 files changed, 31 insertions(+), 3 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 536cd97..d7b0eb5 100644
+--- a/meson.build
++++ b/meson.build
+@@ -25,6 +25,7 @@ config_h.set_quoted('PKG_NAME', get_option('package'))
+ config_h.set_quoted('PKG_DISTRIBUTOR', get_option('distributor'))
+ config_h.set10('IS_OFFICIAL', get_option('official'))
+ config_h.set10('IS_DEVEL', get_option('development'))
++config_h.set10('WITH_BACKTRACE', get_option('backtrace'))
+ configure_file(
+ output: 'exm-config.h',
+ configuration: config_h,
+diff --git a/meson_options.txt b/meson_options.txt
+index b604dda..3f54b77 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -8,6 +8,11 @@ option('official',
+ value: false,
+ description: 'Whether this is an official upstream package')
+
++option('backtrace',
++ type: 'boolean',
++ value: true,
++ description: 'Whether the package is built with backtrace support')
++
+ # Will be shown in error messages
+ option('package',
+ type: 'string',
+diff --git a/src/exm-application.c b/src/exm-application.c
+index 5b56295..d062627 100644
+--- a/src/exm-application.c
++++ b/src/exm-application.c
+@@ -201,11 +201,13 @@ exm_application_show_about (GSimpleAction *action,
+ GTK_LICENSE_MPL_2_0,
+ NULL);
+
++#if WITH_BACKTRACE
+ adw_about_window_add_legal_section (ADW_ABOUT_WINDOW (about_window),
+ "libbacktrace",
+ "Copyright (C) 2012-2016 Free Software Foundation, Inc.",
+ GTK_LICENSE_BSD_3,
+ NULL);
++#endif
+
+ adw_about_window_add_legal_section (ADW_ABOUT_WINDOW (about_window),
+ "blueprint",
+diff --git a/src/exm-backtrace.c b/src/exm-backtrace.c
+index 4951394..3cf09b7 100644
+--- a/src/exm-backtrace.c
++++ b/src/exm-backtrace.c
+@@ -18,15 +18,21 @@
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
++#include "exm-config.h"
++
+ #include "exm-backtrace.h"
+
+ #include <glib.h>
+ #include <stdint.h>
+
++#if WITH_BACKTRACE
+ #include <backtrace-supported.h>
+ #include <backtrace.h>
++#endif
+
++#if WITH_BACKTRACE
+ static struct backtrace_state *state = NULL;
++#endif
+
+ static void
+ exm_backtrace_error_cb (void *data,
+@@ -54,6 +60,8 @@ exm_backtrace_full_cb (GString *string_builder,
+ void
+ exm_backtrace_init (char *filename)
+ {
++#if WITH_BACKTRACE
++
+ #ifdef BACKTRACE_SUPPORTED
+ state = backtrace_create_state (filename, 0,
+ exm_backtrace_error_cb,
+@@ -61,11 +69,16 @@ exm_backtrace_init (char *filename)
+ #else
+ g_warning ("Backtraces are not supported.\n");
+ #endif
++
++#else
++ g_warning ("Backtraces were not enabled at build time.\n");
++#endif
+ }
+
+ char *
+ exm_backtrace_print ()
+ {
++#if WITH_BACKTRACE
+ GString *string_builder;
+
+ if (!state)
+@@ -82,4 +95,8 @@ exm_backtrace_print ()
+ string_builder);
+
+ return g_string_free (string_builder, FALSE);
++#else
++ g_critical ("Backtraces were not enabled at build time.\n");
++ return NULL;
++#endif
+ }
+diff --git a/src/meson.build b/src/meson.build
+index 8599a8f..2adde2d 100644
+--- a/src/meson.build
++++ b/src/meson.build
+@@ -29,7 +29,7 @@ exm_sources = [
+ ]
+
+ cc = meson.get_compiler('c')
+-libbacktrace_dep = cc.find_library('backtrace', required: true)
++libbacktrace_dep = cc.find_library('backtrace', required: get_option('backtrace'))
+
+ exm_deps = [
+ dependency('gtk4'),
+@@ -37,10 +37,13 @@ exm_deps = [
+ dependency('gio-unix-2.0'),
+ dependency('json-glib-1.0'),
+ dependency('libsoup-3.0'),
+- dependency('text-engine-0.1'),
+- libbacktrace_dep
++ dependency('text-engine-0.1')
+ ]
+
++if libbacktrace_dep.found()
++ exm_deps += libbacktrace_dep
++endif
++
+ gnome = import('gnome')
+
+ subdir('local')
+--
+2.39.3
+
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/proj/guru:master commit in: gnome-extra/extension-manager/files/, gnome-extra/extension-manager/
@ 2023-07-20 8:36 Florian Schmaus
0 siblings, 0 replies; 3+ messages in thread
From: Florian Schmaus @ 2023-07-20 8:36 UTC (permalink / raw
To: gentoo-commits
commit: 584f63bd9e3a74b0cefd86f6c44ec96274c2fd77
Author: Yuan Liao <liaoyuan <AT> gmail <DOT> com>
AuthorDate: Wed Jul 19 14:54:54 2023 +0000
Commit: Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Wed Jul 19 14:54:54 2023 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=584f63bd
gnome-extra/extension-manager: Drop 0.4.1-r1
Signed-off-by: Yuan Liao <liaoyuan <AT> gmail.com>
| 1 -
.../extension-manager-0.4.1-r1.ebuild | 88 ----------------------
...er-0.4.1-exm-backtrace.c-include-stdint.h.patch | 31 --------
3 files changed, 120 deletions(-)
--git a/gnome-extra/extension-manager/Manifest b/gnome-extra/extension-manager/Manifest
index 7311d0047..136d1ab26 100644
--- a/gnome-extra/extension-manager/Manifest
+++ b/gnome-extra/extension-manager/Manifest
@@ -1,3 +1,2 @@
DIST extension-manager-0.3.2.tar.gz 1447521 BLAKE2B 55d09b54219804c1910a572953d7fee4b8a9131085260db1d4ef014bccf8b13fa2da0a8673c0d78643841d603878183c2b573b084bcd5cb1818721e8194c871b SHA512 84ff2f246d582cdae06a12e5e88309d67ae32502e9885675c08d75dc686fdea28b53bffa37d396ffface8515712f0b990603b5832704ae722342f0ad49748150
-DIST extension-manager-0.4.1.tar.gz 1490668 BLAKE2B ca7c4dabc100d4a8aba8a41ecdec3c88676764b81c2e5fdb64785ca5031a31749d058c1a670867fd1028ae13721d8de0c648fd397f63a56871e11899bca4d4f5 SHA512 3da3ff3f42117ad52eecd99e92d65d8d72b95e07a5488f7184577ab10f749b1cee08a3322316bf2a92a8e2b878ca18e94ce7d986331688eafb520cdb8a0bbf1c
DIST extension-manager-0.4.2.tar.gz 1469519 BLAKE2B 070016a50f48a89d39c760c7ec60fabc856dcdd7a8fc4a779253ede2354f7d9d6744fa7620e55a92f9ed671a00b8aff1fd9246d7dc919727893215d2f05e0658 SHA512 777c0d83f26064372a721681092ef7990ade028ea2d6bb8bb64aa8a4630cea60f2af07c1cf7d733a8f100fe5d7de5b1aeac2b99d8a585dc715ee469a874c0148
diff --git a/gnome-extra/extension-manager/extension-manager-0.4.1-r1.ebuild b/gnome-extra/extension-manager/extension-manager-0.4.1-r1.ebuild
deleted file mode 100644
index bed7abdeb..000000000
--- a/gnome-extra/extension-manager/extension-manager-0.4.1-r1.ebuild
+++ /dev/null
@@ -1,88 +0,0 @@
-# Copyright 2022-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit gnome2-utils meson xdg
-
-if [[ ${PV} == *9999 ]]; then
- inherit git-r3
- EGIT_REPO_URI="https://github.com/mjakeman/extension-manager.git"
-else
- SRC_URI="https://github.com/mjakeman/extension-manager/archive/v${PV}.tar.gz -> ${P}.tar.gz"
- KEYWORDS="~amd64"
-fi
-
-DESCRIPTION="A native tool for browsing, installing, and managing GNOME Shell Extensions"
-HOMEPAGE="https://mjakeman.github.io/extension-manager/"
-
-LICENSE="GPL-3+"
-SLOT="0"
-
-BDEPEND="
- dev-libs/glib:2
- dev-util/blueprint-compiler
- sys-devel/gettext
- virtual/pkgconfig
-"
-
-RDEPEND="
- dev-libs/glib:2
- dev-libs/json-glib
- gui-libs/gtk:4[introspection]
- >=gui-libs/libadwaita-1.2.0:1[introspection]
- gui-libs/text-engine
- net-libs/libsoup:3.0
-"
-
-DEPEND="
- ${RDEPEND}
-"
-
-PATCHES=(
- "${FILESDIR}/${PN}-0.4.1-exm-backtrace.c-include-stdint.h.patch"
- "${FILESDIR}/${PN}-0.4.1-make-libbacktrace-optional.patch"
-)
-
-src_configure() {
- local emesonargs=(
- -Dpackage="ebuild"
- -Ddistributor="Gentoo GURU <guru-bugs@gentoo.org>"
-
- # sys-libs/libbacktrace has been last-rited in ::gentoo
- # and is thus unavailable
- -Dbacktrace=false
- )
- if has live ${PROPERTIES}; then
- # Produce a development build for live ebuild
- emesonargs+=( -Ddevelopment=true )
- fi
- meson_src_configure
-}
-
-# Tests are skipped because as of version 0.3.0, the tests only validate
-# resource files and do not verify any functionality of the program. Those
-# validations are either already handled by QA checks or not relevant on
-# Gentoo. For more information about the rationale, please refer to:
-# https://github.com/gentoo/guru/commit/f896bee213fbb62c70e818c1bf503fee2a41919a#comments
-#
-# If tests are to be executed in the future because the upstream adds
-# functionality tests or for other reasons, and should there be no convenient
-# way to skip the validations, the following variable values need to be set:
-#
-# IUSE="test"
-# RESTRICT="!test? ( test )"
-# BDEPEND="test? ( dev-libs/appstream-glib dev-util/desktop-file-utils )"
-src_test() {
- :
-}
-
-pkg_postinst() {
- xdg_pkg_postinst
- gnome2_schemas_update
-}
-
-pkg_postrm() {
- xdg_pkg_postrm
- gnome2_schemas_update
-}
diff --git a/gnome-extra/extension-manager/files/extension-manager-0.4.1-exm-backtrace.c-include-stdint.h.patch b/gnome-extra/extension-manager/files/extension-manager-0.4.1-exm-backtrace.c-include-stdint.h.patch
deleted file mode 100644
index bc0e27b57..000000000
--- a/gnome-extra/extension-manager/files/extension-manager-0.4.1-exm-backtrace.c-include-stdint.h.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 49186450ff33e4a75d966cee51bcb6446fae3639 Mon Sep 17 00:00:00 2001
-From: Yuan Liao <liaoyuan@gmail.com>
-Date: Sat, 3 Jun 2023 09:59:11 -0700
-Subject: [PATCH 1/2] exm-backtrace.c: Explicitly include stdint.h for
- uintptr_t usage
-
-The file uses type uintptr_t from stdint.h, which is indirectly included
-by backtrace.h. Even so, the file should unconditionally include
-stdint.h just in case backtrace.h no longer includes stdint.h in the
-future.
-
-Signed-off-by: Yuan Liao <liaoyuan@gmail.com>
----
- src/exm-backtrace.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/exm-backtrace.c b/src/exm-backtrace.c
-index 56b253a..4951394 100644
---- a/src/exm-backtrace.c
-+++ b/src/exm-backtrace.c
-@@ -21,6 +21,7 @@
- #include "exm-backtrace.h"
-
- #include <glib.h>
-+#include <stdint.h>
-
- #include <backtrace-supported.h>
- #include <backtrace.h>
---
-2.39.3
-
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/proj/guru:master commit in: gnome-extra/extension-manager/files/, gnome-extra/extension-manager/
@ 2024-03-15 7:10 Rui Huang
0 siblings, 0 replies; 3+ messages in thread
From: Rui Huang @ 2024-03-15 7:10 UTC (permalink / raw
To: gentoo-commits
commit: 489fea3cadeb9b49536c6009a7a3c77746c47b89
Author: Yuan Liao <liaoyuan <AT> gmail <DOT> com>
AuthorDate: Thu Mar 14 14:49:19 2024 +0000
Commit: Rui Huang <vowstar <AT> gmail <DOT> com>
CommitDate: Thu Mar 14 14:49:19 2024 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=489fea3c
gnome-extra/extension-manager: Add patch to prepare for upstream v0.5.0
Signed-off-by: Yuan Liao <liaoyuan <AT> gmail.com>
.../extension-manager-9999.ebuild | 6 +-
.../extension-manager-0.5.0-libadwaita-1.4.patch | 435 +++++++++++++++++++++
2 files changed, 440 insertions(+), 1 deletion(-)
diff --git a/gnome-extra/extension-manager/extension-manager-9999.ebuild b/gnome-extra/extension-manager/extension-manager-9999.ebuild
index 008277ed53..08c2dc6c97 100644
--- a/gnome-extra/extension-manager/extension-manager-9999.ebuild
+++ b/gnome-extra/extension-manager/extension-manager-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2022-2023 Gentoo Authors
+# Copyright 2022-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -39,6 +39,10 @@ DEPEND="
${RDEPEND}
"
+PATCHES=(
+ "${FILESDIR}/${PN}-0.5.0-libadwaita-1.4.patch"
+)
+
src_configure() {
local emesonargs=(
-Dpackage="ebuild"
diff --git a/gnome-extra/extension-manager/files/extension-manager-0.5.0-libadwaita-1.4.patch b/gnome-extra/extension-manager/files/extension-manager-0.5.0-libadwaita-1.4.patch
new file mode 100644
index 0000000000..f8ecccbf0b
--- /dev/null
+++ b/gnome-extra/extension-manager/files/extension-manager-0.5.0-libadwaita-1.4.patch
@@ -0,0 +1,435 @@
+From 8d03f63f9c825d3f486e55c26eb2efd6a2e57711 Mon Sep 17 00:00:00 2001
+From: Yuan Liao <liaoyuan@gmail.com>
+Date: Thu, 14 Mar 2024 10:44:40 -0400
+Subject: [PATCH 1/4] Revert "upgrade-assistant: Port AdwWindow to AdwDialog"
+
+This reverts commit 9e394c18722d18d4273083f4fd5aa152c20b57b7.
+
+The reverted commit migrates the application to libadwaita 1.5; this
+should not have been done because libadwaita 1.5 has not been released.
+
+Signed-off-by: Yuan Liao <liaoyuan@gmail.com>
+---
+ src/exm-upgrade-assistant.blp | 10 +++++-----
+ src/exm-upgrade-assistant.c | 6 ++++--
+ src/exm-upgrade-assistant.h | 2 +-
+ src/exm-window.c | 4 +++-
+ 4 files changed, 13 insertions(+), 9 deletions(-)
+
+diff --git a/src/exm-upgrade-assistant.blp b/src/exm-upgrade-assistant.blp
+index a0c1ebe..e822598 100644
+--- a/src/exm-upgrade-assistant.blp
++++ b/src/exm-upgrade-assistant.blp
+@@ -1,13 +1,13 @@
+ using Gtk 4.0;
+ using Adw 1;
+
+-template $ExmUpgradeAssistant : Adw.Dialog {
+- content-width: 400;
+- content-height: 600;
++template $ExmUpgradeAssistant : Adw.Window {
++ default-width: 400;
++ default-height: 550;
+ title: _("Upgrade Assistant");
+ notify::manager => $on_bind_manager();
+
+- child: Adw.ToolbarView {
++ Adw.ToolbarView {
+
+ [top]
+ Adw.HeaderBar {}
+@@ -136,5 +136,5 @@ template $ExmUpgradeAssistant : Adw.Dialog {
+ };
+ }
+ };
+- };
++ }
+ }
+diff --git a/src/exm-upgrade-assistant.c b/src/exm-upgrade-assistant.c
+index 6eca4c7..a93b5e1 100644
+--- a/src/exm-upgrade-assistant.c
++++ b/src/exm-upgrade-assistant.c
+@@ -28,7 +28,7 @@
+
+ struct _ExmUpgradeAssistant
+ {
+- AdwDialog parent_instance;
++ AdwWindow parent_instance;
+
+ // Auxiliary Classes
+ ExmManager *manager;
+@@ -66,7 +66,7 @@ struct _ExmUpgradeAssistant
+ GtkButton *copy_details;
+ };
+
+-G_DEFINE_FINAL_TYPE (ExmUpgradeAssistant, exm_upgrade_assistant, ADW_TYPE_DIALOG)
++G_DEFINE_FINAL_TYPE (ExmUpgradeAssistant, exm_upgrade_assistant, ADW_TYPE_WINDOW)
+
+ enum {
+ PROP_0,
+@@ -657,6 +657,8 @@ exm_upgrade_assistant_class_init (ExmUpgradeAssistantClass *klass)
+ gtk_widget_class_bind_template_callback (widget_class, do_compatibility_check);
+ gtk_widget_class_bind_template_callback (widget_class, copy_to_clipboard);
+ gtk_widget_class_bind_template_callback (widget_class, on_bind_manager);
++
++ gtk_widget_class_add_binding_action (widget_class, GDK_KEY_Escape, 0, "window.close", NULL);
+ }
+
+ static void
+diff --git a/src/exm-upgrade-assistant.h b/src/exm-upgrade-assistant.h
+index 11322d5..d0c58ff 100644
+--- a/src/exm-upgrade-assistant.h
++++ b/src/exm-upgrade-assistant.h
+@@ -28,7 +28,7 @@
+
+ #define EXM_TYPE_UPGRADE_ASSISTANT (exm_upgrade_assistant_get_type())
+
+- G_DECLARE_FINAL_TYPE (ExmUpgradeAssistant, exm_upgrade_assistant, EXM, UPGRADE_ASSISTANT, AdwDialog)
++ G_DECLARE_FINAL_TYPE (ExmUpgradeAssistant, exm_upgrade_assistant, EXM, UPGRADE_ASSISTANT, AdwWindow)
+
+ ExmUpgradeAssistant *exm_upgrade_assistant_new (ExmManager *manager);
+
+diff --git a/src/exm-window.c b/src/exm-window.c
+index 5c81c82..96c91b9 100644
+--- a/src/exm-window.c
++++ b/src/exm-window.c
+@@ -308,7 +308,9 @@ show_upgrade_assistant (GtkWidget *widget,
+ self = EXM_WINDOW (widget);
+
+ ExmUpgradeAssistant *assistant = exm_upgrade_assistant_new (self->manager);
+- adw_dialog_present (ADW_DIALOG (assistant), widget);
++ gtk_window_set_modal (GTK_WINDOW (assistant), TRUE);
++ gtk_window_set_transient_for (GTK_WINDOW (assistant), GTK_WINDOW (self));
++ gtk_window_present (GTK_WINDOW (assistant));
+ }
+
+ static void
+--
+2.43.0
+
+
+From 945c2e3b1b454d16f84a46bcbcb227256886bb68 Mon Sep 17 00:00:00 2001
+From: Yuan Liao <liaoyuan@gmail.com>
+Date: Thu, 14 Mar 2024 10:44:51 -0400
+Subject: [PATCH 2/4] Revert "comment-dialog: Port AdwWindow to AdwDialog"
+
+This reverts commit e79dd0771243646a8062a413fc58f61102d5a4f1.
+
+The reverted commit migrates the application to libadwaita 1.5; this
+should not have been done because libadwaita 1.5 has not been released.
+
+Signed-off-by: Yuan Liao <liaoyuan@gmail.com>
+---
+ src/exm-comment-dialog.blp | 10 +++++-----
+ src/exm-comment-dialog.c | 6 ++++--
+ src/exm-comment-dialog.h | 2 +-
+ src/exm-detail-view.c | 5 ++++-
+ 4 files changed, 14 insertions(+), 9 deletions(-)
+
+diff --git a/src/exm-comment-dialog.blp b/src/exm-comment-dialog.blp
+index 50853a6..1fbde6b 100644
+--- a/src/exm-comment-dialog.blp
++++ b/src/exm-comment-dialog.blp
+@@ -1,14 +1,14 @@
+ using Gtk 4.0;
+ using Adw 1;
+
+-template $ExmCommentDialog : Adw.Dialog {
+- content-width: 600;
+- content-height: 600;
++template $ExmCommentDialog : Adw.Window {
++ default-width: 600;
++ default-height: 500;
+ width-request: 360;
+ height-request: 294;
+ title: _("Comments");
+
+- child: Adw.ToolbarView {
++ Adw.ToolbarView {
+
+ [top]
+ Adw.HeaderBar {}
+@@ -61,5 +61,5 @@ template $ExmCommentDialog : Adw.Dialog {
+ }
+ }
+ };
+- };
++ }
+ }
+diff --git a/src/exm-comment-dialog.c b/src/exm-comment-dialog.c
+index 3404a2f..621c5f7 100644
+--- a/src/exm-comment-dialog.c
++++ b/src/exm-comment-dialog.c
+@@ -7,7 +7,7 @@
+
+ struct _ExmCommentDialog
+ {
+- AdwDialog parent_instance;
++ AdwWindow parent_instance;
+
+ ExmCommentProvider *comment_provider;
+
+@@ -17,7 +17,7 @@ struct _ExmCommentDialog
+ int web_id;
+ };
+
+-G_DEFINE_FINAL_TYPE (ExmCommentDialog, exm_comment_dialog, ADW_TYPE_DIALOG)
++G_DEFINE_FINAL_TYPE (ExmCommentDialog, exm_comment_dialog, ADW_TYPE_WINDOW)
+
+ enum {
+ PROP_0,
+@@ -106,6 +106,8 @@ exm_comment_dialog_class_init (ExmCommentDialogClass *klass)
+
+ gtk_widget_class_bind_template_child (widget_class, ExmCommentDialog, list_box);
+ gtk_widget_class_bind_template_child (widget_class, ExmCommentDialog, stack);
++
++ gtk_widget_class_add_binding_action (widget_class, GDK_KEY_Escape, 0, "window.close", NULL);
+ }
+
+ static GtkWidget *
+diff --git a/src/exm-comment-dialog.h b/src/exm-comment-dialog.h
+index 1abd584..4d99a35 100644
+--- a/src/exm-comment-dialog.h
++++ b/src/exm-comment-dialog.h
+@@ -8,7 +8,7 @@ G_BEGIN_DECLS
+
+ #define EXM_TYPE_COMMENT_DIALOG (exm_comment_dialog_get_type())
+
+-G_DECLARE_FINAL_TYPE (ExmCommentDialog, exm_comment_dialog, EXM, COMMENT_DIALOG, AdwDialog)
++G_DECLARE_FINAL_TYPE (ExmCommentDialog, exm_comment_dialog, EXM, COMMENT_DIALOG, AdwWindow)
+
+ ExmCommentDialog *exm_comment_dialog_new (int web_id);
+
+diff --git a/src/exm-detail-view.c b/src/exm-detail-view.c
+index 2c9f4f0..f687fed 100644
+--- a/src/exm-detail-view.c
++++ b/src/exm-detail-view.c
+@@ -273,7 +273,10 @@ show_more_comments (GtkButton *button,
+ dlg = exm_comment_dialog_new (self->pk);
+ toplevel = gtk_widget_get_root (GTK_WIDGET (self));
+
+- adw_dialog_present (ADW_DIALOG (dlg), GTK_WIDGET (toplevel));
++ gtk_window_set_transient_for (GTK_WINDOW (dlg), GTK_WINDOW (toplevel));
++ gtk_window_set_modal (GTK_WINDOW (dlg), TRUE);
++
++ gtk_window_present (GTK_WINDOW (dlg));
+ }
+
+ static void
+--
+2.43.0
+
+
+From 27ff5664e5f5f6c7401db436f188edcdf8d46b54 Mon Sep 17 00:00:00 2001
+From: Yuan Liao <liaoyuan@gmail.com>
+Date: Thu, 14 Mar 2024 10:44:58 -0400
+Subject: [PATCH 3/4] Revert "window: Port AdwMessageDialog to AdwAlertDialog"
+
+This reverts commit 3808e70cd75fe410d9a2e06ef54da024a7c29b2c.
+
+The reverted commit migrates the application to libadwaita 1.5; this
+should not have been done because libadwaita 1.5 has not been released.
+
+Signed-off-by: Yuan Liao <liaoyuan@gmail.com>
+---
+ src/exm-window.c | 56 +++++++++++++++++++++++++-----------------------
+ 1 file changed, 29 insertions(+), 27 deletions(-)
+
+diff --git a/src/exm-window.c b/src/exm-window.c
+index 96c91b9..5921247 100644
+--- a/src/exm-window.c
++++ b/src/exm-window.c
+@@ -123,11 +123,11 @@ typedef struct
+ } RemoveDialogData;
+
+ static void
+-extension_remove_dialog_response (AdwDialog *dialog,
++extension_remove_dialog_response (GtkDialog *dialog,
+ const char *response,
+ RemoveDialogData *data)
+ {
+- adw_dialog_force_close (dialog);
++ gtk_window_destroy (GTK_WINDOW (dialog));
+
+ if (strcmp(response, "yes") == 0)
+ {
+@@ -153,27 +153,28 @@ extension_remove (GtkWidget *widget,
+
+ extension = exm_manager_get_by_uuid (self->manager, uuid);
+
+- AdwDialog *dlg;
++ GtkWidget *dlg;
+
+- dlg = adw_alert_dialog_new (_("Uninstall Extension?"),
+- _("The extension's features and functionality will no longer be accessible. Are you sure you want to uninstall?"));
++ dlg = adw_message_dialog_new (GTK_WINDOW (self),
++ _("Uninstall Extension?"),
++ _("The extension's features and functionality will no longer be accessible. Are you sure you want to uninstall?"));
+
+- adw_alert_dialog_add_responses (ADW_ALERT_DIALOG (dlg),
+- "no", _("_No"),
+- "yes", _("_Yes"),
+- NULL);
++ adw_message_dialog_add_responses (ADW_MESSAGE_DIALOG (dlg),
++ "no", _("_No"),
++ "yes", _("_Yes"),
++ NULL);
+
+- adw_alert_dialog_set_response_appearance (ADW_ALERT_DIALOG (dlg), "yes", ADW_RESPONSE_DESTRUCTIVE);
++ adw_message_dialog_set_response_appearance (ADW_MESSAGE_DIALOG (dlg), "yes", ADW_RESPONSE_DESTRUCTIVE);
+
+- adw_alert_dialog_set_default_response (ADW_ALERT_DIALOG (dlg), "no");
+- adw_alert_dialog_set_close_response (ADW_ALERT_DIALOG (dlg), "no");
++ adw_message_dialog_set_default_response (ADW_MESSAGE_DIALOG (dlg), "no");
++ adw_message_dialog_set_close_response (ADW_MESSAGE_DIALOG (dlg), "no");
+
+ RemoveDialogData *data = g_new0 (RemoveDialogData, 1);
+ data->manager = g_object_ref (self->manager);
+ data->extension = g_object_ref (extension);
+
+ g_signal_connect (dlg, "response", G_CALLBACK (extension_remove_dialog_response), data);
+- adw_dialog_present (dlg, GTK_WIDGET (self));
++ gtk_window_present (GTK_WINDOW (dlg));
+ }
+
+ static void
+@@ -195,11 +196,11 @@ typedef struct
+ } UnsupportedDialogData;
+
+ static void
+-extension_unsupported_dialog_response (AdwDialog *dialog,
++extension_unsupported_dialog_response (GtkDialog *dialog,
+ const char *response,
+ UnsupportedDialogData *data)
+ {
+- adw_dialog_force_close (dialog);
++ gtk_window_destroy (GTK_WINDOW (dialog));
+
+ if (strcmp(response, "yes") == 0)
+ {
+@@ -227,28 +228,29 @@ extension_install (GtkWidget *widget,
+
+ if (warn)
+ {
+- AdwDialog *dlg;
++ GtkWidget *dlg;
+
+- dlg = adw_alert_dialog_new (_("Unsupported Extension"),
+- _("This extension does not support your GNOME Shell version. It may cause errors if installed."));
++ dlg = adw_message_dialog_new (GTK_WINDOW (self),
++ _("Unsupported Extension"),
++ _("This extension does not support your GNOME Shell version. It may cause errors if installed."));
+
+- adw_alert_dialog_add_responses (ADW_ALERT_DIALOG (dlg),
+- "yes", _("_Install Anyway"),
+- "no", _("_Go Back"),
+- NULL);
++ adw_message_dialog_add_responses (ADW_MESSAGE_DIALOG (dlg),
++ "yes", _("_Install Anyway"),
++ "no", _("_Go Back"),
++ NULL);
+
+- adw_alert_dialog_set_response_appearance (ADW_ALERT_DIALOG (dlg), "yes", ADW_RESPONSE_DESTRUCTIVE);
+- adw_alert_dialog_set_response_appearance (ADW_ALERT_DIALOG (dlg), "no", ADW_RESPONSE_SUGGESTED);
++ adw_message_dialog_set_response_appearance (ADW_MESSAGE_DIALOG (dlg), "yes", ADW_RESPONSE_DESTRUCTIVE);
++ adw_message_dialog_set_response_appearance (ADW_MESSAGE_DIALOG (dlg), "no", ADW_RESPONSE_SUGGESTED);
+
+- adw_alert_dialog_set_default_response (ADW_ALERT_DIALOG (dlg), "no");
+- adw_alert_dialog_set_close_response (ADW_ALERT_DIALOG (dlg), "no");
++ adw_message_dialog_set_default_response (ADW_MESSAGE_DIALOG (dlg), "no");
++ adw_message_dialog_set_close_response (ADW_MESSAGE_DIALOG (dlg), "no");
+
+ UnsupportedDialogData *data = g_new0 (UnsupportedDialogData, 1);
+ data->manager = g_object_ref (self->manager);
+ data->uuid = g_strdup (uuid);
+
+ g_signal_connect (dlg, "response", G_CALLBACK (extension_unsupported_dialog_response), data);
+- adw_dialog_present (dlg, GTK_WIDGET (self));
++ gtk_window_present (GTK_WINDOW (dlg));
+
+ return;
+ }
+--
+2.43.0
+
+
+From e2aedc3f7e8aaa214404d4dacf614186fc07e1be Mon Sep 17 00:00:00 2001
+From: Yuan Liao <liaoyuan@gmail.com>
+Date: Thu, 14 Mar 2024 10:45:05 -0400
+Subject: [PATCH 4/4] Revert "application: Port AdwAboutWindow to
+ AdwAboutDialog"
+
+This reverts commit 49ecc2b364e532d72fca090ba2b5b7f61f82195f.
+
+The reverted commit migrates the application to libadwaita 1.5; this
+should not have been done because libadwaita 1.5 has not been released.
+
+Signed-off-by: Yuan Liao <liaoyuan@gmail.com>
+---
+ src/exm-application.c | 24 +++++++++++++-----------
+ 1 file changed, 13 insertions(+), 11 deletions(-)
+
+diff --git a/src/exm-application.c b/src/exm-application.c
+index 1cd80b5..03c1995 100644
+--- a/src/exm-application.c
++++ b/src/exm-application.c
+@@ -177,43 +177,45 @@ exm_application_show_about (GSimpleAction *action,
+ GtkWindow *window = NULL;
+ const gchar *authors[] = {"Matthew Jakeman", NULL};
+
+- AdwDialog *about_dialog;
++ GtkWidget *about_window;
+
+ g_return_if_fail (EXM_IS_APPLICATION (self));
+
+ window = gtk_application_get_active_window (GTK_APPLICATION (self));
+
+- about_dialog = adw_about_dialog_new_from_appdata ("/com/mattjakeman/ExtensionManager/com.mattjakeman.ExtensionManager.metainfo.xml",
++ about_window = adw_about_window_new_from_appdata ("/com/mattjakeman/ExtensionManager/com.mattjakeman.ExtensionManager.metainfo.xml",
+ strstr (APP_ID, ".Devel") == NULL ? APP_VERSION : NULL);
++ gtk_window_set_modal (GTK_WINDOW (about_window), TRUE);
++ gtk_window_set_transient_for (GTK_WINDOW (about_window), window);
+
+- adw_about_dialog_set_version (ADW_ABOUT_DIALOG (about_dialog), APP_VERSION);
+- adw_about_dialog_set_comments (ADW_ABOUT_DIALOG (about_dialog), _("Browse, install, and manage GNOME Shell Extensions."));
+- adw_about_dialog_set_developers (ADW_ABOUT_DIALOG (about_dialog), authors);
+- adw_about_dialog_set_translator_credits (ADW_ABOUT_DIALOG (about_dialog), _("translator-credits"));
+- adw_about_dialog_set_copyright (ADW_ABOUT_DIALOG (about_dialog), "© 2022 Matthew Jakeman");
++ adw_about_window_set_version (ADW_ABOUT_WINDOW (about_window), APP_VERSION);
++ adw_about_window_set_comments (ADW_ABOUT_WINDOW (about_window), _("Browse, install, and manage GNOME Shell Extensions."));
++ adw_about_window_set_developers (ADW_ABOUT_WINDOW (about_window), authors);
++ adw_about_window_set_translator_credits (ADW_ABOUT_WINDOW (about_window), _("translator-credits"));
++ adw_about_window_set_copyright (ADW_ABOUT_WINDOW (about_window), "© 2022 Matthew Jakeman");
+
+ // Dependency Attribution
+- adw_about_dialog_add_legal_section (ADW_ABOUT_DIALOG (about_dialog),
++ adw_about_window_add_legal_section (ADW_ABOUT_WINDOW (about_window),
+ "text-engine",
+ "Copyright (C) 2022 Matthew Jakeman",
+ GTK_LICENSE_MPL_2_0,
+ NULL);
+
+ #if WITH_BACKTRACE
+- adw_about_dialog_add_legal_section (ADW_ABOUT_DIALOG (about_dialog),
++ adw_about_window_add_legal_section (ADW_ABOUT_WINDOW (about_window),
+ "libbacktrace",
+ "Copyright (C) 2012-2016 Free Software Foundation, Inc.",
+ GTK_LICENSE_BSD_3,
+ NULL);
+ #endif
+
+- adw_about_dialog_add_legal_section (ADW_ABOUT_DIALOG (about_dialog),
++ adw_about_window_add_legal_section (ADW_ABOUT_WINDOW (about_window),
+ "blueprint",
+ "Copyright (C) 2021 James Westman",
+ GTK_LICENSE_LGPL_3_0,
+ NULL);
+
+- adw_dialog_present (about_dialog, GTK_WIDGET (window));
++ gtk_window_present (GTK_WINDOW (about_window));
+ }
+
+ static void
+--
+2.43.0
+
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-03-15 7:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-20 8:36 [gentoo-commits] repo/proj/guru:master commit in: gnome-extra/extension-manager/files/, gnome-extra/extension-manager/ Florian Schmaus
-- strict thread matches above, loose matches on Subject: below --
2024-03-15 7:10 Rui Huang
2023-06-04 6:20 Viorel Munteanu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox