diff --git a/0001-crash-with-broken-theme.patch b/0001-crash-with-broken-theme.patch index fd37e80..ddbef4a 100644 --- a/0001-crash-with-broken-theme.patch +++ b/0001-crash-with-broken-theme.patch @@ -1,29 +1,22 @@ -From 3a644c151f27f439c36170f0958fd21cf1cc54d0 Mon Sep 17 00:00:00 2001 -From: Milan Crha -Date: Thu, 3 Jun 2021 08:33:53 +0200 Subject: [PATCH] gs-feature-tile: Do not abort when the theme is broken Just print a warning when the theme doesn't provide 'theme_fg_color' and fallback to black color. Closes https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1228 ---- - src/gs-feature-tile.c | 14 +++++++++++--- - 1 file changed, 11 insertions(+), 3 deletions(-) -diff --git a/src/gs-feature-tile.c b/src/gs-feature-tile.c -index 1c85083eb..158af1e56 100644 ---- a/src/gs-feature-tile.c -+++ b/src/gs-feature-tile.c -@@ -268,7 +268,6 @@ gs_feature_tile_refresh (GsAppTile *self) +diff -up gnome-software-42.rc/src/gs-feature-tile.c.1 gnome-software-42.rc/src/gs-feature-tile.c +--- gnome-software-42.rc/src/gs-feature-tile.c.1 2022-03-04 16:23:58.566735700 +0100 ++++ gnome-software-42.rc/src/gs-feature-tile.c 2022-03-07 08:06:29.046595524 +0100 +@@ -411,7 +411,6 @@ gs_feature_tile_refresh (GsAppTile *self if (key_colors != tile->key_colors_cache) { g_autoptr(GArray) colors = NULL; GdkRGBA fg_rgba; - gboolean fg_rgba_valid; GsHSBC fg_hsbc; - - /* Look up the foreground colour for the feature tile, -@@ -283,8 +282,17 @@ gs_feature_tile_refresh (GsAppTile *self) + const GsHSBC *chosen_hsbc; + GsHSBC chosen_hsbc_modified; +@@ -429,8 +428,17 @@ gs_feature_tile_refresh (GsAppTile *self * @min_abs_contrast contrast with the foreground, so * that the text is legible. */ @@ -43,6 +36,3 @@ index 1c85083eb..158af1e56 100644 gtk_rgb_to_hsv (fg_rgba.red, fg_rgba.green, fg_rgba.blue, &fg_hsbc.hue, &fg_hsbc.saturation, &fg_hsbc.brightness); --- -GitLab - diff --git a/0002-shell-setup-order.patch b/0002-shell-setup-order.patch new file mode 100644 index 0000000..c0ba76b --- /dev/null +++ b/0002-shell-setup-order.patch @@ -0,0 +1,134 @@ +diff --git a/lib/gs-appstream.c b/lib/gs-appstream.c +index 38cc31bb5..c73adce6d 100644 +--- a/lib/gs-appstream.c ++++ b/lib/gs-appstream.c +@@ -1626,12 +1626,12 @@ gs_appstream_add_categories (XbSilo *silo, + for (guint k = 0; k < groups->len; k++) { + const gchar *group = g_ptr_array_index (groups, k); + guint cnt = gs_appstream_count_component_for_groups (silo, group); +- for (guint l = 0; l < cnt; l++) { +- gs_category_increment_size (parent); ++ if (cnt > 0) { ++ gs_category_increment_size (parent, cnt); + if (children->len > 1) { + /* Parent category has multiple groups, so increment + * each group's size too */ +- gs_category_increment_size (cat); ++ gs_category_increment_size (cat, cnt); + } + } + } +diff --git a/lib/gs-category.c b/lib/gs-category.c +index b311c4941..4baede3bc 100644 +--- a/lib/gs-category.c ++++ b/lib/gs-category.c +@@ -147,17 +147,19 @@ gs_category_set_size (GsCategory *category, guint size) + /** + * gs_category_increment_size: + * @category: a #GsCategory ++ * @value: how many to add + * +- * Adds one to the size count if an application is available ++ * Adds @value to the size count. + * + * Since: 3.22 + **/ + void +-gs_category_increment_size (GsCategory *category) ++gs_category_increment_size (GsCategory *category, ++ guint value) + { + g_return_if_fail (GS_IS_CATEGORY (category)); + +- category->size++; ++ category->size += value; + g_object_notify_by_pspec (G_OBJECT (category), obj_props[PROP_SIZE]); + } + +diff --git a/lib/gs-category.h b/lib/gs-category.h +index ecd2e1e23..1e82591aa 100644 +--- a/lib/gs-category.h ++++ b/lib/gs-category.h +@@ -39,6 +39,7 @@ GsCategory *gs_category_find_child (GsCategory *category, + GPtrArray *gs_category_get_children (GsCategory *category); + + guint gs_category_get_size (GsCategory *category); +-void gs_category_increment_size (GsCategory *category); ++void gs_category_increment_size (GsCategory *category, ++ guint value); + + G_END_DECLS +diff --git a/src/gs-shell.c b/src/gs-shell.c +index db449a9b0..796d7b05a 100644 +--- a/src/gs-shell.c ++++ b/src/gs-shell.c +@@ -107,6 +107,7 @@ struct _GsShell + GtkWidget *primary_menu; + GtkWidget *sub_page_header_title; + ++ gboolean active_after_setup; + gboolean is_narrow; + guint allocation_changed_cb_id; + +@@ -165,6 +166,12 @@ gs_shell_modal_dialog_present (GsShell *shell, GtkWindow *window) + void + gs_shell_activate (GsShell *shell) + { ++ /* Waiting for plugin loader to setup first */ ++ if (shell->plugin_loader == NULL) { ++ shell->active_after_setup = TRUE; ++ return; ++ } ++ + gtk_widget_show (GTK_WIDGET (shell)); + gtk_window_present (GTK_WINDOW (shell)); + } +@@ -2237,6 +2244,11 @@ gs_shell_setup (GsShell *shell, GsPluginLoader *plugin_loader, GCancellable *can + if (g_settings_get_boolean (shell->settings, "first-run")) + g_settings_set_boolean (shell->settings, "first-run", FALSE); + } ++ ++ if (shell->active_after_setup) { ++ shell->active_after_setup = FALSE; ++ gs_shell_activate (shell); ++ } + } + + void +diff --git a/src/gs-application.c b/src/gs-application.c +index e3f5f55c7..bdadd5c34 100644 +--- a/src/gs-application.c ++++ b/src/gs-application.c +@@ -968,12 +968,9 @@ gs_application_startup (GApplication *application) + G_CALLBACK (gs_application_shell_loaded_cb), + app); + +- gs_shell_setup (app->shell, app->plugin_loader, app->cancellable); + app->main_window = GTK_WINDOW (app->shell); + gtk_application_add_window (GTK_APPLICATION (app), app->main_window); + +- app->update_monitor = gs_update_monitor_new (app, app->plugin_loader); +- + gs_application_update_software_sources_presence (application); + + /* Set up the plugins. */ +@@ -990,6 +987,7 @@ startup_cb (GObject *source_object, + GAsyncResult *result, + gpointer user_data) + { ++ GsApplication *app = GS_APPLICATION (user_data); + GsPluginLoader *plugin_loader = GS_PLUGIN_LOADER (source_object); + g_autoptr(GError) local_error = NULL; + +@@ -1002,6 +1000,11 @@ startup_cb (GObject *source_object, + + /* show the priority of each plugin */ + gs_plugin_loader_dump_state (plugin_loader); ++ ++ /* Setup the shell only after the plugin loader finished its setup, ++ thus all plugins are loaded and ready for the jobs. */ ++ gs_shell_setup (app->shell, app->plugin_loader, app->cancellable); ++ app->update_monitor = gs_update_monitor_new (app, app->plugin_loader); + } + + static void diff --git a/0008-gs-removal-dialog-crrect-property-name.patch b/0008-gs-removal-dialog-crrect-property-name.patch new file mode 100644 index 0000000..f800b2c --- /dev/null +++ b/0008-gs-removal-dialog-crrect-property-name.patch @@ -0,0 +1,13 @@ +diff --git a/src/gs-removal-dialog.ui b/src/gs-removal-dialog.ui +index 298900eb2..0cff1321a 100644 +--- a/src/gs-removal-dialog.ui ++++ b/src/gs-removal-dialog.ui +@@ -1,7 +1,7 @@ + + +