From ea71a73eb7665674adef01c01c2ba0ea193a9589 Mon Sep 17 00:00:00 2001 From: rh Date: Sun, 4 May 2003 01:10:57 +0000 Subject: Make nautilus slightly more responsive when compiled with pth by yielding the CPU every 200 ms. Bump PKGREVISION. --- sysutils/nautilus/Makefile | 4 ++-- sysutils/nautilus/distinfo | 3 ++- sysutils/nautilus/patches/patch-af | 40 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 44 insertions(+), 3 deletions(-) create mode 100644 sysutils/nautilus/patches/patch-af (limited to 'sysutils') diff --git a/sysutils/nautilus/Makefile b/sysutils/nautilus/Makefile index 282b14f3e07..a1cac18d053 100644 --- a/sysutils/nautilus/Makefile +++ b/sysutils/nautilus/Makefile @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.3 2003/05/02 11:56:26 wiz Exp $ +# $NetBSD: Makefile,v 1.4 2003/05/04 01:10:57 rh Exp $ # DISTNAME= nautilus-2.2.3.1 -PKGREVISION= 2 +PKGREVISION= 3 CATEGORIES= sysutils gnome MASTER_SITES= ${MASTER_SITE_GNOME:=sources/nautilus/2.2/} EXTRACT_SUFX= .tar.bz2 diff --git a/sysutils/nautilus/distinfo b/sysutils/nautilus/distinfo index afd246010ae..187df0fe41f 100644 --- a/sysutils/nautilus/distinfo +++ b/sysutils/nautilus/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.2 2003/04/27 16:05:03 jmmv Exp $ +$NetBSD: distinfo,v 1.3 2003/05/04 01:10:57 rh Exp $ SHA1 (nautilus-2.2.3.1.tar.bz2) = 1e2055d4a6b9e35c2bc08a017a77601f7fc5074e Size (nautilus-2.2.3.1.tar.bz2) = 4558276 bytes @@ -7,3 +7,4 @@ SHA1 (patch-ab) = 38390bb0d8b705f561f8e2d30a323b78a982a777 SHA1 (patch-ac) = ee6b0d6df93fa3aa44ab86754322067f586dd0e2 SHA1 (patch-ad) = b994f9e62aef5794ef7caf3f4da1335dac681e28 SHA1 (patch-ae) = a67d8b7ba3a1b9a71958736ef4946be301e67124 +SHA1 (patch-af) = dbdfb1e7e2103a3174fddaccad64868781052057 diff --git a/sysutils/nautilus/patches/patch-af b/sysutils/nautilus/patches/patch-af new file mode 100644 index 00000000000..531e8b5de63 --- /dev/null +++ b/sysutils/nautilus/patches/patch-af @@ -0,0 +1,40 @@ +$NetBSD: patch-af,v 1.1 2003/05/04 01:10:58 rh Exp $ + +--- src/nautilus-main.c.orig Sat Mar 15 01:34:55 2003 ++++ src/nautilus-main.c +@@ -56,6 +56,24 @@ + #include + #include + ++#ifdef __NetBSD__ ++#include ++ ++/* ++ * Pth is non-preemptive, so we yield the processor periodically ++ */ ++ ++#ifdef _PTH_PTHREAD_H_ ++static gint ++pth_nbschedule (gpointer data) ++{ ++ sched_yield(); ++ ++ return TRUE; ++} ++#endif /* _PTH_PTHREAD_H_ */ ++#endif /* __NetBSD__ */ ++ + /* Keeps track of everyone who wants the main event loop kept active */ + static GSList *event_loop_registrants; + +@@ -259,6 +277,10 @@ main (int argc, char *argv[]) + } else { + /* Run the nautilus application. */ + application = nautilus_application_new (); ++ ++#ifdef _PTH_PTHREAD_H_ ++ gtk_timeout_add (200, pth_nbschedule, NULL); ++#endif + nautilus_application_startup + (application, + kill_shell, restart_shell, no_default_window, no_desktop, -- cgit v1.2.3