Revision: 2659
http://geany.svn.sourceforge.net/geany/?rev=2659&view=rev
Author: eht16
Date: 2008-06-08 05:18:20 -0700 (Sun, 08 Jun 2008)
Log Message:
-----------
Fix two ambiguous encoding names for better compatibility with libiconv (closes #1986134).
Improve the regular expression for detecting encoding cookies to allow more variants (e.g. "encoding: utf-8").
Modified Paths:
--------------
trunk/ChangeLog
trunk/doc/geany.html
trunk/doc/geany.txt
trunk/src/encodings.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2008-06-07 11:42:31 UTC (rev 2658)
+++ trunk/ChangeLog 2008-06-08 12:18:20 UTC (rev 2659)
@@ -1,3 +1,12 @@
+2008-06-08 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
+
+ * doc/geany.html, doc/geany.html, src/encodings.c:
+ Fix two ambiguous encoding names for better compatibility with
+ libiconv (closes #1986134).
+ Improve the regular expression for detecting encoding cookies to
+ allow more variants (e.g. "encoding: utf-8").
+
+
2008-06-07 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
* src/prefs.c: Update of a string for adding a missing full stop.
Modified: trunk/doc/geany.html
===================================================================
--- trunk/doc/geany.html 2008-06-07 11:42:31 UTC (rev 2658)
+++ trunk/doc/geany.html 2008-06-08 12:18:20 UTC (rev 2659)
@@ -804,13 +804,20 @@
characters are around the string " geany_encoding=ISO-8859-15 " as long
as there is at least one whitespace character before and after this
string. Whitespace characters are in this case a space or tab character.
-"geany_encoding" must be in lower-case, the charset string is
-case-independent. There must <strong>not</strong> be any whitespace between
-"geany_encoding", the "=" sign and the charset.
An example to use this could be you have a file with ISO-8859-15
encoding but Geany constantly detects the file encoding as ISO-8859-1.
Then you simply add such a line to the file and Geany will open it
correctly the next time.</p>
+<p>Since Geany 0.15 you can also use lines like:</p>
+<pre class="literal-block">
+# encoding = ISO-8859-15
+</pre>
+<p>or:</p>
+<pre class="literal-block">
+# coding: ISO-8859-15
+</pre>
+<p>The used regular expression to find the encoding string is:
+<tt class="docutils literal"><span class="pre">coding[\t</span> <span class="pre">]*[:=][\t</span> <span class="pre">]*([a-z0-9-]+)[\t</span> <span class="pre">]*</span></tt></p>
<div class="note">
<p class="first admonition-title">Note</p>
<p class="last">These specifications must be in the first 512 bytes of the file.
@@ -4117,7 +4124,7 @@
<div class="footer">
<hr class="footer" />
<a class="reference" href="geany.txt">View document source</a>.
-Generated on: 2008-05-28 15:34 UTC.
+Generated on: 2008-06-08 12:16 UTC.
Generated by <a class="reference" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source.
</div>
Modified: trunk/doc/geany.txt
===================================================================
--- trunk/doc/geany.txt 2008-06-07 11:42:31 UTC (rev 2658)
+++ trunk/doc/geany.txt 2008-06-08 12:18:20 UTC (rev 2659)
@@ -469,14 +469,22 @@
characters are around the string " geany_encoding=ISO-8859-15 " as long
as there is at least one whitespace character before and after this
string. Whitespace characters are in this case a space or tab character.
-"geany_encoding" must be in lower-case, the charset string is
-case-independent. There must **not** be any whitespace between
-"geany_encoding", the "=" sign and the charset.
An example to use this could be you have a file with ISO-8859-15
encoding but Geany constantly detects the file encoding as ISO-8859-1.
Then you simply add such a line to the file and Geany will open it
correctly the next time.
+Since Geany 0.15 you can also use lines like::
+
+ # encoding = ISO-8859-15
+
+or::
+
+ # coding: ISO-8859-15
+
+The used regular expression to find the encoding string is:
+``coding[\t ]*[:=][\t ]*([a-z0-9-]+)[\t ]*``
+
.. note::
These specifications must be in the first 512 bytes of the file.
Anything after the first 512 bytes will not be recognised.
Modified: trunk/src/encodings.c
===================================================================
--- trunk/src/encodings.c 2008-06-07 11:42:31 UTC (rev 2658)
+++ trunk/src/encodings.c 2008-06-08 12:18:20 UTC (rev 2659)
@@ -51,8 +51,8 @@
# endif
/* <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> */
# define PATTERN_HTMLMETA "<meta[ \t\n\r\f]http-equiv[ \t\n\r\f]*=[ \t\n\r\f]*\"content-type\"[ \t\n\r\f]+content[ \t\n\r\f]*=[ \t\n\r\f]*\"text/x?html;[ \t\n\r\f]*charset=([a-z0-9_-]+)\"[ \t\n\r\f]*/?>"
-/* " geany_encoding=utf-8 " */
-# define PATTERN_GEANY "[\t ]geany_encoding=([a-z0-9-]+)[\t ]"
+/* " geany_encoding=utf-8 " or " coding: utf-8 " */
+# define PATTERN_CODING "coding[\t ]*[:=][\t ]*([a-z0-9-]+)[\t ]*"
/* precompiled regexps */
static regex_t pregs[2];
static gboolean pregs_loaded = FALSE;
@@ -89,17 +89,19 @@
fill(5, EASTEUROPEAN, GEANY_ENCODING_WINDOWS_1250, "WINDOWS-1250", _("Central European"));
fill(6, EASTEUROPEAN, GEANY_ENCODING_IBM_855, "IBM855", _("Cyrillic"));
fill(7, EASTEUROPEAN, GEANY_ENCODING_ISO_8859_5, "ISO-8859-5", _("Cyrillic"));
+ /* ISO-IR-111 not available on Windows */
fill(8, EASTEUROPEAN, GEANY_ENCODING_ISO_IR_111, "ISO-IR-111", _("Cyrillic"));
- fill(9, EASTEUROPEAN, GEANY_ENCODING_KOI8_R, "KOI8R", _("Cyrillic"));
+ fill(9, EASTEUROPEAN, GEANY_ENCODING_KOI8_R, "KOI8-R", _("Cyrillic"));
fill(10, EASTEUROPEAN, GEANY_ENCODING_WINDOWS_1251, "WINDOWS-1251", _("Cyrillic"));
fill(11, EASTEUROPEAN, GEANY_ENCODING_CP_866, "CP866", _("Cyrillic/Russian"));
- fill(12, EASTEUROPEAN, GEANY_ENCODING_KOI8_U, "KOI8U", _("Cyrillic/Ukrainian"));
+ fill(12, EASTEUROPEAN, GEANY_ENCODING_KOI8_U, "KOI8-U", _("Cyrillic/Ukrainian"));
fill(13, EASTEUROPEAN, GEANY_ENCODING_ISO_8859_16, "ISO-8859-16", _("Romanian"));
fill(0, MIDDLEEASTERN, GEANY_ENCODING_IBM_864, "IBM864", _("Arabic"));
fill(1, MIDDLEEASTERN, GEANY_ENCODING_ISO_8859_6, "ISO-8859-6", _("Arabic"));
fill(2, MIDDLEEASTERN, GEANY_ENCODING_WINDOWS_1256, "WINDOWS-1256", _("Arabic"));
fill(3, MIDDLEEASTERN, GEANY_ENCODING_IBM_862, "IBM862", _("Hebrew"));
+ /* not available at all, ? */
fill(4, MIDDLEEASTERN, GEANY_ENCODING_ISO_8859_8_I, "ISO-8859-8-I", _("Hebrew"));
fill(5, MIDDLEEASTERN, GEANY_ENCODING_WINDOWS_1255, "WINDOWS-1255", _("Hebrew"));
fill(6, MIDDLEEASTERN, GEANY_ENCODING_ISO_8859_8, "ISO-8859-8", _("Hebrew Visual"));
@@ -126,6 +128,7 @@
fill(0, EASTASIAN, GEANY_ENCODING_GB18030, "GB18030", _("Chinese Simplified"));
fill(1, EASTASIAN, GEANY_ENCODING_GB2312, "GB2312", _("Chinese Simplified"));
fill(2, EASTASIAN, GEANY_ENCODING_GBK, "GBK", _("Chinese Simplified"));
+ /* maybe not available on Linux */
fill(3, EASTASIAN, GEANY_ENCODING_HZ, "HZ", _("Chinese Simplified"));
fill(4, EASTASIAN, GEANY_ENCODING_BIG5, "BIG5", _("Chinese Traditional"));
fill(5, EASTASIAN, GEANY_ENCODING_BIG5_HKSCS, "BIG5-HKSCS", _("Chinese Traditional"));
@@ -324,7 +327,7 @@
if (! pregs_loaded)
{
regex_compile(&pregs[0], PATTERN_HTMLMETA);
- regex_compile(&pregs[1], PATTERN_GEANY);
+ regex_compile(&pregs[1], PATTERN_CODING);
pregs_loaded = TRUE;
}
#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 2658
http://geany.svn.sourceforge.net/geany/?rev=2658&view=rev
Author: frlan
Date: 2008-06-07 04:42:31 -0700 (Sat, 07 Jun 2008)
Log Message:
-----------
Little update of a string
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/prefs.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2008-06-07 11:30:09 UTC (rev 2657)
+++ trunk/ChangeLog 2008-06-07 11:42:31 UTC (rev 2658)
@@ -1,3 +1,8 @@
+2008-06-07 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
+
+ * src/prefs.c: Update of a string for adding a missing full stop.
+
+
2008-06-06 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* src/ui_utils.c:
Modified: trunk/src/prefs.c
===================================================================
--- trunk/src/prefs.c 2008-06-07 11:30:09 UTC (rev 2657)
+++ trunk/src/prefs.c 2008-06-07 11:42:31 UTC (rev 2658)
@@ -1126,7 +1126,7 @@
GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, NULL);
str = g_strdup_printf(
- _("Type the combination of the keys you want to use for \"%s\""), name);
+ _("Type the combination of the keys you want to use for \"%s\"."), name);
label = gtk_label_new(str);
gtk_misc_set_padding(GTK_MISC(label), 5, 10);
gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), label);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 2657
http://geany.svn.sourceforge.net/geany/?rev=2657&view=rev
Author: frlan
Date: 2008-06-07 04:30:09 -0700 (Sat, 07 Jun 2008)
Log Message:
-----------
Update of German translation
Modified Paths:
--------------
trunk/po/ChangeLog
trunk/po/de.po
Modified: trunk/po/ChangeLog
===================================================================
--- trunk/po/ChangeLog 2008-06-06 16:53:48 UTC (rev 2656)
+++ trunk/po/ChangeLog 2008-06-07 11:30:09 UTC (rev 2657)
@@ -1,3 +1,9 @@
+2008-06-07 Frank Lanitz <frank(a)frank.uvena.de>
+
+ * de.po: Little update of German translation to improve understanding
+ a string. Thanks to Enrico Tröger and Dominic Hopf.
+
+
2008-05-24 Frank Lanitz <frank(a)frank.uvena.de>
* ru.po: Update of Russian translation. Thanks to stat.c for input.
Modified: trunk/po/de.po
===================================================================
--- trunk/po/de.po 2008-06-06 16:53:48 UTC (rev 2656)
+++ trunk/po/de.po 2008-06-07 11:30:09 UTC (rev 2657)
@@ -6,7 +6,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: geany 0.14\n"
+"Project-Id-Version: geany 0.15svn\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2008-04-10 22:57+0200\n"
"PO-Revision-Date: 2008-04-09 23:06+0100\n"
@@ -3153,7 +3153,7 @@
#: ../src/prefs.c:1093
#, c-format
msgid "Type the combination of the keys you want to use for \"%s\""
-msgstr "Welche Tastenkombination soll für \"%s\" benutzt werden?"
+msgstr "Drücken Sie die gewünschte Tastenkombination für \"%s\"."
#: ../src/prefs.c:1280
msgid "_Override"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 2656
http://geany.svn.sourceforge.net/geany/?rev=2656&view=rev
Author: ntrel
Date: 2008-06-06 09:53:48 -0700 (Fri, 06 Jun 2008)
Log Message:
-----------
Revert use of SCN_PAINTED - this is called much more often than
SCN_UPDATEUI and slows down Geany.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/editor.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2008-06-06 16:38:34 UTC (rev 2655)
+++ trunk/ChangeLog 2008-06-06 16:53:48 UTC (rev 2656)
@@ -23,6 +23,9 @@
Also fix the document last_check assignment so that the disk is only
polled every file_prefs.disk_check_timeout seconds (not sure how
this got missing - maybe it was my fault?).
+ * src/editor.c:
+ Revert use of SCN_PAINTED - this is called much more often than
+ SCN_UPDATEUI and slows down Geany.
2008-06-05 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/src/editor.c
===================================================================
--- trunk/src/editor.c 2008-06-06 16:38:34 UTC (rev 2655)
+++ trunk/src/editor.c 2008-06-06 16:53:48 UTC (rev 2656)
@@ -171,16 +171,19 @@
}
-/* Called before Scintilla repaints.
- * Note: Any GUI updates that don't affect scintilla should be done in on_painted(). */
static void on_update_ui(gint idx, G_GNUC_UNUSED SCNotification *nt)
{
ScintillaObject *sci = documents[idx]->sci;
gint pos = sci_get_current_position(sci);
+ /* undo / redo menu update */
+ ui_update_popup_reundo_items(idx);
+
/* brace highlighting */
editor_highlight_braces(sci, pos);
+ ui_update_statusbar(idx, pos);
+
/* Visible lines are only laid out accurately once [SCN_UPDATEUI] is sent,
* so we need to only call sci_scroll_to_line here, because the document
* may have line wrapping and folding enabled.
@@ -207,20 +210,6 @@
}
-/* Any GUI updates that don't affect scintilla should be done here to
- * appear more responsive to typing. */
-static void on_painted(gint idx, G_GNUC_UNUSED SCNotification *nt)
-{
- ScintillaObject *sci = documents[idx]->sci;
- gint pos = sci_get_current_position(sci);
-
- /* undo / redo menu update */
- ui_update_popup_reundo_items(idx);
-
- ui_update_statusbar(idx, pos);
-}
-
-
static void check_line_breaking(gint idx, gint pos, gchar c)
{
GeanyDocument *doc = documents[idx];
@@ -467,10 +456,6 @@
on_update_ui(idx, nt);
break;
- case SCN_PAINTED:
- on_painted(idx, nt);
- break;
-
case SCN_MODIFIED:
{
if (nt->modificationType & SC_STARTACTION && ! ignore_callback)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 2655
http://geany.svn.sourceforge.net/geany/?rev=2655&view=rev
Author: eht16
Date: 2008-06-06 09:38:34 -0700 (Fri, 06 Jun 2008)
Log Message:
-----------
Remove unused imports.
Remove hacks for Doxyfile.in and geany.desktop.in.
Move htmldoc and apidoc targets into shutdown().
Modified Paths:
--------------
trunk/ChangeLog
trunk/wscript
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2008-06-06 14:53:40 UTC (rev 2654)
+++ trunk/ChangeLog 2008-06-06 16:38:34 UTC (rev 2655)
@@ -8,7 +8,11 @@
process it only once.
* plugins/vcdiff.c:
Fix diff output when files were manually added with 'git add'
- in GIT repositories (patch by Yura Siamashka).
+ in GIT repositories (patch by Yura Siamashka, thanks).
+ * wscript:
+ Remove unused imports.
+ Remove hacks for Doxyfile.in and geany.desktop.in.
+ Move htmldoc and apidoc targets into shutdown().
2008-06-06 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: trunk/wscript
===================================================================
--- trunk/wscript 2008-06-06 14:53:40 UTC (rev 2654)
+++ trunk/wscript 2008-06-06 16:38:34 UTC (rev 2655)
@@ -38,8 +38,8 @@
"""
-import Params, Configure, Common, Runner, misc, Options
-import sys, os, subprocess
+import Params, Configure, Common, Runner, misc
+import sys, os, subprocess, shutil
APPNAME = 'geany'
@@ -199,6 +199,7 @@
def build(bld):
def build_update_po(bld):
+ # TODO: rework this code to not alter .po files on normal build
# the following code was taken from midori's WAF script, thanks
os.chdir('./po')
try:
@@ -283,11 +284,6 @@
build_plugin('htmlchars')
build_plugin('vcdiff')
- # little hack'ish: hard link geany.desktop.in.in to geany.desktop.in as intltool_in doesn't
- # like a .desktop.in.in but we want to keep it for autotools compatibility
- if not os.path.exists('geany.desktop.in'):
- os.link('geany.desktop.in.in', 'geany.desktop.in')
-
# geany.desktop
obj = bld.create_obj('intltool_in')
obj.source = 'geany.desktop.in'
@@ -383,23 +379,16 @@
print 'Icon cache not updated. After install, run this:'
print 'gtk-update-icon-cache -q -f -t %s' % dir
-
-def init():
if Params.g_options.apidoc:
- # FIXME remove this very ugly hack and find a way to generate the
- # Doxyfile in doc/ and not in build/doc/
- if not os.path.exists('doc/Doxyfile'):
- os.symlink(os.path.abspath(blddir) + '/default/doc/Doxyfile', 'doc/Doxyfile')
-
+ doxyfile = os.path.join(Params.g_build.m_srcnode.abspath( \
+ Params.g_build.env()), 'doc', 'Doxyfile')
os.chdir('doc')
- ret = launch('doxygen', 'Generating API reference documentation')
- sys.exit(ret)
+ launch('doxygen ' + doxyfile, 'Generating API reference documentation')
if Params.g_options.htmldoc:
os.chdir('doc')
- ret = launch('rst2html -stg --stylesheet=geany.css geany.txt geany.html',
+ launch('rst2html -stg --stylesheet=geany.css geany.txt geany.html',
'Generating HTML documentation')
- sys.exit(ret)
# Simple function to execute a command and print its exit status
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 2653
http://geany.svn.sourceforge.net/geany/?rev=2653&view=rev
Author: eht16
Date: 2008-06-06 07:27:08 -0700 (Fri, 06 Jun 2008)
Log Message:
-----------
Rename geany.desktop.in.in in geany.desktop.in as we need to process it only once.
Modified Paths:
--------------
trunk/ChangeLog
trunk/Makefile.am
trunk/configure.in
Added Paths:
-----------
trunk/geany.desktop.in
Removed Paths:
-------------
trunk/geany.desktop.in.in
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2008-06-06 14:17:16 UTC (rev 2652)
+++ trunk/ChangeLog 2008-06-06 14:27:08 UTC (rev 2653)
@@ -3,6 +3,9 @@
* src/ui_utils.c:
Display current file position in the status bar when compiled
with GEANY_DEBUG.
+ * configure.in, Makefile.am, geany.desktop.in.in, geany.desktop.in:
+ Rename geany.desktop.in.in in geany.desktop.in as we need to
+ process it only once.
2008-06-06 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: trunk/Makefile.am
===================================================================
--- trunk/Makefile.am 2008-06-06 14:17:16 UTC (rev 2652)
+++ trunk/Makefile.am 2008-06-06 14:27:08 UTC (rev 2653)
@@ -104,6 +104,6 @@
pkgconfigdir = $(libdir)/pkgconfig
desktopdir = $(datadir)/applications
-desktop_in_files = geany.desktop.in
+desktop_in_files = geany.desktop
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
@INTLTOOL_DESKTOP_RULE@
Modified: trunk/configure.in
===================================================================
--- trunk/configure.in 2008-06-06 14:17:16 UTC (rev 2652)
+++ trunk/configure.in 2008-06-06 14:27:08 UTC (rev 2653)
@@ -255,7 +255,6 @@
doc/Makefile
doc/geany.1
geany.spec
-geany.desktop.in
geany.pc
doc/Doxyfile
])
Copied: trunk/geany.desktop.in (from rev 2649, trunk/geany.desktop.in.in)
===================================================================
--- trunk/geany.desktop.in (rev 0)
+++ trunk/geany.desktop.in 2008-06-06 14:27:08 UTC (rev 2653)
@@ -0,0 +1,12 @@
+[Desktop Entry]
+Type=Application
+Version=1.0
+_Name=Geany
+_GenericName=Integrated Development Environment
+_Comment=A fast and lightweight IDE using GTK2
+Exec=geany %F
+Icon=geany
+Terminal=false
+Categories=GTK;Development;IDE;
+MimeType=text/plain;text/x-chdr;text/x-csrc;text/x-c++hdr;text/x-c++src;text/x-java;text/x-dsrc;text/x-pascal;text/x-perl;text/x-python;application/x-php;application/x-httpd-php*;application/xml;text/html;text/css;text/x-sql;text/x-diff;
+StartupNotify=true
Deleted: trunk/geany.desktop.in.in
===================================================================
--- trunk/geany.desktop.in.in 2008-06-06 14:17:16 UTC (rev 2652)
+++ trunk/geany.desktop.in.in 2008-06-06 14:27:08 UTC (rev 2653)
@@ -1,12 +0,0 @@
-[Desktop Entry]
-Type=Application
-Version=1.0
-_Name=Geany
-_GenericName=Integrated Development Environment
-_Comment=A fast and lightweight IDE using GTK2
-Exec=geany %F
-Icon=geany
-Terminal=false
-Categories=GTK;Development;IDE;
-MimeType=text/plain;text/x-chdr;text/x-csrc;text/x-c++hdr;text/x-c++src;text/x-java;text/x-dsrc;text/x-pascal;text/x-perl;text/x-python;application/x-php;application/x-httpd-php*;application/xml;text/html;text/css;text/x-sql;text/x-diff;
-StartupNotify=true
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 2652
http://geany.svn.sourceforge.net/geany/?rev=2652&view=rev
Author: eht16
Date: 2008-06-06 07:17:16 -0700 (Fri, 06 Jun 2008)
Log Message:
-----------
Display current file position in the status bar when compiled with GEANY_DEBUG.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/ui_utils.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2008-06-06 12:37:10 UTC (rev 2651)
+++ trunk/ChangeLog 2008-06-06 14:17:16 UTC (rev 2652)
@@ -1,3 +1,10 @@
+2008-06-06 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
+
+ * src/ui_utils.c:
+ Display current file position in the status bar when compiled
+ with GEANY_DEBUG.
+
+
2008-06-06 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* src/utils.c:
Modified: trunk/src/ui_utils.c
===================================================================
--- trunk/src/ui_utils.c 2008-06-06 12:37:10 UTC (rev 2651)
+++ trunk/src/ui_utils.c 2008-06-06 14:17:16 UTC (rev 2652)
@@ -188,6 +188,11 @@
g_string_append_printf(stats_str, _("scope: %s"),
cur_tag);
+#ifdef GEANY_DEBUG
+ g_string_append(stats_str, sp);
+ g_string_append_printf(stats_str, _("pos: %d"), pos);
+#endif
+
/* can be overridden by status messages */
set_statusbar(stats_str->str, TRUE);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 2651
http://geany.svn.sourceforge.net/geany/?rev=2651&view=rev
Author: ntrel
Date: 2008-06-06 05:37:10 -0700 (Fri, 06 Jun 2008)
Log Message:
-----------
Add comment for last commit:
Also fix the document last_check assignment so that the disk is only
polled every file_prefs.disk_check_timeout seconds (not sure how
this got missing - maybe it was my fault?).
Modified Paths:
--------------
trunk/ChangeLog
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2008-06-06 12:31:05 UTC (rev 2650)
+++ trunk/ChangeLog 2008-06-06 12:37:10 UTC (rev 2651)
@@ -3,6 +3,9 @@
* src/utils.c:
Check that the current file is still on disk as well as checking the
modification time.
+ Also fix the document last_check assignment so that the disk is only
+ polled every file_prefs.disk_check_timeout seconds (not sure how
+ this got missing - maybe it was my fault?).
2008-06-05 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 2650
http://geany.svn.sourceforge.net/geany/?rev=2650&view=rev
Author: ntrel
Date: 2008-06-06 05:31:05 -0700 (Fri, 06 Jun 2008)
Log Message:
-----------
Check that the current file is still on disk as well as checking the
modification time.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/utils.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2008-06-05 16:52:39 UTC (rev 2649)
+++ trunk/ChangeLog 2008-06-06 12:31:05 UTC (rev 2650)
@@ -1,3 +1,10 @@
+2008-06-06 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
+
+ * src/utils.c:
+ Check that the current file is still on disk as well as checking the
+ modification time.
+
+
2008-06-05 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* Makefile.am, waf, wscript, scripts/wafinit.sh:
Modified: trunk/src/utils.c
===================================================================
--- trunk/src/utils.c 2008-06-05 16:52:39 UTC (rev 2649)
+++ trunk/src/utils.c 2008-06-06 12:31:05 UTC (rev 2650)
@@ -307,17 +307,30 @@
gboolean ret = FALSE;
if (file_prefs.disk_check_timeout == 0) return FALSE;
- if (idx == -1 || documents[idx]->file_name == NULL) return FALSE;
+ if (! DOC_IDX_VALID(idx)) return FALSE;
+ /* ignore documents that have never been saved to disk */
+ if (documents[idx]->real_path == NULL) return FALSE;
t = time(NULL);
if (! force && documents[idx]->last_check > (t - file_prefs.disk_check_timeout))
return FALSE;
+ documents[idx]->last_check = t;
+
locale_filename = utils_get_locale_from_utf8(documents[idx]->file_name);
if (g_stat(locale_filename, &st) != 0)
{
- /* TODO: warn user file on disk is missing */
+ /* file is missing - set unsaved state */
+ documents[idx]->changed = TRUE;
+ document_set_text_changed(idx);
+
+ if (dialogs_show_question_full(NULL, GTK_STOCK_SAVE, GTK_STOCK_CANCEL,
+ _("Try to resave the file?"),
+ _("File \"%s\" was not found on disk!"), documents[idx]->file_name))
+ {
+ dialogs_show_save_as();
+ }
}
else if (documents[idx]->mtime > t || st.st_mtime > t)
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.