[virt-tools-list] [PATCH virt-viewer] Register remote-viewer mime handling
Marc-André Lureau
marcandre.lureau at gmail.com
Wed Feb 6 12:16:45 UTC 2013
ping
On Tue, Jan 29, 2013 at 2:39 PM, Marc-André Lureau
<marcandre.lureau at gmail.com> wrote:
> ping
>
> On Mon, Jan 21, 2013 at 7:52 PM, Marc-André Lureau
> <marcandre.lureau at gmail.com> 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@
>> +
>> +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
>> +StartupNotify=true
>> +Categories=GNOME;GTK;Network;RemoteAccess;
>> diff --git a/data/virt-viewer-mime.xml.in b/data/virt-viewer-mime.xml.in
>> new file mode 100644
>> index 0000000..9fe9ff3
>> --- /dev/null
>> +++ b/data/virt-viewer-mime.xml.in
>> @@ -0,0 +1,11 @@
>> +<?xml version="1.0" encoding="UTF-8"?>
>> +<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
>> + <mime-type type="application/x-virt-viewer">
>> + <sub-class-of type="text/plain"/>
>> + <_comment>Virt-Viewer connection file</_comment>
>> + <magic priority="50">
>> + <match type="string" offset="0" value="[virt-viewer]"/>
>> + </magic>
>> + <glob pattern="*.vv"/>
>> + </mime-type>
>> +</mime-info>
>> diff --git a/src/Makefile.am b/src/Makefile.am
>> index 05e20b2..d14ab01 100644
>> --- a/src/Makefile.am
>> +++ b/src/Makefile.am
>> @@ -136,11 +136,6 @@ if OS_WIN32
>> remote_viewer_LDFLAGS += -Wl,--subsystem,windows
>> endif
>>
>> -desktopdir = $(datadir)/applications
>> -desktop_DATA = remote-viewer.desktop
>> -
>> -EXTRA_DIST += $(desktop_DATA)
>> -
>> VIRT_VIEWER_RES = virt-viewer.rc virt-viewer.manifest
>> ICONDIR = $(top_builddir)/icons
>> MANIFESTDIR = $(srcdir)
>> diff --git a/src/remote-viewer.desktop b/src/remote-viewer.desktop
>> deleted file mode 100644
>> index 7de7f6e..0000000
>> --- a/src/remote-viewer.desktop
>> +++ /dev/null
>> @@ -1,6 +0,0 @@
>> -[Desktop Entry]
>> -Name=Remote Viewer
>> -Exec=remote-viewer %u
>> -Type=Application
>> -Terminal=false
>> -MimeType=x-scheme-handler/spice;
>> --
>> 1.8.1.rc1.17.g75ed918
>>
>
>
>
> --
> Marc-André Lureau
--
Marc-André Lureau
More information about the virt-tools-list
mailing list