Fix broken help menu item on Windows. Add additional directory separator to generated READMEs.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1608 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
parent
64fa4a6388
commit
59bf5cd136
@ -4,13 +4,15 @@
|
||||
symbol list item.
|
||||
* src/build.c: Hide Next Error menu item and unnecessary separator from
|
||||
build menu on Windows.
|
||||
* src/callbacks.c: Fix broken help menu item on Windows.
|
||||
* src/utils.c: Add additional directory separator to generated READMEs.
|
||||
|
||||
|
||||
2007-06-09 Enrico Tröger <enrico.troeger@uvena.de>
|
||||
|
||||
* THANKS, src/document.c:
|
||||
Apply from François Cami and Guillaume Duviol to improve replacement
|
||||
of tabs by spaces (thank you).
|
||||
Apply patch from François Cami and Guillaume Duviol to improve
|
||||
replacement of tabs by spaces (thank you).
|
||||
* src/templates.c: Change PHP short open tag to the full open tag.
|
||||
* src/document.c: Prevent hang if searching for a regular expression
|
||||
fails (closes #1733676).
|
||||
|
||||
@ -1391,13 +1391,19 @@ void
|
||||
on_help1_activate (GtkMenuItem *menuitem,
|
||||
gpointer user_data)
|
||||
{
|
||||
gint skip;
|
||||
gchar *uri;
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
gchar *uri = g_strconcat("file:///", g_path_skip_root(app->docdir), "/index.html", NULL);
|
||||
skip = 8;
|
||||
uri = g_strconcat("file:///", app->docdir, "/index.html", NULL);
|
||||
g_strdelimit(uri, "\\", '/'); // replace '\\' by '/'
|
||||
#else
|
||||
gchar *uri = g_strconcat("file://", app->docdir, "index.html", NULL);
|
||||
skip = 7;
|
||||
uri = g_strconcat("file://", app->docdir, "index.html", NULL);
|
||||
#endif
|
||||
|
||||
if (! g_file_test(uri + 7, G_FILE_TEST_IS_REGULAR))
|
||||
if (! g_file_test(uri + skip, G_FILE_TEST_IS_REGULAR))
|
||||
{ // fall back to online documentation if it is not found on the hard disk
|
||||
g_free(uri);
|
||||
uri = g_strconcat(GEANY_HOMEPAGE, "manual/index.html", NULL);
|
||||
|
||||
@ -812,6 +812,11 @@ gint utils_make_settings_dir(const gchar *dir, const gchar *data_dir, const gcha
|
||||
{ // try to write geany.conf
|
||||
error_nr = access(app->configdir, W_OK);
|
||||
}
|
||||
#ifdef G_OS_WIN32
|
||||
# define DIR_SEP "\\" // on Windows we need an additional dir separator
|
||||
#else
|
||||
# define DIR_SEP ""
|
||||
#endif
|
||||
|
||||
// make subdir for filetype definitions
|
||||
if (error_nr == 0)
|
||||
@ -828,7 +833,7 @@ gint utils_make_settings_dir(const gchar *dir, const gchar *data_dir, const gcha
|
||||
gchar *text = g_strconcat(
|
||||
"Copy files from ", data_dir, " to this directory to overwrite "
|
||||
"them. To use the defaults, just delete the file in this directory.\nFor more information read "
|
||||
"the documentation (in ", doc_dir, "index.html or visit " GEANY_HOMEPAGE ").", NULL);
|
||||
"the documentation (in ", doc_dir, DIR_SEP "index.html or visit " GEANY_HOMEPAGE ").", NULL);
|
||||
utils_write_file(filedefs_readme, text);
|
||||
g_free(text);
|
||||
}
|
||||
@ -849,7 +854,7 @@ gint utils_make_settings_dir(const gchar *dir, const gchar *data_dir, const gcha
|
||||
{
|
||||
gchar *text = g_strconcat(
|
||||
"There are several template files in this directory. For these templates you can use wildcards.\n\
|
||||
For more information read the documentation (in ", doc_dir, "index.html or visit " GEANY_HOMEPAGE ").",
|
||||
For more information read the documentation (in ", doc_dir, DIR_SEP "index.html or visit " GEANY_HOMEPAGE ").",
|
||||
NULL);
|
||||
utils_write_file(templates_readme, text);
|
||||
g_free(text);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user