From 9eed0c2b4e1f1524f208fffd49040dcb35c16be9 Mon Sep 17 00:00:00 2001 From: Kan-Ru Chen Date: Mon, 12 Aug 2024 16:11:53 +0900 Subject: [PATCH] feat: add notify-mode-change to debug info --- src/setup/ibus-setup-chewing-about.c | 94 +++++++++++----------------- 1 file changed, 37 insertions(+), 57 deletions(-) diff --git a/src/setup/ibus-setup-chewing-about.c b/src/setup/ibus-setup-chewing-about.c index 7c6cfcb..c4227cc 100644 --- a/src/setup/ibus-setup-chewing-about.c +++ b/src/setup/ibus-setup-chewing-about.c @@ -33,75 +33,56 @@ static char *generate_debug_info(void) { g_string_append_printf(string, "ibus-chewing: %s\n\n", QUOTE_ME(PRJ_VER)); g_string_append(string, "Compiled against:\n"); g_string_append_printf(string, "- ibus: %s\n", QUOTE_ME(IBUS_VERSION)); - g_string_append_printf(string, "- libchewing: %s\n", - QUOTE_ME(CHEWING_VERSION)); + g_string_append_printf(string, "- libchewing: %s\n", QUOTE_ME(CHEWING_VERSION)); g_string_append(string, "\nRunning against:\n"); g_string_append_printf(string, "- libchewing: %s\n", chewing_version()); g_string_append(string, "\n"); { - g_autoptr(GSettings) settings = - g_settings_new("org.freedesktop.IBus.Chewing"); + g_autoptr(GSettings) settings = g_settings_new("org.freedesktop.IBus.Chewing"); gchar *kb_type = g_settings_get_string(settings, "kb-type"); gchar *sel_keys = g_settings_get_string(settings, "sel-keys"); - gchar *chi_eng_mode_toggle = - g_settings_get_string(settings, "chi-eng-mode-toggle"); - gchar *sync_caps_lock = - g_settings_get_string(settings, "sync-caps-lock"); - gchar *default_english_case = - g_settings_get_string(settings, "default-english-case"); + gchar *chi_eng_mode_toggle = g_settings_get_string(settings, "chi-eng-mode-toggle"); + gchar *sync_caps_lock = g_settings_get_string(settings, "sync-caps-lock"); + gchar *default_english_case = g_settings_get_string(settings, "default-english-case"); g_string_append(string, "Settings:\n"); g_string_append_printf(string, "- kb-type: %s\n", kb_type); g_string_append_printf(string, "- sel-keys: %s\n", sel_keys); - g_string_append_printf( - string, "- plain-zhuyin: %d\n", - g_settings_get_boolean(settings, "plain-zhuyin")); - g_string_append_printf( - string, "- conversion-engine: %d\n", - g_settings_get_enum(settings, "conversion-engine")); - g_string_append_printf( - string, "- auto-shift-cur: %d\n", - g_settings_get_boolean(settings, "auto-shift-cur")); - g_string_append_printf( - string, "- add-phrase-direction: %d\n", - g_settings_get_boolean(settings, "add-phrase-direction")); - g_string_append_printf( - string, "- clean-buffer-focus-out: %d\n", - g_settings_get_boolean(settings, "clean-buffer-focus-out")); - g_string_append_printf( - string, "- easy-symbol-input: %d\n", - g_settings_get_boolean(settings, "easy-symbol-input")); - g_string_append_printf( - string, "- esc-clean-all-buf: %d\n", - g_settings_get_boolean(settings, "esc-clean-all-buf")); - g_string_append_printf( - string, "- enable-fullwidth-toggle-key: %d\n", - g_settings_get_boolean(settings, "enable-fullwidth-toggle-key")); - g_string_append_printf( - string, "- max-chi-symbol-len: %d\n", - g_settings_get_int(settings, "max-chi-symbol-len")); - g_string_append_printf(string, "- chi-eng-mode-toggle: %s\n", - chi_eng_mode_toggle); - g_string_append_printf(string, "- sync-caps-lock: %s\n", - sync_caps_lock); - g_string_append_printf(string, "- default-english-case: %s\n", - default_english_case); + g_string_append_printf(string, "- plain-zhuyin: %d\n", + g_settings_get_boolean(settings, "plain-zhuyin")); + g_string_append_printf(string, "- conversion-engine: %d\n", + g_settings_get_enum(settings, "conversion-engine")); + g_string_append_printf(string, "- auto-shift-cur: %d\n", + g_settings_get_boolean(settings, "auto-shift-cur")); + g_string_append_printf(string, "- add-phrase-direction: %d\n", + g_settings_get_boolean(settings, "add-phrase-direction")); + g_string_append_printf(string, "- clean-buffer-focus-out: %d\n", + g_settings_get_boolean(settings, "clean-buffer-focus-out")); + g_string_append_printf(string, "- easy-symbol-input: %d\n", + g_settings_get_boolean(settings, "easy-symbol-input")); + g_string_append_printf(string, "- esc-clean-all-buf: %d\n", + g_settings_get_boolean(settings, "esc-clean-all-buf")); + g_string_append_printf(string, "- enable-fullwidth-toggle-key: %d\n", + g_settings_get_boolean(settings, "enable-fullwidth-toggle-key")); + g_string_append_printf(string, "- max-chi-symbol-len: %d\n", + g_settings_get_int(settings, "max-chi-symbol-len")); + g_string_append_printf(string, "- chi-eng-mode-toggle: %s\n", chi_eng_mode_toggle); + g_string_append_printf(string, "- sync-caps-lock: %s\n", sync_caps_lock); + g_string_append_printf(string, "- default-english-case: %s\n", default_english_case); g_string_append_printf(string, "- cand-per-page: %d\n", g_settings_get_uint(settings, "cand-per-page")); - g_string_append_printf( - string, "- show-page-number: %d\n", - g_settings_get_boolean(settings, "show-page-number")); - g_string_append_printf( - string, "- phrase-choice-from-last: %d\n", - g_settings_get_boolean(settings, "phrase-choice-from-last")); - g_string_append_printf( - string, "- space-as-selection: %d\n", - g_settings_get_boolean(settings, "space-as-selection")); - g_string_append_printf( - string, "- vertical-lookup-table: %d\n", - g_settings_get_boolean(settings, "vertical-lookup-table")); + g_string_append_printf(string, "- show-page-number: %d\n", + g_settings_get_boolean(settings, "show-page-number")); + g_string_append_printf(string, "- phrase-choice-from-last: %d\n", + g_settings_get_boolean(settings, "phrase-choice-from-last")); + g_string_append_printf(string, "- space-as-selection: %d\n", + g_settings_get_boolean(settings, "space-as-selection")); + g_string_append_printf(string, "- vertical-lookup-table: %d\n", + g_settings_get_boolean(settings, "vertical-lookup-table")); + g_string_append_printf(string, "- notify-mode-change: %d\n", + g_settings_get_boolean(settings, "notify-mode-change")); g_free(kb_type); g_free(sel_keys); @@ -119,8 +100,7 @@ static char *generate_debug_info(void) { g_string_append(string, "Environment:\n"); g_string_append_printf(string, "- Desktop: %s\n", desktop); - g_string_append_printf(string, "- Session: %s (%s)\n", session_desktop, - session_type); + g_string_append_printf(string, "- Session: %s (%s)\n", session_desktop, session_type); g_string_append_printf(string, "- Language: %s\n", lang); }