From f348263273c9329d2f9500a57d4ab75e51cca60f Mon Sep 17 00:00:00 2001 From: rbuj Date: Thu, 30 Jan 2020 20:28:03 +0100 Subject: appearance: backgrounds dir should be portable --- capplets/appearance/Makefile.am | 4 +++- capplets/appearance/appearance-desktop.c | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/capplets/appearance/Makefile.am b/capplets/appearance/Makefile.am index 500fcc64..9a32243d 100644 --- a/capplets/appearance/Makefile.am +++ b/capplets/appearance/Makefile.am @@ -46,6 +46,7 @@ mate_appearance_properties_LDFLAGS = -export-dynamic gtkbuilderdir = $(pkgdatadir)/ui pixmapdir = $(pkgdatadir)/pixmaps wallpaperdir = $(datadir)/mate-background-properties +backgrounddir = $(datadir)/backgrounds AM_CPPFLAGS = \ $(MARCO_CFLAGS) \ @@ -55,7 +56,8 @@ AM_CPPFLAGS = \ -DMATECC_DATA_DIR="\"$(pkgdatadir)\"" \ -DMATECC_GTKBUILDER_DIR="\"$(gtkbuilderdir)\"" \ -DMATECC_PIXMAP_DIR="\"$(pixmapdir)\"" \ - -DWALLPAPER_DATADIR="\"$(wallpaperdir)\"" + -DWALLPAPER_DATADIR="\"$(wallpaperdir)\"" \ + -DBACKGROUND_DATADIR="\"$(backgrounddir)\"" CLEANFILES = $(MATECC_CAPPLETS_CLEANFILES) diff --git a/capplets/appearance/appearance-desktop.c b/capplets/appearance/appearance-desktop.c index 89e6fef2..b8b16e7c 100644 --- a/capplets/appearance/appearance-desktop.c +++ b/capplets/appearance/appearance-desktop.c @@ -627,10 +627,10 @@ wp_create_filechooser (AppearanceData *data) start_dir = g_get_home_dir (); - if (g_file_test ("/usr/share/backgrounds", G_FILE_TEST_IS_DIR)) { + if (g_file_test (BACKGROUND_DATADIR, G_FILE_TEST_IS_DIR)) { gtk_file_chooser_add_shortcut_folder (data->wp_filesel, - "/usr/share/backgrounds", NULL); - start_dir = "/usr/share/backgrounds"; + BACKGROUND_DATADIR, NULL); + start_dir = BACKGROUND_DATADIR; } pictures = g_get_user_special_dir (G_USER_DIRECTORY_PICTURES); -- cgit v1.2.1