SF.net SVN: geany:[5303] trunk
ntrel at users.sourceforge.net
ntrel at xxxxx
Mon Oct 18 17:14:00 UTC 2010
Revision: 5303
http://geany.svn.sourceforge.net/geany/?rev=5303&view=rev
Author: ntrel
Date: 2010-10-18 17:13:59 +0000 (Mon, 18 Oct 2010)
Log Message:
-----------
Prevent debug message about a missing 'default' named style when
using just a user color scheme file.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/filetypes.c
trunk/src/highlighting.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-10-18 14:16:08 UTC (rev 5302)
+++ trunk/ChangeLog 2010-10-18 17:13:59 UTC (rev 5303)
@@ -9,6 +9,9 @@
* src/project.c:
Fix saving project indent prefs straight after using project
properties.
+ * src/highlighting.c, src/filetypes.c:
+ Prevent debug message about a missing 'default' named style when
+ using just a user color scheme file.
2010-10-16 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/src/filetypes.c
===================================================================
--- trunk/src/filetypes.c 2010-10-18 14:16:08 UTC (rev 5302)
+++ trunk/src/filetypes.c 2010-10-18 17:13:59 UTC (rev 5303)
@@ -1277,6 +1277,7 @@
build_load_menu(configh, GEANY_BCS_HOME_FT, (gpointer)ft);
}
+
/* simple wrapper function to print file errors in DEBUG mode */
static void load_system_keyfile(GKeyFile *key_file, const gchar *file, GKeyFileFlags flags,
GeanyFiletype *ft)
Modified: trunk/src/highlighting.c
===================================================================
--- trunk/src/highlighting.c 2010-10-18 14:16:08 UTC (rev 5302)
+++ trunk/src/highlighting.c 2010-10-18 17:13:59 UTC (rev 5303)
@@ -209,14 +209,14 @@
}
-static void read_named_style(const gchar *named_style, GeanyLexerStyle *style)
+static gboolean read_named_style(const gchar *named_style, GeanyLexerStyle *style)
{
GeanyLexerStyle *cs;
gchar *comma, *name = NULL;
const gchar *bold = NULL;
const gchar *italic = NULL;
- g_return_if_fail(named_style);
+ g_return_val_if_fail(named_style, FALSE);
name = utils_strdupa(named_style); /* named_style must not be written to, may be a static string */
comma = strstr(name, ",");
@@ -239,8 +239,8 @@
else
{
*style = gsd_default;
- geany_debug("No named style '%s'! Check filetypes.common.", name);
}
+ return (cs != NULL);
}
@@ -280,7 +280,12 @@
str = list[0];
if (len == 1 && isalpha(str[0]))
- read_named_style(str, style);
+ {
+ if (!read_named_style(str, style))
+ geany_debug(
+ "No named style '%s'! Check filetype styles or %s color scheme.",
+ str, NVL(editor_prefs.color_scheme, "filetypes.common"));
+ }
else
{
switch (len)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Commits
mailing list