src/frontends/controllers/ControlPreamble.C
src/frontends/controllers/ControlPrint.C
src/frontends/controllers/ControlSearch.C
-src/frontends/controllers/ControlToc.C
src/frontends/controllers/helper_funcs.C
src/frontends/gnome/FormCitation.C
src/frontends/gnome/FormIndex.C
+2001-06-11 Lars Gullik Bjønnes <larsbj@birdstep.com>
+
+ * Makefile.am: make the dependencies work for the sub libs.
+
2001-05-31 Lars Gullik Bjønnes <larsbj@birdstep.com>
* Makefile.am (libfrontends_la_LIBADD): new var, add all subdirs
support/libfrontendsupport.la \
controllers/libcontrollers.la
+libfrontends_la_DEPENDENCIES = @FRONTEND_GUILIB@ \
+ support/libfrontendsupport.la \
+ controllers/libcontrollers.la
+
libfrontends_la_SOURCES=\
Dialogs.C \
Dialogs.h \
+2001-06-11 Lars Gullik Bjønnes <larsbj@birdstep.com>
+
+ * ControlToc.C (getContents): don't add anything to the list if it
+ is supposed to be empty.
+
2001-06-01 Angus Leeming <a.leeming@ic.ac.uk>
* helper_funcs.C (getVectorFromString): bug fix.
Buffer::SingleList const ControlToc::getContents(string const & type) const
{
- Buffer::SingleList contents;
-
- Buffer::TocItem noContent(0, 0, string());
+ Buffer::SingleList empty_list;
// This shouldn't be possible...
if (!lv_.view()->available()) {
- noContent.str = _("*** No Document ***");
- contents.push_back(noContent);
- return contents;
+ return empty_list;
}
Buffer::Lists tmp = lv_.view()->buffer()->getLists();
Buffer::Lists::iterator it = tmp.find(type);
if (it == tmp.end()) {
- noContent.str = _("*** No Lists ***");
- contents.push_back(noContent);
- return contents;
+ return empty_list;
}
return it->second;
+2001-06-11 Lars Gullik Bjønnes <larsbj@birdstep.com>
+
+ * FormToc.C (input): change test slightly.
+ (updateContents): clear list if empty and add no list msg.
+
2001-05-30 Angus Leeming <a.leeming@ic.ac.uk>
* FormParagraph.C (update, general_update): enabling the align buttons
#include "form_toc.h"
#include "helper_funcs.h" // getStringFromVector
#include "support/lstrings.h" // frontStrip, strip
+#include "debug.h"
+#include "gettext.h"
typedef FormCB<ControlToc, FormDB<FD_form_toc> > base_class;
updateContents();
unsigned int const choice = fl_get_browser( dialog_->browser_toc );
- if (0 < choice && choice - 1 < toclist_.size()) {
- controller().Goto(toclist_[choice-1].par->id());
+
+ if (choice - 1 < toclist_.size() && choice >= 1) {
+ controller().Goto(toclist_[choice - 1].par->id());
}
return ButtonPolicy::SMI_VALID;
Buffer::SingleList const contents = controller().getContents(type);
+ if (contents.empty()) {
+ fl_clear_browser(dialog_->browser_toc);
+ fl_add_browser_line(dialog_->browser_toc,
+ _("*** No Lists ***"));
+ }
+
// Check if all elements are the same.
if (toclist_ == contents) {
return;