From ccf2a6f74f2c42ced981c1577e6f6402e9f75361 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Sun, 11 Aug 2013 21:55:42 -0700 Subject: [PATCH] psppire: Relocate icon files also. Otherwise the icons can't be found with --enable-relocatable when the program is not installed in the normal system location. --- src/ui/gui/psppire.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/ui/gui/psppire.c b/src/ui/gui/psppire.c index a183aa6751..d22e289528 100644 --- a/src/ui/gui/psppire.c +++ b/src/ui/gui/psppire.c @@ -225,10 +225,13 @@ create_icon_factory (void) ic->context_name, sizes[r].resolution, sizes[r].resolution, ic->icon_name[i]); - - gtk_icon_source_set_filename (source, filename); + const char *relocated_filename = relocate (filename); + + gtk_icon_source_set_filename (source, relocated_filename); gtk_icon_source_set_size_wildcarded (source, FALSE); gtk_icon_source_set_size (source, sizes[r].size); + if (filename != relocated_filename) + free (CONST_CAST (char *, relocated_filename)); g_free (filename); gtk_icon_set_add_source (icon_set, source); } -- 2.30.2