Revision: 3783
http://geany.svn.sourceforge.net/geany/?rev=3783&view=rev
Author: frlan
Date: 2009-05-11 17:36:18 +0000 (Mon, 11 May 2009)
Log Message:
-----------
Fix of a typo at Russian translation. Closes 2790001.
Modified Paths:
--------------
trunk/po/ChangeLog
trunk/po/ru.po
Modified: trunk/po/ChangeLog
===================================================================
--- trunk/po/ChangeLog 2009-05-11 15:57:02 UTC (rev 3782)
+++ trunk/po/ChangeLog 2009-05-11 17:36:18 UTC (rev 3783)
@@ -1,3 +1,8 @@
+2009-05-11 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
+
+ * ru.po: Fix of a typo at Russian translation. Closes 2790001.
+
+
2009-05-04 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
* it.po: Update of Italian translation (Thanks M. Baldinelli).
Modified: trunk/po/ru.po
===================================================================
--- trunk/po/ru.po 2009-05-11 15:57:02 UTC (rev 3782)
+++ trunk/po/ru.po 2009-05-11 17:36:18 UTC (rev 3783)
@@ -1989,7 +1989,7 @@
#: ../src/interface.c:3525 ../src/interface.c:5073
msgid "Hard tab width:"
-msgstr "Ширина табудяции:"
+msgstr "Ширина табуляции:"
#: ../src/interface.c:3533 ../src/interface.c:5081
msgid "The width of a tab when Tabs & Spaces is set for a document"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 3781
http://geany.svn.sourceforge.net/geany/?rev=3781&view=rev
Author: eht16
Date: 2009-05-11 15:56:33 +0000 (Mon, 11 May 2009)
Log Message:
-----------
Use plain old fwrite() in utils_write_file(). g_file_set_contents() is only used when explicitly requested.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/utils.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-05-11 15:56:08 UTC (rev 3780)
+++ trunk/ChangeLog 2009-05-11 15:56:33 UTC (rev 3781)
@@ -4,6 +4,9 @@
Unset maybe previously keywords when setting up Scintilla for
XML files. This fixed wrong highlighting after switching back to
filetype XML from another one.
+ * src/utils.c:
+ Use plain old fwrite() in utils_write_file(). g_file_set_contents()
+ is only used when explicitly requested.
2009-05-10 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/src/utils.c
===================================================================
--- trunk/src/utils.c 2009-05-11 15:56:08 UTC (rev 3780)
+++ trunk/src/utils.c 2009-05-11 15:56:33 UTC (rev 3781)
@@ -216,10 +216,7 @@
/**
* Write the given @c text into a file with @c filename.
* If the file doesn't exist, it will be created.
- * If it already exists, it will be overwritten. Internally, g_file_set_contents() is used
- * to write the file with all its error checking and related limitations like
- * destroying hard links and possibly losing file permissions. Please read the
- * API documentation of g_file_set_contents() for details.
+ * If it already exists, it will be overwritten.
*
* @param filename The filename of the file to write, in locale encoding.
* @param text The text to write into the file.
@@ -229,17 +226,49 @@
**/
gint utils_write_file(const gchar *filename, const gchar *text)
{
- GError *error = NULL;
-
g_return_val_if_fail(filename != NULL, ENOENT);
g_return_val_if_fail(text != NULL, EINVAL);
- if (! g_file_set_contents(filename, text, -1, &error))
+ if (file_prefs.use_safe_file_saving)
{
- geany_debug("%s: could not write to file %s (%s)", G_STRFUNC, filename, error->message);
- g_error_free(error);
- return EIO;
+ GError *error = NULL;
+ if (! g_file_set_contents(filename, text, -1, &error))
+ {
+ geany_debug("%s: could not write to file %s (%s)", G_STRFUNC, filename, error->message);
+ g_error_free(error);
+ return EIO;
+ }
}
+ else
+ {
+ FILE *fp;
+ gint bytes_written, len;
+
+ if (filename == NULL)
+ return ENOENT;
+
+ len = strlen(text);
+ fp = g_fopen(filename, "w");
+ if (fp != NULL)
+ {
+ bytes_written = fwrite(text, sizeof (gchar), len, fp);
+ fclose(fp);
+
+ if (len != bytes_written)
+ {
+ geany_debug(
+ "utils_write_file(): written only %d bytes, had to write %d bytes to %s",
+ bytes_written, len, filename);
+ return EIO;
+ }
+ }
+ else
+ {
+ geany_debug("utils_write_file(): could not write to file %s (%s)",
+ filename, g_strerror(errno));
+ return errno;
+ }
+ }
return 0;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 3780
http://geany.svn.sourceforge.net/geany/?rev=3780&view=rev
Author: eht16
Date: 2009-05-11 15:56:08 +0000 (Mon, 11 May 2009)
Log Message:
-----------
Unset maybe previously keywords when setting up Scintilla for XML files. This fixed wrong highlighting after switching back to filetype XML from another one.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/highlighting.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-05-11 15:36:46 UTC (rev 3779)
+++ trunk/ChangeLog 2009-05-11 15:56:08 UTC (rev 3780)
@@ -1,3 +1,11 @@
+2009-05-11 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
+
+ * src/highlighting.c:
+ Unset maybe previously keywords when setting up Scintilla for
+ XML files. This fixed wrong highlighting after switching back to
+ filetype XML from another one.
+
+
2009-05-10 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* src/ui_utils.c:
Modified: trunk/src/highlighting.c
===================================================================
--- trunk/src/highlighting.c 2009-05-11 15:36:46 UTC (rev 3779)
+++ trunk/src/highlighting.c 2009-05-11 15:56:08 UTC (rev 3780)
@@ -467,7 +467,7 @@
else
SSM(sci, SCI_SETCARETSTYLE, CARETSTYLE_LINE, 0);
- /* colourize the current line */
+ /* colourise the current line */
SSM(sci, SCI_SETCARETLINEBACK, invert(common_style_set.styling[GCS_CURRENT_LINE].background), 0);
/* bold=enable current line */
SSM(sci, SCI_SETCARETLINEVISIBLE, common_style_set.styling[GCS_CURRENT_LINE].bold, 0);
@@ -1268,6 +1268,9 @@
static void styleset_markup(ScintillaObject *sci, gboolean set_keywords)
{
+ guint i;
+ const gchar *keywords;
+
/* Used by several filetypes */
if (style_sets[GEANY_FILETYPES_XML].styling == NULL)
filetypes_load_config(GEANY_FILETYPES_XML, FALSE);
@@ -1275,14 +1278,12 @@
/* manually initialise filetype Python for use with embedded Python */
filetypes_load_config(GEANY_FILETYPES_PYTHON, FALSE);
- /* don't set keywords for plain XML */
- if (set_keywords)
+ /* Set keywords. If we don't want to use keywords, we must at least unset maybe previously set
+ * keywords, e.g. when switching between filetypes. */
+ for (i = 0; i < 5; i++)
{
- SSM(sci, SCI_SETKEYWORDS, 0, (sptr_t) style_sets[GEANY_FILETYPES_XML].keywords[0]);
- SSM(sci, SCI_SETKEYWORDS, 1, (sptr_t) style_sets[GEANY_FILETYPES_XML].keywords[1]);
- SSM(sci, SCI_SETKEYWORDS, 2, (sptr_t) style_sets[GEANY_FILETYPES_XML].keywords[2]);
- SSM(sci, SCI_SETKEYWORDS, 3, (sptr_t) style_sets[GEANY_FILETYPES_XML].keywords[3]);
- SSM(sci, SCI_SETKEYWORDS, 4, (sptr_t) style_sets[GEANY_FILETYPES_XML].keywords[4]);
+ keywords = (set_keywords) ? style_sets[GEANY_FILETYPES_XML].keywords[i] : "";
+ SSM(sci, SCI_SETKEYWORDS, i, (sptr_t) keywords);
}
SSM(sci, SCI_SETKEYWORDS, 5, (sptr_t) style_sets[GEANY_FILETYPES_XML].keywords[5]);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.