Accepting request 62242 from GNOME:Factory
Accepted submit request 62242 from user dimstar OBS-URL: https://build.opensuse.org/request/show/62242 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/glib2?expand=0&rev=107
This commit is contained in:
commit
4f43f63390
45
glib2-fix-default-mime-handler.patch
Normal file
45
glib2-fix-default-mime-handler.patch
Normal file
@ -0,0 +1,45 @@
|
||||
commit 862c5a86d7ac24e1607749fe7c3ce772727c2691
|
||||
Author: Vincent Untz <vuntz@gnome.org>
|
||||
Date: Sun Feb 20 10:41:17 2011 +0100
|
||||
|
||||
appinfo: Do not override system default handler with less specific one
|
||||
|
||||
We were considering explicitly configured defaults for parent types
|
||||
after we already got results for the specific type we're interested in.
|
||||
|
||||
This resulted in the explicit default for text/plain to override all
|
||||
system defaults for subtypes of text/plain, for example. The explicit
|
||||
default should not apply to subtypes that have a system default.
|
||||
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=642797
|
||||
|
||||
diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c
|
||||
index 61ef54c..f81d3db 100644
|
||||
--- a/gio/gdesktopappinfo.c
|
||||
+++ b/gio/gdesktopappinfo.c
|
||||
@@ -3059,14 +3059,18 @@ get_all_desktop_entries_for_mime_type (const char *base_mime_type,
|
||||
{
|
||||
dir = dir_list->data;
|
||||
|
||||
- /* Pick the explicit default application */
|
||||
- entry = g_hash_table_lookup (dir->mimeapps_list_defaults_map, mime_type);
|
||||
-
|
||||
- if (entry != NULL)
|
||||
+ /* Pick the explicit default application if we got no result earlier
|
||||
+ * (ie, for more specific mime types) */
|
||||
+ if (desktop_entries == NULL)
|
||||
{
|
||||
- /* Save the default entry if it's the first one we encounter */
|
||||
- if (default_entry == NULL)
|
||||
- default_entry = g_strdup (entry);
|
||||
+ entry = g_hash_table_lookup (dir->mimeapps_list_defaults_map, mime_type);
|
||||
+
|
||||
+ if (entry != NULL)
|
||||
+ {
|
||||
+ /* Save the default entry if it's the first one we encounter */
|
||||
+ if (default_entry == NULL)
|
||||
+ default_entry = g_strdup (entry);
|
||||
+ }
|
||||
}
|
||||
|
||||
/* Then added associations from mimeapps.list */
|
@ -1,3 +1,12 @@
|
||||
-------------------------------------------------------------------
|
||||
Sun Feb 20 10:38:00 CET 2011 - vuntz@opensuse.org
|
||||
|
||||
- Add glib2-fix-default-mime-handler.patch: this fixes an issue
|
||||
where a user has configured a handler for a relatively generic
|
||||
mime type, that breaks the default mime handler for subtypes. For
|
||||
example, if gvim is explicitly configured to open text/plain,
|
||||
then LibreOffice documents will also open in gvim.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Feb 13 14:11:08 CET 2011 - vuntz@opensuse.org
|
||||
|
||||
|
@ -50,6 +50,8 @@ Patch10: glib2-bgo569829-gettext-gkeyfile.patch
|
||||
Patch11: glib2-fate300461-gettext-gkeyfile-suse.patch
|
||||
# PATCH-FIX-UPSTREAM glib2-force-fam-for-remote-fs.patch bgo#592211 hpj@novell.com -- Try monitoring files on NFS mounts via FAM before falling back to inotify.
|
||||
Patch12: glib2-force-fam-for-remote-fs.patch
|
||||
# PATCH-FIX-UPSTREAM glib2-fix-default-mime-handler.patch bgo#642797 vuntz@opensuse.org -- Fix default mime handler to not be the one of a user-configured less-specific mime type
|
||||
Patch13: glib2-fix-default-mime-handler.patch
|
||||
BuildRequires: fam-devel
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: gcc-c++
|
||||
@ -256,6 +258,7 @@ translation-update-upstream
|
||||
%patch10 -p1
|
||||
%patch11 -p1
|
||||
%patch12 -p1
|
||||
%patch13 -p1
|
||||
cp -a %{S:1} %{S:2} %{S:3} .
|
||||
cp -a %{S:4} gnome_defaults.conf
|
||||
if ! test -f %{_datadir}/aclocal/gtk-doc.m4 ; then
|
||||
|
Loading…
Reference in New Issue
Block a user