#1961 closed enhancement (fixed)
easier start-command: expose applications
Reported by: | Antoine Martin | Owned by: | Antoine Martin |
---|---|---|---|
Priority: | major | Milestone: | 2.5 |
Component: | core | Version: | 2.3.x |
Keywords: | Cc: |
Description
We can use python-xdg Menu to get the list of .desktop applications.
And inotify to watch for changes.
Then if the client supports it, we send the list of commands - and maybe inline a small version of the icon?
Then the start-command dialog can offer a menu.
(on mswindows, we could use Programmatically access All Users Start Menu, macos: not sure)
Change History (18)
comment:1 Changed 2 years ago by
Milestone: | 3.0 → 2.5 |
---|---|
Status: | new → assigned |
comment:2 Changed 2 years ago by
comment:3 Changed 2 years ago by
Really like this feature but think it could be more accessible from the main tray menu. What do you think?
Forgive my horrible Python coding but a quick example is here:
https://github.com/mjharkin/Xpra/commit/63daf5a7e48f704bf0e8df0462c3d7fcad7b0f02
comment:4 Changed 2 years ago by
Owner: | changed from Antoine Martin to Mark Harkin |
---|---|
Status: | assigned → new |
Updates:
@mjharkin: is that good enough? I've renamed the menu entry to "start" amongst other changes.
Still TODO:
- some icons are missing - not sure why, especially for categories
- the cost of sending the icons can be high (hundreds of KB), so it might be worth using a dedicated packet for "xdg-data" to avoid slowing down the initial "hello" packet - could also be used with inotify to send updates when the menu data changes (ie: application added or removed)
- not sure we should keep the "start command" menu entry under server, it is mostly redundant now
- we could recycle it to add a "custom command" menu entry, maybe at the bottom of the category list?
comment:5 Changed 2 years ago by
I think start.png is missing from the r20813 commit.
I've the same issue with category icons.
Otherwise looks great.
Thanks.
comment:6 Changed 2 years ago by
Owner: | changed from Mark Harkin to Antoine Martin |
---|---|
Status: | new → assigned |
comment:7 Changed 2 years ago by
r20846 avoid errors with win32 clients: convert xpm icons to png server-side before sending.
comment:8 Changed 2 years ago by
code made more resilient in r20850: found some xpm icons that pillow could not load, we now log a warning and continue without.
comment:10 Changed 2 years ago by
With the changes for xpm load failure handling r20850, if the icon fails to load there is no menu item created. Could this be changed to load with a default icon or no icon?
Thanks.
comment:11 Changed 2 years ago by
mjharkin: try r20882, which should also fix the icon loading for tricky 'xpm' files: we now try loading with GTK first, and fallback to Pillow only if that fails. (and failures won't fail the whole desktop entry)
comment:13 Changed 2 years ago by
XDG commands can also include %f %F %u %U placeholders.
(https://portland.freedesktop.org/xdg-utils-1.1.0-rc1/scripts/html/xdg-desktop-menu.html)
I think it's best to remove them on the client side, incase we want to use them later on.
Something like this should fix the issue for now:
In gtk_tray_menu_base.py->make_applaunch_menu_item()
import re ... command = re.sub('\%[fFuU]', '', command)
comment:14 Changed 2 years ago by
mjharkin: thanks, applied in r20913.
Yes, those could eventually be used to support "open with xyz on server".
comment:15 Changed 2 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Packaging fix for win32 in r20966.
comment:16 Changed 2 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Some SVG icons must have text in them, because the win32 builds moan about fonts:
(Xpra:4056): Pango-WARNING **: couldn't load font "Bitstream Vera Sans Not-Rotated 11.7294921875", \ falling back to "Sans Not-Rotated 11.7294921875", expect ugly output.
Avoid SVG? Convert to bitmap icons on the fly? Find a way to silence the warning?
Just ignore it?
Some relevant info: Pango unable to find fonts with librsvg
comment:17 Changed 2 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Let's ignore the warning since we can't silence it: https://stackoverflow.com/a/18955845/428751: I found out this is currently not possible and a known bug within either gobject-introspection or glib, since g_log_set_handler is not bindable, links to gobject-introspection: g_log_set_handler is not available
comment:18 Changed 6 weeks ago by
this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/1961
Done in r20699.
Still TODO:
CellRendererPixbuf
, ie: http://python.zirael.org/e-gtk-combobox1.html