summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2024-12-13 10:51:51 +0800
committerPeng Wu <alexepico@gmail.com>2024-12-13 10:51:51 +0800
commit021758ac36d4cbac591ac00e2d873200b232c702 (patch)
tree9dc23b78937b3f09ae1732bd6e4f54ef01241d6f /src
parent12803f984db8f65a494cb89bad6811d44043e3d2 (diff)
downloadibus-libpinyin-021758ac36d4cbac591ac00e2d873200b232c702.tar.gz
ibus-libpinyin-021758ac36d4cbac591ac00e2d873200b232c702.tar.xz
ibus-libpinyin-021758ac36d4cbac591ac00e2d873200b232c702.zip
Fix show_message usage
Diffstat (limited to 'src')
-rw-r--r--src/PYPConfig.cc20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/PYPConfig.cc b/src/PYPConfig.cc
index 04a995a..67801dc 100644
--- a/src/PYPConfig.cc
+++ b/src/PYPConfig.cc
@@ -678,15 +678,17 @@ PinyinConfig::valueChanged (const std::string &schema_id,
m_export_bigram_phrase = normalizeGVariant (value, true);
else if (CONFIG_IMPORT_CUSTOM_TABLE == name) {
std::string filename = normalizeGVariant (value, std::string(""));
- if (!filename.empty ())
+ if (!filename.empty ()) {
TableDatabase::userInstance ().importTable (filename.c_str ());
- show_message (_("The table file is imported."), NULL);
+ show_message (_("The table file is imported."), NULL);
+ }
}
else if (CONFIG_EXPORT_CUSTOM_TABLE == name) {
std::string filename = normalizeGVariant (value, std::string(""));
- if (!filename.empty ())
+ if (!filename.empty ()) {
TableDatabase::userInstance ().exportTable (filename.c_str ());
- show_message (_("The table file is exported."), NULL);
+ show_message (_("The table file is exported."), NULL);
+ }
}
else if (CONFIG_CLEAR_CUSTOM_TABLE == name) {
std::string target = normalizeGVariant (value, std::string(""));
@@ -695,15 +697,17 @@ PinyinConfig::valueChanged (const std::string &schema_id,
}
else if (CONFIG_IMPORT_DICTIONARY == name) {
std::string filename = normalizeGVariant (value, std::string(""));
- if (!filename.empty ())
+ if (!filename.empty ()) {
LibPinyinBackEnd::instance ().importPinyinDictionary (filename.c_str ());
- show_message (_("The pinyin dictionary file is imported."), NULL);
+ show_message (_("The pinyin dictionary file is imported."), NULL);
+ }
}
else if (CONFIG_EXPORT_DICTIONARY == name) {
std::string filename = normalizeGVariant (value, std::string(""));
- if (!filename.empty ())
+ if (!filename.empty ()) {
LibPinyinBackEnd::instance ().exportPinyinDictionary (filename.c_str ());
- show_message (_("The pinyin dictionary file is exported."), NULL);
+ show_message (_("The pinyin dictionary file is exported."), NULL);
+ }
}
else if (CONFIG_CLEAR_USER_DATA == name) {
std::string target = normalizeGVariant (value, std::string(""));