Merge lp:~attente/indicator-keyboard/1291962-2 into lp:indicator-keyboard

Proposed by William Hua
Status: Merged
Merged at revision: 337
Proposed branch: lp:~attente/indicator-keyboard/1291962-2
Merge into: lp:indicator-keyboard
Diff against target: 591 lines (+205/-127)
9 files modified
.bzrignore (+3/-1)
data/Makefile.am (+2/-2)
lib/Makefile.am (+7/-6)
lib/ibus-menu.vala (+22/-23)
lib/indicator-menu.vala (+128/-0)
lib/main.vala (+36/-90)
po/POTFILES.in (+1/-0)
po/POTFILES.skip (+1/-0)
po/indicator-keyboard.pot (+5/-5)
To merge this branch: bzr merge lp:~attente/indicator-keyboard/1291962-2
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Sebastien Bacher Needs Fixing
Ted Gould (community) Approve
Review via email: mp+213346@code.launchpad.net

Commit message

Export separate menus for desktop and greeter.

Description of the change

Export separate menus for desktop and greeter.

(Re-submission of https://code.launchpad.net/~attente/indicator-keyboard/1291962/+merge/212967)

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Ted Gould (ted) wrote :

Small thing, need to change the "..." to a "…" in "Text Entry Settings..." Marking approved on the review but not top-approving.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Sebastien Bacher (seb128) wrote :

While Ted's comment makes sense, could you revert it? That's a string change which would invalidate the translations, the i18n team said that would be better be done next cycle to avoid regression on some locales for the release.

review: Needs Fixing
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Sebastien Bacher (seb128) wrote :

trying to put that under CI train the build failed with

" VALAC indicator_keyboard_service_vala.stamp
main.vala:134.9-134.20: error: The name `sources_menu' does not exist in the context of `Indicator.Keyboard.Service.get_ibus._lambda12_'
    if (sources_menu != null) {
        ^^^^^^^^^^^^
main.vala:135.6-135.24: error: The name `update_sources_menu' does not exist in the context of `Indicator.Keyboard.Service.get_ibus._lambda12_'
     update_sources_menu ();"

review: Needs Fixing
324. By William Hua

Merge trunk fixing conflicts.

Revision history for this message
William Hua (attente) wrote :

Sorry... it's the same bad merge.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file '.bzrignore'
--- .bzrignore 2013-08-08 22:15:00 +0000
+++ .bzrignore 2014-04-08 19:41:04 +0000
@@ -29,6 +29,8 @@
29po/POTFILES29po/POTFILES
30po/stamp-it30po/stamp-it
31tests/config.vala31tests/config.vala
32tests/dconf-service
33tests/gvfs
32tests/indicator-keyboard-test34tests/indicator-keyboard-test
33tests/indicator-keyboard-test.trs35tests/indicator-keyboard-test.trs
34tests/indicator-keyboard-tests36tests/indicator-keyboard-tests
@@ -39,4 +41,4 @@
39m4/lt~obsolete.m441m4/lt~obsolete.m4
40m4/ltoptions.m442m4/ltoptions.m4
41m4/ltsugar.m443m4/ltsugar.m4
42m4/ltversion.m4
43\ No newline at end of file44\ No newline at end of file
45m4/ltversion.m4
4446
=== modified file 'data/Makefile.am'
--- data/Makefile.am 2014-03-11 13:25:54 +0000
+++ data/Makefile.am 2014-04-08 19:41:04 +0000
@@ -54,10 +54,10 @@
54 echo 'ObjectPath=/com/canonical/indicator/keyboard/desktop'; \54 echo 'ObjectPath=/com/canonical/indicator/keyboard/desktop'; \
55 echo ''; \55 echo ''; \
56 echo '[desktop_greeter]'; \56 echo '[desktop_greeter]'; \
57 echo 'ObjectPath=/com/canonical/indicator/keyboard/desktop'; \57 echo 'ObjectPath=/com/canonical/indicator/keyboard/desktop_greeter'; \
58 echo ''; \58 echo ''; \
59 echo '[desktop_lockscreen]'; \59 echo '[desktop_lockscreen]'; \
60 echo 'ObjectPath=/com/canonical/indicator/keyboard/desktop'; \60 echo 'ObjectPath=/com/canonical/indicator/keyboard/desktop_greeter'; \
61 echo ''; \61 echo ''; \
62 echo '[ubiquity]'; \62 echo '[ubiquity]'; \
63 echo 'ObjectPath=/com/canonical/indicator/keyboard/desktop') > $@.tmp && \63 echo 'ObjectPath=/com/canonical/indicator/keyboard/desktop') > $@.tmp && \
6464
=== modified file 'lib/Makefile.am'
--- lib/Makefile.am 2014-03-19 03:32:18 +0000
+++ lib/Makefile.am 2014-04-08 19:41:04 +0000
@@ -6,12 +6,13 @@
6 --metadatadir $(top_srcdir)/deps \6 --metadatadir $(top_srcdir)/deps \
7 --vapidir $(top_srcdir)/deps7 --vapidir $(top_srcdir)/deps
88
9indicator_keyboard_service_SOURCES = main.vala \9indicator_keyboard_service_SOURCES = main.vala \
10 source.vala \10 source.vala \
11 common.vala \11 common.vala \
12 ibus-menu.vala \12 ibus-menu.vala \
13 ibus-panel.vala \13 ibus-panel.vala \
14 window-stack.vala \14 indicator-menu.vala \
15 window-stack.vala \
15 unity-greeter.vala16 unity-greeter.vala
16indicator_keyboard_service_VALAFLAGS = $(AM_VALAFLAGS) \17indicator_keyboard_service_VALAFLAGS = $(AM_VALAFLAGS) \
17 --pkg gee-1.0 \18 --pkg gee-1.0 \
1819
=== modified file 'lib/ibus-menu.vala'
--- lib/ibus-menu.vala 2014-02-20 03:59:24 +0000
+++ lib/ibus-menu.vala 2014-04-08 19:41:04 +0000
@@ -23,16 +23,16 @@
23 private IBus.PropList? properties;23 private IBus.PropList? properties;
2424
25 private Menu menu;25 private Menu menu;
26 private SimpleActionGroup? action_group;26 private ActionMap? action_map;
2727
28 private string? radio_name;28 private string? radio_name;
29 private SimpleAction? radio_action;29 private SimpleAction? radio_action;
30 private Gee.HashMap<string, IBus.Property> radio_properties;30 private Gee.HashMap<string, IBus.Property> radio_properties;
3131
32 // A list of the action names this menu registers32 /* A list of the action names this menu registers. */
33 private Gee.LinkedList<string> names;33 private Gee.LinkedList<string> names;
3434
35 public IBusMenu (SimpleActionGroup? action_group = null, IBus.PropList? properties = null) {35 public IBusMenu (ActionMap? action_map = null, IBus.PropList? properties = null) {
36 menu = new Menu ();36 menu = new Menu ();
3737
38 menu.items_changed.connect ((position, removed, added) => {38 menu.items_changed.connect ((position, removed, added) => {
@@ -40,7 +40,7 @@
40 });40 });
4141
42 names = new Gee.LinkedList<string> ();42 names = new Gee.LinkedList<string> ();
43 set_action_group (action_group);43 set_action_map (action_map);
44 set_properties (properties);44 set_properties (properties);
45 }45 }
4646
@@ -72,12 +72,12 @@
72 name = @"ibus-$key";72 name = @"ibus-$key";
73 }73 }
7474
75 // Find an unused action name using a counter75 /* Find an unused action name using a counter. */
76 if (action_group != null && (Action?) ((!) action_group).lookup_action (name) != null) {76 if (action_map != null && (Action?) ((!) action_map).lookup_action (name) != null) {
77 var i = 0;77 var i = 0;
78 var unique_name = @"$name-$i";78 var unique_name = @"$name-$i";
7979
80 while ((Action?) ((!) action_group).lookup_action (unique_name) != null) {80 while ((Action?) ((!) action_map).lookup_action (unique_name) != null) {
81 i++;81 i++;
82 unique_name = @"$name-$i";82 unique_name = @"$name-$i";
83 }83 }
@@ -107,10 +107,10 @@
107 if ((string?) property.key != null) {107 if ((string?) property.key != null) {
108 var name = get_action_name (property.key);108 var name = get_action_name (property.key);
109109
110 if (action_group != null) {110 if (action_map != null) {
111 var action = new SimpleAction (name, null);111 var action = new SimpleAction (name, null);
112 action.activate.connect ((parameter) => { activate (property, property.state); });112 action.activate.connect ((parameter) => { activate (property, property.state); });
113 ((!) action_group).add_action (action);113 ((!) action_map).add_action (action);
114 names.add (name);114 names.add (name);
115 }115 }
116116
@@ -124,7 +124,7 @@
124 if ((string?) property.key != null) {124 if ((string?) property.key != null) {
125 var name = get_action_name (property.key);125 var name = get_action_name (property.key);
126126
127 if (action_group != null) {127 if (action_map != null) {
128 var state = new Variant.boolean (property.state == IBus.PropState.CHECKED);128 var state = new Variant.boolean (property.state == IBus.PropState.CHECKED);
129 var action = new SimpleAction.stateful (name, null, state);129 var action = new SimpleAction.stateful (name, null, state);
130130
@@ -139,7 +139,7 @@
139 }139 }
140 });140 });
141141
142 ((!) action_group).add_action (action);142 ((!) action_map).add_action (action);
143 names.add (name);143 names.add (name);
144 }144 }
145145
@@ -151,8 +151,8 @@
151 private void append_radio_property (IBus.Property property) {151 private void append_radio_property (IBus.Property property) {
152 if (property.prop_type == IBus.PropType.RADIO) {152 if (property.prop_type == IBus.PropType.RADIO) {
153 if ((string?) property.key != null) {153 if ((string?) property.key != null) {
154 // Create a single action for all radio properties.154 /* Create a single action for all radio properties. */
155 if (action_group != null && radio_name == null) {155 if (action_map != null && radio_name == null) {
156 radio_counter++;156 radio_counter++;
157 radio_name = @"-private-radio-$radio_counter";157 radio_name = @"-private-radio-$radio_counter";
158 radio_action = new SimpleAction.stateful ((!) radio_name, VariantType.STRING, new Variant.string (""));158 radio_action = new SimpleAction.stateful ((!) radio_name, VariantType.STRING, new Variant.string (""));
@@ -172,7 +172,7 @@
172 }172 }
173 });173 });
174174
175 ((!) action_group).add_action ((!) radio_action);175 ((!) action_map).add_action ((!) radio_action);
176 names.add ((!) radio_name);176 names.add ((!) radio_name);
177 }177 }
178178
@@ -195,7 +195,7 @@
195195
196 private void append_menu_property (IBus.Property property) {196 private void append_menu_property (IBus.Property property) {
197 if (property.prop_type == IBus.PropType.MENU) {197 if (property.prop_type == IBus.PropType.MENU) {
198 var submenu = new IBusMenu (action_group, ((!) property).sub_props);198 var submenu = new IBusMenu (action_map, ((!) property).sub_props);
199 submenu.activate.connect ((property, state) => { activate (property, state); });199 submenu.activate.connect ((property, state) => { activate (property, state); });
200 menu.append_submenu (get_label (property), submenu);200 menu.append_submenu (get_label (property), submenu);
201 }201 }
@@ -227,8 +227,7 @@
227 }227 }
228228
229 private void update_menu () {229 private void update_menu () {
230 // There's a reference cycle between the action group and the submenus.230 /* Break reference cycle between action map and submenus. */
231 // We need to break it here so that those submenus aren't hanging around.
232 for (var i = 0; i < menu.get_n_items (); i++) {231 for (var i = 0; i < menu.get_n_items (); i++) {
233 var submenu = menu.get_item_link (i, Menu.LINK_SUBMENU) as IBusMenu;232 var submenu = menu.get_item_link (i, Menu.LINK_SUBMENU) as IBusMenu;
234233
@@ -250,19 +249,19 @@
250 radio_action = null;249 radio_action = null;
251 radio_name = null;250 radio_name = null;
252251
253 if (action_group != null) {252 if (action_map != null) {
254 foreach (var name in names) {253 foreach (var name in names) {
255 ((!) action_group).remove_action (name);254 ((!) action_map).remove_action (name);
256 }255 }
257 }256 }
258257
259 names.clear ();258 names.clear ();
260 }259 }
261260
262 public void set_action_group (SimpleActionGroup? action_group) {261 public void set_action_map (ActionMap? action_map) {
263 if (action_group != this.action_group) {262 if (action_map != this.action_map) {
264 remove_actions ();263 remove_actions ();
265 this.action_group = action_group;264 this.action_map = action_map;
266 update_menu ();265 update_menu ();
267 }266 }
268 }267 }
@@ -282,7 +281,7 @@
282 update_menu ();281 update_menu ();
283 }282 }
284283
285 // Forward all menu model calls to our internal menu284 /* Forward all menu model calls to our internal menu. */
286285
287 public override Variant get_item_attribute_value (int item_index, string attribute, VariantType? expected_type) {286 public override Variant get_item_attribute_value (int item_index, string attribute, VariantType? expected_type) {
288 return menu.get_item_attribute_value (item_index, attribute, expected_type);287 return menu.get_item_attribute_value (item_index, attribute, expected_type);
289288
=== added file 'lib/indicator-menu.vala'
--- lib/indicator-menu.vala 1970-01-01 00:00:00 +0000
+++ lib/indicator-menu.vala 2014-04-08 19:41:04 +0000
@@ -0,0 +1,128 @@
1/*
2 * Copyright 2014 Canonical Ltd.
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, version 3 of the License.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * Authors: William Hua <william.hua@canonical.com>
17 */
18
19public class Indicator.Keyboard.IndicatorMenu : MenuModel {
20
21 public enum Options {
22 NONE = 0x0,
23 IBUS = 0x1,
24 SETTINGS = 0x2
25 }
26
27 private Options options;
28
29 private Menu indicator_menu;
30 private Menu sources_section;
31 private IBusMenu properties_section;
32
33 public IndicatorMenu (ActionMap? action_map = null, Options options = Options.IBUS | Options.SETTINGS) {
34 var submenu = new Menu ();
35
36 sources_section = new Menu ();
37 submenu.append_section (null, sources_section);
38
39 if ((options & Options.IBUS) != Options.NONE) {
40 properties_section = new IBusMenu (action_map);
41 properties_section.activate.connect ((property, state) => { activate (property, state); });
42 submenu.append_section (null, properties_section);
43 }
44
45 if ((options & Options.SETTINGS) != Options.NONE) {
46 var settings_section = new Menu ();
47 settings_section.append (_ ("Character Map"), "indicator.map");
48 settings_section.append (_ ("Keyboard Layout Chart"), "indicator.chart");
49 settings_section.append (_ ("Text Entry Settings..."), "indicator.settings");
50 submenu.append_section (null, settings_section);
51 }
52
53 var indicator = new MenuItem.submenu (null, submenu);
54 indicator.set_attribute ("x-canonical-type", "s", "com.canonical.indicator.root");
55 indicator.set_attribute ("x-canonical-secondary-action", "s", "indicator.next");
56 indicator.set_attribute ("x-canonical-scroll-action", "s", "indicator.scroll");
57 indicator.set_detailed_action ("indicator.indicator");
58
59 indicator_menu = new Menu ();
60 indicator_menu.append_item (indicator);
61
62 this.options = options;
63 }
64
65 public signal void activate (IBus.Property property, IBus.PropState state);
66
67 public void set_sources (Source[] sources) {
68 sources_section.remove_all ();
69
70 for (var i = 0; i < sources.length; i++) {
71 if (!sources[i].is_ibus || (options & Options.IBUS) != Options.NONE) {
72 var item = new MenuItem (sources[i].name, "indicator.current");
73
74 item.set_attribute (Menu.ATTRIBUTE_TARGET, "u", i);
75
76 if (sources[i].icon != null) {
77 item.set_icon ((!) sources[i].icon);
78 }
79
80 sources_section.append_item (item);
81 }
82 }
83 }
84
85 public void set_properties (IBus.PropList properties) {
86 if ((options & Options.IBUS) != Options.NONE) {
87 properties_section.set_properties (properties);
88 }
89 }
90
91 public void update_property (IBus.Property property) {
92 if ((options & Options.IBUS) != Options.NONE) {
93 properties_section.update_property (property);
94 }
95 }
96
97 public override bool is_mutable () {
98 return indicator_menu.is_mutable ();
99 }
100
101 public override int get_n_items () {
102 return indicator_menu.get_n_items ();
103 }
104
105 public override void get_item_attributes (int item_index, out HashTable<string, Variant>? attributes) {
106 indicator_menu.get_item_attributes (item_index, out attributes);
107 }
108
109 public override void get_item_links (int item_index, out HashTable<string, MenuModel>? links) {
110 indicator_menu.get_item_links (item_index, out links);
111 }
112
113 public override Variant get_item_attribute_value (int item_index, string attribute, VariantType? expected_type) {
114 return indicator_menu.get_item_attribute_value (item_index, attribute, expected_type);
115 }
116
117 public override MenuModel get_item_link (int item_index, string link) {
118 return indicator_menu.get_item_link (item_index, link);
119 }
120
121 public override MenuAttributeIter iterate_item_attributes (int item_index) {
122 return indicator_menu.iterate_item_attributes (item_index);
123 }
124
125 public override MenuLinkIter iterate_item_links (int item_index) {
126 return indicator_menu.iterate_item_links (item_index);
127 }
128}
0129
=== modified file 'lib/main.vala'
--- lib/main.vala 2014-04-01 21:42:22 +0000
+++ lib/main.vala 2014-04-08 19:41:04 +0000
@@ -45,9 +45,8 @@
4545
46 private SimpleActionGroup? action_group;46 private SimpleActionGroup? action_group;
47 private SimpleAction? indicator_action;47 private SimpleAction? indicator_action;
48 private MenuModel? menu_model;48 private IndicatorMenu? desktop_menu;
49 private Menu? sources_menu;49 private IndicatorMenu? desktop_greeter_menu;
50 private IBusMenu? ibus_menu;
5150
52 private UnityGreeter? unity_greeter;51 private UnityGreeter? unity_greeter;
53 private string? greeter_user;52 private string? greeter_user;
@@ -71,8 +70,12 @@
71 }70 }
72 }71 }
7372
74 if (sources_menu != null) {73 if (desktop_menu != null) {
75 update_sources_menu ();74 get_desktop_menu ().set_sources (get_sources ());
75 }
76
77 if (desktop_greeter_menu != null) {
78 get_desktop_greeter_menu ().set_sources (get_sources ());
76 }79 }
7780
78 if (indicator_action != null) {81 if (indicator_action != null) {
@@ -128,8 +131,12 @@
128 IBus.init ();131 IBus.init ();
129 ibus = new IBus.Bus ();132 ibus = new IBus.Bus ();
130 ((!) ibus).connected.connect (() => {133 ((!) ibus).connected.connect (() => {
131 if (sources_menu != null) {134 if (desktop_menu != null) {
132 update_sources_menu ();135 get_desktop_menu ().set_sources (get_sources ());
136 }
137
138 if (desktop_greeter_menu != null) {
139 get_desktop_greeter_menu ().set_sources (get_sources ());
133 }140 }
134141
135 if (indicator_action != null) {142 if (indicator_action != null) {
@@ -645,7 +652,7 @@
645 }652 }
646653
647 panel_timeout = Timeout.add (PROPERTIES_DELAY, () => {654 panel_timeout = Timeout.add (PROPERTIES_DELAY, () => {
648 update_ibus_menu (list);655 get_desktop_menu ().set_properties (list);
649 panel_timeout = 0;656 panel_timeout = 0;
650 return false;657 return false;
651 });658 });
@@ -653,7 +660,7 @@
653660
654 [DBus (visible = false)]661 [DBus (visible = false)]
655 private void handle_property_updated (IBus.Property property) {662 private void handle_property_updated (IBus.Property property) {
656 get_ibus_menu ().update_property (property);663 get_desktop_menu ().update_property (property);
657 }664 }
658665
659 [DBus (visible = false)]666 [DBus (visible = false)]
@@ -753,48 +760,11 @@
753 }760 }
754761
755 [DBus (visible = false)]762 [DBus (visible = false)]
756 private void update_sources_menu () {763 public IndicatorMenu get_desktop_menu () {
757 if (sources_menu != null) {764 if (desktop_menu == null) {
758 var menu = get_sources_menu ();765 desktop_menu = new IndicatorMenu (get_action_group ());
759 menu.remove_all ();766 ((!) desktop_menu).set_sources (get_sources ());
760767 ((!) desktop_menu).activate.connect ((property, state) => {
761 var sources = get_sources ();
762 for (var i = 0; i < sources.length; i++) {
763 var item = new MenuItem (sources[i].name, "indicator.current");
764 item.set_attribute (Menu.ATTRIBUTE_TARGET, "u", i);
765
766 var icon = sources[i].icon;
767 if (icon != null) {
768 item.set_icon ((!) icon);
769 }
770
771 menu.append_item (item);
772 }
773 } else {
774 get_sources_menu ();
775 }
776 }
777
778 [DBus (visible = false)]
779 private Menu get_sources_menu () {
780 if (sources_menu == null) {
781 sources_menu = new Menu ();
782 update_sources_menu ();
783 }
784
785 return (!) sources_menu;
786 }
787
788 [DBus (visible = false)]
789 private void update_ibus_menu (IBus.PropList list) {
790 get_ibus_menu ().set_properties (list);
791 }
792
793 [DBus (visible = false)]
794 private IBusMenu get_ibus_menu () {
795 if (ibus_menu == null) {
796 ibus_menu = new IBusMenu (get_action_group ());
797 ((!) ibus_menu).activate.connect ((property, state) => {
798 var panel = get_ibus_panel ();768 var panel = get_ibus_panel ();
799769
800 if (panel != null) {770 if (panel != null) {
@@ -807,43 +777,17 @@
807 });777 });
808 }778 }
809779
810 return (!) ibus_menu;780 return (!) desktop_menu;
811 }781 }
812782
813 [DBus (visible = false)]783 [DBus (visible = false)]
814 protected virtual MenuModel create_menu_model (MenuModel sources_menu, MenuModel ibus_menu) {784 public IndicatorMenu get_desktop_greeter_menu () {
815 var menu = new Menu ();785 if (desktop_greeter_menu == null) {
816786 desktop_greeter_menu = new IndicatorMenu (get_action_group (), IndicatorMenu.Options.NONE);
817 var submenu = new Menu ();787 ((!) desktop_greeter_menu).set_sources (get_sources ());
818788 }
819 submenu.append_section (null, sources_menu);789
820 submenu.append_section (null, ibus_menu);790 return (!) desktop_greeter_menu;
821
822 if (!is_login_user ()) {
823 var section = new Menu ();
824 section.append (_ ("Character Map"), "indicator.map");
825 section.append (_ ("Keyboard Layout Chart"), "indicator.chart");
826 section.append (_ ("Text Entry Settings..."), "indicator.settings");
827 submenu.append_section (null, section);
828 }
829
830 var indicator = new MenuItem.submenu ("x", submenu);
831 indicator.set_attribute ("x-canonical-type", "s", "com.canonical.indicator.root");
832 indicator.set_attribute ("x-canonical-secondary-action", "s", "indicator.next");
833 indicator.set_attribute ("x-canonical-scroll-action", "s", "indicator.scroll");
834 indicator.set_detailed_action ("indicator.indicator");
835 menu.append_item (indicator);
836
837 return menu;
838 }
839
840 [DBus (visible = false)]
841 public MenuModel get_menu_model () {
842 if (menu_model == null) {
843 menu_model = create_menu_model (get_sources_menu (), get_ibus_menu ());
844 }
845
846 return (!) menu_model;
847 }791 }
848792
849 [DBus (visible = false)]793 [DBus (visible = false)]
@@ -861,7 +805,8 @@
861 private void handle_changed_sources (string key) {805 private void handle_changed_sources (string key) {
862 sources = null;806 sources = null;
863807
864 update_sources_menu ();808 get_desktop_menu ().set_sources (get_sources ());
809 get_desktop_greeter_menu ().set_sources (get_sources ());
865 update_indicator_action ();810 update_indicator_action ();
866 update_login_layout ();811 update_login_layout ();
867 }812 }
@@ -951,7 +896,8 @@
951 private void handle_bus_acquired (DBusConnection connection, string name) {896 private void handle_bus_acquired (DBusConnection connection, string name) {
952 try {897 try {
953 connection.export_action_group ("/com/canonical/indicator/keyboard", get_action_group ());898 connection.export_action_group ("/com/canonical/indicator/keyboard", get_action_group ());
954 connection.export_menu_model ("/com/canonical/indicator/keyboard/desktop", get_menu_model ());899 connection.export_menu_model ("/com/canonical/indicator/keyboard/desktop", get_desktop_menu ());
900 connection.export_menu_model ("/com/canonical/indicator/keyboard/desktop_greeter", get_desktop_greeter_menu ());
955 } catch (Error error) {901 } catch (Error error) {
956 warning ("error: %s", error.message);902 warning ("error: %s", error.message);
957 }903 }
958904
=== modified file 'po/POTFILES.in'
--- po/POTFILES.in 2013-09-27 15:10:19 +0000
+++ po/POTFILES.in 2014-04-08 19:41:04 +0000
@@ -1,2 +1,3 @@
1# List of source files which contain translatable strings.1# List of source files which contain translatable strings.
2lib/main.vala2lib/main.vala
3lib/indicator-menu.vala
34
=== modified file 'po/POTFILES.skip'
--- po/POTFILES.skip 2013-09-27 15:10:19 +0000
+++ po/POTFILES.skip 2014-04-08 19:41:04 +0000
@@ -1,1 +1,2 @@
1lib/main.c1lib/main.c
2lib/indicator-menu.c
23
=== modified file 'po/indicator-keyboard.pot'
--- po/indicator-keyboard.pot 2014-03-19 23:25:34 +0000
+++ po/indicator-keyboard.pot 2014-04-08 19:41:04 +0000
@@ -8,7 +8,7 @@
8msgstr ""8msgstr ""
9"Project-Id-Version: PACKAGE VERSION\n"9"Project-Id-Version: PACKAGE VERSION\n"
10"Report-Msgid-Bugs-To: \n"10"Report-Msgid-Bugs-To: \n"
11"POT-Creation-Date: 2014-03-20 12:25+1300\n"11"POT-Creation-Date: 2014-03-27 23:39+1300\n"
12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14"Language-Team: LANGUAGE <LL@li.org>\n"14"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -17,19 +17,19 @@
17"Content-Type: text/plain; charset=CHARSET\n"17"Content-Type: text/plain; charset=CHARSET\n"
18"Content-Transfer-Encoding: 8bit\n"18"Content-Transfer-Encoding: 8bit\n"
1919
20#: ../lib/main.vala:66720#: ../lib/main.vala:670
21#, c-format21#, c-format
22msgid "%s input source"22msgid "%s input source"
23msgstr ""23msgstr ""
2424
25#: ../lib/main.vala:81525#: ../lib/indicator-menu.vala:47
26msgid "Character Map"26msgid "Character Map"
27msgstr ""27msgstr ""
2828
29#: ../lib/main.vala:81629#: ../lib/indicator-menu.vala:48
30msgid "Keyboard Layout Chart"30msgid "Keyboard Layout Chart"
31msgstr ""31msgstr ""
3232
33#: ../lib/main.vala:81733#: ../lib/indicator-menu.vala:49
34msgid "Text Entry Settings..."34msgid "Text Entry Settings..."
35msgstr ""35msgstr ""

Subscribers

People subscribed via source and target branches

to all changes: