rpms/glib2/devel desktopfiles.patch, NONE, 1.1 glib2.spec, 1.146, 1.147
Matthias Clasen (mclasen)
fedora-extras-commits at redhat.com
Sat Dec 22 18:06:58 UTC 2007
- Previous message (by thread): rpms/perl-Module-ExtractUse/F-8 perl-Module-ExtractUse.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Next message (by thread): rpms/perl-Test-YAML-Valid/F-8 perl-Test-YAML-Valid.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: mclasen
Update of /cvs/extras/rpms/glib2/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25987
Modified Files:
glib2.spec
Added Files:
desktopfiles.patch
Log Message:
fix desktop file handling
desktopfiles.patch:
--- NEW FILE desktopfiles.patch ---
diff -up glib-2.15.0/gio/gdesktopappinfo.c.desktopfiles glib-2.15.0/gio/gdesktopappinfo.c
--- glib-2.15.0/gio/gdesktopappinfo.c.desktopfiles 2007-12-22 12:43:05.000000000 -0500
+++ glib-2.15.0/gio/gdesktopappinfo.c 2007-12-22 12:43:17.000000000 -0500
@@ -920,10 +920,10 @@ static gboolean
g_desktop_app_info_supports_uris (GAppInfo *appinfo)
{
GDesktopAppInfo *info = G_DESKTOP_APP_INFO (appinfo);
-
- return
- (strstr (info->exec, "%u") != NULL) ||
- (strstr (info->exec, "%U") != NULL);
+
+ return info->exec &&
+ ((strstr (info->exec, "%u") != NULL) ||
+ (strstr (info->exec, "%U") != NULL));
}
static gboolean
@@ -1581,7 +1581,8 @@ g_app_info_get_default_for_type (const c
* g_app_info_get_default_for_uri_scheme:
* @uri_scheme: a string containing a URI scheme.
*
- * Gets the default application for launching applications using this URI scheme.
+ * Gets the default application for launching applications
+ * using this URI scheme.
*
* TODO: This is currently unimplemented.
*
@@ -1625,11 +1626,12 @@ get_apps_from_dir (GHashTable *apps,
/* Don't return apps that don't take arguments */
if (appinfo &&
- g_desktop_app_info_get_is_hidden (appinfo) &&
- strstr (appinfo->exec,"%U") == NULL &&
- strstr (appinfo->exec,"%u") == NULL &&
- strstr (appinfo->exec,"%f") == NULL &&
- strstr (appinfo->exec,"%F") == NULL)
+ (g_desktop_app_info_get_is_hidden (appinfo) ||
+ (appinfo->exec &&
+ strstr (appinfo->exec,"%U") == NULL &&
+ strstr (appinfo->exec,"%u") == NULL &&
+ strstr (appinfo->exec,"%f") == NULL &&
+ strstr (appinfo->exec,"%F") == NULL)))
{
g_object_unref (appinfo);
appinfo = NULL;
@@ -1679,7 +1681,7 @@ g_app_info_get_all (void)
const char * const *dirs;
GHashTable *apps;
GHashTableIter iter;
- gpointer key;
+ gpointer value;
int i;
GList *infos;
@@ -1695,8 +1697,8 @@ g_app_info_get_all (void)
infos = NULL;
g_hash_table_iter_init (&iter, apps);
- while (g_hash_table_iter_next (&iter, &key, NULL))
- infos = g_list_prepend (infos, key);
+ while (g_hash_table_iter_next (&iter, NULL, &value))
+ infos = g_list_prepend (infos, value);
g_hash_table_destroy (apps);
@@ -2142,13 +2144,13 @@ append_desktop_entry (GList *list,
* get_all_desktop_entries_for_mime_type:
* @mime_type: a mime type.
*
- * Returns all the desktop filenames for @mime_type. The desktop files
+ * Returns all the desktop ids for @mime_type. The desktop files
* are listed in an order so that default applications are listed before
* non-default ones, and handlers for inherited mimetypes are listed
* after the base ones.
*
- * Return value: a #GList containing the desktop filenames containing the
- * @mime_type.
+ * Return value: a #GList containing the desktop ids which claim
+ * to handle @mime_type.
*/
static GList *
get_all_desktop_entries_for_mime_type (const char *base_mime_type)
diff -up glib-2.15.0/gio/gappinfo.c.desktopfiles glib-2.15.0/gio/gappinfo.c
--- glib-2.15.0/gio/gappinfo.c.desktopfiles 2007-12-22 12:42:57.000000000 -0500
+++ glib-2.15.0/gio/gappinfo.c 2007-12-22 12:43:17.000000000 -0500
@@ -139,6 +139,9 @@ g_app_info_equal (GAppInfo *appinfo1,
* platform dependent. For instance on Unix this is the
* desktop file id from the xdg menu specification.
*
+ * Note that the returned ID may be %NULL, depending on how
+ * the @appinfo has been constructed.
+ *
* Returns: a string containing the application's ID.
**/
const char *
@@ -180,8 +183,7 @@ g_app_info_get_name (GAppInfo *appinfo)
* Gets a human-readable description of an installed application.
*
* Returns: a string containing a description of the
- * application @appinfo, or %NULL if none. The returned string should be not freed
- * when no longer needed.
+ * application @appinfo, or %NULL if none.
**/
const char *
g_app_info_get_description (GAppInfo *appinfo)
Index: glib2.spec
===================================================================
RCS file: /cvs/extras/rpms/glib2/devel/glib2.spec,v
retrieving revision 1.146
retrieving revision 1.147
diff -u -r1.146 -r1.147
--- glib2.spec 21 Dec 2007 11:09:38 -0000 1.146
+++ glib2.spec 22 Dec 2007 18:06:02 -0000 1.147
@@ -3,13 +3,14 @@
Summary: A library of handy utility functions
Name: glib2
Version: 2.15.0
-Release: 2%{?dist}
+Release: 3%{?dist}
License: LGPLv2+
Group: System Environment/Libraries
URL: http://www.gtk.org
Source: http://download.gnome.org/sources/glib/2.15/glib-%{version}.tar.bz2
Source2: glib2.sh
Source3: glib2.csh
+Patch0: desktopfiles.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: pkgconfig >= 1:0.14
BuildRequires: gamin-devel
@@ -48,7 +49,11 @@
%prep
%setup -q -n glib-%{version}
+<<<<<<< glib2.spec
+%patch0 -p1 -b .desktopfiles
+=======
%patch0 -p1 -b .gtestutils.patch
+>>>>>>> 1.146
%build
for i in config.guess config.sub ; do
@@ -124,6 +129,9 @@
%{_libdir}/lib*.a
%changelog
+* Sat Dec 22 2007 Matthias Clasen <mclasen at redhat.com> - 2.15.0-3
+- Fix some errors in desktop files handling
+
* Fri Dec 21 2007 Caolan McNamara <caolanm at redhat.com> - 2.15.0-2
- add jakubs patch in so xulrunner will build and so gcc too
- Previous message (by thread): rpms/perl-Module-ExtractUse/F-8 perl-Module-ExtractUse.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Next message (by thread): rpms/perl-Test-YAML-Valid/F-8 perl-Test-YAML-Valid.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list