diff options
author | zhuyaliang <[email protected]> | 2023-10-23 16:47:38 +0800 |
---|---|---|
committer | raveit65 <[email protected]> | 2023-10-25 12:19:43 +0200 |
commit | b1331ef7978fdaa11049d9958e4ed279103af570 (patch) | |
tree | 68baf5f0170d14bf3cf13a4665ccc351a4f59635 /capplets/common/mate-theme-test.c | |
parent | 1a837ccdb078c0021588809814bfa80641acc3a8 (diff) | |
download | mate-control-center-b1331ef7978fdaa11049d9958e4ed279103af570.tar.bz2 mate-control-center-b1331ef7978fdaa11049d9958e4ed279103af570.tar.xz |
common: Fix compilation warnings replace deprecated functions gtk_rc_get_theme_dir and gtk_rc_scanner_new
Diffstat (limited to 'capplets/common/mate-theme-test.c')
-rw-r--r-- | capplets/common/mate-theme-test.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/capplets/common/mate-theme-test.c b/capplets/common/mate-theme-test.c index 8e5ed73c..aef052d1 100644 --- a/capplets/common/mate-theme-test.c +++ b/capplets/common/mate-theme-test.c @@ -3,6 +3,22 @@ #include <string.h> #include "mate-theme-info.h" +static gchar * +mate_rc_get_theme_dir (void) +{ + const gchar *var; + gchar *path; + + var = g_getenv ("GTK_DATA_PREFIX"); + + if (var) + path = g_build_filename (var, "share", "themes", NULL); + else + path = g_build_filename (MATEDATADIR, "share", "themes", NULL); + + return path; +} + int main (int argc, char *argv[]) { @@ -71,7 +87,7 @@ main (int argc, char *argv[]) gchar *str; g_print ("No gtk-2 themes were found. The following directories were tested:\n"); - str = gtk_rc_get_theme_dir (); + str = mate_rc_get_theme_dir (); g_print ("\t%s\n", str); g_free (str); str = g_build_filename (g_get_home_dir (), ".themes", NULL); |