diff options
Diffstat (limited to 'finch')
-rw-r--r-- | finch/finchui.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/finch/finchui.c b/finch/finchui.c index f4af9330fd..4bd07b4fbf 100644 --- a/finch/finchui.c +++ b/finch/finchui.c @@ -92,10 +92,8 @@ finch_ui_prefs_init(G_GNUC_UNUSED PurpleUi *ui) { finch_prefs_init(); } -static void -finch_ui_start(G_GNUC_UNUSED PurpleUi *ui) { - GError *error = NULL; - +static gboolean +finch_ui_start(G_GNUC_UNUSED PurpleUi *ui, GError **error) { finch_debug_init(); #ifdef STANDALONE @@ -106,10 +104,16 @@ finch_ui_start(G_GNUC_UNUSED PurpleUi *ui) { gnt_init(); #endif /* STANDALONE */ - if(!finch_history_init(&error)) { - g_critical("failed to initialize the history api: %s", - error != NULL ? error->message : "unknown"); - g_clear_error(&error); + if(!finch_history_init(error)) { + const char *error_message = "unknown"; + + if(error != NULL && *error != NULL) { + error_message = (*error)->message; + } + + g_critical("failed to initialize the history api: %s", error_message); + + return FALSE; } purple_prefs_add_none("/purple/gnt"); @@ -158,6 +162,8 @@ finch_ui_start(G_GNUC_UNUSED PurpleUi *ui) { gnt_register_action(_("Preferences"), finch_prefs_show_all); gnt_register_action(_("Statuses"), finch_savedstatus_show_all); + return TRUE; + #ifdef STANDALONE } |