1 |
commit: bfa0e3566c89b4d264de6f71508a4c7e4edb0aaa |
2 |
Author: Marco Scardovi <marco <AT> scardovi <DOT> com> |
3 |
AuthorDate: Thu Jun 24 12:06:44 2021 +0000 |
4 |
Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jun 24 12:09:05 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=bfa0e356 |
7 |
|
8 |
x11-misc/squeekboard: remove unused files |
9 |
|
10 |
Package-Manager: Portage-3.0.20, Repoman-3.0.3 |
11 |
Signed-off-by: Marco Scardovi <marco <AT> scardovi.com> |
12 |
|
13 |
x11-misc/squeekboard/files/448.patch | 470 ------------------------- |
14 |
x11-misc/squeekboard/files/450.patch | 38 -- |
15 |
x11-misc/squeekboard/files/terminal.yaml | 157 --------- |
16 |
x11-misc/squeekboard/squeekboard-1.14.0.ebuild | 4 +- |
17 |
4 files changed, 2 insertions(+), 667 deletions(-) |
18 |
|
19 |
diff --git a/x11-misc/squeekboard/files/448.patch b/x11-misc/squeekboard/files/448.patch |
20 |
deleted file mode 100644 |
21 |
index 07956402e..000000000 |
22 |
--- a/x11-misc/squeekboard/files/448.patch |
23 |
+++ /dev/null |
24 |
@@ -1,470 +0,0 @@ |
25 |
-From 93e4345e823dbb9d9ee187d1f5b32c6dd7dffdd3 Mon Sep 17 00:00:00 2001 |
26 |
-From: Dorota Czaplejewicz <dorota.czaplejewicz@××××.sm> |
27 |
-Date: Mon, 5 Apr 2021 08:17:07 +0000 |
28 |
-Subject: [PATCH 1/2] layout: Take into account text purpose again |
29 |
- |
30 |
---- |
31 |
- src/data.rs | 17 +++++++++++------ |
32 |
- 1 file changed, 11 insertions(+), 6 deletions(-) |
33 |
- |
34 |
-diff --git a/src/data.rs b/src/data.rs |
35 |
-index e5aa3910..71711c3f 100644 |
36 |
---- a/src/data.rs |
37 |
-+++ b/src/data.rs |
38 |
-@@ -239,13 +239,18 @@ fn load_layout_data_with_fallback( |
39 |
- .map(PathBuf::from) |
40 |
- .or_else(|| xdg::data_path("squeekboard/keyboards")); |
41 |
- |
42 |
-- log_print!( |
43 |
-- logging::Level::Debug, |
44 |
-- "load_layout_data_with_fallback() -> name:{}, purpose:{:?}, overlay:{}, layout_name:{}", |
45 |
-- name, purpose, overlay, &name |
46 |
-- ); |
47 |
-+ let layout_purpose = match overlay { |
48 |
-+ "" => match purpose { |
49 |
-+ ContentPurpose::Number => "number", |
50 |
-+ ContentPurpose::Digits => "number", |
51 |
-+ ContentPurpose::Phone => "number", |
52 |
-+ ContentPurpose::Terminal => "terminal", |
53 |
-+ _ => "", |
54 |
-+ }, |
55 |
-+ overlay => overlay, |
56 |
-+ }; |
57 |
- |
58 |
-- for (kind, source) in list_layout_sources(&name, kind, overlay, path) { |
59 |
-+ for (kind, source) in list_layout_sources(&name, kind, layout_purpose, path) { |
60 |
- let layout = load_layout_data(source.clone()); |
61 |
- match layout { |
62 |
- Err(e) => match (e, source) { |
63 |
--- |
64 |
-GitLab |
65 |
- |
66 |
- |
67 |
-From 190876903281774bf0f304269ad7f047f44482b1 Mon Sep 17 00:00:00 2001 |
68 |
-From: Dorota Czaplejewicz <dorota.czaplejewicz@××××.sm> |
69 |
-Date: Mon, 5 Apr 2021 10:36:41 +0000 |
70 |
-Subject: [PATCH 2/2] layouts: Make selection testable |
71 |
- |
72 |
-From now on, all the parameters for loading layout are handled inside a single pure function, which makes them possible to test. |
73 |
- |
74 |
-As a side benefit, the old preference order function composed of a mess of nested procedures is gone. |
75 |
---- |
76 |
- src/data.rs | 312 ++++++++++++++++++++++++++++++++++---------------- |
77 |
- src/layout.rs | 2 +- |
78 |
- 2 files changed, 212 insertions(+), 102 deletions(-) |
79 |
- |
80 |
-diff --git a/src/data.rs b/src/data.rs |
81 |
-index 71711c3f..29cd4ba4 100644 |
82 |
---- a/src/data.rs |
83 |
-+++ b/src/data.rs |
84 |
-@@ -69,8 +69,12 @@ pub mod c { |
85 |
- let overlay_str = as_str(&overlay) |
86 |
- .expect("Bad overlay name") |
87 |
- .expect("Empty overlay name"); |
88 |
-+ let overlay_str = match overlay_str { |
89 |
-+ "" => None, |
90 |
-+ other => Some(other), |
91 |
-+ }; |
92 |
- |
93 |
-- let (kind, layout) = load_layout_data_with_fallback(&name, type_, variant, &overlay_str); |
94 |
-+ let (kind, layout) = load_layout_data_with_fallback(&name, type_, variant, overlay_str); |
95 |
- let layout = ::layout::Layout::new(layout, kind); |
96 |
- Box::into_raw(Box::new(layout)) |
97 |
- } |
98 |
-@@ -113,97 +117,156 @@ impl fmt::Display for DataSource { |
99 |
- } |
100 |
- } |
101 |
- |
102 |
--type LayoutSource = (ArrangementKind, DataSource); |
103 |
-- |
104 |
--/// Lists possible sources, with 0 as the most preferred one |
105 |
--/// Trying order: native lang of the right kind, native base, |
106 |
--/// fallback lang of the right kind, fallback base |
107 |
--/// The `purpose` argument is not ContentPurpose, |
108 |
--/// but rather ContentPurpose and overlay in one. |
109 |
--fn list_layout_sources( |
110 |
-- name: &str, |
111 |
-- kind: ArrangementKind, |
112 |
-- purpose: &str, |
113 |
-- keyboards_path: Option<PathBuf>, |
114 |
--) -> Vec<LayoutSource> { |
115 |
-- // Just a simplification of often called code. |
116 |
-- let add_by_name = | |
117 |
-- mut ret: Vec<LayoutSource>, |
118 |
-- purpose: &str, |
119 |
-- name: &str, |
120 |
-- kind: &ArrangementKind, |
121 |
-- | -> Vec<LayoutSource> { |
122 |
-- let name = if purpose == "" { name.into() } |
123 |
-- else { format!("{}/{}", purpose, name) }; |
124 |
-- |
125 |
-- if let Some(path) = keyboards_path.clone() { |
126 |
-- ret.push(( |
127 |
-- kind.clone(), |
128 |
-- DataSource::File( |
129 |
-- path.join(name.clone()) |
130 |
-- .with_extension("yaml") |
131 |
-- ) |
132 |
-- )) |
133 |
-- } |
134 |
-- |
135 |
-- ret.push(( |
136 |
-- kind.clone(), |
137 |
-- DataSource::Resource(name) |
138 |
-- )); |
139 |
-- ret |
140 |
-- }; |
141 |
-- |
142 |
-- // Another grouping. |
143 |
-- let add_by_kind = |ret, purpose: &str, name: &str, kind| { |
144 |
-- let ret = match kind { |
145 |
-- &ArrangementKind::Base => ret, |
146 |
-- kind => add_by_name( |
147 |
-- ret, |
148 |
-- purpose, |
149 |
-- &name_with_arrangement(name.into(), kind), |
150 |
-- kind, |
151 |
-- ), |
152 |
-- }; |
153 |
-- |
154 |
-- add_by_name(ret, purpose, name, &ArrangementKind::Base) |
155 |
-+/* All functions in this family carry around ArrangementKind, |
156 |
-+ * because it's not guaranteed to be preserved, |
157 |
-+ * and the resulting layout needs to know which version was loaded. |
158 |
-+ * See `squeek_layout_get_kind`. |
159 |
-+ * Possible TODO: since this is used only in styling, |
160 |
-+ * and makes the below code nastier than needed, maybe it should go. |
161 |
-+ */ |
162 |
-+ |
163 |
-+/// Returns ordered names treating `name` as the base name, |
164 |
-+/// ignoring any `+` inside. |
165 |
-+fn _get_arrangement_names(name: &str, arrangement: ArrangementKind) |
166 |
-+ -> Vec<(ArrangementKind, String)> |
167 |
-+{ |
168 |
-+ let name_with_arrangement = match arrangement { |
169 |
-+ ArrangementKind::Base => name.into(), |
170 |
-+ ArrangementKind::Wide => format!("{}_wide", name), |
171 |
- }; |
172 |
-- |
173 |
-- fn name_with_arrangement( |
174 |
-- name: String, |
175 |
-- kind: &ArrangementKind, |
176 |
-- ) -> String { |
177 |
-- match kind { |
178 |
-- ArrangementKind::Base => name, |
179 |
-- ArrangementKind::Wide => name + "_wide", |
180 |
-- } |
181 |
-+ |
182 |
-+ let mut ret = Vec::new(); |
183 |
-+ if name_with_arrangement != name { |
184 |
-+ ret.push((arrangement, name_with_arrangement)); |
185 |
- } |
186 |
-+ ret.push((ArrangementKind::Base, name.into())); |
187 |
-+ ret |
188 |
-+} |
189 |
- |
190 |
-- let ret = Vec::new(); |
191 |
-- |
192 |
-- // Name as given takes priority. |
193 |
-- let ret = add_by_kind(ret, purpose, name, &kind); |
194 |
-- |
195 |
-- // Then try non-alternative name if applicable (`us` for `us+colemak`). |
196 |
-- let ret = { |
197 |
-+/// Returns names accounting for any `+` in the `name`, |
198 |
-+/// including the fallback to the default layout. |
199 |
-+fn get_preferred_names(name: &str, kind: ArrangementKind) |
200 |
-+ -> Vec<(ArrangementKind, String)> |
201 |
-+{ |
202 |
-+ let mut ret = _get_arrangement_names(name, kind); |
203 |
-+ |
204 |
-+ let base_name_preferences = { |
205 |
- let mut parts = name.splitn(2, '+'); |
206 |
- match parts.next() { |
207 |
- Some(base) => { |
208 |
-- // The name is already equal to base, so it was already added. |
209 |
-- if base == name { ret } |
210 |
-- else { |
211 |
-- add_by_kind(ret, purpose, base, &kind) |
212 |
-+ // The name is already equal to base, so nothing to add |
213 |
-+ if base == name { |
214 |
-+ vec![] |
215 |
-+ } else { |
216 |
-+ _get_arrangement_names(base, kind) |
217 |
- } |
218 |
- }, |
219 |
- // The layout's base name starts with a "+". Weird but OK. |
220 |
- None => { |
221 |
- log_print!(logging::Level::Surprise, "Base layout name is empty: {}", name); |
222 |
-- ret |
223 |
-+ vec![] |
224 |
- } |
225 |
- } |
226 |
- }; |
227 |
-+ |
228 |
-+ ret.extend(base_name_preferences.into_iter()); |
229 |
-+ let fallback_names = _get_arrangement_names(FALLBACK_LAYOUT_NAME, kind); |
230 |
-+ ret.extend(fallback_names.into_iter()); |
231 |
-+ ret |
232 |
-+} |
233 |
-+ |
234 |
-+/// Includes the subdirectory before the forward slash. |
235 |
-+type LayoutPath = String; |
236 |
-+ |
237 |
-+// This is only used inside iter_fallbacks_with_meta. |
238 |
-+// Placed at the top scope |
239 |
-+// because `use LayoutPurpose::*;` |
240 |
-+// complains about "not in scope" otherwise. |
241 |
-+// This seems to be a Rust 2015 edition problem. |
242 |
-+/// Helper for determining where to look up the layout. |
243 |
-+enum LayoutPurpose<'a> { |
244 |
-+ Default, |
245 |
-+ Special(&'a str), |
246 |
-+} |
247 |
-+ |
248 |
-+/// Returns the directory string |
249 |
-+/// where the layout should be looked up, including the slash. |
250 |
-+fn get_directory_string( |
251 |
-+ content_purpose: ContentPurpose, |
252 |
-+ overlay: Option<&str>) -> String |
253 |
-+{ |
254 |
-+ use self::LayoutPurpose::*; |
255 |
-+ |
256 |
-+ let layout_purpose = match overlay { |
257 |
-+ None => match content_purpose { |
258 |
-+ ContentPurpose::Number => Special("number"), |
259 |
-+ ContentPurpose::Digits => Special("number"), |
260 |
-+ ContentPurpose::Phone => Special("number"), |
261 |
-+ ContentPurpose::Terminal => Special("terminal"), |
262 |
-+ _ => Default, |
263 |
-+ }, |
264 |
-+ Some(overlay) => Special(overlay), |
265 |
-+ }; |
266 |
-+ |
267 |
-+ // For intuitiveness, |
268 |
-+ // default purpose layouts are stored in the root directory, |
269 |
-+ // as they correspond to typical text |
270 |
-+ // and are seen the most often. |
271 |
-+ match layout_purpose { |
272 |
-+ Default => "".into(), |
273 |
-+ Special(purpose) => format!("{}/", purpose), |
274 |
-+ } |
275 |
-+} |
276 |
- |
277 |
-- add_by_kind(ret, purpose, FALLBACK_LAYOUT_NAME.into(), &kind) |
278 |
-+/// Returns an iterator over all fallback paths. |
279 |
-+fn to_layout_paths( |
280 |
-+ name_fallbacks: Vec<(ArrangementKind, String)>, |
281 |
-+ content_purpose: ContentPurpose, |
282 |
-+ overlay: Option<&str>, |
283 |
-+) -> impl Iterator<Item=(ArrangementKind, LayoutPath)> { |
284 |
-+ let prepend_directory = get_directory_string(content_purpose, overlay); |
285 |
-+ |
286 |
-+ name_fallbacks.into_iter() |
287 |
-+ .map(move |(arrangement, name)| |
288 |
-+ (arrangement, format!("{}{}", prepend_directory, name)) |
289 |
-+ ) |
290 |
-+} |
291 |
- |
292 |
-+type LayoutSource = (ArrangementKind, DataSource); |
293 |
-+ |
294 |
-+fn to_layout_sources( |
295 |
-+ layout_paths: impl Iterator<Item=(ArrangementKind, LayoutPath)>, |
296 |
-+ filesystem_path: Option<PathBuf>, |
297 |
-+) -> impl Iterator<Item=LayoutSource> { |
298 |
-+ layout_paths.flat_map(move |(arrangement, layout_path)| { |
299 |
-+ let mut sources = Vec::new(); |
300 |
-+ if let Some(path) = &filesystem_path { |
301 |
-+ sources.push(( |
302 |
-+ arrangement, |
303 |
-+ DataSource::File( |
304 |
-+ path.join(&layout_path) |
305 |
-+ .with_extension("yaml") |
306 |
-+ ) |
307 |
-+ )); |
308 |
-+ }; |
309 |
-+ sources.push((arrangement, DataSource::Resource(layout_path.clone()))); |
310 |
-+ sources.into_iter() |
311 |
-+ }) |
312 |
-+} |
313 |
-+ |
314 |
-+/// Returns possible sources, with first as the most preferred one. |
315 |
-+/// Trying order: native lang of the right kind, native base, |
316 |
-+/// fallback lang of the right kind, fallback base |
317 |
-+fn iter_layout_sources( |
318 |
-+ name: &str, |
319 |
-+ arrangement: ArrangementKind, |
320 |
-+ purpose: ContentPurpose, |
321 |
-+ ui_overlay: Option<&str>, |
322 |
-+ layout_storage: Option<PathBuf>, |
323 |
-+) -> impl Iterator<Item=LayoutSource> { |
324 |
-+ let names = get_preferred_names(name, arrangement); |
325 |
-+ let paths = to_layout_paths(names, purpose, ui_overlay); |
326 |
-+ to_layout_sources(paths, layout_storage) |
327 |
- } |
328 |
- |
329 |
- fn load_layout_data(source: DataSource) |
330 |
-@@ -231,7 +294,7 @@ fn load_layout_data_with_fallback( |
331 |
- name: &str, |
332 |
- kind: ArrangementKind, |
333 |
- purpose: ContentPurpose, |
334 |
-- overlay: &str, |
335 |
-+ overlay: Option<&str>, |
336 |
- ) -> (ArrangementKind, ::layout::LayoutData) { |
337 |
- |
338 |
- // Build the path to the right keyboard layout subdirectory |
339 |
-@@ -239,18 +302,7 @@ fn load_layout_data_with_fallback( |
340 |
- .map(PathBuf::from) |
341 |
- .or_else(|| xdg::data_path("squeekboard/keyboards")); |
342 |
- |
343 |
-- let layout_purpose = match overlay { |
344 |
-- "" => match purpose { |
345 |
-- ContentPurpose::Number => "number", |
346 |
-- ContentPurpose::Digits => "number", |
347 |
-- ContentPurpose::Phone => "number", |
348 |
-- ContentPurpose::Terminal => "terminal", |
349 |
-- _ => "", |
350 |
-- }, |
351 |
-- overlay => overlay, |
352 |
-- }; |
353 |
-- |
354 |
-- for (kind, source) in list_layout_sources(&name, kind, layout_purpose, path) { |
355 |
-+ for (kind, source) in iter_layout_sources(&name, kind, purpose, overlay, path) { |
356 |
- let layout = load_layout_data(source.clone()); |
357 |
- match layout { |
358 |
- Err(e) => match (e, source) { |
359 |
-@@ -982,11 +1034,11 @@ mod tests { |
360 |
- |
361 |
- /// First fallback should be to builtin, not to FALLBACK_LAYOUT_NAME |
362 |
- #[test] |
363 |
-- fn fallbacks_order() { |
364 |
-- let sources = list_layout_sources("nb", ArrangementKind::Base, "", None); |
365 |
-+ fn test_fallback_basic_builtin() { |
366 |
-+ let sources = iter_layout_sources("nb", ArrangementKind::Base, ContentPurpose::Normal, None, None); |
367 |
- |
368 |
- assert_eq!( |
369 |
-- sources, |
370 |
-+ sources.collect::<Vec<_>>(), |
371 |
- vec!( |
372 |
- (ArrangementKind::Base, DataSource::Resource("nb".into())), |
373 |
- ( |
374 |
-@@ -996,14 +1048,36 @@ mod tests { |
375 |
- ) |
376 |
- ); |
377 |
- } |
378 |
-+ |
379 |
-+ /// Prefer loading from file system before builtin. |
380 |
-+ #[test] |
381 |
-+ fn test_preferences_order_path() { |
382 |
-+ let sources = iter_layout_sources("nb", ArrangementKind::Base, ContentPurpose::Normal, None, Some(".".into())); |
383 |
-+ |
384 |
-+ assert_eq!( |
385 |
-+ sources.collect::<Vec<_>>(), |
386 |
-+ vec!( |
387 |
-+ (ArrangementKind::Base, DataSource::File("./nb.yaml".into())), |
388 |
-+ (ArrangementKind::Base, DataSource::Resource("nb".into())), |
389 |
-+ ( |
390 |
-+ ArrangementKind::Base, |
391 |
-+ DataSource::File("./us.yaml".into()) |
392 |
-+ ), |
393 |
-+ ( |
394 |
-+ ArrangementKind::Base, |
395 |
-+ DataSource::Resource("us".into()) |
396 |
-+ ), |
397 |
-+ ) |
398 |
-+ ); |
399 |
-+ } |
400 |
- |
401 |
- /// If layout contains a "+", it should reach for what's in front of it too. |
402 |
- #[test] |
403 |
-- fn fallbacks_order_base() { |
404 |
-- let sources = list_layout_sources("nb+aliens", ArrangementKind::Base, "", None); |
405 |
-+ fn test_preferences_order_base() { |
406 |
-+ let sources = iter_layout_sources("nb+aliens", ArrangementKind::Base, ContentPurpose::Normal, None, None); |
407 |
- |
408 |
- assert_eq!( |
409 |
-- sources, |
410 |
-+ sources.collect::<Vec<_>>(), |
411 |
- vec!( |
412 |
- (ArrangementKind::Base, DataSource::Resource("nb+aliens".into())), |
413 |
- (ArrangementKind::Base, DataSource::Resource("nb".into())), |
414 |
-@@ -1016,22 +1090,58 @@ mod tests { |
415 |
- } |
416 |
- |
417 |
- #[test] |
418 |
-- fn fallbacks_terminal_order_base() { |
419 |
-- let sources = list_layout_sources("nb+aliens", ArrangementKind::Base, "terminal", None); |
420 |
-+ fn test_preferences_order_arrangement() { |
421 |
-+ let sources = iter_layout_sources("nb", ArrangementKind::Wide, ContentPurpose::Normal, None, None); |
422 |
- |
423 |
- assert_eq!( |
424 |
-- sources, |
425 |
-+ sources.collect::<Vec<_>>(), |
426 |
-+ vec!( |
427 |
-+ (ArrangementKind::Wide, DataSource::Resource("nb_wide".into())), |
428 |
-+ (ArrangementKind::Base, DataSource::Resource("nb".into())), |
429 |
-+ ( |
430 |
-+ ArrangementKind::Wide, |
431 |
-+ DataSource::Resource("us_wide".into()) |
432 |
-+ ), |
433 |
-+ ( |
434 |
-+ ArrangementKind::Base, |
435 |
-+ DataSource::Resource("us".into()) |
436 |
-+ ), |
437 |
-+ ) |
438 |
-+ ); |
439 |
-+ } |
440 |
-+ |
441 |
-+ #[test] |
442 |
-+ fn test_preferences_order_overlay() { |
443 |
-+ let sources = iter_layout_sources("nb", ArrangementKind::Base, ContentPurpose::Normal, Some("terminal"), None); |
444 |
-+ |
445 |
-+ assert_eq!( |
446 |
-+ sources.collect::<Vec<_>>(), |
447 |
- vec!( |
448 |
-- (ArrangementKind::Base, DataSource::Resource("terminal/nb+aliens".into())), |
449 |
- (ArrangementKind::Base, DataSource::Resource("terminal/nb".into())), |
450 |
- ( |
451 |
- ArrangementKind::Base, |
452 |
-- DataSource::Resource(format!("terminal/{}", FALLBACK_LAYOUT_NAME)) |
453 |
-+ DataSource::Resource("terminal/us".into()) |
454 |
- ), |
455 |
- ) |
456 |
- ); |
457 |
- } |
458 |
-- |
459 |
-+ |
460 |
-+ #[test] |
461 |
-+ fn test_preferences_order_hint() { |
462 |
-+ let sources = iter_layout_sources("nb", ArrangementKind::Base, ContentPurpose::Terminal, None, None); |
463 |
-+ |
464 |
-+ assert_eq!( |
465 |
-+ sources.collect::<Vec<_>>(), |
466 |
-+ vec!( |
467 |
-+ (ArrangementKind::Base, DataSource::Resource("terminal/nb".into())), |
468 |
-+ ( |
469 |
-+ ArrangementKind::Base, |
470 |
-+ DataSource::Resource("terminal/us".into()) |
471 |
-+ ), |
472 |
-+ ) |
473 |
-+ ); |
474 |
-+ } |
475 |
-+ |
476 |
- #[test] |
477 |
- fn unicode_keysym() { |
478 |
- let keysym = xkb::keysym_from_name( |
479 |
-diff --git a/src/layout.rs b/src/layout.rs |
480 |
-index 413795f0..0b8607b0 100644 |
481 |
---- a/src/layout.rs |
482 |
-+++ b/src/layout.rs |
483 |
-@@ -600,7 +600,7 @@ impl View { |
484 |
- } |
485 |
- |
486 |
- /// The physical characteristic of layout for the purpose of styling |
487 |
--#[derive(Clone, PartialEq, Debug)] |
488 |
-+#[derive(Clone, Copy, PartialEq, Debug)] |
489 |
- pub enum ArrangementKind { |
490 |
- Base = 0, |
491 |
- Wide = 1, |
492 |
--- |
493 |
-GitLab |
494 |
- |
495 |
|
496 |
diff --git a/x11-misc/squeekboard/files/450.patch b/x11-misc/squeekboard/files/450.patch |
497 |
deleted file mode 100644 |
498 |
index d50e412a8..000000000 |
499 |
--- a/x11-misc/squeekboard/files/450.patch |
500 |
+++ /dev/null |
501 |
@@ -1,38 +0,0 @@ |
502 |
-From 4fdce2802ad3ed8705c9629aa5622c89c70eabae Mon Sep 17 00:00:00 2001 |
503 |
-From: Dorota Czaplejewicz <dorota.czaplejewicz@××××.sm> |
504 |
-Date: Wed, 7 Apr 2021 15:26:18 +0000 |
505 |
-Subject: [PATCH] layouts: Stop assuming that layout name always changes on |
506 |
- switch |
507 |
- |
508 |
-Layout type switching outside of overlay was always done with gsettings in the middle, assuming that all clicks on languages in the popover result in a gsettings event. That's a bad assumption if there's only one xkb lang present. |
509 |
- |
510 |
-This is a simple work around. A better solution would be to turn the entire system of layout switching into a central object that receives messages about changes that need to be applied, and then applies them. |
511 |
---- |
512 |
- src/popover.rs | 11 ++++++++++- |
513 |
- 1 file changed, 10 insertions(+), 1 deletion(-) |
514 |
- |
515 |
-diff --git a/src/popover.rs b/src/popover.rs |
516 |
-index 92103869..0d909b82 100644 |
517 |
---- a/src/popover.rs |
518 |
-+++ b/src/popover.rs |
519 |
-@@ -213,7 +213,16 @@ fn set_visible_layout( |
520 |
- layout_id: LayoutId, |
521 |
- ) { |
522 |
- match layout_id { |
523 |
-- LayoutId::System { kind, name } => set_layout(kind, name), |
524 |
-+ LayoutId::System { kind, name } => { |
525 |
-+ unsafe { |
526 |
-+ use std::ptr; |
527 |
-+ manager::c::eekboard_context_service_set_overlay( |
528 |
-+ manager, |
529 |
-+ ptr::null(), |
530 |
-+ ); |
531 |
-+ } |
532 |
-+ set_layout(kind, name); |
533 |
-+ } |
534 |
- LayoutId::Local(name) => { |
535 |
- let name = CString::new(name.as_str()).unwrap(); |
536 |
- let name_ptr = name.as_ptr(); |
537 |
--- |
538 |
-GitLab |
539 |
- |
540 |
|
541 |
diff --git a/x11-misc/squeekboard/files/terminal.yaml b/x11-misc/squeekboard/files/terminal.yaml |
542 |
deleted file mode 100644 |
543 |
index d3b382a9e..000000000 |
544 |
--- a/x11-misc/squeekboard/files/terminal.yaml |
545 |
+++ /dev/null |
546 |
@@ -1,157 +0,0 @@ |
547 |
---- |
548 |
-outlines: |
549 |
- default: { width: 50, height: 50 } |
550 |
- altline: { width: 70, height: 50 } |
551 |
- spaceline: { width: 160, height: 50 } |
552 |
- special: { width: 35.33, height: 50 } |
553 |
- action: { width: 85, height: 35 } |
554 |
- fkey: { width: 41, height: 50 } |
555 |
- |
556 |
-views: |
557 |
- base: |
558 |
- - "1 2 3 4 5 6 7 8 9 0" |
559 |
- - "q w e r t y u i o p" |
560 |
- - "a s d f g h j k l" |
561 |
- - "Shift_L z x c v b n m BackSpace" |
562 |
- - "show_symbols show_eschars preferences space , . Return" |
563 |
- - "Ctrl Tab ↑ ↓ ← →" |
564 |
- upper: |
565 |
- - "! @ # $ % ^ & * ( )" |
566 |
- - "Q W E R T Y U I O P" |
567 |
- - "A S D F G H J K L" |
568 |
- - "Shift_L Z X C V B N M BackSpace" |
569 |
- - "show_symbols show_eschars preferences space < > Return" |
570 |
- - "Alt Esc PgUp PgDn Home End" |
571 |
- symbols: |
572 |
- - "~ ` ´ - _ + = ° © ®" |
573 |
- - "[ ] { } \\ | ÷ × √" |
574 |
- - "; : ' \" · € £ ¥" |
575 |
- - "Del / ? § π τ µ ¶ BackSpace" |
576 |
- - "show_letters show_eschars preferences space < > Return" |
577 |
- - "Ctrl Tab ↑ ↓ ← →" |
578 |
- eschars: |
579 |
- - "F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12" |
580 |
- - "ä è é ö ü Ä È É Ö Ü" |
581 |
- - "à â ê î ô À Â È Î Ô" |
582 |
- - "Del « » ç Ç æ œ ß BackSpace" |
583 |
- - "show_symbols show_eschars preferences space „ “ Return" |
584 |
- - "Alt Esc PgUp PgDn Home End" |
585 |
- |
586 |
-buttons: |
587 |
- Shift_L: |
588 |
- action: |
589 |
- locking: |
590 |
- lock_view: "upper" |
591 |
- unlock_view: "base" |
592 |
- outline: "altline" |
593 |
- icon: "key-shift" |
594 |
- Ctrl: |
595 |
- modifier: "Control" |
596 |
- outline: "action" |
597 |
- label: "Ctrl" |
598 |
- Alt: |
599 |
- modifier: "Alt" |
600 |
- outline: "action" |
601 |
- label: "Alt" |
602 |
- BackSpace: |
603 |
- outline: "altline" |
604 |
- icon: "edit-clear-symbolic" |
605 |
- action: "erase" |
606 |
- preferences: |
607 |
- action: "show_prefs" |
608 |
- outline: "special" |
609 |
- icon: "keyboard-mode-symbolic" |
610 |
- show_letters: |
611 |
- action: |
612 |
- set_view: "base" |
613 |
- outline: "altline" |
614 |
- label: "abc" |
615 |
- show_symbols: |
616 |
- action: |
617 |
- set_view: "symbols" |
618 |
- outline: "altline" |
619 |
- label: "[{/" |
620 |
- show_eschars: |
621 |
- action: |
622 |
- locking: |
623 |
- lock_view: "eschars" |
624 |
- unlock_view: "base" |
625 |
- outline: "altline" |
626 |
- label: "func" |
627 |
- space: |
628 |
- outline: "spaceline" |
629 |
- label: " " |
630 |
- text: " " |
631 |
- Return: |
632 |
- outline: "altline" |
633 |
- icon: "key-enter" |
634 |
- keysym: "Return" |
635 |
- F1: |
636 |
- outline: "fkey" |
637 |
- keysym: "F1" |
638 |
- F2: |
639 |
- outline: "fkey" |
640 |
- keysym: "F2" |
641 |
- F3: |
642 |
- outline: "fkey" |
643 |
- keysym: "F3" |
644 |
- F4: |
645 |
- outline: "fkey" |
646 |
- keysym: "F4" |
647 |
- F5: |
648 |
- outline: "fkey" |
649 |
- keysym: "F5" |
650 |
- F6: |
651 |
- outline: "fkey" |
652 |
- keysym: "F6" |
653 |
- F7: |
654 |
- outline: "fkey" |
655 |
- keysym: "F7" |
656 |
- F8: |
657 |
- outline: "fkey" |
658 |
- keysym: "F8" |
659 |
- F9: |
660 |
- outline: "fkey" |
661 |
- keysym: "F9" |
662 |
- F10: |
663 |
- outline: "fkey" |
664 |
- keysym: "F10" |
665 |
- F11: |
666 |
- outline: "fkey" |
667 |
- keysym: "F11" |
668 |
- F12: |
669 |
- outline: "fkey" |
670 |
- keysym: "F12" |
671 |
- Esc: |
672 |
- outline: "action" |
673 |
- keysym: "Escape" |
674 |
- Home: |
675 |
- outline: "action" |
676 |
- keysym: "Home" |
677 |
- End: |
678 |
- outline: "action" |
679 |
- keysym: "End" |
680 |
- Del: |
681 |
- outline: "altline" |
682 |
- keysym: "Delete" |
683 |
- PgUp: |
684 |
- outline: "action" |
685 |
- keysym: "Page_Up" |
686 |
- PgDn: |
687 |
- outline: "action" |
688 |
- keysym: "Page_Down" |
689 |
- Tab: |
690 |
- outline: "action" |
691 |
- keysym: "Tab" |
692 |
- "↑": |
693 |
- outline: "action" |
694 |
- keysym: "Up" |
695 |
- "↓": |
696 |
- outline: "action" |
697 |
- keysym: "Down" |
698 |
- "←": |
699 |
- outline: "action" |
700 |
- keysym: "Left" |
701 |
- "→": |
702 |
- outline: "action" |
703 |
- keysym: "Right" |
704 |
|
705 |
diff --git a/x11-misc/squeekboard/squeekboard-1.14.0.ebuild b/x11-misc/squeekboard/squeekboard-1.14.0.ebuild |
706 |
index c907141ea..2a85f038b 100644 |
707 |
--- a/x11-misc/squeekboard/squeekboard-1.14.0.ebuild |
708 |
+++ b/x11-misc/squeekboard/squeekboard-1.14.0.ebuild |
709 |
@@ -71,10 +71,10 @@ DEPEND=" |
710 |
" |
711 |
RDEPEND="${DEPEND}" |
712 |
BDEPEND=" |
713 |
- virtual/pkgconfig |
714 |
+ dev-util/gtk-doc |
715 |
dev-util/intltool |
716 |
+ virtual/pkgconfig |
717 |
virtual/rust |
718 |
- dev-util/gtk-doc |
719 |
" |
720 |
|
721 |
S="${WORKDIR}/${PN}-${MY_COMMIT}" |