Ensure that example_dir is relocatable.
authorJohn Darrington <john@darrington.wattle.id.au>
Fri, 23 Jan 2015 18:23:43 +0000 (19:23 +0100)
committerJohn Darrington <john@darrington.wattle.id.au>
Fri, 23 Jan 2015 18:23:43 +0000 (19:23 +0100)
commit be1157c5591142920a95d587acf97f5eaf3d04fe added a reference to the
installed data directory.  Unfortunately I forgot to allow for relocatable
installations.  This change fixes that.

src/ui/gui/psppire-window.c

index e7dd0315f37c0b05a39ccec5b257622c2ff56de5..c233eaa65d53e01a48a1819dd26c2e02134fd28d 100644 (file)
@@ -15,6 +15,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>. */
 
 #include <config.h>
+#include <gl/relocatable.h>
 
 #include "psppire-window.h"
 #include "psppire-window-base.h"
@@ -766,7 +767,7 @@ psppire_window_open (PsppireWindow *de)
 {
   GtkWidget *dialog = psppire_window_file_chooser_dialog (de);
 
-  gtk_file_chooser_add_shortcut_folder (GTK_FILE_CHOOSER (dialog), examples_dir, NULL);
+  gtk_file_chooser_add_shortcut_folder (GTK_FILE_CHOOSER (dialog), relocate (examples_dir), NULL);
 
   switch (gtk_dialog_run (GTK_DIALOG (dialog)))
     {