From 2eb98cf8eb707ff23b6457d0eb45979b42ee52cd Mon Sep 17 00:00:00 2001 From: rbuj Date: Tue, 2 Nov 2021 18:11:21 +0100 Subject: gs-theme-manager: reload on menu_tree changed --- src/gs-theme-manager.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/gs-theme-manager.c b/src/gs-theme-manager.c index 6033563..da622a9 100644 --- a/src/gs-theme-manager.c +++ b/src/gs-theme-manager.c @@ -392,12 +392,26 @@ get_themes_tree (void) return themes_tree; } +static void +on_applications_changed (MateMenuTree *menu_tree) +{ + GError *error = NULL; + + if (!matemenu_tree_load_sync (menu_tree, &error)) { + g_debug ("Load matemenu tree got error: %s\n", error->message); + g_error_free (error); + } +} + static void gs_theme_manager_init (GSThemeManager *theme_manager) { theme_manager->priv = gs_theme_manager_get_instance_private (theme_manager); theme_manager->priv->menu_tree = get_themes_tree (); + g_signal_connect (theme_manager->priv->menu_tree, "changed", + G_CALLBACK (on_applications_changed), + NULL); } static void -- cgit v1.2.1