summaryrefslogtreecommitdiff
path: root/src/book-view.c
diff options
context:
space:
mode:
authorAlessio Treglia <alessio@debian.org>2014-04-10 15:37:02 +0100
committerAlessio Treglia <alessio@debian.org>2014-04-10 15:37:02 +0100
commite9ca3b0060facd753744602a3baca5a1effdbd83 (patch)
tree5acbac3a3a7b195d9a5e2ef101f5758ff9201369 /src/book-view.c
parent2d71d20a62ca8f6989d86db58ce64c7a862675dd (diff)
Imported Upstream version 3.12.0upstream/3.12.0
Diffstat (limited to 'src/book-view.c')
-rw-r--r--src/book-view.c5009
1 files changed, 2614 insertions, 2395 deletions
diff --git a/src/book-view.c b/src/book-view.c
index 0169a0a..d6cfdc9 100644
--- a/src/book-view.c
+++ b/src/book-view.c
@@ -1,4 +1,4 @@
-/* book-view.c generated by valac 0.20.1, the Vala compiler
+/* book-view.c generated by valac 0.22.1, the Vala compiler
* generated from book-view.vala, do not modify */
/*
@@ -70,21 +70,21 @@ typedef struct _PageViewClass PageViewClass;
#define _page_unref0(var) ((var == NULL) ? NULL : (var = (page_unref (var), NULL)))
struct _BookView {
- GtkVBox parent_instance;
+ GtkBox parent_instance;
BookViewPrivate * priv;
};
struct _BookViewClass {
- GtkVBoxClass parent_class;
+ GtkBoxClass parent_class;
};
struct _BookViewPrivate {
- Book* book;
+ Book* _book;
GHashTable* page_data;
gboolean need_layout;
gboolean laying_out;
gboolean show_selected_page;
- PageView* selected_page;
+ PageView* selected_page_view;
GtkWidget* drawing_area;
GtkScrollbar* scroll;
GtkAdjustment* adjustment;
@@ -118,8 +118,12 @@ gpointer value_get_page_view (const GValue* value);
GType page_view_get_type (void) G_GNUC_CONST;
#define BOOK_VIEW_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_BOOK_VIEW, BookViewPrivate))
enum {
- BOOK_VIEW_DUMMY_PROPERTY
+ BOOK_VIEW_DUMMY_PROPERTY,
+ BOOK_VIEW_BOOK,
+ BOOK_VIEW_SELECTED_PAGE,
+ BOOK_VIEW_X_OFFSET
};
+Book* book_view_get_book (BookView* self);
static void book_view_add_cb (BookView* self, Book* book, Page* page);
static void _book_view_add_cb_book_page_added (Book* _sender, Page* page, gpointer self);
static void book_view_remove_cb (BookView* self, Book* book, Page* page);
@@ -146,9 +150,10 @@ static void book_view_scroll_cb (BookView* self, GtkAdjustment* adjustment);
static void _book_view_scroll_cb_gtk_adjustment_value_changed (GtkAdjustment* _sender, gpointer self);
BookView* book_view_new (Book* book);
BookView* book_view_construct (GType object_type, Book* book);
+static void book_view_set_book (BookView* self, Book* value);
guint book_get_n_pages (Book* self);
Page* book_get_page (Book* self, gint page_number);
-void book_view_select_page (BookView* self, Page* page);
+void book_view_set_selected_page (BookView* self, Page* value);
static void _page_unref0_ (gpointer var);
static void _page_view_unref0_ (gpointer var);
static PageView* book_view_get_nth_page (BookView* self, gint n);
@@ -162,16 +167,15 @@ PageView* page_view_new (Page* page);
PageView* page_view_construct (GType object_type, Page* page);
static void _book_view_page_view_changed_cb_page_view_changed (PageView* _sender, gpointer self);
static void _book_view_page_view_size_changed_cb_page_view_size_changed (PageView* _sender, gpointer self);
-static void book_view_set_selected_page (BookView* self, PageView* page);
-void page_view_set_selected (PageView* self, gboolean selected);
-static void book_view_set_x_offset (BookView* self, gint offset);
-static gint book_view_get_x_offset (BookView* self);
+static void book_view_set_selected_page_view (BookView* self, PageView* page);
+void page_view_set_selected (PageView* self, gboolean value);
static void book_view_show_page_view (BookView* self, PageView* page);
gint page_view_get_x_offset (PageView* self);
gint page_view_get_width (PageView* self);
+gint book_view_get_x_offset (BookView* self);
+void book_view_set_x_offset (BookView* self, gint value);
static void book_view_select_page_view (BookView* self, PageView* page);
-Page* book_view_get_selected (BookView* self);
-Book* book_view_get_book (BookView* self);
+Page* book_view_get_selected_page (BookView* self);
static void book_view_layout_into (BookView* self, gint width, gint height, gint* book_width, gint* book_height);
gint page_get_dpi (Page* self);
gint page_get_width (Page* self);
@@ -179,8 +183,8 @@ gint page_get_height (Page* self);
void page_view_set_width (PageView* self, gint width);
void page_view_set_height (PageView* self, gint height);
gint page_view_get_height (PageView* self);
-void page_view_set_x_offset (PageView* self, gint offset);
-void page_view_set_y_offset (PageView* self, gint offset);
+void page_view_set_x_offset (PageView* self, gint value);
+void page_view_set_y_offset (PageView* self, gint value);
static void book_view_layout (BookView* self);
void page_view_render (PageView* self, cairo_t* context);
gboolean page_view_get_selected (PageView* self);
@@ -195,2127 +199,2123 @@ void book_view_select_next_page (BookView* self);
void book_view_select_prev_page (BookView* self);
static void g_cclosure_user_marshal_VOID__PAGE (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data);
static void book_view_finalize (GObject* obj);
+static void _vala_book_view_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
+static void _vala_book_view_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
static void _book_view_add_cb_book_page_added (Book* _sender, Page* page, gpointer self) {
-#line 90 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 123 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
book_view_add_cb (self, _sender, page);
-#line 204 "book-view.c"
+#line 210 "book-view.c"
}
static void _book_view_remove_cb_book_page_removed (Book* _sender, Page* page, gpointer self) {
-#line 91 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 124 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
book_view_remove_cb (self, _sender, page);
-#line 211 "book-view.c"
+#line 217 "book-view.c"
}
static void _book_view_reorder_cb_book_reordered (Book* _sender, gpointer self) {
-#line 92 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 125 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
book_view_reorder_cb (self, _sender);
-#line 218 "book-view.c"
+#line 224 "book-view.c"
}
static void _book_view_clear_cb_book_cleared (Book* _sender, gpointer self) {
-#line 93 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 126 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
book_view_clear_cb (self, _sender);
-#line 225 "book-view.c"
+#line 231 "book-view.c"
}
static gboolean _book_view_configure_cb_gtk_widget_configure_event (GtkWidget* _sender, GdkEventConfigure* event, gpointer self) {
gboolean result;
result = book_view_configure_cb (self, _sender, event);
-#line 94 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 127 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
return result;
-#line 234 "book-view.c"
+#line 240 "book-view.c"
}
static gboolean _book_view_draw_cb_gtk_widget_draw (GtkWidget* _sender, cairo_t* cr, gpointer self) {
gboolean result;
result = book_view_draw_cb (self, _sender, cr);
-#line 95 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 128 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
return result;
-#line 243 "book-view.c"
+#line 249 "book-view.c"
}
static gboolean _book_view_motion_cb_gtk_widget_motion_notify_event (GtkWidget* _sender, GdkEventMotion* event, gpointer self) {
gboolean result;
result = book_view_motion_cb (self, _sender, event);
-#line 96 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 129 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
return result;
-#line 252 "book-view.c"
+#line 258 "book-view.c"
}
static gboolean _book_view_key_cb_gtk_widget_key_press_event (GtkWidget* _sender, GdkEventKey* event, gpointer self) {
gboolean result;
result = book_view_key_cb (self, _sender, event);
-#line 97 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 130 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
return result;
-#line 261 "book-view.c"
+#line 267 "book-view.c"
}
static gboolean _book_view_button_cb_gtk_widget_button_press_event (GtkWidget* _sender, GdkEventButton* event, gpointer self) {
gboolean result;
result = book_view_button_cb (self, _sender, event);
-#line 98 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
return result;
-#line 270 "book-view.c"
+#line 276 "book-view.c"
}
static gboolean _book_view_button_cb_gtk_widget_button_release_event (GtkWidget* _sender, GdkEventButton* event, gpointer self) {
gboolean result;
result = book_view_button_cb (self, _sender, event);
-#line 99 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 132 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
return result;
-#line 279 "book-view.c"
+#line 285 "book-view.c"
}
static gboolean _book_view_focus_cb_gtk_widget_focus_in_event (GtkWidget* _sender, GdkEventFocus* event, gpointer self) {
gboolean result;
result = book_view_focus_cb (self, _sender, event);
-#line 100 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 133 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
return result;
-#line 288 "book-view.c"
+#line 294 "book-view.c"
}
static gboolean _book_view_focus_cb_gtk_widget_focus_out_event (GtkWidget* _sender, GdkEventFocus* event, gpointer self) {
gboolean result;
result = book_view_focus_cb (self, _sender, event);
-#line 101 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 134 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
return result;
-#line 297 "book-view.c"
+#line 303 "book-view.c"
}
static void _book_view_scroll_cb_gtk_adjustment_value_changed (GtkAdjustment* _sender, gpointer self) {
-#line 102 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 135 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
book_view_scroll_cb (self, _sender);
-#line 304 "book-view.c"
-}
-
-
-static gpointer _book_ref0 (gpointer self) {
-#line 44 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- return self ? book_ref (self) : NULL;
-#line 311 "book-view.c"
+#line 310 "book-view.c"
}
static void _page_unref0_ (gpointer var) {
-#line 62 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 95 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
(var == NULL) ? NULL : (var = (page_unref (var), NULL));
-#line 318 "book-view.c"
+#line 317 "book-view.c"
}
static void _page_view_unref0_ (gpointer var) {
-#line 62 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 95 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
(var == NULL) ? NULL : (var = (page_view_unref (var), NULL));
-#line 325 "book-view.c"
+#line 324 "book-view.c"
}
static gpointer _g_object_ref0 (gpointer self) {
-#line 72 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 105 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
return self ? g_object_ref (self) : NULL;
-#line 332 "book-view.c"
+#line 331 "book-view.c"
}
BookView* book_view_construct (GType object_type, Book* book) {
BookView * self = NULL;
- Book* _tmp0_;
- Book* _tmp1_;
- Book* _tmp13_;
+ Book* _tmp0_ = NULL;
+ Book* _tmp13_ = NULL;
Page* _tmp14_ = NULL;
- Page* _tmp15_;
- Book* _tmp16_;
- Book* _tmp17_;
- Book* _tmp18_;
- Book* _tmp19_;
- GHashFunc _tmp20_;
- GEqualFunc _tmp21_;
- GHashTable* _tmp22_;
- GtkDrawingArea* _tmp23_;
- GtkWidget* _tmp24_;
- GtkWidget* _tmp25_;
- GtkWidget* _tmp26_;
- GtkWidget* _tmp27_;
- GtkScrollbar* _tmp28_;
- GtkScrollbar* _tmp29_;
+ Page* _tmp15_ = NULL;
+ Book* _tmp16_ = NULL;
+ Book* _tmp17_ = NULL;
+ Book* _tmp18_ = NULL;
+ Book* _tmp19_ = NULL;
+ GHashFunc _tmp20_ = NULL;
+ GEqualFunc _tmp21_ = NULL;
+ GHashTable* _tmp22_ = NULL;
+ GtkDrawingArea* _tmp23_ = NULL;
+ GtkWidget* _tmp24_ = NULL;
+ GtkWidget* _tmp25_ = NULL;
+ GtkWidget* _tmp26_ = NULL;
+ GtkWidget* _tmp27_ = NULL;
+ GtkScrollbar* _tmp28_ = NULL;
+ GtkScrollbar* _tmp29_ = NULL;
GtkAdjustment* _tmp30_ = NULL;
- GtkAdjustment* _tmp31_;
- GtkScrollbar* _tmp32_;
- GtkWidget* _tmp33_;
- GtkWidget* _tmp34_;
- GtkWidget* _tmp35_;
- GtkWidget* _tmp36_;
- GtkWidget* _tmp37_;
- GtkWidget* _tmp38_;
- GtkWidget* _tmp39_;
- GtkWidget* _tmp40_;
- GtkAdjustment* _tmp41_;
- GtkWidget* _tmp42_;
-#line 42 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ GtkAdjustment* _tmp31_ = NULL;
+ GtkScrollbar* _tmp32_ = NULL;
+ GtkWidget* _tmp33_ = NULL;
+ GtkWidget* _tmp34_ = NULL;
+ GtkWidget* _tmp35_ = NULL;
+ GtkWidget* _tmp36_ = NULL;
+ GtkWidget* _tmp37_ = NULL;
+ GtkWidget* _tmp38_ = NULL;
+ GtkWidget* _tmp39_ = NULL;
+ GtkWidget* _tmp40_ = NULL;
+ GtkAdjustment* _tmp41_ = NULL;
+ GtkWidget* _tmp42_ = NULL;
+#line 74 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_return_val_if_fail (book != NULL, NULL);
-#line 42 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- self = (BookView*) g_object_new (object_type, NULL);
-#line 44 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 76 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ self = (BookView*) g_object_new (object_type, "orientation", GTK_ORIENTATION_VERTICAL, NULL);
+#line 77 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp0_ = book;
-#line 44 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp1_ = _book_ref0 (_tmp0_);
-#line 44 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _book_unref0 (self->priv->book);
-#line 44 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- self->priv->book = _tmp1_;
-#line 382 "book-view.c"
+#line 77 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ book_view_set_book (self, _tmp0_);
+#line 376 "book-view.c"
{
- gint i;
-#line 47 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ gint i = 0;
+#line 80 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
i = 0;
-#line 387 "book-view.c"
+#line 381 "book-view.c"
{
- gboolean _tmp2_;
-#line 47 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp2_ = TRUE;
-#line 47 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ gboolean _tmp1_ = FALSE;
+#line 80 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp1_ = TRUE;
+#line 80 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
while (TRUE) {
-#line 394 "book-view.c"
- gboolean _tmp3_;
- gint _tmp5_;
- Book* _tmp6_;
+#line 388 "book-view.c"
+ gboolean _tmp2_ = FALSE;
+ gint _tmp4_ = 0;
+ Book* _tmp5_ = NULL;
+ guint _tmp6_ = 0U;
guint _tmp7_ = 0U;
- Book* _tmp8_;
- gint _tmp9_;
+ Page* page = NULL;
+ Book* _tmp8_ = NULL;
+ gint _tmp9_ = 0;
Page* _tmp10_ = NULL;
- Page* page;
- Book* _tmp11_;
- Page* _tmp12_;
-#line 47 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp3_ = _tmp2_;
-#line 47 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- if (!_tmp3_) {
-#line 409 "book-view.c"
- gint _tmp4_;
-#line 47 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp4_ = i;
-#line 47 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- i = _tmp4_ + 1;
-#line 415 "book-view.c"
+ Book* _tmp11_ = NULL;
+ Page* _tmp12_ = NULL;
+#line 80 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp2_ = _tmp1_;
+#line 80 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (!_tmp2_) {
+#line 404 "book-view.c"
+ gint _tmp3_ = 0;
+#line 80 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp3_ = i;
+#line 80 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ i = _tmp3_ + 1;
+#line 410 "book-view.c"
}
-#line 47 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp2_ = FALSE;
-#line 47 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp5_ = i;
-#line 47 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp6_ = book;
-#line 47 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp7_ = book_get_n_pages (_tmp6_);
-#line 47 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- if (!(((guint) _tmp5_) < _tmp7_)) {
-#line 47 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 80 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp1_ = FALSE;
+#line 80 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp4_ = i;
+#line 80 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp5_ = book;
+#line 80 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp6_ = book_get_n_pages (_tmp5_);
+#line 80 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp7_ = _tmp6_;
+#line 80 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (!(((guint) _tmp4_) < _tmp7_)) {
+#line 80 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
break;
-#line 429 "book-view.c"
+#line 426 "book-view.c"
}
-#line 49 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 82 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp8_ = book;
-#line 49 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 82 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp9_ = i;
-#line 49 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 82 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp10_ = book_get_page (_tmp8_, _tmp9_);
-#line 49 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 82 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
page = _tmp10_;
-#line 50 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 83 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp11_ = book;
-#line 50 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 83 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp12_ = page;
-#line 50 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 83 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
book_view_add_cb (self, _tmp11_, _tmp12_);
-#line 47 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 80 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_page_unref0 (page);
-#line 447 "book-view.c"
+#line 444 "book-view.c"
}
}
}
-#line 53 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 86 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp13_ = book;
-#line 53 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 86 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp14_ = book_get_page (_tmp13_, 0);
-#line 53 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 86 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp15_ = _tmp14_;
-#line 53 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- book_view_select_page (self, _tmp15_);
-#line 53 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 86 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ book_view_set_selected_page (self, _tmp15_);
+#line 86 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_page_unref0 (_tmp15_);
-#line 56 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 89 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp16_ = book;
-#line 56 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 89 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_signal_connect_object (_tmp16_, "page-added", (GCallback) _book_view_add_cb_book_page_added, self, 0);
-#line 57 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 90 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp17_ = book;
-#line 57 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 90 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_signal_connect_object (_tmp17_, "page-removed", (GCallback) _book_view_remove_cb_book_page_removed, self, 0);
-#line 58 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 91 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp18_ = book;
-#line 58 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 91 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_signal_connect_object (_tmp18_, "reordered", (GCallback) _book_view_reorder_cb_book_reordered, self, 0);
-#line 59 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 92 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp19_ = book;
-#line 59 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 92 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_signal_connect_object (_tmp19_, "cleared", (GCallback) _book_view_clear_cb_book_cleared, self, 0);
-#line 61 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 94 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
self->priv->need_layout = TRUE;
-#line 62 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 95 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp20_ = g_direct_hash;
-#line 62 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 95 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp21_ = g_direct_equal;
-#line 62 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 95 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp22_ = g_hash_table_new_full (_tmp20_, _tmp21_, _page_unref0_, _page_view_unref0_);
-#line 62 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 95 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_g_hash_table_unref0 (self->priv->page_data);
-#line 62 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 95 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
self->priv->page_data = _tmp22_;
-#line 63 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 96 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
self->priv->cursor = GDK_ARROW;
-#line 65 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 98 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp23_ = (GtkDrawingArea*) gtk_drawing_area_new ();
-#line 65 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 98 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_object_ref_sink (_tmp23_);
-#line 65 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 98 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_g_object_unref0 (self->priv->drawing_area);
-#line 65 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 98 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
self->priv->drawing_area = (GtkWidget*) _tmp23_;
-#line 66 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 99 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp24_ = self->priv->drawing_area;
-#line 66 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 99 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
gtk_widget_set_size_request (_tmp24_, 200, 100);
-#line 67 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 100 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp25_ = self->priv->drawing_area;
-#line 67 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 100 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
gtk_widget_set_can_focus (_tmp25_, TRUE);
-#line 68 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp26_ = self->priv->drawing_area;
-#line 68 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 101 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
gtk_widget_set_events (_tmp26_, (gint) (((((GDK_POINTER_MOTION_MASK | GDK_BUTTON_PRESS_MASK) | GDK_BUTTON_RELEASE_MASK) | GDK_FOCUS_CHANGE_MASK) | GDK_STRUCTURE_MASK) | GDK_SCROLL_MASK));
-#line 69 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 102 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp27_ = self->priv->drawing_area;
-#line 69 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 102 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
gtk_box_pack_start ((GtkBox*) self, _tmp27_, TRUE, TRUE, (guint) 0);
-#line 71 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 104 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp28_ = (GtkScrollbar*) gtk_scrollbar_new (GTK_ORIENTATION_HORIZONTAL, NULL);
-#line 71 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 104 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_object_ref_sink (_tmp28_);
-#line 71 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 104 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_g_object_unref0 (self->priv->scroll);
-#line 71 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 104 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
self->priv->scroll = _tmp28_;
-#line 72 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 105 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp29_ = self->priv->scroll;
-#line 72 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 105 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp30_ = gtk_range_get_adjustment ((GtkRange*) _tmp29_);
-#line 72 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 105 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp31_ = _g_object_ref0 (_tmp30_);
-#line 72 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 105 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_g_object_unref0 (self->priv->adjustment);
-#line 72 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 105 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
self->priv->adjustment = _tmp31_;
-#line 73 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 106 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp32_ = self->priv->scroll;
-#line 73 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 106 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
gtk_box_pack_start ((GtkBox*) self, (GtkWidget*) _tmp32_, FALSE, TRUE, (guint) 0);
-#line 75 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 108 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp33_ = self->priv->drawing_area;
-#line 75 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 108 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_signal_connect_object (_tmp33_, "configure-event", (GCallback) _book_view_configure_cb_gtk_widget_configure_event, self, 0);
-#line 76 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 109 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp34_ = self->priv->drawing_area;
-#line 76 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 109 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_signal_connect_object (_tmp34_, "draw", (GCallback) _book_view_draw_cb_gtk_widget_draw, self, 0);
-#line 77 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 110 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp35_ = self->priv->drawing_area;
-#line 77 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 110 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_signal_connect_object (_tmp35_, "motion-notify-event", (GCallback) _book_view_motion_cb_gtk_widget_motion_notify_event, self, 0);
-#line 78 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 111 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp36_ = self->priv->drawing_area;
-#line 78 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 111 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_signal_connect_object (_tmp36_, "key-press-event", (GCallback) _book_view_key_cb_gtk_widget_key_press_event, self, 0);
-#line 79 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 112 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp37_ = self->priv->drawing_area;
-#line 79 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 112 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_signal_connect_object (_tmp37_, "button-press-event", (GCallback) _book_view_button_cb_gtk_widget_button_press_event, self, 0);
-#line 80 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 113 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp38_ = self->priv->drawing_area;
-#line 80 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 113 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_signal_connect_object (_tmp38_, "button-release-event", (GCallback) _book_view_button_cb_gtk_widget_button_release_event, self, 0);
-#line 81 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp39_ = self->priv->drawing_area;
-#line 81 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 114 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_signal_connect_object (_tmp39_, "focus-in-event", (GCallback) _book_view_focus_cb_gtk_widget_focus_in_event, self, G_CONNECT_AFTER);
-#line 82 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 115 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp40_ = self->priv->drawing_area;
-#line 82 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 115 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_signal_connect_object (_tmp40_, "focus-out-event", (GCallback) _book_view_focus_cb_gtk_widget_focus_out_event, self, G_CONNECT_AFTER);
-#line 83 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 116 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp41_ = self->priv->adjustment;
-#line 83 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 116 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_signal_connect_object (_tmp41_, "value-changed", (GCallback) _book_view_scroll_cb_gtk_adjustment_value_changed, self, 0);
-#line 85 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 118 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp42_ = self->priv->drawing_area;
-#line 85 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 118 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
gtk_widget_show (_tmp42_);
-#line 42 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 74 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
return self;
-#line 579 "book-view.c"
+#line 576 "book-view.c"
}
BookView* book_view_new (Book* book) {
-#line 42 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 74 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
return book_view_construct (TYPE_BOOK_VIEW, book);
-#line 586 "book-view.c"
+#line 583 "book-view.c"
}
static gpointer _page_view_ref0 (gpointer self) {
-#line 108 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 141 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
return self ? page_view_ref (self) : NULL;
-#line 593 "book-view.c"
+#line 590 "book-view.c"
}
static PageView* book_view_get_nth_page (BookView* self, gint n) {
PageView* result = NULL;
- Book* _tmp0_;
- gint _tmp1_;
+ Page* page = NULL;
+ Book* _tmp0_ = NULL;
+ gint _tmp1_ = 0;
Page* _tmp2_ = NULL;
- Page* page;
- GHashTable* _tmp3_;
+ GHashTable* _tmp3_ = NULL;
gconstpointer _tmp4_ = NULL;
- PageView* _tmp5_;
-#line 105 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ PageView* _tmp5_ = NULL;
+#line 138 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_return_val_if_fail (self != NULL, NULL);
-#line 107 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp0_ = self->priv->book;
-#line 107 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 140 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp0_ = self->priv->_book;
+#line 140 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp1_ = n;
-#line 107 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 140 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp2_ = book_get_page (_tmp0_, _tmp1_);
-#line 107 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 140 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
page = _tmp2_;
-#line 108 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 141 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp3_ = self->priv->page_data;
-#line 108 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 141 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp4_ = g_hash_table_lookup (_tmp3_, page);
-#line 108 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 141 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp5_ = _page_view_ref0 ((PageView*) _tmp4_);
-#line 108 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 141 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
result = _tmp5_;
-#line 108 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 141 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_page_unref0 (page);
-#line 108 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 141 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
return result;
-#line 628 "book-view.c"
+#line 625 "book-view.c"
}
static PageView* book_view_get_next_page (BookView* self, PageView* page) {
PageView* result = NULL;
- PageView* _tmp20_;
- PageView* _tmp21_;
-#line 111 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ PageView* _tmp19_ = NULL;
+ PageView* _tmp20_ = NULL;
+#line 144 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_return_val_if_fail (self != NULL, NULL);
-#line 111 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 144 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_return_val_if_fail (page != NULL, NULL);
-#line 640 "book-view.c"
+#line 637 "book-view.c"
{
- gint i;
-#line 113 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ gint i = 0;
+#line 146 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
i = 0;
-#line 645 "book-view.c"
+#line 642 "book-view.c"
{
- gboolean _tmp0_;
-#line 113 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ gboolean _tmp0_ = FALSE;
+#line 146 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp0_ = TRUE;
-#line 113 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 146 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
while (TRUE) {
-#line 652 "book-view.c"
- gboolean _tmp1_;
- Book* _tmp3_;
- gint _tmp4_;
+#line 649 "book-view.c"
+ gboolean _tmp1_ = FALSE;
+ Page* p = NULL;
+ Book* _tmp3_ = NULL;
+ gint _tmp4_ = 0;
Page* _tmp5_ = NULL;
- Page* p;
- Page* _tmp6_;
- Page* _tmp7_;
- PageView* _tmp8_;
+ Page* _tmp6_ = NULL;
+ Page* _tmp7_ = NULL;
+ PageView* _tmp8_ = NULL;
Page* _tmp9_ = NULL;
- Page* _tmp10_;
- gboolean _tmp11_;
-#line 113 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ Page* _tmp10_ = NULL;
+#line 146 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp1_ = _tmp0_;
-#line 113 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 146 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
if (!_tmp1_) {
-#line 668 "book-view.c"
- gint _tmp2_;
-#line 113 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 664 "book-view.c"
+ gint _tmp2_ = 0;
+#line 146 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp2_ = i;
-#line 113 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 146 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
i = _tmp2_ + 1;
-#line 674 "book-view.c"
+#line 670 "book-view.c"
}
-#line 113 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 146 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp0_ = FALSE;
-#line 115 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp3_ = self->priv->book;
-#line 115 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 148 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp3_ = self->priv->_book;
+#line 148 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp4_ = i;
-#line 115 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 148 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp5_ = book_get_page (_tmp3_, _tmp4_);
-#line 115 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 148 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
p = _tmp5_;
-#line 116 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 149 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp6_ = p;
-#line 116 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 149 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
if (_tmp6_ == NULL) {
-#line 117 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 150 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_page_unref0 (p);
-#line 117 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 150 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
break;
-#line 694 "book-view.c"
+#line 690 "book-view.c"
}
-#line 118 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 151 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp7_ = p;
-#line 118 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 151 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp8_ = page;
-#line 118 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 151 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp9_ = page_view_get_page (_tmp8_);
-#line 118 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 151 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp10_ = _tmp9_;
-#line 118 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp11_ = _tmp7_ == _tmp10_;
-#line 118 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _page_unref0 (_tmp10_);
-#line 118 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- if (_tmp11_) {
-#line 710 "book-view.c"
- Book* _tmp12_;
- gint _tmp13_;
+#line 151 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp7_ == _tmp10_) {
+#line 702 "book-view.c"
+ Book* _tmp11_ = NULL;
+ gint _tmp12_ = 0;
+ Page* _tmp13_ = NULL;
Page* _tmp14_ = NULL;
- Page* _tmp15_;
-#line 120 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp12_ = self->priv->book;
-#line 120 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp13_ = i;
-#line 120 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp14_ = book_get_page (_tmp12_, _tmp13_ + 1);
-#line 120 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 153 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp11_ = self->priv->_book;
+#line 153 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp12_ = i;
+#line 153 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp13_ = book_get_page (_tmp11_, _tmp12_ + 1);
+#line 153 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_page_unref0 (p);
-#line 120 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- p = _tmp14_;
-#line 121 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp15_ = p;
-#line 121 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- if (_tmp15_ != NULL) {
-#line 729 "book-view.c"
- GHashTable* _tmp16_;
- Page* _tmp17_;
- gconstpointer _tmp18_ = NULL;
- PageView* _tmp19_;
-#line 122 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp16_ = self->priv->page_data;
-#line 122 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp17_ = p;
-#line 122 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp18_ = g_hash_table_lookup (_tmp16_, _tmp17_);
-#line 122 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp19_ = _page_view_ref0 ((PageView*) _tmp18_);
-#line 122 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- result = _tmp19_;
-#line 122 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 153 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ p = _tmp13_;
+#line 154 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp14_ = p;
+#line 154 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp14_ != NULL) {
+#line 721 "book-view.c"
+ GHashTable* _tmp15_ = NULL;
+ Page* _tmp16_ = NULL;
+ gconstpointer _tmp17_ = NULL;
+ PageView* _tmp18_ = NULL;
+#line 155 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp15_ = self->priv->page_data;
+#line 155 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp16_ = p;
+#line 155 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp17_ = g_hash_table_lookup (_tmp15_, _tmp16_);
+#line 155 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp18_ = _page_view_ref0 ((PageView*) _tmp17_);
+#line 155 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ result = _tmp18_;
+#line 155 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_page_unref0 (p);
-#line 122 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 155 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
return result;
-#line 748 "book-view.c"
+#line 740 "book-view.c"
}
}
-#line 113 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 146 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_page_unref0 (p);
-#line 753 "book-view.c"
+#line 745 "book-view.c"
}
}
}
-#line 126 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp20_ = page;
-#line 126 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp21_ = _page_view_ref0 (_tmp20_);
-#line 126 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- result = _tmp21_;
-#line 126 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 159 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp19_ = page;
+#line 159 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp20_ = _page_view_ref0 (_tmp19_);
+#line 159 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ result = _tmp20_;
+#line 159 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
return result;
-#line 765 "book-view.c"
+#line 757 "book-view.c"
}
static PageView* book_view_get_prev_page (BookView* self, PageView* page) {
PageView* result = NULL;
- PageView* _tmp0_;
- PageView* _tmp1_;
- PageView* prev_page;
- PageView* _tmp18_;
- PageView* _tmp19_;
-#line 129 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ PageView* prev_page = NULL;
+ PageView* _tmp0_ = NULL;
+ PageView* _tmp1_ = NULL;
+ PageView* _tmp17_ = NULL;
+ PageView* _tmp18_ = NULL;
+#line 162 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_return_val_if_fail (self != NULL, NULL);
-#line 129 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 162 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_return_val_if_fail (page != NULL, NULL);
-#line 131 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 164 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp0_ = page;
-#line 131 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 164 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp1_ = _page_view_ref0 (_tmp0_);
-#line 131 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 164 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
prev_page = _tmp1_;
-#line 786 "book-view.c"
+#line 778 "book-view.c"
{
- gint i;
-#line 132 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ gint i = 0;
+#line 165 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
i = 0;
-#line 791 "book-view.c"
+#line 783 "book-view.c"
{
- gboolean _tmp2_;
-#line 132 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ gboolean _tmp2_ = FALSE;
+#line 165 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp2_ = TRUE;
-#line 132 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 165 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
while (TRUE) {
-#line 798 "book-view.c"
- gboolean _tmp3_;
- Book* _tmp5_;
- gint _tmp6_;
+#line 790 "book-view.c"
+ gboolean _tmp3_ = FALSE;
+ Page* p = NULL;
+ Book* _tmp5_ = NULL;
+ gint _tmp6_ = 0;
Page* _tmp7_ = NULL;
- Page* p;
- Page* _tmp8_;
- Page* _tmp9_;
- PageView* _tmp10_;
+ Page* _tmp8_ = NULL;
+ Page* _tmp9_ = NULL;
+ PageView* _tmp10_ = NULL;
Page* _tmp11_ = NULL;
- Page* _tmp12_;
- gboolean _tmp13_;
- GHashTable* _tmp14_;
- Page* _tmp15_;
- gconstpointer _tmp16_ = NULL;
- PageView* _tmp17_;
-#line 132 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ Page* _tmp12_ = NULL;
+ GHashTable* _tmp13_ = NULL;
+ Page* _tmp14_ = NULL;
+ gconstpointer _tmp15_ = NULL;
+ PageView* _tmp16_ = NULL;
+#line 165 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp3_ = _tmp2_;
-#line 132 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 165 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
if (!_tmp3_) {
-#line 818 "book-view.c"
- gint _tmp4_;
-#line 132 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 809 "book-view.c"
+ gint _tmp4_ = 0;
+#line 165 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp4_ = i;
-#line 132 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 165 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
i = _tmp4_ + 1;
-#line 824 "book-view.c"
+#line 815 "book-view.c"
}
-#line 132 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 165 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp2_ = FALSE;
-#line 134 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp5_ = self->priv->book;
-#line 134 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 167 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp5_ = self->priv->_book;
+#line 167 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp6_ = i;
-#line 134 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 167 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp7_ = book_get_page (_tmp5_, _tmp6_);
-#line 134 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 167 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
p = _tmp7_;
-#line 135 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 168 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp8_ = p;
-#line 135 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 168 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
if (_tmp8_ == NULL) {
-#line 136 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 169 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_page_unref0 (p);
-#line 136 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 169 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
break;
-#line 844 "book-view.c"
+#line 835 "book-view.c"
}
-#line 137 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 170 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp9_ = p;
-#line 137 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 170 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp10_ = page;
-#line 137 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 170 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp11_ = page_view_get_page (_tmp10_);
-#line 137 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 170 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp12_ = _tmp11_;
-#line 137 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp13_ = _tmp9_ == _tmp12_;
-#line 137 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _page_unref0 (_tmp12_);
-#line 137 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- if (_tmp13_) {
-#line 138 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 170 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp9_ == _tmp12_) {
+#line 171 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
result = prev_page;
-#line 138 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 171 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_page_unref0 (p);
-#line 138 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 171 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
return result;
-#line 866 "book-view.c"
+#line 853 "book-view.c"
}
-#line 139 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp14_ = self->priv->page_data;
-#line 139 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp15_ = p;
-#line 139 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp16_ = g_hash_table_lookup (_tmp14_, _tmp15_);
-#line 139 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp17_ = _page_view_ref0 ((PageView*) _tmp16_);
-#line 139 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 172 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp13_ = self->priv->page_data;
+#line 172 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp14_ = p;
+#line 172 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp15_ = g_hash_table_lookup (_tmp13_, _tmp14_);
+#line 172 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp16_ = _page_view_ref0 ((PageView*) _tmp15_);
+#line 172 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_page_view_unref0 (prev_page);
-#line 139 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- prev_page = _tmp17_;
-#line 132 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 172 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ prev_page = _tmp16_;
+#line 165 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_page_unref0 (p);
-#line 882 "book-view.c"
+#line 869 "book-view.c"
}
}
}
-#line 142 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp18_ = page;
-#line 142 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp19_ = _page_view_ref0 (_tmp18_);
-#line 142 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- result = _tmp19_;
-#line 142 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 175 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp17_ = page;
+#line 175 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp18_ = _page_view_ref0 (_tmp17_);
+#line 175 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ result = _tmp18_;
+#line 175 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_page_view_unref0 (prev_page);
-#line 142 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 175 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
return result;
-#line 896 "book-view.c"
+#line 883 "book-view.c"
}
static void book_view_page_view_changed_cb (BookView* self, PageView* page) {
-#line 145 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 178 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_return_if_fail (self != NULL);
-#line 145 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 178 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_return_if_fail (page != NULL);
-#line 147 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 180 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
book_view_redraw (self);
-#line 907 "book-view.c"
+#line 894 "book-view.c"
}
static void book_view_page_view_size_changed_cb (BookView* self, PageView* page) {
-#line 150 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 183 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_return_if_fail (self != NULL);
-#line 150 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 183 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_return_if_fail (page != NULL);
-#line 152 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 185 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
self->priv->need_layout = TRUE;
-#line 153 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 186 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
book_view_redraw (self);
-#line 920 "book-view.c"
+#line 907 "book-view.c"
}
static void _book_view_page_view_changed_cb_page_view_changed (PageView* _sender, gpointer self) {
-#line 159 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 192 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
book_view_page_view_changed_cb (self, _sender);
-#line 927 "book-view.c"
+#line 914 "book-view.c"
}
static void _book_view_page_view_size_changed_cb_page_view_size_changed (PageView* _sender, gpointer self) {
-#line 160 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 193 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
book_view_page_view_size_changed_cb (self, _sender);
-#line 934 "book-view.c"
+#line 921 "book-view.c"
}
static gpointer _page_ref0 (gpointer self) {
-#line 161 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 194 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
return self ? page_ref (self) : NULL;
-#line 941 "book-view.c"
+#line 928 "book-view.c"
}
static void book_view_add_cb (BookView* self, Book* book, Page* page) {
- Page* _tmp0_;
- PageView* _tmp1_;
- PageView* page_view;
- GHashTable* _tmp2_;
- Page* _tmp3_;
- Page* _tmp4_;
- PageView* _tmp5_;
-#line 156 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ PageView* page_view = NULL;
+ Page* _tmp0_ = NULL;
+ PageView* _tmp1_ = NULL;
+ GHashTable* _tmp2_ = NULL;
+ Page* _tmp3_ = NULL;
+ Page* _tmp4_ = NULL;
+ PageView* _tmp5_ = NULL;
+#line 189 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_return_if_fail (self != NULL);
-#line 156 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 189 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_return_if_fail (book != NULL);
-#line 156 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 189 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_return_if_fail (page != NULL);
-#line 158 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 191 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp0_ = page;
-#line 158 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 191 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp1_ = page_view_new (_tmp0_);
-#line 158 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 191 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
page_view = _tmp1_;
-#line 159 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 192 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_signal_connect_object (page_view, "changed", (GCallback) _book_view_page_view_changed_cb_page_view_changed, self, 0);
-#line 160 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 193 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_signal_connect_object (page_view, "size-changed", (GCallback) _book_view_page_view_size_changed_cb_page_view_size_changed, self, 0);
-#line 161 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 194 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp2_ = self->priv->page_data;
-#line 161 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 194 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp3_ = page;
-#line 161 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 194 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp4_ = _page_ref0 (_tmp3_);
-#line 161 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 194 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp5_ = _page_view_ref0 (page_view);
-#line 161 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 194 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_hash_table_insert (_tmp2_, _tmp4_, _tmp5_);
-#line 162 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 195 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
self->priv->need_layout = TRUE;
-#line 163 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 196 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
book_view_redraw (self);
-#line 156 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 189 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_page_view_unref0 (page_view);
-#line 985 "book-view.c"
+#line 972 "book-view.c"
}
-static void book_view_set_selected_page (BookView* self, PageView* page) {
+static void book_view_set_selected_page_view (BookView* self, PageView* page) {
gboolean _tmp0_ = FALSE;
- PageView* _tmp1_;
- gboolean _tmp4_;
- PageView* _tmp6_;
- PageView* _tmp7_;
- PageView* _tmp8_;
- GtkWidget* _tmp9_;
+ PageView* _tmp1_ = NULL;
+ gboolean _tmp4_ = FALSE;
+ PageView* _tmp6_ = NULL;
+ PageView* _tmp7_ = NULL;
+ PageView* _tmp8_ = NULL;
+ GtkWidget* _tmp9_ = NULL;
gboolean _tmp10_ = FALSE;
- gboolean _tmp11_;
-#line 166 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ gboolean _tmp11_ = FALSE;
+#line 199 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_return_if_fail (self != NULL);
-#line 169 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp1_ = self->priv->selected_page;
-#line 169 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 202 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp1_ = self->priv->selected_page_view;
+#line 202 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
if (_tmp1_ != NULL) {
-#line 1005 "book-view.c"
- PageView* _tmp2_;
- PageView* _tmp3_;
-#line 169 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 992 "book-view.c"
+ PageView* _tmp2_ = NULL;
+ PageView* _tmp3_ = NULL;
+#line 202 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp2_ = page;
-#line 169 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp3_ = self->priv->selected_page;
-#line 169 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 202 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp3_ = self->priv->selected_page_view;
+#line 202 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp0_ = _tmp2_ != _tmp3_;
-#line 1014 "book-view.c"
+#line 1001 "book-view.c"
} else {
-#line 169 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 202 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp0_ = FALSE;
-#line 1018 "book-view.c"
+#line 1005 "book-view.c"
}
-#line 169 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 202 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp4_ = _tmp0_;
-#line 169 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 202 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
if (_tmp4_) {
-#line 1024 "book-view.c"
- PageView* _tmp5_;
-#line 170 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp5_ = self->priv->selected_page;
-#line 170 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- page_view_set_selected (_tmp5_, FALSE);
-#line 1030 "book-view.c"
+#line 1011 "book-view.c"
+ PageView* _tmp5_ = NULL;
+#line 203 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp5_ = self->priv->selected_page_view;
+#line 203 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ page_view_set_selected (_tmp5_, TRUE);
+#line 1017 "book-view.c"
}
-#line 172 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 205 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp6_ = page;
-#line 172 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 205 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp7_ = _page_view_ref0 (_tmp6_);
-#line 172 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _page_view_unref0 (self->priv->selected_page);
-#line 172 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- self->priv->selected_page = _tmp7_;
-#line 173 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp8_ = self->priv->selected_page;
-#line 173 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 205 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _page_view_unref0 (self->priv->selected_page_view);
+#line 205 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ self->priv->selected_page_view = _tmp7_;
+#line 206 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp8_ = self->priv->selected_page_view;
+#line 206 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
if (_tmp8_ == NULL) {
-#line 174 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 207 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
return;
-#line 1046 "book-view.c"
+#line 1033 "book-view.c"
}
-#line 177 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 210 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp9_ = self->priv->drawing_area;
-#line 177 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 210 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_object_get (_tmp9_, "has-focus", &_tmp10_, NULL);
-#line 177 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 210 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp11_ = _tmp10_;
-#line 177 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 210 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
if (!_tmp11_) {
-#line 1056 "book-view.c"
- PageView* _tmp12_;
-#line 178 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp12_ = self->priv->selected_page;
-#line 178 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 1043 "book-view.c"
+ PageView* _tmp12_ = NULL;
+#line 211 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp12_ = self->priv->selected_page_view;
+#line 211 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
page_view_set_selected (_tmp12_, FALSE);
-#line 1062 "book-view.c"
+#line 1049 "book-view.c"
} else {
- PageView* _tmp13_;
-#line 180 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp13_ = self->priv->selected_page;
-#line 180 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ PageView* _tmp13_ = NULL;
+#line 213 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp13_ = self->priv->selected_page_view;
+#line 213 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
page_view_set_selected (_tmp13_, TRUE);
-#line 1069 "book-view.c"
+#line 1056 "book-view.c"
}
}
-static void book_view_set_x_offset (BookView* self, gint offset) {
- GtkAdjustment* _tmp0_;
- gint _tmp1_;
-#line 183 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- g_return_if_fail (self != NULL);
-#line 185 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp0_ = self->priv->adjustment;
-#line 185 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp1_ = offset;
-#line 185 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- gtk_adjustment_set_value (_tmp0_, (gdouble) _tmp1_);
-#line 1085 "book-view.c"
-}
-
-
-static gint book_view_get_x_offset (BookView* self) {
- gint result = 0;
- GtkAdjustment* _tmp0_;
- gdouble _tmp1_ = 0.0;
-#line 188 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- g_return_val_if_fail (self != NULL, 0);
-#line 190 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp0_ = self->priv->adjustment;
-#line 190 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp1_ = gtk_adjustment_get_value (_tmp0_);
-#line 190 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- result = (gint) _tmp1_;
-#line 190 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- return result;
-#line 1103 "book-view.c"
-}
-
-
static void book_view_show_page_view (BookView* self, PageView* page) {
gboolean _tmp0_ = FALSE;
- PageView* _tmp1_;
- gboolean _tmp4_;
+ PageView* _tmp1_ = NULL;
+ gboolean _tmp4_ = FALSE;
GtkAllocation allocation = {0};
- GtkWidget* _tmp5_;
+ GtkWidget* _tmp5_ = NULL;
GtkAllocation _tmp6_ = {0};
- PageView* _tmp7_;
+ gint left_edge = 0;
+ PageView* _tmp7_ = NULL;
gint _tmp8_ = 0;
- gint left_edge;
- PageView* _tmp9_;
- gint _tmp10_ = 0;
- PageView* _tmp11_;
+ gint _tmp9_ = 0;
+ gint right_edge = 0;
+ PageView* _tmp10_ = NULL;
+ gint _tmp11_ = 0;
gint _tmp12_ = 0;
- gint right_edge;
- gint _tmp13_;
+ PageView* _tmp13_ = NULL;
gint _tmp14_ = 0;
-#line 193 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ gint _tmp15_ = 0;
+ gint _tmp16_ = 0;
+ gint _tmp17_ = 0;
+#line 216 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_return_if_fail (self != NULL);
-#line 195 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 218 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp1_ = page;
-#line 195 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 218 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
if (_tmp1_ == NULL) {
-#line 195 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 218 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp0_ = TRUE;
-#line 1132 "book-view.c"
+#line 1089 "book-view.c"
} else {
- GtkScrollbar* _tmp2_;
+ GtkScrollbar* _tmp2_ = NULL;
gboolean _tmp3_ = FALSE;
-#line 195 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 218 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp2_ = self->priv->scroll;
-#line 195 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 218 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp3_ = gtk_widget_get_visible ((GtkWidget*) _tmp2_);
-#line 195 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 218 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp0_ = !_tmp3_;
-#line 1142 "book-view.c"
+#line 1099 "book-view.c"
}
-#line 195 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 218 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp4_ = _tmp0_;
-#line 195 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 218 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
if (_tmp4_) {
-#line 196 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 219 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
return;
-#line 1150 "book-view.c"
+#line 1107 "book-view.c"
}
-#line 199 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 222 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp5_ = self->priv->drawing_area;
-#line 199 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 222 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
gtk_widget_get_allocation (_tmp5_, &_tmp6_);
-#line 199 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 222 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
allocation = _tmp6_;
-#line 200 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 223 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp7_ = page;
-#line 200 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 223 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp8_ = page_view_get_x_offset (_tmp7_);
-#line 200 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- left_edge = _tmp8_;
-#line 201 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp9_ = page;
-#line 201 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp10_ = page_view_get_x_offset (_tmp9_);
-#line 201 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp11_ = page;
-#line 201 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp12_ = page_view_get_width (_tmp11_);
-#line 201 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- right_edge = _tmp10_ + _tmp12_;
-#line 203 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp13_ = left_edge;
-#line 203 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp14_ = book_view_get_x_offset (self);
-#line 203 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- if ((_tmp13_ - _tmp14_) < 0) {
-#line 1180 "book-view.c"
- gint _tmp15_;
-#line 204 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp15_ = left_edge;
-#line 204 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- book_view_set_x_offset (self, _tmp15_);
-#line 1186 "book-view.c"
+#line 223 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp9_ = _tmp8_;
+#line 223 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ left_edge = _tmp9_;
+#line 224 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp10_ = page;
+#line 224 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp11_ = page_view_get_x_offset (_tmp10_);
+#line 224 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp12_ = _tmp11_;
+#line 224 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp13_ = page;
+#line 224 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp14_ = page_view_get_width (_tmp13_);
+#line 224 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ right_edge = _tmp12_ + _tmp14_;
+#line 226 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp15_ = left_edge;
+#line 226 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp16_ = book_view_get_x_offset (self);
+#line 226 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp17_ = _tmp16_;
+#line 226 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if ((_tmp15_ - _tmp17_) < 0) {
+#line 1143 "book-view.c"
+ gint _tmp18_ = 0;
+#line 227 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp18_ = left_edge;
+#line 227 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ book_view_set_x_offset (self, _tmp18_);
+#line 1149 "book-view.c"
} else {
- gint _tmp16_;
- gint _tmp17_ = 0;
- GtkAllocation _tmp18_;
- gint _tmp19_;
-#line 205 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp16_ = right_edge;
-#line 205 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp17_ = book_view_get_x_offset (self);
-#line 205 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp18_ = allocation;
-#line 205 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp19_ = _tmp18_.width;
-#line 205 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- if ((_tmp16_ - _tmp17_) > _tmp19_) {
-#line 1202 "book-view.c"
- gint _tmp20_;
- GtkAllocation _tmp21_;
- gint _tmp22_;
-#line 206 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp20_ = right_edge;
-#line 206 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp21_ = allocation;
-#line 206 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp22_ = _tmp21_.width;
-#line 206 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- book_view_set_x_offset (self, _tmp20_ - _tmp22_);
-#line 1214 "book-view.c"
+ gint _tmp19_ = 0;
+ gint _tmp20_ = 0;
+ gint _tmp21_ = 0;
+ GtkAllocation _tmp22_ = {0};
+ gint _tmp23_ = 0;
+#line 228 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp19_ = right_edge;
+#line 228 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp20_ = book_view_get_x_offset (self);
+#line 228 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp21_ = _tmp20_;
+#line 228 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp22_ = allocation;
+#line 228 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp23_ = _tmp22_.width;
+#line 228 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if ((_tmp19_ - _tmp21_) > _tmp23_) {
+#line 1168 "book-view.c"
+ gint _tmp24_ = 0;
+ GtkAllocation _tmp25_ = {0};
+ gint _tmp26_ = 0;
+#line 229 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp24_ = right_edge;
+#line 229 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp25_ = allocation;
+#line 229 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp26_ = _tmp25_.width;
+#line 229 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ book_view_set_x_offset (self, _tmp24_ - _tmp26_);
+#line 1180 "book-view.c"
}
}
}
static void book_view_select_page_view (BookView* self, PageView* page) {
- Page* p;
- PageView* _tmp0_;
- PageView* _tmp1_;
- PageView* _tmp2_;
- gboolean _tmp3_;
- PageView* _tmp5_;
- Page* _tmp8_;
-#line 209 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ Page* p = NULL;
+ PageView* _tmp0_ = NULL;
+ PageView* _tmp1_ = NULL;
+ PageView* _tmp2_ = NULL;
+ gboolean _tmp3_ = FALSE;
+ PageView* _tmp5_ = NULL;
+ Page* _tmp10_ = NULL;
+#line 232 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_return_if_fail (self != NULL);
-#line 211 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 234 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
p = NULL;
-#line 213 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp0_ = self->priv->selected_page;
-#line 213 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 236 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp0_ = self->priv->selected_page_view;
+#line 236 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp1_ = page;
-#line 213 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 236 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
if (_tmp0_ == _tmp1_) {
-#line 214 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 237 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_page_unref0 (p);
-#line 214 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 237 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
return;
-#line 1242 "book-view.c"
+#line 1208 "book-view.c"
}
-#line 216 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 239 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp2_ = page;
-#line 216 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- book_view_set_selected_page (self, _tmp2_);
-#line 218 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 239 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ book_view_set_selected_page_view (self, _tmp2_);
+#line 241 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp3_ = self->priv->need_layout;
-#line 218 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 241 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
if (_tmp3_) {
-#line 219 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 242 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
self->priv->show_selected_page = TRUE;
-#line 1254 "book-view.c"
+#line 1220 "book-view.c"
} else {
- PageView* _tmp4_;
-#line 221 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ PageView* _tmp4_ = NULL;
+#line 244 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp4_ = page;
-#line 221 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 244 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
book_view_show_page_view (self, _tmp4_);
-#line 1261 "book-view.c"
+#line 1227 "book-view.c"
}
-#line 223 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 246 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp5_ = page;
-#line 223 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 246 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
if (_tmp5_ != NULL) {
-#line 1267 "book-view.c"
- PageView* _tmp6_;
+#line 1233 "book-view.c"
+ PageView* _tmp6_ = NULL;
Page* _tmp7_ = NULL;
-#line 224 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ Page* _tmp8_ = NULL;
+ Page* _tmp9_ = NULL;
+#line 247 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp6_ = page;
-#line 224 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 247 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp7_ = page_view_get_page (_tmp6_);
-#line 224 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 247 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp8_ = _tmp7_;
+#line 247 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp9_ = _page_ref0 (_tmp8_);
+#line 247 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_page_unref0 (p);
-#line 224 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- p = _tmp7_;
-#line 1278 "book-view.c"
+#line 247 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ p = _tmp9_;
+#line 1250 "book-view.c"
}
-#line 225 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp8_ = p;
-#line 225 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- g_signal_emit_by_name (self, "page-selected", _tmp8_);
-#line 209 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 248 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp10_ = p;
+#line 248 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_signal_emit_by_name (self, "page-selected", _tmp10_);
+#line 232 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_page_unref0 (p);
-#line 1286 "book-view.c"
+#line 1258 "book-view.c"
}
static void book_view_remove_cb (BookView* self, Book* book, Page* page) {
- PageView* _tmp0_;
- PageView* _tmp1_;
- PageView* new_selection;
- Page* _tmp2_;
+ PageView* new_selection = NULL;
+ PageView* _tmp0_ = NULL;
+ PageView* _tmp1_ = NULL;
+ Page* _tmp2_ = NULL;
Page* _tmp3_ = NULL;
- Page* _tmp4_;
- gboolean _tmp5_;
- GHashTable* _tmp12_;
- Page* _tmp13_;
- gconstpointer _tmp14_ = NULL;
- PageView* _tmp15_;
- PageView* page_view;
+ Page* _tmp4_ = NULL;
+ PageView* page_view = NULL;
+ GHashTable* _tmp11_ = NULL;
+ Page* _tmp12_ = NULL;
+ gconstpointer _tmp13_ = NULL;
+ PageView* _tmp14_ = NULL;
+ guint _tmp15_ = 0U;
guint _tmp16_ = 0U;
- guint _tmp17_ = 0U;
- GHashTable* _tmp18_;
- Page* _tmp19_;
- PageView* _tmp20_;
-#line 228 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ GHashTable* _tmp17_ = NULL;
+ Page* _tmp18_ = NULL;
+ PageView* _tmp19_ = NULL;
+#line 251 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_return_if_fail (self != NULL);
-#line 228 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 251 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_return_if_fail (book != NULL);
-#line 228 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 251 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_return_if_fail (page != NULL);
-#line 230 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp0_ = self->priv->selected_page;
-#line 230 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 253 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp0_ = self->priv->selected_page_view;
+#line 253 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp1_ = _page_view_ref0 (_tmp0_);
-#line 230 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 253 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
new_selection = _tmp1_;
-#line 233 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 256 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp2_ = page;
-#line 233 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp3_ = book_view_get_selected (self);
-#line 233 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 256 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp3_ = book_view_get_selected_page (self);
+#line 256 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp4_ = _tmp3_;
-#line 233 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp5_ = _tmp2_ == _tmp4_;
-#line 233 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _page_unref0 (_tmp4_);
-#line 233 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- if (_tmp5_) {
-#line 1332 "book-view.c"
- PageView* _tmp6_;
+#line 256 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp2_ == _tmp4_) {
+#line 1299 "book-view.c"
+ PageView* _tmp5_ = NULL;
+ PageView* _tmp6_ = NULL;
PageView* _tmp7_ = NULL;
- PageView* _tmp8_;
- PageView* _tmp9_;
-#line 235 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp6_ = self->priv->selected_page;
-#line 235 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp7_ = book_view_get_prev_page (self, _tmp6_);
-#line 235 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ PageView* _tmp8_ = NULL;
+#line 258 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp5_ = self->priv->selected_page_view;
+#line 258 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp6_ = book_view_get_prev_page (self, _tmp5_);
+#line 258 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_page_view_unref0 (new_selection);
-#line 235 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- new_selection = _tmp7_;
-#line 236 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp8_ = new_selection;
-#line 236 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp9_ = self->priv->selected_page;
-#line 236 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- if (_tmp8_ == _tmp9_) {
-#line 1351 "book-view.c"
- PageView* _tmp10_;
- PageView* _tmp11_ = NULL;
-#line 237 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp10_ = self->priv->selected_page;
-#line 237 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp11_ = book_view_get_next_page (self, _tmp10_);
-#line 237 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 258 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ new_selection = _tmp6_;
+#line 259 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp7_ = new_selection;
+#line 259 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp8_ = self->priv->selected_page_view;
+#line 259 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp7_ == _tmp8_) {
+#line 1318 "book-view.c"
+ PageView* _tmp9_ = NULL;
+ PageView* _tmp10_ = NULL;
+#line 260 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp9_ = self->priv->selected_page_view;
+#line 260 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp10_ = book_view_get_next_page (self, _tmp9_);
+#line 260 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_page_view_unref0 (new_selection);
-#line 237 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- new_selection = _tmp11_;
-#line 1362 "book-view.c"
+#line 260 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ new_selection = _tmp10_;
+#line 1329 "book-view.c"
}
-#line 238 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _page_view_unref0 (self->priv->selected_page);
-#line 238 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- self->priv->selected_page = NULL;
-#line 1368 "book-view.c"
+#line 261 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _page_view_unref0 (self->priv->selected_page_view);
+#line 261 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ self->priv->selected_page_view = NULL;
+#line 1335 "book-view.c"
}
-#line 241 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp12_ = self->priv->page_data;
-#line 241 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp13_ = page;
-#line 241 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp14_ = g_hash_table_lookup (_tmp12_, _tmp13_);
-#line 241 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp15_ = _page_view_ref0 ((PageView*) _tmp14_);
-#line 241 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- page_view = _tmp15_;
-#line 242 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- g_signal_parse_name ("changed", TYPE_PAGE_VIEW, &_tmp16_, NULL, FALSE);
-#line 242 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- g_signal_handlers_disconnect_matched (page_view, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp16_, 0, NULL, (GCallback) _book_view_page_view_changed_cb_page_view_changed, self);
-#line 243 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- g_signal_parse_name ("size-changed", TYPE_PAGE_VIEW, &_tmp17_, NULL, FALSE);
-#line 243 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- g_signal_handlers_disconnect_matched (page_view, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp17_, 0, NULL, (GCallback) _book_view_page_view_size_changed_cb_page_view_size_changed, self);
-#line 244 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp18_ = self->priv->page_data;
-#line 244 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp19_ = page;
-#line 244 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- g_hash_table_remove (_tmp18_, _tmp19_);
-#line 246 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp20_ = new_selection;
-#line 246 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- book_view_select_page_view (self, _tmp20_);
-#line 248 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 264 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp11_ = self->priv->page_data;
+#line 264 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp12_ = page;
+#line 264 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp13_ = g_hash_table_lookup (_tmp11_, _tmp12_);
+#line 264 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp14_ = _page_view_ref0 ((PageView*) _tmp13_);
+#line 264 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ page_view = _tmp14_;
+#line 265 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_signal_parse_name ("changed", TYPE_PAGE_VIEW, &_tmp15_, NULL, FALSE);
+#line 265 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_signal_handlers_disconnect_matched (page_view, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp15_, 0, NULL, (GCallback) _book_view_page_view_changed_cb_page_view_changed, self);
+#line 266 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_signal_parse_name ("size-changed", TYPE_PAGE_VIEW, &_tmp16_, NULL, FALSE);
+#line 266 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_signal_handlers_disconnect_matched (page_view, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp16_, 0, NULL, (GCallback) _book_view_page_view_size_changed_cb_page_view_size_changed, self);
+#line 267 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp17_ = self->priv->page_data;
+#line 267 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp18_ = page;
+#line 267 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_hash_table_remove (_tmp17_, _tmp18_);
+#line 269 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp19_ = new_selection;
+#line 269 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ book_view_select_page_view (self, _tmp19_);
+#line 271 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
self->priv->need_layout = TRUE;
-#line 249 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 272 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
book_view_redraw (self);
-#line 228 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 251 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_page_view_unref0 (page_view);
-#line 228 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 251 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_page_view_unref0 (new_selection);
-#line 1406 "book-view.c"
+#line 1373 "book-view.c"
}
static void book_view_reorder_cb (BookView* self, Book* book) {
-#line 252 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 275 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_return_if_fail (self != NULL);
-#line 252 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 275 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_return_if_fail (book != NULL);
-#line 254 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 277 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
self->priv->need_layout = TRUE;
-#line 255 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 278 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
book_view_redraw (self);
-#line 1419 "book-view.c"
+#line 1386 "book-view.c"
}
static void book_view_clear_cb (BookView* self, Book* book) {
- GHashTable* _tmp0_;
-#line 258 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ GHashTable* _tmp0_ = NULL;
+#line 281 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_return_if_fail (self != NULL);
-#line 258 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 281 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_return_if_fail (book != NULL);
-#line 260 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 283 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp0_ = self->priv->page_data;
-#line 260 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 283 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_hash_table_remove_all (_tmp0_);
-#line 261 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _page_view_unref0 (self->priv->selected_page);
-#line 261 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- self->priv->selected_page = NULL;
-#line 262 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 284 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _page_view_unref0 (self->priv->selected_page_view);
+#line 284 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ self->priv->selected_page_view = NULL;
+#line 285 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_signal_emit_by_name (self, "page-selected", NULL);
-#line 263 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 286 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
self->priv->need_layout = TRUE;
-#line 264 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 287 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
book_view_redraw (self);
-#line 1443 "book-view.c"
-}
-
-
-Book* book_view_get_book (BookView* self) {
- Book* result = NULL;
- Book* _tmp0_;
- Book* _tmp1_;
-#line 267 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- g_return_val_if_fail (self != NULL, NULL);
-#line 269 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp0_ = self->priv->book;
-#line 269 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp1_ = _book_ref0 (_tmp0_);
-#line 269 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- result = _tmp1_;
-#line 269 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- return result;
-#line 1461 "book-view.c"
+#line 1410 "book-view.c"
}
static gboolean book_view_configure_cb (BookView* self, GtkWidget* widget, GdkEventConfigure* event) {
gboolean result = FALSE;
-#line 272 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 290 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_return_val_if_fail (self != NULL, FALSE);
-#line 272 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 290 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_return_val_if_fail (widget != NULL, FALSE);
-#line 272 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 290 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_return_val_if_fail (event != NULL, FALSE);
-#line 274 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 292 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
self->priv->need_layout = TRUE;
-#line 275 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 293 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
result = FALSE;
-#line 275 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 293 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
return result;
-#line 1479 "book-view.c"
+#line 1428 "book-view.c"
}
static void book_view_layout_into (BookView* self, gint width, gint height, gint* book_width, gint* book_height) {
gint _vala_book_width = 0;
gint _vala_book_height = 0;
- gint max_dpi;
- gint max_width;
- gint max_height;
- gint _tmp41_;
- gint _tmp42_;
- gdouble aspect;
- gint _tmp43_;
- gint _tmp44_;
- gdouble max_aspect;
- gint spacing;
- gint x_offset;
-#line 278 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ gint max_dpi = 0;
+ gint max_width = 0;
+ gint max_height = 0;
+ gdouble aspect = 0.0;
+ gint _tmp49_ = 0;
+ gint _tmp50_ = 0;
+ gdouble max_aspect = 0.0;
+ gint _tmp51_ = 0;
+ gint _tmp52_ = 0;
+ gint spacing = 0;
+ gint x_offset = 0;
+#line 296 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_return_if_fail (self != NULL);
-#line 281 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 299 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
max_dpi = 0;
-#line 1501 "book-view.c"
+#line 1450 "book-view.c"
{
- gint i;
-#line 282 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ gint i = 0;
+#line 300 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
i = 0;
-#line 1506 "book-view.c"
+#line 1455 "book-view.c"
{
- gboolean _tmp0_;
-#line 282 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ gboolean _tmp0_ = FALSE;
+#line 300 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp0_ = TRUE;
-#line 282 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 300 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
while (TRUE) {
-#line 1513 "book-view.c"
- gboolean _tmp1_;
- gint _tmp3_;
- Book* _tmp4_;
+#line 1462 "book-view.c"
+ gboolean _tmp1_ = FALSE;
+ gint _tmp3_ = 0;
+ Book* _tmp4_ = NULL;
guint _tmp5_ = 0U;
- Book* _tmp6_;
- gint _tmp7_;
- Page* _tmp8_ = NULL;
- Page* page;
- Page* _tmp9_;
- gint _tmp10_ = 0;
- gint _tmp11_;
-#line 282 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ guint _tmp6_ = 0U;
+ Page* page = NULL;
+ Book* _tmp7_ = NULL;
+ gint _tmp8_ = 0;
+ Page* _tmp9_ = NULL;
+ Page* _tmp10_ = NULL;
+ gint _tmp11_ = 0;
+ gint _tmp12_ = 0;
+ gint _tmp13_ = 0;
+#line 300 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp1_ = _tmp0_;
-#line 282 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 300 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
if (!_tmp1_) {
-#line 1529 "book-view.c"
- gint _tmp2_;
-#line 282 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 1480 "book-view.c"
+ gint _tmp2_ = 0;
+#line 300 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp2_ = i;
-#line 282 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 300 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
i = _tmp2_ + 1;
-#line 1535 "book-view.c"
+#line 1486 "book-view.c"
}
-#line 282 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 300 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp0_ = FALSE;
-#line 282 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 300 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp3_ = i;
-#line 282 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp4_ = self->priv->book;
-#line 282 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 300 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp4_ = self->priv->_book;
+#line 300 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp5_ = book_get_n_pages (_tmp4_);
-#line 282 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- if (!(((guint) _tmp3_) < _tmp5_)) {
-#line 282 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 300 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp6_ = _tmp5_;
+#line 300 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (!(((guint) _tmp3_) < _tmp6_)) {
+#line 300 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
break;
-#line 1549 "book-view.c"
+#line 1502 "book-view.c"
}
-#line 284 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp6_ = self->priv->book;
-#line 284 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp7_ = i;
-#line 284 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp8_ = book_get_page (_tmp6_, _tmp7_);
-#line 284 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- page = _tmp8_;
-#line 285 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp9_ = page;
-#line 285 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp10_ = page_get_dpi (_tmp9_);
-#line 285 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp11_ = max_dpi;
-#line 285 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- if (_tmp10_ > _tmp11_) {
-#line 1567 "book-view.c"
- Page* _tmp12_;
- gint _tmp13_ = 0;
-#line 286 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp12_ = page;
-#line 286 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp13_ = page_get_dpi (_tmp12_);
-#line 286 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- max_dpi = _tmp13_;
-#line 1576 "book-view.c"
- }
-#line 282 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _page_unref0 (page);
-#line 1580 "book-view.c"
- }
- }
- }
-#line 290 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- max_width = 0;
-#line 290 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- max_height = 0;
-#line 1588 "book-view.c"
- {
- gint i;
-#line 291 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- i = 0;
-#line 1593 "book-view.c"
- {
- gboolean _tmp14_;
-#line 291 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp14_ = TRUE;
-#line 291 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- while (TRUE) {
-#line 1600 "book-view.c"
- gboolean _tmp15_;
- gint _tmp17_;
- Book* _tmp18_;
- guint _tmp19_ = 0U;
- Book* _tmp20_;
- gint _tmp21_;
- Page* _tmp22_ = NULL;
- Page* page;
- Page* _tmp23_;
- gint _tmp24_ = 0;
- gint w;
- Page* _tmp25_;
- gint _tmp26_ = 0;
- gint h;
- gint _tmp27_;
- gint _tmp28_;
- Page* _tmp29_;
- gint _tmp30_ = 0;
- gint _tmp31_;
- gint _tmp32_;
- Page* _tmp33_;
- gint _tmp34_ = 0;
- gint _tmp35_;
- gint _tmp36_;
- gint _tmp38_;
- gint _tmp39_;
-#line 291 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp15_ = _tmp14_;
-#line 291 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- if (!_tmp15_) {
-#line 1631 "book-view.c"
- gint _tmp16_;
-#line 291 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp16_ = i;
-#line 291 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- i = _tmp16_ + 1;
-#line 1637 "book-view.c"
- }
-#line 291 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp14_ = FALSE;
-#line 291 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp17_ = i;
-#line 291 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp18_ = self->priv->book;
-#line 291 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp19_ = book_get_n_pages (_tmp18_);
-#line 291 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- if (!(((guint) _tmp17_) < _tmp19_)) {
-#line 291 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- break;
-#line 1651 "book-view.c"
- }
-#line 293 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp20_ = self->priv->book;
-#line 293 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp21_ = i;
-#line 293 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp22_ = book_get_page (_tmp20_, _tmp21_);
-#line 293 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- page = _tmp22_;
-#line 294 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp23_ = page;
-#line 294 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp24_ = page_get_width (_tmp23_);
-#line 294 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- w = _tmp24_;
-#line 295 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp25_ = page;
-#line 295 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp26_ = page_get_height (_tmp25_);
-#line 295 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- h = _tmp26_;
-#line 298 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp27_ = w;
-#line 298 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp28_ = max_dpi;
-#line 298 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp29_ = page;
-#line 298 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp30_ = page_get_dpi (_tmp29_);
-#line 298 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- w = (gint) (((((gdouble) _tmp27_) * _tmp28_) / _tmp30_) + 0.5);
-#line 299 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp31_ = h;
-#line 299 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp32_ = max_dpi;
-#line 299 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp33_ = page;
-#line 299 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp34_ = page_get_dpi (_tmp33_);
-#line 299 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- h = (gint) (((((gdouble) _tmp31_) * _tmp32_) / _tmp34_) + 0.5);
-#line 301 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp35_ = w;
-#line 301 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp36_ = max_width;
-#line 301 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- if (_tmp35_ > _tmp36_) {
-#line 1699 "book-view.c"
- gint _tmp37_;
#line 302 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp37_ = w;
+ _tmp7_ = self->priv->_book;
#line 302 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- max_width = _tmp37_;
-#line 1705 "book-view.c"
- }
+ _tmp8_ = i;
+#line 302 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp9_ = book_get_page (_tmp7_, _tmp8_);
+#line 302 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ page = _tmp9_;
#line 303 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp38_ = h;
+ _tmp10_ = page;
#line 303 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp39_ = max_height;
+ _tmp11_ = page_get_dpi (_tmp10_);
#line 303 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- if (_tmp38_ > _tmp39_) {
-#line 1713 "book-view.c"
- gint _tmp40_;
+ _tmp12_ = _tmp11_;
+#line 303 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp13_ = max_dpi;
+#line 303 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp12_ > _tmp13_) {
+#line 1522 "book-view.c"
+ Page* _tmp14_ = NULL;
+ gint _tmp15_ = 0;
+ gint _tmp16_ = 0;
+#line 304 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp14_ = page;
+#line 304 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp15_ = page_get_dpi (_tmp14_);
#line 304 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp40_ = h;
+ _tmp16_ = _tmp15_;
#line 304 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- max_height = _tmp40_;
-#line 1719 "book-view.c"
+ max_dpi = _tmp16_;
+#line 1534 "book-view.c"
}
-#line 291 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 300 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_page_unref0 (page);
-#line 1723 "book-view.c"
+#line 1538 "book-view.c"
}
}
}
-#line 307 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp41_ = width;
-#line 307 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp42_ = height;
-#line 307 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- aspect = ((gdouble) _tmp41_) / _tmp42_;
-#line 308 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp43_ = max_width;
#line 308 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp44_ = max_height;
+ max_width = 0;
#line 308 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- max_aspect = ((gdouble) _tmp43_) / _tmp44_;
-#line 311 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- spacing = 12;
-#line 312 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _vala_book_width = 0;
-#line 313 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _vala_book_height = 0;
-#line 1745 "book-view.c"
+ max_height = 0;
+#line 1546 "book-view.c"
{
- gint i;
-#line 314 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ gint i = 0;
+#line 309 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
i = 0;
-#line 1750 "book-view.c"
+#line 1551 "book-view.c"
{
- gboolean _tmp45_;
-#line 314 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp45_ = TRUE;
-#line 314 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ gboolean _tmp17_ = FALSE;
+#line 309 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp17_ = TRUE;
+#line 309 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
while (TRUE) {
-#line 1757 "book-view.c"
- gboolean _tmp46_;
- gint _tmp48_;
- Book* _tmp49_;
- guint _tmp50_ = 0U;
- gint _tmp51_;
- PageView* _tmp52_ = NULL;
- PageView* page;
- PageView* _tmp53_;
- Page* _tmp54_ = NULL;
- Page* p;
- gdouble _tmp55_;
- gdouble _tmp56_;
- PageView* _tmp75_;
- gint _tmp76_ = 0;
- gint h;
- gint _tmp77_;
- gint _tmp78_;
- gint _tmp80_;
- PageView* _tmp81_;
- gint _tmp82_ = 0;
- gint _tmp83_;
-#line 314 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp46_ = _tmp45_;
-#line 314 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- if (!_tmp46_) {
-#line 1783 "book-view.c"
- gint _tmp47_;
-#line 314 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp47_ = i;
-#line 314 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- i = _tmp47_ + 1;
-#line 1789 "book-view.c"
+#line 1558 "book-view.c"
+ gboolean _tmp18_ = FALSE;
+ gint _tmp20_ = 0;
+ Book* _tmp21_ = NULL;
+ guint _tmp22_ = 0U;
+ guint _tmp23_ = 0U;
+ Page* page = NULL;
+ Book* _tmp24_ = NULL;
+ gint _tmp25_ = 0;
+ Page* _tmp26_ = NULL;
+ gint w = 0;
+ Page* _tmp27_ = NULL;
+ gint _tmp28_ = 0;
+ gint _tmp29_ = 0;
+ gint h = 0;
+ Page* _tmp30_ = NULL;
+ gint _tmp31_ = 0;
+ gint _tmp32_ = 0;
+ gint _tmp33_ = 0;
+ gint _tmp34_ = 0;
+ Page* _tmp35_ = NULL;
+ gint _tmp36_ = 0;
+ gint _tmp37_ = 0;
+ gint _tmp38_ = 0;
+ gint _tmp39_ = 0;
+ Page* _tmp40_ = NULL;
+ gint _tmp41_ = 0;
+ gint _tmp42_ = 0;
+ gint _tmp43_ = 0;
+ gint _tmp44_ = 0;
+ gint _tmp46_ = 0;
+ gint _tmp47_ = 0;
+#line 309 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp18_ = _tmp17_;
+#line 309 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (!_tmp18_) {
+#line 1594 "book-view.c"
+ gint _tmp19_ = 0;
+#line 309 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp19_ = i;
+#line 309 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ i = _tmp19_ + 1;
+#line 1600 "book-view.c"
}
-#line 314 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp45_ = FALSE;
-#line 314 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp48_ = i;
-#line 314 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp49_ = self->priv->book;
-#line 314 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp50_ = book_get_n_pages (_tmp49_);
-#line 314 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- if (!(((guint) _tmp48_) < _tmp50_)) {
-#line 314 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 309 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp17_ = FALSE;
+#line 309 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp20_ = i;
+#line 309 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp21_ = self->priv->_book;
+#line 309 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp22_ = book_get_n_pages (_tmp21_);
+#line 309 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp23_ = _tmp22_;
+#line 309 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (!(((guint) _tmp20_) < _tmp23_)) {
+#line 309 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
break;
-#line 1803 "book-view.c"
+#line 1616 "book-view.c"
}
+#line 311 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp24_ = self->priv->_book;
+#line 311 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp25_ = i;
+#line 311 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp26_ = book_get_page (_tmp24_, _tmp25_);
+#line 311 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ page = _tmp26_;
+#line 312 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp27_ = page;
+#line 312 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp28_ = page_get_width (_tmp27_);
+#line 312 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp29_ = _tmp28_;
+#line 312 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ w = _tmp29_;
+#line 313 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp30_ = page;
+#line 313 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp31_ = page_get_height (_tmp30_);
+#line 313 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp32_ = _tmp31_;
+#line 313 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ h = _tmp32_;
+#line 316 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp33_ = w;
+#line 316 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp34_ = max_dpi;
+#line 316 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp35_ = page;
#line 316 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp51_ = i;
+ _tmp36_ = page_get_dpi (_tmp35_);
#line 316 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp52_ = book_view_get_nth_page (self, _tmp51_);
+ _tmp37_ = _tmp36_;
#line 316 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- page = _tmp52_;
+ w = (gint) (((((gdouble) _tmp33_) * _tmp34_) / _tmp37_) + 0.5);
#line 317 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp53_ = page;
+ _tmp38_ = h;
#line 317 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp54_ = page_view_get_page (_tmp53_);
+ _tmp39_ = max_dpi;
#line 317 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- p = _tmp54_;
-#line 320 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp55_ = max_aspect;
+ _tmp40_ = page;
+#line 317 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp41_ = page_get_dpi (_tmp40_);
+#line 317 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp42_ = _tmp41_;
+#line 317 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ h = (gint) (((((gdouble) _tmp38_) * _tmp39_) / _tmp42_) + 0.5);
+#line 319 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp43_ = w;
+#line 319 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp44_ = max_width;
+#line 319 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp43_ > _tmp44_) {
+#line 1672 "book-view.c"
+ gint _tmp45_ = 0;
#line 320 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp56_ = aspect;
+ _tmp45_ = w;
#line 320 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- if (_tmp55_ > _tmp56_) {
-#line 1823 "book-view.c"
- Page* _tmp57_;
- gint _tmp58_ = 0;
- gint _tmp59_;
- gint _tmp60_;
- Page* _tmp61_;
- gint _tmp62_ = 0;
- gint _tmp63_;
- gint w;
- PageView* _tmp64_;
- gint _tmp65_;
-#line 323 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp57_ = p;
-#line 323 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp58_ = page_get_width (_tmp57_);
-#line 323 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp59_ = max_dpi;
-#line 323 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp60_ = width;
-#line 323 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp61_ = p;
-#line 323 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp62_ = page_get_dpi (_tmp61_);
-#line 323 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp63_ = max_width;
-#line 323 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- w = (gint) (((((gdouble) _tmp58_) * _tmp59_) * _tmp60_) / (_tmp62_ * _tmp63_));
-#line 324 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp64_ = page;
-#line 324 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp65_ = w;
-#line 324 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- page_view_set_width (_tmp64_, _tmp65_);
-#line 1856 "book-view.c"
- } else {
- Page* _tmp66_;
- gint _tmp67_ = 0;
- gint _tmp68_;
- gint _tmp69_;
- Page* _tmp70_;
- gint _tmp71_ = 0;
- gint _tmp72_;
- gint h;
- PageView* _tmp73_;
- gint _tmp74_;
-#line 329 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp66_ = p;
-#line 329 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp67_ = page_get_height (_tmp66_);
-#line 329 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp68_ = max_dpi;
-#line 329 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp69_ = height;
-#line 329 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp70_ = p;
-#line 329 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp71_ = page_get_dpi (_tmp70_);
-#line 329 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp72_ = max_height;
+ max_width = _tmp45_;
+#line 1678 "book-view.c"
+ }
+#line 321 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp46_ = h;
+#line 321 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp47_ = max_height;
+#line 321 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp46_ > _tmp47_) {
+#line 1686 "book-view.c"
+ gint _tmp48_ = 0;
+#line 322 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp48_ = h;
+#line 322 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ max_height = _tmp48_;
+#line 1692 "book-view.c"
+ }
+#line 309 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _page_unref0 (page);
+#line 1696 "book-view.c"
+ }
+ }
+ }
+#line 325 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp49_ = width;
+#line 325 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp50_ = height;
+#line 325 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ aspect = ((gdouble) _tmp49_) / _tmp50_;
+#line 326 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp51_ = max_width;
+#line 326 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp52_ = max_height;
+#line 326 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ max_aspect = ((gdouble) _tmp51_) / _tmp52_;
#line 329 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- h = (gint) (((((gdouble) _tmp67_) * _tmp68_) * _tmp69_) / (_tmp71_ * _tmp72_));
-#line 330 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp73_ = page;
-#line 330 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp74_ = h;
+ spacing = 12;
#line 330 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- page_view_set_height (_tmp73_, _tmp74_);
-#line 1890 "book-view.c"
+ _vala_book_width = 0;
+#line 331 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _vala_book_height = 0;
+#line 1718 "book-view.c"
+ {
+ gint i = 0;
+#line 332 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ i = 0;
+#line 1723 "book-view.c"
+ {
+ gboolean _tmp53_ = FALSE;
+#line 332 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp53_ = TRUE;
+#line 332 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ while (TRUE) {
+#line 1730 "book-view.c"
+ gboolean _tmp54_ = FALSE;
+ gint _tmp56_ = 0;
+ Book* _tmp57_ = NULL;
+ guint _tmp58_ = 0U;
+ guint _tmp59_ = 0U;
+ PageView* page = NULL;
+ gint _tmp60_ = 0;
+ PageView* _tmp61_ = NULL;
+ Page* p = NULL;
+ PageView* _tmp62_ = NULL;
+ Page* _tmp63_ = NULL;
+ Page* _tmp64_ = NULL;
+ Page* _tmp65_ = NULL;
+ gdouble _tmp66_ = 0.0;
+ gdouble _tmp67_ = 0.0;
+ gint h = 0;
+ PageView* _tmp90_ = NULL;
+ gint _tmp91_ = 0;
+ gint _tmp92_ = 0;
+ gint _tmp93_ = 0;
+ gint _tmp95_ = 0;
+ PageView* _tmp96_ = NULL;
+ gint _tmp97_ = 0;
+ gint _tmp98_ = 0;
+#line 332 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp54_ = _tmp53_;
+#line 332 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (!_tmp54_) {
+#line 1759 "book-view.c"
+ gint _tmp55_ = 0;
+#line 332 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp55_ = i;
+#line 332 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ i = _tmp55_ + 1;
+#line 1765 "book-view.c"
+ }
+#line 332 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp53_ = FALSE;
+#line 332 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp56_ = i;
+#line 332 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp57_ = self->priv->_book;
+#line 332 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp58_ = book_get_n_pages (_tmp57_);
+#line 332 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp59_ = _tmp58_;
+#line 332 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (!(((guint) _tmp56_) < _tmp59_)) {
+#line 332 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ break;
+#line 1781 "book-view.c"
}
-#line 333 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp75_ = page;
-#line 333 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp76_ = page_view_get_height (_tmp75_);
-#line 333 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- h = _tmp76_;
#line 334 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp77_ = h;
+ _tmp60_ = i;
#line 334 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp78_ = _vala_book_height;
+ _tmp61_ = book_view_get_nth_page (self, _tmp60_);
#line 334 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- if (_tmp77_ > _tmp78_) {
-#line 1904 "book-view.c"
- gint _tmp79_;
+ page = _tmp61_;
#line 335 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp79_ = h;
+ _tmp62_ = page;
#line 335 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _vala_book_height = _tmp79_;
-#line 1910 "book-view.c"
- }
-#line 336 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp80_ = _vala_book_width;
-#line 336 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp81_ = page;
-#line 336 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp82_ = page_view_get_width (_tmp81_);
-#line 336 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _vala_book_width = _tmp80_ + _tmp82_;
-#line 337 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp83_ = i;
-#line 337 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- if (_tmp83_ != 0) {
-#line 1924 "book-view.c"
- gint _tmp84_;
- gint _tmp85_;
+ _tmp63_ = page_view_get_page (_tmp62_);
+#line 335 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp64_ = _tmp63_;
+#line 335 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp65_ = _page_ref0 (_tmp64_);
+#line 335 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ p = _tmp65_;
#line 338 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp84_ = _vala_book_width;
+ _tmp66_ = max_aspect;
#line 338 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp85_ = spacing;
+ _tmp67_ = aspect;
#line 338 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _vala_book_width = _tmp84_ + _tmp85_;
-#line 1933 "book-view.c"
+ if (_tmp66_ > _tmp67_) {
+#line 1805 "book-view.c"
+ gint w = 0;
+ Page* _tmp68_ = NULL;
+ gint _tmp69_ = 0;
+ gint _tmp70_ = 0;
+ gint _tmp71_ = 0;
+ gint _tmp72_ = 0;
+ Page* _tmp73_ = NULL;
+ gint _tmp74_ = 0;
+ gint _tmp75_ = 0;
+ gint _tmp76_ = 0;
+ PageView* _tmp77_ = NULL;
+ gint _tmp78_ = 0;
+#line 341 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp68_ = p;
+#line 341 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp69_ = page_get_width (_tmp68_);
+#line 341 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp70_ = _tmp69_;
+#line 341 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp71_ = max_dpi;
+#line 341 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp72_ = width;
+#line 341 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp73_ = p;
+#line 341 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp74_ = page_get_dpi (_tmp73_);
+#line 341 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp75_ = _tmp74_;
+#line 341 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp76_ = max_width;
+#line 341 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ w = (gint) (((((gdouble) _tmp70_) * _tmp71_) * _tmp72_) / (_tmp75_ * _tmp76_));
+#line 342 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp77_ = page;
+#line 342 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp78_ = w;
+#line 342 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ page_view_set_width (_tmp77_, _tmp78_);
+#line 1844 "book-view.c"
+ } else {
+ gint h = 0;
+ Page* _tmp79_ = NULL;
+ gint _tmp80_ = 0;
+ gint _tmp81_ = 0;
+ gint _tmp82_ = 0;
+ gint _tmp83_ = 0;
+ Page* _tmp84_ = NULL;
+ gint _tmp85_ = 0;
+ gint _tmp86_ = 0;
+ gint _tmp87_ = 0;
+ PageView* _tmp88_ = NULL;
+ gint _tmp89_ = 0;
+#line 347 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp79_ = p;
+#line 347 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp80_ = page_get_height (_tmp79_);
+#line 347 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp81_ = _tmp80_;
+#line 347 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp82_ = max_dpi;
+#line 347 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp83_ = height;
+#line 347 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp84_ = p;
+#line 347 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp85_ = page_get_dpi (_tmp84_);
+#line 347 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp86_ = _tmp85_;
+#line 347 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp87_ = max_height;
+#line 347 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ h = (gint) (((((gdouble) _tmp81_) * _tmp82_) * _tmp83_) / (_tmp86_ * _tmp87_));
+#line 348 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp88_ = page;
+#line 348 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp89_ = h;
+#line 348 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ page_view_set_height (_tmp88_, _tmp89_);
+#line 1884 "book-view.c"
}
-#line 314 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 351 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp90_ = page;
+#line 351 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp91_ = page_view_get_height (_tmp90_);
+#line 351 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ h = _tmp91_;
+#line 352 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp92_ = h;
+#line 352 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp93_ = _vala_book_height;
+#line 352 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp92_ > _tmp93_) {
+#line 1898 "book-view.c"
+ gint _tmp94_ = 0;
+#line 353 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp94_ = h;
+#line 353 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _vala_book_height = _tmp94_;
+#line 1904 "book-view.c"
+ }
+#line 354 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp95_ = _vala_book_width;
+#line 354 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp96_ = page;
+#line 354 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp97_ = page_view_get_width (_tmp96_);
+#line 354 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _vala_book_width = _tmp95_ + _tmp97_;
+#line 355 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp98_ = i;
+#line 355 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp98_ != 0) {
+#line 1918 "book-view.c"
+ gint _tmp99_ = 0;
+ gint _tmp100_ = 0;
+#line 356 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp99_ = _vala_book_width;
+#line 356 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp100_ = spacing;
+#line 356 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _vala_book_width = _tmp99_ + _tmp100_;
+#line 1927 "book-view.c"
+ }
+#line 332 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_page_unref0 (p);
-#line 314 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 332 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_page_view_unref0 (page);
-#line 1939 "book-view.c"
+#line 1933 "book-view.c"
}
}
}
-#line 341 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 359 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
x_offset = 0;
-#line 1945 "book-view.c"
+#line 1939 "book-view.c"
{
- gint i;
-#line 342 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ gint i = 0;
+#line 360 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
i = 0;
-#line 1950 "book-view.c"
+#line 1944 "book-view.c"
{
- gboolean _tmp86_;
-#line 342 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp86_ = TRUE;
-#line 342 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ gboolean _tmp101_ = FALSE;
+#line 360 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp101_ = TRUE;
+#line 360 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
while (TRUE) {
-#line 1957 "book-view.c"
- gboolean _tmp87_;
- gint _tmp89_;
- Book* _tmp90_;
- guint _tmp91_ = 0U;
- gint _tmp92_;
- PageView* _tmp93_ = NULL;
- PageView* page;
- PageView* _tmp94_;
- gint _tmp95_;
- gint _tmp96_;
- PageView* _tmp97_;
- gint _tmp98_ = 0;
- gint _tmp99_;
- PageView* _tmp100_;
- gint _tmp101_;
- PageView* _tmp102_;
- gint _tmp103_ = 0;
-#line 342 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp87_ = _tmp86_;
-#line 342 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- if (!_tmp87_) {
-#line 1979 "book-view.c"
- gint _tmp88_;
-#line 342 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp88_ = i;
-#line 342 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- i = _tmp88_ + 1;
-#line 1985 "book-view.c"
+#line 1951 "book-view.c"
+ gboolean _tmp102_ = FALSE;
+ gint _tmp104_ = 0;
+ Book* _tmp105_ = NULL;
+ guint _tmp106_ = 0U;
+ guint _tmp107_ = 0U;
+ PageView* page = NULL;
+ gint _tmp108_ = 0;
+ PageView* _tmp109_ = NULL;
+ PageView* _tmp110_ = NULL;
+ gint _tmp111_ = 0;
+ gint _tmp112_ = 0;
+ PageView* _tmp113_ = NULL;
+ gint _tmp114_ = 0;
+ gint _tmp115_ = 0;
+ PageView* _tmp116_ = NULL;
+ gint _tmp117_ = 0;
+ PageView* _tmp118_ = NULL;
+ gint _tmp119_ = 0;
+#line 360 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp102_ = _tmp101_;
+#line 360 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (!_tmp102_) {
+#line 1974 "book-view.c"
+ gint _tmp103_ = 0;
+#line 360 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp103_ = i;
+#line 360 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ i = _tmp103_ + 1;
+#line 1980 "book-view.c"
}
-#line 342 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp86_ = FALSE;
-#line 342 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp89_ = i;
-#line 342 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp90_ = self->priv->book;
-#line 342 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp91_ = book_get_n_pages (_tmp90_);
-#line 342 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- if (!(((guint) _tmp89_) < _tmp91_)) {
-#line 342 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 360 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp101_ = FALSE;
+#line 360 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp104_ = i;
+#line 360 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp105_ = self->priv->_book;
+#line 360 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp106_ = book_get_n_pages (_tmp105_);
+#line 360 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp107_ = _tmp106_;
+#line 360 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (!(((guint) _tmp104_) < _tmp107_)) {
+#line 360 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
break;
-#line 1999 "book-view.c"
+#line 1996 "book-view.c"
}
-#line 344 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp92_ = i;
-#line 344 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp93_ = book_view_get_nth_page (self, _tmp92_);
-#line 344 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- page = _tmp93_;
-#line 347 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp94_ = page;
-#line 347 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp95_ = x_offset;
-#line 347 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- page_view_set_x_offset (_tmp94_, _tmp95_);
-#line 348 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp96_ = x_offset;
-#line 348 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp97_ = page;
-#line 348 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp98_ = page_view_get_width (_tmp97_);
-#line 348 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp99_ = spacing;
-#line 348 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- x_offset = _tmp96_ + (_tmp98_ + _tmp99_);
-#line 351 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp100_ = page;
-#line 351 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp101_ = height;
-#line 351 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp102_ = page;
-#line 351 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp103_ = page_view_get_height (_tmp102_);
-#line 351 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- page_view_set_y_offset (_tmp100_, (_tmp101_ - _tmp103_) / 2);
-#line 342 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 362 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp108_ = i;
+#line 362 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp109_ = book_view_get_nth_page (self, _tmp108_);
+#line 362 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ page = _tmp109_;
+#line 365 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp110_ = page;
+#line 365 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp111_ = x_offset;
+#line 365 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ page_view_set_x_offset (_tmp110_, _tmp111_);
+#line 366 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp112_ = x_offset;
+#line 366 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp113_ = page;
+#line 366 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp114_ = page_view_get_width (_tmp113_);
+#line 366 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp115_ = spacing;
+#line 366 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ x_offset = _tmp112_ + (_tmp114_ + _tmp115_);
+#line 369 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp116_ = page;
+#line 369 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp117_ = height;
+#line 369 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp118_ = page;
+#line 369 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp119_ = page_view_get_height (_tmp118_);
+#line 369 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ page_view_set_y_offset (_tmp116_, (_tmp117_ - _tmp119_) / 2);
+#line 360 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_page_view_unref0 (page);
-#line 2035 "book-view.c"
+#line 2032 "book-view.c"
}
}
}
-#line 278 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 296 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
if (book_width) {
-#line 278 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 296 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
*book_width = _vala_book_width;
-#line 2043 "book-view.c"
+#line 2040 "book-view.c"
}
-#line 278 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 296 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
if (book_height) {
-#line 278 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 296 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
*book_height = _vala_book_height;
-#line 2049 "book-view.c"
+#line 2046 "book-view.c"
}
}
static void book_view_layout (BookView* self) {
- gboolean _tmp0_;
+ gboolean _tmp0_ = FALSE;
GtkAllocation allocation = {0};
- GtkWidget* _tmp1_;
+ GtkWidget* _tmp1_ = NULL;
GtkAllocation _tmp2_ = {0};
GtkAllocation box_allocation = {0};
GtkAllocation _tmp3_ = {0};
- gboolean right_aligned;
- GtkAdjustment* _tmp4_;
+ gboolean right_aligned = FALSE;
+ GtkAdjustment* _tmp4_ = NULL;
gdouble _tmp5_ = 0.0;
- GtkAdjustment* _tmp6_;
+ GtkAdjustment* _tmp6_ = NULL;
gdouble _tmp7_ = 0.0;
- GtkAdjustment* _tmp8_;
+ GtkAdjustment* _tmp8_ = NULL;
gdouble _tmp9_ = 0.0;
- GtkAllocation _tmp10_;
- gint _tmp11_;
- gint width;
- GtkAllocation _tmp12_;
- gint _tmp13_;
+ gint width = 0;
+ GtkAllocation _tmp10_ = {0};
+ gint _tmp11_ = 0;
+ gint height = 0;
+ GtkAllocation _tmp12_ = {0};
+ gint _tmp13_ = 0;
guint _tmp14_ = 0U;
- gint height;
gint book_width = 0;
gint book_height = 0;
- gint _tmp15_;
- gint _tmp16_;
+ gint _tmp15_ = 0;
+ gint _tmp16_ = 0;
gint _tmp17_ = 0;
gint _tmp18_ = 0;
- gint _tmp19_;
- GtkAllocation _tmp20_;
- gint _tmp21_;
- gboolean _tmp54_;
-#line 355 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ gint _tmp19_ = 0;
+ GtkAllocation _tmp20_ = {0};
+ gint _tmp21_ = 0;
+ gboolean _tmp55_ = FALSE;
+#line 373 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_return_if_fail (self != NULL);
-#line 357 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 375 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp0_ = self->priv->need_layout;
-#line 357 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 375 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
if (!_tmp0_) {
-#line 358 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 376 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
return;
-#line 2093 "book-view.c"
+#line 2090 "book-view.c"
}
-#line 360 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 378 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
self->priv->laying_out = TRUE;
-#line 363 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 381 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp1_ = self->priv->drawing_area;
-#line 363 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 381 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
gtk_widget_get_allocation (_tmp1_, &_tmp2_);
-#line 363 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 381 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
allocation = _tmp2_;
-#line 365 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 383 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
gtk_widget_get_allocation ((GtkWidget*) self, &_tmp3_);
-#line 365 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 383 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
box_allocation = _tmp3_;
-#line 368 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 386 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
right_aligned = TRUE;
-#line 369 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 387 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp4_ = self->priv->adjustment;
-#line 369 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 387 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp5_ = gtk_adjustment_get_value (_tmp4_);
-#line 369 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 387 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp6_ = self->priv->adjustment;
-#line 369 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 387 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp7_ = gtk_adjustment_get_upper (_tmp6_);
-#line 369 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 387 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp8_ = self->priv->adjustment;
-#line 369 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 387 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp9_ = gtk_adjustment_get_page_size (_tmp8_);
-#line 369 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 387 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
if (_tmp5_ < (_tmp7_ - _tmp9_)) {
-#line 370 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 388 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
right_aligned = FALSE;
-#line 2125 "book-view.c"
+#line 2122 "book-view.c"
}
-#line 373 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 391 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp10_ = allocation;
-#line 373 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 391 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp11_ = _tmp10_.width;
-#line 373 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 391 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
width = (gint) _tmp11_;
-#line 374 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 392 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp12_ = box_allocation;
-#line 374 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 392 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp13_ = _tmp12_.height;
-#line 374 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 392 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp14_ = gtk_container_get_border_width ((GtkContainer*) self);
-#line 374 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 392 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
height = (gint) (_tmp13_ - (_tmp14_ * 2));
-#line 376 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 394 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp15_ = width;
-#line 376 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 394 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp16_ = height;
-#line 376 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 394 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
book_view_layout_into (self, _tmp15_, _tmp16_, &_tmp17_, &_tmp18_);
-#line 376 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 394 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
book_width = _tmp17_;
-#line 376 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 394 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
book_height = _tmp18_;
-#line 379 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 397 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp19_ = book_width;
-#line 379 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 397 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp20_ = allocation;
-#line 379 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 397 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp21_ = _tmp20_.width;
-#line 379 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 397 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
if (_tmp19_ > _tmp21_) {
-#line 2159 "book-view.c"
- GtkAllocation _tmp22_;
- gint _tmp23_;
- gint _tmp24_;
- gint _tmp25_;
+#line 2156 "book-view.c"
+ GtkAllocation _tmp22_ = {0};
+ gint _tmp23_ = 0;
+ gint _tmp24_ = 0;
+ gint _tmp25_ = 0;
gint _tmp26_ = 0;
gint _tmp27_ = 0;
- GtkAdjustment* _tmp28_;
- GtkAdjustment* _tmp29_;
- gint _tmp30_;
- GtkAdjustment* _tmp31_;
- GtkAllocation _tmp32_;
- gint _tmp33_;
- gint _tmp34_;
- GtkAllocation _tmp35_;
- gint _tmp36_;
- gint max_offset;
+ GtkAdjustment* _tmp28_ = NULL;
+ GtkAdjustment* _tmp29_ = NULL;
+ gint _tmp30_ = 0;
+ GtkAdjustment* _tmp31_ = NULL;
+ GtkAllocation _tmp32_ = {0};
+ gint _tmp33_ = 0;
+ gint max_offset = 0;
+ gint _tmp34_ = 0;
+ GtkAllocation _tmp35_ = {0};
+ gint _tmp36_ = 0;
gboolean _tmp37_ = FALSE;
- gboolean _tmp38_;
- gboolean _tmp41_;
- GtkScrollbar* _tmp43_;
-#line 382 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ gboolean _tmp38_ = FALSE;
+ gboolean _tmp42_ = FALSE;
+ GtkScrollbar* _tmp44_ = NULL;
+#line 400 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp22_ = allocation;
-#line 382 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 400 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp23_ = _tmp22_.height;
-#line 382 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 400 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
height = _tmp23_;
-#line 383 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 401 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp24_ = width;
-#line 383 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 401 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp25_ = height;
-#line 383 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 401 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
book_view_layout_into (self, _tmp24_, _tmp25_, &_tmp26_, &_tmp27_);
-#line 383 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 401 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
book_width = _tmp26_;
-#line 383 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 401 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
book_height = _tmp27_;
-#line 386 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 404 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp28_ = self->priv->adjustment;
-#line 386 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 404 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
gtk_adjustment_set_lower (_tmp28_, (gdouble) 0);
-#line 387 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 405 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp29_ = self->priv->adjustment;
-#line 387 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 405 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp30_ = book_width;
-#line 387 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 405 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
gtk_adjustment_set_upper (_tmp29_, (gdouble) _tmp30_);
-#line 388 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 406 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp31_ = self->priv->adjustment;
-#line 388 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 406 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp32_ = allocation;
-#line 388 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 406 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp33_ = _tmp32_.width;
-#line 388 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 406 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
gtk_adjustment_set_page_size (_tmp31_, (gdouble) _tmp33_);
-#line 391 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 409 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp34_ = book_width;
-#line 391 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 409 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp35_ = allocation;
-#line 391 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 409 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp36_ = _tmp35_.width;
-#line 391 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 409 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
max_offset = _tmp34_ - _tmp36_;
-#line 392 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 410 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp38_ = right_aligned;
-#line 392 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 410 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
if (_tmp38_) {
-#line 392 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 410 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp37_ = TRUE;
-#line 2228 "book-view.c"
+#line 2225 "book-view.c"
} else {
gint _tmp39_ = 0;
- gint _tmp40_;
-#line 392 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ gint _tmp40_ = 0;
+ gint _tmp41_ = 0;
+#line 410 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp39_ = book_view_get_x_offset (self);
-#line 392 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp40_ = max_offset;
-#line 392 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp37_ = _tmp39_ > _tmp40_;
+#line 410 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp40_ = _tmp39_;
+#line 410 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp41_ = max_offset;
+#line 410 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp37_ = _tmp40_ > _tmp41_;
#line 2238 "book-view.c"
}
-#line 392 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp41_ = _tmp37_;
-#line 392 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- if (_tmp41_) {
+#line 410 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp42_ = _tmp37_;
+#line 410 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp42_) {
#line 2244 "book-view.c"
- gint _tmp42_;
-#line 393 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp42_ = max_offset;
-#line 393 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- book_view_set_x_offset (self, _tmp42_);
+ gint _tmp43_ = 0;
+#line 411 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp43_ = max_offset;
+#line 411 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ book_view_set_x_offset (self, _tmp43_);
#line 2250 "book-view.c"
}
-#line 395 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp43_ = self->priv->scroll;
-#line 395 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- gtk_widget_show ((GtkWidget*) _tmp43_);
+#line 413 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp44_ = self->priv->scroll;
+#line 413 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ gtk_widget_show ((GtkWidget*) _tmp44_);
#line 2256 "book-view.c"
} else {
- GtkScrollbar* _tmp44_;
- gint _tmp45_;
- GtkAllocation _tmp46_;
- gint _tmp47_;
- gint offset;
- GtkAdjustment* _tmp48_;
- gint _tmp49_;
- GtkAdjustment* _tmp50_;
- gint _tmp51_;
- GtkAdjustment* _tmp52_;
- gint _tmp53_;
-#line 399 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp44_ = self->priv->scroll;
-#line 399 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- gtk_widget_hide ((GtkWidget*) _tmp44_);
-#line 400 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp45_ = book_width;
-#line 400 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp46_ = allocation;
-#line 400 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp47_ = _tmp46_.width;
-#line 400 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- offset = (_tmp45_ - _tmp47_) / 2;
-#line 401 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp48_ = self->priv->adjustment;
-#line 401 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp49_ = offset;
-#line 401 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- gtk_adjustment_set_lower (_tmp48_, (gdouble) _tmp49_);
-#line 402 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp50_ = self->priv->adjustment;
-#line 402 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp51_ = offset;
-#line 402 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- gtk_adjustment_set_upper (_tmp50_, (gdouble) _tmp51_);
-#line 403 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp52_ = self->priv->adjustment;
-#line 403 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- gtk_adjustment_set_page_size (_tmp52_, (gdouble) 0);
-#line 404 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp53_ = offset;
-#line 404 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- book_view_set_x_offset (self, _tmp53_);
+ GtkScrollbar* _tmp45_ = NULL;
+ gint offset = 0;
+ gint _tmp46_ = 0;
+ GtkAllocation _tmp47_ = {0};
+ gint _tmp48_ = 0;
+ GtkAdjustment* _tmp49_ = NULL;
+ gint _tmp50_ = 0;
+ GtkAdjustment* _tmp51_ = NULL;
+ gint _tmp52_ = 0;
+ GtkAdjustment* _tmp53_ = NULL;
+ gint _tmp54_ = 0;
+#line 417 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp45_ = self->priv->scroll;
+#line 417 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ gtk_widget_hide ((GtkWidget*) _tmp45_);
+#line 418 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp46_ = book_width;
+#line 418 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp47_ = allocation;
+#line 418 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp48_ = _tmp47_.width;
+#line 418 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ offset = (_tmp46_ - _tmp48_) / 2;
+#line 419 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp49_ = self->priv->adjustment;
+#line 419 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp50_ = offset;
+#line 419 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ gtk_adjustment_set_lower (_tmp49_, (gdouble) _tmp50_);
+#line 420 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp51_ = self->priv->adjustment;
+#line 420 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp52_ = offset;
+#line 420 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ gtk_adjustment_set_upper (_tmp51_, (gdouble) _tmp52_);
+#line 421 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp53_ = self->priv->adjustment;
+#line 421 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ gtk_adjustment_set_page_size (_tmp53_, (gdouble) 0);
+#line 422 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp54_ = offset;
+#line 422 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ book_view_set_x_offset (self, _tmp54_);
#line 2301 "book-view.c"
}
-#line 407 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp54_ = self->priv->show_selected_page;
-#line 407 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- if (_tmp54_) {
+#line 425 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp55_ = self->priv->show_selected_page;
+#line 425 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp55_) {
#line 2307 "book-view.c"
- PageView* _tmp55_;
-#line 408 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp55_ = self->priv->selected_page;
-#line 408 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- book_view_show_page_view (self, _tmp55_);
+ PageView* _tmp56_ = NULL;
+#line 426 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp56_ = self->priv->selected_page_view;
+#line 426 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ book_view_show_page_view (self, _tmp56_);
#line 2313 "book-view.c"
}
-#line 410 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 428 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
self->priv->need_layout = FALSE;
-#line 411 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 429 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
self->priv->show_selected_page = FALSE;
-#line 412 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 430 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
self->priv->laying_out = FALSE;
#line 2321 "book-view.c"
}
@@ -2323,251 +2323,284 @@ static void book_view_layout (BookView* self) {
static gboolean book_view_draw_cb (BookView* self, GtkWidget* widget, cairo_t* context) {
gboolean result = FALSE;
- Book* _tmp0_;
+ Book* _tmp0_ = NULL;
guint _tmp1_ = 0U;
+ guint _tmp2_ = 0U;
gdouble left = 0.0;
gdouble top = 0.0;
gdouble right = 0.0;
gdouble bottom = 0.0;
- cairo_t* _tmp2_;
- gdouble _tmp3_ = 0.0;
+ cairo_t* _tmp3_ = NULL;
gdouble _tmp4_ = 0.0;
gdouble _tmp5_ = 0.0;
gdouble _tmp6_ = 0.0;
-#line 415 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ gdouble _tmp7_ = 0.0;
+#line 433 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_return_val_if_fail (self != NULL, FALSE);
-#line 415 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 433 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_return_val_if_fail (widget != NULL, FALSE);
-#line 415 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 433 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_return_val_if_fail (context != NULL, FALSE);
-#line 417 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp0_ = self->priv->book;
-#line 417 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 435 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp0_ = self->priv->_book;
+#line 435 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp1_ = book_get_n_pages (_tmp0_);
-#line 417 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- if (_tmp1_ == ((guint) 0)) {
-#line 418 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 435 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp2_ = _tmp1_;
+#line 435 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp2_ == ((guint) 0)) {
+#line 436 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
result = FALSE;
-#line 418 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 436 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
return result;
-#line 2354 "book-view.c"
+#line 2357 "book-view.c"
}
-#line 420 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 438 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
book_view_layout (self);
-#line 423 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp2_ = context;
-#line 423 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- cairo_clip_extents (_tmp2_, &_tmp3_, &_tmp4_, &_tmp5_, &_tmp6_);
-#line 423 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- left = _tmp3_;
-#line 423 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- top = _tmp4_;
-#line 423 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- right = _tmp5_;
-#line 423 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- bottom = _tmp6_;
-#line 2370 "book-view.c"
+#line 441 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp3_ = context;
+#line 441 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ cairo_clip_extents (_tmp3_, &_tmp4_, &_tmp5_, &_tmp6_, &_tmp7_);
+#line 441 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ left = _tmp4_;
+#line 441 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ top = _tmp5_;
+#line 441 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ right = _tmp6_;
+#line 441 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ bottom = _tmp7_;
+#line 2373 "book-view.c"
{
- gint i;
-#line 426 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ gint i = 0;
+#line 444 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
i = 0;
-#line 2375 "book-view.c"
+#line 2378 "book-view.c"
{
- gboolean _tmp7_;
-#line 426 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp7_ = TRUE;
-#line 426 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ gboolean _tmp8_ = FALSE;
+#line 444 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp8_ = TRUE;
+#line 444 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
while (TRUE) {
-#line 2382 "book-view.c"
- gboolean _tmp8_;
- gint _tmp10_;
- Book* _tmp11_;
- guint _tmp12_ = 0U;
- gint _tmp13_;
- PageView* _tmp14_ = NULL;
- PageView* page;
- PageView* _tmp15_;
- gint _tmp16_ = 0;
- gint _tmp17_ = 0;
- gint left_edge;
- PageView* _tmp18_;
+#line 2385 "book-view.c"
+ gboolean _tmp9_ = FALSE;
+ gint _tmp11_ = 0;
+ Book* _tmp12_ = NULL;
+ guint _tmp13_ = 0U;
+ guint _tmp14_ = 0U;
+ PageView* page = NULL;
+ gint _tmp15_ = 0;
+ PageView* _tmp16_ = NULL;
+ gint left_edge = 0;
+ PageView* _tmp17_ = NULL;
+ gint _tmp18_ = 0;
gint _tmp19_ = 0;
- PageView* _tmp20_;
+ gint _tmp20_ = 0;
gint _tmp21_ = 0;
- gint _tmp22_ = 0;
- gint right_edge;
- gboolean _tmp23_ = FALSE;
- gint _tmp24_;
- gdouble _tmp25_;
- gboolean _tmp28_;
- cairo_t* _tmp29_;
- cairo_t* _tmp30_;
- gint _tmp31_ = 0;
- PageView* _tmp32_;
- cairo_t* _tmp33_;
- cairo_t* _tmp34_;
- PageView* _tmp35_;
- gboolean _tmp36_ = FALSE;
-#line 426 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp8_ = _tmp7_;
-#line 426 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- if (!_tmp8_) {
-#line 2416 "book-view.c"
- gint _tmp9_;
-#line 426 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp9_ = i;
-#line 426 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- i = _tmp9_ + 1;
-#line 2422 "book-view.c"
+ gint right_edge = 0;
+ PageView* _tmp22_ = NULL;
+ gint _tmp23_ = 0;
+ gint _tmp24_ = 0;
+ PageView* _tmp25_ = NULL;
+ gint _tmp26_ = 0;
+ gint _tmp27_ = 0;
+ gint _tmp28_ = 0;
+ gboolean _tmp29_ = FALSE;
+ gint _tmp30_ = 0;
+ gdouble _tmp31_ = 0.0;
+ gboolean _tmp34_ = FALSE;
+ cairo_t* _tmp35_ = NULL;
+ cairo_t* _tmp36_ = NULL;
+ gint _tmp37_ = 0;
+ gint _tmp38_ = 0;
+ PageView* _tmp39_ = NULL;
+ cairo_t* _tmp40_ = NULL;
+ cairo_t* _tmp41_ = NULL;
+ PageView* _tmp42_ = NULL;
+ gboolean _tmp43_ = FALSE;
+ gboolean _tmp44_ = FALSE;
+#line 444 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp9_ = _tmp8_;
+#line 444 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (!_tmp9_) {
+#line 2426 "book-view.c"
+ gint _tmp10_ = 0;
+#line 444 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp10_ = i;
+#line 444 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ i = _tmp10_ + 1;
+#line 2432 "book-view.c"
}
-#line 426 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp7_ = FALSE;
-#line 426 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp10_ = i;
-#line 426 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp11_ = self->priv->book;
-#line 426 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp12_ = book_get_n_pages (_tmp11_);
-#line 426 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- if (!(((guint) _tmp10_) < _tmp12_)) {
-#line 426 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 444 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp8_ = FALSE;
+#line 444 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp11_ = i;
+#line 444 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp12_ = self->priv->_book;
+#line 444 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp13_ = book_get_n_pages (_tmp12_);
+#line 444 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp14_ = _tmp13_;
+#line 444 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (!(((guint) _tmp11_) < _tmp14_)) {
+#line 444 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
break;
-#line 2436 "book-view.c"
+#line 2448 "book-view.c"
}
-#line 428 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp13_ = i;
-#line 428 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp14_ = book_view_get_nth_page (self, _tmp13_);
-#line 428 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- page = _tmp14_;
-#line 429 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp15_ = page;
-#line 429 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp16_ = page_view_get_x_offset (_tmp15_);
-#line 429 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp17_ = book_view_get_x_offset (self);
-#line 429 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- left_edge = _tmp16_ - _tmp17_;
-#line 430 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp18_ = page;
-#line 430 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp19_ = page_view_get_x_offset (_tmp18_);
-#line 430 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp20_ = page;
-#line 430 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp21_ = page_view_get_width (_tmp20_);
-#line 430 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp22_ = book_view_get_x_offset (self);
-#line 430 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- right_edge = (_tmp19_ + _tmp21_) - _tmp22_;
-#line 433 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp24_ = right_edge;
-#line 433 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp25_ = left;
-#line 433 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- if (((gdouble) _tmp24_) < _tmp25_) {
-#line 433 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp23_ = TRUE;
-#line 2472 "book-view.c"
+#line 446 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp15_ = i;
+#line 446 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp16_ = book_view_get_nth_page (self, _tmp15_);
+#line 446 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ page = _tmp16_;
+#line 447 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp17_ = page;
+#line 447 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp18_ = page_view_get_x_offset (_tmp17_);
+#line 447 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp19_ = _tmp18_;
+#line 447 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp20_ = book_view_get_x_offset (self);
+#line 447 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp21_ = _tmp20_;
+#line 447 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ left_edge = _tmp19_ - _tmp21_;
+#line 448 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp22_ = page;
+#line 448 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp23_ = page_view_get_x_offset (_tmp22_);
+#line 448 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp24_ = _tmp23_;
+#line 448 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp25_ = page;
+#line 448 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp26_ = page_view_get_width (_tmp25_);
+#line 448 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp27_ = book_view_get_x_offset (self);
+#line 448 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp28_ = _tmp27_;
+#line 448 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ right_edge = (_tmp24_ + _tmp26_) - _tmp28_;
+#line 451 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp30_ = right_edge;
+#line 451 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp31_ = left;
+#line 451 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (((gdouble) _tmp30_) < _tmp31_) {
+#line 451 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp29_ = TRUE;
+#line 2492 "book-view.c"
} else {
- gint _tmp26_;
- gdouble _tmp27_;
-#line 433 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp26_ = left_edge;
-#line 433 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp27_ = right;
-#line 433 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp23_ = ((gdouble) _tmp26_) > _tmp27_;
-#line 2482 "book-view.c"
+ gint _tmp32_ = 0;
+ gdouble _tmp33_ = 0.0;
+#line 451 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp32_ = left_edge;
+#line 451 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp33_ = right;
+#line 451 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp29_ = ((gdouble) _tmp32_) > _tmp33_;
+#line 2502 "book-view.c"
}
-#line 433 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp28_ = _tmp23_;
-#line 433 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- if (_tmp28_) {
-#line 434 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 451 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp34_ = _tmp29_;
+#line 451 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp34_) {
+#line 452 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_page_view_unref0 (page);
-#line 434 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 452 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
continue;
-#line 2492 "book-view.c"
+#line 2512 "book-view.c"
}
-#line 436 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp29_ = context;
-#line 436 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- cairo_save (_tmp29_);
-#line 437 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp30_ = context;
-#line 437 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp31_ = book_view_get_x_offset (self);
-#line 437 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- cairo_translate (_tmp30_, (gdouble) (-_tmp31_), (gdouble) 0);
-#line 438 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp32_ = page;
-#line 438 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp33_ = context;
-#line 438 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- page_view_render (_tmp32_, _tmp33_);
-#line 439 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp34_ = context;
-#line 439 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- cairo_restore (_tmp34_);
-#line 441 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp35_ = page;
-#line 441 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp36_ = page_view_get_selected (_tmp35_);
-#line 441 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- if (_tmp36_) {
-#line 2520 "book-view.c"
- GtkWidget* _tmp37_;
- GtkStyleContext* _tmp38_ = NULL;
- cairo_t* _tmp39_;
- PageView* _tmp40_;
- gint _tmp41_ = 0;
- gint _tmp42_ = 0;
- PageView* _tmp43_;
- gint _tmp44_ = 0;
- PageView* _tmp45_;
- gint _tmp46_ = 0;
- PageView* _tmp47_;
- gint _tmp48_ = 0;
-#line 442 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp37_ = self->priv->drawing_area;
-#line 442 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp38_ = gtk_widget_get_style_context (_tmp37_);
-#line 442 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp39_ = context;
-#line 442 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp40_ = page;
-#line 442 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp41_ = page_view_get_x_offset (_tmp40_);
-#line 442 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp42_ = book_view_get_x_offset (self);
-#line 442 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp43_ = page;
-#line 442 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp44_ = page_view_get_y_offset (_tmp43_);
-#line 442 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp45_ = page;
-#line 442 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp46_ = page_view_get_width (_tmp45_);
-#line 442 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp47_ = page;
-#line 442 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp48_ = page_view_get_height (_tmp47_);
-#line 442 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- gtk_render_focus (_tmp38_, _tmp39_, (gdouble) (_tmp41_ - _tmp42_), (gdouble) _tmp44_, (gdouble) _tmp46_, (gdouble) _tmp48_);
-#line 2559 "book-view.c"
+#line 454 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp35_ = context;
+#line 454 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ cairo_save (_tmp35_);
+#line 455 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp36_ = context;
+#line 455 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp37_ = book_view_get_x_offset (self);
+#line 455 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp38_ = _tmp37_;
+#line 455 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ cairo_translate (_tmp36_, (gdouble) (-_tmp38_), (gdouble) 0);
+#line 456 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp39_ = page;
+#line 456 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp40_ = context;
+#line 456 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ page_view_render (_tmp39_, _tmp40_);
+#line 457 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp41_ = context;
+#line 457 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ cairo_restore (_tmp41_);
+#line 459 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp42_ = page;
+#line 459 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp43_ = page_view_get_selected (_tmp42_);
+#line 459 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp44_ = _tmp43_;
+#line 459 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp44_) {
+#line 2544 "book-view.c"
+ GtkWidget* _tmp45_ = NULL;
+ GtkStyleContext* _tmp46_ = NULL;
+ cairo_t* _tmp47_ = NULL;
+ PageView* _tmp48_ = NULL;
+ gint _tmp49_ = 0;
+ gint _tmp50_ = 0;
+ gint _tmp51_ = 0;
+ gint _tmp52_ = 0;
+ PageView* _tmp53_ = NULL;
+ gint _tmp54_ = 0;
+ gint _tmp55_ = 0;
+ PageView* _tmp56_ = NULL;
+ gint _tmp57_ = 0;
+ PageView* _tmp58_ = NULL;
+ gint _tmp59_ = 0;
+#line 460 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp45_ = self->priv->drawing_area;
+#line 460 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp46_ = gtk_widget_get_style_context (_tmp45_);
+#line 460 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp47_ = context;
+#line 460 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp48_ = page;
+#line 460 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp49_ = page_view_get_x_offset (_tmp48_);
+#line 460 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp50_ = _tmp49_;
+#line 460 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp51_ = book_view_get_x_offset (self);
+#line 460 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp52_ = _tmp51_;
+#line 460 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp53_ = page;
+#line 460 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp54_ = page_view_get_y_offset (_tmp53_);
+#line 460 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp55_ = _tmp54_;
+#line 460 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp56_ = page;
+#line 460 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp57_ = page_view_get_width (_tmp56_);
+#line 460 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp58_ = page;
+#line 460 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp59_ = page_view_get_height (_tmp58_);
+#line 460 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ gtk_render_focus (_tmp46_, _tmp47_, (gdouble) (_tmp50_ - _tmp52_), (gdouble) _tmp55_, (gdouble) _tmp57_, (gdouble) _tmp59_);
+#line 2592 "book-view.c"
}
-#line 426 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 444 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_page_view_unref0 (page);
-#line 2563 "book-view.c"
+#line 2596 "book-view.c"
}
}
}
-#line 449 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 467 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
result = FALSE;
-#line 449 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 467 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
return result;
-#line 2571 "book-view.c"
+#line 2604 "book-view.c"
}
@@ -2575,748 +2608,779 @@ static PageView* book_view_get_page_at (BookView* self, gint x, gint y, gint* x_
gint _vala_x_ = 0;
gint _vala_y_ = 0;
PageView* result = NULL;
- gint _tmp0_;
-#line 452 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ gint _tmp0_ = 0;
+#line 470 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_return_val_if_fail (self != NULL, NULL);
-#line 454 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 472 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_vala_y_ = 0;
-#line 454 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 472 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp0_ = _vala_y_;
-#line 454 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 472 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_vala_x_ = _tmp0_;
-#line 2588 "book-view.c"
+#line 2621 "book-view.c"
{
- gint i;
-#line 455 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ gint i = 0;
+#line 473 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
i = 0;
-#line 2593 "book-view.c"
+#line 2626 "book-view.c"
{
- gboolean _tmp1_;
-#line 455 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ gboolean _tmp1_ = FALSE;
+#line 473 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp1_ = TRUE;
-#line 455 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 473 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
while (TRUE) {
-#line 2600 "book-view.c"
- gboolean _tmp2_;
- gint _tmp4_;
- Book* _tmp5_;
+#line 2633 "book-view.c"
+ gboolean _tmp2_ = FALSE;
+ gint _tmp4_ = 0;
+ Book* _tmp5_ = NULL;
guint _tmp6_ = 0U;
- gint _tmp7_;
- PageView* _tmp8_ = NULL;
- PageView* page;
- PageView* _tmp9_;
- gint _tmp10_ = 0;
- gint left;
- gint _tmp11_;
- PageView* _tmp12_;
+ guint _tmp7_ = 0U;
+ PageView* page = NULL;
+ gint _tmp8_ = 0;
+ PageView* _tmp9_ = NULL;
+ gint left = 0;
+ PageView* _tmp10_ = NULL;
+ gint _tmp11_ = 0;
+ gint _tmp12_ = 0;
+ gint right = 0;
gint _tmp13_ = 0;
- gint right;
- PageView* _tmp14_;
+ PageView* _tmp14_ = NULL;
gint _tmp15_ = 0;
- gint top;
- gint _tmp16_;
- PageView* _tmp17_;
+ gint top = 0;
+ PageView* _tmp16_ = NULL;
+ gint _tmp17_ = 0;
gint _tmp18_ = 0;
- gint bottom;
- gboolean _tmp19_ = FALSE;
- gboolean _tmp20_ = FALSE;
- gboolean _tmp21_ = FALSE;
- gint _tmp22_;
- gint _tmp23_;
- gboolean _tmp26_;
- gboolean _tmp29_;
- gboolean _tmp32_;
-#line 455 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ gint bottom = 0;
+ gint _tmp19_ = 0;
+ PageView* _tmp20_ = NULL;
+ gint _tmp21_ = 0;
+ gboolean _tmp22_ = FALSE;
+ gboolean _tmp23_ = FALSE;
+ gboolean _tmp24_ = FALSE;
+ gint _tmp25_ = 0;
+ gint _tmp26_ = 0;
+ gboolean _tmp29_ = FALSE;
+ gboolean _tmp32_ = FALSE;
+ gboolean _tmp35_ = FALSE;
+#line 473 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp2_ = _tmp1_;
-#line 455 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 473 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
if (!_tmp2_) {
-#line 2634 "book-view.c"
- gint _tmp3_;
-#line 455 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 2670 "book-view.c"
+ gint _tmp3_ = 0;
+#line 473 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp3_ = i;
-#line 455 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 473 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
i = _tmp3_ + 1;
-#line 2640 "book-view.c"
+#line 2676 "book-view.c"
}
-#line 455 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 473 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp1_ = FALSE;
-#line 455 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 473 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp4_ = i;
-#line 455 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp5_ = self->priv->book;
-#line 455 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 473 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp5_ = self->priv->_book;
+#line 473 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp6_ = book_get_n_pages (_tmp5_);
-#line 455 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- if (!(((guint) _tmp4_) < _tmp6_)) {
-#line 455 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 473 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp7_ = _tmp6_;
+#line 473 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (!(((guint) _tmp4_) < _tmp7_)) {
+#line 473 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
break;
-#line 2654 "book-view.c"
+#line 2692 "book-view.c"
}
-#line 457 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp7_ = i;
-#line 457 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp8_ = book_view_get_nth_page (self, _tmp7_);
-#line 457 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- page = _tmp8_;
-#line 458 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp9_ = page;
-#line 458 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp10_ = page_view_get_x_offset (_tmp9_);
-#line 458 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- left = _tmp10_;
-#line 459 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp11_ = left;
-#line 459 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp12_ = page;
-#line 459 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp13_ = page_view_get_width (_tmp12_);
-#line 459 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- right = _tmp11_ + _tmp13_;
-#line 460 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 475 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp8_ = i;
+#line 475 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp9_ = book_view_get_nth_page (self, _tmp8_);
+#line 475 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ page = _tmp9_;
+#line 476 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp10_ = page;
+#line 476 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp11_ = page_view_get_x_offset (_tmp10_);
+#line 476 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp12_ = _tmp11_;
+#line 476 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ left = _tmp12_;
+#line 477 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp13_ = left;
+#line 477 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp14_ = page;
-#line 460 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp15_ = page_view_get_y_offset (_tmp14_);
-#line 460 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- top = _tmp15_;
-#line 461 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp16_ = top;
-#line 461 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp17_ = page;
-#line 461 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp18_ = page_view_get_height (_tmp17_);
-#line 461 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- bottom = _tmp16_ + _tmp18_;
-#line 462 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp22_ = x;
-#line 462 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp23_ = left;
-#line 462 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- if (_tmp22_ >= _tmp23_) {
-#line 2696 "book-view.c"
- gint _tmp24_;
- gint _tmp25_;
-#line 462 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp24_ = x;
-#line 462 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp25_ = right;
-#line 462 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp21_ = _tmp24_ <= _tmp25_;
-#line 2705 "book-view.c"
- } else {
-#line 462 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp21_ = FALSE;
-#line 2709 "book-view.c"
- }
-#line 462 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp26_ = _tmp21_;
-#line 462 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- if (_tmp26_) {
-#line 2715 "book-view.c"
- gint _tmp27_;
- gint _tmp28_;
-#line 462 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp27_ = y;
-#line 462 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp28_ = top;
-#line 462 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp20_ = _tmp27_ >= _tmp28_;
-#line 2724 "book-view.c"
+#line 477 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp15_ = page_view_get_width (_tmp14_);
+#line 477 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ right = _tmp13_ + _tmp15_;
+#line 478 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp16_ = page;
+#line 478 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp17_ = page_view_get_y_offset (_tmp16_);
+#line 478 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp18_ = _tmp17_;
+#line 478 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ top = _tmp18_;
+#line 479 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp19_ = top;
+#line 479 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp20_ = page;
+#line 479 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp21_ = page_view_get_height (_tmp20_);
+#line 479 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ bottom = _tmp19_ + _tmp21_;
+#line 480 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp25_ = x;
+#line 480 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp26_ = left;
+#line 480 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp25_ >= _tmp26_) {
+#line 2738 "book-view.c"
+ gint _tmp27_ = 0;
+ gint _tmp28_ = 0;
+#line 480 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp27_ = x;
+#line 480 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp28_ = right;
+#line 480 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp24_ = _tmp27_ <= _tmp28_;
+#line 2747 "book-view.c"
} else {
-#line 462 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp20_ = FALSE;
-#line 2728 "book-view.c"
+#line 480 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp24_ = FALSE;
+#line 2751 "book-view.c"
}
-#line 462 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp29_ = _tmp20_;
-#line 462 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 480 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp29_ = _tmp24_;
+#line 480 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
if (_tmp29_) {
-#line 2734 "book-view.c"
- gint _tmp30_;
- gint _tmp31_;
-#line 462 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 2757 "book-view.c"
+ gint _tmp30_ = 0;
+ gint _tmp31_ = 0;
+#line 480 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp30_ = y;
-#line 462 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp31_ = bottom;
-#line 462 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp19_ = _tmp30_ <= _tmp31_;
-#line 2743 "book-view.c"
+#line 480 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp31_ = top;
+#line 480 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp23_ = _tmp30_ >= _tmp31_;
+#line 2766 "book-view.c"
} else {
-#line 462 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp19_ = FALSE;
-#line 2747 "book-view.c"
+#line 480 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp23_ = FALSE;
+#line 2770 "book-view.c"
}
-#line 462 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp32_ = _tmp19_;
-#line 462 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 480 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp32_ = _tmp23_;
+#line 480 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
if (_tmp32_) {
-#line 2753 "book-view.c"
- gint _tmp33_;
- gint _tmp34_;
- gint _tmp35_;
- gint _tmp36_;
-#line 464 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp33_ = x;
-#line 464 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp34_ = left;
-#line 464 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _vala_x_ = _tmp33_ - _tmp34_;
-#line 465 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp35_ = y;
-#line 465 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp36_ = top;
-#line 465 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _vala_y_ = _tmp35_ - _tmp36_;
-#line 466 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 2776 "book-view.c"
+ gint _tmp33_ = 0;
+ gint _tmp34_ = 0;
+#line 480 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp33_ = y;
+#line 480 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp34_ = bottom;
+#line 480 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp22_ = _tmp33_ <= _tmp34_;
+#line 2785 "book-view.c"
+ } else {
+#line 480 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp22_ = FALSE;
+#line 2789 "book-view.c"
+ }
+#line 480 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp35_ = _tmp22_;
+#line 480 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp35_) {
+#line 2795 "book-view.c"
+ gint _tmp36_ = 0;
+ gint _tmp37_ = 0;
+ gint _tmp38_ = 0;
+ gint _tmp39_ = 0;
+#line 482 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp36_ = x;
+#line 482 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp37_ = left;
+#line 482 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _vala_x_ = _tmp36_ - _tmp37_;
+#line 483 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp38_ = y;
+#line 483 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp39_ = top;
+#line 483 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _vala_y_ = _tmp38_ - _tmp39_;
+#line 484 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
result = page;
-#line 466 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 484 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
if (x_) {
-#line 466 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 484 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
*x_ = _vala_x_;
-#line 2776 "book-view.c"
+#line 2818 "book-view.c"
}
-#line 466 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 484 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
if (y_) {
-#line 466 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 484 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
*y_ = _vala_y_;
-#line 2782 "book-view.c"
+#line 2824 "book-view.c"
}
-#line 466 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 484 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
return result;
-#line 2786 "book-view.c"
+#line 2828 "book-view.c"
}
-#line 455 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 473 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_page_view_unref0 (page);
-#line 2790 "book-view.c"
+#line 2832 "book-view.c"
}
}
}
-#line 470 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 488 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
result = NULL;
-#line 470 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 488 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
if (x_) {
-#line 470 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 488 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
*x_ = _vala_x_;
-#line 2800 "book-view.c"
+#line 2842 "book-view.c"
}
-#line 470 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 488 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
if (y_) {
-#line 470 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 488 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
*y_ = _vala_y_;
-#line 2806 "book-view.c"
+#line 2848 "book-view.c"
}
-#line 470 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 488 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
return result;
-#line 2810 "book-view.c"
+#line 2852 "book-view.c"
}
static gboolean book_view_button_cb (BookView* self, GtkWidget* widget, GdkEventButton* event) {
gboolean result = FALSE;
- GtkWidget* _tmp0_;
- gint x;
- gint y;
- GdkEventButton _tmp1_;
- GdkEventType _tmp2_;
- PageView* _tmp12_;
- GdkEventButton _tmp13_;
- guint _tmp14_;
- GdkEventButton _tmp29_;
- guint _tmp30_;
-#line 473 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ GtkWidget* _tmp0_ = NULL;
+ gint x = 0;
+ gint y = 0;
+ GdkEventButton _tmp1_ = {0};
+ GdkEventType _tmp2_ = 0;
+ PageView* _tmp13_ = NULL;
+ GdkEventButton _tmp14_ = {0};
+ guint _tmp15_ = 0U;
+ GdkEventButton _tmp30_ = {0};
+ guint _tmp31_ = 0U;
+#line 491 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_return_val_if_fail (self != NULL, FALSE);
-#line 473 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 491 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_return_val_if_fail (widget != NULL, FALSE);
-#line 473 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 491 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_return_val_if_fail (event != NULL, FALSE);
-#line 475 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 493 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
book_view_layout (self);
-#line 477 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 495 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp0_ = self->priv->drawing_area;
-#line 477 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 495 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
gtk_widget_grab_focus (_tmp0_);
-#line 479 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 497 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
x = 0;
-#line 479 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 497 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
y = 0;
-#line 480 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 498 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp1_ = *event;
-#line 480 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 498 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp2_ = _tmp1_.type;
-#line 480 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 498 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
if (_tmp2_ == GDK_BUTTON_PRESS) {
-#line 2848 "book-view.c"
- GdkEventButton _tmp3_;
- gdouble _tmp4_;
+#line 2890 "book-view.c"
+ GdkEventButton _tmp3_ = {0};
+ gdouble _tmp4_ = 0.0;
gint _tmp5_ = 0;
- GdkEventButton _tmp6_;
- gdouble _tmp7_;
- gint _tmp8_ = 0;
+ gint _tmp6_ = 0;
+ GdkEventButton _tmp7_ = {0};
+ gdouble _tmp8_ = 0.0;
gint _tmp9_ = 0;
- PageView* _tmp10_ = NULL;
- PageView* _tmp11_;
-#line 481 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ gint _tmp10_ = 0;
+ PageView* _tmp11_ = NULL;
+ PageView* _tmp12_ = NULL;
+#line 499 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp3_ = *event;
-#line 481 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 499 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp4_ = _tmp3_.x;
-#line 481 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 499 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp5_ = book_view_get_x_offset (self);
-#line 481 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp6_ = *event;
-#line 481 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp7_ = _tmp6_.y;
-#line 481 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp10_ = book_view_get_page_at (self, (gint) (_tmp4_ + _tmp5_), (gint) _tmp7_, &_tmp8_, &_tmp9_);
-#line 481 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- x = _tmp8_;
-#line 481 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- y = _tmp9_;
-#line 481 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp11_ = _tmp10_;
-#line 481 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- book_view_select_page_view (self, _tmp11_);
-#line 481 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _page_view_unref0 (_tmp11_);
-#line 2880 "book-view.c"
+#line 499 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp6_ = _tmp5_;
+#line 499 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp7_ = *event;
+#line 499 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp8_ = _tmp7_.y;
+#line 499 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp11_ = book_view_get_page_at (self, (gint) (_tmp4_ + _tmp6_), (gint) _tmp8_, &_tmp9_, &_tmp10_);
+#line 499 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ x = _tmp9_;
+#line 499 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ y = _tmp10_;
+#line 499 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp12_ = _tmp11_;
+#line 499 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ book_view_select_page_view (self, _tmp12_);
+#line 499 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _page_view_unref0 (_tmp12_);
+#line 2925 "book-view.c"
}
-#line 483 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp12_ = self->priv->selected_page;
-#line 483 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- if (_tmp12_ == NULL) {
-#line 484 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 501 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp13_ = self->priv->selected_page_view;
+#line 501 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp13_ == NULL) {
+#line 502 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
result = FALSE;
-#line 484 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 502 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
return result;
-#line 2890 "book-view.c"
+#line 2935 "book-view.c"
}
-#line 487 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp13_ = *event;
-#line 487 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp14_ = _tmp13_.button;
-#line 487 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- if (_tmp14_ == ((guint) 1)) {
-#line 2898 "book-view.c"
- GdkEventButton _tmp15_;
- GdkEventType _tmp16_;
-#line 489 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp15_ = *event;
-#line 489 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp16_ = _tmp15_.type;
-#line 489 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- if (_tmp16_ == GDK_BUTTON_PRESS) {
-#line 2907 "book-view.c"
- PageView* _tmp17_;
- gint _tmp18_;
- gint _tmp19_;
-#line 490 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp17_ = self->priv->selected_page;
-#line 490 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp18_ = x;
-#line 490 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp19_ = y;
-#line 490 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- page_view_button_press (_tmp17_, _tmp18_, _tmp19_);
-#line 2919 "book-view.c"
+#line 505 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp14_ = *event;
+#line 505 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp15_ = _tmp14_.button;
+#line 505 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp15_ == ((guint) 1)) {
+#line 2943 "book-view.c"
+ GdkEventButton _tmp16_ = {0};
+ GdkEventType _tmp17_ = 0;
+#line 507 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp16_ = *event;
+#line 507 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp17_ = _tmp16_.type;
+#line 507 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp17_ == GDK_BUTTON_PRESS) {
+#line 2952 "book-view.c"
+ PageView* _tmp18_ = NULL;
+ gint _tmp19_ = 0;
+ gint _tmp20_ = 0;
+#line 508 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp18_ = self->priv->selected_page_view;
+#line 508 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp19_ = x;
+#line 508 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp20_ = y;
+#line 508 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ page_view_button_press (_tmp18_, _tmp19_, _tmp20_);
+#line 2964 "book-view.c"
} else {
- GdkEventButton _tmp20_;
- GdkEventType _tmp21_;
-#line 491 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp20_ = *event;
-#line 491 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp21_ = _tmp20_.type;
-#line 491 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- if (_tmp21_ == GDK_BUTTON_RELEASE) {
-#line 2929 "book-view.c"
- PageView* _tmp22_;
- gint _tmp23_;
- gint _tmp24_;
-#line 492 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp22_ = self->priv->selected_page;
-#line 492 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp23_ = x;
-#line 492 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp24_ = y;
-#line 492 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- page_view_button_release (_tmp22_, _tmp23_, _tmp24_);
-#line 2941 "book-view.c"
+ GdkEventButton _tmp21_ = {0};
+ GdkEventType _tmp22_ = 0;
+#line 509 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp21_ = *event;
+#line 509 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp22_ = _tmp21_.type;
+#line 509 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp22_ == GDK_BUTTON_RELEASE) {
+#line 2974 "book-view.c"
+ PageView* _tmp23_ = NULL;
+ gint _tmp24_ = 0;
+ gint _tmp25_ = 0;
+#line 510 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp23_ = self->priv->selected_page_view;
+#line 510 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp24_ = x;
+#line 510 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp25_ = y;
+#line 510 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ page_view_button_release (_tmp23_, _tmp24_, _tmp25_);
+#line 2986 "book-view.c"
} else {
- GdkEventButton _tmp25_;
- GdkEventType _tmp26_;
-#line 493 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp25_ = *event;
-#line 493 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp26_ = _tmp25_.type;
-#line 493 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- if (_tmp26_ == GDK_2BUTTON_PRESS) {
-#line 2951 "book-view.c"
- Page* _tmp27_ = NULL;
- Page* _tmp28_;
-#line 494 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp27_ = book_view_get_selected (self);
-#line 494 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp28_ = _tmp27_;
-#line 494 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- g_signal_emit_by_name (self, "show-page", _tmp28_);
-#line 494 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _page_unref0 (_tmp28_);
-#line 2962 "book-view.c"
+ GdkEventButton _tmp26_ = {0};
+ GdkEventType _tmp27_ = 0;
+#line 511 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp26_ = *event;
+#line 511 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp27_ = _tmp26_.type;
+#line 511 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp27_ == GDK_2BUTTON_PRESS) {
+#line 2996 "book-view.c"
+ Page* _tmp28_ = NULL;
+ Page* _tmp29_ = NULL;
+#line 512 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp28_ = book_view_get_selected_page (self);
+#line 512 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp29_ = _tmp28_;
+#line 512 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_signal_emit_by_name (self, "show-page", _tmp29_);
+#line 3005 "book-view.c"
}
}
}
}
-#line 498 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp29_ = *event;
-#line 498 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp30_ = _tmp29_.button;
-#line 498 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- if (_tmp30_ == ((guint) 3)) {
-#line 499 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 516 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp30_ = *event;
+#line 516 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp31_ = _tmp30_.button;
+#line 516 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp31_ == ((guint) 3)) {
+#line 517 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_signal_emit_by_name (self, "show-menu");
-#line 2975 "book-view.c"
+#line 3018 "book-view.c"
}
-#line 501 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 519 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
result = FALSE;
-#line 501 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 519 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
return result;
-#line 2981 "book-view.c"
+#line 3024 "book-view.c"
}
static void book_view_set_cursor (BookView* self, GdkCursorType cursor) {
GdkCursor* c = NULL;
- GdkCursorType _tmp0_;
- GdkCursorType _tmp1_;
- GdkCursorType _tmp2_;
- GdkCursorType _tmp3_;
- GdkCursor* _tmp4_;
- GtkWidget* _tmp5_;
+ GdkCursorType _tmp0_ = 0;
+ GdkCursorType _tmp1_ = 0;
+ GdkCursorType _tmp2_ = 0;
+ GdkCursorType _tmp3_ = 0;
+ GdkCursor* _tmp4_ = NULL;
+ GtkWidget* _tmp5_ = NULL;
GdkWindow* _tmp6_ = NULL;
- GdkCursor* _tmp7_;
-#line 504 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ GdkCursor* _tmp7_ = NULL;
+#line 522 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_return_if_fail (self != NULL);
-#line 508 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 526 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp0_ = self->priv->cursor;
-#line 508 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 526 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp1_ = cursor;
-#line 508 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 526 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
if (_tmp0_ == _tmp1_) {
-#line 509 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 527 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_g_object_unref0 (c);
-#line 509 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 527 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
return;
-#line 3007 "book-view.c"
+#line 3050 "book-view.c"
}
-#line 510 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 528 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp2_ = cursor;
-#line 510 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 528 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
self->priv->cursor = _tmp2_;
-#line 512 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 530 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp3_ = cursor;
-#line 512 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 530 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp4_ = gdk_cursor_new (_tmp3_);
-#line 512 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 530 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_g_object_unref0 (c);
-#line 512 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 530 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
c = _tmp4_;
-#line 513 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 531 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp5_ = self->priv->drawing_area;
-#line 513 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 531 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp6_ = gtk_widget_get_window (_tmp5_);
-#line 513 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 531 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp7_ = c;
-#line 513 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 531 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
gdk_window_set_cursor (_tmp6_, _tmp7_);
-#line 504 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 522 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_g_object_unref0 (c);
-#line 3031 "book-view.c"
+#line 3074 "book-view.c"
}
static gboolean book_view_motion_cb (BookView* self, GtkWidget* widget, GdkEventMotion* event) {
gboolean result = FALSE;
- GdkCursorType cursor;
+ GdkCursorType cursor = 0;
gboolean _tmp0_ = FALSE;
- PageView* _tmp1_;
- gboolean _tmp4_;
- GdkCursorType _tmp33_;
-#line 516 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ PageView* _tmp1_ = NULL;
+ gboolean _tmp4_ = FALSE;
+ GdkCursorType _tmp39_ = 0;
+#line 534 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_return_val_if_fail (self != NULL, FALSE);
-#line 516 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 534 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_return_val_if_fail (widget != NULL, FALSE);
-#line 516 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 534 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_return_val_if_fail (event != NULL, FALSE);
-#line 518 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 536 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
cursor = GDK_ARROW;
-#line 521 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp1_ = self->priv->selected_page;
-#line 521 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 539 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp1_ = self->priv->selected_page_view;
+#line 539 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
if (_tmp1_ != NULL) {
-#line 3054 "book-view.c"
- GdkEventMotion _tmp2_;
- GdkModifierType _tmp3_;
-#line 521 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 3097 "book-view.c"
+ GdkEventMotion _tmp2_ = {0};
+ GdkModifierType _tmp3_ = 0;
+#line 539 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp2_ = *event;
-#line 521 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 539 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp3_ = _tmp2_.state;
-#line 521 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 539 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp0_ = (_tmp3_ & GDK_BUTTON1_MASK) != 0;
-#line 3063 "book-view.c"
+#line 3106 "book-view.c"
} else {
-#line 521 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 539 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp0_ = FALSE;
-#line 3067 "book-view.c"
+#line 3110 "book-view.c"
}
-#line 521 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 539 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp4_ = _tmp0_;
-#line 521 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 539 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
if (_tmp4_) {
-#line 3073 "book-view.c"
- GdkEventMotion _tmp5_;
- gdouble _tmp6_;
+#line 3116 "book-view.c"
+ gint x = 0;
+ GdkEventMotion _tmp5_ = {0};
+ gdouble _tmp6_ = 0.0;
gint _tmp7_ = 0;
- PageView* _tmp8_;
- gint _tmp9_ = 0;
- gint x;
- GdkEventMotion _tmp10_;
- gdouble _tmp11_;
- PageView* _tmp12_;
- gint _tmp13_ = 0;
- gint y;
- PageView* _tmp14_;
- gint _tmp15_;
- gint _tmp16_;
- PageView* _tmp17_;
- GdkCursorType _tmp18_ = 0;
-#line 523 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ gint _tmp8_ = 0;
+ PageView* _tmp9_ = NULL;
+ gint _tmp10_ = 0;
+ gint _tmp11_ = 0;
+ gint y = 0;
+ GdkEventMotion _tmp12_ = {0};
+ gdouble _tmp13_ = 0.0;
+ PageView* _tmp14_ = NULL;
+ gint _tmp15_ = 0;
+ gint _tmp16_ = 0;
+ PageView* _tmp17_ = NULL;
+ gint _tmp18_ = 0;
+ gint _tmp19_ = 0;
+ PageView* _tmp20_ = NULL;
+ GdkCursorType _tmp21_ = 0;
+ GdkCursorType _tmp22_ = 0;
+#line 541 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp5_ = *event;
-#line 523 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 541 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp6_ = _tmp5_.x;
-#line 523 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 541 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp7_ = book_view_get_x_offset (self);
-#line 523 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp8_ = self->priv->selected_page;
-#line 523 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp9_ = page_view_get_x_offset (_tmp8_);
-#line 523 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- x = (gint) ((_tmp6_ + _tmp7_) - _tmp9_);
-#line 524 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp10_ = *event;
-#line 524 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp11_ = _tmp10_.y;
-#line 524 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp12_ = self->priv->selected_page;
-#line 524 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp13_ = page_view_get_y_offset (_tmp12_);
-#line 524 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- y = (gint) (_tmp11_ - _tmp13_);
-#line 525 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp14_ = self->priv->selected_page;
-#line 525 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp15_ = x;
-#line 525 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp16_ = y;
-#line 525 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- page_view_motion (_tmp14_, _tmp15_, _tmp16_);
-#line 526 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp17_ = self->priv->selected_page;
-#line 526 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp18_ = page_view_get_cursor (_tmp17_);
-#line 526 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- cursor = _tmp18_;
-#line 3126 "book-view.c"
+#line 541 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp8_ = _tmp7_;
+#line 541 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp9_ = self->priv->selected_page_view;
+#line 541 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp10_ = page_view_get_x_offset (_tmp9_);
+#line 541 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp11_ = _tmp10_;
+#line 541 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ x = (gint) ((_tmp6_ + _tmp8_) - _tmp11_);
+#line 542 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp12_ = *event;
+#line 542 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp13_ = _tmp12_.y;
+#line 542 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp14_ = self->priv->selected_page_view;
+#line 542 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp15_ = page_view_get_y_offset (_tmp14_);
+#line 542 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp16_ = _tmp15_;
+#line 542 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ y = (gint) (_tmp13_ - _tmp16_);
+#line 543 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp17_ = self->priv->selected_page_view;
+#line 543 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp18_ = x;
+#line 543 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp19_ = y;
+#line 543 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ page_view_motion (_tmp17_, _tmp18_, _tmp19_);
+#line 544 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp20_ = self->priv->selected_page_view;
+#line 544 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp21_ = page_view_get_cursor (_tmp20_);
+#line 544 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp22_ = _tmp21_;
+#line 544 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ cursor = _tmp22_;
+#line 3181 "book-view.c"
} else {
gint x = 0;
gint y = 0;
- GdkEventMotion _tmp19_;
- gdouble _tmp20_;
- gint _tmp21_ = 0;
- GdkEventMotion _tmp22_;
- gdouble _tmp23_;
- gint _tmp24_ = 0;
+ PageView* over_page = NULL;
+ GdkEventMotion _tmp23_ = {0};
+ gdouble _tmp24_ = 0.0;
gint _tmp25_ = 0;
- PageView* _tmp26_ = NULL;
- PageView* over_page;
- PageView* _tmp27_;
-#line 531 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp19_ = *event;
-#line 531 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp20_ = _tmp19_.x;
-#line 531 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp21_ = book_view_get_x_offset (self);
-#line 531 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp22_ = *event;
-#line 531 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp23_ = _tmp22_.y;
-#line 531 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp26_ = book_view_get_page_at (self, (gint) (_tmp20_ + _tmp21_), (gint) _tmp23_, &_tmp24_, &_tmp25_);
-#line 531 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- x = _tmp24_;
-#line 531 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- y = _tmp25_;
-#line 531 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- over_page = _tmp26_;
-#line 532 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp27_ = over_page;
-#line 532 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- if (_tmp27_ != NULL) {
-#line 3162 "book-view.c"
- PageView* _tmp28_;
- gint _tmp29_;
- gint _tmp30_;
- PageView* _tmp31_;
- GdkCursorType _tmp32_ = 0;
-#line 534 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp28_ = over_page;
-#line 534 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp29_ = x;
-#line 534 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp30_ = y;
-#line 534 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- page_view_motion (_tmp28_, _tmp29_, _tmp30_);
-#line 535 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp31_ = over_page;
-#line 535 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp32_ = page_view_get_cursor (_tmp31_);
-#line 535 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- cursor = _tmp32_;
-#line 3182 "book-view.c"
+ gint _tmp26_ = 0;
+ GdkEventMotion _tmp27_ = {0};
+ gdouble _tmp28_ = 0.0;
+ gint _tmp29_ = 0;
+ gint _tmp30_ = 0;
+ PageView* _tmp31_ = NULL;
+ PageView* _tmp32_ = NULL;
+#line 549 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp23_ = *event;
+#line 549 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp24_ = _tmp23_.x;
+#line 549 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp25_ = book_view_get_x_offset (self);
+#line 549 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp26_ = _tmp25_;
+#line 549 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp27_ = *event;
+#line 549 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp28_ = _tmp27_.y;
+#line 549 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp31_ = book_view_get_page_at (self, (gint) (_tmp24_ + _tmp26_), (gint) _tmp28_, &_tmp29_, &_tmp30_);
+#line 549 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ x = _tmp29_;
+#line 549 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ y = _tmp30_;
+#line 549 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ over_page = _tmp31_;
+#line 550 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp32_ = over_page;
+#line 550 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp32_ != NULL) {
+#line 3220 "book-view.c"
+ PageView* _tmp33_ = NULL;
+ gint _tmp34_ = 0;
+ gint _tmp35_ = 0;
+ PageView* _tmp36_ = NULL;
+ GdkCursorType _tmp37_ = 0;
+ GdkCursorType _tmp38_ = 0;
+#line 552 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp33_ = over_page;
+#line 552 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp34_ = x;
+#line 552 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp35_ = y;
+#line 552 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ page_view_motion (_tmp33_, _tmp34_, _tmp35_);
+#line 553 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp36_ = over_page;
+#line 553 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp37_ = page_view_get_cursor (_tmp36_);
+#line 553 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp38_ = _tmp37_;
+#line 553 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ cursor = _tmp38_;
+#line 3243 "book-view.c"
}
-#line 521 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 539 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_page_view_unref0 (over_page);
-#line 3186 "book-view.c"
+#line 3247 "book-view.c"
}
-#line 539 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp33_ = cursor;
-#line 539 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- book_view_set_cursor (self, _tmp33_);
-#line 541 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 557 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp39_ = cursor;
+#line 557 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ book_view_set_cursor (self, _tmp39_);
+#line 559 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
result = FALSE;
-#line 541 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 559 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
return result;
-#line 3196 "book-view.c"
+#line 3257 "book-view.c"
}
static gboolean book_view_key_cb (BookView* self, GtkWidget* widget, GdkEventKey* event) {
gboolean result = FALSE;
- GdkEventKey _tmp0_;
- guint _tmp1_;
-#line 544 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ GdkEventKey _tmp0_ = {0};
+ guint _tmp1_ = 0U;
+#line 562 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_return_val_if_fail (self != NULL, FALSE);
-#line 544 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 562 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_return_val_if_fail (widget != NULL, FALSE);
-#line 544 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 562 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_return_val_if_fail (event != NULL, FALSE);
-#line 546 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 564 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp0_ = *event;
-#line 546 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 564 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp1_ = _tmp0_.keyval;
-#line 546 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 564 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
switch (_tmp1_) {
-#line 546 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 564 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
case 0xff50:
-#line 3218 "book-view.c"
+#line 3279 "book-view.c"
{
- Book* _tmp2_;
+ Book* _tmp2_ = NULL;
Page* _tmp3_ = NULL;
- Page* _tmp4_;
-#line 549 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp2_ = self->priv->book;
-#line 549 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ Page* _tmp4_ = NULL;
+#line 567 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp2_ = self->priv->_book;
+#line 567 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp3_ = book_get_page (_tmp2_, 0);
-#line 549 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 567 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp4_ = _tmp3_;
-#line 549 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- book_view_select_page (self, _tmp4_);
-#line 549 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 567 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ book_view_set_selected_page (self, _tmp4_);
+#line 567 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_page_unref0 (_tmp4_);
-#line 550 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 568 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
result = TRUE;
-#line 550 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 568 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
return result;
-#line 3237 "book-view.c"
+#line 3298 "book-view.c"
}
-#line 546 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 564 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
case 0xff51:
-#line 3241 "book-view.c"
+#line 3302 "book-view.c"
{
- PageView* _tmp5_;
+ PageView* _tmp5_ = NULL;
PageView* _tmp6_ = NULL;
- PageView* _tmp7_;
-#line 552 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp5_ = self->priv->selected_page;
-#line 552 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ PageView* _tmp7_ = NULL;
+#line 570 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp5_ = self->priv->selected_page_view;
+#line 570 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp6_ = book_view_get_prev_page (self, _tmp5_);
-#line 552 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 570 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp7_ = _tmp6_;
-#line 552 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 570 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
book_view_select_page_view (self, _tmp7_);
-#line 552 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 570 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_page_view_unref0 (_tmp7_);
-#line 553 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 571 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
result = TRUE;
-#line 553 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 571 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
return result;
-#line 3260 "book-view.c"
+#line 3321 "book-view.c"
}
-#line 546 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 564 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
case 0xff53:
-#line 3264 "book-view.c"
+#line 3325 "book-view.c"
{
- PageView* _tmp8_;
+ PageView* _tmp8_ = NULL;
PageView* _tmp9_ = NULL;
- PageView* _tmp10_;
-#line 555 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp8_ = self->priv->selected_page;
-#line 555 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ PageView* _tmp10_ = NULL;
+#line 573 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp8_ = self->priv->selected_page_view;
+#line 573 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp9_ = book_view_get_next_page (self, _tmp8_);
-#line 555 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 573 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp10_ = _tmp9_;
-#line 555 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 573 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
book_view_select_page_view (self, _tmp10_);
-#line 555 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 573 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_page_view_unref0 (_tmp10_);
-#line 556 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 574 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
result = TRUE;
-#line 556 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 574 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
return result;
-#line 3283 "book-view.c"
+#line 3344 "book-view.c"
}
-#line 546 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 564 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
case 0xFF57:
-#line 3287 "book-view.c"
+#line 3348 "book-view.c"
{
- Book* _tmp11_;
- Book* _tmp12_;
+ Book* _tmp11_ = NULL;
+ Book* _tmp12_ = NULL;
guint _tmp13_ = 0U;
- Page* _tmp14_ = NULL;
- Page* _tmp15_;
-#line 558 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp11_ = self->priv->book;
-#line 558 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp12_ = self->priv->book;
-#line 558 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ guint _tmp14_ = 0U;
+ Page* _tmp15_ = NULL;
+ Page* _tmp16_ = NULL;
+#line 576 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp11_ = self->priv->_book;
+#line 576 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp12_ = self->priv->_book;
+#line 576 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp13_ = book_get_n_pages (_tmp12_);
-#line 558 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp14_ = book_get_page (_tmp11_, ((gint) _tmp13_) - 1);
-#line 558 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp15_ = _tmp14_;
-#line 558 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- book_view_select_page (self, _tmp15_);
-#line 558 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _page_unref0 (_tmp15_);
-#line 559 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 576 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp14_ = _tmp13_;
+#line 576 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp15_ = book_get_page (_tmp11_, ((gint) _tmp14_) - 1);
+#line 576 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp16_ = _tmp15_;
+#line 576 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ book_view_set_selected_page (self, _tmp16_);
+#line 576 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _page_unref0 (_tmp16_);
+#line 577 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
result = TRUE;
-#line 559 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 577 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
return result;
-#line 3312 "book-view.c"
+#line 3376 "book-view.c"
}
default:
{
-#line 562 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 580 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
result = FALSE;
-#line 562 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 580 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
return result;
-#line 3320 "book-view.c"
+#line 3384 "book-view.c"
}
}
}
@@ -3324,174 +3388,251 @@ static gboolean book_view_key_cb (BookView* self, GtkWidget* widget, GdkEventKey
static gboolean book_view_focus_cb (BookView* self, GtkWidget* widget, GdkEventFocus* event) {
gboolean result = FALSE;
- PageView* _tmp0_;
-#line 566 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ PageView* _tmp0_ = NULL;
+#line 584 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_return_val_if_fail (self != NULL, FALSE);
-#line 566 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 584 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_return_val_if_fail (widget != NULL, FALSE);
-#line 566 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 584 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_return_val_if_fail (event != NULL, FALSE);
-#line 568 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp0_ = self->priv->selected_page;
-#line 568 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- book_view_set_selected_page (self, _tmp0_);
-#line 569 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 586 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp0_ = self->priv->selected_page_view;
+#line 586 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ book_view_set_selected_page_view (self, _tmp0_);
+#line 587 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
result = FALSE;
-#line 569 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 587 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
return result;
-#line 3343 "book-view.c"
+#line 3407 "book-view.c"
}
static void book_view_scroll_cb (BookView* self, GtkAdjustment* adjustment) {
- gboolean _tmp0_;
-#line 572 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ gboolean _tmp0_ = FALSE;
+#line 590 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_return_if_fail (self != NULL);
-#line 572 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 590 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_return_if_fail (adjustment != NULL);
-#line 574 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 592 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp0_ = self->priv->laying_out;
-#line 574 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 592 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
if (!_tmp0_) {
-#line 575 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 593 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
book_view_redraw (self);
-#line 3359 "book-view.c"
+#line 3423 "book-view.c"
}
}
void book_view_redraw (BookView* self) {
- GtkWidget* _tmp0_;
-#line 578 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ GtkWidget* _tmp0_ = NULL;
+#line 596 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_return_if_fail (self != NULL);
-#line 580 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 598 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp0_ = self->priv->drawing_area;
-#line 580 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 598 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
gtk_widget_queue_draw (_tmp0_);
-#line 3372 "book-view.c"
-}
-
-
-void book_view_select_page (BookView* self, Page* page) {
- Page* _tmp0_ = NULL;
- Page* _tmp1_;
- Page* _tmp2_;
- gboolean _tmp3_;
- Page* _tmp4_;
-#line 583 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- g_return_if_fail (self != NULL);
-#line 585 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp0_ = book_view_get_selected (self);
-#line 585 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp1_ = _tmp0_;
-#line 585 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp2_ = page;
-#line 585 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp3_ = _tmp1_ == _tmp2_;
-#line 585 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _page_unref0 (_tmp1_);
-#line 585 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- if (_tmp3_) {
-#line 586 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- return;
-#line 3398 "book-view.c"
- }
-#line 588 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp4_ = page;
-#line 588 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- if (_tmp4_ != NULL) {
-#line 3404 "book-view.c"
- GHashTable* _tmp5_;
- Page* _tmp6_;
- gconstpointer _tmp7_ = NULL;
-#line 589 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp5_ = self->priv->page_data;
-#line 589 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp6_ = page;
-#line 589 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp7_ = g_hash_table_lookup (_tmp5_, _tmp6_);
-#line 589 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- book_view_select_page_view (self, (PageView*) _tmp7_);
-#line 3416 "book-view.c"
- } else {
-#line 591 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- book_view_select_page_view (self, NULL);
-#line 3420 "book-view.c"
- }
+#line 3436 "book-view.c"
}
void book_view_select_next_page (BookView* self) {
- PageView* _tmp0_;
+ PageView* _tmp0_ = NULL;
PageView* _tmp1_ = NULL;
- PageView* _tmp2_;
-#line 594 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ PageView* _tmp2_ = NULL;
+#line 601 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_return_if_fail (self != NULL);
-#line 596 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp0_ = self->priv->selected_page;
-#line 596 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 603 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp0_ = self->priv->selected_page_view;
+#line 603 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp1_ = book_view_get_next_page (self, _tmp0_);
-#line 596 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 603 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp2_ = _tmp1_;
-#line 596 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 603 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
book_view_select_page_view (self, _tmp2_);
-#line 596 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 603 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_page_view_unref0 (_tmp2_);
-#line 3441 "book-view.c"
+#line 3456 "book-view.c"
}
void book_view_select_prev_page (BookView* self) {
- PageView* _tmp0_;
+ PageView* _tmp0_ = NULL;
PageView* _tmp1_ = NULL;
- PageView* _tmp2_;
-#line 599 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ PageView* _tmp2_ = NULL;
+#line 606 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_return_if_fail (self != NULL);
-#line 601 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp0_ = self->priv->selected_page;
-#line 601 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp0_ = self->priv->selected_page_view;
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp1_ = book_view_get_prev_page (self, _tmp0_);
-#line 601 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp2_ = _tmp1_;
-#line 601 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
book_view_select_page_view (self, _tmp2_);
-#line 601 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 608 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_page_view_unref0 (_tmp2_);
-#line 3461 "book-view.c"
+#line 3476 "book-view.c"
}
-Page* book_view_get_selected (BookView* self) {
- Page* result = NULL;
- PageView* _tmp0_;
-#line 604 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+Book* book_view_get_book (BookView* self) {
+ Book* result;
+ Book* _tmp0_ = NULL;
+#line 18 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_return_val_if_fail (self != NULL, NULL);
-#line 606 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp0_ = self->priv->selected_page;
-#line 606 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 18 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp0_ = self->priv->_book;
+#line 18 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ result = _tmp0_;
+#line 18 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ return result;
+#line 3491 "book-view.c"
+}
+
+
+static gpointer _book_ref0 (gpointer self) {
+#line 18 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ return self ? book_ref (self) : NULL;
+#line 3498 "book-view.c"
+}
+
+
+static void book_view_set_book (BookView* self, Book* value) {
+ Book* _tmp0_ = NULL;
+ Book* _tmp1_ = NULL;
+#line 18 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_return_if_fail (self != NULL);
+#line 18 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp0_ = value;
+#line 18 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp1_ = _book_ref0 (_tmp0_);
+#line 18 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _book_unref0 (self->priv->_book);
+#line 18 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ self->priv->_book = _tmp1_;
+#line 18 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_object_notify ((GObject *) self, "book");
+#line 3517 "book-view.c"
+}
+
+
+Page* book_view_get_selected_page (BookView* self) {
+ Page* result;
+ PageView* _tmp0_ = NULL;
+#line 30 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_return_val_if_fail (self != NULL, NULL);
+#line 32 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp0_ = self->priv->selected_page_view;
+#line 32 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
if (_tmp0_ != NULL) {
-#line 3474 "book-view.c"
- PageView* _tmp1_;
+#line 3530 "book-view.c"
+ PageView* _tmp1_ = NULL;
Page* _tmp2_ = NULL;
-#line 607 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp1_ = self->priv->selected_page;
-#line 607 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ Page* _tmp3_ = NULL;
+#line 33 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp1_ = self->priv->selected_page_view;
+#line 33 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp2_ = page_view_get_page (_tmp1_);
-#line 607 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- result = _tmp2_;
-#line 607 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 33 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp3_ = _tmp2_;
+#line 33 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ result = _tmp3_;
+#line 33 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
return result;
-#line 3485 "book-view.c"
+#line 3544 "book-view.c"
} else {
-#line 609 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 35 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
result = NULL;
-#line 609 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 35 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
return result;
-#line 3491 "book-view.c"
+#line 3550 "book-view.c"
}
}
+void book_view_set_selected_page (BookView* self, Page* value) {
+ Page* _tmp0_ = NULL;
+ Page* _tmp1_ = NULL;
+ Page* _tmp2_ = NULL;
+ Page* _tmp3_ = NULL;
+#line 37 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_return_if_fail (self != NULL);
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp0_ = book_view_get_selected_page (self);
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp1_ = _tmp0_;
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp2_ = value;
+#line 39 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp1_ == _tmp2_) {
+#line 40 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ return;
+#line 3572 "book-view.c"
+ }
+#line 42 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp3_ = value;
+#line 42 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ if (_tmp3_ != NULL) {
+#line 3578 "book-view.c"
+ GHashTable* _tmp4_ = NULL;
+ Page* _tmp5_ = NULL;
+ gconstpointer _tmp6_ = NULL;
+#line 43 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp4_ = self->priv->page_data;
+#line 43 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp5_ = value;
+#line 43 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp6_ = g_hash_table_lookup (_tmp4_, _tmp5_);
+#line 43 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ book_view_select_page_view (self, (PageView*) _tmp6_);
+#line 3590 "book-view.c"
+ } else {
+#line 45 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ book_view_select_page_view (self, NULL);
+#line 3594 "book-view.c"
+ }
+#line 37 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_object_notify ((GObject *) self, "selected-page");
+#line 3598 "book-view.c"
+}
+
+
+gint book_view_get_x_offset (BookView* self) {
+ gint result;
+ GtkAdjustment* _tmp0_ = NULL;
+ gdouble _tmp1_ = 0.0;
+#line 64 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_return_val_if_fail (self != NULL, 0);
+#line 66 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp0_ = self->priv->adjustment;
+#line 66 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp1_ = gtk_adjustment_get_value (_tmp0_);
+#line 66 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ result = (gint) _tmp1_;
+#line 66 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ return result;
+#line 3616 "book-view.c"
+}
+
+
+void book_view_set_x_offset (BookView* self, gint value) {
+ GtkAdjustment* _tmp0_ = NULL;
+ gint _tmp1_ = 0;
+#line 68 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_return_if_fail (self != NULL);
+#line 70 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp0_ = self->priv->adjustment;
+#line 70 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp1_ = value;
+#line 70 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ gtk_adjustment_set_value (_tmp0_, (gdouble) _tmp1_);
+#line 68 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_object_notify ((GObject *) self, "x-offset");
+#line 3633 "book-view.c"
+}
+
+
static void g_cclosure_user_marshal_VOID__PAGE (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) {
typedef void (*GMarshalFunc_VOID__PAGE) (gpointer data1, gpointer arg_1, gpointer data2);
register GMarshalFunc_VOID__PAGE callback;
@@ -3507,19 +3648,19 @@ static void g_cclosure_user_marshal_VOID__PAGE (GClosure * closure, GValue * ret
data1 = closure->data;
#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
data2 = param_values->data[0].v_pointer;
-#line 3511 "book-view.c"
+#line 3652 "book-view.c"
} else {
#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
data1 = param_values->data[0].v_pointer;
#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
data2 = closure->data;
-#line 3517 "book-view.c"
+#line 3658 "book-view.c"
}
#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
callback = (GMarshalFunc_VOID__PAGE) (marshal_data ? marshal_data : cc->callback);
#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
callback (data1, value_get_page (param_values + 1), data2);
-#line 3523 "book-view.c"
+#line 3664 "book-view.c"
}
@@ -3529,14 +3670,24 @@ static void book_view_class_init (BookViewClass * klass) {
#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_type_class_add_private (klass, sizeof (BookViewPrivate));
#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ G_OBJECT_CLASS (klass)->get_property = _vala_book_view_get_property;
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ G_OBJECT_CLASS (klass)->set_property = _vala_book_view_set_property;
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
G_OBJECT_CLASS (klass)->finalize = book_view_finalize;
#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_object_class_install_property (G_OBJECT_CLASS (klass), BOOK_VIEW_BOOK, param_spec_book ("book", "book", "book", TYPE_BOOK, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_object_class_install_property (G_OBJECT_CLASS (klass), BOOK_VIEW_SELECTED_PAGE, param_spec_page ("selected-page", "selected-page", "selected-page", TYPE_PAGE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_object_class_install_property (G_OBJECT_CLASS (klass), BOOK_VIEW_X_OFFSET, g_param_spec_int ("x-offset", "x-offset", "x-offset", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_signal_new ("page_selected", TYPE_BOOK_VIEW, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__PAGE, G_TYPE_NONE, 1, TYPE_PAGE);
#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_signal_new ("show_page", TYPE_BOOK_VIEW, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__PAGE, G_TYPE_NONE, 1, TYPE_PAGE);
#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_signal_new ("show_menu", TYPE_BOOK_VIEW, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
-#line 3540 "book-view.c"
+#line 3691 "book-view.c"
}
@@ -3544,134 +3695,134 @@ static void book_view_instance_init (BookView * self) {
#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
self->priv = BOOK_VIEW_GET_PRIVATE (self);
#line 27 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- self->priv->selected_page = NULL;
-#line 3549 "book-view.c"
+ self->priv->selected_page_view = NULL;
+#line 3700 "book-view.c"
}
static void book_view_finalize (GObject* obj) {
BookView * self;
- Book* _tmp0_;
+ Book* _tmp0_ = NULL;
guint _tmp1_ = 0U;
- Book* _tmp2_;
+ Book* _tmp2_ = NULL;
guint _tmp3_ = 0U;
- Book* _tmp4_;
+ Book* _tmp4_ = NULL;
guint _tmp5_ = 0U;
- Book* _tmp6_;
+ Book* _tmp6_ = NULL;
guint _tmp7_ = 0U;
- GtkWidget* _tmp8_;
+ GtkWidget* _tmp8_ = NULL;
guint _tmp9_ = 0U;
- GtkWidget* _tmp10_;
+ GtkWidget* _tmp10_ = NULL;
guint _tmp11_ = 0U;
- GtkWidget* _tmp12_;
+ GtkWidget* _tmp12_ = NULL;
guint _tmp13_ = 0U;
- GtkWidget* _tmp14_;
+ GtkWidget* _tmp14_ = NULL;
guint _tmp15_ = 0U;
- GtkWidget* _tmp16_;
+ GtkWidget* _tmp16_ = NULL;
guint _tmp17_ = 0U;
- GtkWidget* _tmp18_;
+ GtkWidget* _tmp18_ = NULL;
guint _tmp19_ = 0U;
- GtkWidget* _tmp20_;
+ GtkWidget* _tmp20_ = NULL;
guint _tmp21_ = 0U;
- GtkWidget* _tmp22_;
+ GtkWidget* _tmp22_ = NULL;
guint _tmp23_ = 0U;
- GtkAdjustment* _tmp24_;
+ GtkAdjustment* _tmp24_ = NULL;
guint _tmp25_ = 0U;
#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_BOOK_VIEW, BookView);
-#line 90 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp0_ = self->priv->book;
-#line 90 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 123 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp0_ = self->priv->_book;
+#line 123 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_signal_parse_name ("page-added", TYPE_BOOK, &_tmp1_, NULL, FALSE);
-#line 90 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 123 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _book_view_add_cb_book_page_added, self);
-#line 91 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp2_ = self->priv->book;
-#line 91 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 124 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp2_ = self->priv->_book;
+#line 124 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_signal_parse_name ("page-removed", TYPE_BOOK, &_tmp3_, NULL, FALSE);
-#line 91 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 124 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _book_view_remove_cb_book_page_removed, self);
-#line 92 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp4_ = self->priv->book;
-#line 92 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 125 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp4_ = self->priv->_book;
+#line 125 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_signal_parse_name ("reordered", TYPE_BOOK, &_tmp5_, NULL, FALSE);
-#line 92 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 125 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_signal_handlers_disconnect_matched (_tmp4_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp5_, 0, NULL, (GCallback) _book_view_reorder_cb_book_reordered, self);
-#line 93 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _tmp6_ = self->priv->book;
-#line 93 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 126 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _tmp6_ = self->priv->_book;
+#line 126 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_signal_parse_name ("cleared", TYPE_BOOK, &_tmp7_, NULL, FALSE);
-#line 93 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 126 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_signal_handlers_disconnect_matched (_tmp6_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp7_, 0, NULL, (GCallback) _book_view_clear_cb_book_cleared, self);
-#line 94 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 127 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp8_ = self->priv->drawing_area;
-#line 94 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 127 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_signal_parse_name ("configure-event", GTK_TYPE_WIDGET, &_tmp9_, NULL, FALSE);
-#line 94 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 127 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_signal_handlers_disconnect_matched (_tmp8_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp9_, 0, NULL, (GCallback) _book_view_configure_cb_gtk_widget_configure_event, self);
-#line 95 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 128 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp10_ = self->priv->drawing_area;
-#line 95 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 128 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_signal_parse_name ("draw", GTK_TYPE_WIDGET, &_tmp11_, NULL, FALSE);
-#line 95 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 128 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_signal_handlers_disconnect_matched (_tmp10_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp11_, 0, NULL, (GCallback) _book_view_draw_cb_gtk_widget_draw, self);
-#line 96 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 129 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp12_ = self->priv->drawing_area;
-#line 96 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 129 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_signal_parse_name ("motion-notify-event", GTK_TYPE_WIDGET, &_tmp13_, NULL, FALSE);
-#line 96 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 129 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_signal_handlers_disconnect_matched (_tmp12_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp13_, 0, NULL, (GCallback) _book_view_motion_cb_gtk_widget_motion_notify_event, self);
-#line 97 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 130 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp14_ = self->priv->drawing_area;
-#line 97 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 130 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_signal_parse_name ("key-press-event", GTK_TYPE_WIDGET, &_tmp15_, NULL, FALSE);
-#line 97 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 130 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_signal_handlers_disconnect_matched (_tmp14_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp15_, 0, NULL, (GCallback) _book_view_key_cb_gtk_widget_key_press_event, self);
-#line 98 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp16_ = self->priv->drawing_area;
-#line 98 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_signal_parse_name ("button-press-event", GTK_TYPE_WIDGET, &_tmp17_, NULL, FALSE);
-#line 98 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 131 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_signal_handlers_disconnect_matched (_tmp16_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp17_, 0, NULL, (GCallback) _book_view_button_cb_gtk_widget_button_press_event, self);
-#line 99 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 132 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp18_ = self->priv->drawing_area;
-#line 99 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 132 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_signal_parse_name ("button-release-event", GTK_TYPE_WIDGET, &_tmp19_, NULL, FALSE);
-#line 99 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 132 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_signal_handlers_disconnect_matched (_tmp18_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp19_, 0, NULL, (GCallback) _book_view_button_cb_gtk_widget_button_release_event, self);
-#line 100 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 133 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp20_ = self->priv->drawing_area;
-#line 100 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 133 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_signal_parse_name ("focus-in-event", GTK_TYPE_WIDGET, &_tmp21_, NULL, FALSE);
-#line 100 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 133 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_signal_handlers_disconnect_matched (_tmp20_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp21_, 0, NULL, (GCallback) _book_view_focus_cb_gtk_widget_focus_in_event, self);
-#line 101 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 134 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp22_ = self->priv->drawing_area;
-#line 101 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 134 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_signal_parse_name ("focus-out-event", GTK_TYPE_WIDGET, &_tmp23_, NULL, FALSE);
-#line 101 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 134 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_signal_handlers_disconnect_matched (_tmp22_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp23_, 0, NULL, (GCallback) _book_view_focus_cb_gtk_widget_focus_out_event, self);
-#line 102 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 135 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_tmp24_ = self->priv->adjustment;
-#line 102 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 135 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_signal_parse_name ("value-changed", GTK_TYPE_ADJUSTMENT, &_tmp25_, NULL, FALSE);
-#line 102 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 135 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
g_signal_handlers_disconnect_matched (_tmp24_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp25_, 0, NULL, (GCallback) _book_view_scroll_cb_gtk_adjustment_value_changed, self);
#line 18 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _book_unref0 (self->priv->book);
+ _book_unref0 (self->priv->_book);
#line 19 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_g_hash_table_unref0 (self->priv->page_data);
#line 27 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
- _page_view_unref0 (self->priv->selected_page);
-#line 30 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ _page_view_unref0 (self->priv->selected_page_view);
+#line 50 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_g_object_unref0 (self->priv->drawing_area);
-#line 33 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 53 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_g_object_unref0 (self->priv->scroll);
-#line 34 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+#line 54 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
_g_object_unref0 (self->priv->adjustment);
#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
G_OBJECT_CLASS (book_view_parent_class)->finalize (obj);
-#line 3675 "book-view.c"
+#line 3826 "book-view.c"
}
@@ -3680,11 +3831,79 @@ GType book_view_get_type (void) {
if (g_once_init_enter (&book_view_type_id__volatile)) {
static const GTypeInfo g_define_type_info = { sizeof (BookViewClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) book_view_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BookView), 0, (GInstanceInitFunc) book_view_instance_init, NULL };
GType book_view_type_id;
- book_view_type_id = g_type_register_static (GTK_TYPE_VBOX, "BookView", &g_define_type_info, 0);
+ book_view_type_id = g_type_register_static (GTK_TYPE_BOX, "BookView", &g_define_type_info, 0);
g_once_init_leave (&book_view_type_id__volatile, book_view_type_id);
}
return book_view_type_id__volatile;
}
+static void _vala_book_view_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
+ BookView * self;
+ self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_BOOK_VIEW, BookView);
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ switch (property_id) {
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ case BOOK_VIEW_BOOK:
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ value_set_book (value, book_view_get_book (self));
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ break;
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ case BOOK_VIEW_SELECTED_PAGE:
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ value_set_page (value, book_view_get_selected_page (self));
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ break;
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ case BOOK_VIEW_X_OFFSET:
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ g_value_set_int (value, book_view_get_x_offset (self));
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ break;
+#line 3865 "book-view.c"
+ default:
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ break;
+#line 3871 "book-view.c"
+ }
+}
+
+
+static void _vala_book_view_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
+ BookView * self;
+ self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_BOOK_VIEW, BookView);
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ switch (property_id) {
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ case BOOK_VIEW_BOOK:
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ book_view_set_book (self, value_get_book (value));
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ break;
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ case BOOK_VIEW_SELECTED_PAGE:
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ book_view_set_selected_page (self, value_get_page (value));
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ break;
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ case BOOK_VIEW_X_OFFSET:
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ book_view_set_x_offset (self, g_value_get_int (value));
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ break;
+#line 3899 "book-view.c"
+ default:
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+#line 15 "/home/bob/bzr/simple-scan/trunk/src/book-view.vala"
+ break;
+#line 3905 "book-view.c"
+ }
+}
+
+