+
+ /* See if there is a corresponding graphics file */
+ /* FIXME: hardcoded path */
+ gchar *path = g_path_get_dirname(filename);
+ gchar *scratch = g_path_get_basename(filename);
+ *(strrchr(scratch, '.')) = '\0';
+ gchar *blorbfile = g_strconcat(path, "/../Resources/", scratch, ".blb", NULL);
+ if(g_file_test(blorbfile, G_FILE_TEST_EXISTS)) {
+ g_object_set(glk, "graphics-file", blorbfile, NULL);
+ g_printerr("Setting graphics file to %s\n", blorbfile);
+ }
+ g_free(blorbfile);
+ g_free(path);
+ g_free(scratch);
+
+ path = gtk_file_chooser_get_current_folder(GTK_FILE_CHOOSER(dialog));
+ if(path) {
+ g_settings_set(state_settings, "last-open-path", "ms", path);
+ g_free(path);
+ }