* cosmetics, re-indentation
This commit is contained in:
@ -1,4 +1,5 @@
|
|||||||
/*
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
|
||||||
|
**
|
||||||
** Copyright (C) 2008-2011 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
|
** Copyright (C) 2008-2011 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
|
||||||
**
|
**
|
||||||
** This program is free software; you can redistribute it and/or modify
|
** This program is free software; you can redistribute it and/or modify
|
||||||
@ -24,37 +25,37 @@
|
|||||||
#include <xapian.h>
|
#include <xapian.h>
|
||||||
|
|
||||||
#include "mu-util.h"
|
#include "mu-util.h"
|
||||||
#include "mu-msg.h"
|
#include "mu-msg.h"
|
||||||
#include "mu-msg-iter.h"
|
#include "mu-msg-iter.h"
|
||||||
|
|
||||||
static gboolean update_msg (MuMsgIter *iter);
|
static gboolean update_msg (MuMsgIter *iter);
|
||||||
|
|
||||||
struct _MuMsgIter {
|
struct _MuMsgIter {
|
||||||
|
|
||||||
_MuMsgIter (const Xapian::Enquire &enq, size_t batchsize):
|
_MuMsgIter (const Xapian::Enquire &enq, size_t batchsize):
|
||||||
_enq(enq), _batchsize(batchsize), _offset(0), _msg(0) {
|
_enq(enq), _batchsize(batchsize), _offset(0), _msg(0) {
|
||||||
|
|
||||||
_matches = _enq.get_mset (0, _batchsize);
|
_matches = _enq.get_mset (0, _batchsize);
|
||||||
_cursor = _matches.begin();
|
_cursor = _matches.begin();
|
||||||
_is_null = _matches.empty();
|
_is_null = _matches.empty();
|
||||||
|
|
||||||
if (!_matches.empty())
|
if (!_matches.empty())
|
||||||
update_msg (this);
|
update_msg (this);
|
||||||
}
|
}
|
||||||
|
|
||||||
~_MuMsgIter () {
|
~_MuMsgIter () {
|
||||||
if (_msg)
|
if (_msg)
|
||||||
mu_msg_unref (_msg);
|
mu_msg_unref (_msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
const Xapian::Enquire _enq;
|
const Xapian::Enquire _enq;
|
||||||
Xapian::MSet _matches;
|
Xapian::MSet _matches;
|
||||||
Xapian::MSet::const_iterator _cursor;
|
Xapian::MSet::const_iterator _cursor;
|
||||||
size_t _batchsize, _offset;
|
size_t _batchsize, _offset;
|
||||||
bool _is_null;
|
bool _is_null;
|
||||||
|
|
||||||
Xapian::Document _doc;
|
Xapian::Document _doc;
|
||||||
MuMsg *_msg;
|
MuMsg *_msg;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
** Copyright (C) 2010 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
|
** Copyright (C) 2011 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
|
||||||
**
|
**
|
||||||
** This program is free software; you can redistribute it and/or modify it
|
** This program is free software; you can redistribute it and/or modify it
|
||||||
** under the terms of the GNU General Public License as published by the
|
** under the terms of the GNU General Public License as published by the
|
||||||
@ -49,6 +49,7 @@ mu_msg_prio_char (MuMsgPrio prio)
|
|||||||
|
|
||||||
g_return_val_if_fail (prio == 'l' || prio == 'n' || prio == 'h',
|
g_return_val_if_fail (prio == 'l' || prio == 'n' || prio == 'h',
|
||||||
0);
|
0);
|
||||||
|
|
||||||
return (char)prio;
|
return (char)prio;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
/*
|
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
|
||||||
|
**
|
||||||
** Copyright (C) 2010 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
|
** Copyright (C) 2010 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
|
||||||
**
|
**
|
||||||
** This program is free software; you can redistribute it and/or modify it
|
** This program is free software; you can redistribute it and/or modify it
|
||||||
|
|||||||
Reference in New Issue
Block a user