add application/x-gpx+xml, application/x-osm+xml, application/x-esri-shape to the mime-type database

Review Request #106977 - Created Oct. 21, 2012 and submitted

Information
Friedrich W. H. Kossebau
marble
Reviewers
marble
This patch installs an extension of the mimetype database for the three file types.

This way such files get a nicer display in the file dialogs/managers and can also finally be bound to the Marble program by the mimetype ids.

To have Marble noted as handler for application/x-esri-shape only if the related plugin is installed, I followed the advise of Albert, see http://lists.kde.org/?l=kde-devel&m=135083816331959&w=2

Still to do after this patch:
* have the view zoom to the loaded shape/track

Patch additionally installs a mimetype for the Esri shapefile index, so this file at least looks better in the filemanager.
That mimetype is made up by me. Not sure if this is useful, could also remove this from the patch if you prefer. For that reason I have also not yet added entries for the two other additional file types with shapefiles.

PS: After applying the patch and installing somehow the new info about the mimetypes and that marble supports them seems to not make it to all running programs. For me it worked only completely after a restart of the workspace session, so please try that before reporting problems.
Clicking an gpx file or a shape file starts Marble and loads the file.

Issues

  • 0
  • 3
  • 0
  • 3
Description From Last Updated
Friedrich W. H. Kossebau
Friedrich W. H. Kossebau
Torsten Rahn
Torsten Rahn
Friedrich W. H. Kossebau
Friedrich W. H. Kossebau
Torsten Rahn
Commit Hook
Friedrich W. H. Kossebau
Review request changed

Status: Closed (submitted)

Bernhard Beschow
When I try to compile the Qt-only version with this patch, I get the following error message from cmake:

CMake Error at data/CMakeLists.txt:275 (find_package):
  By not providing "FindSharedMimeInfo.cmake" in CMAKE_MODULE_PATH this
  project has asked CMake to find a package configuration file provided by
  "SharedMimeInfo", but CMake did not find one.

  Could not find a package configuration file provided by "SharedMimeInfo"
  with any of the following names:

    SharedMimeInfoConfig.cmake
    sharedmimeinfo-config.cmake

  Add the installation prefix of "SharedMimeInfo" to CMAKE_PREFIX_PATH or set
  "SharedMimeInfo_DIR" to a directory containing one of the above files.  If
  "SharedMimeInfo" provides a separate development package or SDK, be sure it
  has been installed.

I'm not sure whether the SharedMimeInfo package is available on all platforms we support (esp. the Qt-only ones, e.g. Windows, where it might not be available or applicable). Therefore, I wonder how to proceed. Any thoughts?
  1. Indeed, overlooked that.
    
    Did Dennis' solution he commited fix all issues related to this for you?
Thibaut Gridel
A bit early commit... please allow us to comment :)

Couldn't the behaviour be the same for every plugin?
I mean that gpx, osm and shp are all runner plugins, so if eg someone disables gpx the install shouldn't setup gpx mime info.

Otherwise thanks for fixing this!
  1. Right, seems I was too eager to get this stuff in as fast as possible, should have waited a few more days and not just for the first "Ship it" to appear.
    
    The reason I only used that separate-desktop-files approach for shapefiles was that to me it looked that gpx and osm are always built and installed, at least I saw nothing in the src/plugins/runner/../CMakeLists.txt which hinted that gpx and osm are optional, perhaps I missed something?
    
    Then of course it would be perhaps less complex if there was not an exception in the treatment of the shp plugin, but instead all import(?) plugins are treated the same way. Hm. Your call :)
  2. Ah, seems the hint Bernhard gave me initially about that some distris are packaging each plugin in a different package had slipped from my mind again.
    
    So right, that separate .desktop file as set for the shp plugin needs to be done for each of the plugins.
    Will prepare a patch for that tonight or tomorrow, if noone beats me to it.
Loading...