[gedit/wip/printing-improvements] print-preview: various small code enhancements
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit/wip/printing-improvements] print-preview: various small code enhancements
- Date: Sat, 27 Jun 2015 15:50:41 +0000 (UTC)
commit 7a717db90f95ebd088d9da6bfce3b313eaab14e5
Author: Sébastien Wilmet <swilmet gnome org>
Date: Sat Jun 27 17:45:43 2015 +0200
print-preview: various small code enhancements
gedit/gedit-print-preview.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gedit/gedit-print-preview.c b/gedit/gedit-print-preview.c
index c0aa873..a899c55 100644
--- a/gedit/gedit-print-preview.c
+++ b/gedit/gedit-print-preview.c
@@ -65,7 +65,7 @@ struct _GeditPrintPreview
gint n_columns;
guint n_pages;
- guint cur_page;
+ guint cur_page; /* starts at 0 */
gint cursor_x;
gint cursor_y;
@@ -483,7 +483,7 @@ scroll_event_activated (GtkWidget *widget,
static gint
get_first_page_displayed (GeditPrintPreview *preview)
{
- return preview->cur_page - preview->cur_page % preview->n_columns;
+ return preview->cur_page - (preview->cur_page % preview->n_columns);
}
/* returns the page number (starting from 0) or -1 if no page */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]