[gnome-control-center] default-apps: switch away from deprecated function



commit ea635be5325d682ebdce8e45271baaf400938aec
Author: Amy <apark0006 student cerritos edu>
Date:   Fri Jun 10 00:22:38 2022 +0000

    default-apps: switch away from deprecated function
    
    cc-default-apps-panel.c:101 uses g_pattern_match_string, which is now
    considered deprecated in Glib. It is better to use the 2.70+
    g_pattern_spec_match_string, which works as a drop-in replacement. This
    helps with function organization, as the original was created as a
    general Glib function while g_pattern_spec_match_string works under the
    PatternSpec module.
    
    This patch swaps the usage to the newer function, creating no functional
    difference and resolving a deprecated functions warning.

 panels/default-apps/cc-default-apps-panel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/panels/default-apps/cc-default-apps-panel.c b/panels/default-apps/cc-default-apps-panel.c
index aa88f2566..5949fab72 100644
--- a/panels/default-apps/cc-default-apps-panel.c
+++ b/panels/default-apps/cc-default-apps-panel.c
@@ -98,7 +98,7 @@ default_app_changed (CcDefaultAppsPanel  *self,
           for (j = 0; j < patterns->len; j++)
             {
               GPatternSpec *pattern = g_ptr_array_index (patterns, j);
-              if (g_pattern_match_string (pattern, mime_types[i]))
+              if (g_pattern_spec_match_string (pattern, mime_types[i]))
                 matched = TRUE;
             }
           if (!matched)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]