[geany/geany-plugins] a76f26: Suppress error dialogs on startup

Enrico Tröger git-noreply at xxxxx
Sun Oct 12 14:16:42 UTC 2014


Branch:      refs/heads/master
Author:      Enrico Tröger <enrico.troeger at uvena.de>
Committer:   Enrico Tröger <enrico.troeger at uvena.de>
Date:        Sun, 12 Oct 2014 14:16:42 UTC
Commit:      a76f26e1f09e12eda8fcd91567d81726b394e322
             https://github.com/geany/geany-plugins/commit/a76f26e1f09e12eda8fcd91567d81726b394e322

Log Message:
-----------
Suppress error dialogs on startup

Instead of showing an error dialog on startup of Geany, suppress
the dialog and log the error only to the status messages.
This makes the error less obvious but is also less annoying
for an unconfigured or misconfigured Spell Check plugin.


Modified Paths:
--------------
    spellcheck/src/speller.c

Modified: spellcheck/src/speller.c
7 lines changed, 6 insertions(+), 1 deletions(-)
===================================================================
@@ -308,9 +308,14 @@ void sc_speller_check_document(GeanyDocument *doc)
 static void broker_init_failed(void)
 {
 	const gchar *err = enchant_broker_get_error(sc_speller_broker);
-	dialogs_show_msgbox(GTK_MESSAGE_ERROR,
+	const gchar *msg = g_strdup_printf(
 		_("The Enchant library couldn't be initialized (%s)."),
 		(err != NULL) ? err : _("unknown error (maybe the chosen language is not available)"));
+	
+	msgwin_status_add(msg);
+	if (main_is_realized())
+		/* show dialog only after Geany has been loaded already, i.e. not while starting up */
+		dialogs_show_msgbox(GTK_MESSAGE_ERROR, msg);
 }
 
 



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).


More information about the Plugins-Commits mailing list