diff options
author | Juan R. García Blanco <juanrgar@gmail.com> | 2015-07-25 14:58:51 +0200 |
---|---|---|
committer | Juan R. García Blanco <juanrgar@gmail.com> | 2015-07-25 23:36:20 +0200 |
commit | c26a07a12782c9a0849f3eadb1bb49b95a5bae04 (patch) | |
tree | c04ad6f29921875e33b32904ea9ab5e6f26d2dd2 | |
parent | 2bae159655a9a2cb5e044f986bc97b662fd81505 (diff) | |
download | gnome-dictionary-c26a07a12782c9a0849f3eadb1bb49b95a5bae04.tar.gz |
gdict: Add library init function
Add gdict_init() function to initialize the library.
Now it only enables debug options.
See https://bugzilla.gnome.org/show_bug.cgi?id=745786
-rw-r--r-- | libgdict/gdict-utils.c | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/libgdict/gdict-utils.c b/libgdict/gdict-utils.c index b6041f6..cc33772 100644 --- a/libgdict/gdict-utils.c +++ b/libgdict/gdict-utils.c @@ -88,7 +88,7 @@ gdict_arg_no_debug_cb (const char *key, G_N_ELEMENTS (gdict_debug_keys)); return TRUE; } -#endif /* CLUTTER_ENABLE_DEBUG */ +#endif /* GDICT_ENABLE_DEBUG */ static GOptionEntry gdict_args[] = { #ifdef GDICT_ENABLE_DEBUG @@ -133,7 +133,8 @@ post_parse_hook (GOptionContext *context, gpointer data, GError **error) { - gdict_is_initialized = TRUE; + if (gdict_is_initialized) + return TRUE; return TRUE; } @@ -330,3 +331,24 @@ _gdict_show_gerror_dialog (GtkWidget *widget, g_error_free (error); } + +/** + * gdict_init: + * @argc: FIXME + * @argv: FIXME + * + * FIXME + * + * Since: 0.12 + */ +void +gdict_init (gint *argc, + gchar ***argv) +{ + if (gdict_is_initialized) + return; + + gdict_debug_init (argc, argv); + + gdict_is_initialized = TRUE; +} |