From cff7f2a2fdb3d53ddcec363358e3ffa68e78af34 Mon Sep 17 00:00:00 2001 From: Automeris naranja Date: Mon, 15 Apr 2024 20:37:38 -0300 Subject: [PATCH 1/3] meson: Bump to libadwaita 1.5 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This also involves bumping the GTK subproject version, as libadwaita 1.5 depends on that (even though gnome-software itself doesn’t require that version of GTK). The dependency in `meson.build` needs to be bumped to force the subproject to be used. --- .gitlab-ci.yml | 4 ++-- meson.build | 4 ++-- subprojects/gtk.wrap | 2 +- subprojects/libadwaita.wrap | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index dd1d8dac7..0cb8d8267 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -22,7 +22,7 @@ variables: fedora-x86_64: extends: .build - image: registry.gitlab.gnome.org/gnome/gnome-software/fedora:v15 + image: registry.gitlab.gnome.org/gnome/gnome-software/fedora:v16 stage: build except: - tags @@ -51,7 +51,7 @@ fedora-x86_64: debian-x86_64: extends: .build - image: registry.gitlab.gnome.org/gnome/gnome-software/debian:v14 + image: registry.gitlab.gnome.org/gnome/gnome-software/debian:v15 stage: build except: - tags diff --git a/meson.build b/meson.build index af85bff8f..198ba82f7 100644 --- a/meson.build +++ b/meson.build @@ -129,7 +129,7 @@ libxmlb = dependency('xmlb', version : '>= 0.1.7', fallback : ['libxmlb', 'libxm gio_unix = dependency('gio-unix-2.0', version : '>= 2.56.0') gmodule = dependency('gmodule-2.0') gtk = dependency('gtk4', - version : '>= 4.12.0', + version : '>= 4.13.4', fallback: ['gtk', 'gtk_dep'], default_options: [ 'build-examples=false', @@ -150,7 +150,7 @@ else libsoupapiversion = '3.0' endif libadwaita = dependency('libadwaita-1', - version: '>=1.4.0', + version: '>=1.5', fallback: ['libadwaita', 'libadwaita_dep'], default_options: [ 'examples=false', diff --git a/subprojects/gtk.wrap b/subprojects/gtk.wrap index a31ab0888..7a59fb314 100644 --- a/subprojects/gtk.wrap +++ b/subprojects/gtk.wrap @@ -1,5 +1,5 @@ [wrap-git] directory=gtk url=https://gitlab.gnome.org/GNOME/gtk.git -revision=4.12.0 +revision=4.13.4 depth=1 diff --git a/subprojects/libadwaita.wrap b/subprojects/libadwaita.wrap index 9f4ae0778..a6c3d6ba6 100644 --- a/subprojects/libadwaita.wrap +++ b/subprojects/libadwaita.wrap @@ -1,5 +1,5 @@ [wrap-git] directory=libadwaita url=https://gitlab.gnome.org/GNOME/libadwaita.git -revision=1.4.0 +revision=1.5.0 depth=1 -- GitLab From eb7e11b401c1ea88fdfb57cb459a7cfeb0ed6dd6 Mon Sep 17 00:00:00 2001 From: Automeris naranja Date: Mon, 15 Apr 2024 20:32:11 -0300 Subject: [PATCH 2/3] application: Port to AdwAboutDialog --- src/gs-application.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gs-application.c b/src/gs-application.c index 72c816d6f..832eb5adf 100644 --- a/src/gs-application.c +++ b/src/gs-application.c @@ -258,7 +258,7 @@ about_activated (GSimpleAction *action, }; #if ADW_CHECK_VERSION(1,2,0) - adw_show_about_window (app->main_window, + adw_show_about_dialog (GTK_WIDGET (app->main_window), "application-name", g_get_application_name (), "application-icon", APPLICATION_ID, "developer-name", _("The GNOME Project"), -- GitLab From b70f043a2369a8456f7b6f525e962077336ad546 Mon Sep 17 00:00:00 2001 From: Automeris naranja Date: Tue, 16 Apr 2024 16:38:15 -0300 Subject: [PATCH 3/3] application: Remove GtkAboutDialog It isn't necessary to fallback to GtkAboutDialog if libadwaita 1.2 is absent. The minimum libadwaita dependency version is already specified in meson.build, which is necessary for building Software successfully. --- src/gs-application.c | 49 +++++++++++++------------------------------- 1 file changed, 14 insertions(+), 35 deletions(-) diff --git a/src/gs-application.c b/src/gs-application.c index 832eb5adf..9b7731acb 100644 --- a/src/gs-application.c +++ b/src/gs-application.c @@ -257,41 +257,20 @@ about_activated (GSimpleAction *action, NULL }; -#if ADW_CHECK_VERSION(1,2,0) - adw_show_about_dialog (GTK_WIDGET (app->main_window), - "application-name", g_get_application_name (), - "application-icon", APPLICATION_ID, - "developer-name", _("The GNOME Project"), - "version", get_version(), - "website", "https://apps.gnome.org/Software", - "support-url", "https://discourse.gnome.org/tag/gnome-software", - "issue-url", "https://gitlab.gnome.org/GNOME/gnome-software/-/issues", - "developers", developers, - "designers", designers, - "copyright", _("Copyright \xc2\xa9 2016–2023 GNOME Software contributors"), - "license-type", GTK_LICENSE_GPL_2_0, - "translator-credits", _("translator-credits"), - NULL); -#else - GtkAboutDialog *dialog; - dialog = GTK_ABOUT_DIALOG (gtk_about_dialog_new ()); - gtk_about_dialog_set_authors (dialog, developers); - gtk_about_dialog_set_copyright (dialog, _("Copyright \xc2\xa9 2016–2023 GNOME Software contributors")); - gtk_about_dialog_set_license_type (dialog, GTK_LICENSE_GPL_2_0); - gtk_about_dialog_set_logo_icon_name (dialog, APPLICATION_ID); - gtk_about_dialog_set_translator_credits (dialog, _("translator-credits")); - gtk_about_dialog_set_version (dialog, get_version ()); - gtk_about_dialog_set_program_name (dialog, g_get_application_name ()); - - /* TRANSLATORS: this is the title of the about window */ - gtk_window_set_title (GTK_WINDOW (dialog), _("About Software")); - - /* TRANSLATORS: well, we seem to think so, anyway */ - gtk_about_dialog_set_comments (dialog, _("A nice way to manage the " - "software on your system.")); - - gs_shell_modal_dialog_present (app->shell, GTK_WINDOW (dialog)); -#endif +adw_show_about_dialog (GTK_WIDGET (app->main_window), + "application-name", g_get_application_name (), + "application-icon", APPLICATION_ID, + "developer-name", _("The GNOME Project"), + "version", get_version(), + "website", "https://apps.gnome.org/Software", + "support-url", "https://discourse.gnome.org/tag/gnome-software", + "issue-url", "https://gitlab.gnome.org/GNOME/gnome-software/-/issues", + "developers", developers, + "designers", designers, + "copyright", _("Copyright \xc2\xa9 2016–2023 GNOME Software contributors"), + "license-type", GTK_LICENSE_GPL_2_0, + "translator-credits", _("translator-credits"), + NULL); } static void -- GitLab