[systemsettings] [Bug 305136] File associations are broken in gtk/glib apps due to lack of /usr/share/applications/kde-mimeapps.list file installed by default

2024-02-14 Thread Harald Sitter
https://bugs.kde.org/show_bug.cgi?id=305136

Harald Sitter  changed:

   What|Removed |Added

  Latest Commit|https://invent.kde.org/plas |https://invent.kde.org/fram
   |ma/plasma-desktop/-/commit/ |eworks/kservice/-/commit/c3
   |dfca581a1fb934a1146286441cd |47606b240bfd1c65f46abd43e65
   |051981c50b673   |fffb1f18053

--- Comment #40 from Harald Sitter  ---
Git commit c347606b240bfd1c65f46abd43e65fffb1f18053 by Harald Sitter.
Committed on 14/02/2024 at 09:15.
Pushed by sitter into branch 'master'.

kservice: remove InitialPreference

Since this was a KDE specific feature it caused problems with
interoperability. Applications based on other XDG implementations would
entirely ignore it and by extension have a different idea of what
application should be used to open a given mimetype. Instead we now rely
only on the XDG provided facilities to manage preference. Specifically
plasma-desktop is meant to ship a kde-mimeapps.list that encodes the
Plasma default preferences and distributions are meant to ship
*mimeapps.list to encode sensible preferences beyond that.

M  +5-12   autotests/kmimeassociationstest.cpp
M  +10   -83   src/services/kservice.cpp
M  +0-29   src/services/kservice.h
M  +1-5src/services/kservice_p.h
M  +7-7src/services/kservicefactory.cpp
M  +1-1src/services/kservicefactory_p.h
M  +4-5src/sycoca/kbuildservicefactory.cpp
M  +1-1src/sycoca/ksycoca.cpp

https://invent.kde.org/frameworks/kservice/-/commit/c347606b240bfd1c65f46abd43e65fffb1f18053

-- 
You are receiving this mail because:
You are watching all bug changes.

[systemsettings] [Bug 305136] File associations are broken in gtk/glib apps due to lack of /usr/share/applications/kde-mimeapps.list file installed by default

2024-02-13 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=305136

Nate Graham  changed:

   What|Removed |Added

   Version Fixed In||6.0

-- 
You are receiving this mail because:
You are watching all bug changes.

[systemsettings] [Bug 305136] File associations are broken in gtk/glib apps due to lack of /usr/share/applications/kde-mimeapps.list file installed by default

2024-02-13 Thread Harald Sitter
https://bugs.kde.org/show_bug.cgi?id=305136

Harald Sitter  changed:

   What|Removed |Added

  Latest Commit|https://invent.kde.org/plas |https://invent.kde.org/plas
   |ma/plasma-desktop/-/commit/ |ma/plasma-desktop/-/commit/
   |89c68cd74ee439adf1ac8526b3e |dfca581a1fb934a1146286441cd
   |3780894c3157f   |051981c50b673

--- Comment #39 from Harald Sitter  ---
Git commit dfca581a1fb934a1146286441cd051981c50b673 by Harald Sitter.
Committed on 13/02/2024 at 11:12.
Pushed by sitter into branch 'Plasma/6.0'.

install a kde-mimeapps.list

introducing a mimeapps.list has a number of advantages

- formalized encoding of default choices based on xdg tech
- non-kde apps will also respect this when inside a plasma session
- it paves the way to drop our initialpreference tech which has various
problems in a world where applications use any number of different xdg
implementations of which not all will be privy to the initialpreference

the list of defaults is seeded from the componentchooser kcm, plus
discover defaults used in neon already

(this file is part of plasma-desktop since mobile choices may be
divergent, making it a bad fit for plasma-workspace)


(cherry picked from commit 89c68cd74ee439adf1ac8526b3e3780894c3157f)

M  +1-0CMakeLists.txt
A  +152  -0kde-mimeapps.list

https://invent.kde.org/plasma/plasma-desktop/-/commit/dfca581a1fb934a1146286441cd051981c50b673

-- 
You are receiving this mail because:
You are watching all bug changes.

[systemsettings] [Bug 305136] File associations are broken in gtk/glib apps due to lack of /usr/share/applications/kde-mimeapps.list file installed by default

2024-02-13 Thread Harald Sitter
https://bugs.kde.org/show_bug.cgi?id=305136

Harald Sitter  changed:

   What|Removed |Added

  Latest Commit||https://invent.kde.org/plas
   ||ma/plasma-desktop/-/commit/
   ||89c68cd74ee439adf1ac8526b3e
   ||3780894c3157f
 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #38 from Harald Sitter  ---
Git commit 89c68cd74ee439adf1ac8526b3e3780894c3157f by Harald Sitter.
Committed on 13/02/2024 at 10:46.
Pushed by sitter into branch 'master'.

install a kde-mimeapps.list

introducing a mimeapps.list has a number of advantages

- formalized encoding of default choices based on xdg tech
- non-kde apps will also respect this when inside a plasma session
- it paves the way to drop our initialpreference tech which has various
problems in a world where applications use any number of different xdg
implementations of which not all will be privy to the initialpreference

the list of defaults is seeded from the componentchooser kcm, plus
discover defaults used in neon already

(this file is part of plasma-desktop since mobile choices may be
divergent, making it a bad fit for plasma-workspace)

M  +1-0CMakeLists.txt
A  +152  -0kde-mimeapps.list

https://invent.kde.org/plasma/plasma-desktop/-/commit/89c68cd74ee439adf1ac8526b3e3780894c3157f

-- 
You are receiving this mail because:
You are watching all bug changes.

[systemsettings] [Bug 305136] File associations are broken in gtk/glib apps due to lack of /usr/share/applications/kde-mimeapps.list file installed by default

2024-02-12 Thread Bug Janitor Service
https://bugs.kde.org/show_bug.cgi?id=305136

--- Comment #37 from Bug Janitor Service  ---
A possibly relevant merge request was started @
https://invent.kde.org/frameworks/kservice/-/merge_requests/181

-- 
You are receiving this mail because:
You are watching all bug changes.

[systemsettings] [Bug 305136] File associations are broken in gtk/glib apps due to lack of /usr/share/applications/kde-mimeapps.list file installed by default

2024-02-09 Thread Bug Janitor Service
https://bugs.kde.org/show_bug.cgi?id=305136

--- Comment #36 from Bug Janitor Service  ---
A possibly relevant merge request was started @
https://invent.kde.org/frameworks/kservice/-/merge_requests/179

-- 
You are receiving this mail because:
You are watching all bug changes.

[systemsettings] [Bug 305136] File associations are broken in gtk/glib apps due to lack of /usr/share/applications/kde-mimeapps.list file installed by default

2024-02-08 Thread Bug Janitor Service
https://bugs.kde.org/show_bug.cgi?id=305136

Bug Janitor Service  changed:

   What|Removed |Added

 Status|CONFIRMED   |ASSIGNED

--- Comment #35 from Bug Janitor Service  ---
A possibly relevant merge request was started @
https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/2030

-- 
You are receiving this mail because:
You are watching all bug changes.

[systemsettings] [Bug 305136] File associations are broken in gtk/glib apps due to lack of /usr/share/applications/kde-mimeapps.list file installed by default

2024-01-08 Thread Ilya Fedin
https://bugs.kde.org/show_bug.cgi?id=305136

--- Comment #34 from Ilya Fedin  ---
portal uses glib, not the KDE associations. IMO, KDE should really get rid of
non-standardized additions, all other implementations don't support them.

-- 
You are receiving this mail because:
You are watching all bug changes.

[systemsettings] [Bug 305136] File associations are broken in gtk/glib apps due to lack of /usr/share/applications/kde-mimeapps.list file installed by default

2024-01-07 Thread Pols12
https://bugs.kde.org/show_bug.cgi?id=305136

--- Comment #33 from Pols12  ---
(In reply to mcarans from comment #32)
> I forgot to add that KDE itself opens the correct application. It is Firefox
> that opened the wrong one.

I know, but KDE gets default associations from KSycoca, so you need to force it
to edit mimeapps.list with the method I gave (or to manually edit the file).
However, if you have found a workaround, that’s it.

-- 
You are receiving this mail because:
You are watching all bug changes.

[systemsettings] [Bug 305136] File associations are broken in gtk/glib apps due to lack of /usr/share/applications/kde-mimeapps.list file installed by default

2024-01-07 Thread mcarans
https://bugs.kde.org/show_bug.cgi?id=305136

--- Comment #32 from mcarans  ---
(In reply to Pols12 from comment #31)
> (In reply to mcarans from comment #30)
> > What should I change to make the correct application open when I double 
> > click deb in the
> > Firefox download manager? I have a file 
> > /usr/share/applications/defaults.list in my distro
> > (Kubuntu) if that's any help.
> 
> If I remember correctly, KDE well edits `$HOME/.config/mimeapps.list` when
> you customize your file associations. So, from ComponentChooser or from
> Dolphin, change the default application for .deb, then change back to your
> wanted application. I think that will solve your issue.

I forgot to add that KDE itself opens the correct application. It is Firefox
that opened the wrong one. However, I was alerted on r/kde to the Firefox
config settings: widget.use-xdg-desktop-portal* which if all set to 1 force the
use of portal and hence KDE associations.

-- 
You are receiving this mail because:
You are watching all bug changes.

[systemsettings] [Bug 305136] File associations are broken in gtk/glib apps due to lack of /usr/share/applications/kde-mimeapps.list file installed by default

2024-01-07 Thread Pols12
https://bugs.kde.org/show_bug.cgi?id=305136

--- Comment #31 from Pols12  ---
(In reply to mcarans from comment #30)
> What should I change to make the correct application open when I double click 
> deb in the
> Firefox download manager? I have a file /usr/share/applications/defaults.list 
> in my distro
> (Kubuntu) if that's any help.

If I remember correctly, KDE well edits `$HOME/.config/mimeapps.list` when you
customize your file associations. So, from ComponentChooser or from Dolphin,
change the default application for .deb, then change back to your wanted
application. I think that will solve your issue.

-- 
You are receiving this mail because:
You are watching all bug changes.

[systemsettings] [Bug 305136] File associations are broken in gtk/glib apps due to lack of /usr/share/applications/kde-mimeapps.list file installed by default

2024-01-04 Thread mcarans
https://bugs.kde.org/show_bug.cgi?id=305136

mcarans  changed:

   What|Removed |Added

 CC||mcar...@yahoo.co.uk

--- Comment #30 from mcarans  ---
(In reply to David Faure from comment #27)
> The idea was that it's fine for Gnome to ignore our InitialPreference and
> it's fine for KDE to ignore Gnome's global file, since we want different
> defaults. But Gnome's global file was supposed to be called
> gnome-mimeapps.list, not defaults.list.

I find that double clicking a deb file in the Firefox download manager opens
Ark.  I understand from this Firefox bug:
https://bugzilla.mozilla.org/show_bug.cgi?id=1304650 that Firefox uses
g_app_info_get_default_for_type to work out what to open. What should I change
to make the correct application open when I double click deb in the Firefox
download manager? I have a file /usr/share/applications/defaults.list in my
distro (Kubuntu) if that's any help.

-- 
You are receiving this mail because:
You are watching all bug changes.

[systemsettings] [Bug 305136] File associations are broken in gtk/glib apps due to lack of /usr/share/applications/kde-mimeapps.list file installed by default

2023-12-26 Thread Sam James
https://bugs.kde.org/show_bug.cgi?id=305136

Sam James  changed:

   What|Removed |Added

 CC||s...@gentoo.org

-- 
You are receiving this mail because:
You are watching all bug changes.

[systemsettings] [Bug 305136] File associations are broken in gtk/glib apps due to lack of /usr/share/applications/kde-mimeapps.list file installed by default

2023-02-13 Thread David Redondo
https://bugs.kde.org/show_bug.cgi?id=305136

--- Comment #29 from David Redondo  ---
> The idea was that it's fine for Gnome to ignore our InitialPreference and 
> it's fine for KDE to ignore Gnome's global file, since we want different 
> defaults.

Yes but glib applications inside plasma will still open the "wrong" application
since glib can't know InitialPreference. We would either need to generate a
kde-mimeapps.list that respects the order or maybe more elegant teach
update-desktop-database InitialPreference so in mimeinfo.cache the order is
what we (KDE) expect and not alphabetically.

> But Gnome's global file was supposed to be called gnome-mimeapps.list, not 
> defaults.list.

The seem to carry it has deprecated for backwards compat
https://gitlab.gnome.org/GNOME/glib/-/blob/main/gio/gdesktopappinfo.c#L1021
Maybe it could only be read in GNOME session guarded by an env var.

>Isn't it the distro's fault of providing the legacy file?

Yes. It illustrates that it is a hard problem with non-standard from both
sides.

-- 
You are receiving this mail because:
You are watching all bug changes.

[systemsettings] [Bug 305136] File associations are broken in gtk/glib apps due to lack of /usr/share/applications/kde-mimeapps.list file installed by default

2023-02-13 Thread Ilya Fedin
https://bugs.kde.org/show_bug.cgi?id=305136

--- Comment #28 from Ilya Fedin  ---
Isn't it the distro's fault of providing the legacy file?

-- 
You are receiving this mail because:
You are watching all bug changes.

[systemsettings] [Bug 305136] File associations are broken in gtk/glib apps due to lack of /usr/share/applications/kde-mimeapps.list file installed by default

2023-02-13 Thread David Faure
https://bugs.kde.org/show_bug.cgi?id=305136

--- Comment #27 from David Faure  ---
The idea was that it's fine for Gnome to ignore our InitialPreference and it's
fine for KDE to ignore Gnome's global file, since we want different defaults.
But Gnome's global file was supposed to be called gnome-mimeapps.list, not
defaults.list.

-- 
You are receiving this mail because:
You are watching all bug changes.

[systemsettings] [Bug 305136] File associations are broken in gtk/glib apps due to lack of /usr/share/applications/kde-mimeapps.list file installed by default

2023-02-08 Thread David Redondo
https://bugs.kde.org/show_bug.cgi?id=305136

David Redondo  changed:

   What|Removed |Added

 CC||k...@david-redondo.de

--- Comment #26 from David Redondo  ---
I investigated this because Firefox was choosing gedit for plain/text instead
of kate. 

For me the problem was not that we do not provide or generate a default
mimeapps list or a that GLib is not following our 'InitialPreference' but my
distro was providing a 

/usr/share/applications/defaults.list

file which sets gedit as default. This file is not in the spec but something
histotical and glib specific. With this file removed firefox correctly chooses
kate .

So there are two issues that we have a non-standard key that gio doesn't
support and gio has a non-standard file that we do not know about.

-- 
You are receiving this mail because:
You are watching all bug changes.

[systemsettings] [Bug 305136] File associations are broken in gtk/glib apps due to lack of /usr/share/applications/kde-mimeapps.list file installed by default

2023-01-02 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=305136

Nate Graham  changed:

   What|Removed |Added

   Priority|NOR |HI

--- Comment #25 from Nate Graham  ---
Seems sane!

-- 
You are receiving this mail because:
You are watching all bug changes.

[systemsettings] [Bug 305136] File associations are broken in gtk/glib apps due to lack of /usr/share/applications/kde-mimeapps.list file installed by default

2023-01-01 Thread postix
https://bugs.kde.org/show_bug.cgi?id=305136

--- Comment #24 from postix  ---
Nate, would you mind to make this bug to the "15-minute bug initiative"? It's
something one can very quickly discover when using a GTK application and it's
very annoying. :)

Until it's solved for everyone, this should work:

```
$ cat /usr/share/applications/mimeapps.list
[Added Associations]

[Default Applications]
image/gif=org.kde.gwenview.desktop;
image/jpeg=org.kde.gwenview.desktop;
image/png=org.kde.gwenview.desktop;
image/webp=org.kde.gwenview.desktop;

[Removed Associations]
application/pdf=chromium.desktop;claws-mail.desktop;
application/rdf+xml=chromium.desktop;
application/rss+xml=chromium.desktop;
application/xhtml+xml=chromium.desktop;
application/xhtml_xml=chromium.desktop;
application/xml=chromium.desktop;
image/gif=chromium.desktop;
image/jpeg=chromium.desktop;
image/png=chromium.desktop;
image/webp=chromium.desktop;
text/html=chromium.desktop;
text/xml=chromium.desktop;
x-scheme-handler/http=chromium.desktop;
x-scheme-handler/https=chromium.desktop;
```

-- 
You are receiving this mail because:
You are watching all bug changes.

[systemsettings] [Bug 305136] File associations are broken in gtk/glib apps due to lack of /usr/share/applications/kde-mimeapps.list file installed by default

2022-11-08 Thread Celeste Liu
https://bugs.kde.org/show_bug.cgi?id=305136

Celeste Liu  changed:

   What|Removed |Added

 CC||coelacanthus...@gmail.com

-- 
You are receiving this mail because:
You are watching all bug changes.

[systemsettings] [Bug 305136] File associations are broken in gtk/glib apps due to lack of /usr/share/applications/kde-mimeapps.list file installed by default

2022-10-19 Thread bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=305136

prettyvani...@posteo.at changed:

   What|Removed |Added

 CC||prettyvani...@posteo.at

-- 
You are receiving this mail because:
You are watching all bug changes.

[systemsettings] [Bug 305136] File associations are broken in gtk/glib apps due to lack of /usr/share/applications/kde-mimeapps.list file installed by default

2022-10-03 Thread bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=305136

gudvinr+...@gmail.com changed:

   What|Removed |Added

 CC||gudvinr+...@gmail.com

--- Comment #23 from gudvinr+...@gmail.com ---
https://bugzilla.mozilla.org/show_bug.cgi?id=1304650

Relevant Firefox issue

-- 
You are receiving this mail because:
You are watching all bug changes.

[systemsettings] [Bug 305136] File associations are broken in gtk/glib apps due to lack of /usr/share/applications/kde-mimeapps.list file installed by default

2022-08-25 Thread nyanpasu64
https://bugs.kde.org/show_bug.cgi?id=305136

--- Comment #22 from nyanpasu64  ---
One detail I failed to realize or mention earlier, is that in GTK file managers
like Thunar (and probably Nautilus), opening a file in a particular app (even
without setting it as default) actually sets a "soft" default file association
by reordering the file format's entry in mimeapps.list [Added Associations].
For example, if you open Thunar, right-click a .zip file, and pick Open With ->
Open With "Archive Manager" (or pick "Open With Other Application..." and in
the dialog *don't* check "Use as default for this kind of file"), then
~/.config/mimeapps.list [Added Associations] gets a new entry
`application/zip=org.gnome.FileRoller.desktop;...`, where org.gnome.FileRoller
(Archive Manager) comes first. I think this is accomplished through
g_app_info_set_as_last_used_for_type()
(https://docs.gtk.org/gio/method.AppInfo.set_as_last_used_for_type.html ->
g_desktop_app_info_set_as_last_used_for_type
https://gitlab.gnome.org/GNOME/glib/-/blob/62a9a8a660fadf2355342b1d95c539432c666fe1/gio/gdesktopappinfo.c#L3865).
KDE/Qt's Dolphin respects the "soft" default association from [Added
Associations], but does not set [Added Associations] when you open a file in an
app.

In Thunar, if you open properties of a .zip file and set a default *there*,
then a [Default Applications] entry gets created (probably
g_app_info_set_as_default_for_type()
https://docs.gtk.org/gio/method.AppInfo.set_as_default_for_type.html). At this
point, Thunar's "Open With" menu still reorders the format's entry in [Added
Associations], but the order's first entry is ignored in favor of the
association in [Default Applications].

-- 
You are receiving this mail because:
You are watching all bug changes.

[systemsettings] [Bug 305136] File associations are broken in gtk/glib apps due to lack of /usr/share/applications/kde-mimeapps.list file installed by default

2022-08-25 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=305136

Nate Graham  changed:

   What|Removed |Added

Summary|File associations are   |File associations are
   |broken in gtk/glib apps |broken in gtk/glib apps due
   ||to lack of
   ||/usr/share/applications/kde
   ||-mimeapps.list file
   ||installed by default

-- 
You are receiving this mail because:
You are watching all bug changes.