summaryrefslogtreecommitdiffstats
path: root/src/extension/internal/pdfinput/pdf-input.cpp
diff options
context:
space:
mode:
authormiklosh <miklosh@users.sourceforge.net>2007-08-19 22:32:56 +0000
committermiklosh <miklosh@users.sourceforge.net>2007-08-19 22:32:56 +0000
commit73d4959765ae4f949012b29a3831d820450999d0 (patch)
treeeee79ec61fd339034a1e741427f8a23d64618457 /src/extension/internal/pdfinput/pdf-input.cpp
parentAdded checks for pixbuf/pixmap allocation failure (diff)
downloadinkscape-73d4959765ae4f949012b29a3831d820450999d0.tar.gz
inkscape-73d4959765ae4f949012b29a3831d820450999d0.zip
Disable the page selector when there's only one page
(bzr r3541)
Diffstat (limited to 'src/extension/internal/pdfinput/pdf-input.cpp')
-rw-r--r--src/extension/internal/pdfinput/pdf-input.cpp4
1 files changed, 4 insertions, 0 deletions
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:")));