aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--embed/mozilla/GeckoPrintService.cpp5
2 files changed, 9 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 5ab5d5f6f..cdc281a9f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-11-04 Christian Persch <chpe@cvs.gnome.org>
+
+ * embed/mozilla/GeckoPrintService.cpp:
+
+ Fix printing of page ranges.
+
2006-11-03 Christian Persch <chpe@cvs.gnome.org>
* lib/ephy-spell-check.c: (ephy_spell_check_check_word):
diff --git a/embed/mozilla/GeckoPrintService.cpp b/embed/mozilla/GeckoPrintService.cpp
index d5124636b..5a4ca358f 100644
--- a/embed/mozilla/GeckoPrintService.cpp
+++ b/embed/mozilla/GeckoPrintService.cpp
@@ -534,8 +534,9 @@ GeckoPrintService::TranslateSettings (GtkPrintSettings *aGtkSettings,
if (numRanges > 0) {
/* FIXME: We can only support one range, ignore more ranges or raise error? */
aSettings->SetPrintRange (nsIPrintSettings::kRangeSpecifiedPageRange);
- aSettings->SetStartPageRange (pageRanges[0].start);
- aSettings->SetEndPageRange (pageRanges[1].end);
+ /* Gecko page numbers start at 1, while gtk page numbers start at 0 */
+ aSettings->SetStartPageRange (pageRanges[0].start + 1);
+ aSettings->SetEndPageRange (pageRanges[0].end + 1);
g_free (pageRanges);
}