From db2cfcad3a65365b44977dded86b82c26128a928 Mon Sep 17 00:00:00 2001 From: Johannes Hofmann Date: Fri, 10 Feb 2006 19:00:59 +0100 Subject: interface now uses page numbers starting with 1 --- src/flpsed.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/flpsed.cxx b/src/flpsed.cxx index 391134c..a373cf4 100644 --- a/src/flpsed.cxx +++ b/src/flpsed.cxx @@ -80,9 +80,9 @@ char filename[256] = ""; void page_sel_cb(Fl_Widget *w, void *) { - int p = page_sel->value() - 1; - if (p >= 0) { - psed_p->load_page(page_sel->value() - 1); + int p = page_sel->value(); + if (p > 0) { + psed_p->load_page(page_sel->value()); } } @@ -100,7 +100,7 @@ void page_sel_fill() { snprintf(buf, sizeof(buf), "%d", i); page_sel->add(buf); } - page_sel->select(psed_p->get_page() + 1); + page_sel->select(psed_p->get_page()); } void open_cb() { @@ -196,12 +196,12 @@ void import_cb() { void first_cb() { psed_p->load(); - page_sel->select(psed_p->get_page() + 1); + page_sel->select(psed_p->get_page()); } void next_cb() { psed_p->next(); - page_sel->select(psed_p->get_page() + 1); + page_sel->select(psed_p->get_page()); } void quit_cb() { -- cgit v1.2.3