summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlessio Treglia <alessio@debian.org>2012-04-04 21:01:18 +0200
committerAlessio Treglia <alessio@debian.org>2012-04-04 21:01:18 +0200
commit3423cc86f86a823a318ea72981dc8eb889fc7987 (patch)
tree01c27814a7d75d2b39c9ad1df8a730993496e3ec /src
parent7249c8ed3cb0da5185af4ecd2031c483bfc0258a (diff)
Imported Upstream version 3.4.0upstream/3.4.0
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.in172
-rw-r--r--src/book-view.c192
-rw-r--r--src/book-view.vala19
-rw-r--r--src/book.c1488
-rw-r--r--src/book.vala24
-rw-r--r--src/page-view.c4
-rw-r--r--src/page.c4
-rw-r--r--src/scanner.c984
-rw-r--r--src/scanner.vala5
-rw-r--r--src/simple-scan.c286
-rw-r--r--src/simple_scan_vala.stamp1
-rw-r--r--src/ui.c120
-rw-r--r--src/ui.vala3
13 files changed, 1760 insertions, 1542 deletions
diff --git a/src/Makefile.in b/src/Makefile.in
index 33521bc..de411ce 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.3 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -62,28 +62,28 @@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
-AM_V_lt = $(am__v_lt_$(V))
-am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-AM_V_CC = $(am__v_CC_$(V))
-am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
am__v_CC_0 = @echo " CC " $@;
-AM_V_at = $(am__v_at_$(V))
-am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-AM_V_CCLD = $(am__v_CCLD_$(V))
-am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo " CCLD " $@;
VALACOMPILE = $(VALAC) $(AM_VALAFLAGS) $(VALAFLAGS)
-AM_V_VALAC = $(am__v_VALAC_$(V))
-am__v_VALAC_ = $(am__v_VALAC_$(AM_DEFAULT_VERBOSITY))
+AM_V_VALAC = $(am__v_VALAC_@AM_V@)
+am__v_VALAC_ = $(am__v_VALAC_@AM_DEFAULT_V@)
am__v_VALAC_0 = @echo " VALAC " $@;
-AM_V_GEN = $(am__v_GEN_$(V))
-am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
SOURCES = $(simple_scan_SOURCES)
DIST_SOURCES = $(simple_scan_SOURCES)
@@ -110,8 +110,6 @@ DATADIRNAME = @DATADIRNAME@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DISABLE_DEPRECATED = @DISABLE_DEPRECATED@
-DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@
-DOC_USER_FORMATS = @DOC_USER_FORMATS@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
@@ -132,6 +130,11 @@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
INTLTOOL_MERGE = @INTLTOOL_MERGE@
INTLTOOL_PERL = @INTLTOOL_PERL@
INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
+INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
+INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
+INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
+ITSTOOL = @ITSTOOL@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
@@ -143,7 +146,6 @@ MKDIR_P = @MKDIR_P@
MSGFMT = @MSGFMT@
MSGMERGE = @MSGMERGE@
OBJEXT = @OBJEXT@
-OMF_DIR = @OMF_DIR@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
@@ -163,8 +165,8 @@ STRIP = @STRIP@
USE_NLS = @USE_NLS@
VALAC = @VALAC@
VERSION = @VERSION@
-WARN_CFLAGS = @WARN_CFLAGS@
XGETTEXT = @XGETTEXT@
+XMLLINT = @XMLLINT@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
@@ -189,6 +191,8 @@ htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
+intltool__v_merge_options_ = @intltool__v_merge_options_@
+intltool__v_merge_options_0 = @intltool__v_merge_options_0@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
@@ -320,7 +324,7 @@ uninstall-binPROGRAMS:
clean-binPROGRAMS:
-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
-simple-scan$(EXEEXT): $(simple_scan_OBJECTS) $(simple_scan_DEPENDENCIES)
+simple-scan$(EXEEXT): $(simple_scan_OBJECTS) $(simple_scan_DEPENDENCIES) $(EXTRA_simple_scan_DEPENDENCIES)
@rm -f simple-scan$(EXEEXT)
$(AM_V_CCLD)$(simple_scan_LINK) $(simple_scan_OBJECTS) $(simple_scan_LDADD) $(LIBS)
@@ -341,168 +345,153 @@ distclean-compile:
.c.o:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
.c.obj:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
simple_scan-book.o: book.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -MT simple_scan-book.o -MD -MP -MF $(DEPDIR)/simple_scan-book.Tpo -c -o simple_scan-book.o `test -f 'book.c' || echo '$(srcdir)/'`book.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/simple_scan-book.Tpo $(DEPDIR)/simple_scan-book.Po
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='book.c' object='simple_scan-book.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='book.c' object='simple_scan-book.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -c -o simple_scan-book.o `test -f 'book.c' || echo '$(srcdir)/'`book.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -c -o simple_scan-book.o `test -f 'book.c' || echo '$(srcdir)/'`book.c
simple_scan-book.obj: book.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -MT simple_scan-book.obj -MD -MP -MF $(DEPDIR)/simple_scan-book.Tpo -c -o simple_scan-book.obj `if test -f 'book.c'; then $(CYGPATH_W) 'book.c'; else $(CYGPATH_W) '$(srcdir)/book.c'; fi`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/simple_scan-book.Tpo $(DEPDIR)/simple_scan-book.Po
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='book.c' object='simple_scan-book.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='book.c' object='simple_scan-book.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -c -o simple_scan-book.obj `if test -f 'book.c'; then $(CYGPATH_W) 'book.c'; else $(CYGPATH_W) '$(srcdir)/book.c'; fi`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -c -o simple_scan-book.obj `if test -f 'book.c'; then $(CYGPATH_W) 'book.c'; else $(CYGPATH_W) '$(srcdir)/book.c'; fi`
simple_scan-book-view.o: book-view.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -MT simple_scan-book-view.o -MD -MP -MF $(DEPDIR)/simple_scan-book-view.Tpo -c -o simple_scan-book-view.o `test -f 'book-view.c' || echo '$(srcdir)/'`book-view.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/simple_scan-book-view.Tpo $(DEPDIR)/simple_scan-book-view.Po
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='book-view.c' object='simple_scan-book-view.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='book-view.c' object='simple_scan-book-view.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -c -o simple_scan-book-view.o `test -f 'book-view.c' || echo '$(srcdir)/'`book-view.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -c -o simple_scan-book-view.o `test -f 'book-view.c' || echo '$(srcdir)/'`book-view.c
simple_scan-book-view.obj: book-view.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -MT simple_scan-book-view.obj -MD -MP -MF $(DEPDIR)/simple_scan-book-view.Tpo -c -o simple_scan-book-view.obj `if test -f 'book-view.c'; then $(CYGPATH_W) 'book-view.c'; else $(CYGPATH_W) '$(srcdir)/book-view.c'; fi`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/simple_scan-book-view.Tpo $(DEPDIR)/simple_scan-book-view.Po
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='book-view.c' object='simple_scan-book-view.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='book-view.c' object='simple_scan-book-view.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -c -o simple_scan-book-view.obj `if test -f 'book-view.c'; then $(CYGPATH_W) 'book-view.c'; else $(CYGPATH_W) '$(srcdir)/book-view.c'; fi`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -c -o simple_scan-book-view.obj `if test -f 'book-view.c'; then $(CYGPATH_W) 'book-view.c'; else $(CYGPATH_W) '$(srcdir)/book-view.c'; fi`
simple_scan-page.o: page.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -MT simple_scan-page.o -MD -MP -MF $(DEPDIR)/simple_scan-page.Tpo -c -o simple_scan-page.o `test -f 'page.c' || echo '$(srcdir)/'`page.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/simple_scan-page.Tpo $(DEPDIR)/simple_scan-page.Po
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='page.c' object='simple_scan-page.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='page.c' object='simple_scan-page.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -c -o simple_scan-page.o `test -f 'page.c' || echo '$(srcdir)/'`page.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -c -o simple_scan-page.o `test -f 'page.c' || echo '$(srcdir)/'`page.c
simple_scan-page.obj: page.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -MT simple_scan-page.obj -MD -MP -MF $(DEPDIR)/simple_scan-page.Tpo -c -o simple_scan-page.obj `if test -f 'page.c'; then $(CYGPATH_W) 'page.c'; else $(CYGPATH_W) '$(srcdir)/page.c'; fi`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/simple_scan-page.Tpo $(DEPDIR)/simple_scan-page.Po
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='page.c' object='simple_scan-page.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='page.c' object='simple_scan-page.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -c -o simple_scan-page.obj `if test -f 'page.c'; then $(CYGPATH_W) 'page.c'; else $(CYGPATH_W) '$(srcdir)/page.c'; fi`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -c -o simple_scan-page.obj `if test -f 'page.c'; then $(CYGPATH_W) 'page.c'; else $(CYGPATH_W) '$(srcdir)/page.c'; fi`
simple_scan-page-view.o: page-view.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -MT simple_scan-page-view.o -MD -MP -MF $(DEPDIR)/simple_scan-page-view.Tpo -c -o simple_scan-page-view.o `test -f 'page-view.c' || echo '$(srcdir)/'`page-view.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/simple_scan-page-view.Tpo $(DEPDIR)/simple_scan-page-view.Po
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='page-view.c' object='simple_scan-page-view.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='page-view.c' object='simple_scan-page-view.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -c -o simple_scan-page-view.o `test -f 'page-view.c' || echo '$(srcdir)/'`page-view.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -c -o simple_scan-page-view.o `test -f 'page-view.c' || echo '$(srcdir)/'`page-view.c
simple_scan-page-view.obj: page-view.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -MT simple_scan-page-view.obj -MD -MP -MF $(DEPDIR)/simple_scan-page-view.Tpo -c -o simple_scan-page-view.obj `if test -f 'page-view.c'; then $(CYGPATH_W) 'page-view.c'; else $(CYGPATH_W) '$(srcdir)/page-view.c'; fi`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/simple_scan-page-view.Tpo $(DEPDIR)/simple_scan-page-view.Po
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='page-view.c' object='simple_scan-page-view.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='page-view.c' object='simple_scan-page-view.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -c -o simple_scan-page-view.obj `if test -f 'page-view.c'; then $(CYGPATH_W) 'page-view.c'; else $(CYGPATH_W) '$(srcdir)/page-view.c'; fi`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -c -o simple_scan-page-view.obj `if test -f 'page-view.c'; then $(CYGPATH_W) 'page-view.c'; else $(CYGPATH_W) '$(srcdir)/page-view.c'; fi`
simple_scan-simple-scan.o: simple-scan.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -MT simple_scan-simple-scan.o -MD -MP -MF $(DEPDIR)/simple_scan-simple-scan.Tpo -c -o simple_scan-simple-scan.o `test -f 'simple-scan.c' || echo '$(srcdir)/'`simple-scan.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/simple_scan-simple-scan.Tpo $(DEPDIR)/simple_scan-simple-scan.Po
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='simple-scan.c' object='simple_scan-simple-scan.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='simple-scan.c' object='simple_scan-simple-scan.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -c -o simple_scan-simple-scan.o `test -f 'simple-scan.c' || echo '$(srcdir)/'`simple-scan.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -c -o simple_scan-simple-scan.o `test -f 'simple-scan.c' || echo '$(srcdir)/'`simple-scan.c
simple_scan-simple-scan.obj: simple-scan.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -MT simple_scan-simple-scan.obj -MD -MP -MF $(DEPDIR)/simple_scan-simple-scan.Tpo -c -o simple_scan-simple-scan.obj `if test -f 'simple-scan.c'; then $(CYGPATH_W) 'simple-scan.c'; else $(CYGPATH_W) '$(srcdir)/simple-scan.c'; fi`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/simple_scan-simple-scan.Tpo $(DEPDIR)/simple_scan-simple-scan.Po
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='simple-scan.c' object='simple_scan-simple-scan.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='simple-scan.c' object='simple_scan-simple-scan.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -c -o simple_scan-simple-scan.obj `if test -f 'simple-scan.c'; then $(CYGPATH_W) 'simple-scan.c'; else $(CYGPATH_W) '$(srcdir)/simple-scan.c'; fi`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -c -o simple_scan-simple-scan.obj `if test -f 'simple-scan.c'; then $(CYGPATH_W) 'simple-scan.c'; else $(CYGPATH_W) '$(srcdir)/simple-scan.c'; fi`
simple_scan-scanner.o: scanner.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -MT simple_scan-scanner.o -MD -MP -MF $(DEPDIR)/simple_scan-scanner.Tpo -c -o simple_scan-scanner.o `test -f 'scanner.c' || echo '$(srcdir)/'`scanner.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/simple_scan-scanner.Tpo $(DEPDIR)/simple_scan-scanner.Po
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='scanner.c' object='simple_scan-scanner.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='scanner.c' object='simple_scan-scanner.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -c -o simple_scan-scanner.o `test -f 'scanner.c' || echo '$(srcdir)/'`scanner.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -c -o simple_scan-scanner.o `test -f 'scanner.c' || echo '$(srcdir)/'`scanner.c
simple_scan-scanner.obj: scanner.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -MT simple_scan-scanner.obj -MD -MP -MF $(DEPDIR)/simple_scan-scanner.Tpo -c -o simple_scan-scanner.obj `if test -f 'scanner.c'; then $(CYGPATH_W) 'scanner.c'; else $(CYGPATH_W) '$(srcdir)/scanner.c'; fi`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/simple_scan-scanner.Tpo $(DEPDIR)/simple_scan-scanner.Po
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='scanner.c' object='simple_scan-scanner.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='scanner.c' object='simple_scan-scanner.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -c -o simple_scan-scanner.obj `if test -f 'scanner.c'; then $(CYGPATH_W) 'scanner.c'; else $(CYGPATH_W) '$(srcdir)/scanner.c'; fi`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -c -o simple_scan-scanner.obj `if test -f 'scanner.c'; then $(CYGPATH_W) 'scanner.c'; else $(CYGPATH_W) '$(srcdir)/scanner.c'; fi`
simple_scan-ui.o: ui.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -MT simple_scan-ui.o -MD -MP -MF $(DEPDIR)/simple_scan-ui.Tpo -c -o simple_scan-ui.o `test -f 'ui.c' || echo '$(srcdir)/'`ui.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/simple_scan-ui.Tpo $(DEPDIR)/simple_scan-ui.Po
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ui.c' object='simple_scan-ui.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ui.c' object='simple_scan-ui.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -c -o simple_scan-ui.o `test -f 'ui.c' || echo '$(srcdir)/'`ui.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -c -o simple_scan-ui.o `test -f 'ui.c' || echo '$(srcdir)/'`ui.c
simple_scan-ui.obj: ui.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -MT simple_scan-ui.obj -MD -MP -MF $(DEPDIR)/simple_scan-ui.Tpo -c -o simple_scan-ui.obj `if test -f 'ui.c'; then $(CYGPATH_W) 'ui.c'; else $(CYGPATH_W) '$(srcdir)/ui.c'; fi`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/simple_scan-ui.Tpo $(DEPDIR)/simple_scan-ui.Po
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ui.c' object='simple_scan-ui.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ui.c' object='simple_scan-ui.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -c -o simple_scan-ui.obj `if test -f 'ui.c'; then $(CYGPATH_W) 'ui.c'; else $(CYGPATH_W) '$(srcdir)/ui.c'; fi`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(simple_scan_CFLAGS) $(CFLAGS) -c -o simple_scan-ui.obj `if test -f 'ui.c'; then $(CYGPATH_W) 'ui.c'; else $(CYGPATH_W) '$(srcdir)/ui.c'; fi`
$(srcdir)/book.c: $(srcdir)/simple_scan_vala.stamp
+ @if test -f $@; then :; else rm -f $(srcdir)/simple_scan_vala.stamp; fi
@if test -f $@; then :; else \
- rm -f $(srcdir)/simple_scan_vala.stamp; \
- $(am__cd) $(srcdir) && $(MAKE) $(AM_MAKEFLAGS) simple_scan_vala.stamp; \
+ $(MAKE) $(AM_MAKEFLAGS) $(srcdir)/simple_scan_vala.stamp; \
fi
$(srcdir)/book-view.c: $(srcdir)/simple_scan_vala.stamp
+ @if test -f $@; then :; else rm -f $(srcdir)/simple_scan_vala.stamp; fi
@if test -f $@; then :; else \
- rm -f $(srcdir)/simple_scan_vala.stamp; \
- $(am__cd) $(srcdir) && $(MAKE) $(AM_MAKEFLAGS) simple_scan_vala.stamp; \
+ $(MAKE) $(AM_MAKEFLAGS) $(srcdir)/simple_scan_vala.stamp; \
fi
$(srcdir)/page.c: $(srcdir)/simple_scan_vala.stamp
+ @if test -f $@; then :; else rm -f $(srcdir)/simple_scan_vala.stamp; fi
@if test -f $@; then :; else \
- rm -f $(srcdir)/simple_scan_vala.stamp; \
- $(am__cd) $(srcdir) && $(MAKE) $(AM_MAKEFLAGS) simple_scan_vala.stamp; \
+ $(MAKE) $(AM_MAKEFLAGS) $(srcdir)/simple_scan_vala.stamp; \
fi
$(srcdir)/page-view.c: $(srcdir)/simple_scan_vala.stamp
+ @if test -f $@; then :; else rm -f $(srcdir)/simple_scan_vala.stamp; fi
@if test -f $@; then :; else \
- rm -f $(srcdir)/simple_scan_vala.stamp; \
- $(am__cd) $(srcdir) && $(MAKE) $(AM_MAKEFLAGS) simple_scan_vala.stamp; \
+ $(MAKE) $(AM_MAKEFLAGS) $(srcdir)/simple_scan_vala.stamp; \
fi
$(srcdir)/simple-scan.c: $(srcdir)/simple_scan_vala.stamp
+ @if test -f $@; then :; else rm -f $(srcdir)/simple_scan_vala.stamp; fi
@if test -f $@; then :; else \
- rm -f $(srcdir)/simple_scan_vala.stamp; \
- $(am__cd) $(srcdir) && $(MAKE) $(AM_MAKEFLAGS) simple_scan_vala.stamp; \
+ $(MAKE) $(AM_MAKEFLAGS) $(srcdir)/simple_scan_vala.stamp; \
fi
$(srcdir)/scanner.c: $(srcdir)/simple_scan_vala.stamp
+ @if test -f $@; then :; else rm -f $(srcdir)/simple_scan_vala.stamp; fi
@if test -f $@; then :; else \
- rm -f $(srcdir)/simple_scan_vala.stamp; \
- $(am__cd) $(srcdir) && $(MAKE) $(AM_MAKEFLAGS) simple_scan_vala.stamp; \
+ $(MAKE) $(AM_MAKEFLAGS) $(srcdir)/simple_scan_vala.stamp; \
fi
$(srcdir)/ui.c: $(srcdir)/simple_scan_vala.stamp
+ @if test -f $@; then :; else rm -f $(srcdir)/simple_scan_vala.stamp; fi
@if test -f $@; then :; else \
- rm -f $(srcdir)/simple_scan_vala.stamp; \
- $(am__cd) $(srcdir) && $(MAKE) $(AM_MAKEFLAGS) simple_scan_vala.stamp; \
+ $(MAKE) $(AM_MAKEFLAGS) $(srcdir)/simple_scan_vala.stamp; \
fi
-simple_scan_vala.stamp: $(simple_scan_SOURCES)
- $(AM_V_VALAC)$(VALAC) $(simple_scan_VALAFLAGS) $(VALAFLAGS) -C $(simple_scan_SOURCES)
- $(AM_V_at)touch $@
+$(srcdir)/simple_scan_vala.stamp: $(simple_scan_SOURCES)
+ $(AM_V_at)rm -f $@ && echo stamp > $@-t
+ $(AM_V_VALAC)$(am__cd) $(srcdir) && $(VALAC) $(simple_scan_VALAFLAGS) $(VALAFLAGS) -C $(simple_scan_SOURCES)
+ $(AM_V_at)mv -f $@-t $@
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -603,10 +592,15 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
clean-generic:
diff --git a/src/book-view.c b/src/book-view.c
index d7d52e1..b2b33f9 100644
--- a/src/book-view.c
+++ b/src/book-view.c
@@ -1,4 +1,4 @@
-/* book-view.c generated by valac 0.14.0, the Vala compiler
+/* book-view.c generated by valac 0.15.2, the Vala compiler
* generated from book-view.vala, do not modify */
/*
@@ -86,7 +86,7 @@ struct _BookViewPrivate {
gboolean show_selected_page;
PageView* selected_page;
GtkWidget* drawing_area;
- GtkHScrollbar* scroll;
+ GtkScrollbar* scroll;
GtkAdjustment* adjustment;
GdkCursorType cursor;
};
@@ -318,12 +318,12 @@ BookView* book_view_construct (GType object_type, Book* book) {
GtkWidget* _tmp26_;
GtkWidget* _tmp27_;
GtkWidget* _tmp28_;
- GtkHScrollbar* _tmp29_;
- GtkHScrollbar* _tmp30_;
- GtkHScrollbar* _tmp31_;
+ GtkScrollbar* _tmp29_;
+ GtkScrollbar* _tmp30_;
+ GtkScrollbar* _tmp31_;
GtkAdjustment* _tmp32_ = NULL;
GtkAdjustment* _tmp33_;
- GtkHScrollbar* _tmp34_;
+ GtkScrollbar* _tmp34_;
GtkWidget* _tmp35_;
GtkWidget* _tmp36_;
GtkWidget* _tmp37_;
@@ -413,7 +413,7 @@ BookView* book_view_construct (GType object_type, Book* book) {
gtk_widget_set_events (_tmp27_, (gint) (((((GDK_POINTER_MOTION_MASK | GDK_BUTTON_PRESS_MASK) | GDK_BUTTON_RELEASE_MASK) | GDK_FOCUS_CHANGE_MASK) | GDK_STRUCTURE_MASK) | GDK_SCROLL_MASK));
_tmp28_ = self->priv->drawing_area;
gtk_box_pack_start ((GtkBox*) self, _tmp28_, TRUE, TRUE, (guint) 0);
- _tmp29_ = (GtkHScrollbar*) gtk_hscrollbar_new (NULL);
+ _tmp29_ = (GtkScrollbar*) gtk_scrollbar_new (GTK_ORIENTATION_HORIZONTAL, NULL);
_tmp30_ = g_object_ref_sink (_tmp29_);
_g_object_unref0 (self->priv->scroll);
self->priv->scroll = _tmp30_;
@@ -793,7 +793,7 @@ static void book_view_show_page_view (BookView* self, PageView* page) {
if (_tmp1_ == NULL) {
_tmp0_ = TRUE;
} else {
- GtkHScrollbar* _tmp2_;
+ GtkScrollbar* _tmp2_;
gboolean _tmp3_ = FALSE;
_tmp2_ = self->priv->scroll;
_tmp3_ = gtk_widget_get_visible ((GtkWidget*) _tmp2_);
@@ -1418,7 +1418,7 @@ static void book_view_layout (BookView* self) {
gboolean _tmp37_ = FALSE;
gboolean _tmp38_;
gboolean _tmp41_;
- GtkHScrollbar* _tmp43_;
+ GtkScrollbar* _tmp43_;
_tmp22_ = allocation;
_tmp23_ = _tmp22_.height;
height = _tmp23_;
@@ -1459,7 +1459,7 @@ static void book_view_layout (BookView* self) {
_tmp43_ = self->priv->scroll;
gtk_widget_show ((GtkWidget*) _tmp43_);
} else {
- GtkHScrollbar* _tmp44_;
+ GtkScrollbar* _tmp44_;
gint _tmp45_;
GtkAllocation _tmp46_;
gint _tmp47_;
@@ -1620,7 +1620,7 @@ static gboolean book_view_draw_cb (BookView* self, GtkWidget* widget, cairo_t* c
_tmp36_ = page_view_get_selected (_tmp35_);
if (_tmp36_) {
GtkWidget* _tmp37_;
- GtkStyle* _tmp38_ = NULL;
+ GtkStyleContext* _tmp38_ = NULL;
cairo_t* _tmp39_;
PageView* _tmp40_;
gint _tmp41_ = 0;
@@ -1632,7 +1632,7 @@ static gboolean book_view_draw_cb (BookView* self, GtkWidget* widget, cairo_t* c
PageView* _tmp47_;
gint _tmp48_ = 0;
_tmp37_ = self->priv->drawing_area;
- _tmp38_ = gtk_widget_get_style (_tmp37_);
+ _tmp38_ = gtk_widget_get_style_context (_tmp37_);
_tmp39_ = context;
_tmp40_ = page;
_tmp41_ = page_view_get_x_offset (_tmp40_);
@@ -1643,7 +1643,7 @@ static gboolean book_view_draw_cb (BookView* self, GtkWidget* widget, cairo_t* c
_tmp46_ = page_view_get_width (_tmp45_);
_tmp47_ = page;
_tmp48_ = page_view_get_height (_tmp47_);
- gtk_paint_focus (_tmp38_, _tmp39_, GTK_STATE_SELECTED, NULL, NULL, _tmp41_ - _tmp42_, _tmp44_, _tmp46_, _tmp48_);
+ gtk_render_focus (_tmp38_, _tmp39_, (gdouble) (_tmp41_ - _tmp42_), (gdouble) _tmp44_, (gdouble) _tmp46_, (gdouble) _tmp48_);
}
_page_view_unref0 (page);
}
@@ -1658,116 +1658,120 @@ 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_;
g_return_val_if_fail (self != NULL, NULL);
+ _vala_y_ = 0;
+ _tmp0_ = _vala_y_;
+ _vala_x_ = _tmp0_;
{
gint i;
i = 0;
{
- gboolean _tmp0_;
- _tmp0_ = TRUE;
+ gboolean _tmp1_;
+ _tmp1_ = TRUE;
while (TRUE) {
- gboolean _tmp1_;
- gint _tmp3_;
- Book* _tmp4_;
- guint _tmp5_ = 0U;
- gint _tmp6_;
- PageView* _tmp7_ = NULL;
+ gboolean _tmp2_;
+ gint _tmp4_;
+ Book* _tmp5_;
+ guint _tmp6_ = 0U;
+ gint _tmp7_;
+ PageView* _tmp8_ = NULL;
PageView* page;
- PageView* _tmp8_;
- gint _tmp9_ = 0;
+ PageView* _tmp9_;
+ gint _tmp10_ = 0;
gint left;
- gint _tmp10_;
- PageView* _tmp11_;
- gint _tmp12_ = 0;
+ gint _tmp11_;
+ PageView* _tmp12_;
+ gint _tmp13_ = 0;
gint right;
- PageView* _tmp13_;
- gint _tmp14_ = 0;
+ PageView* _tmp14_;
+ gint _tmp15_ = 0;
gint top;
- gint _tmp15_;
- PageView* _tmp16_;
- gint _tmp17_ = 0;
+ gint _tmp16_;
+ PageView* _tmp17_;
+ gint _tmp18_ = 0;
gint bottom;
- gboolean _tmp18_ = FALSE;
gboolean _tmp19_ = FALSE;
gboolean _tmp20_ = FALSE;
- gint _tmp21_;
+ gboolean _tmp21_ = FALSE;
gint _tmp22_;
- gboolean _tmp25_;
- gboolean _tmp28_;
- gboolean _tmp31_;
- _tmp1_ = _tmp0_;
- if (!_tmp1_) {
- gint _tmp2_;
- _tmp2_ = i;
- i = _tmp2_ + 1;
+ gint _tmp23_;
+ gboolean _tmp26_;
+ gboolean _tmp29_;
+ gboolean _tmp32_;
+ _tmp2_ = _tmp1_;
+ if (!_tmp2_) {
+ gint _tmp3_;
+ _tmp3_ = i;
+ i = _tmp3_ + 1;
}
- _tmp0_ = FALSE;
- _tmp3_ = i;
- _tmp4_ = self->priv->book;
- _tmp5_ = book_get_n_pages (_tmp4_);
- if (!(((guint) _tmp3_) < _tmp5_)) {
+ _tmp1_ = FALSE;
+ _tmp4_ = i;
+ _tmp5_ = self->priv->book;
+ _tmp6_ = book_get_n_pages (_tmp5_);
+ if (!(((guint) _tmp4_) < _tmp6_)) {
break;
}
- _tmp6_ = i;
- _tmp7_ = book_view_get_nth_page (self, _tmp6_);
- page = _tmp7_;
- _tmp8_ = page;
- _tmp9_ = page_view_get_x_offset (_tmp8_);
- left = _tmp9_;
- _tmp10_ = left;
- _tmp11_ = page;
- _tmp12_ = page_view_get_width (_tmp11_);
- right = _tmp10_ + _tmp12_;
- _tmp13_ = page;
- _tmp14_ = page_view_get_y_offset (_tmp13_);
- top = _tmp14_;
- _tmp15_ = top;
- _tmp16_ = page;
- _tmp17_ = page_view_get_height (_tmp16_);
- bottom = _tmp15_ + _tmp17_;
- _tmp21_ = x;
- _tmp22_ = left;
- if (_tmp21_ >= _tmp22_) {
- gint _tmp23_;
+ _tmp7_ = i;
+ _tmp8_ = book_view_get_nth_page (self, _tmp7_);
+ page = _tmp8_;
+ _tmp9_ = page;
+ _tmp10_ = page_view_get_x_offset (_tmp9_);
+ left = _tmp10_;
+ _tmp11_ = left;
+ _tmp12_ = page;
+ _tmp13_ = page_view_get_width (_tmp12_);
+ right = _tmp11_ + _tmp13_;
+ _tmp14_ = page;
+ _tmp15_ = page_view_get_y_offset (_tmp14_);
+ top = _tmp15_;
+ _tmp16_ = top;
+ _tmp17_ = page;
+ _tmp18_ = page_view_get_height (_tmp17_);
+ bottom = _tmp16_ + _tmp18_;
+ _tmp22_ = x;
+ _tmp23_ = left;
+ if (_tmp22_ >= _tmp23_) {
gint _tmp24_;
- _tmp23_ = x;
- _tmp24_ = right;
- _tmp20_ = _tmp23_ <= _tmp24_;
+ gint _tmp25_;
+ _tmp24_ = x;
+ _tmp25_ = right;
+ _tmp21_ = _tmp24_ <= _tmp25_;
} else {
- _tmp20_ = FALSE;
+ _tmp21_ = FALSE;
}
- _tmp25_ = _tmp20_;
- if (_tmp25_) {
- gint _tmp26_;
+ _tmp26_ = _tmp21_;
+ if (_tmp26_) {
gint _tmp27_;
- _tmp26_ = y;
- _tmp27_ = top;
- _tmp19_ = _tmp26_ >= _tmp27_;
+ gint _tmp28_;
+ _tmp27_ = y;
+ _tmp28_ = top;
+ _tmp20_ = _tmp27_ >= _tmp28_;
} else {
- _tmp19_ = FALSE;
+ _tmp20_ = FALSE;
}
- _tmp28_ = _tmp19_;
- if (_tmp28_) {
- gint _tmp29_;
+ _tmp29_ = _tmp20_;
+ if (_tmp29_) {
gint _tmp30_;
- _tmp29_ = y;
- _tmp30_ = bottom;
- _tmp18_ = _tmp29_ <= _tmp30_;
+ gint _tmp31_;
+ _tmp30_ = y;
+ _tmp31_ = bottom;
+ _tmp19_ = _tmp30_ <= _tmp31_;
} else {
- _tmp18_ = FALSE;
+ _tmp19_ = FALSE;
}
- _tmp31_ = _tmp18_;
- if (_tmp31_) {
- gint _tmp32_;
+ _tmp32_ = _tmp19_;
+ if (_tmp32_) {
gint _tmp33_;
gint _tmp34_;
gint _tmp35_;
- _tmp32_ = x;
- _tmp33_ = left;
- _vala_x_ = _tmp32_ - _tmp33_;
- _tmp34_ = y;
- _tmp35_ = top;
- _vala_y_ = _tmp34_ - _tmp35_;
+ gint _tmp36_;
+ _tmp33_ = x;
+ _tmp34_ = left;
+ _vala_x_ = _tmp33_ - _tmp34_;
+ _tmp35_ = y;
+ _tmp36_ = top;
+ _vala_y_ = _tmp35_ - _tmp36_;
result = page;
if (x_) {
*x_ = _vala_x_;
diff --git a/src/book-view.vala b/src/book-view.vala
index 9dfd361..3acd14e 100644
--- a/src/book-view.vala
+++ b/src/book-view.vala
@@ -30,7 +30,7 @@ public class BookView : Gtk.VBox
private Gtk.Widget drawing_area;
/* Horizontal scrollbar */
- private Gtk.HScrollbar scroll;
+ private Gtk.Scrollbar scroll;
private Gtk.Adjustment adjustment;
private Gdk.CursorType cursor;
@@ -68,7 +68,7 @@ public class BookView : Gtk.VBox
drawing_area.set_events (Gdk.EventMask.POINTER_MOTION_MASK | Gdk.EventMask.BUTTON_PRESS_MASK | Gdk.EventMask.BUTTON_RELEASE_MASK | Gdk.EventMask.FOCUS_CHANGE_MASK | Gdk.EventMask.STRUCTURE_MASK | Gdk.EventMask.SCROLL_MASK);
pack_start (drawing_area, true, true, 0);
- scroll = new Gtk.HScrollbar (null);
+ scroll = new Gtk.Scrollbar (Gtk.Orientation.HORIZONTAL, null);
adjustment = scroll.get_adjustment ();
pack_start (scroll, false, true, 0);
@@ -419,15 +419,11 @@ public class BookView : Gtk.VBox
context.restore ();
if (page.get_selected ())
- Gtk.paint_focus (drawing_area.get_style (),
- context,
- Gtk.StateType.SELECTED,
- null,
- null,
- page.get_x_offset () - get_x_offset (),
- page.get_y_offset (),
- page.get_width (),
- page.get_height ());
+ drawing_area.get_style_context ().render_focus (context,
+ page.get_x_offset () - get_x_offset (),
+ page.get_y_offset (),
+ page.get_width (),
+ page.get_height ());
}
return false;
@@ -435,6 +431,7 @@ public class BookView : Gtk.VBox
private PageView? get_page_at (int x, int y, out int x_, out int y_)
{
+ x_ = y_ = 0;
for (var i = 0; i < book.get_n_pages (); i++)
{
var page = get_nth_page (i);
diff --git a/src/book.c b/src/book.c
index 32f35e2..1ec2970 100644
--- a/src/book.c
+++ b/src/book.c
@@ -1,4 +1,4 @@
-/* book.c generated by valac 0.14.0, the Vala compiler
+/* book.c generated by valac 0.15.2, the Vala compiler
* generated from book.vala, do not modify */
/*
@@ -18,14 +18,14 @@
#include <string.h>
#include <gio/gio.h>
#include <cairo.h>
-#include <gdk-pixbuf/gdk-pixdata.h>
+#include <gdk-pixbuf/gdk-pixbuf.h>
#include <float.h>
#include <math.h>
#include <gdk/gdk.h>
#include <cairo-ps.h>
#include <zlib.h>
-#include <jpeglib.h>
-#include <config.h>
+#include "jpeglib.h"
+#include "config.h"
#include <gobject/gvaluecollector.h>
@@ -1123,55 +1123,55 @@ static void book_save_pdf (Book* self, GFile* file, GError** error) {
gchar* _tmp43_;
PDFWriter* _tmp44_;
PDFWriter* _tmp45_;
- PDFWriter* _tmp359_;
- PDFWriter* _tmp360_;
- guint _tmp361_ = 0U;
+ PDFWriter* _tmp349_;
+ PDFWriter* _tmp350_;
+ guint _tmp351_ = 0U;
guint info_number;
+ PDFWriter* _tmp352_;
+ guint _tmp353_;
+ gchar* _tmp354_ = NULL;
+ gchar* _tmp355_;
+ PDFWriter* _tmp356_;
+ PDFWriter* _tmp357_;
+ gchar* _tmp358_ = NULL;
+ gchar* _tmp359_;
+ PDFWriter* _tmp360_;
+ PDFWriter* _tmp361_;
PDFWriter* _tmp362_;
- guint _tmp363_;
- gchar* _tmp364_ = NULL;
- gchar* _tmp365_;
+ gsize _tmp363_;
+ gsize xref_offset;
+ PDFWriter* _tmp364_;
+ PDFWriter* _tmp365_;
PDFWriter* _tmp366_;
- PDFWriter* _tmp367_;
- gchar* _tmp368_ = NULL;
- gchar* _tmp369_;
- PDFWriter* _tmp370_;
+ GList* _tmp367_;
+ guint _tmp368_ = 0U;
+ gchar* _tmp369_ = NULL;
+ gchar* _tmp370_;
PDFWriter* _tmp371_;
- PDFWriter* _tmp372_;
- gsize _tmp373_;
- gsize xref_offset;
- PDFWriter* _tmp374_;
- PDFWriter* _tmp375_;
- PDFWriter* _tmp376_;
- GList* _tmp377_;
- guint _tmp378_ = 0U;
- gchar* _tmp379_ = NULL;
- gchar* _tmp380_;
- PDFWriter* _tmp381_;
- GList* _tmp382_;
- PDFWriter* _tmp387_;
- PDFWriter* _tmp388_;
+ GList* _tmp372_;
+ PDFWriter* _tmp377_;
+ PDFWriter* _tmp378_;
+ PDFWriter* _tmp379_;
+ PDFWriter* _tmp380_;
+ GList* _tmp381_;
+ guint _tmp382_ = 0U;
+ gchar* _tmp383_ = NULL;
+ gchar* _tmp384_;
+ PDFWriter* _tmp385_;
+ guint _tmp386_;
+ gchar* _tmp387_ = NULL;
+ gchar* _tmp388_;
PDFWriter* _tmp389_;
- PDFWriter* _tmp390_;
- GList* _tmp391_;
- guint _tmp392_ = 0U;
- gchar* _tmp393_ = NULL;
- gchar* _tmp394_;
+ guint _tmp390_;
+ gchar* _tmp391_ = NULL;
+ gchar* _tmp392_;
+ PDFWriter* _tmp393_;
+ PDFWriter* _tmp394_;
PDFWriter* _tmp395_;
- guint _tmp396_;
+ gsize _tmp396_;
gchar* _tmp397_ = NULL;
gchar* _tmp398_;
PDFWriter* _tmp399_;
- guint _tmp400_;
- gchar* _tmp401_ = NULL;
- gchar* _tmp402_;
- PDFWriter* _tmp403_;
- PDFWriter* _tmp404_;
- PDFWriter* _tmp405_;
- gsize _tmp406_;
- gchar* _tmp407_ = NULL;
- gchar* _tmp408_;
- PDFWriter* _tmp409_;
GError * _inner_error_ = NULL;
g_return_if_fail (self != NULL);
g_return_if_fail (file != NULL);
@@ -1329,123 +1329,123 @@ static void book_save_pdf (Book* self, GFile* file, GError** error) {
gint _data_size_ = 0;
Page* _tmp70_;
gboolean _tmp71_ = FALSE;
- guint8* _tmp237_;
- gint _tmp237__length1;
- gint _tmp238_ = 0;
- guint8* _tmp239_ = NULL;
+ guint8* _tmp227_;
+ gint _tmp227__length1;
+ gint _tmp228_ = 0;
+ guint8* _tmp229_ = NULL;
guint8* compressed_data;
gint compressed_data_length1;
gint _compressed_data_size_;
- guint8* _tmp240_;
- gint _tmp240__length1;
- PDFWriter* _tmp255_;
- PDFWriter* _tmp256_;
- guint _tmp257_ = 0U;
+ guint8* _tmp230_;
+ gint _tmp230__length1;
+ PDFWriter* _tmp245_;
+ PDFWriter* _tmp246_;
+ guint _tmp247_ = 0U;
guint number;
+ PDFWriter* _tmp248_;
+ guint _tmp249_;
+ gchar* _tmp250_ = NULL;
+ gchar* _tmp251_;
+ PDFWriter* _tmp252_;
+ PDFWriter* _tmp253_;
+ PDFWriter* _tmp254_;
+ guint _tmp255_;
+ gchar* _tmp256_ = NULL;
+ gchar* _tmp257_;
PDFWriter* _tmp258_;
- guint _tmp259_;
- gchar* _tmp260_ = NULL;
- gchar* _tmp261_;
- PDFWriter* _tmp262_;
+ gint _tmp259_;
+ guint _tmp260_;
+ gchar* _tmp261_ = NULL;
+ gchar* _tmp262_;
PDFWriter* _tmp263_;
- PDFWriter* _tmp264_;
- guint _tmp265_;
- gchar* _tmp266_ = NULL;
- gchar* _tmp267_;
- PDFWriter* _tmp268_;
- gint _tmp269_;
- guint _tmp270_;
- gchar* _tmp271_ = NULL;
- gchar* _tmp272_;
- PDFWriter* _tmp273_;
- gdouble _tmp274_;
+ gdouble _tmp264_;
+ gchar* _tmp265_;
+ gint _tmp265__length1;
+ const gchar* _tmp266_ = NULL;
+ gdouble _tmp267_;
+ gchar* _tmp268_;
+ gint _tmp268__length1;
+ const gchar* _tmp269_ = NULL;
+ gchar* _tmp270_ = NULL;
+ gchar* _tmp271_;
+ PDFWriter* _tmp272_;
+ guint _tmp273_;
+ gchar* _tmp274_ = NULL;
gchar* _tmp275_;
- gint _tmp275__length1;
- const gchar* _tmp276_ = NULL;
- gdouble _tmp277_;
- gchar* _tmp278_;
- gint _tmp278__length1;
- const gchar* _tmp279_ = NULL;
- gchar* _tmp280_ = NULL;
- gchar* _tmp281_;
- PDFWriter* _tmp282_;
- guint _tmp283_;
- gchar* _tmp284_ = NULL;
- gchar* _tmp285_;
+ PDFWriter* _tmp276_;
+ PDFWriter* _tmp277_;
+ PDFWriter* _tmp278_;
+ PDFWriter* _tmp279_;
+ guint _tmp280_ = 0U;
+ PDFWriter* _tmp281_;
+ guint _tmp282_;
+ gchar* _tmp283_ = NULL;
+ gchar* _tmp284_;
+ PDFWriter* _tmp285_;
PDFWriter* _tmp286_;
PDFWriter* _tmp287_;
PDFWriter* _tmp288_;
- PDFWriter* _tmp289_;
- guint _tmp290_ = 0U;
- PDFWriter* _tmp291_;
- guint _tmp292_;
- gchar* _tmp293_ = NULL;
- gchar* _tmp294_;
- PDFWriter* _tmp295_;
+ gint _tmp289_;
+ gchar* _tmp290_ = NULL;
+ gchar* _tmp291_;
+ PDFWriter* _tmp292_;
+ gint _tmp293_;
+ gchar* _tmp294_ = NULL;
+ gchar* _tmp295_;
PDFWriter* _tmp296_;
- PDFWriter* _tmp297_;
- PDFWriter* _tmp298_;
- gint _tmp299_;
- gchar* _tmp300_ = NULL;
- gchar* _tmp301_;
- PDFWriter* _tmp302_;
- gint _tmp303_;
- gchar* _tmp304_ = NULL;
- gchar* _tmp305_;
- PDFWriter* _tmp306_;
- const gchar* _tmp307_;
- gchar* _tmp308_ = NULL;
- gchar* _tmp309_;
- PDFWriter* _tmp310_;
- gint _tmp311_;
- gchar* _tmp312_ = NULL;
- gchar* _tmp313_;
+ const gchar* _tmp297_;
+ gchar* _tmp298_ = NULL;
+ gchar* _tmp299_;
+ PDFWriter* _tmp300_;
+ gint _tmp301_;
+ gchar* _tmp302_ = NULL;
+ gchar* _tmp303_;
+ PDFWriter* _tmp304_;
+ guint8* _tmp305_;
+ gint _tmp305__length1;
+ gchar* _tmp306_ = NULL;
+ gchar* _tmp307_;
+ const gchar* _tmp308_;
+ PDFWriter* _tmp313_;
PDFWriter* _tmp314_;
- guint8* _tmp315_;
- gint _tmp315__length1;
- gchar* _tmp316_ = NULL;
- gchar* _tmp317_;
- const gchar* _tmp318_;
- PDFWriter* _tmp323_;
- PDFWriter* _tmp324_;
- PDFWriter* _tmp325_;
- guint8* _tmp326_;
- gint _tmp326__length1;
- PDFWriter* _tmp327_;
+ PDFWriter* _tmp315_;
+ guint8* _tmp316_;
+ gint _tmp316__length1;
+ PDFWriter* _tmp317_;
+ PDFWriter* _tmp318_;
+ PDFWriter* _tmp319_;
+ gdouble _tmp320_;
+ gchar* _tmp321_;
+ gint _tmp321__length1;
+ const gchar* _tmp322_ = NULL;
+ gdouble _tmp323_;
+ gchar* _tmp324_;
+ gint _tmp324__length1;
+ const gchar* _tmp325_ = NULL;
+ gint _tmp326_;
+ gchar* _tmp327_ = NULL;
+ gchar* command;
PDFWriter* _tmp328_;
PDFWriter* _tmp329_;
- gdouble _tmp330_;
- gchar* _tmp331_;
- gint _tmp331__length1;
- const gchar* _tmp332_ = NULL;
- gdouble _tmp333_;
+ guint _tmp330_ = 0U;
+ PDFWriter* _tmp331_;
+ guint _tmp332_;
+ gchar* _tmp333_ = NULL;
gchar* _tmp334_;
- gint _tmp334__length1;
- const gchar* _tmp335_ = NULL;
- gint _tmp336_;
- gchar* _tmp337_ = NULL;
- gchar* command;
- PDFWriter* _tmp338_;
- PDFWriter* _tmp339_;
- guint _tmp340_ = 0U;
- PDFWriter* _tmp341_;
- guint _tmp342_;
- gchar* _tmp343_ = NULL;
- gchar* _tmp344_;
- PDFWriter* _tmp345_;
+ PDFWriter* _tmp335_;
+ PDFWriter* _tmp336_;
+ const gchar* _tmp337_;
+ gint _tmp338_;
+ gint _tmp339_;
+ gchar* _tmp340_ = NULL;
+ gchar* _tmp341_;
+ PDFWriter* _tmp342_;
+ PDFWriter* _tmp343_;
+ PDFWriter* _tmp344_;
+ const gchar* _tmp345_;
PDFWriter* _tmp346_;
- const gchar* _tmp347_;
- gint _tmp348_;
- gint _tmp349_;
- gchar* _tmp350_ = NULL;
- gchar* _tmp351_;
- PDFWriter* _tmp352_;
- PDFWriter* _tmp353_;
- PDFWriter* _tmp354_;
- const gchar* _tmp355_;
- PDFWriter* _tmp356_;
- PDFWriter* _tmp357_;
- PDFWriter* _tmp358_;
+ PDFWriter* _tmp347_;
+ PDFWriter* _tmp348_;
_tmp47_ = _tmp46_;
if (!_tmp47_) {
gint _tmp48_;
@@ -1510,7 +1510,7 @@ static void book_save_pdf (Book* self, GFile* file, GError** error) {
color_space = _tmp72_;
_tmp73_ = height;
_tmp74_ = width;
- data_length = ((_tmp73_ * _tmp74_) * 3) + 1;
+ data_length = (_tmp73_ * _tmp74_) * 3;
_tmp75_ = data_length;
_tmp76_ = g_new0 (guint8, _tmp75_);
data = (g_free (data), NULL);
@@ -1658,10 +1658,6 @@ static void book_save_pdf (Book* self, GFile* file, GError** error) {
gint _tmp119_;
guint8* _tmp120_ = NULL;
gint offset;
- guint8* _tmp121_;
- gint _tmp121__length1;
- gint _tmp122_;
- guint8 _tmp123_;
shift_count = 6;
depth = 2;
_tmp116_ = g_strdup ("DeviceGray");
@@ -1677,159 +1673,149 @@ static void book_save_pdf (Book* self, GFile* file, GError** error) {
data_length1 = _tmp119_;
_data_size_ = data_length1;
offset = 0;
- _tmp121_ = data;
- _tmp121__length1 = data_length1;
- _tmp122_ = offset;
- _tmp121_[_tmp122_] = (guint8) 0;
- _tmp123_ = _tmp121_[_tmp122_];
{
gint row;
row = 0;
{
- gboolean _tmp124_;
- _tmp124_ = TRUE;
+ gboolean _tmp121_;
+ _tmp121_ = TRUE;
while (TRUE) {
- gboolean _tmp125_;
- gint _tmp127_;
+ gboolean _tmp122_;
+ gint _tmp124_;
+ gint _tmp125_;
+ gint _tmp126_;
gint _tmp128_;
- gint _tmp129_;
- gint _tmp134_;
- GdkPixbuf* _tmp135_;
- gint _tmp136_ = 0;
+ GdkPixbuf* _tmp129_;
+ gint _tmp130_ = 0;
gint in_offset;
- _tmp125_ = _tmp124_;
- if (!_tmp125_) {
- gint _tmp126_;
- _tmp126_ = row;
- row = _tmp126_ + 1;
+ _tmp122_ = _tmp121_;
+ if (!_tmp122_) {
+ gint _tmp123_;
+ _tmp123_ = row;
+ row = _tmp123_ + 1;
}
- _tmp124_ = FALSE;
- _tmp127_ = row;
- _tmp128_ = height;
- if (!(_tmp127_ < _tmp128_)) {
+ _tmp121_ = FALSE;
+ _tmp124_ = row;
+ _tmp125_ = height;
+ if (!(_tmp124_ < _tmp125_)) {
break;
}
- _tmp129_ = shift_count;
- if (_tmp129_ != 6) {
- gint _tmp130_;
- guint8* _tmp131_;
- gint _tmp131__length1;
- gint _tmp132_;
- guint8 _tmp133_;
- _tmp130_ = offset;
- offset = _tmp130_ + 1;
- _tmp131_ = data;
- _tmp131__length1 = data_length1;
- _tmp132_ = offset;
- _tmp131_[_tmp132_] = (guint8) 0;
- _tmp133_ = _tmp131_[_tmp132_];
+ _tmp126_ = shift_count;
+ if (_tmp126_ != 6) {
+ gint _tmp127_;
+ _tmp127_ = offset;
+ offset = _tmp127_ + 1;
shift_count = 6;
}
- _tmp134_ = row;
- _tmp135_ = image;
- _tmp136_ = gdk_pixbuf_get_rowstride (_tmp135_);
- in_offset = _tmp134_ * _tmp136_;
+ _tmp128_ = row;
+ _tmp129_ = image;
+ _tmp130_ = gdk_pixbuf_get_rowstride (_tmp129_);
+ in_offset = _tmp128_ * _tmp130_;
{
gint x;
x = 0;
{
- gboolean _tmp137_;
- _tmp137_ = TRUE;
+ gboolean _tmp131_;
+ _tmp131_ = TRUE;
while (TRUE) {
- gboolean _tmp138_;
- gint _tmp140_;
+ gboolean _tmp132_;
+ gint _tmp134_;
+ gint _tmp135_;
+ gint _tmp136_;
+ guint8* _tmp140_;
+ gint _tmp140__length1;
gint _tmp141_;
- guint8* _tmp142_;
- gint _tmp142__length1;
- gint _tmp143_;
- gint _tmp144_;
- guint8 _tmp145_;
+ gint _tmp142_;
+ guint8 _tmp143_;
guint8 p;
- guint8 _tmp146_;
- gint _tmp161_;
- _tmp138_ = _tmp137_;
- if (!_tmp138_) {
- gint _tmp139_;
- _tmp139_ = x;
- x = _tmp139_ + 1;
+ guint8 _tmp144_;
+ gint _tmp159_;
+ _tmp132_ = _tmp131_;
+ if (!_tmp132_) {
+ gint _tmp133_;
+ _tmp133_ = x;
+ x = _tmp133_ + 1;
}
- _tmp137_ = FALSE;
- _tmp140_ = x;
- _tmp141_ = width;
- if (!(_tmp140_ < _tmp141_)) {
+ _tmp131_ = FALSE;
+ _tmp134_ = x;
+ _tmp135_ = width;
+ if (!(_tmp134_ < _tmp135_)) {
break;
}
- _tmp142_ = pixels;
- _tmp142__length1 = pixels_length1;
- _tmp143_ = in_offset;
- _tmp144_ = x;
- _tmp145_ = _tmp142_[_tmp143_ + (_tmp144_ * 3)];
- p = _tmp145_;
- _tmp146_ = p;
- if (((gint) _tmp146_) >= 192) {
- guint8* _tmp147_;
- gint _tmp147__length1;
- gint _tmp148_;
- gint _tmp149_;
- guint8 _tmp150_;
- _tmp147_ = data;
- _tmp147__length1 = data_length1;
- _tmp148_ = offset;
- _tmp149_ = shift_count;
- _tmp147_[_tmp148_] |= (guint8) (3 << _tmp149_);
- _tmp150_ = _tmp147_[_tmp148_];
+ _tmp136_ = shift_count;
+ if (_tmp136_ == 6) {
+ guint8* _tmp137_;
+ gint _tmp137__length1;
+ gint _tmp138_;
+ guint8 _tmp139_;
+ _tmp137_ = data;
+ _tmp137__length1 = data_length1;
+ _tmp138_ = offset;
+ _tmp137_[_tmp138_] = (guint8) 0;
+ _tmp139_ = _tmp137_[_tmp138_];
+ }
+ _tmp140_ = pixels;
+ _tmp140__length1 = pixels_length1;
+ _tmp141_ = in_offset;
+ _tmp142_ = x;
+ _tmp143_ = _tmp140_[_tmp141_ + (_tmp142_ * 3)];
+ p = _tmp143_;
+ _tmp144_ = p;
+ if (((gint) _tmp144_) >= 192) {
+ guint8* _tmp145_;
+ gint _tmp145__length1;
+ gint _tmp146_;
+ gint _tmp147_;
+ guint8 _tmp148_;
+ _tmp145_ = data;
+ _tmp145__length1 = data_length1;
+ _tmp146_ = offset;
+ _tmp147_ = shift_count;
+ _tmp145_[_tmp146_] |= (guint8) (3 << _tmp147_);
+ _tmp148_ = _tmp145_[_tmp146_];
} else {
- guint8 _tmp151_;
- _tmp151_ = p;
- if (((gint) _tmp151_) >= 128) {
- guint8* _tmp152_;
- gint _tmp152__length1;
- gint _tmp153_;
- gint _tmp154_;
- guint8 _tmp155_;
- _tmp152_ = data;
- _tmp152__length1 = data_length1;
- _tmp153_ = offset;
- _tmp154_ = shift_count;
- _tmp152_[_tmp153_] |= (guint8) (2 << _tmp154_);
- _tmp155_ = _tmp152_[_tmp153_];
+ guint8 _tmp149_;
+ _tmp149_ = p;
+ if (((gint) _tmp149_) >= 128) {
+ guint8* _tmp150_;
+ gint _tmp150__length1;
+ gint _tmp151_;
+ gint _tmp152_;
+ guint8 _tmp153_;
+ _tmp150_ = data;
+ _tmp150__length1 = data_length1;
+ _tmp151_ = offset;
+ _tmp152_ = shift_count;
+ _tmp150_[_tmp151_] |= (guint8) (2 << _tmp152_);
+ _tmp153_ = _tmp150_[_tmp151_];
} else {
- guint8 _tmp156_;
- _tmp156_ = p;
- if (((gint) _tmp156_) >= 64) {
- guint8* _tmp157_;
- gint _tmp157__length1;
- gint _tmp158_;
- gint _tmp159_;
- guint8 _tmp160_;
- _tmp157_ = data;
- _tmp157__length1 = data_length1;
- _tmp158_ = offset;
- _tmp159_ = shift_count;
- _tmp157_[_tmp158_] |= (guint8) (1 << _tmp159_);
- _tmp160_ = _tmp157_[_tmp158_];
+ guint8 _tmp154_;
+ _tmp154_ = p;
+ if (((gint) _tmp154_) >= 64) {
+ guint8* _tmp155_;
+ gint _tmp155__length1;
+ gint _tmp156_;
+ gint _tmp157_;
+ guint8 _tmp158_;
+ _tmp155_ = data;
+ _tmp155__length1 = data_length1;
+ _tmp156_ = offset;
+ _tmp157_ = shift_count;
+ _tmp155_[_tmp156_] |= (guint8) (1 << _tmp157_);
+ _tmp158_ = _tmp155_[_tmp156_];
}
}
}
- _tmp161_ = shift_count;
- if (_tmp161_ == 0) {
- gint _tmp162_;
- guint8* _tmp163_;
- gint _tmp163__length1;
- gint _tmp164_;
- guint8 _tmp165_;
- _tmp162_ = offset;
- offset = _tmp162_ + 1;
- _tmp163_ = data;
- _tmp163__length1 = data_length1;
- _tmp164_ = offset;
- _tmp163_[_tmp164_] = (guint8) 0;
- _tmp165_ = _tmp163_[_tmp164_];
+ _tmp159_ = shift_count;
+ if (_tmp159_ == 0) {
+ gint _tmp160_;
+ _tmp160_ = offset;
+ offset = _tmp160_ + 1;
shift_count = 6;
} else {
- gint _tmp166_;
- _tmp166_ = shift_count;
- shift_count = _tmp166_ - 2;
+ gint _tmp161_;
+ _tmp161_ = shift_count;
+ shift_count = _tmp161_ - 2;
}
}
}
@@ -1838,153 +1824,139 @@ static void book_save_pdf (Book* self, GFile* file, GError** error) {
}
}
} else {
- Page* _tmp167_;
- gint _tmp168_ = 0;
- _tmp167_ = page;
- _tmp168_ = page_get_depth (_tmp167_);
- if (_tmp168_ == 1) {
+ Page* _tmp162_;
+ gint _tmp163_ = 0;
+ _tmp162_ = page;
+ _tmp163_ = page_get_depth (_tmp162_);
+ if (_tmp163_ == 1) {
gint mask;
- gchar* _tmp169_;
- gint _tmp170_;
- gint _tmp171_;
+ gchar* _tmp164_;
+ gint _tmp165_;
+ gint _tmp166_;
gint data_length;
- gint _tmp172_;
- guint8* _tmp173_ = NULL;
+ gint _tmp167_;
+ guint8* _tmp168_ = NULL;
gint offset;
- guint8* _tmp174_;
- gint _tmp174__length1;
- gint _tmp175_;
- guint8 _tmp176_;
mask = 0x80;
depth = 1;
- _tmp169_ = g_strdup ("DeviceGray");
+ _tmp164_ = g_strdup ("DeviceGray");
_g_free0 (color_space);
- color_space = _tmp169_;
- _tmp170_ = height;
- _tmp171_ = width;
- data_length = _tmp170_ * ((_tmp171_ + 7) / 8);
- _tmp172_ = data_length;
- _tmp173_ = g_new0 (guint8, _tmp172_);
+ color_space = _tmp164_;
+ _tmp165_ = height;
+ _tmp166_ = width;
+ data_length = _tmp165_ * ((_tmp166_ + 7) / 8);
+ _tmp167_ = data_length;
+ _tmp168_ = g_new0 (guint8, _tmp167_);
data = (g_free (data), NULL);
- data = _tmp173_;
- data_length1 = _tmp172_;
+ data = _tmp168_;
+ data_length1 = _tmp167_;
_data_size_ = data_length1;
offset = 0;
- _tmp174_ = data;
- _tmp174__length1 = data_length1;
- _tmp175_ = offset;
- _tmp174_[_tmp175_] = (guint8) 0;
- _tmp176_ = _tmp174_[_tmp175_];
{
gint row;
row = 0;
{
- gboolean _tmp177_;
- _tmp177_ = TRUE;
+ gboolean _tmp169_;
+ _tmp169_ = TRUE;
while (TRUE) {
- gboolean _tmp178_;
- gint _tmp180_;
- gint _tmp181_;
- gint _tmp182_;
- gint _tmp187_;
- GdkPixbuf* _tmp188_;
- gint _tmp189_ = 0;
+ gboolean _tmp170_;
+ gint _tmp172_;
+ gint _tmp173_;
+ gint _tmp174_;
+ gint _tmp176_;
+ GdkPixbuf* _tmp177_;
+ gint _tmp178_ = 0;
gint in_offset;
- _tmp178_ = _tmp177_;
- if (!_tmp178_) {
- gint _tmp179_;
- _tmp179_ = row;
- row = _tmp179_ + 1;
+ _tmp170_ = _tmp169_;
+ if (!_tmp170_) {
+ gint _tmp171_;
+ _tmp171_ = row;
+ row = _tmp171_ + 1;
}
- _tmp177_ = FALSE;
- _tmp180_ = row;
- _tmp181_ = height;
- if (!(_tmp180_ < _tmp181_)) {
+ _tmp169_ = FALSE;
+ _tmp172_ = row;
+ _tmp173_ = height;
+ if (!(_tmp172_ < _tmp173_)) {
break;
}
- _tmp182_ = mask;
- if (_tmp182_ != 0x80) {
- gint _tmp183_;
- guint8* _tmp184_;
- gint _tmp184__length1;
- gint _tmp185_;
- guint8 _tmp186_;
- _tmp183_ = offset;
- offset = _tmp183_ + 1;
- _tmp184_ = data;
- _tmp184__length1 = data_length1;
- _tmp185_ = offset;
- _tmp184_[_tmp185_] = (guint8) 0;
- _tmp186_ = _tmp184_[_tmp185_];
+ _tmp174_ = mask;
+ if (_tmp174_ != 0x80) {
+ gint _tmp175_;
+ _tmp175_ = offset;
+ offset = _tmp175_ + 1;
mask = 0x80;
}
- _tmp187_ = row;
- _tmp188_ = image;
- _tmp189_ = gdk_pixbuf_get_rowstride (_tmp188_);
- in_offset = _tmp187_ * _tmp189_;
+ _tmp176_ = row;
+ _tmp177_ = image;
+ _tmp178_ = gdk_pixbuf_get_rowstride (_tmp177_);
+ in_offset = _tmp176_ * _tmp178_;
{
gint x;
x = 0;
{
- gboolean _tmp190_;
- _tmp190_ = TRUE;
+ gboolean _tmp179_;
+ _tmp179_ = TRUE;
while (TRUE) {
- gboolean _tmp191_;
- gint _tmp193_;
- gint _tmp194_;
- guint8* _tmp195_;
- gint _tmp195__length1;
+ gboolean _tmp180_;
+ gint _tmp182_;
+ gint _tmp183_;
+ gint _tmp184_;
+ guint8* _tmp188_;
+ gint _tmp188__length1;
+ gint _tmp189_;
+ gint _tmp190_;
+ guint8 _tmp191_;
gint _tmp196_;
gint _tmp197_;
- guint8 _tmp198_;
- gint _tmp203_;
- gint _tmp204_;
- _tmp191_ = _tmp190_;
- if (!_tmp191_) {
- gint _tmp192_;
- _tmp192_ = x;
- x = _tmp192_ + 1;
+ _tmp180_ = _tmp179_;
+ if (!_tmp180_) {
+ gint _tmp181_;
+ _tmp181_ = x;
+ x = _tmp181_ + 1;
}
- _tmp190_ = FALSE;
- _tmp193_ = x;
- _tmp194_ = width;
- if (!(_tmp193_ < _tmp194_)) {
+ _tmp179_ = FALSE;
+ _tmp182_ = x;
+ _tmp183_ = width;
+ if (!(_tmp182_ < _tmp183_)) {
break;
}
- _tmp195_ = pixels;
- _tmp195__length1 = pixels_length1;
- _tmp196_ = in_offset;
- _tmp197_ = x;
- _tmp198_ = _tmp195_[_tmp196_ + (_tmp197_ * 3)];
- if (((gint) _tmp198_) != 0) {
- guint8* _tmp199_;
- gint _tmp199__length1;
- gint _tmp200_;
- gint _tmp201_;
- guint8 _tmp202_;
- _tmp199_ = data;
- _tmp199__length1 = data_length1;
- _tmp200_ = offset;
- _tmp201_ = mask;
- _tmp199_[_tmp200_] |= (guint8) _tmp201_;
- _tmp202_ = _tmp199_[_tmp200_];
+ _tmp184_ = mask;
+ if (_tmp184_ == 0x80) {
+ guint8* _tmp185_;
+ gint _tmp185__length1;
+ gint _tmp186_;
+ guint8 _tmp187_;
+ _tmp185_ = data;
+ _tmp185__length1 = data_length1;
+ _tmp186_ = offset;
+ _tmp185_[_tmp186_] = (guint8) 0;
+ _tmp187_ = _tmp185_[_tmp186_];
+ }
+ _tmp188_ = pixels;
+ _tmp188__length1 = pixels_length1;
+ _tmp189_ = in_offset;
+ _tmp190_ = x;
+ _tmp191_ = _tmp188_[_tmp189_ + (_tmp190_ * 3)];
+ if (((gint) _tmp191_) != 0) {
+ guint8* _tmp192_;
+ gint _tmp192__length1;
+ gint _tmp193_;
+ gint _tmp194_;
+ guint8 _tmp195_;
+ _tmp192_ = data;
+ _tmp192__length1 = data_length1;
+ _tmp193_ = offset;
+ _tmp194_ = mask;
+ _tmp192_[_tmp193_] |= (guint8) _tmp194_;
+ _tmp195_ = _tmp192_[_tmp193_];
}
- _tmp203_ = mask;
- mask = _tmp203_ >> 1;
- _tmp204_ = mask;
- if (_tmp204_ == 0) {
- gint _tmp205_;
- guint8* _tmp206_;
- gint _tmp206__length1;
- gint _tmp207_;
- guint8 _tmp208_;
- _tmp205_ = offset;
- offset = _tmp205_ + 1;
- _tmp206_ = data;
- _tmp206__length1 = data_length1;
- _tmp207_ = offset;
- _tmp206_[_tmp207_] = (guint8) 0;
- _tmp208_ = _tmp206_[_tmp207_];
+ _tmp196_ = mask;
+ mask = _tmp196_ >> 1;
+ _tmp197_ = mask;
+ if (_tmp197_ == 0) {
+ gint _tmp198_;
+ _tmp198_ = offset;
+ offset = _tmp198_ + 1;
mask = 0x80;
}
}
@@ -1994,104 +1966,104 @@ static void book_save_pdf (Book* self, GFile* file, GError** error) {
}
}
} else {
- gchar* _tmp209_;
- gint _tmp210_;
- gint _tmp211_;
+ gchar* _tmp199_;
+ gint _tmp200_;
+ gint _tmp201_;
gint data_length;
- gint _tmp212_;
- guint8* _tmp213_ = NULL;
+ gint _tmp202_;
+ guint8* _tmp203_ = NULL;
depth = 8;
- _tmp209_ = g_strdup ("DeviceGray");
+ _tmp199_ = g_strdup ("DeviceGray");
_g_free0 (color_space);
- color_space = _tmp209_;
- _tmp210_ = height;
- _tmp211_ = width;
- data_length = (_tmp210_ * _tmp211_) + 1;
- _tmp212_ = data_length;
- _tmp213_ = g_new0 (guint8, _tmp212_);
+ color_space = _tmp199_;
+ _tmp200_ = height;
+ _tmp201_ = width;
+ data_length = _tmp200_ * _tmp201_;
+ _tmp202_ = data_length;
+ _tmp203_ = g_new0 (guint8, _tmp202_);
data = (g_free (data), NULL);
- data = _tmp213_;
- data_length1 = _tmp212_;
+ data = _tmp203_;
+ data_length1 = _tmp202_;
_data_size_ = data_length1;
{
gint row;
row = 0;
{
- gboolean _tmp214_;
- _tmp214_ = TRUE;
+ gboolean _tmp204_;
+ _tmp204_ = TRUE;
while (TRUE) {
- gboolean _tmp215_;
- gint _tmp217_;
- gint _tmp218_;
- gint _tmp219_;
- GdkPixbuf* _tmp220_;
- gint _tmp221_ = 0;
+ gboolean _tmp205_;
+ gint _tmp207_;
+ gint _tmp208_;
+ gint _tmp209_;
+ GdkPixbuf* _tmp210_;
+ gint _tmp211_ = 0;
gint in_offset;
- gint _tmp222_;
- gint _tmp223_;
+ gint _tmp212_;
+ gint _tmp213_;
gint out_offset;
- _tmp215_ = _tmp214_;
- if (!_tmp215_) {
- gint _tmp216_;
- _tmp216_ = row;
- row = _tmp216_ + 1;
+ _tmp205_ = _tmp204_;
+ if (!_tmp205_) {
+ gint _tmp206_;
+ _tmp206_ = row;
+ row = _tmp206_ + 1;
}
- _tmp214_ = FALSE;
- _tmp217_ = row;
- _tmp218_ = height;
- if (!(_tmp217_ < _tmp218_)) {
+ _tmp204_ = FALSE;
+ _tmp207_ = row;
+ _tmp208_ = height;
+ if (!(_tmp207_ < _tmp208_)) {
break;
}
- _tmp219_ = row;
- _tmp220_ = image;
- _tmp221_ = gdk_pixbuf_get_rowstride (_tmp220_);
- in_offset = _tmp219_ * _tmp221_;
- _tmp222_ = row;
- _tmp223_ = width;
- out_offset = _tmp222_ * _tmp223_;
+ _tmp209_ = row;
+ _tmp210_ = image;
+ _tmp211_ = gdk_pixbuf_get_rowstride (_tmp210_);
+ in_offset = _tmp209_ * _tmp211_;
+ _tmp212_ = row;
+ _tmp213_ = width;
+ out_offset = _tmp212_ * _tmp213_;
{
gint x;
x = 0;
{
- gboolean _tmp224_;
- _tmp224_ = TRUE;
+ gboolean _tmp214_;
+ _tmp214_ = TRUE;
while (TRUE) {
- gboolean _tmp225_;
- gint _tmp227_;
- gint _tmp228_;
- guint8* _tmp229_;
- gint _tmp229__length1;
- gint _tmp230_;
- gint _tmp231_;
- guint8* _tmp232_;
- gint _tmp232__length1;
- gint _tmp233_;
- gint _tmp234_;
- guint8 _tmp235_;
- guint8 _tmp236_;
- _tmp225_ = _tmp224_;
- if (!_tmp225_) {
- gint _tmp226_;
- _tmp226_ = x;
- x = _tmp226_ + 1;
+ gboolean _tmp215_;
+ gint _tmp217_;
+ gint _tmp218_;
+ guint8* _tmp219_;
+ gint _tmp219__length1;
+ gint _tmp220_;
+ gint _tmp221_;
+ guint8* _tmp222_;
+ gint _tmp222__length1;
+ gint _tmp223_;
+ gint _tmp224_;
+ guint8 _tmp225_;
+ guint8 _tmp226_;
+ _tmp215_ = _tmp214_;
+ if (!_tmp215_) {
+ gint _tmp216_;
+ _tmp216_ = x;
+ x = _tmp216_ + 1;
}
- _tmp224_ = FALSE;
- _tmp227_ = x;
- _tmp228_ = width;
- if (!(_tmp227_ < _tmp228_)) {
+ _tmp214_ = FALSE;
+ _tmp217_ = x;
+ _tmp218_ = width;
+ if (!(_tmp217_ < _tmp218_)) {
break;
}
- _tmp229_ = data;
- _tmp229__length1 = data_length1;
- _tmp230_ = out_offset;
- _tmp231_ = x;
- _tmp232_ = pixels;
- _tmp232__length1 = pixels_length1;
- _tmp233_ = in_offset;
- _tmp234_ = x;
- _tmp235_ = _tmp232_[_tmp233_ + (_tmp234_ * 3)];
- _tmp229_[_tmp230_ + _tmp231_] = _tmp235_;
- _tmp236_ = _tmp229_[_tmp230_ + _tmp231_];
+ _tmp219_ = data;
+ _tmp219__length1 = data_length1;
+ _tmp220_ = out_offset;
+ _tmp221_ = x;
+ _tmp222_ = pixels;
+ _tmp222__length1 = pixels_length1;
+ _tmp223_ = in_offset;
+ _tmp224_ = x;
+ _tmp225_ = _tmp222_[_tmp223_ + (_tmp224_ * 3)];
+ _tmp219_[_tmp220_ + _tmp221_] = _tmp225_;
+ _tmp226_ = _tmp219_[_tmp220_ + _tmp221_];
}
}
}
@@ -2101,250 +2073,250 @@ static void book_save_pdf (Book* self, GFile* file, GError** error) {
}
}
}
- _tmp237_ = data;
- _tmp237__length1 = data_length1;
- _tmp239_ = book_compress_zlib (self, _tmp237_, _tmp237__length1, &_tmp238_);
- compressed_data = _tmp239_;
- compressed_data_length1 = _tmp238_;
+ _tmp227_ = data;
+ _tmp227__length1 = data_length1;
+ _tmp229_ = book_compress_zlib (self, _tmp227_, _tmp227__length1, &_tmp228_);
+ compressed_data = _tmp229_;
+ compressed_data_length1 = _tmp228_;
_compressed_data_size_ = compressed_data_length1;
- _tmp240_ = compressed_data;
- _tmp240__length1 = compressed_data_length1;
- if (_tmp240_ != NULL) {
- gint _tmp241_;
- const gchar* _tmp251_;
- _tmp241_ = depth;
- if (_tmp241_ > 1) {
+ _tmp230_ = compressed_data;
+ _tmp230__length1 = compressed_data_length1;
+ if (_tmp230_ != NULL) {
+ gint _tmp231_;
+ const gchar* _tmp241_;
+ _tmp231_ = depth;
+ if (_tmp231_ > 1) {
gsize jpeg_length = 0UL;
- GdkPixbuf* _tmp242_;
- gsize _tmp243_ = 0UL;
- gint _tmp244_ = 0;
- guint8* _tmp245_ = NULL;
+ GdkPixbuf* _tmp232_;
+ gsize _tmp233_ = 0UL;
+ gint _tmp234_ = 0;
+ guint8* _tmp235_ = NULL;
guint8* jpeg_data;
gint jpeg_data_length1;
gint _jpeg_data_size_;
- gsize _tmp246_;
- guint8* _tmp247_;
- gint _tmp247__length1;
- _tmp242_ = image;
- _tmp245_ = book_compress_jpeg (self, _tmp242_, &_tmp243_, &_tmp244_);
- jpeg_length = _tmp243_;
- jpeg_data = _tmp245_;
- jpeg_data_length1 = _tmp244_;
+ gsize _tmp236_;
+ guint8* _tmp237_;
+ gint _tmp237__length1;
+ _tmp232_ = image;
+ _tmp235_ = book_compress_jpeg (self, _tmp232_, &_tmp233_, &_tmp234_);
+ jpeg_length = _tmp233_;
+ jpeg_data = _tmp235_;
+ jpeg_data_length1 = _tmp234_;
_jpeg_data_size_ = jpeg_data_length1;
- _tmp246_ = jpeg_length;
- _tmp247_ = compressed_data;
- _tmp247__length1 = compressed_data_length1;
- if (_tmp246_ < ((gsize) _tmp247__length1)) {
- gchar* _tmp248_;
- guint8* _tmp249_;
- gint _tmp249__length1;
- guint8* _tmp250_;
- gint _tmp250__length1;
- _tmp248_ = g_strdup ("DCTDecode");
+ _tmp236_ = jpeg_length;
+ _tmp237_ = compressed_data;
+ _tmp237__length1 = compressed_data_length1;
+ if (_tmp236_ < ((gsize) _tmp237__length1)) {
+ gchar* _tmp238_;
+ guint8* _tmp239_;
+ gint _tmp239__length1;
+ guint8* _tmp240_;
+ gint _tmp240__length1;
+ _tmp238_ = g_strdup ("DCTDecode");
_g_free0 (filter);
- filter = _tmp248_;
- _tmp249_ = jpeg_data;
- _tmp249__length1 = jpeg_data_length1;
- _tmp250_ = (_tmp249_ != NULL) ? _vala_array_dup1 (_tmp249_, _tmp249__length1) : ((gpointer) _tmp249_);
- _tmp250__length1 = _tmp249__length1;
+ filter = _tmp238_;
+ _tmp239_ = jpeg_data;
+ _tmp239__length1 = jpeg_data_length1;
+ _tmp240_ = (_tmp239_ != NULL) ? _vala_array_dup1 (_tmp239_, _tmp239__length1) : ((gpointer) _tmp239_);
+ _tmp240__length1 = _tmp239__length1;
data = (g_free (data), NULL);
- data = _tmp250_;
- data_length1 = _tmp250__length1;
+ data = _tmp240_;
+ data_length1 = _tmp240__length1;
_data_size_ = data_length1;
}
jpeg_data = (g_free (jpeg_data), NULL);
}
- _tmp251_ = filter;
- if (_tmp251_ == NULL) {
- gchar* _tmp252_;
- guint8* _tmp253_;
- gint _tmp253__length1;
- guint8* _tmp254_;
- gint _tmp254__length1;
- _tmp252_ = g_strdup ("FlateDecode");
+ _tmp241_ = filter;
+ if (_tmp241_ == NULL) {
+ gchar* _tmp242_;
+ guint8* _tmp243_;
+ gint _tmp243__length1;
+ guint8* _tmp244_;
+ gint _tmp244__length1;
+ _tmp242_ = g_strdup ("FlateDecode");
_g_free0 (filter);
- filter = _tmp252_;
- _tmp253_ = compressed_data;
- _tmp253__length1 = compressed_data_length1;
- _tmp254_ = (_tmp253_ != NULL) ? _vala_array_dup2 (_tmp253_, _tmp253__length1) : ((gpointer) _tmp253_);
- _tmp254__length1 = _tmp253__length1;
+ filter = _tmp242_;
+ _tmp243_ = compressed_data;
+ _tmp243__length1 = compressed_data_length1;
+ _tmp244_ = (_tmp243_ != NULL) ? _vala_array_dup2 (_tmp243_, _tmp243__length1) : ((gpointer) _tmp243_);
+ _tmp244__length1 = _tmp243__length1;
data = (g_free (data), NULL);
- data = _tmp254_;
- data_length1 = _tmp254__length1;
+ data = _tmp244_;
+ data_length1 = _tmp244__length1;
_data_size_ = data_length1;
}
}
- _tmp255_ = writer;
- pdf_writer_write_string (_tmp255_, "\n");
- _tmp256_ = writer;
- _tmp257_ = pdf_writer_start_object (_tmp256_);
- number = _tmp257_;
+ _tmp245_ = writer;
+ pdf_writer_write_string (_tmp245_, "\n");
+ _tmp246_ = writer;
+ _tmp247_ = pdf_writer_start_object (_tmp246_);
+ number = _tmp247_;
+ _tmp248_ = writer;
+ _tmp249_ = number;
+ _tmp250_ = g_strdup_printf ("%u 0 obj\n", _tmp249_);
+ _tmp251_ = _tmp250_;
+ pdf_writer_write_string (_tmp248_, _tmp251_);
+ _g_free0 (_tmp251_);
+ _tmp252_ = writer;
+ pdf_writer_write_string (_tmp252_, "<<\n");
+ _tmp253_ = writer;
+ pdf_writer_write_string (_tmp253_, "/Type /Page\n");
+ _tmp254_ = writer;
+ _tmp255_ = pages_number;
+ _tmp256_ = g_strdup_printf ("/Parent %u 0 R\n", _tmp255_);
+ _tmp257_ = _tmp256_;
+ pdf_writer_write_string (_tmp254_, _tmp257_);
+ _g_free0 (_tmp257_);
_tmp258_ = writer;
- _tmp259_ = number;
- _tmp260_ = g_strdup_printf ("%u 0 obj\n", _tmp259_);
- _tmp261_ = _tmp260_;
- pdf_writer_write_string (_tmp258_, _tmp261_);
- _g_free0 (_tmp261_);
- _tmp262_ = writer;
- pdf_writer_write_string (_tmp262_, "<<\n");
+ _tmp259_ = i;
+ _tmp260_ = number;
+ _tmp261_ = g_strdup_printf ("/Resources << /XObject << /Im%d %u 0 R >> >>\n", _tmp259_, _tmp260_ + 1);
+ _tmp262_ = _tmp261_;
+ pdf_writer_write_string (_tmp258_, _tmp262_);
+ _g_free0 (_tmp262_);
_tmp263_ = writer;
- pdf_writer_write_string (_tmp263_, "/Type /Page\n");
- _tmp264_ = writer;
- _tmp265_ = pages_number;
- _tmp266_ = g_strdup_printf ("/Parent %u 0 R\n", _tmp265_);
- _tmp267_ = _tmp266_;
- pdf_writer_write_string (_tmp264_, _tmp267_);
- _g_free0 (_tmp267_);
- _tmp268_ = writer;
- _tmp269_ = i;
- _tmp270_ = number;
- _tmp271_ = g_strdup_printf ("/Resources << /XObject << /Im%d %u 0 R >> >>\n", _tmp269_, _tmp270_ + 1);
- _tmp272_ = _tmp271_;
- pdf_writer_write_string (_tmp268_, _tmp272_);
- _g_free0 (_tmp272_);
- _tmp273_ = writer;
- _tmp274_ = page_width;
- _tmp275_ = width_buffer;
- _tmp275__length1 = width_buffer_length1;
- _tmp276_ = g_ascii_formatd (_tmp275_, _tmp275__length1, "%.2f", _tmp274_);
- _tmp277_ = page_height;
- _tmp278_ = height_buffer;
- _tmp278__length1 = height_buffer_length1;
- _tmp279_ = g_ascii_formatd (_tmp278_, _tmp278__length1, "%.2f", _tmp277_);
- _tmp280_ = g_strdup_printf ("/MediaBox [ 0 0 %s %s ]\n", _tmp276_, _tmp279_);
- _tmp281_ = _tmp280_;
- pdf_writer_write_string (_tmp273_, _tmp281_);
- _g_free0 (_tmp281_);
- _tmp282_ = writer;
- _tmp283_ = number;
- _tmp284_ = g_strdup_printf ("/Contents %u 0 R\n", _tmp283_ + 2);
- _tmp285_ = _tmp284_;
- pdf_writer_write_string (_tmp282_, _tmp285_);
- _g_free0 (_tmp285_);
+ _tmp264_ = page_width;
+ _tmp265_ = width_buffer;
+ _tmp265__length1 = width_buffer_length1;
+ _tmp266_ = g_ascii_formatd (_tmp265_, _tmp265__length1, "%.2f", _tmp264_);
+ _tmp267_ = page_height;
+ _tmp268_ = height_buffer;
+ _tmp268__length1 = height_buffer_length1;
+ _tmp269_ = g_ascii_formatd (_tmp268_, _tmp268__length1, "%.2f", _tmp267_);
+ _tmp270_ = g_strdup_printf ("/MediaBox [ 0 0 %s %s ]\n", _tmp266_, _tmp269_);
+ _tmp271_ = _tmp270_;
+ pdf_writer_write_string (_tmp263_, _tmp271_);
+ _g_free0 (_tmp271_);
+ _tmp272_ = writer;
+ _tmp273_ = number;
+ _tmp274_ = g_strdup_printf ("/Contents %u 0 R\n", _tmp273_ + 2);
+ _tmp275_ = _tmp274_;
+ pdf_writer_write_string (_tmp272_, _tmp275_);
+ _g_free0 (_tmp275_);
+ _tmp276_ = writer;
+ pdf_writer_write_string (_tmp276_, ">>\n");
+ _tmp277_ = writer;
+ pdf_writer_write_string (_tmp277_, "endobj\n");
+ _tmp278_ = writer;
+ pdf_writer_write_string (_tmp278_, "\n");
+ _tmp279_ = writer;
+ _tmp280_ = pdf_writer_start_object (_tmp279_);
+ number = _tmp280_;
+ _tmp281_ = writer;
+ _tmp282_ = number;
+ _tmp283_ = g_strdup_printf ("%u 0 obj\n", _tmp282_);
+ _tmp284_ = _tmp283_;
+ pdf_writer_write_string (_tmp281_, _tmp284_);
+ _g_free0 (_tmp284_);
+ _tmp285_ = writer;
+ pdf_writer_write_string (_tmp285_, "<<\n");
_tmp286_ = writer;
- pdf_writer_write_string (_tmp286_, ">>\n");
+ pdf_writer_write_string (_tmp286_, "/Type /XObject\n");
_tmp287_ = writer;
- pdf_writer_write_string (_tmp287_, "endobj\n");
+ pdf_writer_write_string (_tmp287_, "/Subtype /Image\n");
_tmp288_ = writer;
- pdf_writer_write_string (_tmp288_, "\n");
- _tmp289_ = writer;
- _tmp290_ = pdf_writer_start_object (_tmp289_);
- number = _tmp290_;
- _tmp291_ = writer;
- _tmp292_ = number;
- _tmp293_ = g_strdup_printf ("%u 0 obj\n", _tmp292_);
- _tmp294_ = _tmp293_;
- pdf_writer_write_string (_tmp291_, _tmp294_);
- _g_free0 (_tmp294_);
- _tmp295_ = writer;
- pdf_writer_write_string (_tmp295_, "<<\n");
+ _tmp289_ = width;
+ _tmp290_ = g_strdup_printf ("/Width %d\n", _tmp289_);
+ _tmp291_ = _tmp290_;
+ pdf_writer_write_string (_tmp288_, _tmp291_);
+ _g_free0 (_tmp291_);
+ _tmp292_ = writer;
+ _tmp293_ = height;
+ _tmp294_ = g_strdup_printf ("/Height %d\n", _tmp293_);
+ _tmp295_ = _tmp294_;
+ pdf_writer_write_string (_tmp292_, _tmp295_);
+ _g_free0 (_tmp295_);
_tmp296_ = writer;
- pdf_writer_write_string (_tmp296_, "/Type /XObject\n");
- _tmp297_ = writer;
- pdf_writer_write_string (_tmp297_, "/Subtype /Image\n");
- _tmp298_ = writer;
- _tmp299_ = width;
- _tmp300_ = g_strdup_printf ("/Width %d\n", _tmp299_);
- _tmp301_ = _tmp300_;
- pdf_writer_write_string (_tmp298_, _tmp301_);
- _g_free0 (_tmp301_);
- _tmp302_ = writer;
- _tmp303_ = height;
- _tmp304_ = g_strdup_printf ("/Height %d\n", _tmp303_);
- _tmp305_ = _tmp304_;
- pdf_writer_write_string (_tmp302_, _tmp305_);
- _g_free0 (_tmp305_);
- _tmp306_ = writer;
- _tmp307_ = color_space;
- _tmp308_ = g_strdup_printf ("/ColorSpace /%s\n", _tmp307_);
- _tmp309_ = _tmp308_;
- pdf_writer_write_string (_tmp306_, _tmp309_);
- _g_free0 (_tmp309_);
- _tmp310_ = writer;
- _tmp311_ = depth;
- _tmp312_ = g_strdup_printf ("/BitsPerComponent %d\n", _tmp311_);
- _tmp313_ = _tmp312_;
- pdf_writer_write_string (_tmp310_, _tmp313_);
- _g_free0 (_tmp313_);
- _tmp314_ = writer;
- _tmp315_ = data;
- _tmp315__length1 = data_length1;
- _tmp316_ = g_strdup_printf ("/Length %d\n", _tmp315__length1);
- _tmp317_ = _tmp316_;
- pdf_writer_write_string (_tmp314_, _tmp317_);
- _g_free0 (_tmp317_);
- _tmp318_ = filter;
- if (_tmp318_ != NULL) {
- PDFWriter* _tmp319_;
- const gchar* _tmp320_;
- gchar* _tmp321_ = NULL;
- gchar* _tmp322_;
- _tmp319_ = writer;
- _tmp320_ = filter;
- _tmp321_ = g_strdup_printf ("/Filter /%s\n", _tmp320_);
- _tmp322_ = _tmp321_;
- pdf_writer_write_string (_tmp319_, _tmp322_);
- _g_free0 (_tmp322_);
+ _tmp297_ = color_space;
+ _tmp298_ = g_strdup_printf ("/ColorSpace /%s\n", _tmp297_);
+ _tmp299_ = _tmp298_;
+ pdf_writer_write_string (_tmp296_, _tmp299_);
+ _g_free0 (_tmp299_);
+ _tmp300_ = writer;
+ _tmp301_ = depth;
+ _tmp302_ = g_strdup_printf ("/BitsPerComponent %d\n", _tmp301_);
+ _tmp303_ = _tmp302_;
+ pdf_writer_write_string (_tmp300_, _tmp303_);
+ _g_free0 (_tmp303_);
+ _tmp304_ = writer;
+ _tmp305_ = data;
+ _tmp305__length1 = data_length1;
+ _tmp306_ = g_strdup_printf ("/Length %d\n", _tmp305__length1);
+ _tmp307_ = _tmp306_;
+ pdf_writer_write_string (_tmp304_, _tmp307_);
+ _g_free0 (_tmp307_);
+ _tmp308_ = filter;
+ if (_tmp308_ != NULL) {
+ PDFWriter* _tmp309_;
+ const gchar* _tmp310_;
+ gchar* _tmp311_ = NULL;
+ gchar* _tmp312_;
+ _tmp309_ = writer;
+ _tmp310_ = filter;
+ _tmp311_ = g_strdup_printf ("/Filter /%s\n", _tmp310_);
+ _tmp312_ = _tmp311_;
+ pdf_writer_write_string (_tmp309_, _tmp312_);
+ _g_free0 (_tmp312_);
}
- _tmp323_ = writer;
- pdf_writer_write_string (_tmp323_, ">>\n");
- _tmp324_ = writer;
- pdf_writer_write_string (_tmp324_, "stream\n");
- _tmp325_ = writer;
- _tmp326_ = data;
- _tmp326__length1 = data_length1;
- pdf_writer_write (_tmp325_, _tmp326_, _tmp326__length1);
- _tmp327_ = writer;
- pdf_writer_write_string (_tmp327_, "\n");
+ _tmp313_ = writer;
+ pdf_writer_write_string (_tmp313_, ">>\n");
+ _tmp314_ = writer;
+ pdf_writer_write_string (_tmp314_, "stream\n");
+ _tmp315_ = writer;
+ _tmp316_ = data;
+ _tmp316__length1 = data_length1;
+ pdf_writer_write (_tmp315_, _tmp316_, _tmp316__length1);
+ _tmp317_ = writer;
+ pdf_writer_write_string (_tmp317_, "\n");
+ _tmp318_ = writer;
+ pdf_writer_write_string (_tmp318_, "endstream\n");
+ _tmp319_ = writer;
+ pdf_writer_write_string (_tmp319_, "endobj\n");
+ _tmp320_ = page_width;
+ _tmp321_ = width_buffer;
+ _tmp321__length1 = width_buffer_length1;
+ _tmp322_ = g_ascii_formatd (_tmp321_, _tmp321__length1, "%f", _tmp320_);
+ _tmp323_ = page_height;
+ _tmp324_ = height_buffer;
+ _tmp324__length1 = height_buffer_length1;
+ _tmp325_ = g_ascii_formatd (_tmp324_, _tmp324__length1, "%f", _tmp323_);
+ _tmp326_ = i;
+ _tmp327_ = g_strdup_printf ("q\n%s 0 0 %s 0 0 cm\n/Im%d Do\nQ", _tmp322_, _tmp325_, _tmp326_);
+ command = _tmp327_;
_tmp328_ = writer;
- pdf_writer_write_string (_tmp328_, "endstream\n");
+ pdf_writer_write_string (_tmp328_, "\n");
_tmp329_ = writer;
- pdf_writer_write_string (_tmp329_, "endobj\n");
- _tmp330_ = page_width;
- _tmp331_ = width_buffer;
- _tmp331__length1 = width_buffer_length1;
- _tmp332_ = g_ascii_formatd (_tmp331_, _tmp331__length1, "%f", _tmp330_);
- _tmp333_ = page_height;
- _tmp334_ = height_buffer;
- _tmp334__length1 = height_buffer_length1;
- _tmp335_ = g_ascii_formatd (_tmp334_, _tmp334__length1, "%f", _tmp333_);
- _tmp336_ = i;
- _tmp337_ = g_strdup_printf ("q\n%s 0 0 %s 0 0 cm\n/Im%d Do\nQ", _tmp332_, _tmp335_, _tmp336_);
- command = _tmp337_;
- _tmp338_ = writer;
- pdf_writer_write_string (_tmp338_, "\n");
- _tmp339_ = writer;
- _tmp340_ = pdf_writer_start_object (_tmp339_);
- number = _tmp340_;
- _tmp341_ = writer;
- _tmp342_ = number;
- _tmp343_ = g_strdup_printf ("%u 0 obj\n", _tmp342_);
- _tmp344_ = _tmp343_;
- pdf_writer_write_string (_tmp341_, _tmp344_);
- _g_free0 (_tmp344_);
- _tmp345_ = writer;
- pdf_writer_write_string (_tmp345_, "<<\n");
+ _tmp330_ = pdf_writer_start_object (_tmp329_);
+ number = _tmp330_;
+ _tmp331_ = writer;
+ _tmp332_ = number;
+ _tmp333_ = g_strdup_printf ("%u 0 obj\n", _tmp332_);
+ _tmp334_ = _tmp333_;
+ pdf_writer_write_string (_tmp331_, _tmp334_);
+ _g_free0 (_tmp334_);
+ _tmp335_ = writer;
+ pdf_writer_write_string (_tmp335_, "<<\n");
+ _tmp336_ = writer;
+ _tmp337_ = command;
+ _tmp338_ = strlen (_tmp337_);
+ _tmp339_ = _tmp338_;
+ _tmp340_ = g_strdup_printf ("/Length %d\n", _tmp339_ + 1);
+ _tmp341_ = _tmp340_;
+ pdf_writer_write_string (_tmp336_, _tmp341_);
+ _g_free0 (_tmp341_);
+ _tmp342_ = writer;
+ pdf_writer_write_string (_tmp342_, ">>\n");
+ _tmp343_ = writer;
+ pdf_writer_write_string (_tmp343_, "stream\n");
+ _tmp344_ = writer;
+ _tmp345_ = command;
+ pdf_writer_write_string (_tmp344_, _tmp345_);
_tmp346_ = writer;
- _tmp347_ = command;
- _tmp348_ = strlen (_tmp347_);
- _tmp349_ = _tmp348_;
- _tmp350_ = g_strdup_printf ("/Length %d\n", _tmp349_ + 1);
- _tmp351_ = _tmp350_;
- pdf_writer_write_string (_tmp346_, _tmp351_);
- _g_free0 (_tmp351_);
- _tmp352_ = writer;
- pdf_writer_write_string (_tmp352_, ">>\n");
- _tmp353_ = writer;
- pdf_writer_write_string (_tmp353_, "stream\n");
- _tmp354_ = writer;
- _tmp355_ = command;
- pdf_writer_write_string (_tmp354_, _tmp355_);
- _tmp356_ = writer;
- pdf_writer_write_string (_tmp356_, "\n");
- _tmp357_ = writer;
- pdf_writer_write_string (_tmp357_, "endstream\n");
- _tmp358_ = writer;
- pdf_writer_write_string (_tmp358_, "endobj\n");
+ pdf_writer_write_string (_tmp346_, "\n");
+ _tmp347_ = writer;
+ pdf_writer_write_string (_tmp347_, "endstream\n");
+ _tmp348_ = writer;
+ pdf_writer_write_string (_tmp348_, "endobj\n");
_g_free0 (command);
compressed_data = (g_free (compressed_data), NULL);
data = (g_free (data), NULL);
@@ -2357,100 +2329,100 @@ static void book_save_pdf (Book* self, GFile* file, GError** error) {
}
}
}
- _tmp359_ = writer;
- pdf_writer_write_string (_tmp359_, "\n");
+ _tmp349_ = writer;
+ pdf_writer_write_string (_tmp349_, "\n");
+ _tmp350_ = writer;
+ _tmp351_ = pdf_writer_start_object (_tmp350_);
+ info_number = _tmp351_;
+ _tmp352_ = writer;
+ _tmp353_ = info_number;
+ _tmp354_ = g_strdup_printf ("%u 0 obj\n", _tmp353_);
+ _tmp355_ = _tmp354_;
+ pdf_writer_write_string (_tmp352_, _tmp355_);
+ _g_free0 (_tmp355_);
+ _tmp356_ = writer;
+ pdf_writer_write_string (_tmp356_, "<<\n");
+ _tmp357_ = writer;
+ _tmp358_ = g_strdup_printf ("/Creator (Simple Scan %s)\n", VERSION);
+ _tmp359_ = _tmp358_;
+ pdf_writer_write_string (_tmp357_, _tmp359_);
+ _g_free0 (_tmp359_);
_tmp360_ = writer;
- _tmp361_ = pdf_writer_start_object (_tmp360_);
- info_number = _tmp361_;
+ pdf_writer_write_string (_tmp360_, ">>\n");
+ _tmp361_ = writer;
+ pdf_writer_write_string (_tmp361_, "endobj\n");
_tmp362_ = writer;
- _tmp363_ = info_number;
- _tmp364_ = g_strdup_printf ("%u 0 obj\n", _tmp363_);
- _tmp365_ = _tmp364_;
- pdf_writer_write_string (_tmp362_, _tmp365_);
- _g_free0 (_tmp365_);
+ _tmp363_ = _tmp362_->offset;
+ xref_offset = _tmp363_;
+ _tmp364_ = writer;
+ pdf_writer_write_string (_tmp364_, "xref\n");
+ _tmp365_ = writer;
_tmp366_ = writer;
- pdf_writer_write_string (_tmp366_, "<<\n");
- _tmp367_ = writer;
- _tmp368_ = g_strdup_printf ("/Creator (Simple Scan %s)\n", VERSION);
- _tmp369_ = _tmp368_;
- pdf_writer_write_string (_tmp367_, _tmp369_);
- _g_free0 (_tmp369_);
- _tmp370_ = writer;
- pdf_writer_write_string (_tmp370_, ">>\n");
+ _tmp367_ = _tmp366_->object_offsets;
+ _tmp368_ = g_list_length (_tmp367_);
+ _tmp369_ = g_strdup_printf ("1 %zu\n", (gsize) _tmp368_);
+ _tmp370_ = _tmp369_;
+ pdf_writer_write_string (_tmp365_, _tmp370_);
+ _g_free0 (_tmp370_);
_tmp371_ = writer;
- pdf_writer_write_string (_tmp371_, "endobj\n");
- _tmp372_ = writer;
- _tmp373_ = _tmp372_->offset;
- xref_offset = _tmp373_;
- _tmp374_ = writer;
- pdf_writer_write_string (_tmp374_, "xref\n");
- _tmp375_ = writer;
- _tmp376_ = writer;
- _tmp377_ = _tmp376_->object_offsets;
- _tmp378_ = g_list_length (_tmp377_);
- _tmp379_ = g_strdup_printf ("1 %zu\n", (gsize) _tmp378_);
- _tmp380_ = _tmp379_;
- pdf_writer_write_string (_tmp375_, _tmp380_);
- _g_free0 (_tmp380_);
- _tmp381_ = writer;
- _tmp382_ = _tmp381_->object_offsets;
+ _tmp372_ = _tmp371_->object_offsets;
{
GList* offset_collection = NULL;
GList* offset_it = NULL;
- offset_collection = _tmp382_;
+ offset_collection = _tmp372_;
for (offset_it = offset_collection; offset_it != NULL; offset_it = offset_it->next) {
guint offset = 0U;
offset = GPOINTER_TO_UINT (offset_it->data);
{
- PDFWriter* _tmp383_;
- guint _tmp384_;
- gchar* _tmp385_ = NULL;
- gchar* _tmp386_;
- _tmp383_ = writer;
- _tmp384_ = offset;
- _tmp385_ = g_strdup_printf ("%010zu 00000 n \n", (gsize) _tmp384_);
- _tmp386_ = _tmp385_;
- pdf_writer_write_string (_tmp383_, _tmp386_);
- _g_free0 (_tmp386_);
+ PDFWriter* _tmp373_;
+ guint _tmp374_;
+ gchar* _tmp375_ = NULL;
+ gchar* _tmp376_;
+ _tmp373_ = writer;
+ _tmp374_ = offset;
+ _tmp375_ = g_strdup_printf ("%010zu 00000 n \n", (gsize) _tmp374_);
+ _tmp376_ = _tmp375_;
+ pdf_writer_write_string (_tmp373_, _tmp376_);
+ _g_free0 (_tmp376_);
}
}
}
- _tmp387_ = writer;
- pdf_writer_write_string (_tmp387_, "trailer\n");
- _tmp388_ = writer;
- pdf_writer_write_string (_tmp388_, "<<\n");
+ _tmp377_ = writer;
+ pdf_writer_write_string (_tmp377_, "trailer\n");
+ _tmp378_ = writer;
+ pdf_writer_write_string (_tmp378_, "<<\n");
+ _tmp379_ = writer;
+ _tmp380_ = writer;
+ _tmp381_ = _tmp380_->object_offsets;
+ _tmp382_ = g_list_length (_tmp381_);
+ _tmp383_ = g_strdup_printf ("/Size %zu\n", (gsize) _tmp382_);
+ _tmp384_ = _tmp383_;
+ pdf_writer_write_string (_tmp379_, _tmp384_);
+ _g_free0 (_tmp384_);
+ _tmp385_ = writer;
+ _tmp386_ = info_number;
+ _tmp387_ = g_strdup_printf ("/Info %u 0 R\n", _tmp386_);
+ _tmp388_ = _tmp387_;
+ pdf_writer_write_string (_tmp385_, _tmp388_);
+ _g_free0 (_tmp388_);
_tmp389_ = writer;
- _tmp390_ = writer;
- _tmp391_ = _tmp390_->object_offsets;
- _tmp392_ = g_list_length (_tmp391_);
- _tmp393_ = g_strdup_printf ("/Size %zu\n", (gsize) _tmp392_);
- _tmp394_ = _tmp393_;
- pdf_writer_write_string (_tmp389_, _tmp394_);
- _g_free0 (_tmp394_);
+ _tmp390_ = catalog_number;
+ _tmp391_ = g_strdup_printf ("/Root %u 0 R\n", _tmp390_);
+ _tmp392_ = _tmp391_;
+ pdf_writer_write_string (_tmp389_, _tmp392_);
+ _g_free0 (_tmp392_);
+ _tmp393_ = writer;
+ pdf_writer_write_string (_tmp393_, ">>\n");
+ _tmp394_ = writer;
+ pdf_writer_write_string (_tmp394_, "startxref\n");
_tmp395_ = writer;
- _tmp396_ = info_number;
- _tmp397_ = g_strdup_printf ("/Info %u 0 R\n", _tmp396_);
+ _tmp396_ = xref_offset;
+ _tmp397_ = g_strdup_printf ("%zu\n", _tmp396_);
_tmp398_ = _tmp397_;
pdf_writer_write_string (_tmp395_, _tmp398_);
_g_free0 (_tmp398_);
_tmp399_ = writer;
- _tmp400_ = catalog_number;
- _tmp401_ = g_strdup_printf ("/Root %u 0 R\n", _tmp400_);
- _tmp402_ = _tmp401_;
- pdf_writer_write_string (_tmp399_, _tmp402_);
- _g_free0 (_tmp402_);
- _tmp403_ = writer;
- pdf_writer_write_string (_tmp403_, ">>\n");
- _tmp404_ = writer;
- pdf_writer_write_string (_tmp404_, "startxref\n");
- _tmp405_ = writer;
- _tmp406_ = xref_offset;
- _tmp407_ = g_strdup_printf ("%zu\n", _tmp406_);
- _tmp408_ = _tmp407_;
- pdf_writer_write_string (_tmp405_, _tmp408_);
- _g_free0 (_tmp408_);
- _tmp409_ = writer;
- pdf_writer_write_string (_tmp409_, "%%EOF\n");
+ pdf_writer_write_string (_tmp399_, "%%EOF\n");
_pdf_writer_unref0 (writer);
_g_object_unref0 (stream);
}
@@ -2811,7 +2783,7 @@ void pdf_writer_write (PDFWriter* self, guint8* data, int data_length1) {
_inner_error_ = NULL;
_tmp2_ = e;
_tmp3_ = _tmp2_->message;
- g_warning ("book.vala:530: Error writing PDF: %s", _tmp3_);
+ g_warning ("book.vala:538: Error writing PDF: %s", _tmp3_);
_g_error_free0 (e);
}
__finally0:
@@ -3118,7 +3090,7 @@ static cairo_status_t ps_writer_write_cairo_data (PsWriter* self, guint8* data,
_inner_error_ = NULL;
_tmp2_ = e;
_tmp3_ = _tmp2_->message;
- g_warning ("book.vala:566: Error writing data: %s", _tmp3_);
+ g_warning ("book.vala:574: Error writing data: %s", _tmp3_);
result = CAIRO_STATUS_WRITE_ERROR;
_g_error_free0 (e);
return result;
diff --git a/src/book.vala b/src/book.vala
index a410264..c931f41 100644
--- a/src/book.vala
+++ b/src/book.vala
@@ -272,7 +272,7 @@ public class Book
{
depth = 8;
color_space = "DeviceRGB";
- var data_length = height * width * 3 + 1;
+ var data_length = height * width * 3;
data = new uint8[data_length];
for (var row = 0; row < height; row++)
{
@@ -297,20 +297,23 @@ public class Book
var data_length = height * ((width * 2 + 7) / 8);
data = new uint8[data_length];
var offset = 0;
- data[offset] = 0;
for (var row = 0; row < height; row++)
{
/* Pad to the next line */
if (shift_count != 6)
{
offset++;
- data[offset] = 0;
shift_count = 6;
}
var in_offset = row * image.get_rowstride ();
for (var x = 0; x < width; x++)
{
+ /* Clear byte */
+ if (shift_count == 6)
+ data[offset] = 0;
+
+ /* Set bits */
var p = pixels[in_offset + x*3];
if (p >= 192)
data[offset] |= 3 << shift_count;
@@ -318,10 +321,11 @@ public class Book
data[offset] |= 2 << shift_count;
else if (p >= 64)
data[offset] |= 1 << shift_count;
+
+ /* Move to the next position */
if (shift_count == 0)
{
offset++;
- data[offset] = 0;
shift_count = 6;
}
else
@@ -338,27 +342,31 @@ public class Book
var data_length = height * ((width + 7) / 8);
data = new uint8[data_length];
var offset = 0;
- data[offset] = 0;
for (var row = 0; row < height; row++)
{
/* Pad to the next line */
if (mask != 0x80)
{
offset++;
- data[offset] = 0;
mask = 0x80;
}
var in_offset = row * image.get_rowstride ();
for (var x = 0; x < width; x++)
{
+ /* Clear byte */
+ if (mask == 0x80)
+ data[offset] = 0;
+
+ /* Set bit */
if (pixels[in_offset+x*3] != 0)
data[offset] |= (uint8) mask;
+
+ /* Move to the next bit */
mask >>= 1;
if (mask == 0)
{
offset++;
- data[offset] = 0;
mask = 0x80;
}
}
@@ -368,7 +376,7 @@ public class Book
{
depth = 8;
color_space = "DeviceGray";
- var data_length = height * width + 1;
+ var data_length = height * width;
data = new uint8 [data_length];
for (var row = 0; row < height; row++)
{
diff --git a/src/page-view.c b/src/page-view.c
index 6ee1096..a2f26ef 100644
--- a/src/page-view.c
+++ b/src/page-view.c
@@ -1,4 +1,4 @@
-/* page-view.c generated by valac 0.14.0, the Vala compiler
+/* page-view.c generated by valac 0.15.2, the Vala compiler
* generated from page-view.vala, do not modify */
/*
@@ -14,7 +14,7 @@
#include <glib.h>
#include <glib-object.h>
-#include <gdk-pixbuf/gdk-pixdata.h>
+#include <gdk-pixbuf/gdk-pixbuf.h>
#include <float.h>
#include <math.h>
#include <gdk/gdk.h>
diff --git a/src/page.c b/src/page.c
index 96bbc17..424c2e9 100644
--- a/src/page.c
+++ b/src/page.c
@@ -1,4 +1,4 @@
-/* page.c generated by valac 0.14.0, the Vala compiler
+/* page.c generated by valac 0.15.2, the Vala compiler
* generated from page.vala, do not modify */
/*
@@ -18,7 +18,7 @@
#include <string.h>
#include <float.h>
#include <math.h>
-#include <gdk-pixbuf/gdk-pixdata.h>
+#include <gdk-pixbuf/gdk-pixbuf.h>
#include <glib/gstdio.h>
#include <gio/gio.h>
#include <gobject/gvaluecollector.h>
diff --git a/src/scanner.c b/src/scanner.c
index ff756ec..c91ff4c 100644
--- a/src/scanner.c
+++ b/src/scanner.c
@@ -1,4 +1,4 @@
-/* scanner.c generated by valac 0.14.0, the Vala compiler
+/* scanner.c generated by valac 0.15.2, the Vala compiler
* generated from scanner.vala, do not modify */
/*
@@ -19,9 +19,9 @@
#include <string.h>
#include <float.h>
#include <math.h>
-#include <sane/sane.h>
+#include "sane/sane.h"
#include <glib/gi18n-lib.h>
-#include <sane/saneopts.h>
+#include "sane/saneopts.h"
#include <gobject/gvaluecollector.h>
@@ -3399,7 +3399,7 @@ static gchar* string_replace (const gchar* self, const gchar* old, const gchar*
regex = _tmp4_;
if (_inner_error_ != NULL) {
if (_inner_error_->domain == G_REGEX_ERROR) {
- goto __catch9_g_regex_error;
+ goto __catch13_g_regex_error;
}
g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
g_clear_error (&_inner_error_);
@@ -3412,7 +3412,7 @@ static gchar* string_replace (const gchar* self, const gchar* old, const gchar*
if (_inner_error_ != NULL) {
_g_regex_unref0 (regex);
if (_inner_error_->domain == G_REGEX_ERROR) {
- goto __catch9_g_regex_error;
+ goto __catch13_g_regex_error;
}
_g_regex_unref0 (regex);
g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
@@ -3423,8 +3423,8 @@ static gchar* string_replace (const gchar* self, const gchar* old, const gchar*
_g_regex_unref0 (regex);
return result;
}
- goto __finally9;
- __catch9_g_regex_error:
+ goto __finally13;
+ __catch13_g_regex_error:
{
GError* e = NULL;
e = _inner_error_;
@@ -3432,7 +3432,7 @@ static gchar* string_replace (const gchar* self, const gchar* old, const gchar*
g_assert_not_reached ();
_g_error_free0 (e);
}
- __finally9:
+ __finally13:
if (_inner_error_ != NULL) {
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
g_clear_error (&_inner_error_);
@@ -4160,120 +4160,126 @@ static gchar string_get (const gchar* self, glong index) {
static gboolean scanner_set_string_option (Scanner* self, SANE_Handle handle, SANE_Option_Descriptor* option, SANE_Int option_index, const gchar* value, gchar** _result_) {
gchar* _vala_result = NULL;
gboolean result = FALSE;
- SANE_Option_Descriptor* _tmp0_;
- SANE_Value_Type _tmp1_;
- SANE_Option_Descriptor* _tmp2_;
- SANE_Int _tmp3_;
- gchar* _tmp4_ = NULL;
+ gchar* _tmp0_;
+ SANE_Option_Descriptor* _tmp1_;
+ SANE_Value_Type _tmp2_;
+ SANE_Option_Descriptor* _tmp3_;
+ SANE_Int _tmp4_;
+ gchar* _tmp5_ = NULL;
gchar* s;
gint s_length1;
gint _s_size_;
gint i;
- gchar* _tmp22_;
- gint _tmp22__length1;
- gint _tmp23_;
- gchar _tmp24_;
- SANE_Handle _tmp25_;
- SANE_Int _tmp26_;
- gchar* _tmp27_;
- gint _tmp27__length1;
- SANE_Status _tmp28_ = 0;
+ gchar* _tmp23_;
+ gint _tmp23__length1;
+ gint _tmp24_;
+ gchar _tmp25_;
+ SANE_Handle _tmp26_;
+ SANE_Int _tmp27_;
+ gchar* _tmp28_;
+ gint _tmp28__length1;
+ SANE_Status _tmp29_ = 0;
SANE_Status status;
- gchar* _tmp29_;
- gint _tmp29__length1;
gchar* _tmp30_;
- SANE_Int _tmp31_;
- const gchar* _tmp32_;
- gchar* _tmp33_ = NULL;
- gchar* _tmp34_;
+ gint _tmp30__length1;
+ gchar* _tmp31_;
+ SANE_Int _tmp32_;
+ const gchar* _tmp33_;
+ gchar* _tmp34_ = NULL;
+ gchar* _tmp35_;
+ const gchar* _tmp36_;
g_return_val_if_fail (self != NULL, FALSE);
g_return_val_if_fail (option != NULL, FALSE);
g_return_val_if_fail (value != NULL, FALSE);
- _tmp0_ = option;
- _tmp1_ = _tmp0_->type;
- g_return_val_if_fail (_tmp1_ == SANE_TYPE_STRING, FALSE);
- _tmp2_ = option;
- _tmp3_ = _tmp2_->size;
- _tmp4_ = g_new0 (gchar, _tmp3_);
- s = _tmp4_;
- s_length1 = _tmp3_;
+ _tmp0_ = g_strdup ("");
+ _g_free0 (_vala_result);
+ _vala_result = _tmp0_;
+ _tmp1_ = option;
+ _tmp2_ = _tmp1_->type;
+ g_return_val_if_fail (_tmp2_ == SANE_TYPE_STRING, FALSE);
+ _tmp3_ = option;
+ _tmp4_ = _tmp3_->size;
+ _tmp5_ = g_new0 (gchar, _tmp4_);
+ s = _tmp5_;
+ s_length1 = _tmp4_;
_s_size_ = s_length1;
i = 0;
{
- gboolean _tmp5_;
- _tmp5_ = TRUE;
+ gboolean _tmp6_;
+ _tmp6_ = TRUE;
while (TRUE) {
- gboolean _tmp6_;
- gboolean _tmp8_ = FALSE;
- gint _tmp9_;
- SANE_Option_Descriptor* _tmp10_;
- SANE_Int _tmp11_;
- gboolean _tmp15_;
- gchar* _tmp16_;
- gint _tmp16__length1;
- gint _tmp17_;
- const gchar* _tmp18_;
- gint _tmp19_;
- gchar _tmp20_ = '\0';
- gchar _tmp21_;
- _tmp6_ = _tmp5_;
- if (!_tmp6_) {
- gint _tmp7_;
- _tmp7_ = i;
- i = _tmp7_ + 1;
+ gboolean _tmp7_;
+ gboolean _tmp9_ = FALSE;
+ gint _tmp10_;
+ SANE_Option_Descriptor* _tmp11_;
+ SANE_Int _tmp12_;
+ gboolean _tmp16_;
+ gchar* _tmp17_;
+ gint _tmp17__length1;
+ gint _tmp18_;
+ const gchar* _tmp19_;
+ gint _tmp20_;
+ gchar _tmp21_ = '\0';
+ gchar _tmp22_;
+ _tmp7_ = _tmp6_;
+ if (!_tmp7_) {
+ gint _tmp8_;
+ _tmp8_ = i;
+ i = _tmp8_ + 1;
}
- _tmp5_ = FALSE;
- _tmp9_ = i;
- _tmp10_ = option;
- _tmp11_ = _tmp10_->size;
- if (((SANE_Int) _tmp9_) < (_tmp11_ - 1)) {
- const gchar* _tmp12_;
- gint _tmp13_;
- gchar _tmp14_ = '\0';
- _tmp12_ = value;
- _tmp13_ = i;
- _tmp14_ = string_get (_tmp12_, (glong) _tmp13_);
- _tmp8_ = _tmp14_ != '\0';
+ _tmp6_ = FALSE;
+ _tmp10_ = i;
+ _tmp11_ = option;
+ _tmp12_ = _tmp11_->size;
+ if (((SANE_Int) _tmp10_) < (_tmp12_ - 1)) {
+ const gchar* _tmp13_;
+ gint _tmp14_;
+ gchar _tmp15_ = '\0';
+ _tmp13_ = value;
+ _tmp14_ = i;
+ _tmp15_ = string_get (_tmp13_, (glong) _tmp14_);
+ _tmp9_ = _tmp15_ != '\0';
} else {
- _tmp8_ = FALSE;
+ _tmp9_ = FALSE;
}
- _tmp15_ = _tmp8_;
- if (!_tmp15_) {
+ _tmp16_ = _tmp9_;
+ if (!_tmp16_) {
break;
}
- _tmp16_ = s;
- _tmp16__length1 = s_length1;
- _tmp17_ = i;
- _tmp18_ = value;
- _tmp19_ = i;
- _tmp20_ = string_get (_tmp18_, (glong) _tmp19_);
- _tmp16_[_tmp17_] = _tmp20_;
- _tmp21_ = _tmp16_[_tmp17_];
+ _tmp17_ = s;
+ _tmp17__length1 = s_length1;
+ _tmp18_ = i;
+ _tmp19_ = value;
+ _tmp20_ = i;
+ _tmp21_ = string_get (_tmp19_, (glong) _tmp20_);
+ _tmp17_[_tmp18_] = _tmp21_;
+ _tmp22_ = _tmp17_[_tmp18_];
}
}
- _tmp22_ = s;
- _tmp22__length1 = s_length1;
- _tmp23_ = i;
- _tmp22_[_tmp23_] = '\0';
- _tmp24_ = _tmp22_[_tmp23_];
- _tmp25_ = handle;
- _tmp26_ = option_index;
- _tmp27_ = s;
- _tmp27__length1 = s_length1;
- _tmp28_ = sane_control_option (_tmp25_, _tmp26_, SANE_ACTION_SET_VALUE, _tmp27_, NULL);
- status = _tmp28_;
- _tmp29_ = s;
- _tmp29__length1 = s_length1;
- _tmp30_ = g_strdup ((const gchar*) _tmp29_);
+ _tmp23_ = s;
+ _tmp23__length1 = s_length1;
+ _tmp24_ = i;
+ _tmp23_[_tmp24_] = '\0';
+ _tmp25_ = _tmp23_[_tmp24_];
+ _tmp26_ = handle;
+ _tmp27_ = option_index;
+ _tmp28_ = s;
+ _tmp28__length1 = s_length1;
+ _tmp29_ = sane_control_option (_tmp26_, _tmp27_, SANE_ACTION_SET_VALUE, _tmp28_, NULL);
+ status = _tmp29_;
+ _tmp30_ = s;
+ _tmp30__length1 = s_length1;
+ _tmp31_ = g_strdup ((const gchar*) _tmp30_);
_g_free0 (_vala_result);
- _vala_result = _tmp30_;
- _tmp31_ = option_index;
- _tmp32_ = value;
- _tmp33_ = sane_status_to_string (status);
- _tmp34_ = _tmp33_;
- g_debug ("scanner.vala:479: sane_control_option (%d, SANE_ACTION_SET_VALUE, \"%s" \
-"\") -> (%s, \"%s\")", (gint) _tmp31_, _tmp32_, _tmp34_, _vala_result);
- _g_free0 (_tmp34_);
+ _vala_result = _tmp31_;
+ _tmp32_ = option_index;
+ _tmp33_ = value;
+ _tmp34_ = sane_status_to_string (status);
+ _tmp35_ = _tmp34_;
+ _tmp36_ = _vala_result;
+ g_debug ("scanner.vala:481: sane_control_option (%d, SANE_ACTION_SET_VALUE, \"%s" \
+"\") -> (%s, \"%s\")", (gint) _tmp32_, _tmp33_, _tmp35_, _tmp36_);
+ _g_free0 (_tmp35_);
result = status == SANE_STATUS_GOOD;
s = (g_free (s), NULL);
if (_result_) {
@@ -4292,6 +4298,7 @@ static gboolean scanner_set_constrained_string_option (Scanner* self, SANE_Handl
SANE_Value_Type _tmp1_;
SANE_Option_Descriptor* _tmp2_;
SANE_Constraint_Type _tmp3_;
+ gchar* _tmp36_;
g_return_val_if_fail (self != NULL, FALSE);
g_return_val_if_fail (option != NULL, FALSE);
_tmp0_ = option;
@@ -4417,6 +4424,9 @@ static gboolean scanner_set_constrained_string_option (Scanner* self, SANE_Handl
}
}
}
+ _tmp36_ = g_strdup ("");
+ _g_free0 (_vala_result);
+ _vala_result = _tmp36_;
result = FALSE;
if (_result_) {
*_result_ = _vala_result;
@@ -5144,7 +5154,7 @@ static void scanner_log_option (Scanner* self, SANE_Int index, SANE_Option_Descr
}
}
_tmp214_ = s;
- g_debug ("scanner.vala:666: %s", _tmp214_);
+ g_debug ("scanner.vala:669: %s", _tmp214_);
_tmp215_ = option;
_tmp216_ = _tmp215_->desc;
if (_tmp216_ != NULL) {
@@ -5152,7 +5162,7 @@ static void scanner_log_option (Scanner* self, SANE_Int index, SANE_Option_Descr
const gchar* _tmp218_;
_tmp217_ = option;
_tmp218_ = _tmp217_->desc;
- g_debug ("scanner.vala:669: Description: %s", _tmp218_);
+ g_debug ("scanner.vala:672: Description: %s", _tmp218_);
}
_g_free0 (s);
}
@@ -5341,10 +5351,10 @@ static void scanner_close_device (Scanner* self) {
SANE_Handle _tmp2_;
_tmp1_ = self->priv->handle;
sane_cancel (_tmp1_);
- g_debug ("scanner.vala:696: sane_cancel ()");
+ g_debug ("scanner.vala:699: sane_cancel ()");
_tmp2_ = self->priv->handle;
sane_close (_tmp2_);
- g_debug ("scanner.vala:699: sane_close ()");
+ g_debug ("scanner.vala:702: sane_close ()");
self->priv->have_handle = FALSE;
}
self->priv->buffer = (g_free (self->priv->buffer), NULL);
@@ -5445,7 +5455,7 @@ static gboolean scanner_handle_requests (Scanner* self) {
_request_unref0 (request);
return result;
}
- g_debug ("scanner.vala:733: Processing request");
+ g_debug ("scanner.vala:736: Processing request");
_tmp14_ = request_count;
request_count = _tmp14_ + 1;
_tmp15_ = request;
@@ -5547,7 +5557,7 @@ static void scanner_do_open (Scanner* self) {
_tmp12_ = _tmp11_->device;
if (_tmp12_ == NULL) {
const gchar* _tmp13_ = NULL;
- g_warning ("scanner.vala:770: No scan device available");
+ g_warning ("scanner.vala:773: No scan device available");
_tmp13_ = _ ("No scanners available. Please connect a scanner.");
scanner_fail_scan (self, 0, _tmp13_);
_scan_job_unref0 (job);
@@ -5569,7 +5579,7 @@ static void scanner_do_open (Scanner* self) {
}
_tmp18_ = self->priv->handle;
sane_close (_tmp18_);
- g_debug ("scanner.vala:787: sane_close ()");
+ g_debug ("scanner.vala:790: sane_close ()");
self->priv->have_handle = FALSE;
}
_g_free0 (self->priv->current_device);
@@ -5585,7 +5595,7 @@ static void scanner_do_open (Scanner* self) {
_tmp25_ = status;
_tmp26_ = sane_status_to_string (_tmp25_);
_tmp27_ = _tmp26_;
- g_debug ("scanner.vala:795: sane_open (\"%s\") -> %s", _tmp24_, _tmp27_);
+ g_debug ("scanner.vala:798: sane_open (\"%s\") -> %s", _tmp24_, _tmp27_);
_g_free0 (_tmp27_);
_tmp28_ = status;
if (_tmp28_ != SANE_STATUS_GOOD) {
@@ -5595,7 +5605,7 @@ static void scanner_do_open (Scanner* self) {
const gchar* _tmp32_ = NULL;
_tmp29_ = status;
_tmp30_ = sane_strstatus (_tmp29_);
- g_warning ("scanner.vala:799: Unable to get open device: %s", _tmp30_);
+ g_warning ("scanner.vala:802: Unable to get open device: %s", _tmp30_);
_tmp31_ = status;
_tmp32_ = _ ("Unable to connect to scanner");
scanner_fail_scan (self, (gint) _tmp31_, _tmp32_);
@@ -5649,7 +5659,7 @@ static void scanner_do_get_option (Scanner* self) {
_tmp5_ = sane_get_option_descriptor (_tmp3_, _tmp4_);
option = _tmp5_;
_tmp6_ = self->priv->option_index;
- g_debug ("scanner.vala:816: sane_get_option_descriptor (%d)", (gint) _tmp6_);
+ g_debug ("scanner.vala:819: sane_get_option_descriptor (%d)", (gint) _tmp6_);
_tmp7_ = self->priv->option_index;
index = _tmp7_;
_tmp8_ = self->priv->option_index;
@@ -5671,7 +5681,7 @@ static void scanner_do_get_option (Scanner* self) {
_tmp13_ = sane_get_option_descriptor (_tmp11_, _tmp12_);
option = _tmp13_;
_tmp14_ = self->priv->br_x_option_index;
- g_debug ("scanner.vala:826: sane_get_option_descriptor (%d)", (gint) _tmp14_);
+ g_debug ("scanner.vala:829: sane_get_option_descriptor (%d)", (gint) _tmp14_);
_tmp15_ = option;
_tmp16_ = _tmp15_->constraint_type;
if (_tmp16_ == SANE_CONSTRAINT_RANGE) {
@@ -5725,7 +5735,7 @@ static void scanner_do_get_option (Scanner* self) {
_tmp35_ = sane_get_option_descriptor (_tmp33_, _tmp34_);
option = _tmp35_;
_tmp36_ = self->priv->br_y_option_index;
- g_debug ("scanner.vala:838: sane_get_option_descriptor (%d)", (gint) _tmp36_);
+ g_debug ("scanner.vala:841: sane_get_option_descriptor (%d)", (gint) _tmp36_);
_tmp37_ = option;
_tmp38_ = _tmp37_->constraint_type;
if (_tmp38_ == SANE_CONSTRAINT_RANGE) {
@@ -5981,7 +5991,7 @@ static void scanner_do_get_option (Scanner* self) {
_tmp124__length1 = flatbed_sources_length1;
_tmp125_ = scanner_set_constrained_string_option (self, _tmp121_, _tmp122_, _tmp123_, _tmp124_, _tmp124__length1, NULL);
if (!_tmp125_) {
- g_warning ("scanner.vala:922: Unable to set single page source, please file a bug");
+ g_warning ("scanner.vala:925: Unable to set single page source, please file a bug");
}
}
break;
@@ -6014,7 +6024,7 @@ static void scanner_do_get_option (Scanner* self) {
_tmp134__length1 = adf_sources_length1;
_tmp135_ = scanner_set_constrained_string_option (self, _tmp131_, _tmp132_, _tmp133_, _tmp134_, _tmp134__length1, NULL);
if (!(!_tmp135_)) {
- g_warning ("scanner.vala:927: Unable to set front ADF source, please file a bug");
+ g_warning ("scanner.vala:930: Unable to set front ADF source, please file a bug");
}
}
break;
@@ -6047,7 +6057,7 @@ static void scanner_do_get_option (Scanner* self) {
_tmp144__length1 = adf_sources_length1;
_tmp145_ = scanner_set_constrained_string_option (self, _tmp141_, _tmp142_, _tmp143_, _tmp144_, _tmp144__length1, NULL);
if (!_tmp145_) {
- g_warning ("scanner.vala:932: Unable to set back ADF source, please file a bug");
+ g_warning ("scanner.vala:935: Unable to set back ADF source, please file a bug");
}
}
break;
@@ -6080,7 +6090,7 @@ static void scanner_do_get_option (Scanner* self) {
_tmp154__length1 = adf_sources_length1;
_tmp155_ = scanner_set_constrained_string_option (self, _tmp151_, _tmp152_, _tmp153_, _tmp154_, _tmp154__length1, NULL);
if (!_tmp155_) {
- g_warning ("scanner.vala:937: Unable to set duplex ADF source, please file a bug");
+ g_warning ("scanner.vala:940: Unable to set duplex ADF source, please file a bug");
}
}
break;
@@ -6300,7 +6310,7 @@ static void scanner_do_get_option (Scanner* self) {
_tmp226__length1 = color_scan_modes_length1;
_tmp227_ = scanner_set_constrained_string_option (self, _tmp223_, _tmp224_, _tmp225_, _tmp226_, _tmp226__length1, NULL);
if (!_tmp227_) {
- g_warning ("scanner.vala:995: Unable to set Color mode, please file a bug");
+ g_warning ("scanner.vala:998: Unable to set Color mode, please file a bug");
}
break;
}
@@ -6319,7 +6329,7 @@ static void scanner_do_get_option (Scanner* self) {
_tmp231__length1 = gray_scan_modes_length1;
_tmp232_ = scanner_set_constrained_string_option (self, _tmp228_, _tmp229_, _tmp230_, _tmp231_, _tmp231__length1, NULL);
if (!_tmp232_) {
- g_warning ("scanner.vala:999: Unable to set Gray mode, please file a bug");
+ g_warning ("scanner.vala:1002: Unable to set Gray mode, please file a bug");
}
break;
}
@@ -6338,7 +6348,7 @@ static void scanner_do_get_option (Scanner* self) {
_tmp236__length1 = lineart_scan_modes_length1;
_tmp237_ = scanner_set_constrained_string_option (self, _tmp233_, _tmp234_, _tmp235_, _tmp236_, _tmp236__length1, NULL);
if (!_tmp237_) {
- g_warning ("scanner.vala:1003: Unable to set Lineart mode, please file a bug");
+ g_warning ("scanner.vala:1006: Unable to set Lineart mode, please file a bug");
}
break;
}
@@ -6393,7 +6403,7 @@ static void scanner_do_get_option (Scanner* self) {
_tmp250__length1 = disable_compression_names_length1;
_tmp251_ = scanner_set_constrained_string_option (self, _tmp247_, _tmp248_, _tmp249_, _tmp250_, _tmp250__length1, NULL);
if (!_tmp251_) {
- g_warning ("scanner.vala:1021: Unable to disable compression, please file a bug");
+ g_warning ("scanner.vala:1024: Unable to disable compression, please file a bug");
}
disable_compression_names = (_vala_array_free (disable_compression_names, disable_compression_names_length1, (GDestroyNotify) g_free), NULL);
} else {
@@ -6638,7 +6648,7 @@ static void scanner_do_start (Scanner* self) {
_tmp6_ = status;
_tmp7_ = sane_status_to_string (_tmp6_);
_tmp8_ = _tmp7_;
- g_debug ("scanner.vala:1091: sane_start (page=%d, pass=%d) -> %s", _tmp4_, _tmp5_, _tmp8_);
+ g_debug ("scanner.vala:1094: sane_start (page=%d, pass=%d) -> %s", _tmp4_, _tmp5_, _tmp8_);
_g_free0 (_tmp8_);
_tmp9_ = status;
if (_tmp9_ == SANE_STATUS_GOOD) {
@@ -6655,7 +6665,7 @@ static void scanner_do_start (Scanner* self) {
const gchar* _tmp14_ = NULL;
_tmp11_ = status;
_tmp12_ = sane_strstatus (_tmp11_);
- g_warning ("scanner.vala:1098: Unable to start device: %s", _tmp12_);
+ g_warning ("scanner.vala:1101: Unable to start device: %s", _tmp12_);
_tmp13_ = status;
_tmp14_ = _ ("Unable to start scan");
scanner_fail_scan (self, (gint) _tmp13_, _tmp14_);
@@ -6791,7 +6801,7 @@ static void scanner_do_get_parameters (Scanner* self) {
_tmp3_ = status;
_tmp4_ = sane_status_to_string (_tmp3_);
_tmp5_ = _tmp4_;
- g_debug ("scanner.vala:1108: sane_get_parameters () -> %s", _tmp5_);
+ g_debug ("scanner.vala:1111: sane_get_parameters () -> %s", _tmp5_);
_g_free0 (_tmp5_);
_tmp6_ = status;
if (_tmp6_ != SANE_STATUS_GOOD) {
@@ -6801,7 +6811,7 @@ static void scanner_do_get_parameters (Scanner* self) {
const gchar* _tmp10_ = NULL;
_tmp7_ = status;
_tmp8_ = sane_strstatus (_tmp7_);
- g_warning ("scanner.vala:1111: Unable to get device parameters: %s", _tmp8_);
+ g_warning ("scanner.vala:1114: Unable to get device parameters: %s", _tmp8_);
_tmp9_ = status;
_tmp10_ = _ ("Error communicating with scanner");
scanner_fail_scan (self, (gint) _tmp9_, _tmp10_);
@@ -6831,7 +6841,7 @@ static void scanner_do_get_parameters (Scanner* self) {
_tmp27_ = _tmp26_.lines;
_tmp28_ = self->priv->parameters;
_tmp29_ = _tmp28_.depth;
- g_debug ("scanner.vala:1120: Parameters: format=%s last_frame=%s bytes_per_line=" \
+ g_debug ("scanner.vala:1123: Parameters: format=%s last_frame=%s bytes_per_line=" \
"%d pixels_per_line=%d lines=%d depth=%d", _tmp20_, _tmp21_, _tmp23_, _tmp25_, _tmp27_, _tmp29_);
_g_free0 (_tmp20_);
_tmp30_ = scan_page_info_new ();
@@ -6991,7 +7001,7 @@ static void scanner_do_complete_page (Scanner* self) {
}
_tmp13_ = self->priv->handle;
sane_cancel (_tmp13_);
- g_debug ("scanner.vala:1180: sane_cancel ()");
+ g_debug ("scanner.vala:1183: sane_cancel ()");
scanner_do_complete_document (self);
_scan_job_unref0 (job);
}
@@ -7023,16 +7033,16 @@ static void scanner_do_read (Scanner* self) {
gchar* _tmp15_;
SANE_Int _tmp16_;
SANE_Status _tmp17_;
- SANE_Status _tmp31_;
+ SANE_Status _tmp30_;
gboolean full_read;
- gboolean _tmp36_ = FALSE;
- gint _tmp37_;
- gboolean _tmp40_;
- gint _tmp41_;
- SANE_Int _tmp42_;
- gint _tmp43_;
- SANE_Parameters _tmp44_;
- gint _tmp45_;
+ gboolean _tmp35_ = FALSE;
+ gint _tmp36_;
+ gboolean _tmp39_;
+ gint _tmp40_;
+ SANE_Int _tmp41_;
+ gint _tmp42_;
+ SANE_Parameters _tmp43_;
+ gint _tmp44_;
g_return_if_fail (self != NULL);
_tmp0_ = self->priv->job_queue;
_tmp1_ = _tmp0_->data;
@@ -7057,7 +7067,7 @@ static void scanner_do_read (Scanner* self) {
_tmp14_ = sane_status_to_string (_tmp13_);
_tmp15_ = _tmp14_;
_tmp16_ = n_read;
- g_debug ("scanner.vala:1195: sane_read (%d) -> (%s, %d)", _tmp12_, _tmp15_, (gint) _tmp16_);
+ g_debug ("scanner.vala:1198: sane_read (%d) -> (%s, %d)", _tmp12_, _tmp15_, (gint) _tmp16_);
_g_free0 (_tmp15_);
_tmp17_ = status;
if (_tmp17_ == SANE_STATUS_EOF) {
@@ -7065,7 +7075,7 @@ static void scanner_do_read (Scanner* self) {
SANE_Parameters _tmp19_;
gint _tmp20_;
gboolean _tmp24_;
- gint _tmp29_;
+ gint _tmp28_;
_tmp19_ = self->priv->parameters;
_tmp20_ = _tmp19_.lines;
if (_tmp20_ > 0) {
@@ -7081,307 +7091,305 @@ static void scanner_do_read (Scanner* self) {
}
_tmp24_ = _tmp18_;
if (_tmp24_) {
- SANE_Parameters _tmp25_;
- gint _tmp26_;
- SANE_Parameters _tmp27_;
- gint _tmp28_;
- _tmp25_ = self->priv->parameters;
- _tmp26_ = _tmp25_.lines;
- _tmp27_ = self->priv->parameters;
- _tmp28_ = _tmp27_.lines;
- g_warning ("scanner.vala:1201: Scan completed with %d lines, expected %d lines", _tmp26_, _tmp28_);
+ gint _tmp25_;
+ SANE_Parameters _tmp26_;
+ gint _tmp27_;
+ _tmp25_ = self->priv->line_count;
+ _tmp26_ = self->priv->parameters;
+ _tmp27_ = _tmp26_.lines;
+ g_warning ("scanner.vala:1204: Scan completed with %d lines, expected %d lines", _tmp25_, _tmp27_);
}
- _tmp29_ = self->priv->n_used;
- if (_tmp29_ > 0) {
- gint _tmp30_;
- _tmp30_ = self->priv->n_used;
- g_warning ("scanner.vala:1203: Scan complete with %d bytes of unused data", _tmp30_);
+ _tmp28_ = self->priv->n_used;
+ if (_tmp28_ > 0) {
+ gint _tmp29_;
+ _tmp29_ = self->priv->n_used;
+ g_warning ("scanner.vala:1206: Scan complete with %d bytes of unused data", _tmp29_);
}
scanner_do_complete_page (self);
_scan_job_unref0 (job);
return;
}
- _tmp31_ = status;
- if (_tmp31_ != SANE_STATUS_GOOD) {
- SANE_Status _tmp32_;
- const gchar* _tmp33_ = NULL;
- SANE_Status _tmp34_;
- const gchar* _tmp35_ = NULL;
- _tmp32_ = status;
- _tmp33_ = sane_strstatus (_tmp32_);
- g_warning ("scanner.vala:1211: Unable to read frame from device: %s", _tmp33_);
- _tmp34_ = status;
- _tmp35_ = _ ("Error communicating with scanner");
- scanner_fail_scan (self, (gint) _tmp34_, _tmp35_);
+ _tmp30_ = status;
+ if (_tmp30_ != SANE_STATUS_GOOD) {
+ SANE_Status _tmp31_;
+ const gchar* _tmp32_ = NULL;
+ SANE_Status _tmp33_;
+ const gchar* _tmp34_ = NULL;
+ _tmp31_ = status;
+ _tmp32_ = sane_strstatus (_tmp31_);
+ g_warning ("scanner.vala:1214: Unable to read frame from device: %s", _tmp32_);
+ _tmp33_ = status;
+ _tmp34_ = _ ("Error communicating with scanner");
+ scanner_fail_scan (self, (gint) _tmp33_, _tmp34_);
_scan_job_unref0 (job);
return;
}
full_read = FALSE;
- _tmp37_ = self->priv->n_used;
- if (_tmp37_ == 0) {
- SANE_Int _tmp38_;
- guchar* _tmp39_;
- gint _tmp39__length1;
- _tmp38_ = n_read;
- _tmp39_ = self->priv->buffer;
- _tmp39__length1 = self->priv->buffer_length1;
- _tmp36_ = _tmp38_ == ((SANE_Int) _tmp39__length1);
+ _tmp36_ = self->priv->n_used;
+ if (_tmp36_ == 0) {
+ SANE_Int _tmp37_;
+ guchar* _tmp38_;
+ gint _tmp38__length1;
+ _tmp37_ = n_read;
+ _tmp38_ = self->priv->buffer;
+ _tmp38__length1 = self->priv->buffer_length1;
+ _tmp35_ = _tmp37_ == ((SANE_Int) _tmp38__length1);
} else {
- _tmp36_ = FALSE;
+ _tmp35_ = FALSE;
}
- _tmp40_ = _tmp36_;
- if (_tmp40_) {
+ _tmp39_ = _tmp35_;
+ if (_tmp39_) {
full_read = TRUE;
}
- _tmp41_ = self->priv->n_used;
- _tmp42_ = n_read;
- self->priv->n_used = _tmp41_ + ((gint) _tmp42_);
- _tmp43_ = self->priv->n_used;
- _tmp44_ = self->priv->parameters;
- _tmp45_ = _tmp44_.bytes_per_line;
- if (_tmp43_ >= _tmp45_) {
- ScanLine* _tmp46_;
+ _tmp40_ = self->priv->n_used;
+ _tmp41_ = n_read;
+ self->priv->n_used = _tmp40_ + ((gint) _tmp41_);
+ _tmp42_ = self->priv->n_used;
+ _tmp43_ = self->priv->parameters;
+ _tmp44_ = _tmp43_.bytes_per_line;
+ if (_tmp42_ >= _tmp44_) {
+ ScanLine* _tmp45_;
ScanLine* line;
- SANE_Parameters _tmp47_;
- SANE_Frame _tmp48_;
- ScanLine* _tmp54_;
- SANE_Parameters _tmp55_;
- gint _tmp56_;
- ScanLine* _tmp57_;
- SANE_Parameters _tmp58_;
- gint _tmp59_;
- ScanLine* _tmp60_;
- guchar* _tmp61_;
- gint _tmp61__length1;
- ScanLine* _tmp62_;
- SANE_Parameters _tmp63_;
- gint _tmp64_;
- ScanLine* _tmp65_;
- gint _tmp66_;
- ScanLine* _tmp67_;
- gint _tmp68_;
- ScanLine* _tmp69_;
+ SANE_Parameters _tmp46_;
+ SANE_Frame _tmp47_;
+ ScanLine* _tmp53_;
+ SANE_Parameters _tmp54_;
+ gint _tmp55_;
+ ScanLine* _tmp56_;
+ SANE_Parameters _tmp57_;
+ gint _tmp58_;
+ ScanLine* _tmp59_;
+ guchar* _tmp60_;
+ gint _tmp60__length1;
+ ScanLine* _tmp61_;
+ SANE_Parameters _tmp62_;
+ gint _tmp63_;
+ ScanLine* _tmp64_;
+ gint _tmp65_;
+ ScanLine* _tmp66_;
+ gint _tmp67_;
+ ScanLine* _tmp68_;
+ gint _tmp69_;
gint _tmp70_;
- gint _tmp71_;
- ScanLine* _tmp72_;
- gint _tmp73_;
- guchar* _tmp74_;
- gint _tmp74__length1;
+ ScanLine* _tmp71_;
+ gint _tmp72_;
+ guchar* _tmp73_;
+ gint _tmp73__length1;
gint buffer_size;
- gboolean _tmp75_;
- gint _tmp79_;
- guchar* _tmp80_ = NULL;
- gint _tmp81_;
- ScanLine* _tmp82_;
- gint _tmp83_;
- ScanLine* _tmp84_;
- gint _tmp85_;
+ gboolean _tmp74_;
+ gint _tmp78_;
+ guchar* _tmp79_ = NULL;
+ gint _tmp80_;
+ ScanLine* _tmp81_;
+ gint _tmp82_;
+ ScanLine* _tmp83_;
+ gint _tmp84_;
gint n_remaining;
+ gboolean _tmp102_ = FALSE;
gboolean _tmp103_ = FALSE;
gboolean _tmp104_ = FALSE;
- gboolean _tmp105_ = FALSE;
- SANE_Parameters _tmp106_;
- gint _tmp107_;
- gboolean _tmp110_;
- gboolean _tmp113_;
- gboolean _tmp116_;
- ScanLine* _tmp161_;
+ SANE_Parameters _tmp105_;
+ gint _tmp106_;
+ gboolean _tmp109_;
+ gboolean _tmp112_;
+ gboolean _tmp115_;
+ ScanLine* _tmp160_;
+ NotifyGotLine* _tmp161_;
NotifyGotLine* _tmp162_;
- NotifyGotLine* _tmp163_;
- _tmp46_ = scan_line_new ();
- line = _tmp46_;
- _tmp47_ = self->priv->parameters;
- _tmp48_ = _tmp47_.format;
- switch (_tmp48_) {
+ _tmp45_ = scan_line_new ();
+ line = _tmp45_;
+ _tmp46_ = self->priv->parameters;
+ _tmp47_ = _tmp46_.format;
+ switch (_tmp47_) {
case SANE_FRAME_GRAY:
{
+ ScanLine* _tmp48_;
+ _tmp48_ = line;
+ _tmp48_->channel = 0;
+ break;
+ }
+ case SANE_FRAME_RGB:
+ {
ScanLine* _tmp49_;
_tmp49_ = line;
- _tmp49_->channel = 0;
+ _tmp49_->channel = -1;
break;
}
- case SANE_FRAME_RGB:
+ case SANE_FRAME_RED:
{
ScanLine* _tmp50_;
_tmp50_ = line;
- _tmp50_->channel = -1;
+ _tmp50_->channel = 0;
break;
}
- case SANE_FRAME_RED:
+ case SANE_FRAME_GREEN:
{
ScanLine* _tmp51_;
_tmp51_ = line;
- _tmp51_->channel = 0;
+ _tmp51_->channel = 1;
break;
}
- case SANE_FRAME_GREEN:
+ case SANE_FRAME_BLUE:
{
ScanLine* _tmp52_;
_tmp52_ = line;
- _tmp52_->channel = 1;
- break;
- }
- case SANE_FRAME_BLUE:
- {
- ScanLine* _tmp53_;
- _tmp53_ = line;
- _tmp53_->channel = 2;
+ _tmp52_->channel = 2;
break;
}
default:
break;
}
- _tmp54_ = line;
- _tmp55_ = self->priv->parameters;
- _tmp56_ = _tmp55_.pixels_per_line;
- _tmp54_->width = _tmp56_;
- _tmp57_ = line;
- _tmp58_ = self->priv->parameters;
- _tmp59_ = _tmp58_.depth;
- _tmp57_->depth = _tmp59_;
- _tmp60_ = line;
- _tmp61_ = self->priv->buffer;
- _tmp61__length1 = self->priv->buffer_length1;
+ _tmp53_ = line;
+ _tmp54_ = self->priv->parameters;
+ _tmp55_ = _tmp54_.pixels_per_line;
+ _tmp53_->width = _tmp55_;
+ _tmp56_ = line;
+ _tmp57_ = self->priv->parameters;
+ _tmp58_ = _tmp57_.depth;
+ _tmp56_->depth = _tmp58_;
+ _tmp59_ = line;
+ _tmp60_ = self->priv->buffer;
+ _tmp60__length1 = self->priv->buffer_length1;
self->priv->buffer = NULL;
- _tmp60_->data = (g_free (_tmp60_->data), NULL);
- _tmp60_->data = _tmp61_;
- _tmp60_->data_length1 = _tmp61__length1;
- _tmp62_ = line;
- _tmp63_ = self->priv->parameters;
- _tmp64_ = _tmp63_.bytes_per_line;
- _tmp62_->data_length = _tmp64_;
- _tmp65_ = line;
- _tmp66_ = self->priv->line_count;
- _tmp65_->number = _tmp66_;
- _tmp67_ = line;
- _tmp68_ = self->priv->n_used;
- _tmp69_ = line;
- _tmp70_ = _tmp69_->data_length;
- _tmp67_->n_lines = _tmp68_ / _tmp70_;
- _tmp71_ = self->priv->line_count;
- _tmp72_ = line;
- _tmp73_ = _tmp72_->n_lines;
- self->priv->line_count = _tmp71_ + _tmp73_;
- _tmp74_ = self->priv->buffer;
- _tmp74__length1 = self->priv->buffer_length1;
- buffer_size = _tmp74__length1;
- _tmp75_ = full_read;
- if (_tmp75_) {
- gint _tmp76_;
- SANE_Parameters _tmp77_;
- gint _tmp78_;
- _tmp76_ = buffer_size;
- _tmp77_ = self->priv->parameters;
- _tmp78_ = _tmp77_.bytes_per_line;
- buffer_size = _tmp76_ + _tmp78_;
+ _tmp59_->data = (g_free (_tmp59_->data), NULL);
+ _tmp59_->data = _tmp60_;
+ _tmp59_->data_length1 = _tmp60__length1;
+ _tmp61_ = line;
+ _tmp62_ = self->priv->parameters;
+ _tmp63_ = _tmp62_.bytes_per_line;
+ _tmp61_->data_length = _tmp63_;
+ _tmp64_ = line;
+ _tmp65_ = self->priv->line_count;
+ _tmp64_->number = _tmp65_;
+ _tmp66_ = line;
+ _tmp67_ = self->priv->n_used;
+ _tmp68_ = line;
+ _tmp69_ = _tmp68_->data_length;
+ _tmp66_->n_lines = _tmp67_ / _tmp69_;
+ _tmp70_ = self->priv->line_count;
+ _tmp71_ = line;
+ _tmp72_ = _tmp71_->n_lines;
+ self->priv->line_count = _tmp70_ + _tmp72_;
+ _tmp73_ = self->priv->buffer;
+ _tmp73__length1 = self->priv->buffer_length1;
+ buffer_size = _tmp73__length1;
+ _tmp74_ = full_read;
+ if (_tmp74_) {
+ gint _tmp75_;
+ SANE_Parameters _tmp76_;
+ gint _tmp77_;
+ _tmp75_ = buffer_size;
+ _tmp76_ = self->priv->parameters;
+ _tmp77_ = _tmp76_.bytes_per_line;
+ buffer_size = _tmp75_ + _tmp77_;
}
- _tmp79_ = buffer_size;
- _tmp80_ = g_new0 (guchar, _tmp79_);
+ _tmp78_ = buffer_size;
+ _tmp79_ = g_new0 (guchar, _tmp78_);
self->priv->buffer = (g_free (self->priv->buffer), NULL);
- self->priv->buffer = _tmp80_;
- self->priv->buffer_length1 = _tmp79_;
+ self->priv->buffer = _tmp79_;
+ self->priv->buffer_length1 = _tmp78_;
self->priv->_buffer_size_ = self->priv->buffer_length1;
- _tmp81_ = self->priv->n_used;
- _tmp82_ = line;
- _tmp83_ = _tmp82_->n_lines;
- _tmp84_ = line;
- _tmp85_ = _tmp84_->data_length;
- n_remaining = _tmp81_ - (_tmp83_ * _tmp85_);
+ _tmp80_ = self->priv->n_used;
+ _tmp81_ = line;
+ _tmp82_ = _tmp81_->n_lines;
+ _tmp83_ = line;
+ _tmp84_ = _tmp83_->data_length;
+ n_remaining = _tmp80_ - (_tmp82_ * _tmp84_);
self->priv->n_used = 0;
{
gint i;
i = 0;
{
- gboolean _tmp86_;
- _tmp86_ = TRUE;
+ gboolean _tmp85_;
+ _tmp85_ = TRUE;
while (TRUE) {
- gboolean _tmp87_;
+ gboolean _tmp86_;
+ gint _tmp88_;
gint _tmp89_;
- gint _tmp90_;
- guchar* _tmp91_;
- gint _tmp91__length1;
- gint _tmp92_;
- ScanLine* _tmp93_;
- guchar* _tmp94_;
- gint _tmp94__length1;
- gint _tmp95_;
- ScanLine* _tmp96_;
- gint _tmp97_;
- ScanLine* _tmp98_;
- gint _tmp99_;
+ guchar* _tmp90_;
+ gint _tmp90__length1;
+ gint _tmp91_;
+ ScanLine* _tmp92_;
+ guchar* _tmp93_;
+ gint _tmp93__length1;
+ gint _tmp94_;
+ ScanLine* _tmp95_;
+ gint _tmp96_;
+ ScanLine* _tmp97_;
+ gint _tmp98_;
+ guchar _tmp99_;
guchar _tmp100_;
- guchar _tmp101_;
- gint _tmp102_;
- _tmp87_ = _tmp86_;
- if (!_tmp87_) {
- gint _tmp88_;
- _tmp88_ = i;
- i = _tmp88_ + 1;
+ gint _tmp101_;
+ _tmp86_ = _tmp85_;
+ if (!_tmp86_) {
+ gint _tmp87_;
+ _tmp87_ = i;
+ i = _tmp87_ + 1;
}
- _tmp86_ = FALSE;
- _tmp89_ = i;
- _tmp90_ = n_remaining;
- if (!(_tmp89_ < _tmp90_)) {
+ _tmp85_ = FALSE;
+ _tmp88_ = i;
+ _tmp89_ = n_remaining;
+ if (!(_tmp88_ < _tmp89_)) {
break;
}
- _tmp91_ = self->priv->buffer;
- _tmp91__length1 = self->priv->buffer_length1;
- _tmp92_ = i;
- _tmp93_ = line;
- _tmp94_ = _tmp93_->data;
- _tmp94__length1 = _tmp93_->data_length1;
- _tmp95_ = i;
- _tmp96_ = line;
- _tmp97_ = _tmp96_->n_lines;
- _tmp98_ = line;
- _tmp99_ = _tmp98_->data_length;
- _tmp100_ = _tmp94_[_tmp95_ + (_tmp97_ * _tmp99_)];
- _tmp91_[_tmp92_] = _tmp100_;
- _tmp101_ = _tmp91_[_tmp92_];
- _tmp102_ = self->priv->n_used;
- self->priv->n_used = _tmp102_ + 1;
+ _tmp90_ = self->priv->buffer;
+ _tmp90__length1 = self->priv->buffer_length1;
+ _tmp91_ = i;
+ _tmp92_ = line;
+ _tmp93_ = _tmp92_->data;
+ _tmp93__length1 = _tmp92_->data_length1;
+ _tmp94_ = i;
+ _tmp95_ = line;
+ _tmp96_ = _tmp95_->n_lines;
+ _tmp97_ = line;
+ _tmp98_ = _tmp97_->data_length;
+ _tmp99_ = _tmp93_[_tmp94_ + (_tmp96_ * _tmp98_)];
+ _tmp90_[_tmp91_] = _tmp99_;
+ _tmp100_ = _tmp90_[_tmp91_];
+ _tmp101_ = self->priv->n_used;
+ self->priv->n_used = _tmp101_ + 1;
}
}
}
- _tmp106_ = self->priv->parameters;
- _tmp107_ = _tmp106_.depth;
- if (_tmp107_ == 8) {
- SANE_Parameters _tmp108_;
- SANE_Frame _tmp109_;
- _tmp108_ = self->priv->parameters;
- _tmp109_ = _tmp108_.format;
- _tmp105_ = _tmp109_ == SANE_FRAME_GRAY;
- } else {
- _tmp105_ = FALSE;
- }
- _tmp110_ = _tmp105_;
- if (_tmp110_) {
- ScanJob* _tmp111_;
- gint _tmp112_;
- _tmp111_ = job;
- _tmp112_ = _tmp111_->depth;
- _tmp104_ = _tmp112_ == 2;
+ _tmp105_ = self->priv->parameters;
+ _tmp106_ = _tmp105_.depth;
+ if (_tmp106_ == 8) {
+ SANE_Parameters _tmp107_;
+ SANE_Frame _tmp108_;
+ _tmp107_ = self->priv->parameters;
+ _tmp108_ = _tmp107_.format;
+ _tmp104_ = _tmp108_ == SANE_FRAME_GRAY;
} else {
_tmp104_ = FALSE;
}
- _tmp113_ = _tmp104_;
- if (_tmp113_) {
- ScanJob* _tmp114_;
- ScanMode _tmp115_;
- _tmp114_ = job;
- _tmp115_ = _tmp114_->scan_mode;
- _tmp103_ = _tmp115_ == SCAN_MODE_GRAY;
+ _tmp109_ = _tmp104_;
+ if (_tmp109_) {
+ ScanJob* _tmp110_;
+ gint _tmp111_;
+ _tmp110_ = job;
+ _tmp111_ = _tmp110_->depth;
+ _tmp103_ = _tmp111_ == 2;
} else {
_tmp103_ = FALSE;
}
- _tmp116_ = _tmp103_;
- if (_tmp116_) {
+ _tmp112_ = _tmp103_;
+ if (_tmp112_) {
+ ScanJob* _tmp113_;
+ ScanMode _tmp114_;
+ _tmp113_ = job;
+ _tmp114_ = _tmp113_->scan_mode;
+ _tmp102_ = _tmp114_ == SCAN_MODE_GRAY;
+ } else {
+ _tmp102_ = FALSE;
+ }
+ _tmp115_ = _tmp102_;
+ if (_tmp115_) {
guchar block;
gint write_offset;
gint block_shift;
+ ScanLine* _tmp157_;
ScanLine* _tmp158_;
- ScanLine* _tmp159_;
- gint _tmp160_;
+ gint _tmp159_;
block = (guchar) 0;
write_offset = 0;
block_shift = 6;
@@ -7389,163 +7397,163 @@ static void scanner_do_read (Scanner* self) {
gint i;
i = 0;
{
- gboolean _tmp117_;
- _tmp117_ = TRUE;
+ gboolean _tmp116_;
+ _tmp116_ = TRUE;
while (TRUE) {
- gboolean _tmp118_;
- gint _tmp120_;
- ScanLine* _tmp121_;
+ gboolean _tmp117_;
+ gint _tmp119_;
+ ScanLine* _tmp120_;
+ gint _tmp121_;
gint _tmp122_;
- gint _tmp123_;
- ScanLine* _tmp124_;
- gint _tmp125_;
+ ScanLine* _tmp123_;
+ gint _tmp124_;
gint offset;
- gint _tmp151_;
- _tmp118_ = _tmp117_;
- if (!_tmp118_) {
- gint _tmp119_;
- _tmp119_ = i;
- i = _tmp119_ + 1;
+ gint _tmp150_;
+ _tmp117_ = _tmp116_;
+ if (!_tmp117_) {
+ gint _tmp118_;
+ _tmp118_ = i;
+ i = _tmp118_ + 1;
}
- _tmp117_ = FALSE;
- _tmp120_ = i;
- _tmp121_ = line;
- _tmp122_ = _tmp121_->n_lines;
- if (!(_tmp120_ < _tmp122_)) {
+ _tmp116_ = FALSE;
+ _tmp119_ = i;
+ _tmp120_ = line;
+ _tmp121_ = _tmp120_->n_lines;
+ if (!(_tmp119_ < _tmp121_)) {
break;
}
- _tmp123_ = i;
- _tmp124_ = line;
- _tmp125_ = _tmp124_->data_length;
- offset = _tmp123_ * _tmp125_;
+ _tmp122_ = i;
+ _tmp123_ = line;
+ _tmp124_ = _tmp123_->data_length;
+ offset = _tmp122_ * _tmp124_;
{
gint x;
x = 0;
{
- gboolean _tmp126_;
- _tmp126_ = TRUE;
+ gboolean _tmp125_;
+ _tmp125_ = TRUE;
while (TRUE) {
- gboolean _tmp127_;
- gint _tmp129_;
- ScanLine* _tmp130_;
- gint _tmp131_;
- ScanLine* _tmp132_;
- guchar* _tmp133_;
- gint _tmp133__length1;
+ gboolean _tmp126_;
+ gint _tmp128_;
+ ScanLine* _tmp129_;
+ gint _tmp130_;
+ ScanLine* _tmp131_;
+ guchar* _tmp132_;
+ gint _tmp132__length1;
+ gint _tmp133_;
gint _tmp134_;
- gint _tmp135_;
- guchar _tmp136_;
+ guchar _tmp135_;
guchar p;
guchar sample = '\0';
- guchar _tmp137_;
+ guchar _tmp136_;
+ guchar _tmp139_;
guchar _tmp140_;
- guchar _tmp141_;
+ gint _tmp141_;
gint _tmp142_;
- gint _tmp143_;
- _tmp127_ = _tmp126_;
- if (!_tmp127_) {
- gint _tmp128_;
- _tmp128_ = x;
- x = _tmp128_ + 1;
+ _tmp126_ = _tmp125_;
+ if (!_tmp126_) {
+ gint _tmp127_;
+ _tmp127_ = x;
+ x = _tmp127_ + 1;
}
- _tmp126_ = FALSE;
- _tmp129_ = x;
- _tmp130_ = line;
- _tmp131_ = _tmp130_->width;
- if (!(_tmp129_ < _tmp131_)) {
+ _tmp125_ = FALSE;
+ _tmp128_ = x;
+ _tmp129_ = line;
+ _tmp130_ = _tmp129_->width;
+ if (!(_tmp128_ < _tmp130_)) {
break;
}
- _tmp132_ = line;
- _tmp133_ = _tmp132_->data;
- _tmp133__length1 = _tmp132_->data_length1;
- _tmp134_ = offset;
- _tmp135_ = x;
- _tmp136_ = _tmp133_[_tmp134_ + _tmp135_];
- p = _tmp136_;
- _tmp137_ = p;
- if (((gint) _tmp137_) >= 192) {
+ _tmp131_ = line;
+ _tmp132_ = _tmp131_->data;
+ _tmp132__length1 = _tmp131_->data_length1;
+ _tmp133_ = offset;
+ _tmp134_ = x;
+ _tmp135_ = _tmp132_[_tmp133_ + _tmp134_];
+ p = _tmp135_;
+ _tmp136_ = p;
+ if (((gint) _tmp136_) >= 192) {
sample = (guchar) 3;
} else {
- guchar _tmp138_;
- _tmp138_ = p;
- if (((gint) _tmp138_) >= 128) {
+ guchar _tmp137_;
+ _tmp137_ = p;
+ if (((gint) _tmp137_) >= 128) {
sample = (guchar) 2;
} else {
- guchar _tmp139_;
- _tmp139_ = p;
- if (((gint) _tmp139_) >= 64) {
+ guchar _tmp138_;
+ _tmp138_ = p;
+ if (((gint) _tmp138_) >= 64) {
sample = (guchar) 1;
} else {
sample = (guchar) 0;
}
}
}
- _tmp140_ = block;
- _tmp141_ = sample;
+ _tmp139_ = block;
+ _tmp140_ = sample;
+ _tmp141_ = block_shift;
+ block = _tmp139_ | (_tmp140_ << _tmp141_);
_tmp142_ = block_shift;
- block = _tmp140_ | (_tmp141_ << _tmp142_);
- _tmp143_ = block_shift;
- if (_tmp143_ == 0) {
- ScanLine* _tmp144_;
- guchar* _tmp145_;
- gint _tmp145__length1;
- gint _tmp146_;
+ if (_tmp142_ == 0) {
+ ScanLine* _tmp143_;
+ guchar* _tmp144_;
+ gint _tmp144__length1;
+ gint _tmp145_;
+ guchar _tmp146_;
guchar _tmp147_;
- guchar _tmp148_;
- gint _tmp149_;
- _tmp144_ = line;
- _tmp145_ = _tmp144_->data;
- _tmp145__length1 = _tmp144_->data_length1;
- _tmp146_ = write_offset;
- _tmp147_ = block;
- _tmp145_[_tmp146_] = _tmp147_;
- _tmp148_ = _tmp145_[_tmp146_];
- _tmp149_ = write_offset;
- write_offset = _tmp149_ + 1;
+ gint _tmp148_;
+ _tmp143_ = line;
+ _tmp144_ = _tmp143_->data;
+ _tmp144__length1 = _tmp143_->data_length1;
+ _tmp145_ = write_offset;
+ _tmp146_ = block;
+ _tmp144_[_tmp145_] = _tmp146_;
+ _tmp147_ = _tmp144_[_tmp145_];
+ _tmp148_ = write_offset;
+ write_offset = _tmp148_ + 1;
block = (guchar) 0;
block_shift = 6;
} else {
- gint _tmp150_;
- _tmp150_ = block_shift;
- block_shift = _tmp150_ - 2;
+ gint _tmp149_;
+ _tmp149_ = block_shift;
+ block_shift = _tmp149_ - 2;
}
}
}
}
- _tmp151_ = block_shift;
- if (_tmp151_ != 6) {
- ScanLine* _tmp152_;
- guchar* _tmp153_;
- gint _tmp153__length1;
- gint _tmp154_;
+ _tmp150_ = block_shift;
+ if (_tmp150_ != 6) {
+ ScanLine* _tmp151_;
+ guchar* _tmp152_;
+ gint _tmp152__length1;
+ gint _tmp153_;
+ guchar _tmp154_;
guchar _tmp155_;
- guchar _tmp156_;
- gint _tmp157_;
- _tmp152_ = line;
- _tmp153_ = _tmp152_->data;
- _tmp153__length1 = _tmp152_->data_length1;
- _tmp154_ = write_offset;
- _tmp155_ = block;
- _tmp153_[_tmp154_] = _tmp155_;
- _tmp156_ = _tmp153_[_tmp154_];
- _tmp157_ = write_offset;
- write_offset = _tmp157_ + 1;
+ gint _tmp156_;
+ _tmp151_ = line;
+ _tmp152_ = _tmp151_->data;
+ _tmp152__length1 = _tmp151_->data_length1;
+ _tmp153_ = write_offset;
+ _tmp154_ = block;
+ _tmp152_[_tmp153_] = _tmp154_;
+ _tmp155_ = _tmp152_[_tmp153_];
+ _tmp156_ = write_offset;
+ write_offset = _tmp156_ + 1;
block = (guchar) 0;
block_shift = 6;
}
}
}
}
+ _tmp157_ = line;
_tmp158_ = line;
- _tmp159_ = line;
- _tmp160_ = _tmp159_->width;
- _tmp158_->data_length = ((_tmp160_ * 2) + 7) / 8;
+ _tmp159_ = _tmp158_->width;
+ _tmp157_->data_length = ((_tmp159_ * 2) + 7) / 8;
}
- _tmp161_ = line;
- _tmp162_ = notify_got_line_new (_tmp161_);
- _tmp163_ = _tmp162_;
- scanner_notify (self, (Notify*) _tmp163_);
- _notify_unref0 (_tmp163_);
+ _tmp160_ = line;
+ _tmp161_ = notify_got_line_new (_tmp160_);
+ _tmp162_ = _tmp161_;
+ scanner_notify (self, (Notify*) _tmp162_);
+ _notify_unref0 (_tmp162_);
_scan_line_unref0 (line);
}
_scan_job_unref0 (job);
@@ -7581,7 +7589,7 @@ static void* scanner_scan_thread (Scanner* self) {
_tmp2_ = status;
_tmp3_ = sane_status_to_string (_tmp2_);
_tmp4_ = _tmp3_;
- g_debug ("scanner.vala:1328: sane_init () -> %s", _tmp4_);
+ g_debug ("scanner.vala:1331: sane_init () -> %s", _tmp4_);
_g_free0 (_tmp4_);
_tmp5_ = status;
if (_tmp5_ != SANE_STATUS_GOOD) {
@@ -7589,7 +7597,7 @@ static void* scanner_scan_thread (Scanner* self) {
const gchar* _tmp7_ = NULL;
_tmp6_ = status;
_tmp7_ = sane_strstatus (_tmp6_);
- g_warning ("scanner.vala:1331: Unable to initialize SANE backend: %s", _tmp7_);
+ g_warning ("scanner.vala:1334: Unable to initialize SANE backend: %s", _tmp7_);
result = NULL;
return result;
}
@@ -7599,7 +7607,7 @@ static void* scanner_scan_thread (Scanner* self) {
_tmp11_ = SANE_VERSION_MINOR (_tmp10_);
_tmp12_ = version_code;
_tmp13_ = SANE_VERSION_BUILD (_tmp12_);
- g_debug ("scanner.vala:1334: SANE version %d.%d.%d", _tmp9_, _tmp11_, _tmp13_);
+ g_debug ("scanner.vala:1337: SANE version %d.%d.%d", _tmp9_, _tmp11_, _tmp13_);
scanner_redetect (self);
while (TRUE) {
gboolean _tmp14_ = FALSE;
@@ -7675,12 +7683,12 @@ void scanner_start (Scanner* self) {
_tmp0_ = g_thread_create (_scanner_scan_thread_gthread_func, self, TRUE, &_inner_error_);
_tmp1_ = _tmp0_;
if (_inner_error_ != NULL) {
- goto __catch10_g_error;
+ goto __catch14_g_error;
}
self->priv->thread = _tmp1_;
}
- goto __finally10;
- __catch10_g_error:
+ goto __finally14;
+ __catch14_g_error:
{
GError* e = NULL;
GError* _tmp2_;
@@ -7689,10 +7697,10 @@ void scanner_start (Scanner* self) {
_inner_error_ = NULL;
_tmp2_ = e;
_tmp3_ = _tmp2_->message;
- g_critical ("scanner.vala:1385: Unable to create thread: %s", _tmp3_);
+ g_critical ("scanner.vala:1388: Unable to create thread: %s", _tmp3_);
_g_error_free0 (e);
}
- __finally10:
+ __finally14:
if (_inner_error_ != NULL) {
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
g_clear_error (&_inner_error_);
@@ -7711,7 +7719,7 @@ void scanner_redetect (Scanner* self) {
return;
}
self->priv->need_redetect = TRUE;
- g_debug ("scanner.vala:1395: Requesting redetection of scan devices");
+ g_debug ("scanner.vala:1398: Requesting redetection of scan devices");
_tmp1_ = self->priv->request_queue;
_tmp2_ = request_redetect_new ();
g_async_queue_push (_tmp1_, (Request*) _tmp2_);
@@ -7895,7 +7903,7 @@ void scanner_scan (Scanner* self, const gchar* device, ScanOptions* options) {
_tmp17_ = _tmp16_->paper_width;
_tmp18_ = options;
_tmp19_ = _tmp18_->paper_height;
- g_debug ("scanner.vala:1441: Scanner.scan (\"%s\", dpi=%d, scan_mode=%s, depth=%" \
+ g_debug ("scanner.vala:1444: Scanner.scan (\"%s\", dpi=%d, scan_mode=%s, depth=%" \
"d, type=%s, paper_width=%d, paper_height=%d)", _tmp3_, _tmp5_, _tmp9_, _tmp11_, _tmp15_, _tmp17_, _tmp19_);
_g_free0 (_tmp15_);
_g_free0 (_tmp9_);
@@ -7955,7 +7963,7 @@ void scanner_free (Scanner* self) {
RequestQuit* _tmp1_;
GThread* _tmp2_;
g_return_if_fail (self != NULL);
- g_debug ("scanner.vala:1463: Stopping scan thread");
+ g_debug ("scanner.vala:1466: Stopping scan thread");
_tmp0_ = self->priv->request_queue;
_tmp1_ = request_quit_new ();
g_async_queue_push (_tmp0_, (Request*) _tmp1_);
@@ -7966,7 +7974,7 @@ void scanner_free (Scanner* self) {
g_thread_join (_tmp3_);
}
sane_exit ();
- g_debug ("scanner.vala:1471: sane_exit ()");
+ g_debug ("scanner.vala:1474: sane_exit ()");
}
diff --git a/src/scanner.vala b/src/scanner.vala
index 371fe83..8a8c6f6 100644
--- a/src/scanner.vala
+++ b/src/scanner.vala
@@ -467,6 +467,8 @@ public class Scanner
private bool set_string_option (Sane.Handle handle, Sane.OptionDescriptor option, Sane.Int option_index, string value, out string result)
{
+ result = "";
+
return_val_if_fail (option.type == Sane.ValueType.STRING, false);
var s = new char[option.size];
@@ -499,6 +501,7 @@ public class Scanner
return set_string_option (handle, option, option_index, values[i], out result);
}
+ result = "";
return false;
}
@@ -1198,7 +1201,7 @@ public class Scanner
if (status == Sane.Status.EOF)
{
if (parameters.lines > 0 && line_count != parameters.lines)
- warning ("Scan completed with %d lines, expected %d lines", parameters.lines, parameters.lines);
+ warning ("Scan completed with %d lines, expected %d lines", line_count, parameters.lines);
if (n_used > 0)
warning ("Scan complete with %d bytes of unused data", n_used);
do_complete_page ();
diff --git a/src/simple-scan.c b/src/simple-scan.c
index 9ca5f9c..d76395e 100644
--- a/src/simple-scan.c
+++ b/src/simple-scan.c
@@ -1,4 +1,4 @@
-/* simple-scan.c generated by valac 0.14.0, the Vala compiler
+/* simple-scan.c generated by valac 0.15.2, the Vala compiler
* generated from simple-scan.vala, do not modify */
/*
@@ -18,16 +18,17 @@
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
+#include "colord.h"
#include <float.h>
#include <math.h>
-#include <sane/sane.h>
+#include "sane/sane.h"
#include <glib/gi18n-lib.h>
#include <glib/gstdio.h>
#include <unistd.h>
#include <gio/gio.h>
#include <gtk/gtk.h>
#include <locale.h>
-#include <config.h>
+#include "config.h"
#include <gobject/gvaluecollector.h>
@@ -133,13 +134,13 @@ typedef struct _PageClass PageClass;
#define TYPE_SCAN_DIRECTION (scan_direction_get_type ())
#define _page_unref0(var) ((var == NULL) ? NULL : (var = (page_unref (var), NULL)))
+#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _ScanPageInfoPrivate ScanPageInfoPrivate;
typedef struct _ScanOptionsPrivate ScanOptionsPrivate;
#define TYPE_SCAN_MODE (scan_mode_get_type ())
#define TYPE_SCAN_TYPE (scan_type_get_type ())
-#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
#define _fclose0(var) ((var == NULL) ? NULL : (var = (fclose (var), NULL)))
#define _g_match_info_free0(var) ((var == NULL) ? NULL : (var = (g_match_info_free (var), NULL)))
#define _g_string_free0(var) ((var == NULL) ? NULL : (var = (g_string_free (var, TRUE), NULL)))
@@ -890,9 +891,234 @@ static void application_scanner_new_page_cb (Application* self, Scanner* scanner
static gchar* application_get_profile_for_device (Application* self, const gchar* device_name) {
gchar* result = NULL;
+ const gchar* _tmp0_;
+ gchar* _tmp1_ = NULL;
+ gchar* device_id;
+ const gchar* _tmp2_;
+ CdClient* _tmp3_;
+ CdClient* client;
+ CdDevice* device = NULL;
+ CdDevice* _tmp18_;
+ CdProfile* _tmp19_ = NULL;
+ CdProfile* profile;
+ CdProfile* _tmp20_;
+ CdProfile* _tmp26_;
+ const gchar* _tmp27_;
+ const gchar* _tmp28_;
+ CdProfile* _tmp30_;
+ const gchar* _tmp31_;
+ const gchar* _tmp32_;
+ const gchar* _tmp33_;
+ CdProfile* _tmp34_;
+ const gchar* _tmp35_;
+ const gchar* _tmp36_;
+ gchar* _tmp37_;
+ GError * _inner_error_ = NULL;
g_return_val_if_fail (self != NULL, NULL);
g_return_val_if_fail (device_name != NULL, NULL);
- result = NULL;
+ _tmp0_ = device_name;
+ _tmp1_ = g_strdup_printf ("sane:%s", _tmp0_);
+ device_id = _tmp1_;
+ _tmp2_ = device_name;
+ g_debug ("simple-scan.vala:170: Getting color profile for device %s", _tmp2_);
+ _tmp3_ = cd_client_new ();
+ client = _tmp3_;
+ {
+ CdClient* _tmp4_;
+ _tmp4_ = client;
+ cd_client_connect_sync (_tmp4_, NULL, &_inner_error_);
+ if (_inner_error_ != NULL) {
+ goto __catch3_g_error;
+ }
+ }
+ goto __finally3;
+ __catch3_g_error:
+ {
+ GError* e = NULL;
+ GError* _tmp5_;
+ const gchar* _tmp6_;
+ e = _inner_error_;
+ _inner_error_ = NULL;
+ _tmp5_ = e;
+ _tmp6_ = _tmp5_->message;
+ g_debug ("simple-scan.vala:179: Failed to connect to colord: %s", _tmp6_);
+ result = NULL;
+ _g_error_free0 (e);
+ _g_object_unref0 (client);
+ _g_free0 (device_id);
+ return result;
+ }
+ __finally3:
+ if (_inner_error_ != NULL) {
+ _g_object_unref0 (client);
+ _g_free0 (device_id);
+ g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+ g_clear_error (&_inner_error_);
+ return NULL;
+ }
+ {
+ CdClient* _tmp7_;
+ const gchar* _tmp8_;
+ CdDevice* _tmp9_ = NULL;
+ CdDevice* _tmp10_;
+ _tmp7_ = client;
+ _tmp8_ = device_id;
+ _tmp9_ = cd_client_find_device_by_property_sync (_tmp7_, CD_DEVICE_PROPERTY_SERIAL, _tmp8_, NULL, &_inner_error_);
+ _tmp10_ = _tmp9_;
+ if (_inner_error_ != NULL) {
+ goto __catch4_g_error;
+ }
+ _g_object_unref0 (device);
+ device = _tmp10_;
+ }
+ goto __finally4;
+ __catch4_g_error:
+ {
+ GError* e = NULL;
+ const gchar* _tmp11_;
+ GError* _tmp12_;
+ const gchar* _tmp13_;
+ e = _inner_error_;
+ _inner_error_ = NULL;
+ _tmp11_ = device_name;
+ _tmp12_ = e;
+ _tmp13_ = _tmp12_->message;
+ g_debug ("simple-scan.vala:190: Unable to find colord device %s: %s", _tmp11_, _tmp13_);
+ result = NULL;
+ _g_error_free0 (e);
+ _g_object_unref0 (device);
+ _g_object_unref0 (client);
+ _g_free0 (device_id);
+ return result;
+ }
+ __finally4:
+ if (_inner_error_ != NULL) {
+ _g_object_unref0 (device);
+ _g_object_unref0 (client);
+ _g_free0 (device_id);
+ g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+ g_clear_error (&_inner_error_);
+ return NULL;
+ }
+ {
+ CdDevice* _tmp14_;
+ _tmp14_ = device;
+ cd_device_connect_sync (_tmp14_, NULL, &_inner_error_);
+ if (_inner_error_ != NULL) {
+ goto __catch5_g_error;
+ }
+ }
+ goto __finally5;
+ __catch5_g_error:
+ {
+ GError* e = NULL;
+ const gchar* _tmp15_;
+ GError* _tmp16_;
+ const gchar* _tmp17_;
+ e = _inner_error_;
+ _inner_error_ = NULL;
+ _tmp15_ = device_name;
+ _tmp16_ = e;
+ _tmp17_ = _tmp16_->message;
+ g_debug ("simple-scan.vala:200: Failed to get properties from the device %s: %s", _tmp15_, _tmp17_);
+ result = NULL;
+ _g_error_free0 (e);
+ _g_object_unref0 (device);
+ _g_object_unref0 (client);
+ _g_free0 (device_id);
+ return result;
+ }
+ __finally5:
+ if (_inner_error_ != NULL) {
+ _g_object_unref0 (device);
+ _g_object_unref0 (client);
+ _g_free0 (device_id);
+ g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+ g_clear_error (&_inner_error_);
+ return NULL;
+ }
+ _tmp18_ = device;
+ _tmp19_ = cd_device_get_default_profile (_tmp18_);
+ profile = _tmp19_;
+ _tmp20_ = profile;
+ if (_tmp20_ == NULL) {
+ const gchar* _tmp21_;
+ _tmp21_ = device_name;
+ g_debug ("simple-scan.vala:207: No default color profile for device: %s", _tmp21_);
+ result = NULL;
+ _g_object_unref0 (profile);
+ _g_object_unref0 (device);
+ _g_object_unref0 (client);
+ _g_free0 (device_id);
+ return result;
+ }
+ {
+ CdProfile* _tmp22_;
+ _tmp22_ = profile;
+ cd_profile_connect_sync (_tmp22_, NULL, &_inner_error_);
+ if (_inner_error_ != NULL) {
+ goto __catch6_g_error;
+ }
+ }
+ goto __finally6;
+ __catch6_g_error:
+ {
+ GError* e = NULL;
+ const gchar* _tmp23_;
+ GError* _tmp24_;
+ const gchar* _tmp25_;
+ e = _inner_error_;
+ _inner_error_ = NULL;
+ _tmp23_ = device_name;
+ _tmp24_ = e;
+ _tmp25_ = _tmp24_->message;
+ g_debug ("simple-scan.vala:217: Failed to get properties from the profile %s: %s", _tmp23_, _tmp25_);
+ result = NULL;
+ _g_error_free0 (e);
+ _g_object_unref0 (profile);
+ _g_object_unref0 (device);
+ _g_object_unref0 (client);
+ _g_free0 (device_id);
+ return result;
+ }
+ __finally6:
+ if (_inner_error_ != NULL) {
+ _g_object_unref0 (profile);
+ _g_object_unref0 (device);
+ _g_object_unref0 (client);
+ _g_free0 (device_id);
+ g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+ g_clear_error (&_inner_error_);
+ return NULL;
+ }
+ _tmp26_ = profile;
+ _tmp27_ = cd_profile_get_filename (_tmp26_);
+ _tmp28_ = _tmp27_;
+ if (_tmp28_ == NULL) {
+ const gchar* _tmp29_;
+ _tmp29_ = device_name;
+ g_debug ("simple-scan.vala:223: No icc color profile for the device %s", _tmp29_);
+ result = NULL;
+ _g_object_unref0 (profile);
+ _g_object_unref0 (device);
+ _g_object_unref0 (client);
+ _g_free0 (device_id);
+ return result;
+ }
+ _tmp30_ = profile;
+ _tmp31_ = cd_profile_get_filename (_tmp30_);
+ _tmp32_ = _tmp31_;
+ _tmp33_ = device_name;
+ g_debug ("simple-scan.vala:227: Using color profile %s for device %s", _tmp32_, _tmp33_);
+ _tmp34_ = profile;
+ _tmp35_ = cd_profile_get_filename (_tmp34_);
+ _tmp36_ = _tmp35_;
+ _tmp37_ = g_strdup (_tmp36_);
+ result = _tmp37_;
+ _g_object_unref0 (profile);
+ _g_object_unref0 (device);
+ _g_object_unref0 (client);
+ _g_free0 (device_id);
return result;
}
@@ -1151,13 +1377,13 @@ static gchar* application_get_temporary_filename (Application* self, const gchar
path = _tmp4_;
fd = _tmp5_;
if (_inner_error_ != NULL) {
- goto __catch3_g_error;
+ goto __catch7_g_error;
}
_tmp6_ = fd;
close (_tmp6_);
}
- goto __finally3;
- __catch3_g_error:
+ goto __finally7;
+ __catch7_g_error:
{
GError* e = NULL;
GError* _tmp7_;
@@ -1173,7 +1399,7 @@ static gchar* application_get_temporary_filename (Application* self, const gchar
_g_free0 (filename);
return result;
}
- __finally3:
+ __finally7:
if (_inner_error_ != NULL) {
_g_free0 (path);
_g_free0 (filename);
@@ -1227,11 +1453,11 @@ static void application_email_cb (Application* self, SimpleScan* ui, const gchar
_tmp7_ = file;
book_save (_tmp6_, "pdf", _tmp7_, &_inner_error_);
if (_inner_error_ != NULL) {
- goto __catch4_g_error;
+ goto __catch8_g_error;
}
}
- goto __finally4;
- __catch4_g_error:
+ goto __finally8;
+ __catch8_g_error:
{
GError* e = NULL;
GError* _tmp8_;
@@ -1247,7 +1473,7 @@ static void application_email_cb (Application* self, SimpleScan* ui, const gchar
_g_free0 (command_line);
return;
}
- __finally4:
+ __finally8:
if (_inner_error_ != NULL) {
_g_object_unref0 (file);
_g_free0 (path);
@@ -1329,11 +1555,11 @@ static void application_email_cb (Application* self, SimpleScan* ui, const gchar
page_save (_tmp28_, "jpeg", _tmp29_, &_inner_error_);
_page_unref0 (_tmp28_);
if (_inner_error_ != NULL) {
- goto __catch5_g_error;
+ goto __catch9_g_error;
}
}
- goto __finally5;
- __catch5_g_error:
+ goto __finally9;
+ __catch9_g_error:
{
GError* e = NULL;
GError* _tmp30_;
@@ -1349,7 +1575,7 @@ static void application_email_cb (Application* self, SimpleScan* ui, const gchar
_g_free0 (command_line);
return;
}
- __finally5:
+ __finally9:
if (_inner_error_ != NULL) {
_g_object_unref0 (file);
_g_free0 (path);
@@ -1385,11 +1611,11 @@ static void application_email_cb (Application* self, SimpleScan* ui, const gchar
_tmp39_ = command_line;
g_spawn_command_line_async (_tmp39_, &_inner_error_);
if (_inner_error_ != NULL) {
- goto __catch6_g_error;
+ goto __catch10_g_error;
}
}
- goto __finally6;
- __catch6_g_error:
+ goto __finally10;
+ __catch10_g_error:
{
GError* e = NULL;
GError* _tmp40_;
@@ -1401,7 +1627,7 @@ static void application_email_cb (Application* self, SimpleScan* ui, const gchar
g_warning ("simple-scan.vala:399: Unable to start email: %s", _tmp41_);
_g_error_free0 (e);
}
- __finally6:
+ __finally10:
if (_inner_error_ != NULL) {
_g_free0 (command_line);
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
@@ -2025,11 +2251,11 @@ gint application_main (gchar** args, int args_length1) {
_tmp5_ = c;
g_option_context_parse (_tmp5_, &args_length1, &args, &_inner_error_);
if (_inner_error_ != NULL) {
- goto __catch7_g_error;
+ goto __catch11_g_error;
}
}
- goto __finally7;
- __catch7_g_error:
+ goto __finally11;
+ __catch11_g_error:
{
GError* e = NULL;
FILE* _tmp6_;
@@ -2060,7 +2286,7 @@ gint application_main (gchar** args, int args_length1) {
_g_option_context_free0 (c);
return result;
}
- __finally7:
+ __finally11:
if (_inner_error_ != NULL) {
_g_option_context_free0 (c);
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
@@ -2083,7 +2309,7 @@ gint application_main (gchar** args, int args_length1) {
_tmp17_ = application_fix_pdf_filename;
application_fix_pdf (_tmp17_, &_inner_error_);
if (_inner_error_ != NULL) {
- goto __catch8_g_error;
+ goto __catch12_g_error;
}
{
gint i;
@@ -2119,14 +2345,14 @@ gint application_main (gchar** args, int args_length1) {
_tmp25_ = _tmp23_[_tmp24_];
application_fix_pdf (_tmp25_, &_inner_error_);
if (_inner_error_ != NULL) {
- goto __catch8_g_error;
+ goto __catch12_g_error;
}
}
}
}
}
- goto __finally8;
- __catch8_g_error:
+ goto __finally12;
+ __catch12_g_error:
{
GError* e = NULL;
FILE* _tmp26_;
@@ -2143,7 +2369,7 @@ gint application_main (gchar** args, int args_length1) {
_g_option_context_free0 (c);
return result;
}
- __finally8:
+ __finally12:
if (_inner_error_ != NULL) {
_g_option_context_free0 (c);
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
diff --git a/src/simple_scan_vala.stamp b/src/simple_scan_vala.stamp
index e69de29..859afb1 100644
--- a/src/simple_scan_vala.stamp
+++ b/src/simple_scan_vala.stamp
@@ -0,0 +1 @@
+stamp
diff --git a/src/ui.c b/src/ui.c
index 122b1d4..10ae780 100644
--- a/src/ui.c
+++ b/src/ui.c
@@ -1,4 +1,4 @@
-/* ui.c generated by valac 0.14.0, the Vala compiler
+/* ui.c generated by valac 0.15.2, the Vala compiler
* generated from ui.vala, do not modify */
/*
@@ -24,9 +24,9 @@
#include <cairo.h>
#include <float.h>
#include <math.h>
-#include <gdk-pixbuf/gdk-pixdata.h>
+#include <gdk-pixbuf/gdk-pixbuf.h>
#include <gdk/gdk.h>
-#include <config.h>
+#include "config.h"
#include <gobject/gvaluecollector.h>
@@ -1637,11 +1637,11 @@ static gboolean simple_scan_save_document (SimpleScan* self, gboolean force_choo
_tmp32_ = file;
book_save (_tmp30_, _tmp31_, _tmp32_, &_inner_error_);
if (_inner_error_ != NULL) {
- goto __catch11_g_error;
+ goto __catch15_g_error;
}
}
- goto __finally11;
- __catch11_g_error:
+ goto __finally15;
+ __catch15_g_error:
{
GError* e = NULL;
GError* _tmp33_;
@@ -1666,7 +1666,7 @@ static gboolean simple_scan_save_document (SimpleScan* self, gboolean force_choo
_g_free0 (uri);
return result;
}
- __finally11:
+ __finally15:
if (_inner_error_ != NULL) {
_g_free0 (format);
_g_free0 (uri_lower);
@@ -2076,19 +2076,23 @@ static gboolean simple_scan_get_paper_size (SimpleScan* self, gint* width, gint*
gint _vala_height = 0;
gboolean result = FALSE;
GtkTreeIter iter = {0};
- GtkComboBox* _tmp0_;
- GtkTreeIter _tmp1_ = {0};
- gboolean _tmp2_ = FALSE;
+ gint _tmp0_;
+ GtkComboBox* _tmp1_;
+ GtkTreeIter _tmp2_ = {0};
+ gboolean _tmp3_ = FALSE;
g_return_val_if_fail (self != NULL, FALSE);
- _tmp0_ = self->priv->paper_size_combo;
- _tmp2_ = gtk_combo_box_get_active_iter (_tmp0_, &_tmp1_);
- iter = _tmp1_;
- if (_tmp2_) {
- GtkListStore* _tmp3_;
- GtkTreeIter _tmp4_;
- _tmp3_ = self->priv->paper_size_model;
- _tmp4_ = iter;
- gtk_tree_model_get ((GtkTreeModel*) _tmp3_, &_tmp4_, 0, &_vala_width, 1, &_vala_height, -1, -1);
+ _vala_height = 0;
+ _tmp0_ = _vala_height;
+ _vala_width = _tmp0_;
+ _tmp1_ = self->priv->paper_size_combo;
+ _tmp3_ = gtk_combo_box_get_active_iter (_tmp1_, &_tmp2_);
+ iter = _tmp2_;
+ if (_tmp3_) {
+ GtkListStore* _tmp4_;
+ GtkTreeIter _tmp5_;
+ _tmp4_ = self->priv->paper_size_model;
+ _tmp5_ = iter;
+ gtk_tree_model_get ((GtkTreeModel*) _tmp4_, &_tmp5_, 0, &_vala_width, 1, &_vala_height, -1, -1);
result = TRUE;
if (width) {
*width = _vala_width;
@@ -2438,13 +2442,13 @@ static gchar* simple_scan_get_temporary_filename (SimpleScan* self, const gchar*
path = _tmp4_;
fd = _tmp5_;
if (_inner_error_ != NULL) {
- goto __catch12_g_error;
+ goto __catch16_g_error;
}
_tmp6_ = fd;
close (_tmp6_);
}
- goto __finally12;
- __catch12_g_error:
+ goto __finally16;
+ __catch16_g_error:
{
GError* e = NULL;
GError* _tmp7_;
@@ -2453,14 +2457,14 @@ static gchar* simple_scan_get_temporary_filename (SimpleScan* self, const gchar*
_inner_error_ = NULL;
_tmp7_ = e;
_tmp8_ = _tmp7_->message;
- g_warning ("ui.vala:788: Error saving email attachment: %s", _tmp8_);
+ g_warning ("ui.vala:789: Error saving email attachment: %s", _tmp8_);
result = NULL;
_g_error_free0 (e);
_g_free0 (path);
_g_free0 (filename);
return result;
}
- __finally12:
+ __finally16:
if (_inner_error_ != NULL) {
_g_free0 (path);
_g_free0 (filename);
@@ -2502,11 +2506,11 @@ static void simple_scan_show_page_cb (SimpleScan* self, BookView* view, Page* pa
_tmp5_ = file;
page_save (_tmp4_, "tiff", _tmp5_, &_inner_error_);
if (_inner_error_ != NULL) {
- goto __catch13_g_error;
+ goto __catch17_g_error;
}
}
- goto __finally13;
- __catch13_g_error:
+ goto __finally17;
+ __catch17_g_error:
{
GError* e = NULL;
const gchar* _tmp6_ = NULL;
@@ -2523,7 +2527,7 @@ static void simple_scan_show_page_cb (SimpleScan* self, BookView* view, Page* pa
_g_free0 (path);
return;
}
- __finally13:
+ __finally17:
if (_inner_error_ != NULL) {
_g_object_unref0 (file);
_g_free0 (path);
@@ -2547,11 +2551,11 @@ static void simple_scan_show_page_cb (SimpleScan* self, BookView* view, Page* pa
gtk_show_uri (_tmp10_, _tmp13_, _tmp14_, &_inner_error_);
_g_free0 (_tmp13_);
if (_inner_error_ != NULL) {
- goto __catch14_g_error;
+ goto __catch18_g_error;
}
}
- goto __finally14;
- __catch14_g_error:
+ goto __finally18;
+ __catch18_g_error:
{
GError* e = NULL;
const gchar* _tmp15_ = NULL;
@@ -2565,7 +2569,7 @@ static void simple_scan_show_page_cb (SimpleScan* self, BookView* view, Page* pa
simple_scan_show_error_dialog (self, _tmp15_, _tmp17_);
_g_error_free0 (e);
}
- __finally14:
+ __finally18:
if (_inner_error_ != NULL) {
_g_object_unref0 (file);
_g_free0 (path);
@@ -3132,11 +3136,11 @@ void G_MODULE_EXPORT print_button_clicked_cb (GtkWidget* widget, SimpleScan* sel
_tmp3_ = self->priv->window;
gtk_print_operation_run (print, GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG, _tmp3_, &_inner_error_);
if (_inner_error_ != NULL) {
- goto __catch15_g_error;
+ goto __catch19_g_error;
}
}
- goto __finally15;
- __catch15_g_error:
+ goto __finally19;
+ __catch19_g_error:
{
GError* e = NULL;
GError* _tmp4_;
@@ -3145,10 +3149,10 @@ void G_MODULE_EXPORT print_button_clicked_cb (GtkWidget* widget, SimpleScan* sel
_inner_error_ = NULL;
_tmp4_ = e;
_tmp5_ = _tmp4_->message;
- g_warning ("ui.vala:1044: Error printing: %s", _tmp5_);
+ g_warning ("ui.vala:1045: Error printing: %s", _tmp5_);
_g_error_free0 (e);
}
- __finally15:
+ __finally19:
if (_inner_error_ != NULL) {
_g_object_unref0 (print);
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
@@ -3172,11 +3176,11 @@ void G_MODULE_EXPORT help_contents_menuitem_activate_cb (GtkWidget* widget, Simp
_tmp2_ = gtk_get_current_event_time ();
gtk_show_uri (_tmp1_, "ghelp:simple-scan", _tmp2_, &_inner_error_);
if (_inner_error_ != NULL) {
- goto __catch16_g_error;
+ goto __catch20_g_error;
}
}
- goto __finally16;
- __catch16_g_error:
+ goto __finally20;
+ __catch20_g_error:
{
GError* e = NULL;
const gchar* _tmp3_ = NULL;
@@ -3190,7 +3194,7 @@ void G_MODULE_EXPORT help_contents_menuitem_activate_cb (GtkWidget* widget, Simp
simple_scan_show_error_dialog (self, _tmp3_, _tmp5_);
_g_error_free0 (e);
}
- __finally16:
+ __finally20:
if (_inner_error_ != NULL) {
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
g_clear_error (&_inner_error_);
@@ -3836,25 +3840,25 @@ static void simple_scan_load (SimpleScan* self) {
GtkInfoBar* _tmp101_;
GtkVBox* _tmp102_;
GtkInfoBar* _tmp103_;
- GtkHBox* _tmp104_;
- GtkHBox* _tmp105_;
- GtkHBox* hbox;
+ GtkBox* _tmp104_;
+ GtkBox* _tmp105_;
+ GtkBox* hbox;
GtkInfoBar* _tmp106_;
GtkWidget* _tmp107_ = NULL;
GtkContainer* _tmp108_;
GtkContainer* content_area;
GtkContainer* _tmp109_;
- GtkHBox* _tmp110_;
- GtkHBox* _tmp111_;
+ GtkBox* _tmp110_;
+ GtkBox* _tmp111_;
GtkImage* _tmp112_;
GtkImage* _tmp113_;
- GtkHBox* _tmp114_;
+ GtkBox* _tmp114_;
GtkImage* _tmp115_;
GtkImage* _tmp116_;
GtkLabel* _tmp117_;
GtkLabel* _tmp118_;
GtkLabel* _tmp119_;
- GtkHBox* _tmp120_;
+ GtkBox* _tmp120_;
GtkLabel* _tmp121_;
GtkLabel* _tmp122_;
GtkInfoBar* _tmp123_;
@@ -3996,11 +4000,11 @@ static void simple_scan_load (SimpleScan* self) {
_tmp3_ = self->priv->builder;
gtk_builder_add_from_file (_tmp3_, filename, &_inner_error_);
if (_inner_error_ != NULL) {
- goto __catch17_g_error;
+ goto __catch21_g_error;
}
}
- goto __finally17;
- __catch17_g_error:
+ goto __finally21;
+ __catch21_g_error:
{
GError* e = NULL;
GError* _tmp4_;
@@ -4011,14 +4015,14 @@ static void simple_scan_load (SimpleScan* self) {
_inner_error_ = NULL;
_tmp4_ = e;
_tmp5_ = _tmp4_->message;
- g_critical ("ui.vala:1261: Unable to load UI %s: %s\n", filename, _tmp5_);
+ g_critical ("ui.vala:1262: Unable to load UI %s: %s\n", filename, _tmp5_);
_tmp6_ = _ ("Files missing");
_tmp7_ = _ ("Please check your installation");
simple_scan_show_error_dialog (self, _tmp6_, _tmp7_);
exit (EXIT_FAILURE);
_g_error_free0 (e);
}
- __finally17:
+ __finally21:
if (_inner_error_ != NULL) {
_g_free0 (filename);
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
@@ -4186,7 +4190,7 @@ static void simple_scan_load (SimpleScan* self) {
_tmp102_ = self->priv->main_vbox;
_tmp103_ = self->priv->info_bar;
gtk_box_pack_start ((GtkBox*) _tmp102_, (GtkWidget*) _tmp103_, FALSE, TRUE, (guint) 0);
- _tmp104_ = (GtkHBox*) gtk_hbox_new (FALSE, 12);
+ _tmp104_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
_tmp105_ = g_object_ref_sink (_tmp104_);
hbox = _tmp105_;
_tmp106_ = self->priv->info_bar;
@@ -4204,7 +4208,7 @@ static void simple_scan_load (SimpleScan* self) {
self->priv->info_bar_image = _tmp113_;
_tmp114_ = hbox;
_tmp115_ = self->priv->info_bar_image;
- gtk_box_pack_start ((GtkBox*) _tmp114_, (GtkWidget*) _tmp115_, FALSE, TRUE, (guint) 0);
+ gtk_box_pack_start (_tmp114_, (GtkWidget*) _tmp115_, FALSE, TRUE, (guint) 0);
_tmp116_ = self->priv->info_bar_image;
gtk_widget_show ((GtkWidget*) _tmp116_);
_tmp117_ = (GtkLabel*) gtk_label_new (NULL);
@@ -4215,7 +4219,7 @@ static void simple_scan_load (SimpleScan* self) {
gtk_misc_set_alignment ((GtkMisc*) _tmp119_, 0.0f, 0.5f);
_tmp120_ = hbox;
_tmp121_ = self->priv->info_bar_label;
- gtk_box_pack_start ((GtkBox*) _tmp120_, (GtkWidget*) _tmp121_, TRUE, TRUE, (guint) 0);
+ gtk_box_pack_start (_tmp120_, (GtkWidget*) _tmp121_, TRUE, TRUE, (guint) 0);
_tmp122_ = self->priv->info_bar_label;
gtk_widget_show ((GtkWidget*) _tmp122_);
_tmp123_ = self->priv->info_bar;
@@ -4419,7 +4423,7 @@ static void simple_scan_load (SimpleScan* self) {
}
_tmp234_ = self->priv->window_width;
_tmp235_ = self->priv->window_height;
- g_debug ("ui.vala:1407: Restoring window to %dx%d pixels", _tmp234_, _tmp235_);
+ g_debug ("ui.vala:1408: Restoring window to %dx%d pixels", _tmp234_, _tmp235_);
_tmp236_ = self->priv->window;
_tmp237_ = self->priv->window_width;
_tmp238_ = self->priv->window_height;
@@ -4430,7 +4434,7 @@ static void simple_scan_load (SimpleScan* self) {
_tmp241_ = self->priv->window_is_maximized;
if (_tmp241_) {
GtkWindow* _tmp242_;
- g_debug ("ui.vala:1412: Restoring window to maximized");
+ g_debug ("ui.vala:1413: Restoring window to maximized");
_tmp242_ = self->priv->window;
gtk_window_maximize (_tmp242_);
}
diff --git a/src/ui.vala b/src/ui.vala
index 4287d13..f8521d0 100644
--- a/src/ui.vala
+++ b/src/ui.vala
@@ -637,6 +637,7 @@ public class SimpleScan
{
Gtk.TreeIter iter;
+ width = height = 0;
if (paper_size_combo.get_active_iter (out iter))
{
paper_size_model.get (iter, 0, ref width, 1, ref height, -1);
@@ -1305,7 +1306,7 @@ public class SimpleScan
info_bar = new Gtk.InfoBar ();
info_bar.response.connect (info_bar_response_cb);
main_vbox.pack_start (info_bar, false, true, 0);
- var hbox = new Gtk.HBox (false, 12);
+ var hbox = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 12);
var content_area = (Gtk.Container) info_bar.get_content_area ();
content_area.add (hbox);
hbox.show ();