diff options
author | Pacho Ramos <pacho@gentoo.org> | 2010-06-19 18:50:39 +0000 |
---|---|---|
committer | Pacho Ramos <pacho@gentoo.org> | 2010-06-19 18:50:39 +0000 |
commit | 2f785399eafdca7a8c41720e972e7dd800bd9ed9 (patch) | |
tree | 1342b3e31fd004b07deca476994ceb7e741e997e /app-misc/beagle | |
parent | Revision bump with multiple fixes and dropping epiphany support since it requ... (diff) | |
download | historical-2f785399eafdca7a8c41720e972e7dd800bd9ed9.tar.gz historical-2f785399eafdca7a8c41720e972e7dd800bd9ed9.tar.bz2 historical-2f785399eafdca7a8c41720e972e7dd800bd9ed9.zip |
Revision bump with multiple fixes and dropping epiphany support since it requires deprecated python extensions support
Package-Manager: portage-2.1.8.3/cvs/Linux x86_64
Diffstat (limited to 'app-misc/beagle')
-rw-r--r-- | app-misc/beagle/ChangeLog | 13 | ||||
-rw-r--r-- | app-misc/beagle/beagle-0.3.9-r3.ebuild | 195 | ||||
-rw-r--r-- | app-misc/beagle/files/beagle-0.3.9-firefox-3.6.patch | 177 | ||||
-rw-r--r-- | app-misc/beagle/files/beagle-0.3.9-gmime24.patch | 512 | ||||
-rw-r--r-- | app-misc/beagle/files/beagle-0.3.9-grow-shrink.patch | 372 | ||||
-rw-r--r-- | app-misc/beagle/files/beagle-0.3.9-mono2.6.patch | 56 | ||||
-rw-r--r-- | app-misc/beagle/files/beagle-0.3.9-openfix.patch | 14 | ||||
-rw-r--r-- | app-misc/beagle/files/beagle-0.3.9-update-tileindex.patch | 24 |
8 files changed, 1362 insertions, 1 deletions
diff --git a/app-misc/beagle/ChangeLog b/app-misc/beagle/ChangeLog index a99f2444c300..bd0d6674d3e5 100644 --- a/app-misc/beagle/ChangeLog +++ b/app-misc/beagle/ChangeLog @@ -1,6 +1,17 @@ # ChangeLog for app-misc/beagle # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-misc/beagle/ChangeLog,v 1.111 2010/06/19 18:48:09 pacho Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-misc/beagle/ChangeLog,v 1.112 2010/06/19 18:50:39 pacho Exp $ + + 19 Jun 2010; Pacho Ramos <pacho@gentoo.org> + +files/beagle-0.3.9-firefox-3.6.patch, +files/beagle-0.3.9-gmime24.patch, + +files/beagle-0.3.9-grow-shrink.patch, +files/beagle-0.3.9-mono2.6.patch, + +files/beagle-0.3.9-openfix.patch, + +files/beagle-0.3.9-update-tileindex.patch: + Revision bump with multiple fixes and changes: drop epiphany support since + it requires old epiphany-extensions-2.26, and won't work with webkit based + versions; support Firefox 3.6, fix building against gmime-2.4, remove bugs + open check, make it work with mono-2.6, some upstream fixes committed to + master. Thanks to Fedora and Mandriva folks for most of the patches. *beagle-0.3.9-r3 (19 Jun 2010) diff --git a/app-misc/beagle/beagle-0.3.9-r3.ebuild b/app-misc/beagle/beagle-0.3.9-r3.ebuild new file mode 100644 index 000000000000..366b2e9ffed3 --- /dev/null +++ b/app-misc/beagle/beagle-0.3.9-r3.ebuild @@ -0,0 +1,195 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-misc/beagle/beagle-0.3.9-r3.ebuild,v 1.1 2010/06/19 18:48:09 pacho Exp $ + +EAPI=2 + +inherit base gnome.org eutils mono mozextension autotools + +DESCRIPTION="Search tool that ransacks your personal information space to find whatever you're looking for" +HOMEPAGE="http://www.beagle-project.org/" +LICENSE="MIT Apache-1.1" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="avahi chm debug doc eds firefox +galago gtk +pdf +inotify +ole thunderbird +google +xscreensaver" + +#See bug 248331 for blocker reason. +RDEPEND="!!sci-libs/beagle + >=dev-lang/mono-1.9 + >=app-shells/bash-3.2 + app-arch/zip + >=dev-db/sqlite-3.3.1 + >=dev-dotnet/dbus-sharp-0.6.0 + >=dev-dotnet/dbus-glib-sharp-0.4.1 + >=dev-dotnet/taglib-sharp-2.0 + gtk? ( + x11-libs/libX11 + >=gnome-base/librsvg-2.22.0 + sys-devel/gettext + >=dev-dotnet/gtk-sharp-2.12.6 + >=dev-dotnet/gconf-sharp-2.24.0 + >=dev-dotnet/glade-sharp-2.12.6 + >=dev-dotnet/gnome-sharp-2.24.0 + >=dev-dotnet/gnomevfs-sharp-2.24.0 + x11-misc/xdg-utils + >=x11-libs/gtk+-2.14.0 + >=dev-libs/atk-1.22.0 + ) + eds? ( + >=dev-dotnet/evolution-sharp-0.18.1 + >=dev-dotnet/gconf-sharp-2.24.0 + >=dev-dotnet/glib-sharp-2.12.6 + ) + ole? ( + >=app-text/wv-1.2.3 + >=dev-dotnet/gsf-sharp-0.8.1 + >=app-office/gnumeric-1.4.3-r3 + ) + + x11-misc/shared-mime-info + >=dev-dotnet/glib-sharp-2.12.6 + dev-libs/gmime:2.4[mono] + chm? ( dev-libs/chmlib ) + pdf? ( >=app-text/poppler-0.12.3-r3[utils] ) + galago? ( >=dev-dotnet/galago-sharp-0.5.0 ) + thunderbird? ( + || ( + >=mail-client/thunderbird-1.5 + >=mail-client/thunderbird-bin-1.5 + ) + ) + firefox? ( + || ( + >=www-client/mozilla-firefox-1.5 + >=www-client/firefox-bin-1.5 + ) + ) + xscreensaver? ( x11-libs/libXScrnSaver ) + >=dev-libs/libbeagle-0.3.9 + avahi? ( >=net-dns/avahi-0.6.10[mono] )" + +DEPEND="${RDEPEND} + doc? ( >=virtual/monodoc-1.2.4 ) + dev-util/pkgconfig + xscreensaver? ( x11-proto/scrnsaverproto ) + >=dev-util/intltool-0.35" + +pkg_setup() { + enewgroup beagleindex + enewuser beagleindex -1 -1 /var/lib/cache/beagle beagleindex + if use thunderbird + then + if ! use inotify + then + eerror "You have enabled the thunderbird use flag. This use-flag depends on the inotify use-flag." + eerror "Please enable the inotify use-flag also." + eerror "See http://bugs.gentoo.org/263781 for more information." + die "Please enable the inotify use-flag." + fi + fi +} + +src_prepare() { + # Fix bugs.gnome.org/556243 + sed -i -e "s:libgnome-desktop-2.so.2:libgnome-desktop-2.so:" \ + search/Beagle.Search.exe.config || die "gnome-desktop sed failed" + + # Fix when using firefox 3.6 + epatch "${FILESDIR}/${P}-firefox-3.6.patch" + + # Fix building against gmime-2.4, bug #311499 + epatch "${FILESDIR}/${P}-gmime24.patch" + + # Remove bogus open check + epatch "${FILESDIR}/${P}-openfix.patch" + + # Port to mono-2.6 + epatch "${FILESDIR}/${P}-mono2.6.patch" + + # Grow/shrink the number beagle-search results based on window size + epatch "${FILESDIR}/${P}-grow-shrink.patch" + + # Update tileIndex when removing a tile + epatch "${FILESDIR}/${P}-update-tileindex.patch" + eautoreconf +} + +src_configure() { + econf --disable-static \ + --disable-dependency-tracking \ + --disable-epiphany-extension \ + $(use_enable debug xml-dump) \ + $(use_enable doc docs) \ + $(use_enable thunderbird) \ + $(use_enable eds evolution) \ + $(use_enable gtk gui) \ + $(use_enable ole gsf-sharp wv1) \ + $(use_enable xscreensaver xss) \ + $(use_enable inotify) \ + $(use_enable avahi) \ + $(use_enable google googlebackends) +} + +src_install() { + emake DESTDIR="${D}" install || die "emake install failed." + + dodoc AUTHORS NEWS README || die "dodoc failed" + + declare MOZILLA_FIVE_HOME + if use firefox; then + xpi_unpack "${S}"/firefox-extension/beagle.xpi \ + || die "Unable to find Beagle Firefox Extension" + mv "${WORKDIR}"/beagle "${WORKDIR}"/firefox-beagle + + if has_version '>=www-client/mozilla-firefox-1.5'; then + MOZILLA_FIVE_HOME="/usr/$(get_libdir)/mozilla-firefox" + xpi_install "${WORKDIR}"/firefox-beagle \ + || die "xpi install for mozilla-firefox failed!" + fi + if has_version '>=www-client/firefox-bin-1.5'; then + MOZILLA_FIVE_HOME="/opt/firefox" + xpi_install "${WORKDIR}"/firefox-beagle \ + || die "xpi install for firefox-bin failed!" + fi + fi + + if use thunderbird; then + xpi_unpack "${S}"/thunderbird-extension/beagle.xpi \ + || die "Unable to find Beagle Thunderbird Extension" + mv "${WORKDIR}"/beagle "${WORKDIR}"/thunderbird-beagle + + if has_version '>=mail-client/thunderbird-1.5'; then + MOZILLA_FIVE_HOME="/usr/$(get_libdir)/mozilla-thunderbird" + xpi_install "${WORKDIR}"/thunderbird-beagle \ + || die "xpi install for thunderbird failed!" + fi + if has_version '>=mail-client/thunderbird-bin-1.5'; then + MOZILLA_FIVE_HOME="/opt/thunderbird" + xpi_install "${WORKDIR}"/thunderbird-beagle \ + || die "xpi install for thunderbird-bin failed!" + fi + fi + + sed -i -e 's/CRAWL_ENABLED="yes"/CRAWL_ENABLED="no"/' \ + "${D}"/etc/beagle/crawl-rules/crawl-* + + insinto /etc/beagle/crawl-rules + doins "${FILESDIR}/crawl-portage" + + keepdir "/usr/$(get_libdir)/beagle/Backends" + diropts -o beagleindex -g beagleindex + keepdir "/var/lib/cache/beagle/indexes" +} + +pkg_postinst() { + elog "If available, Beagle greatly benefits from using certain operating" + elog "system features such as Extended Attributes and inotify." + elog + elog "If you want static queryables such as the portage tree and system" + elog "documentation you will need to edit the /etc/beagle/crawl-* files" + elog "and change CRAWL_ENABLE from 'no' to 'yes'." + elog + elog "For more info on how to create the optimal beagle environment, and" + elog "basic usage info, see the Gentoo page of the Beagle website:" + elog "http://www.beagle-project.org/Gentoo_Installation" +} diff --git a/app-misc/beagle/files/beagle-0.3.9-firefox-3.6.patch b/app-misc/beagle/files/beagle-0.3.9-firefox-3.6.patch new file mode 100644 index 000000000000..92b5538a4d43 --- /dev/null +++ b/app-misc/beagle/files/beagle-0.3.9-firefox-3.6.patch @@ -0,0 +1,177 @@ +Fix bug 283740 +Backport of: +From a56102700eb77cc6563b99b68acdc699a6716e73 Mon Sep 17 00:00:00 2001 +From: Tao Fei <Filia.Tao@gmail.com> +Date: Fri, 03 Jul 2009 11:20:56 +0000 +Subject: fix name confilct bug in beaglePrefs.js (for firefox 3.5) + +remove some debug msg (break in firefox 3.5) +update zh-cn locale for beagle search history sidebar +update max firfox version to 3.5.* +update version number to 1.1.2 + +From upstream git. +Link: http://git.gnome.org/cgit/beagle/commit/?id=a56102700eb77cc6563b99b68acdc699a6716e73 + +diff -NrU5 beagle-0.3.9.orig/firefox-extension/chrome/content/beaglePrefs.js beagle-0.3.9/firefox-extension/chrome/content/beaglePrefs.js +--- beagle-0.3.9.orig/firefox-extension/chrome/content/beaglePrefs.js 2009-09-05 12:28:10.000000000 +0200 ++++ beagle-0.3.9/firefox-extension/chrome/content/beaglePrefs.js 2009-09-05 12:29:07.000000000 +0200 +@@ -2,11 +2,11 @@ + * Beagle Extension: Index webpages you visit using the Beagle Indexing Engine. + * An Extension for the Firefox Browser. + */ + + // Initiate a new preference instance. +-var gPrefService = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefBranch); ++_prefService = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefBranch); + + var beaglePref = { + + //some constant + RULE_INCLUDE : 1, +@@ -29,18 +29,18 @@ + + + //functions used to get/set pref + func_factory:{ + 'get':{ +- 'bool': Function.bind(gPrefService.getBoolPref,gPrefService), +- 'int': Function.bind(gPrefService.getIntPref,gPrefService), +- 'string' : Function.bind(gPrefService.getCharPref,gPrefService) ++ 'bool': Function.bind(_prefService.getBoolPref,_prefService), ++ 'int': Function.bind(_prefService.getIntPref,_prefService), ++ 'string' : Function.bind(_prefService.getCharPref,_prefService) + }, + 'set':{ +- 'bool': Function.bind(gPrefService.setBoolPref,gPrefService), +- 'int' : Function.bind(gPrefService.setIntPref,gPrefService), +- 'string' : Function.bind(gPrefService.setCharPref,gPrefService) ++ 'bool': Function.bind(_prefService.setBoolPref,_prefService), ++ 'int' : Function.bind(_prefService.setIntPref,_prefService), ++ 'string' : Function.bind(_prefService.setCharPref,_prefService) + } + }, + + prefObject : {}, + +@@ -318,8 +318,8 @@ + } + catch(ex){ + log("first run import error"); + log(ex); + } +- }, ++ } + } + +diff -NrU5 beagle-0.3.9.orig/firefox-extension/chrome/content/jslib/io/dir.js beagle-0.3.9/firefox-extension/chrome/content/jslib/io/dir.js +--- beagle-0.3.9.orig/firefox-extension/chrome/content/jslib/io/dir.js 2009-09-05 12:28:10.000000000 +0200 ++++ beagle-0.3.9/firefox-extension/chrome/content/jslib/io/dir.js 2009-09-05 12:29:07.000000000 +0200 +@@ -219,11 +219,11 @@ + " readDir(aDirPath);\n"; + + return help; + }); + +-jslibDebug('*** load: '+JS_DIR_FILE+' OK'); ++//jslibDebug('*** load: '+JS_DIR_FILE+' OK'); + + } else { + dump("JSLIB library not loaded:\n" + + " \tTo load use: chrome://jslib/content/jslib.js\n" + + " \tThen: include(jslib_dir);\n\n"); +diff -NrU5 beagle-0.3.9.orig/firefox-extension/chrome/content/jslib/io/dirUtils.js beagle-0.3.9/firefox-extension/chrome/content/jslib/io/dirUtils.js +--- beagle-0.3.9.orig/firefox-extension/chrome/content/jslib/io/dirUtils.js 2009-09-05 12:28:10.000000000 +0200 ++++ beagle-0.3.9/firefox-extension/chrome/content/jslib/io/dirUtils.js 2009-09-05 12:29:07.000000000 +0200 +@@ -171,11 +171,11 @@ + return help; + } + + }; //END CLASS + +-jslibDebug('*** load: '+JS_DIRUTILS_FILE+' OK'); ++//jslibDebug('*** load: '+JS_DIRUTILS_FILE+' OK'); + + } // END BLOCK JS_LIB_LOADED CHECK + + else { + dump("JSLIB library not loaded:\n" + +diff -NrU5 beagle-0.3.9.orig/firefox-extension/chrome/content/jslib/io/file.js beagle-0.3.9/firefox-extension/chrome/content/jslib/io/file.js +--- beagle-0.3.9.orig/firefox-extension/chrome/content/jslib/io/file.js 2009-09-05 12:28:10.000000000 +0200 ++++ beagle-0.3.9/firefox-extension/chrome/content/jslib/io/file.js 2009-09-05 12:29:07.000000000 +0200 +@@ -756,11 +756,11 @@ + " help;\n"; + + return help; + }) + +-jslibDebug('*** load: '+JS_FILE_FILE+' OK'); ++//jslibDebug('*** load: '+JS_FILE_FILE+' OK'); + + } // END BLOCK JS_LIB_LOADED CHECK + + // If jslib base library is not loaded, dump this error. + else +diff -NrU5 beagle-0.3.9.orig/firefox-extension/chrome/content/jslib/io/fileUtils.js beagle-0.3.9/firefox-extension/chrome/content/jslib/io/fileUtils.js +--- beagle-0.3.9.orig/firefox-extension/chrome/content/jslib/io/fileUtils.js 2009-09-05 12:28:10.000000000 +0200 ++++ beagle-0.3.9/firefox-extension/chrome/content/jslib/io/fileUtils.js 2009-09-05 12:29:07.000000000 +0200 +@@ -582,11 +582,11 @@ + return help; + } + + }; + +-jslibDebug('*** load: '+JS_FILEUTILS_FILE+' OK'); ++//jslibDebug('*** load: '+JS_FILEUTILS_FILE+' OK'); + + } // END BLOCK JS_LIB_LOADED CHECK + + // If jslib base library is not loaded, dump this error. + else +diff -NrU5 beagle-0.3.9.orig/firefox-extension/chrome/locale/zh-CN/beagle.dtd beagle-0.3.9/firefox-extension/chrome/locale/zh-CN/beagle.dtd +--- beagle-0.3.9.orig/firefox-extension/chrome/locale/zh-CN/beagle.dtd 2009-09-05 12:28:10.000000000 +0200 ++++ beagle-0.3.9/firefox-extension/chrome/locale/zh-CN/beagle.dtd 2009-09-05 12:29:07.000000000 +0200 +@@ -29,11 +29,13 @@ + <!ENTITY beagle.run.never.index.label "从不索引这个站点"> + <!ENTITY beagle.run.preferences.label "选项"> + <!ENTITY beagle.run.context.menu.label "Beagle"> + <!ENTITY beagle.run.index.link.label "索引链接"> + <!ENTITY beagle.run.index.image.label "索引图片"> +- + <!ENTITY beagle.index.link.start.label "开始"> + <!ENTITY beagle.index.link.stop.label "停止"> + + <!ENTITY beagle.bookmark.index.modified.label "索引更改过的书签"> + ++<!ENTITY beagle.sidebar.title "Beagle 搜索历史侧边栏"> ++<!ENTITY beagle.sidebar.commandkey "B"> ++<!ENTITY beagle.sidebar.modifierskey "shift 键"> +diff -NrU5 beagle-0.3.9.orig/firefox-extension/install.rdf.in beagle-0.3.9/firefox-extension/install.rdf.in +--- beagle-0.3.9.orig/firefox-extension/install.rdf.in 2009-09-05 12:28:10.000000000 +0200 ++++ beagle-0.3.9/firefox-extension/install.rdf.in 2009-09-05 12:29:50.000000000 +0200 +@@ -21,11 +21,11 @@ +
+ <em:targetApplication>
+ <Description>
+ <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
+ <em:minVersion>0.8</em:minVersion>
+- <em:maxVersion>3.0.*</em:maxVersion>
++ <em:maxVersion>3.6.*</em:maxVersion>
+ </Description>
+ </em:targetApplication>
+
+ </Description>
+
+diff -NrU5 beagle-0.3.9.orig/firefox-extension/Makefile.am beagle-0.3.9/firefox-extension/Makefile.am +--- beagle-0.3.9.orig/firefox-extension/Makefile.am 2009-09-05 12:28:10.000000000 +0200 ++++ beagle-0.3.9/firefox-extension/Makefile.am 2009-09-05 12:29:07.000000000 +0200 +@@ -1,8 +1,8 @@ + + PROJECT = beagle +-VERSION = 1.1.0 ++VERSION = 1.1.2 + + INSTALL_RDF = install.rdf + INSTALL_RDF_IN = $(INSTALL_RDF).in + VERSION_SED = sed -e "s|\@VERSION\@|$(VERSION)|g" + diff --git a/app-misc/beagle/files/beagle-0.3.9-gmime24.patch b/app-misc/beagle/files/beagle-0.3.9-gmime24.patch new file mode 100644 index 000000000000..15c601b6b446 --- /dev/null +++ b/app-misc/beagle/files/beagle-0.3.9-gmime24.patch @@ -0,0 +1,512 @@ +diff -p -up beagle-0.3.9/beagled/EvolutionMailQueryable/EvolutionMailIndexableGenerator.cs.gmime24 beagle-0.3.9/beagled/EvolutionMailQueryable/EvolutionMailIndexableGenerator.cs +--- beagle-0.3.9/beagled/EvolutionMailQueryable/EvolutionMailIndexableGenerator.cs.gmime24 2008-04-25 20:17:04.000000000 +0200 ++++ beagle-0.3.9/beagled/EvolutionMailQueryable/EvolutionMailIndexableGenerator.cs 2009-04-28 11:21:36.000000000 +0200 +@@ -333,28 +333,46 @@ namespace Beagle.Daemon.EvolutionMailQue + indexable.AddProperty (Property.NewUnsearched ("fixme:folder", this.folder_name)); + + GMime.InternetAddressList addrs; +- +- addrs = message.GetRecipients (GMime.Message.RecipientType.To); +- foreach (GMime.InternetAddress ia in addrs) { +- if (this.folder_name == "Sent" && ia.AddressType != GMime.InternetAddressType.Group) +- indexable.AddProperty (Property.NewUnsearched ("fixme:sentTo", ia.Addr)); ++ ++ if (this.folder_name == "Sent") { ++ addrs = message.GetRecipients (GMime.RecipientType.To); ++ foreach (GMime.InternetAddress ia in addrs) { ++ if (ia is GMime.InternetAddressMailbox) { ++ GMime.InternetAddressMailbox mailbox = ia as GMime.InternetAddressMailbox; ++ ++ indexable.AddProperty (Property.NewUnsearched ("fixme:sentTo", mailbox.Address)); ++ } ++ } ++ ++ addrs.Dispose (); + } +- addrs.Dispose (); +- +- addrs = message.GetRecipients (GMime.Message.RecipientType.Cc); +- foreach (GMime.InternetAddress ia in addrs) { +- if (this.folder_name == "Sent" && ia.AddressType != GMime.InternetAddressType.Group) +- indexable.AddProperty (Property.NewUnsearched ("fixme:sentTo", ia.Addr)); ++ ++ if (this.folder_name == "Sent") { ++ addrs = message.GetRecipients (GMime.RecipientType.Cc); ++ foreach (GMime.InternetAddress ia in addrs) { ++ if (ia is GMime.InternetAddressMailbox) { ++ GMime.InternetAddressMailbox mailbox = ia as GMime.InternetAddressMailbox; ++ ++ indexable.AddProperty (Property.NewUnsearched ("fixme:sentTo", mailbox.Address)); ++ } ++ } ++ ++ addrs.Dispose (); + } +- addrs.Dispose (); +- +- addrs = GMime.InternetAddressList.ParseString (GMime.Utils.HeaderDecodePhrase (message.Sender)); +- foreach (GMime.InternetAddress ia in addrs) { +- if (this.folder_name != "Sent" && ia.AddressType != GMime.InternetAddressType.Group) +- indexable.AddProperty (Property.NewUnsearched ("fixme:gotFrom", ia.Addr)); ++ ++ if (this.folder_name != "Sent") { ++ addrs = GMime.InternetAddressList.Parse (message.Sender); ++ foreach (GMime.InternetAddress ia in addrs) { ++ if (ia is GMime.InternetAddressMailbox) { ++ GMime.InternetAddressMailbox mailbox = ia as GMime.InternetAddressMailbox; ++ ++ indexable.AddProperty (Property.NewUnsearched ("fixme:gotFrom", mailbox.Address)); ++ } ++ } ++ ++ addrs.Dispose (); + } +- addrs.Dispose (); +- ++ + if (this.folder_name == "Sent") + indexable.AddProperty (Property.NewFlag ("fixme:isSent")); + +@@ -750,48 +768,54 @@ namespace Beagle.Daemon.EvolutionMailQue + } + + GMime.InternetAddressList addrs; +- addrs = GMime.InternetAddressList.ParseString (messageInfo.to); ++ addrs = GMime.InternetAddressList.Parse (messageInfo.to); + foreach (GMime.InternetAddress ia in addrs) { ++ GMime.InternetAddressMailbox mailbox = ia as GMime.InternetAddressMailbox; ++ + if (!have_content) { + indexable.AddProperty (Property.NewUnsearched ("fixme:to", ia.ToString (false))); +- if (ia.AddressType != GMime.InternetAddressType.Group) +- indexable.AddProperty (Property.New ("fixme:to_address", ia.Addr)); +- ++ if (ia is GMime.InternetAddressMailbox) ++ indexable.AddProperty (Property.New ("fixme:to_address", mailbox.Address)); ++ + indexable.AddProperty (Property.New ("fixme:to_name", ia.Name)); + } +- +- if (this.folder_name == "Sent" && ia.AddressType != GMime.InternetAddressType.Group) +- indexable.AddProperty (Property.NewUnsearched ("fixme:sentTo", ia.Addr)); ++ ++ if (this.folder_name == "Sent" && ia is GMime.InternetAddressMailbox) ++ indexable.AddProperty (Property.NewUnsearched ("fixme:sentTo", mailbox.Address)); + } + addrs.Dispose (); + +- addrs = GMime.InternetAddressList.ParseString (messageInfo.cc); ++ addrs = GMime.InternetAddressList.Parse (messageInfo.cc); + foreach (GMime.InternetAddress ia in addrs) { ++ GMime.InternetAddressMailbox mailbox = ia as GMime.InternetAddressMailbox; ++ + if (!have_content) { + indexable.AddProperty (Property.NewUnsearched ("fixme:cc", ia.ToString (false))); +- if (ia.AddressType != GMime.InternetAddressType.Group) +- indexable.AddProperty (Property.New ("fixme:cc_address", ia.Addr)); +- ++ if (ia is GMime.InternetAddressMailbox) ++ indexable.AddProperty (Property.New ("fixme:cc_address", mailbox.Address)); ++ + indexable.AddProperty (Property.New ("fixme:cc_name", ia.Name)); + } +- +- if (this.folder_name == "Sent" && ia.AddressType != GMime.InternetAddressType.Group) +- indexable.AddProperty (Property.NewUnsearched ("fixme:sentTo", ia.Addr)); ++ ++ if (this.folder_name == "Sent" && ia is GMime.InternetAddressMailbox) ++ indexable.AddProperty (Property.NewUnsearched ("fixme:sentTo", mailbox.Address)); + } + addrs.Dispose (); + +- addrs = GMime.InternetAddressList.ParseString (messageInfo.from); ++ addrs = GMime.InternetAddressList.Parse (messageInfo.from); + foreach (GMime.InternetAddress ia in addrs) { ++ GMime.InternetAddressMailbox mailbox = ia as GMime.InternetAddressMailbox; ++ + if (!have_content) { + indexable.AddProperty (Property.NewUnsearched ("fixme:from", ia.ToString (false))); +- if (ia.AddressType != GMime.InternetAddressType.Group) +- indexable.AddProperty (Property.New ("fixme:from_address", ia.Addr)); +- ++ if (ia is GMime.InternetAddressMailbox) ++ indexable.AddProperty (Property.New ("fixme:from_address", mailbox.Address)); ++ + indexable.AddProperty (Property.New ("fixme:from_name", ia.Name)); + } + +- if (this.folder_name != "Sent" && ia.AddressType != GMime.InternetAddressType.Group) +- indexable.AddProperty (Property.NewUnsearched ("fixme:gotFrom", ia.Addr)); ++ if (this.folder_name != "Sent" && ia is GMime.InternetAddressMailbox) ++ indexable.AddProperty (Property.NewUnsearched ("fixme:gotFrom", mailbox.Address)); + } + addrs.Dispose (); + +diff -p -up beagle-0.3.9/beagled/GoogleBackends/GMailSearchDriver.cs.gmime24 beagle-0.3.9/beagled/GoogleBackends/GMailSearchDriver.cs +--- beagle-0.3.9/beagled/GoogleBackends/GMailSearchDriver.cs.gmime24 2008-04-25 21:26:19.000000000 +0200 ++++ beagle-0.3.9/beagled/GoogleBackends/GMailSearchDriver.cs 2009-04-28 11:21:36.000000000 +0200 +@@ -322,38 +322,47 @@ namespace Beagle.Daemon.GoogleBackend { + hit.AddProperty (Property.NewDate ("fixme:date", message.Date.ToUniversalTime ())); + + GMime.InternetAddressList addrs; +- addrs = message.GetRecipients (GMime.Message.RecipientType.To); ++ addrs = message.GetRecipients (GMime.RecipientType.To); + foreach (GMime.InternetAddress ia in addrs) { + hit.AddProperty (Property.NewUnsearched ("fixme:to", ia.ToString (false))); +- if (ia.AddressType != GMime.InternetAddressType.Group) +- hit.AddProperty (Property.New ("fixme:to_address", ia.Addr)); +- ++ if (ia is GMime.InternetAddressMailbox) { ++ GMime.InternetAddressMailbox mailbox = ia as GMime.InternetAddressMailbox; ++ ++ hit.AddProperty (Property.New ("fixme:to_address", mailbox.Address)); ++ } ++ + hit.AddProperty (Property.New ("fixme:to_name", ia.Name)); + } + addrs.Dispose (); + +- addrs = message.GetRecipients (GMime.Message.RecipientType.Cc); ++ addrs = message.GetRecipients (GMime.RecipientType.Cc); + foreach (GMime.InternetAddress ia in addrs) { + hit.AddProperty (Property.NewUnsearched ("fixme:cc", ia.ToString (false))); +- if (ia.AddressType != GMime.InternetAddressType.Group) +- hit.AddProperty (Property.New ("fixme:cc_address", ia.Addr)); +- ++ if (ia is GMime.InternetAddressMailbox) { ++ GMime.InternetAddressMailbox mailbox = ia as GMime.InternetAddressMailbox; ++ ++ hit.AddProperty (Property.New ("fixme:cc_address", mailbox.Address)); ++ } ++ + hit.AddProperty (Property.New ("fixme:cc_name", ia.Name)); + } + addrs.Dispose (); + +- addrs = GMime.InternetAddressList.ParseString (GMime.Utils.HeaderDecodePhrase (message.Sender)); ++ addrs = GMime.InternetAddressList.Parse (message.Sender); + foreach (GMime.InternetAddress ia in addrs) { + hit.AddProperty (Property.NewUnsearched ("fixme:from", ia.ToString (false))); +- if (ia.AddressType != GMime.InternetAddressType.Group) +- hit.AddProperty (Property.New ("fixme:from_address", ia.Addr)); +- ++ if (ia is GMime.InternetAddressMailbox) { ++ GMime.InternetAddressMailbox mailbox = ia as GMime.InternetAddressMailbox; ++ ++ hit.AddProperty (Property.New ("fixme:from_address", mailbox.Address)); ++ } ++ + hit.AddProperty (Property.New ("fixme:from_name", ia.Name)); + } + addrs.Dispose (); + + foreach (GMime.References refs in message.References) +- hit.AddProperty (Property.NewUnsearched ("fixme:reference", refs.Msgid)); ++ hit.AddProperty (Property.NewUnsearched ("fixme:reference", refs.MessageId)); + + string list_id = message.GetHeader ("List-Id"); + if (list_id != null) +diff -p -up beagle-0.3.9/beagled/KMailQueryable/KMailIndexer.cs.gmime24 beagle-0.3.9/beagled/KMailQueryable/KMailIndexer.cs +--- beagle-0.3.9/beagled/KMailQueryable/KMailIndexer.cs.gmime24 2008-02-10 21:24:19.000000000 +0100 ++++ beagle-0.3.9/beagled/KMailQueryable/KMailIndexer.cs 2009-04-28 11:21:36.000000000 +0200 +@@ -407,28 +407,46 @@ namespace Beagle.Daemon.KMailQueryable { + indexable.AddProperty (Property.NewUnsearched ("fixme:folder", folder_name)); + + GMime.InternetAddressList addrs; +- +- addrs = message.GetRecipients (GMime.Message.RecipientType.To); +- foreach (GMime.InternetAddress ia in addrs) { +- if (folder_name == Queryable.SentMailFolderName && ia.AddressType != GMime.InternetAddressType.Group) +- indexable.AddProperty (Property.NewKeyword ("fixme:sentTo", ia.Addr)); +- } +- addrs.Dispose (); +- +- addrs = message.GetRecipients (GMime.Message.RecipientType.Cc); +- foreach (GMime.InternetAddress ia in addrs) { +- if (folder_name == Queryable.SentMailFolderName && ia.AddressType != GMime.InternetAddressType.Group) +- indexable.AddProperty (Property.NewKeyword ("fixme:sentTo", ia.Addr)); +- } +- addrs.Dispose (); +- +- addrs = GMime.InternetAddressList.ParseString (GMime.Utils.HeaderDecodePhrase (message.Sender)); +- foreach (GMime.InternetAddress ia in addrs) { +- if (folder_name != Queryable.SentMailFolderName && ia.AddressType != GMime.InternetAddressType.Group) +- indexable.AddProperty (Property.NewKeyword ("fixme:gotFrom", ia.Addr)); ++ ++ if (folder_name == Queryable.SentMailFolderName) { ++ addrs = message.GetRecipients (GMime.RecipientType.To); ++ foreach (GMime.InternetAddress ia in addrs) { ++ if (ia is GMime.InternetAddressMailbox) { ++ GMime.InternetAddressMailbox mailbox = ia as GMime.InternetAddressMailbox; ++ ++ indexable.AddProperty (Property.NewKeyword ("fixme:sentTo", mailbox.Address)); ++ } ++ } ++ ++ addrs.Dispose (); + } +- addrs.Dispose (); +- ++ ++ if (folder_name == Queryable.SentMailFolderName) { ++ addrs = message.GetRecipients (GMime.RecipientType.Cc); ++ foreach (GMime.InternetAddress ia in addrs) { ++ if (ia is GMime.InternetAddressMailbox) { ++ GMime.InternetAddressMailbox mailbox = ia as GMime.InternetAddressMailbox; ++ ++ indexable.AddProperty (Property.NewKeyword ("fixme:sentTo", mailbox.Address)); ++ } ++ } ++ ++ addrs.Dispose (); ++ } ++ ++ if (folder_name != Queryable.SentMailFolderName) { ++ addrs = GMime.InternetAddressList.Parse (message.Sender); ++ foreach (GMime.InternetAddress ia in addrs) { ++ if (ia is GMime.InternetAddressMailbox) { ++ GMime.InternetAddressMailbox mailbox = ia as GMime.InternetAddressMailbox; ++ ++ indexable.AddProperty (Property.NewKeyword ("fixme:gotFrom", mailbox.Address)); ++ } ++ } ++ ++ addrs.Dispose (); ++ } ++ + if (folder_name == Queryable.SentMailFolderName) + indexable.AddProperty (Property.NewFlag ("fixme:isSent")); + else { +diff -p -up beagle-0.3.9/beagled/ThunderbirdQueryable/ThunderbirdQueryable.cs.gmime24 beagle-0.3.9/beagled/ThunderbirdQueryable/ThunderbirdQueryable.cs +--- beagle-0.3.9/beagled/ThunderbirdQueryable/ThunderbirdQueryable.cs.gmime24 2008-07-18 16:27:59.000000000 +0200 ++++ beagle-0.3.9/beagled/ThunderbirdQueryable/ThunderbirdQueryable.cs 2009-04-28 11:21:36.000000000 +0200 +@@ -367,9 +367,14 @@ namespace Beagle.Daemon.ThunderbirdQuery + message.Subject = Mime.HeaderDecodeText (GetText (document, "Subject")); + message.Sender = Mime.HeaderDecodePhrase (GetText (document, "Author")); + message.MessageId = GetText (document, "MessageId"); +- message.SetDate (DateTimeUtil.UnixToDateTimeUtc (Convert.ToInt64 (GetText (document, "Date"))), 0); +- message.AddRecipientsFromString ("To", Mime.HeaderDecodePhrase (GetText (document, "Recipients"))); +- ++ message.Date = DateTimeUtil.UnixToDateTimeUtc (Convert.ToInt64 (GetText (document, "Date"))); ++ ++ string str = GetText (document, "Recipients"); ++ GMime.InternetAddressList recipients = GMime.InternetAddressList.Parse (str); ++ foreach (GMime.InternetAddress ia in recipients) ++ message.To.Add (ia); ++ recipients.Dispose (); ++ + return message; + } + +@@ -434,7 +439,7 @@ namespace Beagle.Daemon.ThunderbirdQuery + + // We _know_ that the stream comes from a StreamReader, which uses UTF8 by + // default. So we use that here when parsing our string. +- return (str != null ? Encoding.UTF8.GetString (str, 0, pos) : string.Empty); ++ return (str != null ? System.Text.Encoding.UTF8.GetString (str, 0, pos) : string.Empty); + } + + // This spell "charset=" +@@ -462,7 +467,7 @@ namespace Beagle.Daemon.ThunderbirdQuery + // instead of UTF-8 in some cases and that will really mess things up. + byte[] buffer = null; + int c, header_length = 0, newlines = 0, charset_pos = 0; +- Encoding enc = Encoding.UTF8; ++ System.Text.Encoding enc = System.Text.Encoding.UTF8; + try { + do { + c = stream.BaseStream.ReadByte (); +@@ -491,7 +496,7 @@ namespace Beagle.Daemon.ThunderbirdQuery + stream.BaseStream.Read (buffer, 0, buffer.Length); + + // We need to use correct encoding +- enc = Encoding.GetEncoding (encoding_str); ++ enc = System.Text.Encoding.GetEncoding (encoding_str); + } catch { + } finally { + stream.Close (); +diff -p -up beagle-0.3.9/Filters/FilterMail.cs.gmime24 beagle-0.3.9/Filters/FilterMail.cs +--- beagle-0.3.9/Filters/FilterMail.cs.gmime24 2008-06-12 02:20:07.000000000 +0200 ++++ beagle-0.3.9/Filters/FilterMail.cs 2009-04-28 11:21:36.000000000 +0200 +@@ -126,7 +126,7 @@ namespace Beagle.Filters { + + // Messages that are multipart/alternative shouldn't be considered as having + // attachments. Unless of course they do. +- if (mime_part is GMime.Multipart && mime_part.ContentType.Subtype.ToLower () != "alternative") ++ if (mime_part is GMime.Multipart && mime_part.ContentType.MediaSubtype.ToLower () != "alternative") + return true; + + return false; +@@ -140,34 +140,43 @@ namespace Beagle.Filters { + AddProperty (Property.NewDate ("fixme:date", message.Date.ToUniversalTime ())); + + GMime.InternetAddressList addrs; +- addrs = this.message.GetRecipients (GMime.Message.RecipientType.To); ++ addrs = this.message.GetRecipients (GMime.RecipientType.To); + foreach (GMime.InternetAddress ia in addrs) { + AddProperty (Property.NewUnsearched ("fixme:to", ia.ToString (false))); +- if (ia.AddressType != GMime.InternetAddressType.Group) +- AddProperty (Property.New ("fixme:to_address", ia.Addr)); +- ++ if (ia is GMime.InternetAddressMailbox) { ++ GMime.InternetAddressMailbox mailbox = ia as GMime.InternetAddressMailbox; ++ ++ AddProperty (Property.New ("fixme:to_address", mailbox.Address)); ++ } ++ + AddProperty (Property.New ("fixme:to_name", ia.Name)); + AddEmailLink (ia); + } + addrs.Dispose (); + +- addrs = this.message.GetRecipients (GMime.Message.RecipientType.Cc); ++ addrs = this.message.GetRecipients (GMime.RecipientType.Cc); + foreach (GMime.InternetAddress ia in addrs) { + AddProperty (Property.NewUnsearched ("fixme:cc", ia.ToString (false))); +- if (ia.AddressType != GMime.InternetAddressType.Group) +- AddProperty (Property.New ("fixme:cc_address", ia.Addr)); +- ++ if (ia is GMime.InternetAddressMailbox) { ++ GMime.InternetAddressMailbox mailbox = ia as GMime.InternetAddressMailbox; ++ ++ AddProperty (Property.New ("fixme:cc_address", mailbox.Address)); ++ } ++ + AddProperty (Property.New ("fixme:cc_name", ia.Name)); + AddEmailLink (ia); + } + addrs.Dispose (); + +- addrs = GMime.InternetAddressList.ParseString (GMime.Utils.HeaderDecodePhrase (this.message.Sender)); ++ addrs = GMime.InternetAddressList.Parse (this.message.Sender); + foreach (GMime.InternetAddress ia in addrs) { + AddProperty (Property.NewUnsearched ("fixme:from", ia.ToString (false))); +- if (ia.AddressType != GMime.InternetAddressType.Group) +- AddProperty (Property.New ("fixme:from_address", ia.Addr)); +- ++ if (ia is GMime.InternetAddressMailbox) { ++ GMime.InternetAddressMailbox mailbox = ia as GMime.InternetAddressMailbox; ++ ++ AddProperty (Property.New ("fixme:from_address", mailbox.Address)); ++ } ++ + AddProperty (Property.New ("fixme:from_name", ia.Name)); + AddEmailLink (ia); + } +@@ -184,7 +193,7 @@ namespace Beagle.Filters { + AddProperty (Property.NewUnsearched ("fixme:msgid", GMime.Utils.DecodeMessageId (msgid))); + + foreach (GMime.References refs in this.message.References) +- AddProperty (Property.NewUnsearched ("fixme:reference", refs.Msgid)); ++ AddProperty (Property.NewUnsearched ("fixme:reference", refs.MessageId)); + + string list_id = this.message.GetHeader ("List-Id"); + if (list_id != null) +@@ -345,16 +354,15 @@ namespace Beagle.Filters { + } + } else if (mime_part is GMime.Multipart) { + GMime.Multipart multipart = (GMime.Multipart) mime_part; +- +- int num_parts = multipart.Number; ++ int num_parts = multipart.Count; + + // If the mimetype is multipart/alternative, we only want to index + // one part -- the richest one we can filter. +- if (mime_part.ContentType.Subtype.ToLower () == "alternative") { ++ if (mime_part.ContentType.MediaSubtype.ToLower () == "alternative") { + // The richest formats are at the end, so work from there + // backward. + for (int i = num_parts - 1; i >= 0; i--) { +- GMime.Object subpart = multipart.GetPart (i); ++ GMime.Object subpart = multipart[i]; + + if (IsMimeTypeHandled (subpart.ContentType.ToString ())) { + part = subpart; +@@ -370,7 +378,7 @@ namespace Beagle.Filters { + // the parts, treat them like a bunch of attachments. + if (part == null) { + for (int i = 0; i < num_parts; i++) { +- using (GMime.Object subpart = multipart.GetPart (i)) ++ using (GMime.Object subpart = multipart[i]) + this.OnEachPart (subpart); + } + } +@@ -400,7 +408,7 @@ namespace Beagle.Filters { + } else if (mime_type == "text/html") { + no_child_needed = true; + html_part = true; +- string enc = part.GetContentTypeParameter ("charset"); ++ string enc = part.ContentType.GetParameter ("charset"); + // DataWrapper.Stream is a very limited stream + // and does not allow Seek or Tell + // HtmlFilter requires Stream.Position=0. +@@ -473,7 +481,7 @@ namespace Beagle.Filters { + if (length != -1) + child.AddProperty (Property.NewUnsearched ("fixme:filesize", length)); + +- if (part.ContentType.Type.ToLower () == "text") ++ if (part.ContentType.MediaType.ToLower () == "text") + child.SetTextReader (new StreamReader (stream)); + else + child.SetBinaryStream (stream); +diff -p -up beagle-0.3.9/config.h.in~ beagle-0.3.9/config.h.in +--- beagle-0.3.9/config.h.in~ 2008-07-19 13:30:38.000000000 +0200 ++++ beagle-0.3.9/config.h.in 2009-04-28 11:25:11.000000000 +0200 +@@ -69,6 +69,10 @@ + /* Define to 1 if you have the <unistd.h> header file. */ + #undef HAVE_UNISTD_H + ++/* Define to the sub-directory in which libtool stores uninstalled libraries. ++ */ ++#undef LT_OBJDIR ++ + /* Name of package */ + #undef PACKAGE + +diff -p -up beagle-0.3.9/configure.in~ beagle-0.3.9/configure.in +--- beagle-0.3.9/configure.in~ 2009-04-28 11:24:17.000000000 +0200 ++++ beagle-0.3.9/configure.in 2009-05-03 20:08:29.000000000 +0200 +@@ -17,7 +17,7 @@ MONODOC_REQUIRED=1.2.4 + NDESK_DBUS_REQUIRED=0.5.2 + NDESK_DBUS_GLIB_REQUIRED=0.3.0 + GTK_SHARP_REQUIRED=2.10.0 +-GMIME_SHARP_REQUIRED=2.2.0 ++GMIME_SHARP_REQUIRED=2.4.0 + EVOLUTION_SHARP_REQUIRED=0.13.3 + GSF_SHARP_REQUIRED=0.6 + GTK_REQUIRED=2.10.0 +@@ -223,7 +223,7 @@ if test "x$enable_gui" = "xyes"; then + glade-sharp-2.0 >= $GTK_SHARP_REQUIRED + gnome-sharp-2.0 >= $GTK_SHARP_REQUIRED + gnome-vfs-sharp-2.0 >= $GTK_SHARP_REQUIRED +- gmime-sharp >= $GMIME_SHARP_REQUIRED ++ gmime-sharp-2.4 >= $GMIME_SHARP_REQUIRED + ]) + AC_SUBST(BEAGLE_UI_LIBS) + +@@ -270,7 +270,7 @@ PKG_CHECK_MODULES(EVO, + evolution-sharp >= $EVOLUTION_SHARP_REQUIRED \ + gconf-sharp-2.0 >= $GTK_SHARP_REQUIRED \ + glib-sharp-2.0 >= $GTK_SHARP_REQUIRED +- gmime-sharp >= $GMIME_SHARP_REQUIRED, ++ gmime-sharp-2.4 >= $GMIME_SHARP_REQUIRED, + have_evo_dependencies=yes, have_evo_dependencies=no) + AC_SUBST(EVO_LIBS) + +@@ -377,14 +377,14 @@ dnl ------------------------------------ + PKG_CHECK_MODULES(BEAGLED, + [ + shared-mime-info +- gmime-sharp >= $GMIME_SHARP_REQUIRED ++ gmime-sharp-2.4 >= $GMIME_SHARP_REQUIRED + glib-sharp-2.0 >= $GTK_SHARP_REQUIRED + ]) + BEAGLED_LIBS="$BEAGLED_LIBS $GSF_SHARP_LIBS" + AC_SUBST(BEAGLED_LIBS) + + GSF_SHARP_PREFIX=`$PKG_CONFIG --variable=prefix gsf-sharp` +-GMIME_SHARP_PREFIX=`$PKG_CONFIG --variable=prefix gmime-sharp` ++GMIME_SHARP_PREFIX=`$PKG_CONFIG --variable=prefix gmime-sharp-2.4` + + dnl ---------------------------------------------- + dnl Epiphany Extension diff --git a/app-misc/beagle/files/beagle-0.3.9-grow-shrink.patch b/app-misc/beagle/files/beagle-0.3.9-grow-shrink.patch new file mode 100644 index 000000000000..2a3716d86d38 --- /dev/null +++ b/app-misc/beagle/files/beagle-0.3.9-grow-shrink.patch @@ -0,0 +1,372 @@ +From 7cfcb26cd31f43ad93d32d3354787e6c2915b5e3 Mon Sep 17 00:00:00 2001 +From: Chris Rivera <crivera@novell.com> +Date: Tue, 26 May 2009 21:07:24 +0000 +Subject: Grow/shrink the number beagle-search results based on window size + +Rework the size requsitioning to always take all available window +space for results, and to dynamically grow and shrink based on the +size of the window. Fixes bgo #582354 and #328440. +--- +diff --git a/beagle/search/Beagle.Search/Category.cs b/beagle/search/Beagle.Search/Category.cs +index 3a920ab..06e8724 100644 +--- a/beagle/search/Beagle.Search/Category.cs ++++ b/beagle/search/Beagle.Search/Category.cs +@@ -18,17 +18,14 @@ namespace Beagle.Search { + + public abstract class Category : Container { + +- private SortedTileList tiles = null; +- private int page = 0; +- + protected Gtk.HBox header; ++ private SortedTileList tiles; + private Gtk.Label position; + private Gtk.Button prev, next; + private Gtk.Expander headerExpander; +- private int fewRows, manyRows, columns; +- private int few, many; + private bool extended, expanded; + private ScopeType scope; ++ private int columns, tileIndex, tileHeight; + + public Category (Tiles.TileGroupInfo info, int columns) + { +@@ -60,14 +57,9 @@ namespace Beagle.Search { + header.SizeRequested += HeaderSizeRequested; + + tiles = new SortedTileList (Beagle.Search.SortType.Relevance); +- page = 0; +- +- fewRows = info.Rows; +- manyRows = info.Rows * 2; + Columns = columns; + + UpdateButtons (); +- //headerExpander.Expanded = true; + Expanded = true; + } + +@@ -91,7 +83,7 @@ namespace Beagle.Search { + expanded = value; + + if (expanded) +- ShowTiles (false); ++ ShowTiles (); + else + HideTiles (); + +@@ -103,12 +95,10 @@ namespace Beagle.Search { + get { return columns; } + set { + HideTiles (); +- + columns = value; +- few = fewRows * columns; +- many = manyRows * columns; + +- ShowTiles (true); ++ if (Expanded) ++ ShowTiles (); + } + } + +@@ -127,14 +117,9 @@ namespace Beagle.Search { + args.Requisition = req; + } + +- void UpdateButtons () ++ private void UpdateButtons () + { +- if (tiles.Count <= FirstVisible && page > 0) { +- // The page we were viewing disappeared +- page--; +- } +- +- prev.Sensitive = (page != 0); ++ prev.Sensitive = tileIndex != 0; + next.Sensitive = (tiles.Count > LastVisible + 1); + + if (tiles.Count > 0) { +@@ -156,7 +141,7 @@ namespace Beagle.Search { + tiles.Add ((Tiles.Tile)widget); + + if (Expanded) +- ShowTiles (true); ++ ShowTiles (); + } + + protected override void OnRemoved (Gtk.Widget widget) +@@ -168,41 +153,31 @@ namespace Beagle.Search { + tiles.Remove ((Tiles.Tile)widget); + + if (Expanded) +- ShowTiles (true); ++ ShowTiles (); + } + + private Tiles.Tile lastTarget; + private bool hadFocus; + +- void HideTiles () ++ private void HideTiles () + { + lastTarget = null; +- foreach (Tiles.Tile tile in VisibleTiles) { ++ foreach (Tiles.Tile tile in AllTiles) { + if (tile.HasFocus || lastTarget == null) { + lastTarget = tile; + hadFocus = tile.HasFocus; + } + tile.ChildVisible = false; + } ++ + QueueResize (); + } + +- void ShowTiles (bool recenter) ++ private void ShowTiles () + { +- if (recenter && lastTarget != null) { +- int index = tiles.IndexOf (lastTarget); +- if (hadFocus || page > 0) { +- if (index < few) +- page = 0; +- else if (extended) +- page = index / (manyRows * columns); +- else +- page = ((index - few) / (manyRows * columns)) + 1; +- } +- } +- + foreach (Tiles.Tile tile in VisibleTiles) { + tile.ChildVisible = true; ++ + if (tile == lastTarget && hadFocus && !tile.HasFocus) + tile.GrabFocus (); + } +@@ -211,33 +186,26 @@ namespace Beagle.Search { + QueueResize (); + } + +- private bool showingMany { +- get { +- // Show extra tiles on every page after the first, unless +- // there are only two pages and the second one only has +- // enough tiles to fit the "fewer" size. +- return (page > 0 && tiles.Count > 2 * few) || extended; +- } +- } +- +- void OnPrev (object obj, EventArgs args) ++ private void OnPrev (object obj, EventArgs args) + { + HideTiles (); +- page--; ++ tileIndex = Math.Max (0, tileIndex - PageSize); ++ + if (!Expanded) + OnActivated (obj, args); + else +- ShowTiles (false); ++ ShowTiles (); + } + +- void OnNext (object obj, EventArgs args) ++ private void OnNext (object obj, EventArgs args) + { + HideTiles (); +- page++; ++ tileIndex = Math.Min (tiles.Count - 1, tileIndex + PageSize); ++ + if (!Expanded) + OnActivated (obj, args); + else +- ShowTiles (false); ++ ShowTiles (); + } + + protected void OnActivated (object obj, EventArgs args) +@@ -246,27 +214,56 @@ namespace Beagle.Search { + CategoryToggle (scope); + } + ++ public void SetMaxDisplayHeight (int height) ++ { ++ if (tileHeight != height) { ++ tileHeight = height; ++ HideTiles (); ++ ++ if (Expanded) ++ ShowTiles (); ++ } ++ } ++ ++ public int GetPotentialDisplayHeight () ++ { ++ if (tiles.Count == 0) ++ return 0; ++ ++ Requisition headerReq = header.SizeRequest (); ++ Requisition tileReq = tiles[0].SizeRequest (); ++ return headerReq.Height + (tiles.Count / Columns) * tileReq.Height; ++ } ++ + public delegate void CategoryToggleDelegate (ScopeType scope); + public event CategoryToggleDelegate CategoryToggle; + + protected int PageSize { + get { +- return Math.Min (showingMany ? many : few, tiles.Count); ++ if (tiles.Count == 0) ++ return 0; ++ ++ if (tileHeight == 0) ++ return Math.Min (2 * Columns, tiles.Count); ++ ++ Requisition sizeReq = tiles[0].SizeRequest (); ++ int ps = Math.Min (tileHeight / sizeReq.Height * Columns, tiles.Count); ++ ++ // Display at least two rows if we have the hits for it. ++ if (ps < 2 * Columns) ++ ps = Math.Min (2 * Columns, tiles.Count); ++ ++ return ps; + } + } + +- protected int FirstVisible { ++ private int FirstVisible { + get { +- if (page == 0) +- return 0; +- else if (extended) +- return page * many; +- else +- return few + (page - 1) * many; ++ return tileIndex; + } + } + +- protected int LastVisible { ++ private int LastVisible { + get { + return Math.Min (FirstVisible + PageSize, tiles.Count) - 1; + } +@@ -337,7 +334,7 @@ namespace Beagle.Search { + set { + HideTiles (); + tiles.SortType = value; +- ShowTiles (true); ++ ShowTiles (); + } + } + +@@ -346,7 +343,7 @@ namespace Beagle.Search { + if (extended) { + HideTiles (); + this.extended = extended; +- ShowTiles (false); ++ ShowTiles (); + } + if (focus && !Empty) + ((Gtk.Widget)VisibleTiles[0]).GrabFocus (); +diff --git a/beagle/search/Beagle.Search/GroupView.cs b/beagle/search/Beagle.Search/GroupView.cs +index d9d6319..e0620da 100644 +--- a/beagle/search/Beagle.Search/GroupView.cs ++++ b/beagle/search/Beagle.Search/GroupView.cs +@@ -25,6 +25,9 @@ namespace Beagle.Search { + private Gtk.SizeGroup tileSizeGroup; + private Gtk.Widget selection; + ++ private int[] maxHeight; ++ private int[] displayHeight; ++ + public event CategoryToggledDelegate CategoryToggled; + public event TileHandler TileSelected; + +@@ -47,8 +50,68 @@ namespace Beagle.Search { + + categories [info.Group] = box; + } ++ ++ maxHeight = new int[Children.Length]; ++ displayHeight = new int[Children.Length]; + } + ++ public void AdjustCategories (int height) ++ { ++ Category last = null; ++ int visible = 0, totalHeight = height, childLen = Children.Length; ++ ulong mask = ~0UL; ++ ++ for (int i = 0; i < childLen; i++) { ++ displayHeight[i] = maxHeight[i] = 0; ++ Category c = (Category) Children[i]; ++ if (!c.Expanded || c.Count == 0) { ++ mask ^= 1UL << i; ++ continue; ++ } ++ ++ last = c; ++ visible++; ++ maxHeight[i] = c.GetPotentialDisplayHeight (); ++ } ++ ++ if (visible == 0) { ++ return; ++ } else if (visible == 1) { ++ last.SetMaxDisplayHeight (height); ++ return; ++ } ++ ++ // Split the available height among the visible categories ++ for (int active = visible; active > 0 && totalHeight > active;) { ++ int avg_height = totalHeight / active; ++ ++ for (int i = 0; i < childLen; i++) { ++ if ((mask & 1UL << i) == 0) ++ continue; ++ ++ int diff = maxHeight[i] - displayHeight[i]; ++ if (diff <= avg_height) { ++ displayHeight[i] += diff; ++ totalHeight -= diff; ++ mask ^= 1UL << i; ++ } else { ++ displayHeight[i] += avg_height; ++ totalHeight -= avg_height; ++ } ++ } ++ ++ for (int j = active = 0; j < childLen; j++) ++ if ((mask & 1UL << j) != 0) ++ active++; ++ } ++ ++ // Tell each category how much height it has to work with ++ for (int i = 0; i < childLen; i++) { ++ Category c = (Category) Children[i]; ++ c.SetMaxDisplayHeight (displayHeight[i]); ++ } ++ } ++ + public void AddHit (Tile tile) + { + tile.Show (); +diff --git a/beagle/search/Beagle.Search/Panes.cs b/beagle/search/Beagle.Search/Panes.cs +index 3ae5b7e..4b6a554 100644 +--- a/beagle/search/Beagle.Search/Panes.cs ++++ b/beagle/search/Beagle.Search/Panes.cs +@@ -92,6 +92,10 @@ namespace Beagle.Search { + Gtk.Widget focusChild = mainChild.FocusChild; + mainChild.FocusChild = null; + mainChild.FocusChild = focusChild; ++ ++ GroupView gv = mainChild as GroupView; ++ if (gv != null) ++ gv.AdjustCategories (args.Allocation.Height); + } + } + +-- +cgit v0.8.3.1 diff --git a/app-misc/beagle/files/beagle-0.3.9-mono2.6.patch b/app-misc/beagle/files/beagle-0.3.9-mono2.6.patch new file mode 100644 index 000000000000..d62f29b4ba9d --- /dev/null +++ b/app-misc/beagle/files/beagle-0.3.9-mono2.6.patch @@ -0,0 +1,56 @@ +diff -p -up beagle-0.3.9/beagled/SqliteUtils.cs.mono2.6 beagle-0.3.9/beagled/SqliteUtils.cs +--- beagle-0.3.9/beagled/SqliteUtils.cs.mono2.6 2008-01-02 00:25:15.000000000 +0100 ++++ beagle-0.3.9/beagled/SqliteUtils.cs 2009-12-16 14:27:28.000000000 +0100 +@@ -55,7 +55,8 @@ namespace Beagle.Util { + try { + ret = command.ExecuteNonQuery (); + break; +- } catch (SqliteBusyException ex) { ++ } catch (SqliteException ex) { ++ if (ex.ErrorCode == SQLiteErrorCode.Busy) + Thread.Sleep (50); + } catch (Exception e) { + Log.Error (e, "SQL that caused the exception: {0}", command_text); +@@ -79,7 +80,8 @@ namespace Beagle.Util { + try { + ret = command.ExecuteNonQuery (); + break; +- } catch (SqliteBusyException ex) { ++ } catch (SqliteException ex) { ++ if (ex.ErrorCode == SQLiteErrorCode.Busy) + Thread.Sleep (50); + } catch (Exception e) { + Log.Error ( e, "SQL that caused the exception: {0}", command.CommandText); +@@ -96,7 +98,8 @@ namespace Beagle.Util { + while (reader == null) { + try { + reader = command.ExecuteReader (); +- } catch (SqliteBusyException ex) { ++ } catch (SqliteException ex) { ++ if (ex.ErrorCode == SQLiteErrorCode.Busy) + Thread.Sleep (50); + } + } +@@ -108,7 +111,8 @@ namespace Beagle.Util { + while (true) { + try { + return reader.Read (); +- } catch (SqliteBusyException ex) { ++ } catch (SqliteException ex) { ++ if (ex.ErrorCode == SQLiteErrorCode.Busy) + Thread.Sleep (50); + } + } +diff -p -up beagle-0.3.9/Util/FSpotTools.cs.mono2.6 beagle-0.3.9/Util/FSpotTools.cs +--- beagle-0.3.9/Util/FSpotTools.cs.mono2.6 2007-11-27 02:49:59.000000000 +0100 ++++ beagle-0.3.9/Util/FSpotTools.cs 2009-12-16 14:27:58.000000000 +0100 +@@ -85,7 +85,8 @@ namespace Beagle.Util { + while (reader == null) { + try { + reader = command.ExecuteReader (); +- } catch (SqliteBusyException) { ++ } catch (SqliteException ex) { ++ if (ex.ErrorCode == SQLiteErrorCode.Busy) + Thread.Sleep (50); + } + } diff --git a/app-misc/beagle/files/beagle-0.3.9-openfix.patch b/app-misc/beagle/files/beagle-0.3.9-openfix.patch new file mode 100644 index 000000000000..fd48fbae9eaa --- /dev/null +++ b/app-misc/beagle/files/beagle-0.3.9-openfix.patch @@ -0,0 +1,14 @@ +diff -upNr beagle-0.3.9.orign/search/Beagle.Search.Tiles/Tile.cs beagle-0.3.9/search/Beagle.Search.Tiles/Tile.cs +--- beagle-0.3.9.orign/search/Beagle.Search.Tiles/Tile.cs 2008-07-17 01:54:15.000000000 +0200 ++++ beagle-0.3.9/search/Beagle.Search.Tiles/Tile.cs 2009-07-06 20:50:41.227254947 +0200 +@@ -348,10 +348,6 @@ namespace Beagle.Search.Tiles { + #else + MimeApplication app; + app = Mime.GetDefaultApplication (mimetype); +- if (app == null) { +- Console.WriteLine ("Can't open MimeType '{0}'", mimetype); +- return; +- } + + bool expect_uris = app.SupportsUris (); + path = hit.Path; diff --git a/app-misc/beagle/files/beagle-0.3.9-update-tileindex.patch b/app-misc/beagle/files/beagle-0.3.9-update-tileindex.patch new file mode 100644 index 000000000000..b8a3861fcbdb --- /dev/null +++ b/app-misc/beagle/files/beagle-0.3.9-update-tileindex.patch @@ -0,0 +1,24 @@ +From 1f2e02c9f1e47b747d281510ab7bbd7950c568ee Mon Sep 17 00:00:00 2001 +From: Vincent Untz <vuntz@gnome.org> +Date: Fri, 14 Aug 2009 11:31:59 +0000 +Subject: Update tileIndex when removing a tile + +The bug was introduced with 7cfcb26c. + +http://bugzilla.gnome.org/show_bug.cgi?id=582354 +--- +diff --git a/beagle/search/Beagle.Search/Category.cs b/beagle/search/Beagle.Search/Category.cs +index 06e8724..a008ef4 100644 +--- a/beagle/search/Beagle.Search/Category.cs ++++ b/beagle/search/Beagle.Search/Category.cs +@@ -152,6 +152,8 @@ namespace Beagle.Search { + + tiles.Remove ((Tiles.Tile)widget); + ++ tileIndex = Math.Min( Math.Max( tiles.Count - 1, 0), tileIndex); ++ + if (Expanded) + ShowTiles (); + } +-- +cgit v0.8.3.1 |