- Add upstream patch to allow building with the new GIO file monitoring API
This commit is contained in:
parent
27b9c78961
commit
fbab864f1d
70
gnome-menus-2.21.3-gio-monitor-api.patch
Normal file
70
gnome-menus-2.21.3-gio-monitor-api.patch
Normal file
@ -0,0 +1,70 @@
|
||||
--- trunk/libmenu/menu-monitor-gio.c 2007/12/14 14:53:01 810
|
||||
+++ trunk/libmenu/menu-monitor-gio.c 2008/01/08 12:41:59 825
|
||||
@@ -68,8 +68,8 @@
|
||||
void
|
||||
menu_monitor_backend_register_monitor (MenuMonitor *monitor)
|
||||
{
|
||||
- GObject *backend = NULL;
|
||||
GFile *file;
|
||||
+ GFileMonitor *file_monitor;
|
||||
|
||||
file = g_file_new_for_path (menu_monitor_get_path (monitor));
|
||||
|
||||
@@ -82,47 +82,33 @@
|
||||
}
|
||||
|
||||
if (menu_monitor_get_is_directory (monitor))
|
||||
- {
|
||||
- GDirectoryMonitor *dmonitor = g_file_monitor_directory (file, G_FILE_MONITOR_NONE, NULL);
|
||||
-
|
||||
- if (dmonitor)
|
||||
- backend = G_OBJECT (dmonitor);
|
||||
- }
|
||||
+ file_monitor = g_file_monitor_directory (file, G_FILE_MONITOR_NONE, NULL);
|
||||
else
|
||||
- {
|
||||
- GFileMonitor *fmonitor = g_file_monitor_file (file, G_FILE_MONITOR_NONE, NULL);
|
||||
-
|
||||
- if (fmonitor)
|
||||
- backend = G_OBJECT (fmonitor);
|
||||
- }
|
||||
+ file_monitor = g_file_monitor_file (file, G_FILE_MONITOR_NONE, NULL);
|
||||
|
||||
g_object_unref (G_OBJECT (file));
|
||||
|
||||
- if (backend == NULL)
|
||||
+ if (file_monitor == NULL)
|
||||
{
|
||||
menu_verbose ("Not adding %s monitor on '%s', failed to create monitor\n",
|
||||
menu_monitor_get_is_directory (monitor) ? "directory" : "file",
|
||||
menu_monitor_get_path (monitor));
|
||||
return;
|
||||
}
|
||||
-
|
||||
- g_signal_connect (backend, "changed", G_CALLBACK (monitor_callback), monitor);
|
||||
|
||||
- menu_monitor_set_backend_data (monitor, backend);
|
||||
+ g_signal_connect (file_monitor, "changed", G_CALLBACK (monitor_callback), monitor);
|
||||
+
|
||||
+ menu_monitor_set_backend_data (monitor, file_monitor);
|
||||
}
|
||||
|
||||
void
|
||||
menu_monitor_backend_unregister_monitor (MenuMonitor *monitor)
|
||||
{
|
||||
- GObject *backend;
|
||||
+ GFileMonitor *file_monitor;
|
||||
|
||||
- if ((backend = G_OBJECT (menu_monitor_get_backend_data (monitor))) != NULL)
|
||||
+ if ((file_monitor = menu_monitor_get_backend_data (monitor)) != NULL)
|
||||
{
|
||||
- if (G_IS_FILE_MONITOR (backend))
|
||||
- g_file_monitor_cancel (G_FILE_MONITOR (backend));
|
||||
- else
|
||||
- g_directory_monitor_cancel (G_DIRECTORY_MONITOR (backend));
|
||||
-
|
||||
- g_object_unref (backend);
|
||||
+ g_file_monitor_cancel (file_monitor);
|
||||
+ g_object_unref (file_monitor);
|
||||
}
|
||||
}
|
@ -6,7 +6,7 @@
|
||||
Summary: A menu system for the GNOME project
|
||||
Name: gnome-menus
|
||||
Version: 2.21.3
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
License: LGPLv2+
|
||||
Group: System Environment/Libraries
|
||||
URL: http://www.gnome.org/
|
||||
@ -21,6 +21,9 @@ BuildRequires: perl(XML::Parser)
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: python2-devel >= 2.3.0
|
||||
|
||||
# http://bugzilla.gnome.org/show_bug.cgi?id=507938
|
||||
Patch0: gnome-menus-2.21.3-gio-monitor-api.patch
|
||||
|
||||
%description
|
||||
gnome-menus is an implementation of the draft "Desktop
|
||||
Menu Specification" from freedesktop.org. This package
|
||||
@ -44,6 +47,8 @@ writing applications that use the GNOME menu system.
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%patch0 -p2 -b .gio-monitor-api
|
||||
|
||||
%build
|
||||
%configure --with-monitor-backend=gio \
|
||||
%if %{enable_debugging}
|
||||
@ -98,6 +103,10 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{_includedir}/gnome-menus
|
||||
|
||||
%changelog
|
||||
* Wed Jan 09 2008 - Bastien Nocera <bnocera@redhat.com> - 2.21.3-2
|
||||
- Add upstream patch to allow building with the new GIO file
|
||||
monitoring API
|
||||
|
||||
* Sat Dec 22 2007 Matthias Clasen <mclasen@redhat.com> - 2.21.3-1
|
||||
- Update to 2.21.3
|
||||
- Use gio for file monitoring
|
||||
|
Loading…
Reference in New Issue
Block a user