From 03a65c733a473cd92d50132961d02c3910417f72 Mon Sep 17 00:00:00 2001 From: miklosh Date: Sun, 19 Aug 2007 22:32:56 +0000 Subject: [PATCH] Disable the page selector when there's only one page --- src/extension/internal/pdfinput/pdf-input.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/extension/internal/pdfinput/pdf-input.cpp b/src/extension/internal/pdfinput/pdf-input.cpp index 7def9927d..3e3ea7bfe 100644 --- a/src/extension/internal/pdfinput/pdf-input.cpp +++ b/src/extension/internal/pdfinput/pdf-input.cpp @@ -64,6 +64,10 @@ PdfImportDialog::PdfImportDialog(PDFDoc *doc) new class Gtk::Adjustment(1, 1, _pdf_doc->getNumPages(), 1, 10, 0)); _pageNumberSpin = Gtk::manage(new class Gtk::SpinButton(*_pageNumberSpin_adj, 1, 1)); hbox2 = Gtk::manage(new class Gtk::HBox(false, 0)); + // Disable the page selector when there's only one page + if ( _pdf_doc->getCatalog()->getNumPages() == 1 ) { + _pageNumberSpin->set_sensitive(false); + } // Crop settings _cropCheck = Gtk::manage(new class Gtk::CheckButton(_("Crop to:"))); -- 2.30.2