Revision: 5796
http://geany.svn.sourceforge.net/geany/?rev=5796&view=rev
Author: colombanw
Date: 2011-05-11 22:52:05 +0000 (Wed, 11 May 2011)
Log Message:
-----------
Update the HTML encoding detection regex to accept more valid inputs
HTML 4.01 don't seem to require the http-equiv value to be quoted, so
make the quotes optional.
Also allow more than one space between the meta tag and its http-equiv
attribute.
Closes #3300703.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/encodings.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-05-10 23:51:01 UTC (rev 5795)
+++ trunk/ChangeLog 2011-05-11 22:52:05 UTC (rev 5796)
@@ -1,3 +1,10 @@
+2011-05-12 Colomban Wendling <colomban(at)geany(dot)org>
+
+ * src/encodings.c:
+ Update the HTML content-type encoding detection regexp to accept some
+ more valid inputs (closes #3300703).
+
+
2011-05-11 Colomban Wendling <colomban(at)geany(dot)org>
* src/plugins.c:
Modified: trunk/src/encodings.c
===================================================================
--- trunk/src/encodings.c 2011-05-10 23:51:01 UTC (rev 5795)
+++ trunk/src/encodings.c 2011-05-11 22:52:05 UTC (rev 5796)
@@ -51,7 +51,7 @@
#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]*/?>"
+#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 " or " coding: utf-8 " */
#define PATTERN_CODING "coding[\t ]*[:=][\t ]*\"?([a-z0-9-]+)\"?[\t ]*"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5793
http://geany.svn.sourceforge.net/geany/?rev=5793&view=rev
Author: colombanw
Date: 2011-05-09 17:41:30 +0000 (Mon, 09 May 2011)
Log Message:
-----------
Fix pattern filtering when not searching in subdirectories
grep's --include option doesn't filter files passed explicitly to grep,
so when we build the file list to search in, take the filters into
account.
Also drop the --include options in this case since they aren't useful.
Modified Paths:
--------------
branches/0.20.1/ChangeLog
branches/0.20.1/src/search.c
Modified: branches/0.20.1/ChangeLog
===================================================================
--- branches/0.20.1/ChangeLog 2011-05-09 17:41:08 UTC (rev 5792)
+++ branches/0.20.1/ChangeLog 2011-05-09 17:41:30 UTC (rev 5793)
@@ -37,6 +37,8 @@
Avoid changing the tag tree if it's not the one of the current
document, fixing showing the wrong tag list when reloading
configuration files.
+ * src/search.c:
+ Fix pattern filtering when not searching in subdirectories.
2011-05-08 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: branches/0.20.1/src/search.c
===================================================================
--- branches/0.20.1/src/search.c 2011-05-09 17:41:08 UTC (rev 5792)
+++ branches/0.20.1/src/search.c 2011-05-09 17:41:30 UTC (rev 5793)
@@ -1514,14 +1514,27 @@
}
+static gboolean pattern_list_match(GSList *patterns, const gchar *str)
+{
+ GSList *item;
+
+ foreach_slist(item, patterns)
+ {
+ if (g_pattern_match_string(item->data, str))
+ return TRUE;
+ }
+ return FALSE;
+}
+
+
/* Creates an argument vector of strings, copying argv_prefix[] values for
* the first arguments, then followed by filenames found in dir.
* Returns NULL if no files were found, otherwise returned vector should be fully freed. */
static gchar **search_get_argv(const gchar **argv_prefix, const gchar *dir)
{
- guint prefix_len, list_len, i;
+ guint prefix_len, list_len, i, j;
gchar **argv;
- GSList *list, *item;
+ GSList *list, *item, *patterns = NULL;
GError *error = NULL;
g_return_val_if_fail(dir != NULL, NULL);
@@ -1539,13 +1552,40 @@
argv = g_new(gchar*, prefix_len + list_len + 1);
- for (i = 0; i < prefix_len; i++)
- argv[i] = g_strdup(argv_prefix[i]);
+ for (i = 0, j = 0; i < prefix_len; i++)
+ {
+ if (g_str_has_prefix(argv_prefix[i], "--include="))
+ {
+ const gchar *pat = &(argv_prefix[i][10]); /* the pattern part of the argument */
- foreach_slist(item, list)
- argv[i++] = item->data;
+ patterns = g_slist_prepend(patterns, g_pattern_spec_new(pat));
+ }
+ else
+ argv[j++] = g_strdup(argv_prefix[i]);
+ }
- argv[i] = NULL;
+ if (patterns)
+ {
+ GSList *pat;
+
+ foreach_slist(item, list)
+ {
+ if (pattern_list_match(patterns, item->data))
+ argv[j++] = item->data;
+ else
+ g_free(item->data);
+ }
+ foreach_slist(pat, patterns)
+ g_pattern_spec_free(pat->data);
+ g_slist_free(patterns);
+ }
+ else
+ {
+ foreach_slist(item, list)
+ argv[j++] = item->data;
+ }
+
+ argv[j] = NULL;
g_slist_free(list);
return argv;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5792
http://geany.svn.sourceforge.net/geany/?rev=5792&view=rev
Author: colombanw
Date: 2011-05-09 17:41:08 +0000 (Mon, 09 May 2011)
Log Message:
-----------
Avoid changing the tag tree if it's not the one of the current document
Modified Paths:
--------------
branches/0.20.1/ChangeLog
branches/0.20.1/src/sidebar.c
Modified: branches/0.20.1/ChangeLog
===================================================================
--- branches/0.20.1/ChangeLog 2011-05-09 17:40:47 UTC (rev 5791)
+++ branches/0.20.1/ChangeLog 2011-05-09 17:41:08 UTC (rev 5792)
@@ -33,6 +33,10 @@
be quoted, adding support for XML (closes #3183506).
* src/main.c, src/prefs.c, src/tools.c:
Fix loading and updating menu accelerators for custom commands.
+ * src/sidebar.c:
+ Avoid changing the tag tree if it's not the one of the current
+ document, fixing showing the wrong tag list when reloading
+ configuration files.
2011-05-08 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: branches/0.20.1/src/sidebar.c
===================================================================
--- branches/0.20.1/src/sidebar.c 2011-05-09 17:40:47 UTC (rev 5791)
+++ branches/0.20.1/src/sidebar.c 2011-05-09 17:41:08 UTC (rev 5792)
@@ -195,7 +195,10 @@
/* changes the tree view to the given one, trying not to do useless changes */
#define CHANGE_TREE(new_child) \
G_STMT_START { \
- if (child != new_child) \
+ /* only change the tag tree if it's actually not the same (to avoid flickering) and if
+ * it's the one of the current document (to avoid problems when e.g. reloading
+ * configuration files */ \
+ if (child != new_child && doc == document_get_current()) \
{ \
if (child) \
gtk_container_remove(GTK_CONTAINER(tag_window), child); \
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5790
http://geany.svn.sourceforge.net/geany/?rev=5790&view=rev
Author: colombanw
Date: 2011-05-09 17:40:16 +0000 (Mon, 09 May 2011)
Log Message:
-----------
Update regex for encoding detection to match quoted names
This allows encoding="utf8", adding support for XML encoding detection.
Closes #3183506.
Modified Paths:
--------------
branches/0.20.1/ChangeLog
branches/0.20.1/src/encodings.c
Modified: branches/0.20.1/ChangeLog
===================================================================
--- branches/0.20.1/ChangeLog 2011-05-09 17:39:57 UTC (rev 5789)
+++ branches/0.20.1/ChangeLog 2011-05-09 17:40:16 UTC (rev 5790)
@@ -28,6 +28,9 @@
Fix a few Doxygen warnings.
* plugins/saveactions.c:
Properly use 0 as the invalid timeout source ID.
+ * src/encodings.c:
+ Update regex used to find encodings for it to allow the encoding to
+ be quoted, adding support for XML (closes #3183506).
2011-05-08 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: branches/0.20.1/src/encodings.c
===================================================================
--- branches/0.20.1/src/encodings.c 2011-05-09 17:39:57 UTC (rev 5789)
+++ branches/0.20.1/src/encodings.c 2011-05-09 17:40:16 UTC (rev 5790)
@@ -53,7 +53,7 @@
/* <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 " or " coding: utf-8 " */
-#define PATTERN_CODING "coding[\t ]*[:=][\t ]*([a-z0-9-]+)[\t ]*"
+#define PATTERN_CODING "coding[\t ]*[:=][\t ]*\"?([a-z0-9-]+)\"?[\t ]*"
/* precompiled regexps */
static regex_t pregs[2];
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5788
http://geany.svn.sourceforge.net/geany/?rev=5788&view=rev
Author: colombanw
Date: 2011-05-09 17:39:37 +0000 (Mon, 09 May 2011)
Log Message:
-----------
Fix a few Doxygen warnings
Modified Paths:
--------------
branches/0.20.1/ChangeLog
branches/0.20.1/doc/pluginsymbols.c
branches/0.20.1/src/sciwrappers.c
Modified: branches/0.20.1/ChangeLog
===================================================================
--- branches/0.20.1/ChangeLog 2011-05-09 17:39:11 UTC (rev 5787)
+++ branches/0.20.1/ChangeLog 2011-05-09 17:39:37 UTC (rev 5788)
@@ -24,6 +24,8 @@
Also change the hack used for the selection to be updated in the input
handlers to call the GtkTreeView's handler manually rather than doing
the actual job in IDLE callbacks for the TreeView's handler to have run.
+ * doc/pluginsymbols.c, src/sciwrappers.c:
+ Fix a few Doxygen warnings.
2011-05-08 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: branches/0.20.1/doc/pluginsymbols.c
===================================================================
--- branches/0.20.1/doc/pluginsymbols.c 2011-05-09 17:39:11 UTC (rev 5787)
+++ branches/0.20.1/doc/pluginsymbols.c 2011-05-09 17:39:37 UTC (rev 5788)
@@ -43,7 +43,7 @@
* @param info The data struct which should be initialized by this function. */
void plugin_set_info(PluginInfo *info);
-/** @deprecated Use @ref geany_plugin->info instead.
+/** @deprecated Use @ref GeanyPlugin.info instead.
* Basic information about a plugin, which is set in plugin_set_info(). */
const PluginInfo *plugin_info;
Modified: branches/0.20.1/src/sciwrappers.c
===================================================================
--- branches/0.20.1/src/sciwrappers.c 2011-05-09 17:39:11 UTC (rev 5787)
+++ branches/0.20.1/src/sciwrappers.c 2011-05-09 17:39:37 UTC (rev 5788)
@@ -357,7 +357,8 @@
/** Gets the line number from @a position.
* @param sci Scintilla widget.
- * @param position Position. */
+ * @param position Position.
+ * @return The line. */
gint sci_get_line_from_position(ScintillaObject *sci, gint position)
{
return SSM(sci, SCI_LINEFROMPOSITION, position, 0);
@@ -366,7 +367,8 @@
/** Gets the column number relative to the start of the line that @a position is on.
* @param sci Scintilla widget.
- * @param position Position. */
+ * @param position Position.
+ * @return The column. */
gint sci_get_col_from_position(ScintillaObject *sci, gint position)
{
return SSM(sci, SCI_GETCOLUMN, position, 0);
@@ -419,7 +421,8 @@
/** Gets the total number of lines.
- * @param sci Scintilla widget. */
+ * @param sci Scintilla widget.
+ * @return The line count. */
gint sci_get_line_count(ScintillaObject *sci)
{
return SSM(sci, SCI_GETLINECOUNT, 0, 0);
@@ -451,8 +454,9 @@
/** Gets the position at the end of a line
- * @param sci Scintilla widget
- * @param line Line */
+ * @param sci Scintilla widget.
+ * @param line Line.
+ * @return The position at the end of the line. */
gint sci_get_line_end_position(ScintillaObject *sci, gint line)
{
return SSM(sci, SCI_GETLINEENDPOSITION, line, 0);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.