aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/table')
-rw-r--r--widgets/table/e-tree.c28
1 files changed, 24 insertions, 4 deletions
diff --git a/widgets/table/e-tree.c b/widgets/table/e-tree.c
index 318564e42b..a0432b8f68 100644
--- a/widgets/table/e-tree.c
+++ b/widgets/table/e-tree.c
@@ -1362,7 +1362,6 @@ et_real_construct (ETree *e_tree, ETreeModel *etm, ETableExtras *ete,
ETableSpecification *specification, ETableState *state)
{
int row = 0;
- int i, col_count;
if (ete)
g_object_ref(ete);
@@ -2048,6 +2047,21 @@ find_next_in_range (ETree *et, gint start, gint end, ETreePathFunc func, gpointe
return NULL;
}
+static ETreePath
+find_prev_in_range (ETree *et, gint start, gint end, ETreePathFunc func, gpointer data)
+{
+ ETreePath path;
+ gint row;
+
+ for (row = start; row >= end; row--) {
+ path = e_tree_table_adapter_node_at_row (et->priv->etta, row);
+ if (func (et->priv->model, path, data))
+ return path;
+ }
+
+ return NULL;
+}
+
gboolean
e_tree_find_next (ETree *et, ETreeFindNextParams params, ETreePathFunc func, gpointer data)
{
@@ -2060,7 +2074,10 @@ e_tree_find_next (ETree *et, ETreeFindNextParams params, ETreePathFunc func, gpo
if (row == -1)
row = 0;
- found = find_next_in_range (et, row + 1, row_count - 1, func, data);
+ if (params & E_TREE_FIND_NEXT_FORWARD)
+ found = find_next_in_range (et, row + 1, row_count - 1, func, data);
+ else
+ found = find_prev_in_range (et, row - 1, 0, func, data);
if (found) {
e_tree_table_adapter_show_node (et->priv->etta, found);
@@ -2068,8 +2085,11 @@ e_tree_find_next (ETree *et, ETreeFindNextParams params, ETreePathFunc func, gpo
return TRUE;
}
- if ((params & E_TREE_FIND_NEXT_WRAP) && (row > 0)) {
- found = find_next_in_range (et, 0, row, func, data);
+ if (params & E_TREE_FIND_NEXT_WRAP) {
+ if (params & E_TREE_FIND_NEXT_FORWARD)
+ found = find_next_in_range (et, 0, row, func, data);
+ else
+ found = find_prev_in_range (et, row_count - 1, row, func, data);
if (found && found != cursor) {
e_tree_table_adapter_show_node (et->priv->etta, found);
'>- Add user and group mfs for MooseFS portwen2010-04-071-0/+1 * - Fix malformed lines, per new portlint(1) checkpav2010-04-061-4/+4 * - reserver GID/UID 924 for upcomming mail/postpalsitetcu2010-03-131-0/+1 * Massive cleanup of the Munin ports:des2010-02-251-0/+1 * - Add user and group for audio/liquidsoapwen2010-02-011-0/+1 * - Update Wolfpack Empire to 4.3.23johans2009-12-281-0/+1 * - Reserve UID/GID 137 for audio/musicpdpav2009-12-071-0/+1 * - Prepare for add new port databases/mongodbwen2009-11-191-0/+1 * - Add 444 for callweaverpav2009-09-181-0/+1 * - Update to 0.8.5beat2009-09-181-0/+1 * - Add UID/GID:211 for devel/py-gitosisnivit2009-09-161-0/+1 * - Fix typo in directory name for undernet user.flz2009-09-111-2/+2 * Add haldaemon with UID/GID 560.flz2009-09-071-0/+1 * Add UID and GID forgotten while adding net-mgmt/noc.bsam2009-08-181-0/+1 * - unbound does not use `unbound' group anymore, but `daemmon' insteadsem2009-08-171-1/+1 * Remove entries for security/trans-proxy-tor and security/dns-proxy-torerwin2009-08-161-2/+0 * Add prosody entries to UIDs & GIDs.vanilla2009-08-051-0/+1 * Register user/group "redis" for the port "databases/redis".skv2009-07-281-0/+1 * - Unify path to nologin as /usr/sbin/nologin. This has been done at leastwxs2009-07-251-8/+8 * - Add fossy user/group for devel/fossology.alepulver2009-07-241-0/+1 * -Add transmission.mezz2009-06-201-1/+2 * - Add GID and UID for emulators/virtualbox.beat2009-06-181-0/+1 * - Add couchdb user and group.wxs2009-06-171-0/+1 * - Register net-mgmt/nefurafan2009-04-071-0/+1 * - Register uid and gid for mail/prayerrafan2009-03-171-0/+1 * Reflect the change of UID/GID of ejabberd.delphij2009-03-161-1/+1 * - Updated to 0.21glarkin2009-03-111-1/+1 * Rework on rc script for www/httptunnel.rafan2009-01-301-0/+1 * Register a fixed UID/GID for the user 'dhcpd' and use that instead of astefan2009-01-121-0/+1 * - Add UID and GID entries for net/rabbitmq.wxs2008-10-291-0/+1 * - Fixed logcheck script silent failure in previous commitglarkin2008-09-111-1/+1 * - Fixed left-over directory problemglarkin2008-09-091-0/+1 * - Update pgbouncer to 1.2.3mm2008-08-121-0/+1 * Reserve numbers for databases/frontbase user.edwin2008-06-131-0/+1 * Switch UIDs to master.passwd compatible format.flz2008-05-201-142/+142 * Style fix, $FreeBSD$ line is a comment, so add a leading '#'.flz2008-05-201-1/+1 * Reserve UID and GID for irc/bitlbee.brix2008-05-201-0/+1 * - Add entries for irc/undernet-ircubeech2008-05-011-0/+1 * - Reserve GID/UID 59 for dns/unboundsem2008-04-291-0/+1 * Reserve 814 for sysutils/puppet*pav2008-04-111-0/+1 * - Add GID and UID for www/openacs and www/openacs-dotlrnmm2008-04-031-0/+2 * - Add GID and UID for net/freeradius2mm2008-04-021-0/+1 * * Don't need p5-Digest-MD5; p5-libwww dependency takes care of that.koitsu2008-03-101-1/+1 * - Register UID for net/phpldapadmin, net/phpldapadmin098rafan2008-03-091-0/+1 * - Add GID and UID for net-im/openfiremiwi2008-03-081-0/+1 * Remove IGNORE; add UID 141 to ports/UIDs, and remove unnecessary Time::HiReskoitsu2008-02-191-0/+1 * - Sort UIDsmiwi2008-02-171-2/+2 * - add hobbit with id 280dinoex2008-01-281-0/+1 * - Reserve UID/GID 240 and 241 for aprsddb2008-01-241-0/+2 * Changes:miwi2008-01-211-0/+1 * Add 913 for _relayd.kuriyama2008-01-211-0/+1 * Inconsistent format of lines in /usr/ports/UIDsedwin2008-01-191-4/+4 * - Reserve uid/gid for net/iodine 0.4.1_1rafan2008-01-111-0/+1 * Unify nologin path to /usr/sbin/nologinedwin2007-09-301-75/+75 * Add _sj3 for japanese/sj3 with UID 912edwin2007-09-091-1/+2 * Add 911 for iserv (See PR ports/114017)edwin2007-09-071-0/+1 * Reserve a user and group ID for the stunnel daemon.roam2007-08-281-0/+1 * - Update to 1.28beech2007-06-281-0/+1 * - Move zabbix from UID 112 to 122 to avoid conflict with dccsat2007-06-221-0/+1 * - add MeTA1dinoex2007-06-101-5/+5 * - Update to 0.9.8miwi2007-05-301-0/+1 * Reserve a UID for pulse and a GID for pulse and pulse-access. These are neededmarcus2007-04-301-0/+1 * - Sorted otrs correctmiwi2007-04-211-1/+1 * Register UID and UID for mail/nullmailer.clive2007-04-211-1/+2 * - Add UID/GID for devel/otrsmiwi2007-04-111-0/+1 * - Use static gid/uid.stas2007-04-111-0/+1 * (second attempt)naddy2007-04-101-1/+1 * reserve _ntp UID/GID for OpenNTPDnaddy2007-04-101-0/+1 * - Give irc/hybserv a unique UID/GIDlaszlof2007-03-311-0/+1 * Register UID and GID for net-mgmt/netdisco.shaun2007-03-281-0/+1 * Correct a copy-paste problem when allocating the polkit UID, and use a uniquemarcus2007-03-241-0/+1 * Reserve UID and GID for net-mgmt/nav.des2007-03-131-0/+1 * Add GID and UID for OpenBSD spamd (mail/spamd).delphij2007-03-091-0/+1 * - change smx entries to "/usr/sbin/nologin"dinoex2007-02-171-5/+5 * - add smmspdinoex2007-02-171-0/+1 * - Reserve UID/GID 312 for sphinxpav2007-01-311-0/+1 * - Reserve UID/GID 181 for nagiospav2007-01-281-0/+1 * - Register UID/GID for pdns_recursorpav2007-01-191-0/+1 * - Add user/group for sysutils/fcronrafan2007-01-171-0/+1 * Add user and group mythtv (119).grog2007-01-141-0/+1 * Add missing colon to the cups entry.shaun2006-12-281-1/+1 * - register cupsdinoex2006-12-181-0/+1 * - Reserve UID/GID 143 for mail/dovecotpav2006-12-011-0/+1 * - add wildfire to GIDs and UIDsalexbl2006-11-161-0/+1 * Register mail/fetchmail's UID and GID.barner2006-11-151-0/+1 * - Reserve UID and GID 561 for distccahze2006-11-121-0/+1 * Oops, restore dkfilter, still needed for dkfilter portache2006-11-091-0/+1 * Remove bogomilter and dkfilterache2006-11-091-2/+0 * - Add _xsi user and group for sysutils/xsi.alepulver2006-11-061-0/+1 * - Add entry for net-mgmt/bigsisterrafan2006-11-041-0/+1 * - Add hacluster user.alepulver2006-11-021-0/+1 * Reserve uid:gid 559 for the tacacs user for net/tac_plus4.marcus2006-10-311-0/+1 * This file lists entries in passwd(5) format; fix those three that didn't agree.ru2006-09-041-3/+3 * - Register UID/GID 128 for vserverpav2006-08-291-0/+1 * - Reserve UID/GID 118 for irc/ircproxypav2006-08-291-0/+1 * Add ID for Tiarra IRC Proxy.ume2006-07-291-0/+1 * - rc.d scripts are changed to show error messages when some errorrafan2006-07-291-0/+1 * Add user/group for mail/dkimproxy, which is added two days ago.rafan2006-07-291-0/+1 * Reserve uid/gid for net/smokepinglth2006-07-261-0/+1 * Fix home directory for "firebird" user:skv2006-07-251-1/+1 * Reserve uid/gid for Openlink Virtuoso Universal Server.fjoe2006-07-251-0/+1 * Add entry for trans-proxy-tor.miwi2006-07-221-0/+1 * Add entry for dns-proxy-tor.miwi2006-07-221-0/+1 * Add $FreeBSD tag.krion2006-07-221-0/+1 * Please welcome UIDs and GIDs file. Those have been created from the UID/GIDflz2006-07-20