[virt-tools-list] [PATCH virt-viewer] Register remote-viewer mime handling
Christophe Fergeau
cfergeau at redhat.com
Mon Feb 11 11:50:47 UTC 2013
On Mon, Jan 21, 2013 at 07:52:59PM +0100, Marc-André Lureau wrote:
> Unfortunately, I don't see yet how we could avoid the browser dialog
> asking which application to open. On Firefox, each user has a
> mimeTypes.rdf, but we can't really modify it..
> ---
> data/Makefile.am | 22 +++++++++++++++++++---
> data/remote-viewer.desktop.in | 9 +++++++++
> data/virt-viewer-mime.xml.in | 11 +++++++++++
> src/Makefile.am | 5 -----
> src/remote-viewer.desktop | 6 ------
> 5 files changed, 39 insertions(+), 14 deletions(-)
> create mode 100644 data/remote-viewer.desktop.in
> create mode 100644 data/virt-viewer-mime.xml.in
> delete mode 100644 src/remote-viewer.desktop
>
> diff --git a/data/Makefile.am b/data/Makefile.am
> index 2c3d739..d53eea4 100644
> --- a/data/Makefile.am
> +++ b/data/Makefile.am
> @@ -1,9 +1,10 @@
> -NULL=
> +NULL =
> +CLEANFILES =
>
> EXTRA_DIST = \
> spice-xpi-client-remote-viewer \
> virt-viewer.nsis.in \
> - virt-viewer-debug.nsis.in \
> + virt-viewer-debug.nsis.in \
> $(NULL)
>
> if OS_WIN32
> @@ -16,7 +17,22 @@ virt-viewer-$(VERSION).exe: virt-viewer.nsis deps.txt
> makensis -NOCD -DDESTDIR=$$DESTDIR $< >/dev/null && \
> rm -rf $$DESTDIR
>
> -CLEANFILES = deps.txt virt-viewer-$(VERSION).exe
> +CLEANFILES += deps.txt virt-viewer-$(VERSION).exe
> +
> +else #!WIN32
> +
> +desktopdir = $(datadir)/applications
> +desktop_in_files = remote-viewer.desktop.in
> +desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
> + at INTLTOOL_DESKTOP_RULE@
> +
> +MIMEFILES = virt-viewer-mime.xml.in
> +mimedir = $(datadir)/mime/packages
> +mime_DATA = virt-viewer-mime.xml
> + at INTLTOOL_XML_RULE@
virt-viewer-mime.xml.in and remote-viewer.desktop.in needs to be added to
po/POTFILES.in
Do they get dist-ed properly, or do they need to be added to EXTRA_DIST as
well?
> +
> +CLEANFILES += $(mime_DATA) $(desktop_DATA)
> +
> endif
>
> -include $(top_srcdir)/git.mk
> diff --git a/data/remote-viewer.desktop.in b/data/remote-viewer.desktop.in
> new file mode 100644
> index 0000000..7fdfd47
> --- /dev/null
> +++ b/data/remote-viewer.desktop.in
> @@ -0,0 +1,9 @@
> +[Desktop Entry]
> +_Name=Remote Viewer
> +_Comment=Access remote desktops
> +Exec=remote-viewer %u
> +Type=Application
> +Terminal=false
> +MimeType=x-scheme-handler/spice;application/x-virt-viewer
Not related to this patch (so no patch changes needed), but
x-scheme-handler/spice is not necessarily correct as we can compile without
SPICE support. Similarly, don't we handle
vnc:// as well?
Looks good otherwise,
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20130211/52430ebd/attachment.sig>
More information about the virt-tools-list
mailing list