options->color_profile.use_image = TRUE;
options->dnd_icon_size = 48;
+ options->documentation.htmldir = NULL;
+ options->documentation.helpdir = NULL;
options->duplicates_similarity_threshold = 99;
options->enable_metadata_dirs = FALSE;
options->shell.path = g_strdup(GQ_DEFAULT_SHELL_PATH);
options->shell.options = g_strdup(GQ_DEFAULT_SHELL_OPTIONS);
+
+ options->documentation.htmldir = g_strdup(GQ_HTMLDIR);
+ options->documentation.helpdir = g_strdup(GQ_HELPDIR);
for (i = 0; ExifUIList[i].key; i++)
ExifUIList[i].current = ExifUIList[i].default_value;
gchar *command_line;
} html_browser;
} helpers;
+
+ /* Various paths and links to documentation */
+ struct {
+ gchar *helpdir;
+ gchar *htmldir;
+ } documentation;
};
ConfOptions *options;
write_int_option(ssi, (gchar *)ExifUIList[i].key, ExifUIList[i].current);
}
+ WRITE_SUBTITLE("Documentation Options");
+ WRITE_CHAR(documentation.helpdir);
+ WRITE_CHAR(documentation.htmldir);
+
WRITE_SEPARATOR();
WRITE_SEPARATOR();
ExifUIList[i].current = strtol(value, NULL, 10);
continue;
}
+
+ /* Documentation */
+ READ_CHAR(documentation.helpdir);
+ READ_CHAR(documentation.htmldir);
+
}
fclose(f);
static void help_browser_run(void)
{
+ gchar *path;
gchar *result;
gint i;
return;
}
- help_browser_command(result, GQ_HTMLDIR G_DIR_SEPARATOR_S "index.html");
+ path = g_build_filename(options->documentation.htmldir, "index.html", NULL);
+ help_browser_command(result, path);
+ g_free(path);
g_free(result);
}
void help_window_show(const gchar *key)
{
+ gchar *path;
+
if (key && strcmp(key, "html_contents") == 0)
{
help_browser_run();
return;
}
- help_window = help_window_new(_("Help"), GQ_WMCLASS, "help",
- GQ_HELPDIR G_DIR_SEPARATOR_S "README", key);
+ path = g_build_filename(options->documentation.helpdir, "README", NULL);
+ help_window = help_window_new(_("Help"), GQ_WMCLASS, "help", path, key);
+ g_free(path);
g_signal_connect(G_OBJECT(help_window), "destroy",
G_CALLBACK(help_window_destroy_cb), NULL);