diff options
author | Lars Roland <Lars.Roland@gmx.net> | 2006-02-11 03:50:25 +0000 |
---|---|---|
committer | Lars Roland <Lars.Roland@gmx.net> | 2006-02-11 03:50:25 +0000 |
commit | e271ba9a3c723a537e6ffb508e3ed4ef4a9920da (patch) | |
tree | 7308409bc7c8c42f1a16464212308f31014ca07f | |
parent | 009b5f7d29fd92fbddc5b3ac008441bc9cd8a098 (diff) |
Display g_error messages in the console window unconditionally, if preferences aren't loaded yet.
This way we ensure that errors are displayed during protocol registration.
Use g_error instead of g_warning, if not allowed characters are used in display filter names for protocols. Extend the error message in this case.
svn path=/trunk/; revision=17248
-rw-r--r-- | epan/proto.c | 4 | ||||
-rw-r--r-- | gtk/main.c | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/epan/proto.c b/epan/proto.c index 5b7ce02fc4..f3411740b5 100644 --- a/epan/proto.c +++ b/epan/proto.c @@ -3264,7 +3264,9 @@ proto_register_protocol(const char *name, const char *short_name, const char *fi } } if (found_invalid) { - g_warning("Protocol filter name \"%s\" has one or more invalid characters.", filter_name); + g_error("Protocol filter name \"%s\" has one or more invalid characters." + " Allowed are lower characters, digits, '-', '_' and '.'." + " This might be caused by an inappropriate plugin or a development error.", filter_name); } key = g_malloc (sizeof(gint)); *key = g_str_hash(filter_name); diff --git a/gtk/main.c b/gtk/main.c index 6e0df73fb3..94539a185c 100644 --- a/gtk/main.c +++ b/gtk/main.c @@ -2921,8 +2921,10 @@ console_log_handler(const char *log_domain, GLogLevelFlags log_level, const char *level; - /* ignore log message, if log_level isn't interesting */ - if( !(log_level & G_LOG_LEVEL_MASK & prefs.console_log_level)) { + /* ignore log message, if log_level isn't interesting. + If preferences aren't loaded yet, display message anyway */ + if((log_level & G_LOG_LEVEL_MASK & prefs.console_log_level) == 0 && + prefs.console_log_level != 0) { return; } |