Commit 87be10c
committed
ui,pop-ups: improved default target logic
When displaying a new pop-up, we set the default target based on:
- snap or appimages paths.
- user's preferences.
In order to respect user's preferences, the process path and cmdline
must be non-empty. If any of these properties is empty, then we
select by default the Destination Port of the connection.
However, in some cases the cmdline is empty while the path is not, but
we end up selecting the destination port as the default target anyway,
which causes confusion and in some cases too much pop-ups.
Now, if the cmdline is empty and the path is not, we'll select the path
of the process as the default target.
see #1521 for more details.1 parent 444a4b5 commit 87be10c
2 files changed
Lines changed: 20 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
25 | 32 | | |
26 | 33 | | |
27 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
| 132 | + | |
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
141 | | - | |
| 141 | + | |
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
| |||
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
244 | 250 | | |
245 | | - | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
246 | 254 | | |
247 | | - | |
| 255 | + | |
| 256 | + | |
248 | 257 | | |
249 | 258 | | |
250 | 259 | | |
| |||
0 commit comments