From: Ben Pfaff Date: Mon, 12 Aug 2013 04:55:42 +0000 (-0700) Subject: psppire: Relocate icon files also. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ccf2a6f74f2c42ced981c1577e6f6402e9f75361;p=pspp 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. --- 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); }