Merge lp:~unity-api-team/indicator-network/modeminfo into lp:indicator-network/14.10

Proposed by Antti Kaijanmäki on 2014-08-07
Status: Merged
Approved by: Pete Woods on 2014-08-08
Approved revision: 368
Merged at revision: 389
Proposed branch: lp:~unity-api-team/indicator-network/modeminfo
Merge into: lp:indicator-network/14.10
Diff against target: 249 lines (+58/-45)
3 files modified
network/root-state.cpp (+6/-8)
network/wwan-link-item.cpp (+6/-7)
po/indicator-network.pot (+46/-30)
To merge this branch: bzr merge lp:~unity-api-team/indicator-network/modeminfo
Reviewer Review Type Date Requested Status
Pete Woods (community) 2014-08-07 Approve on 2014-08-08
Review via email: mp+229992@code.launchpad.net

Commit message

Handle NetworkRegistration::Status::unknown better.
Improve the panel modemTechIcon handling a bit on dual sim.
Update translation tempate.

To post a comment you must log in.
Antti Kaijanmäki (kaijanmaki) wrote :

This MP offers a small visual improvement on dual-sim.

Pete Woods (pete-woods) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'network/root-state.cpp'
2--- network/root-state.cpp 2014-08-07 01:31:06 +0000
3+++ network/root-state.cpp 2014-08-08 12:37:59 +0000
4@@ -38,9 +38,8 @@
5 /// @todo multiple adapters etc..
6 std::string m_networkingIcon;
7
8- std::string m_modemTechIcon;
9-
10 std::map<Modem::Ptr, std::string> m_cellularIcons;
11+ std::map<int, std::string> m_modemTechIcons;
12
13 Private() = delete;
14 Private(std::shared_ptr<networking::Manager> manager, ModemManager::Ptr modemManager);
15@@ -109,7 +108,7 @@
16 return;
17 }
18
19- m_modemTechIcon.clear();
20+ m_modemTechIcons.erase(modem->index());
21 m_cellularIcons[modem] = "";
22
23 if (!modem->online().get()) {
24@@ -145,9 +144,7 @@
25 case org::ofono::Interface::NetworkRegistration::Status::roaming:
26 if (modem->strength().get() != 0) {
27 m_cellularIcons[modem] = Modem::strengthIcon(modem->strength().get());
28- /// @todo need to revise this once the modems are part of the connectivity-api
29- /// this might get us wrong results on dual-sim
30- m_modemTechIcon = Modem::technologyIcon(modem->technology().get());
31+ m_modemTechIcons[modem->index()] = Modem::technologyIcon(modem->technology().get());
32 } else {
33 m_cellularIcons[modem] = "gsm-3g-no-service";
34
35@@ -220,10 +217,11 @@
36 }
37
38 if (m_networkingIcon.empty()) {
39- /// @todo fix this once modems are part of connectivity-api
40 // seems we don't have an active wifi connection..
41 // it must be a cellular one then.
42- m_networkingIcon = m_modemTechIcon;
43+ /// @todo need to revise this once the modems are part of the connectivity-api
44+ /// this might get us wrong results on dual-sim
45+ m_networkingIcon = m_modemTechIcons[1];
46 }
47 break;
48 }
49
50=== modified file 'network/wwan-link-item.cpp'
51--- network/wwan-link-item.cpp 2014-08-07 00:19:35 +0000
52+++ network/wwan-link-item.cpp 2014-08-08 12:37:59 +0000
53@@ -78,19 +78,19 @@
54 } else {
55 m_infoItem->setSimIdentifierText("");
56 }
57+ /// @todo implement me.
58+ m_infoItem->setConnectivityIcon("");
59
60 switch(m_modem->simStatus().get()) {
61 case Modem::SimStatus::missing:
62 m_infoItem->setStatusIcon("no-simcard");
63 m_infoItem->setStatusText(_("No SIM"));
64- m_infoItem->setConnectivityIcon("");
65 m_infoItem->setLocked(false);
66 m_infoItem->setRoaming(false);
67 break;
68 case Modem::SimStatus::error:
69 m_infoItem->setStatusIcon("simcard-error");
70 m_infoItem->setStatusText(_("SIM Error"));
71- m_infoItem->setConnectivityIcon("");
72 m_infoItem->setLocked(false);
73 m_infoItem->setRoaming(false);
74 break;
75@@ -98,7 +98,6 @@
76 case Modem::SimStatus::permanentlyLocked:
77 m_infoItem->setStatusIcon("simcard-locked");
78 m_infoItem->setStatusText(_("SIM Locked"));
79- m_infoItem->setConnectivityIcon("");
80 m_infoItem->setLocked(true);
81 m_infoItem->setRoaming(false);
82 break;
83@@ -112,6 +111,10 @@
84 m_infoItem->setStatusIcon("gsm-3g-disabled");
85 m_infoItem->setStatusText(_("Unregistered"));
86 break;
87+ case org::ofono::Interface::NetworkRegistration::Status::unknown:
88+ m_infoItem->setStatusIcon("gsm-3g-disabled");
89+ m_infoItem->setStatusText(_("Unknown"));
90+ break;
91 case org::ofono::Interface::NetworkRegistration::Status::denied:
92 m_infoItem->setStatusIcon("gsm-3g-disabled");
93 m_infoItem->setStatusText(_("Denied"));
94@@ -132,10 +135,6 @@
95 m_infoItem->setStatusText(_("No Signal"));
96 }
97 break;
98- case org::ofono::Interface::NetworkRegistration::Status::unknown:
99- m_infoItem->setConnectivityIcon("");
100- m_infoItem->setStatusText("");
101- break;
102 }
103 } else {
104 m_infoItem->setStatusIcon("gsm-3g-disabled");
105
106=== modified file 'po/indicator-network.pot'
107--- po/indicator-network.pot 2014-05-22 08:32:45 +0000
108+++ po/indicator-network.pot 2014-08-08 12:37:59 +0000
109@@ -8,7 +8,7 @@
110 msgstr ""
111 "Project-Id-Version: indicator-network\n"
112 "Report-Msgid-Bugs-To: \n"
113-"POT-Creation-Date: 2014-05-22 11:31+0300\n"
114+"POT-Creation-Date: 2014-08-08 15:33+0300\n"
115 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
116 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
117 "Language-Team: LANGUAGE <LL@li.org>\n"
118@@ -17,46 +17,30 @@
119 "Content-Type: text/plain; charset=UTF-8\n"
120 "Content-Transfer-Encoding: 8bit\n"
121
122-#: network/quick-access-section.cpp:50
123+#: network/quick-access-section.cpp:48
124 msgid "Flight Mode"
125 msgstr ""
126
127-#: network/root-state.cpp:145
128-msgid "No SIM"
129-msgstr ""
130-
131-#: network/root-state.cpp:148
132-msgid "SIM Error"
133-msgstr ""
134-
135-#: network/root-state.cpp:153
136-msgid "SIM Locked"
137-msgstr ""
138-
139-#: network/root-state.cpp:163
140-msgid "No Signal"
141-msgstr ""
142-
143 #. TRANSLATORS: this is the indicator title shown on the top header of the indicator area
144-#: network/root-state.cpp:337
145+#: network/root-state.cpp:307
146 msgid "Network"
147 msgstr ""
148
149-#. TRANSLATORS: this string is not currently being shown on the screen. Please do not translate yet.
150+#. TRANSLATORS: this string is not currently being shown on the screen. This message might be subject to change.
151 #: network/sim-unlock-dialog.cpp:85
152 msgid ""
153 "This will be the last attempt.<br><br>If the SIM PIN is entered incorrectly, "
154 "your SIM will be blocked and would require the PUK Code to unlock."
155 msgstr ""
156
157-#. TRANSLATORS: this string is not currently being shown on the screen. Please do not translate yet.
158+#. TRANSLATORS: this string is not currently being shown on the screen. This message might be subject to change.
159 #: network/sim-unlock-dialog.cpp:95
160 msgid ""
161 "Your SIM is now blocked.<br><br>Enter the PUK Code to unlock.<br><br>You may "
162 "contact your network provider for PUK Code."
163 msgstr ""
164
165-#. TRANSLATORS: this string is not currently being shown on the screen. Please do not translate yet.
166+#. TRANSLATORS: this string is not currently being shown on the screen. This message might be subject to change.
167 #: network/sim-unlock-dialog.cpp:106
168 msgid ""
169 "This will be the last attempt.<br><br>If the PUK code is entered "
170@@ -64,7 +48,7 @@
171 "network provider."
172 msgstr ""
173
174-#. TRANSLATORS: this string is not currently being shown on the screen. Please do not translate yet.
175+#. TRANSLATORS: this string is not currently being shown on the screen. This message might be subject to change.
176 #: network/sim-unlock-dialog.cpp:117
177 msgid ""
178 "Your SIM is now permanently blocked and needs to be replaced.<br><br>Please "
179@@ -122,31 +106,63 @@
180 msgid "Wi-Fi settings…"
181 msgstr ""
182
183-#: network/wwan-link-item.cpp:55
184-msgid "Unlock SIM…"
185+#: network/wwan-link-item.cpp:87
186+msgid "No SIM"
187+msgstr ""
188+
189+#: network/wwan-link-item.cpp:93
190+msgid "SIM Error"
191+msgstr ""
192+
193+#: network/wwan-link-item.cpp:100
194+msgid "SIM Locked"
195+msgstr ""
196+
197+#: network/wwan-link-item.cpp:112
198+msgid "Unregistered"
199+msgstr ""
200+
201+#: network/wwan-link-item.cpp:116
202+msgid "Unknown"
203+msgstr ""
204+
205+#: network/wwan-link-item.cpp:120
206+msgid "Denied"
207+msgstr ""
208+
209+#: network/wwan-link-item.cpp:124
210+msgid "Searching"
211+msgstr ""
212+
213+#: network/wwan-link-item.cpp:135
214+msgid "No Signal"
215+msgstr ""
216+
217+#: network/wwan-link-item.cpp:141
218+msgid "Offline"
219 msgstr ""
220
221 #: network/wwan-section.cpp:79
222 msgid "Cellular settings…"
223 msgstr ""
224
225-#: secret-agent/SecretRequest.cpp:60
226+#: secret-agent/SecretRequest.cpp:62
227 #, qt-format
228 msgid "Connect to “%1”"
229 msgstr ""
230
231-#: secret-agent/SecretRequest.cpp:65
232+#: secret-agent/SecretRequest.cpp:67
233 msgid "WPA"
234 msgstr ""
235
236-#: secret-agent/SecretRequest.cpp:67
237+#: secret-agent/SecretRequest.cpp:69
238 msgid "WEP"
239 msgstr ""
240
241-#: secret-agent/SecretRequest.cpp:73
242+#: secret-agent/SecretRequest.cpp:75
243 msgid "Connect"
244 msgstr ""
245
246-#: secret-agent/SecretRequest.cpp:74
247+#: secret-agent/SecretRequest.cpp:76
248 msgid "Cancel"
249 msgstr ""

Subscribers

People subscribed via source and target branches