|
|
026c9d |
From 02022c17212357afb5cec727edd8f095aa40d98d Mon Sep 17 00:00:00 2001
|
|
|
026c9d |
From: Daiki Ueno <ueno@unixuser.org>
|
|
|
026c9d |
Date: Thu, 29 Sep 2011 10:17:28 +0900
|
|
|
026c9d |
Subject: [PATCH 2/4] Hide status from the panel if status == title.
|
|
|
026c9d |
|
|
|
026c9d |
---
|
|
|
026c9d |
src/engine.c | 8 +++++++-
|
|
|
026c9d |
1 files changed, 7 insertions(+), 1 deletions(-)
|
|
|
026c9d |
|
|
|
026c9d |
Index: ibus-m17n-1.3.4/src/engine.c
|
|
|
026c9d |
===================================================================
|
|
|
026c9d |
--- ibus-m17n-1.3.4.orig/src/engine.c
|
|
|
026c9d |
+++ ibus-m17n-1.3.4/src/engine.c
|
|
|
026c9d |
@@ -38,6 +38,7 @@ struct _IBusM17NEngineClass {
|
|
|
026c9d |
gint lookup_table_orientation;
|
|
|
026c9d |
gboolean use_us_layout;
|
|
|
026c9d |
|
|
|
026c9d |
+ gchar *title;
|
|
|
026c9d |
MInputMethod *im;
|
|
|
026c9d |
};
|
|
|
026c9d |
|
|
|
026c9d |
@@ -233,6 +234,10 @@ ibus_m17n_engine_class_init (IBusM17NEng
|
|
|
026c9d |
}
|
|
|
026c9d |
engine_name = g_strdup_printf ("m17n:%s:%s", lang, name);
|
|
|
026c9d |
klass->config_section = g_strdup_printf ("engine/M17N/%s/%s", lang, name);
|
|
|
026c9d |
+ MPlist *l = minput_get_title_icon (msymbol (lang), msymbol (name));
|
|
|
026c9d |
+ if (l && mplist_key (l) == Mtext) {
|
|
|
026c9d |
+ klass->title = ibus_m17n_mtext_to_utf8 (mplist_value (l));
|
|
|
026c9d |
+ }
|
|
|
026c9d |
g_free (lang);
|
|
|
026c9d |
g_free (name);
|
|
|
026c9d |
|
|
|
026c9d |
@@ -924,8 +929,9 @@ ibus_m17n_engine_callback (MInputContext
|
|
|
026c9d |
else if (command == Minput_status_draw) {
|
|
|
026c9d |
gchar *status;
|
|
|
026c9d |
status = ibus_m17n_mtext_to_utf8 (m17n->context->status);
|
|
|
026c9d |
+ IBusM17NEngineClass *klass = (IBusM17NEngineClass *) G_OBJECT_GET_CLASS (m17n);
|
|
|
026c9d |
|
|
|
026c9d |
- if (status && strlen (status)) {
|
|
|
026c9d |
+ if (status && strlen (status) && g_strcmp0 (status, klass->title)) {
|
|
|
026c9d |
IBusText *text;
|
|
|
026c9d |
text = ibus_text_new_from_string (status);
|
|
|
026c9d |
ibus_property_set_label (m17n->status_prop, text);
|