Revision: 1108
http://geeqie.svn.sourceforge.net/geeqie/?rev=1108&view=rev
Author: zas_
Date: 2008-08-30 10:39:35 +0000 (Sat, 30 Aug 2008)
Log Message:
-----------
Allow to override documentation paths through options:
- documentation.helpdir
- documentation.htmldir
Default values are set at configure time.
Modified Paths:
--------------
trunk/src/options.c
trunk/src/options.h
trunk/src/rcfile.c
trunk/src/window.c
Modified: trunk/src/options.c
===================================================================
--- trunk/src/options.c 2008-08-29 20:53:53 UTC (rev 1107)
+++ trunk/src/options.c 2008-08-30 10:39:35 UTC (rev 1108)
@@ -37,6 +37,8 @@
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;
@@ -199,6 +201,9 @@
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;
Modified: trunk/src/options.h
===================================================================
--- trunk/src/options.h 2008-08-29 20:53:53 UTC (rev 1107)
+++ trunk/src/options.h 2008-08-30 10:39:35 UTC (rev 1108)
@@ -246,6 +246,12 @@
gchar *command_line;
} html_browser;
} helpers;
+
+ /* Various paths and links to documentation */
+ struct {
+ gchar *helpdir;
+ gchar *htmldir;
+ } documentation;
};
ConfOptions *options;
Modified: trunk/src/rcfile.c
===================================================================
--- trunk/src/rcfile.c 2008-08-29 20:53:53 UTC (rev 1107)
+++ trunk/src/rcfile.c 2008-08-30 10:39:35 UTC (rev 1108)
@@ -617,6 +617,10 @@
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();
@@ -980,6 +984,11 @@
ExifUIList[i].current = strtol(value,
NULL, 10);
continue;
}
+
+ /* Documentation */
+ READ_CHAR(documentation.helpdir);
+ READ_CHAR(documentation.htmldir);
+
}
fclose(f);
Modified: trunk/src/window.c
===================================================================
--- trunk/src/window.c 2008-08-29 20:53:53 UTC (rev 1107)
+++ trunk/src/window.c 2008-08-30 10:39:35 UTC (rev 1108)
@@ -177,6 +177,7 @@
static void help_browser_run(void)
{
+ gchar *path;
gchar *result;
gint i;
@@ -195,7 +196,9 @@
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);
}
@@ -215,6 +218,8 @@
void help_window_show(const gchar *key)
{
+ gchar *path;
+
if (key && strcmp(key, "html_contents") == 0)
{
help_browser_run();
@@ -228,8 +233,9 @@
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);
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geeqie-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geeqie-svn