From 6bef373ae51ecee1fc27cc37756706b907b1e6bd Mon Sep 17 00:00:00 2001 From: William Hua Date: Thu, 27 Mar 2014 11:26:46 +1300 Subject: Filter out IBus IMs if we don't specify Options.IBUS. --- lib/indicator-menu.vala | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/indicator-menu.vala b/lib/indicator-menu.vala index ab55e808..1d92a6f6 100644 --- a/lib/indicator-menu.vala +++ b/lib/indicator-menu.vala @@ -68,15 +68,17 @@ public class Indicator.Keyboard.IndicatorMenu : MenuModel { sources_section.remove_all (); for (var i = 0; i < sources.length; i++) { - var item = new MenuItem (sources[i].name, "indicator.current"); + if (!sources[i].is_ibus || (options & Options.IBUS) != Options.NONE) { + var item = new MenuItem (sources[i].name, "indicator.current"); - item.set_attribute (Menu.ATTRIBUTE_TARGET, "u", i); + item.set_attribute (Menu.ATTRIBUTE_TARGET, "u", i); - if (sources[i].icon != null) { - item.set_icon ((!) sources[i].icon); - } + if (sources[i].icon != null) { + item.set_icon ((!) sources[i].icon); + } - sources_section.append_item (item); + sources_section.append_item (item); + } } } -- cgit v1.2.3