Fix banshee getting selected as the default movie player

This commit is contained in:
Bastien Nocera 2014-09-04 19:57:15 +02:00 committed by Kalev Lember
parent 7962bc7f42
commit 7955a29170
2 changed files with 40 additions and 1 deletions

33
broken-default-apps.patch Normal file
View File

@ -0,0 +1,33 @@
From 450fea253095c7dd8a6293af8f86ea9b81ad46b2 Mon Sep 17 00:00:00 2001
From: Ryan Lortie <desrt@desrt.ca>
Date: Thu, 4 Sep 2014 13:17:27 -0400
Subject: [PATCH] GDesktopAppInfo: fix default app logic
We use "tweaks" structures to track how a particular directory impacts
the list of added, removed and default applications. We maintain this
set of tweaks for each directory, in a hash table, keyed by unaliased
mime type name, in order to facilitate fast lookups.
A typo in the logic for creating and maintaining the uniqueness of these
structures was causing the default app to be selected incorrectly from
time to time. Fix that.
---
gio/gdesktopappinfo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c
index 1d38d4a..ddec690 100644
--- a/gio/gdesktopappinfo.c
+++ b/gio/gdesktopappinfo.c
@@ -641,7 +641,7 @@ desktop_file_dir_unindexed_get_tweaks (DesktopFileDir *dir,
gchar *unaliased_type;
unaliased_type = _g_unix_content_type_unalias (mime_type);
- tweaks = g_hash_table_lookup (dir->mime_tweaks, mime_type);
+ tweaks = g_hash_table_lookup (dir->mime_tweaks, unaliased_type);
if (tweaks == NULL)
{
--
1.9.3

View File

@ -3,7 +3,7 @@
Summary: A library of handy utility functions
Name: glib2
Version: 2.41.4
Release: 1%{?dist}
Release: 2%{?dist}
License: LGPLv2+
Group: System Environment/Libraries
URL: http://www.gtk.org
@ -30,6 +30,8 @@ BuildRequires: chrpath
# required for GIO content-type support
Requires: shared-mime-info
Patch0: broken-default-apps.patch
%description
GLib is the low-level core library that forms the basis for projects
such as GTK+ and GNOME. It provides data structure handling for C,
@ -81,6 +83,7 @@ the functionality of the installed glib2 package.
%prep
%setup -q -n glib-%{version}
%patch0 -p1
%build
# Support builds of both git snapshots and tarballs packed with autogoo
@ -219,6 +222,9 @@ gio-querymodules-%{__isa_bits} %{_libdir}/gio/modules
%{_datadir}/installed-tests
%changelog
* Thu Sep 04 2014 Bastien Nocera <bnocera@redhat.com> 2.41.4-2
- Fix banshee getting selected as the default movie player
* Tue Sep 02 2014 Kalev Lember <kalevlember@gmail.com> - 2.41.4-1
- Update to 2.41.4