summaryrefslogtreecommitdiff
path: root/src/GsWidget.cxx
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2006-02-10 18:49:49 +0100
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2006-02-10 18:49:49 +0100
commit8e801ab3e27df7ef3b459fdd31c653894edf638d (patch)
treed37d0df6bdc4356f22335ace568174eb2c368e3b /src/GsWidget.cxx
parent302137a16e357c03ace819fd9f5085ac86844570 (diff)
parentc0382411064786243e6b6deaed64d240618e6fba (diff)
merge
Diffstat (limited to 'src/GsWidget.cxx')
-rw-r--r--src/GsWidget.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/GsWidget.cxx b/src/GsWidget.cxx
index 859e3d4..7dded29 100644
--- a/src/GsWidget.cxx
+++ b/src/GsWidget.cxx
@@ -148,7 +148,6 @@ int GsWidget::open_file(int fd) {
if (dsc->parse(in_fd) == 0) {
int bb_x, bb_y, bb_w, bb_h;
- dsc->print();
dsc->get_bounding_box(&bb_x, &bb_y, &bb_w, &bb_h);
paper_x = bb_w;
paper_y = bb_h;
@@ -169,7 +168,7 @@ int GsWidget::load() {
pid_t pid;
if (dsc) {
- return load_page(0);
+ return load_page(1);
}
if (in_fd < 0) {
@@ -209,7 +208,7 @@ GsWidget::load_page(int p) {
return 1;
}
- if (p < 0 || p >= dsc->get_pages()) {
+ if (p < 1 || p > dsc->get_pages()) {
fprintf(stderr, "Page %d not found in document\n", p);
return 1;
}