xdg-app-chooser: update comment about default application

It seems that now, the default is changed.
This commit is contained in:
Vincent Bernat 2024-06-10 13:42:18 +02:00
parent 8235201167
commit 14418580ff

View file

@ -3,22 +3,21 @@
"""Simple application selector relying on GTK app chooser dialog.
"""
# This doesn't allow to set a default application for a MIME type. Use
# "xdg-mime default something.desktop mime/type" to change a default.
# Usually, it will update ~/.config/mimeapps.list.
# This also sets the default application for a MIME type (similar to "xdg-mime
# default something.desktop mime/type"). Usually, it will update
# ~/.config/mimeapps.list.
import argparse
import sys
import gi
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk, Gio
parser = argparse.ArgumentParser(description=sys.modules[__name__].__doc__)
parser.add_argument("file", metavar="FILE", help="file to open")
options = parser.parse_args()
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk, Gio
# Query MIME TYPE
f = Gio.File.new_for_path(options.file)
file_info = f.query_info("standard::content-type", 0)