Commit a775502
committed
fix: location handling — persist user overrides and enforce location list policy
Locations (and name/type overrides) assigned from the context menu were
never persisted: the DiscoveryManager stores were not saved in the UI
preferences nor reloaded at startup, so everything was lost on restart.
- Persist and restore location_overrides, name_overrides and
type_overrides in the UI preferences; wire the manager's
location-prefs dirty callback through a thread-safe Qt signal so
auto-stored locations are saved too.
- Drop the FR/EN equivalence table in normalize_location_options:
no translation handling, labels are shown as-is with case-insensitive
dedup only (first occurrence wins, user entries are never replaced).
- New DiscoveryManager.set_location_policy(list, auto_add): a discovered
(mDNS/SSDP) location is applied only when present in the configured
list (reusing the list's exact spelling, no case duplicates) or when
"Add location" is enabled (then added to the list as-is); otherwise
the device stays in "no location". Explicit user overrides always win.
- Context menu now always offers the device's current location alongside
the configured options (location_options_with_current).
- Main window falls back to the locale default location presets when no
list is configured; the auto-add flag from the Preferences dialog is
now actually propagated.
Bump version1 parent 94cf969 commit a775502
4 files changed
Lines changed: 90 additions & 35 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
289 | 289 | | |
290 | 290 | | |
291 | 291 | | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
292 | 296 | | |
293 | 297 | | |
294 | 298 | | |
| |||
1726 | 1730 | | |
1727 | 1731 | | |
1728 | 1732 | | |
| 1733 | + | |
| 1734 | + | |
| 1735 | + | |
| 1736 | + | |
| 1737 | + | |
| 1738 | + | |
| 1739 | + | |
| 1740 | + | |
| 1741 | + | |
| 1742 | + | |
| 1743 | + | |
| 1744 | + | |
1729 | 1745 | | |
1730 | 1746 | | |
1731 | 1747 | | |
| |||
2642 | 2658 | | |
2643 | 2659 | | |
2644 | 2660 | | |
2645 | | - | |
2646 | | - | |
2647 | | - | |
2648 | | - | |
2649 | | - | |
2650 | | - | |
2651 | | - | |
2652 | | - | |
| 2661 | + | |
| 2662 | + | |
| 2663 | + | |
| 2664 | + | |
| 2665 | + | |
| 2666 | + | |
| 2667 | + | |
| 2668 | + | |
| 2669 | + | |
| 2670 | + | |
| 2671 | + | |
| 2672 | + | |
| 2673 | + | |
| 2674 | + | |
| 2675 | + | |
| 2676 | + | |
| 2677 | + | |
| 2678 | + | |
| 2679 | + | |
2653 | 2680 | | |
2654 | 2681 | | |
2655 | 2682 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| |||
296 | 296 | | |
297 | 297 | | |
298 | 298 | | |
| 299 | + | |
299 | 300 | | |
300 | 301 | | |
301 | 302 | | |
| |||
375 | 376 | | |
376 | 377 | | |
377 | 378 | | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
378 | 382 | | |
379 | 383 | | |
380 | 384 | | |
| |||
406 | 410 | | |
407 | 411 | | |
408 | 412 | | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
409 | 426 | | |
410 | 427 | | |
411 | 428 | | |
| |||
416 | 433 | | |
417 | 434 | | |
418 | 435 | | |
| 436 | + | |
419 | 437 | | |
420 | 438 | | |
421 | 439 | | |
422 | 440 | | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
423 | 444 | | |
424 | 445 | | |
425 | 446 | | |
| |||
1038 | 1059 | | |
1039 | 1060 | | |
1040 | 1061 | | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
1041 | 1065 | | |
1042 | 1066 | | |
1043 | 1067 | | |
| |||
1110 | 1134 | | |
1111 | 1135 | | |
1112 | 1136 | | |
1113 | | - | |
| 1137 | + | |
1114 | 1138 | | |
| 1139 | + | |
| 1140 | + | |
1115 | 1141 | | |
1116 | 1142 | | |
1117 | 1143 | | |
| |||
1470 | 1496 | | |
1471 | 1497 | | |
1472 | 1498 | | |
| 1499 | + | |
| 1500 | + | |
1473 | 1501 | | |
1474 | 1502 | | |
1475 | 1503 | | |
| |||
1646 | 1674 | | |
1647 | 1675 | | |
1648 | 1676 | | |
1649 | | - | |
1650 | | - | |
1651 | | - | |
1652 | | - | |
| 1677 | + | |
1653 | 1678 | | |
1654 | 1679 | | |
1655 | 1680 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | 24 | | |
36 | | - | |
| 25 | + | |
37 | 26 | | |
38 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
39 | 31 | | |
40 | 32 | | |
41 | | - | |
| 33 | + | |
42 | 34 | | |
43 | 35 | | |
44 | 36 | | |
45 | 37 | | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
52 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
0 commit comments