diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-12-14 11:36:54 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-12-14 11:36:54 +0100 |
commit | cebf725978b32756700671a646aaed9677f6f219 (patch) | |
tree | 8aad7e2e09ba66c6ab36da556f7b8265b31898a6 /src/ui.c | |
parent | 13eec502b99e47e9910b5610869236698e1a8a13 (diff) | |
parent | a632195d632be90e0da0ed0eef4b0987ed4bea6c (diff) |
Merge branch 'release/3.26.2-1'3.26.2-1
Diffstat (limited to 'src/ui.c')
-rw-r--r-- | src/ui.c | 13000 |
1 files changed, 0 insertions, 13000 deletions
diff --git a/src/ui.c b/src/ui.c deleted file mode 100644 index 3d687d9..0000000 --- a/src/ui.c +++ /dev/null @@ -1,13000 +0,0 @@ -/* ui.c generated by valac 0.34.6, the Vala compiler - * generated from ui.vala, do not modify */ - -/* - * Copyright (C) 2009-2015 Canonical Ltd. - * Author: Robert Ancell <robert.ancell@canonical.com>, - * Eduard Gotwig <g@ox.io> - * - * This program is free software: you can redistribute it and/or modify it under - * the terms of the GNU General Public License as published by the Free Software - * Foundation, either version 3 of the License, or (at your option) any later - * version. See http://www.gnu.org/copyleft/gpl.html the full text of the - * license. - */ - -#include <glib.h> -#include <glib-object.h> -#include <gtk/gtk.h> -#include <gio/gio.h> -#include <stdlib.h> -#include <string.h> -#include <gdk/gdk.h> -#include <glib/gi18n-lib.h> -#include <float.h> -#include <math.h> -#include <cairo.h> -#include <gdk-pixbuf/gdk-pixbuf.h> -#include "packagekit-glib2/packagekit.h" -#include <glib/gstdio.h> -#include <unistd.h> - - -#define TYPE_USER_INTERFACE (user_interface_get_type ()) -#define USER_INTERFACE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_USER_INTERFACE, UserInterface)) -#define USER_INTERFACE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_USER_INTERFACE, UserInterfaceClass)) -#define IS_USER_INTERFACE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_USER_INTERFACE)) -#define IS_USER_INTERFACE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_USER_INTERFACE)) -#define USER_INTERFACE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_USER_INTERFACE, UserInterfaceClass)) - -typedef struct _UserInterface UserInterface; -typedef struct _UserInterfaceClass UserInterfaceClass; -typedef struct _UserInterfacePrivate UserInterfacePrivate; - -#define TYPE_PROGRESS_BAR_DIALOG (progress_bar_dialog_get_type ()) -#define PROGRESS_BAR_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PROGRESS_BAR_DIALOG, ProgressBarDialog)) -#define PROGRESS_BAR_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PROGRESS_BAR_DIALOG, ProgressBarDialogClass)) -#define IS_PROGRESS_BAR_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PROGRESS_BAR_DIALOG)) -#define IS_PROGRESS_BAR_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PROGRESS_BAR_DIALOG)) -#define PROGRESS_BAR_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PROGRESS_BAR_DIALOG, ProgressBarDialogClass)) - -typedef struct _ProgressBarDialog ProgressBarDialog; -typedef struct _ProgressBarDialogClass ProgressBarDialogClass; - -#define TYPE_BOOK (book_get_type ()) -#define BOOK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_BOOK, Book)) -#define BOOK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_BOOK, BookClass)) -#define IS_BOOK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_BOOK)) -#define IS_BOOK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_BOOK)) -#define BOOK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_BOOK, BookClass)) - -typedef struct _Book Book; -typedef struct _BookClass BookClass; - -#define TYPE_AUTOSAVE_MANAGER (autosave_manager_get_type ()) -#define AUTOSAVE_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_AUTOSAVE_MANAGER, AutosaveManager)) -#define AUTOSAVE_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_AUTOSAVE_MANAGER, AutosaveManagerClass)) -#define IS_AUTOSAVE_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_AUTOSAVE_MANAGER)) -#define IS_AUTOSAVE_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_AUTOSAVE_MANAGER)) -#define AUTOSAVE_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_AUTOSAVE_MANAGER, AutosaveManagerClass)) - -typedef struct _AutosaveManager AutosaveManager; -typedef struct _AutosaveManagerClass AutosaveManagerClass; - -#define TYPE_BOOK_VIEW (book_view_get_type ()) -#define BOOK_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_BOOK_VIEW, BookView)) -#define BOOK_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_BOOK_VIEW, BookViewClass)) -#define IS_BOOK_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_BOOK_VIEW)) -#define IS_BOOK_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_BOOK_VIEW)) -#define BOOK_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_BOOK_VIEW, BookViewClass)) - -typedef struct _BookView BookView; -typedef struct _BookViewClass BookViewClass; - -#define TYPE_SCAN_DIRECTION (scan_direction_get_type ()) - -#define TYPE_PAGE (page_get_type ()) -#define PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PAGE, Page)) -#define PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PAGE, PageClass)) -#define IS_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PAGE)) -#define IS_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PAGE)) -#define PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PAGE, PageClass)) - -typedef struct _Page Page; -typedef struct _PageClass PageClass; -#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) -#define _g_free0(var) (var = (g_free (var), NULL)) -#define _book_unref0(var) ((var == NULL) ? NULL : (var = (book_unref (var), NULL))) -#define _autosave_manager_unref0(var) ((var == NULL) ? NULL : (var = (autosave_manager_unref (var), NULL))) -#define _page_unref0(var) ((var == NULL) ? NULL : (var = (page_unref (var), NULL))) - -#define TYPE_SCAN_DEVICE (scan_device_get_type ()) -#define SCAN_DEVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SCAN_DEVICE, ScanDevice)) -#define SCAN_DEVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SCAN_DEVICE, ScanDeviceClass)) -#define IS_SCAN_DEVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SCAN_DEVICE)) -#define IS_SCAN_DEVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SCAN_DEVICE)) -#define SCAN_DEVICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SCAN_DEVICE, ScanDeviceClass)) - -typedef struct _ScanDevice ScanDevice; -typedef struct _ScanDeviceClass ScanDeviceClass; -typedef struct _ScanDevicePrivate ScanDevicePrivate; -#define _scan_device_unref0(var) ((var == NULL) ? NULL : (var = (scan_device_unref (var), NULL))) -typedef struct _Block1Data Block1Data; -#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL))) - -#define TYPE_SCAN_TYPE (scan_type_get_type ()) - -#define TYPE_SCAN_OPTIONS (scan_options_get_type ()) -#define SCAN_OPTIONS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SCAN_OPTIONS, ScanOptions)) -#define SCAN_OPTIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SCAN_OPTIONS, ScanOptionsClass)) -#define IS_SCAN_OPTIONS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SCAN_OPTIONS)) -#define IS_SCAN_OPTIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SCAN_OPTIONS)) -#define SCAN_OPTIONS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SCAN_OPTIONS, ScanOptionsClass)) - -typedef struct _ScanOptions ScanOptions; -typedef struct _ScanOptionsClass ScanOptionsClass; - -#define TYPE_SCAN_MODE (scan_mode_get_type ()) -typedef struct _ScanOptionsPrivate ScanOptionsPrivate; -#define _scan_options_unref0(var) ((var == NULL) ? NULL : (var = (scan_options_unref (var), NULL))) -typedef struct _Block2Data Block2Data; - -#define TYPE_PAGE_ICON (page_icon_get_type ()) -#define PAGE_ICON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PAGE_ICON, PageIcon)) -#define PAGE_ICON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PAGE_ICON, PageIconClass)) -#define IS_PAGE_ICON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PAGE_ICON)) -#define IS_PAGE_ICON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PAGE_ICON)) -#define PAGE_ICON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PAGE_ICON, PageIconClass)) - -typedef struct _PageIcon PageIcon; -typedef struct _PageIconClass PageIconClass; -#define _cairo_destroy0(var) ((var == NULL) ? NULL : (var = (cairo_destroy (var), NULL))) -typedef struct _Block3Data Block3Data; -#define _g_ptr_array_unref0(var) ((var == NULL) ? NULL : (var = (g_ptr_array_unref (var), NULL))) -typedef struct _UserInterfaceInstallPackagesData UserInterfaceInstallPackagesData; -#define _g_key_file_unref0(var) ((var == NULL) ? NULL : (var = (g_key_file_unref (var), NULL))) -typedef struct _ProgressBarDialogPrivate ProgressBarDialogPrivate; -typedef struct _PageIconPrivate PageIconPrivate; - -struct _UserInterface { - GtkApplicationWindow parent_instance; - UserInterfacePrivate * priv; -}; - -struct _UserInterfaceClass { - GtkApplicationWindowClass parent_class; -}; - -typedef enum { - SCAN_DIRECTION_TOP_TO_BOTTOM, - SCAN_DIRECTION_LEFT_TO_RIGHT, - SCAN_DIRECTION_BOTTOM_TO_TOP, - SCAN_DIRECTION_RIGHT_TO_LEFT -} ScanDirection; - -struct _UserInterfacePrivate { - GSettings* settings; - GtkMenuBar* menubar; - GtkToolbar* toolbar; - GtkMenu* page_menu; - GtkBox* main_vbox; - GtkInfoBar* info_bar; - GtkImage* info_bar_image; - GtkLabel* info_bar_label; - GtkButton* info_bar_close_button; - GtkButton* info_bar_change_scanner_button; - GtkButton* info_bar_install_button; - GtkRadioMenuItem* custom_crop_menuitem; - GtkRadioMenuItem* a4_menuitem; - GtkRadioMenuItem* a5_menuitem; - GtkRadioMenuItem* a6_menuitem; - GtkRadioMenuItem* letter_menuitem; - GtkRadioMenuItem* legal_menuitem; - GtkRadioMenuItem* four_by_six_menuitem; - GtkRadioMenuItem* no_crop_menuitem; - GtkMenuItem* page_move_left_menuitem; - GtkMenuItem* page_move_right_menuitem; - GtkMenuItem* page_delete_menuitem; - GtkMenuItem* crop_rotate_menuitem; - GtkMenuItem* save_menuitem; - GtkMenuItem* save_as_menuitem; - GtkMenuItem* copy_to_clipboard_menuitem; - GtkButton* save_button; - GtkToolButton* save_toolbutton; - GtkMenuItem* stop_scan_menuitem; - GtkToolButton* stop_toolbutton; - GtkToggleButton* crop_button; - GtkToggleToolButton* crop_toolbutton; - GtkButton* stop_button; - GtkButton* scan_button; - GtkRadioMenuItem* text_button_menuitem; - GtkRadioMenuItem* text_button_hb_menuitem; - GtkRadioMenuItem* text_menuitem; - GtkRadioMenuItem* photo_button_menuitem; - GtkRadioMenuItem* photo_button_hb_menuitem; - GtkRadioMenuItem* photo_menuitem; - GtkDialog* authorize_dialog; - GtkLabel* authorize_label; - GtkEntry* username_entry; - GtkEntry* password_entry; - GtkDialog* preferences_dialog; - GtkComboBox* device_combo; - GtkComboBox* text_dpi_combo; - GtkComboBox* photo_dpi_combo; - GtkComboBox* page_side_combo; - GtkComboBox* paper_size_combo; - GtkScale* brightness_scale; - GtkScale* contrast_scale; - GtkScale* quality_scale; - GtkListStore* device_model; - GtkListStore* text_dpi_model; - GtkListStore* photo_dpi_model; - GtkListStore* page_side_model; - GtkListStore* paper_size_model; - GtkAdjustment* brightness_adjustment; - GtkAdjustment* contrast_adjustment; - GtkAdjustment* quality_adjustment; - gboolean setting_devices; - gchar* missing_driver; - gboolean user_selected_device; - GtkFileChooserDialog* save_dialog; - ProgressBarDialog* progress_dialog; - gboolean have_error; - gchar* error_title; - gchar* error_text; - gboolean error_change_scanner_hint; - Book* _book; - gchar* book_uri; - AutosaveManager* autosave_manager; - BookView* book_view; - gboolean updating_page_menu; - gint default_page_width; - gint default_page_height; - gint default_page_dpi; - ScanDirection default_page_scan_direction; - gchar* document_hint; - gboolean scanning_; - gint window_width; - gint window_height; - gboolean window_is_maximized; - gboolean window_is_fullscreen; - guint save_state_timeout; -}; - -struct _ScanDevice { - GTypeInstance parent_instance; - volatile int ref_count; - ScanDevicePrivate * priv; - gchar* name; - gchar* label; -}; - -struct _ScanDeviceClass { - GTypeClass parent_class; - void (*finalize) (ScanDevice *self); -}; - -struct _Block1Data { - int _ref_count_; - UserInterface* self; - GtkListStore* file_type_store; - GtkComboBox* file_type_combo; -}; - -typedef enum { - SCAN_TYPE_SINGLE, - SCAN_TYPE_ADF_FRONT, - SCAN_TYPE_ADF_BACK, - SCAN_TYPE_ADF_BOTH -} ScanType; - -typedef enum { - SCAN_MODE_DEFAULT, - SCAN_MODE_COLOR, - SCAN_MODE_GRAY, - SCAN_MODE_LINEART -} ScanMode; - -struct _ScanOptions { - GTypeInstance parent_instance; - volatile int ref_count; - ScanOptionsPrivate * priv; - gint dpi; - ScanMode scan_mode; - gint depth; - ScanType type; - gint paper_width; - gint paper_height; - gint brightness; - gint contrast; -}; - -struct _ScanOptionsClass { - GTypeClass parent_class; - void (*finalize) (ScanOptions *self); -}; - -struct _Block2Data { - int _ref_count_; - UserInterface* self; - GtkWindow* dialog; -}; - -struct _Block3Data { - int _ref_count_; - UserInterface* self; - GtkStack* stack; - GtkSpinner* spinner; - GtkLabel* status_label; - GtkLabel* instructions_label; -}; - -struct _UserInterfaceInstallPackagesData { - int _state_; - GObject* _source_object_; - GAsyncResult* _res_; - GSimpleAsyncResult* _async_result; - UserInterface* self; - gchar** packages; - gint packages_length1; - PkProgressCallback progress_callback; - gpointer progress_callback_target; - PkResults* result; - PkTask* task; - PkTask* _tmp0_; - PkResults* results; - PkResults* _tmp1_; - PkTask* _tmp2_; - gchar** _tmp3_; - gint _tmp3__length1; - PkProgressCallback _tmp4_; - void* _tmp4__target; - PkResults* _tmp5_; - PkResults* _tmp6_; - gboolean _tmp7_; - PkResults* _tmp8_; - PkResults* _tmp9_; - PkError* _tmp10_; - PkError* _tmp11_; - GPtrArray* package_array; - PkResults* _tmp12_; - GPtrArray* _tmp13_; - gchar** package_ids; - GPtrArray* _tmp14_; - gint _tmp15_; - gint _tmp16_; - gchar** _tmp17_; - gint package_ids_length1; - gint _package_ids_size_; - gchar** _tmp18_; - gint _tmp18__length1; - GPtrArray* _tmp19_; - gint _tmp20_; - gint _tmp21_; - gchar* _tmp22_; - gint i; - gboolean _tmp23_; - gint _tmp24_; - gint _tmp25_; - GPtrArray* _tmp26_; - gint _tmp27_; - gint _tmp28_; - gchar** _tmp29_; - gint _tmp29__length1; - gint _tmp30_; - GPtrArray* _tmp31_; - gpointer* _tmp32_; - gint _tmp32__length1; - gint _tmp33_; - PkPackage* _tmp34_; - const gchar* _tmp35_; - gchar* _tmp36_; - gchar* _tmp37_; - PkResults* _tmp38_; - PkTask* _tmp39_; - gchar** _tmp40_; - gint _tmp40__length1; - PkProgressCallback _tmp41_; - void* _tmp41__target; - PkResults* _tmp42_; - PkResults* _tmp43_; - GError * _inner_error_; -}; - -struct _ProgressBarDialog { - GtkWindow parent_instance; - ProgressBarDialogPrivate * priv; -}; - -struct _ProgressBarDialogClass { - GtkWindowClass parent_class; -}; - -struct _ProgressBarDialogPrivate { - GtkProgressBar* bar; -}; - -struct _PageIcon { - GtkDrawingArea parent_instance; - PageIconPrivate * priv; -}; - -struct _PageIconClass { - GtkDrawingAreaClass parent_class; -}; - -struct _PageIconPrivate { - gchar* text; - gdouble r; - gdouble g; - gdouble b; -}; - - -static gpointer user_interface_parent_class = NULL; -static gpointer progress_bar_dialog_parent_class = NULL; -static gpointer page_icon_parent_class = NULL; - -GType user_interface_get_type (void) G_GNUC_CONST; -GType progress_bar_dialog_get_type (void) G_GNUC_CONST; -gpointer book_ref (gpointer instance); -void book_unref (gpointer instance); -GParamSpec* param_spec_book (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); -void value_set_book (GValue* value, gpointer v_object); -void value_take_book (GValue* value, gpointer v_object); -gpointer value_get_book (const GValue* value); -GType book_get_type (void) G_GNUC_CONST; -gpointer autosave_manager_ref (gpointer instance); -void autosave_manager_unref (gpointer instance); -GParamSpec* param_spec_autosave_manager (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); -void value_set_autosave_manager (GValue* value, gpointer v_object); -void value_take_autosave_manager (GValue* value, gpointer v_object); -gpointer value_get_autosave_manager (const GValue* value); -GType autosave_manager_get_type (void) G_GNUC_CONST; -GType book_view_get_type (void) G_GNUC_CONST; -GType scan_direction_get_type (void) G_GNUC_CONST; -#define USER_INTERFACE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_USER_INTERFACE, UserInterfacePrivate)) -enum { - USER_INTERFACE_DUMMY_PROPERTY, - USER_INTERFACE_BOOK, - USER_INTERFACE_SELECTED_PAGE, - USER_INTERFACE_SCANNING, - USER_INTERFACE_BRIGHTNESS, - USER_INTERFACE_CONTRAST, - USER_INTERFACE_QUALITY, - USER_INTERFACE_SELECTED_DEVICE -}; -Book* user_interface_get_book (UserInterface* self); -gpointer page_ref (gpointer instance); -void page_unref (gpointer instance); -GParamSpec* param_spec_page (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); -void value_set_page (GValue* value, gpointer v_object); -void value_take_page (GValue* value, gpointer v_object); -gpointer value_get_page (const GValue* value); -GType page_get_type (void) G_GNUC_CONST; -static void user_interface_page_added_cb (UserInterface* self, Book* book, Page* page); -static void _user_interface_page_added_cb_book_page_added (Book* _sender, Page* page, gpointer self); -static void user_interface_reordered_cb (UserInterface* self, Book* book); -static void _user_interface_reordered_cb_book_reordered (Book* _sender, gpointer self); -static void user_interface_page_removed_cb (UserInterface* self, Book* book, Page* page); -static void _user_interface_page_removed_cb_book_page_removed (Book* _sender, Page* page, gpointer self); -#define USER_INTERFACE_DEFAULT_TEXT_DPI 150 -#define USER_INTERFACE_DEFAULT_PHOTO_DPI 300 -void user_interface_new_document_activate_cb (UserInterface* self); -static void _user_interface_new_document_activate_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self); -void user_interface_reorder_document_activate_cb (UserInterface* self); -static void _user_interface_reorder_document_activate_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self); -void user_interface_save_document_activate_cb (UserInterface* self); -static void _user_interface_save_document_activate_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self); -void user_interface_save_as_document_activate_cb (UserInterface* self); -static void _user_interface_save_as_document_activate_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self); -void user_interface_email_document_activate_cb (UserInterface* self); -static void _user_interface_email_document_activate_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self); -void user_interface_print_document_activate_cb (UserInterface* self); -static void _user_interface_print_document_activate_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self); -void user_interface_preferences_activate_cb (UserInterface* self); -static void _user_interface_preferences_activate_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self); -void user_interface_help_contents_activate_cb (UserInterface* self); -static void _user_interface_help_contents_activate_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self); -void user_interface_about_activate_cb (UserInterface* self); -static void _user_interface_about_activate_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self); -void user_interface_quit_activate_cb (UserInterface* self); -static void _user_interface_quit_activate_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self); -UserInterface* user_interface_new (void); -UserInterface* user_interface_construct (GType object_type); -Book* book_new (void); -Book* book_construct (GType object_type); -static void user_interface_set_book (UserInterface* self, Book* value); -static void user_interface_needs_saving_cb (UserInterface* self, Book* book); -static void _user_interface_needs_saving_cb_book_needs_saving_changed (Book* _sender, gpointer self); -static void user_interface_load (UserInterface* self); -AutosaveManager* autosave_manager_new (void); -AutosaveManager* autosave_manager_construct (GType object_type); -void autosave_manager_set_book (AutosaveManager* self, Book* value); -void autosave_manager_load (AutosaveManager* self); -guint book_get_n_pages (Book* self); -static void user_interface_add_default_page (UserInterface* self); -void book_set_needs_saving (Book* self, gboolean value); -Page* book_get_page (Book* self, gint page_number); -void book_view_set_selected_page (BookView* self, Page* value); -static gboolean user_interface_find_scan_device (UserInterface* self, const gchar* device, GtkTreeIter* iter); -static void user_interface_show_error_dialog (UserInterface* self, const gchar* error_title, const gchar* error_text); -void user_interface_authorize (UserInterface* self, const gchar* resource, gchar** username, gchar** password); -static void user_interface_device_combo_changed_cb (UserInterface* self, GtkWidget* widget); -gchar* user_interface_get_selected_device (UserInterface* self); -static void _user_interface_device_combo_changed_cb_gtk_combo_box_changed (GtkComboBox* _sender, gpointer self); -static void user_interface_update_info_bar (UserInterface* self); -gpointer scan_device_ref (gpointer instance); -void scan_device_unref (gpointer instance); -GParamSpec* param_spec_scan_device (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); -void value_set_scan_device (GValue* value, gpointer v_object); -void value_take_scan_device (GValue* value, gpointer v_object); -gpointer value_get_scan_device (const GValue* value); -GType scan_device_get_type (void) G_GNUC_CONST; -void user_interface_set_scan_devices (UserInterface* self, GList* devices, const gchar* missing_driver); -Page* page_new (gint width, gint height, gint dpi, ScanDirection scan_direction); -Page* page_construct (GType object_type, gint width, gint height, gint dpi, ScanDirection scan_direction); -void book_append_page (Book* self, Page* page); -static gchar* user_interface_choose_file_location (UserInterface* self); -static Block1Data* block1_data_ref (Block1Data* _data1_); -static void block1_data_unref (void * _userdata_); -static void __lambda5_ (Block1Data* _data1_); -static void ___lambda5__gtk_combo_box_changed (GtkComboBox* _sender, gpointer self); -static gboolean user_interface_save_document (UserInterface* self, gboolean force_choose_location); -void user_interface_show_progress_dialog (UserInterface* self); -void book_save (Book* self, const gchar* type, gint quality, GFile* file, GError** error); -gint user_interface_get_quality (UserInterface* self); -void user_interface_hide_progress_dialog (UserInterface* self); -void user_interface_show_error (UserInterface* self, const gchar* error_title, const gchar* error_text, gboolean change_scanner_hint); -static gboolean user_interface_prompt_to_save (UserInterface* self, const gchar* title, const gchar* discard_label); -gboolean book_get_needs_saving (Book* self); -static void user_interface_clear_document (UserInterface* self); -void book_clear (Book* self); -static void user_interface_new_document (UserInterface* self); -gboolean user_interface_get_scanning (UserInterface* self); -static void user_interface_new_button_clicked_cb (UserInterface* self, GtkWidget* widget); -static void _user_interface_new_button_clicked_cb_gtk_button_clicked (GtkButton* _sender, gpointer self); -static void user_interface_set_document_hint (UserInterface* self, const gchar* document_hint, gboolean save); -static void user_interface_text_menuitem_toggled_cb (UserInterface* self, GtkCheckMenuItem* widget); -static void _user_interface_text_menuitem_toggled_cb_gtk_check_menu_item_toggled (GtkCheckMenuItem* _sender, gpointer self); -static void user_interface_photo_menuitem_toggled_cb (UserInterface* self, GtkCheckMenuItem* widget); -static void _user_interface_photo_menuitem_toggled_cb_gtk_check_menu_item_toggled (GtkCheckMenuItem* _sender, gpointer self); -GType scan_type_get_type (void) G_GNUC_CONST; -static void user_interface_set_page_side (UserInterface* self, ScanType page_side); -static void user_interface_set_paper_size (UserInterface* self, gint width, gint height); -static gint user_interface_get_text_dpi (UserInterface* self); -static gint user_interface_get_photo_dpi (UserInterface* self); -static ScanType user_interface_get_page_side (UserInterface* self); -static gboolean user_interface_get_paper_size (UserInterface* self, gint* width, gint* height); -gpointer scan_options_ref (gpointer instance); -void scan_options_unref (gpointer instance); -GParamSpec* param_spec_scan_options (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); -void value_set_scan_options (GValue* value, gpointer v_object); -void value_take_scan_options (GValue* value, gpointer v_object); -gpointer value_get_scan_options (const GValue* value); -GType scan_options_get_type (void) G_GNUC_CONST; -static ScanOptions* user_interface_make_scan_options (UserInterface* self); -ScanOptions* scan_options_new (void); -ScanOptions* scan_options_construct (GType object_type); -GType scan_mode_get_type (void) G_GNUC_CONST; -gint user_interface_get_brightness (UserInterface* self); -gint user_interface_get_contrast (UserInterface* self); -static void user_interface_scan_button_clicked_cb (UserInterface* self, GtkWidget* widget); -static void _user_interface_scan_button_clicked_cb_gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self); -static void user_interface_stop_scan_button_clicked_cb (UserInterface* self, GtkWidget* widget); -static void _user_interface_stop_scan_button_clicked_cb_gtk_button_clicked (GtkButton* _sender, gpointer self); -static void user_interface_continuous_scan_button_clicked_cb (UserInterface* self, GtkWidget* widget); -static void _user_interface_continuous_scan_button_clicked_cb_gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self); -static void user_interface_preferences_button_clicked_cb (UserInterface* self, GtkWidget* widget); -static void _user_interface_preferences_button_clicked_cb_gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self); -static gboolean user_interface_preferences_dialog_delete_event_cb (UserInterface* self, GtkWidget* widget, GdkEventAny* event); -static gboolean _user_interface_preferences_dialog_delete_event_cb_gtk_widget_delete_event (GtkWidget* _sender, GdkEventAny* event, gpointer self); -static void user_interface_preferences_dialog_response_cb (UserInterface* self, GtkWidget* widget, gint response_id); -static void _user_interface_preferences_dialog_response_cb_gtk_dialog_response (GtkDialog* _sender, gint response_id, gpointer self); -static void user_interface_update_page_menu (UserInterface* self); -Page* book_view_get_selected_page (BookView* self); -guint book_get_page_index (Book* self, Page* page); -static void user_interface_page_selected_cb (UserInterface* self, BookView* view, Page* page); -gboolean page_get_has_crop (Page* self); -const gchar* page_get_crop_name (Page* self); -static void user_interface_show_page_cb (UserInterface* self, BookView* view, Page* page); -gchar* get_temporary_filename (const gchar* prefix, const gchar* extension); -void page_save (Page* self, const gchar* type, gint quality, GFile* file, GError** error); -static void user_interface_show_page_menu_cb (UserInterface* self, BookView* view); -static void user_interface_rotate_left_button_clicked_cb (UserInterface* self, GtkWidget* widget); -void page_rotate_left (Page* self); -static void _user_interface_rotate_left_button_clicked_cb_gtk_button_clicked (GtkButton* _sender, gpointer self); -static void user_interface_rotate_right_button_clicked_cb (UserInterface* self, GtkWidget* widget); -void page_rotate_right (Page* self); -static void _user_interface_rotate_right_button_clicked_cb_gtk_button_clicked (GtkButton* _sender, gpointer self); -static void user_interface_set_crop (UserInterface* self, const gchar* crop_name); -void page_set_no_crop (Page* self); -gint page_get_width (Page* self); -gint page_get_height (Page* self); -void page_set_custom_crop (Page* self, gint width, gint height); -void page_move_crop (Page* self, gint x, gint y); -void page_set_named_crop (Page* self, const gchar* name); -static void user_interface_no_crop_menuitem_toggled_cb (UserInterface* self, GtkCheckMenuItem* widget); -static void _user_interface_no_crop_menuitem_toggled_cb_gtk_check_menu_item_toggled (GtkCheckMenuItem* _sender, gpointer self); -static void user_interface_custom_crop_menuitem_toggled_cb (UserInterface* self, GtkCheckMenuItem* widget); -static void _user_interface_custom_crop_menuitem_toggled_cb_gtk_check_menu_item_toggled (GtkCheckMenuItem* _sender, gpointer self); -static void user_interface_crop_button_toggled_cb (UserInterface* self, GtkToggleButton* widget); -static void _user_interface_crop_button_toggled_cb_gtk_toggle_button_toggled (GtkToggleButton* _sender, gpointer self); -static void user_interface_crop_toolbutton_toggled_cb (UserInterface* self, GtkToggleToolButton* widget); -static void _user_interface_crop_toolbutton_toggled_cb_gtk_toggle_tool_button_toggled (GtkToggleToolButton* _sender, gpointer self); -static void user_interface_four_by_six_menuitem_toggled_cb (UserInterface* self, GtkCheckMenuItem* widget); -static void _user_interface_four_by_six_menuitem_toggled_cb_gtk_check_menu_item_toggled (GtkCheckMenuItem* _sender, gpointer self); -static void user_interface_legal_menuitem_toggled_cb (UserInterface* self, GtkCheckMenuItem* widget); -static void _user_interface_legal_menuitem_toggled_cb_gtk_check_menu_item_toggled (GtkCheckMenuItem* _sender, gpointer self); -static void user_interface_letter_menuitem_toggled_cb (UserInterface* self, GtkCheckMenuItem* widget); -static void _user_interface_letter_menuitem_toggled_cb_gtk_check_menu_item_toggled (GtkCheckMenuItem* _sender, gpointer self); -static void user_interface_a6_menuitem_toggled_cb (UserInterface* self, GtkCheckMenuItem* widget); -static void _user_interface_a6_menuitem_toggled_cb_gtk_check_menu_item_toggled (GtkCheckMenuItem* _sender, gpointer self); -static void user_interface_a5_menuitem_toggled_cb (UserInterface* self, GtkCheckMenuItem* widget); -static void _user_interface_a5_menuitem_toggled_cb_gtk_check_menu_item_toggled (GtkCheckMenuItem* _sender, gpointer self); -static void user_interface_a4_menuitem_toggled_cb (UserInterface* self, GtkCheckMenuItem* widget); -static void _user_interface_a4_menuitem_toggled_cb_gtk_check_menu_item_toggled (GtkCheckMenuItem* _sender, gpointer self); -static void user_interface_crop_rotate_menuitem_activate_cb (UserInterface* self, GtkWidget* widget); -void page_rotate_crop (Page* self); -static void _user_interface_crop_rotate_menuitem_activate_cb_gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self); -static void user_interface_page_move_left_menuitem_activate_cb (UserInterface* self, GtkWidget* widget); -void book_move_page (Book* self, Page* page, guint location); -static void _user_interface_page_move_left_menuitem_activate_cb_gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self); -static void user_interface_page_move_right_menuitem_activate_cb (UserInterface* self, GtkWidget* widget); -static void _user_interface_page_move_right_menuitem_activate_cb_gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self); -static void user_interface_page_delete_menuitem_activate_cb (UserInterface* self, GtkWidget* widget); -Book* book_view_get_book (BookView* self); -void book_delete_page (Book* self, Page* page); -static void _user_interface_page_delete_menuitem_activate_cb_gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self); -static void user_interface_reorder_document (UserInterface* self); -static Block2Data* block2_data_ref (Block2Data* _data2_); -static void block2_data_unref (void * _userdata_); -static gboolean __lambda6_ (Block2Data* _data2_, GdkEventKey* e); -static gboolean ___lambda6__gtk_widget_key_press_event (GtkWidget* _sender, GdkEventKey* event, gpointer self); -static GtkButton* user_interface_make_reorder_button (UserInterface* self, const gchar* text, const gchar* items); -static void __lambda7_ (Block2Data* _data2_); -void book_combine_sides (Book* self); -static void ___lambda7__gtk_button_clicked (GtkButton* _sender, gpointer self); -static void __lambda8_ (Block2Data* _data2_); -void book_combine_sides_reverse (Book* self); -static void ___lambda8__gtk_button_clicked (GtkButton* _sender, gpointer self); -static void __lambda9_ (Block2Data* _data2_); -void book_reverse (Book* self); -static void ___lambda9__gtk_button_clicked (GtkButton* _sender, gpointer self); -static void __lambda10_ (Block2Data* _data2_); -static void ___lambda10__gtk_button_clicked (GtkButton* _sender, gpointer self); -static void user_interface_reorder_menuitem_activate_cb (UserInterface* self, GtkWidget* widget); -static void _user_interface_reorder_menuitem_activate_cb_gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self); -static GtkBox* user_interface_make_reorder_box (UserInterface* self, const gchar* items); -GType page_icon_get_type (void) G_GNUC_CONST; -PageIcon* page_icon_new (const gchar* text, gdouble r, gdouble g, gdouble b); -PageIcon* page_icon_construct (GType object_type, const gchar* text, gdouble r, gdouble g, gdouble b); -static void user_interface_save_file_button_clicked_cb (UserInterface* self, GtkWidget* widget); -static void _user_interface_save_file_button_clicked_cb_gtk_button_clicked (GtkButton* _sender, gpointer self); -static void user_interface_copy_to_clipboard_button_clicked_cb (UserInterface* self, GtkWidget* widget); -void page_copy_to_clipboard (Page* self, GtkWindow* window); -static void _user_interface_copy_to_clipboard_button_clicked_cb_gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self); -static void user_interface_save_as_file_button_clicked_cb (UserInterface* self, GtkWidget* widget); -static void _user_interface_save_as_file_button_clicked_cb_gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self); -static void user_interface_draw_page (UserInterface* self, GtkPrintOperation* operation, GtkPrintContext* print_context, gint page_number); -gboolean page_get_is_landscape (Page* self); -gint page_get_dpi (Page* self); -GdkPixbuf* page_get_image (Page* self, gboolean apply_crop); -static void user_interface_email_button_clicked_cb (UserInterface* self, GtkWidget* widget); -static void _user_interface_email_button_clicked_cb_gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self); -static void user_interface_print_document (UserInterface* self); -static void _user_interface_draw_page_gtk_print_operation_draw_page (GtkPrintOperation* _sender, GtkPrintContext* context, gint page_nr, gpointer self); -static void user_interface_print_button_clicked_cb (UserInterface* self, GtkWidget* widget); -static void _user_interface_print_button_clicked_cb_gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self); -static void user_interface_launch_help (UserInterface* self); -static void user_interface_help_contents_menuitem_activate_cb (UserInterface* self, GtkWidget* widget); -static void _user_interface_help_contents_menuitem_activate_cb_gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self); -static void user_interface_show_about (UserInterface* self); -static void user_interface_about_menuitem_activate_cb (UserInterface* self, GtkWidget* widget); -static void _user_interface_about_menuitem_activate_cb_gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self); -static gboolean user_interface_on_quit (UserInterface* self); -static void user_interface_save_state (UserInterface* self, gboolean force); -void autosave_manager_cleanup (AutosaveManager* self); -static void user_interface_quit_menuitem_activate_cb (UserInterface* self, GtkWidget* widget); -static void _user_interface_quit_menuitem_activate_cb_gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self); -static void user_interface_real_size_allocate (GtkWidget* base, GtkAllocation* allocation); -static void user_interface_info_bar_response_cb (UserInterface* self, GtkInfoBar* widget, gint response_id); -static void user_interface_install_drivers (UserInterface* self); -static Block3Data* block3_data_ref (Block3Data* _data3_); -static void block3_data_unref (void * _userdata_); -static void user_interface_install_packages (UserInterface* self, gchar** packages, int packages_length1, PkProgressCallback progress_callback, void* progress_callback_target, GAsyncReadyCallback _callback_, gpointer _user_data_); -static PkResults* user_interface_install_packages_finish (UserInterface* self, GAsyncResult* _res_, GError** error); -static void ___lambda12_ (UserInterface* self); -static void ____lambda12__pk_progress_callback (PkProgress* progress, PkProgressType type, gpointer self); -static void ___lambda13_ (Block3Data* _data3_, GObject* object, GAsyncResult* _result_); -static void ____lambda13__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self); -static void user_interface_install_packages_data_free (gpointer _data); -static gboolean user_interface_install_packages_co (UserInterfaceInstallPackagesData* _data_); -static void user_interface_install_packages_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_); -static gboolean user_interface_real_window_state_event (GtkWidget* base, GdkEventWindowState* event); -static gboolean user_interface_window_delete_event_cb (UserInterface* self, GtkWidget* widget, GdkEventAny* event); -static gboolean _user_interface_window_delete_event_cb_gtk_widget_delete_event (GtkWidget* _sender, GdkEventAny* event, gpointer self); -static void user_interface_page_size_changed_cb (UserInterface* self, Page* page); -static void user_interface_page_scan_direction_changed_cb (UserInterface* self, Page* page); -ScanDirection page_get_scan_direction (Page* self); -static void _user_interface_page_size_changed_cb_page_size_changed (Page* _sender, gpointer self); -static void _user_interface_page_scan_direction_changed_cb_page_scan_direction_changed (Page* _sender, gpointer self); -static void user_interface_set_dpi_combo (UserInterface* self, GtkComboBox* combo, gint default_dpi, gint current_dpi); -static gboolean user_interface_is_traditional_desktop (UserInterface* self); -static void _user_interface_info_bar_response_cb_gtk_info_bar_response (GtkInfoBar* _sender, gint response_id, gpointer self); -static void __lambda14_ (UserInterface* self); -static void ___lambda14__gtk_combo_box_changed (GtkComboBox* _sender, gpointer self); -static void __lambda15_ (UserInterface* self); -static void ___lambda15__gtk_combo_box_changed (GtkComboBox* _sender, gpointer self); -static void __lambda16_ (UserInterface* self); -static void ___lambda16__gtk_combo_box_changed (GtkComboBox* _sender, gpointer self); -static void __lambda17_ (UserInterface* self); -static void ___lambda17__gtk_combo_box_changed (GtkComboBox* _sender, gpointer self); -void user_interface_set_brightness (UserInterface* self, gint value); -static void __lambda18_ (UserInterface* self); -static void ___lambda18__gtk_adjustment_value_changed (GtkAdjustment* _sender, gpointer self); -void user_interface_set_contrast (UserInterface* self, gint value); -static void __lambda19_ (UserInterface* self); -static void ___lambda19__gtk_adjustment_value_changed (GtkAdjustment* _sender, gpointer self); -void user_interface_set_quality (UserInterface* self, gint value); -static void __lambda20_ (UserInterface* self); -static void ___lambda20__gtk_adjustment_value_changed (GtkAdjustment* _sender, gpointer self); -BookView* book_view_new (Book* book); -BookView* book_view_construct (GType object_type, Book* book); -static void _user_interface_page_selected_cb_book_view_page_selected (BookView* _sender, Page* page, gpointer self); -static void _user_interface_show_page_cb_book_view_show_page (BookView* _sender, Page* page, gpointer self); -static void _user_interface_show_page_menu_cb_book_view_show_menu (BookView* _sender, gpointer self); -static void user_interface_load_state (UserInterface* self); -ProgressBarDialog* progress_bar_dialog_new (GtkApplicationWindow* parent, const gchar* title); -ProgressBarDialog* progress_bar_dialog_construct (GType object_type, GtkApplicationWindow* parent, const gchar* title); -static void user_interface_book_saving_cb (UserInterface* self, gint page_number); -static void _user_interface_book_saving_cb_book_saving (Book* _sender, gint i, gpointer self); -static gboolean user_interface_is_desktop (UserInterface* self, const gchar* name); -static gchar* user_interface_get_state_filename (UserInterface* self); -static gint user_interface_state_get_integer (UserInterface* self, GKeyFile* f, const gchar* group_name, const gchar* key, gint _default_); -static gboolean user_interface_state_get_boolean (UserInterface* self, GKeyFile* f, const gchar* group_name, const gchar* key, gboolean _default_); -static gchar* user_interface_state_get_string (UserInterface* self, GKeyFile* f, const gchar* group_name, const gchar* key, const gchar* _default_); -static gboolean ___lambda11_ (UserInterface* self); -static gboolean ____lambda11__gsource_func (gpointer self); -static gboolean ___lambda21_ (UserInterface* self); -static gboolean ____lambda21__gsource_func (gpointer self); -void progress_bar_dialog_set_fraction (ProgressBarDialog* self, gdouble value); -void progress_bar_dialog_set_message (ProgressBarDialog* self, const gchar* value); -void user_interface_start (UserInterface* self); -Page* user_interface_get_selected_page (UserInterface* self); -void user_interface_set_selected_page (UserInterface* self, Page* value); -void user_interface_set_scanning (UserInterface* self, gboolean value); -void user_interface_set_selected_device (UserInterface* self, const gchar* value); -static void g_cclosure_user_marshal_VOID__STRING_SCAN_OPTIONS (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data); -static void g_cclosure_user_marshal_VOID__STRING_INT (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data); -static void user_interface_finalize (GObject* obj); -static void _vala_user_interface_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); -static void _vala_user_interface_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec); -#define PROGRESS_BAR_DIALOG_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_PROGRESS_BAR_DIALOG, ProgressBarDialogPrivate)) -enum { - PROGRESS_BAR_DIALOG_DUMMY_PROPERTY, - PROGRESS_BAR_DIALOG_FRACTION, - PROGRESS_BAR_DIALOG_MESSAGE -}; -gdouble progress_bar_dialog_get_fraction (ProgressBarDialog* self); -const gchar* progress_bar_dialog_get_message (ProgressBarDialog* self); -static void progress_bar_dialog_finalize (GObject* obj); -static void _vala_progress_bar_dialog_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); -static void _vala_progress_bar_dialog_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec); -#define PAGE_ICON_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_PAGE_ICON, PageIconPrivate)) -enum { - PAGE_ICON_DUMMY_PROPERTY -}; -#define PAGE_ICON_MINIMUM_WIDTH 20 -static void page_icon_real_get_preferred_width (GtkWidget* base, gint* minimum_width, gint* natural_width); -static void page_icon_real_get_preferred_height (GtkWidget* base, gint* minimum_height, gint* natural_height); -static void page_icon_real_get_preferred_height_for_width (GtkWidget* base, gint width, gint* minimum_height, gint* natural_height); -static void page_icon_real_get_preferred_width_for_height (GtkWidget* base, gint height, gint* minimum_width, gint* natural_width); -static gboolean page_icon_real_draw (GtkWidget* base, cairo_t* c); -static void page_icon_finalize (GObject* obj); -static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func); -static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func); -static gint _vala_array_length (gpointer array); - -static const GActionEntry USER_INTERFACE_action_entries[10] = {{"new_document", _user_interface_new_document_activate_cb_gsimple_action_activate_callback}, {"reorder", _user_interface_reorder_document_activate_cb_gsimple_action_activate_callback}, {"save", _user_interface_save_document_activate_cb_gsimple_action_activate_callback}, {"save_as", _user_interface_save_as_document_activate_cb_gsimple_action_activate_callback}, {"email", _user_interface_email_document_activate_cb_gsimple_action_activate_callback}, {"print", _user_interface_print_document_activate_cb_gsimple_action_activate_callback}, {"preferences", _user_interface_preferences_activate_cb_gsimple_action_activate_callback}, {"help", _user_interface_help_contents_activate_cb_gsimple_action_activate_callback}, {"about", _user_interface_about_activate_cb_gsimple_action_activate_callback}, {"quit", _user_interface_quit_activate_cb_gsimple_action_activate_callback}}; - -static void _user_interface_page_added_cb_book_page_added (Book* _sender, Page* page, gpointer self) { -#line 288 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_page_added_cb ((UserInterface*) self, _sender, page); -#line 795 "ui.c" -} - - -static void _user_interface_reordered_cb_book_reordered (Book* _sender, gpointer self) { -#line 289 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_reordered_cb ((UserInterface*) self, _sender); -#line 802 "ui.c" -} - - -static void _user_interface_page_removed_cb_book_page_removed (Book* _sender, Page* page, gpointer self) { -#line 290 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_page_removed_cb ((UserInterface*) self, _sender, page); -#line 809 "ui.c" -} - - -static void _user_interface_new_document_activate_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) { -#line 19 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_new_document_activate_cb ((UserInterface*) self); -#line 816 "ui.c" -} - - -static void _user_interface_reorder_document_activate_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) { -#line 19 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_reorder_document_activate_cb ((UserInterface*) self); -#line 823 "ui.c" -} - - -static void _user_interface_save_document_activate_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) { -#line 19 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_save_document_activate_cb ((UserInterface*) self); -#line 830 "ui.c" -} - - -static void _user_interface_save_as_document_activate_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) { -#line 19 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_save_as_document_activate_cb ((UserInterface*) self); -#line 837 "ui.c" -} - - -static void _user_interface_email_document_activate_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) { -#line 19 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_email_document_activate_cb ((UserInterface*) self); -#line 844 "ui.c" -} - - -static void _user_interface_print_document_activate_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) { -#line 19 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_print_document_activate_cb ((UserInterface*) self); -#line 851 "ui.c" -} - - -static void _user_interface_preferences_activate_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) { -#line 19 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_preferences_activate_cb ((UserInterface*) self); -#line 858 "ui.c" -} - - -static void _user_interface_help_contents_activate_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) { -#line 19 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_help_contents_activate_cb ((UserInterface*) self); -#line 865 "ui.c" -} - - -static void _user_interface_about_activate_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) { -#line 19 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_about_activate_cb ((UserInterface*) self); -#line 872 "ui.c" -} - - -static void _user_interface_quit_activate_cb_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) { -#line 19 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_quit_activate_cb ((UserInterface*) self); -#line 879 "ui.c" -} - - -static void _user_interface_needs_saving_cb_book_needs_saving_changed (Book* _sender, gpointer self) { -#line 269 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_needs_saving_cb ((UserInterface*) self, _sender); -#line 886 "ui.c" -} - - -UserInterface* user_interface_construct (GType object_type) { - UserInterface * self = NULL; - GSettings* _tmp0_ = NULL; - Book* _tmp1_ = NULL; - Book* _tmp2_ = NULL; - Book* _tmp3_ = NULL; - Book* _tmp4_ = NULL; - Book* _tmp5_ = NULL; - Book* _tmp6_ = NULL; - AutosaveManager* _tmp7_ = NULL; - AutosaveManager* _tmp8_ = NULL; - Book* _tmp9_ = NULL; - AutosaveManager* _tmp10_ = NULL; - Book* _tmp11_ = NULL; - guint _tmp12_ = 0U; - guint _tmp13_ = 0U; -#line 261 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self = (UserInterface*) g_object_new (object_type, NULL); -#line 263 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = g_settings_new ("org.gnome.SimpleScan"); -#line 263 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->settings); -#line 263 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self->priv->settings = _tmp0_; -#line 265 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = book_new (); -#line 265 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = _tmp1_; -#line 265 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_set_book (self, _tmp2_); -#line 265 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _book_unref0 (_tmp2_); -#line 266 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = self->priv->_book; -#line 266 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_signal_connect_object (_tmp3_, "page-added", (GCallback) _user_interface_page_added_cb_book_page_added, self, 0); -#line 267 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp4_ = self->priv->_book; -#line 267 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_signal_connect_object (_tmp4_, "reordered", (GCallback) _user_interface_reordered_cb_book_reordered, self, 0); -#line 268 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp5_ = self->priv->_book; -#line 268 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_signal_connect_object (_tmp5_, "page-removed", (GCallback) _user_interface_page_removed_cb_book_page_removed, self, 0); -#line 269 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp6_ = self->priv->_book; -#line 269 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_signal_connect_object (_tmp6_, "needs-saving-changed", (GCallback) _user_interface_needs_saving_cb_book_needs_saving_changed, self, 0); -#line 271 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_load (self); -#line 273 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp7_ = autosave_manager_new (); -#line 273 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _autosave_manager_unref0 (self->priv->autosave_manager); -#line 273 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self->priv->autosave_manager = _tmp7_; -#line 274 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp8_ = self->priv->autosave_manager; -#line 274 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp9_ = self->priv->_book; -#line 274 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - autosave_manager_set_book (_tmp8_, _tmp9_); -#line 275 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp10_ = self->priv->autosave_manager; -#line 275 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - autosave_manager_load (_tmp10_); -#line 277 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp11_ = self->priv->_book; -#line 277 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp12_ = book_get_n_pages (_tmp11_); -#line 277 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp13_ = _tmp12_; -#line 277 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp13_ == ((guint) 0)) { -#line 964 "ui.c" - Book* _tmp14_ = NULL; -#line 279 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_add_default_page (self); -#line 280 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp14_ = self->priv->_book; -#line 280 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - book_set_needs_saving (_tmp14_, FALSE); -#line 972 "ui.c" - } else { - BookView* _tmp15_ = NULL; - Book* _tmp16_ = NULL; - Page* _tmp17_ = NULL; - Page* _tmp18_ = NULL; -#line 283 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp15_ = self->priv->book_view; -#line 283 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp16_ = self->priv->_book; -#line 283 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp17_ = book_get_page (_tmp16_, 0); -#line 283 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp18_ = _tmp17_; -#line 283 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - book_view_set_selected_page (_tmp15_, _tmp18_); -#line 283 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _page_unref0 (_tmp18_); -#line 990 "ui.c" - } -#line 261 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return self; -#line 994 "ui.c" -} - - -UserInterface* user_interface_new (void) { -#line 261 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return user_interface_construct (TYPE_USER_INTERFACE); -#line 1001 "ui.c" -} - - -static gboolean user_interface_find_scan_device (UserInterface* self, const gchar* device, GtkTreeIter* iter) { - GtkTreeIter _vala_iter = {0}; - gboolean result = FALSE; - gboolean have_iter = FALSE; - GtkListStore* _tmp0_ = NULL; - GtkTreeIter _tmp1_ = {0}; - gboolean _tmp2_ = FALSE; -#line 293 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_val_if_fail (self != NULL, FALSE); -#line 293 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_val_if_fail (device != NULL, FALSE); -#line 295 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - have_iter = FALSE; -#line 297 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = self->priv->device_model; -#line 297 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = gtk_tree_model_get_iter_first ((GtkTreeModel*) _tmp0_, &_tmp1_); -#line 297 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _vala_iter = _tmp1_; -#line 297 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp2_) { -#line 1026 "ui.c" - { - gboolean _tmp3_ = FALSE; -#line 299 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = TRUE; -#line 299 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - while (TRUE) { -#line 1033 "ui.c" - gchar* d = NULL; - GtkListStore* _tmp8_ = NULL; - GtkTreeIter _tmp9_ = {0}; - const gchar* _tmp10_ = NULL; - const gchar* _tmp11_ = NULL; -#line 299 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (!_tmp3_) { -#line 1041 "ui.c" - gboolean _tmp4_ = FALSE; - gboolean _tmp5_ = FALSE; -#line 305 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp5_ = have_iter; -#line 305 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (!_tmp5_) { -#line 1048 "ui.c" - GtkListStore* _tmp6_ = NULL; - gboolean _tmp7_ = FALSE; -#line 305 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp6_ = self->priv->device_model; -#line 305 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp7_ = gtk_tree_model_iter_next ((GtkTreeModel*) _tmp6_, &_vala_iter); -#line 305 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp4_ = _tmp7_; -#line 1057 "ui.c" - } else { -#line 305 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp4_ = FALSE; -#line 1061 "ui.c" - } -#line 305 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (!_tmp4_) { -#line 305 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - break; -#line 1067 "ui.c" - } - } -#line 299 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = FALSE; -#line 302 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp8_ = self->priv->device_model; -#line 302 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp9_ = _vala_iter; -#line 302 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_tree_model_get ((GtkTreeModel*) _tmp8_, &_tmp9_, 0, &d, -1, -1); -#line 303 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp10_ = d; -#line 303 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp11_ = device; -#line 303 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (g_strcmp0 (_tmp10_, _tmp11_) == 0) { -#line 304 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - have_iter = TRUE; -#line 1086 "ui.c" - } -#line 299 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (d); -#line 1090 "ui.c" - } - } - } -#line 308 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - result = have_iter; -#line 308 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (iter) { -#line 308 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - *iter = _vala_iter; -#line 1100 "ui.c" - } -#line 308 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return result; -#line 1104 "ui.c" -} - - -static void user_interface_show_error_dialog (UserInterface* self, const gchar* error_title, const gchar* error_text) { - GtkMessageDialog* dialog = NULL; - const gchar* _tmp0_ = NULL; - GtkMessageDialog* _tmp1_ = NULL; - const gchar* _tmp2_ = NULL; - const gchar* _tmp3_ = NULL; -#line 311 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 311 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (error_title != NULL); -#line 311 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (error_text != NULL); -#line 313 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = error_title; -#line 313 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = (GtkMessageDialog*) gtk_message_dialog_new ((GtkWindow*) self, GTK_DIALOG_MODAL, GTK_MESSAGE_WARNING, GTK_BUTTONS_NONE, "%s", _tmp0_); -#line 313 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_object_ref_sink (_tmp1_); -#line 313 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - dialog = _tmp1_; -#line 318 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = _ ("_Close"); -#line 318 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_dialog_add_button ((GtkDialog*) dialog, _tmp2_, 0); -#line 319 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = error_text; -#line 319 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_message_dialog_format_secondary_text (dialog, "%s", _tmp3_); -#line 320 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_dialog_run ((GtkDialog*) dialog); -#line 321 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_destroy ((GtkWidget*) dialog); -#line 311 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (dialog); -#line 1142 "ui.c" -} - - -void user_interface_authorize (UserInterface* self, const gchar* resource, gchar** username, gchar** password) { - gchar* _vala_username = NULL; - gchar* _vala_password = NULL; - gchar* description = NULL; - const gchar* _tmp0_ = NULL; - const gchar* _tmp1_ = NULL; - gchar* _tmp2_ = NULL; - GtkEntry* _tmp3_ = NULL; - GtkEntry* _tmp4_ = NULL; - GtkLabel* _tmp5_ = NULL; - GtkDialog* _tmp6_ = NULL; - GtkDialog* _tmp7_ = NULL; - GtkDialog* _tmp8_ = NULL; - GtkEntry* _tmp9_ = NULL; - const gchar* _tmp10_ = NULL; - const gchar* _tmp11_ = NULL; - gchar* _tmp12_ = NULL; - GtkEntry* _tmp13_ = NULL; - const gchar* _tmp14_ = NULL; - const gchar* _tmp15_ = NULL; - gchar* _tmp16_ = NULL; -#line 324 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 324 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (resource != NULL); -#line 327 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = _ ("Username and password required to access '%s'"); -#line 327 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = resource; -#line 327 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = g_strdup_printf (_tmp0_, _tmp1_); -#line 327 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - description = _tmp2_; -#line 329 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = self->priv->username_entry; -#line 329 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_entry_set_text (_tmp3_, ""); -#line 330 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp4_ = self->priv->password_entry; -#line 330 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_entry_set_text (_tmp4_, ""); -#line 331 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp5_ = self->priv->authorize_label; -#line 331 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_label_set_text (_tmp5_, description); -#line 333 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp6_ = self->priv->authorize_dialog; -#line 333 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_set_visible ((GtkWidget*) _tmp6_, TRUE); -#line 334 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp7_ = self->priv->authorize_dialog; -#line 334 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_dialog_run (_tmp7_); -#line 335 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp8_ = self->priv->authorize_dialog; -#line 335 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_set_visible ((GtkWidget*) _tmp8_, FALSE); -#line 337 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp9_ = self->priv->username_entry; -#line 337 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp10_ = gtk_entry_get_text (_tmp9_); -#line 337 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp11_ = _tmp10_; -#line 337 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp12_ = g_strdup (_tmp11_); -#line 337 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (_vala_username); -#line 337 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _vala_username = _tmp12_; -#line 338 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp13_ = self->priv->password_entry; -#line 338 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp14_ = gtk_entry_get_text (_tmp13_); -#line 338 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp15_ = _tmp14_; -#line 338 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp16_ = g_strdup (_tmp15_); -#line 338 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (_vala_password); -#line 338 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _vala_password = _tmp16_; -#line 324 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (description); -#line 324 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (username) { -#line 324 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - *username = _vala_username; -#line 1233 "ui.c" - } else { -#line 324 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (_vala_username); -#line 1237 "ui.c" - } -#line 324 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (password) { -#line 324 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - *password = _vala_password; -#line 1243 "ui.c" - } else { -#line 324 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (_vala_password); -#line 1247 "ui.c" - } -} - - -static void user_interface_device_combo_changed_cb (UserInterface* self, GtkWidget* widget) { - gboolean _tmp0_ = FALSE; - gchar* _tmp1_ = NULL; - gchar* _tmp2_ = NULL; - gchar* _tmp3_ = NULL; - gboolean _tmp4_ = FALSE; -#line 342 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 342 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (widget != NULL); -#line 344 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = self->priv->setting_devices; -#line 344 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp0_) { -#line 345 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return; -#line 1268 "ui.c" - } -#line 346 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self->priv->user_selected_device = TRUE; -#line 347 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = user_interface_get_selected_device (self); -#line 347 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = _tmp1_; -#line 347 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = _tmp2_; -#line 347 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp4_ = _tmp3_ != NULL; -#line 347 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (_tmp3_); -#line 347 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp4_) { -#line 1284 "ui.c" - GSettings* _tmp5_ = NULL; - gchar* _tmp6_ = NULL; - gchar* _tmp7_ = NULL; - gchar* _tmp8_ = NULL; -#line 348 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp5_ = self->priv->settings; -#line 348 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp6_ = user_interface_get_selected_device (self); -#line 348 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp7_ = _tmp6_; -#line 348 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp8_ = _tmp7_; -#line 348 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_settings_set_string (_tmp5_, "selected-device", _tmp8_); -#line 348 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (_tmp8_); -#line 1301 "ui.c" - } -} - - -static void _user_interface_device_combo_changed_cb_gtk_combo_box_changed (GtkComboBox* _sender, gpointer self) { -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_device_combo_changed_cb ((UserInterface*) self, _sender); -#line 1309 "ui.c" -} - - -static void user_interface_update_info_bar (UserInterface* self) { - GtkMessageType type = 0; - gchar* title = NULL; - gchar* text = NULL; - gchar* image_id = NULL; - gboolean show_close_button = FALSE; - gboolean show_install_button = FALSE; - gboolean show_change_scanner_button = FALSE; - gboolean _tmp0_ = FALSE; - GtkInfoBar* _tmp20_ = NULL; - GtkMessageType _tmp21_ = 0; - GtkImage* _tmp22_ = NULL; - const gchar* _tmp23_ = NULL; - gchar* message = NULL; - const gchar* _tmp24_ = NULL; - const gchar* _tmp25_ = NULL; - gchar* _tmp26_ = NULL; - GtkLabel* _tmp27_ = NULL; - const gchar* _tmp28_ = NULL; - GtkButton* _tmp29_ = NULL; - gboolean _tmp30_ = FALSE; - GtkButton* _tmp31_ = NULL; - gboolean _tmp32_ = FALSE; - GtkButton* _tmp33_ = NULL; - gboolean _tmp34_ = FALSE; - GtkInfoBar* _tmp35_ = NULL; -#line 351 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 355 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - show_close_button = FALSE; -#line 356 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - show_install_button = FALSE; -#line 357 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - show_change_scanner_button = FALSE; -#line 359 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = self->priv->have_error; -#line 359 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp0_) { -#line 1351 "ui.c" - gchar* _tmp1_ = NULL; - const gchar* _tmp2_ = NULL; - gchar* _tmp3_ = NULL; - const gchar* _tmp4_ = NULL; - gchar* _tmp5_ = NULL; - gboolean _tmp6_ = FALSE; -#line 361 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - type = GTK_MESSAGE_ERROR; -#line 362 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = g_strdup ("dialog-error"); -#line 362 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (image_id); -#line 362 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - image_id = _tmp1_; -#line 363 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = self->priv->error_title; -#line 363 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = g_strdup (_tmp2_); -#line 363 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (title); -#line 363 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - title = _tmp3_; -#line 364 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp4_ = self->priv->error_text; -#line 364 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp5_ = g_strdup (_tmp4_); -#line 364 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (text); -#line 364 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - text = _tmp5_; -#line 365 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - show_close_button = TRUE; -#line 366 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp6_ = self->priv->error_change_scanner_hint; -#line 366 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - show_change_scanner_button = _tmp6_; -#line 1388 "ui.c" - } else { - GtkListStore* _tmp7_ = NULL; - gint _tmp8_ = 0; -#line 368 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp7_ = self->priv->device_model; -#line 368 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp8_ = gtk_tree_model_iter_n_children ((GtkTreeModel*) _tmp7_, NULL); -#line 368 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp8_ == 0) { -#line 1398 "ui.c" - gchar* _tmp9_ = NULL; - const gchar* _tmp10_ = NULL; -#line 370 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - type = GTK_MESSAGE_WARNING; -#line 371 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp9_ = g_strdup ("dialog-warning"); -#line 371 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (image_id); -#line 371 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - image_id = _tmp9_; -#line 372 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp10_ = self->priv->missing_driver; -#line 372 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp10_ == NULL) { -#line 1413 "ui.c" - const gchar* _tmp11_ = NULL; - gchar* _tmp12_ = NULL; - const gchar* _tmp13_ = NULL; - gchar* _tmp14_ = NULL; -#line 375 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp11_ = _ ("No scanners detected"); -#line 375 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp12_ = g_strdup (_tmp11_); -#line 375 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (title); -#line 375 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - title = _tmp12_; -#line 377 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp13_ = _ ("Please check your scanner is connected and powered on"); -#line 377 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp14_ = g_strdup (_tmp13_); -#line 377 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (text); -#line 377 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - text = _tmp14_; -#line 1434 "ui.c" - } else { - const gchar* _tmp15_ = NULL; - gchar* _tmp16_ = NULL; - const gchar* _tmp17_ = NULL; - gchar* _tmp18_ = NULL; -#line 382 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp15_ = _ ("Additional software needed"); -#line 382 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp16_ = g_strdup (_tmp15_); -#line 382 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (title); -#line 382 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - title = _tmp16_; -#line 384 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp17_ = _ ("You need to install driver software for your scanner."); -#line 384 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp18_ = g_strdup (_tmp17_); -#line 384 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (text); -#line 384 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - text = _tmp18_; -#line 385 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - show_install_button = TRUE; -#line 1458 "ui.c" - } - } else { - GtkInfoBar* _tmp19_ = NULL; -#line 390 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp19_ = self->priv->info_bar; -#line 390 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_set_visible ((GtkWidget*) _tmp19_, FALSE); -#line 391 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (image_id); -#line 391 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (text); -#line 391 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (title); -#line 391 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return; -#line 1474 "ui.c" - } - } -#line 394 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp20_ = self->priv->info_bar; -#line 394 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp21_ = type; -#line 394 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_info_bar_set_message_type (_tmp20_, _tmp21_); -#line 395 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp22_ = self->priv->info_bar_image; -#line 395 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp23_ = image_id; -#line 395 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_image_set_from_icon_name (_tmp22_, _tmp23_, GTK_ICON_SIZE_DIALOG); -#line 396 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp24_ = title; -#line 396 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp25_ = text; -#line 396 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp26_ = g_strdup_printf ("<big><b>%s</b></big>\n\n%s", _tmp24_, _tmp25_); -#line 396 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - message = _tmp26_; -#line 397 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp27_ = self->priv->info_bar_label; -#line 397 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp28_ = message; -#line 397 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_label_set_markup (_tmp27_, _tmp28_); -#line 398 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp29_ = self->priv->info_bar_close_button; -#line 398 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp30_ = show_close_button; -#line 398 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_set_visible ((GtkWidget*) _tmp29_, _tmp30_); -#line 399 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp31_ = self->priv->info_bar_change_scanner_button; -#line 399 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp32_ = show_change_scanner_button; -#line 399 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_set_visible ((GtkWidget*) _tmp31_, _tmp32_); -#line 400 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp33_ = self->priv->info_bar_install_button; -#line 400 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp34_ = show_install_button; -#line 400 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_set_visible ((GtkWidget*) _tmp33_, _tmp34_); -#line 401 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp35_ = self->priv->info_bar; -#line 401 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_set_visible ((GtkWidget*) _tmp35_, TRUE); -#line 351 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (message); -#line 351 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (image_id); -#line 351 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (text); -#line 351 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (title); -#line 1533 "ui.c" -} - - -static gpointer _scan_device_ref0 (gpointer self) { -#line 420 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return self ? scan_device_ref (self) : NULL; -#line 1540 "ui.c" -} - - -void user_interface_set_scan_devices (UserInterface* self, GList* devices, const gchar* missing_driver) { - gboolean have_selection = FALSE; - gint index = 0; - GtkTreeIter iter = {0}; - const gchar* _tmp0_ = NULL; - gchar* _tmp1_ = NULL; - gboolean _tmp2_ = FALSE; - GList* _tmp6_ = NULL; - gboolean _tmp53_ = FALSE; -#line 404 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 406 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - have_selection = FALSE; -#line 410 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self->priv->setting_devices = TRUE; -#line 412 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = missing_driver; -#line 412 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = g_strdup (_tmp0_); -#line 412 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (self->priv->missing_driver); -#line 412 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self->priv->missing_driver = _tmp1_; -#line 415 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = self->priv->user_selected_device; -#line 415 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp2_) { -#line 1571 "ui.c" - GtkComboBox* _tmp3_ = NULL; - gint _tmp4_ = 0; - gint _tmp5_ = 0; -#line 416 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = self->priv->device_combo; -#line 416 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp4_ = gtk_combo_box_get_active (_tmp3_); -#line 416 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp5_ = _tmp4_; -#line 416 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - have_selection = _tmp5_ >= 0; -#line 1583 "ui.c" - } -#line 419 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - index = 0; -#line 420 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp6_ = devices; -#line 1589 "ui.c" - { - GList* device_collection = NULL; - GList* device_it = NULL; -#line 420 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - device_collection = _tmp6_; -#line 420 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - for (device_it = device_collection; device_it != NULL; device_it = device_it->next) { -#line 1597 "ui.c" - ScanDevice* _tmp7_ = NULL; - ScanDevice* device = NULL; -#line 420 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp7_ = _scan_device_ref0 ((ScanDevice*) device_it->data); -#line 420 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - device = _tmp7_; -#line 1604 "ui.c" - { - gint n_delete = 0; - GtkListStore* _tmp8_ = NULL; - gint _tmp9_ = 0; - GtkTreeIter _tmp10_ = {0}; - gboolean _tmp11_ = FALSE; - gint _tmp23_ = 0; - gint _tmp46_ = 0; -#line 422 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - n_delete = -1; -#line 425 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp8_ = self->priv->device_model; -#line 425 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp9_ = index; -#line 425 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp11_ = gtk_tree_model_iter_nth_child ((GtkTreeModel*) _tmp8_, &_tmp10_, NULL, _tmp9_); -#line 425 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - iter = _tmp10_; -#line 425 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp11_) { -#line 1625 "ui.c" - gint i = 0; -#line 427 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - i = 0; -#line 1629 "ui.c" - { - gboolean _tmp12_ = FALSE; -#line 428 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp12_ = TRUE; -#line 428 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - while (TRUE) { -#line 1636 "ui.c" - gchar* name = NULL; - gboolean matched = FALSE; - GtkListStore* _tmp15_ = NULL; - GtkTreeIter _tmp16_ = {0}; - const gchar* _tmp17_ = NULL; - ScanDevice* _tmp18_ = NULL; - const gchar* _tmp19_ = NULL; - gboolean _tmp20_ = FALSE; - gint _tmp22_ = 0; -#line 428 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (!_tmp12_) { -#line 1648 "ui.c" - GtkListStore* _tmp13_ = NULL; - gboolean _tmp14_ = FALSE; -#line 442 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp13_ = self->priv->device_model; -#line 442 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp14_ = gtk_tree_model_iter_next ((GtkTreeModel*) _tmp13_, &iter); -#line 442 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (!_tmp14_) { -#line 442 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - break; -#line 1659 "ui.c" - } - } -#line 428 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp12_ = FALSE; -#line 433 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp15_ = self->priv->device_model; -#line 433 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp16_ = iter; -#line 433 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_tree_model_get ((GtkTreeModel*) _tmp15_, &_tmp16_, 0, &name, -1, -1); -#line 434 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp17_ = name; -#line 434 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp18_ = device; -#line 434 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp19_ = _tmp18_->name; -#line 434 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - matched = g_strcmp0 (_tmp17_, _tmp19_) == 0; -#line 436 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp20_ = matched; -#line 436 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp20_) { -#line 1682 "ui.c" - gint _tmp21_ = 0; -#line 438 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp21_ = i; -#line 438 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - n_delete = _tmp21_; -#line 439 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (name); -#line 439 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - break; -#line 1692 "ui.c" - } -#line 441 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp22_ = i; -#line 441 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - i = _tmp22_ + 1; -#line 428 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (name); -#line 1700 "ui.c" - } - } - } -#line 446 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp23_ = n_delete; -#line 446 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp23_ >= 0) { -#line 1708 "ui.c" - gint i = 0; - GtkListStore* _tmp24_ = NULL; - GtkTreeIter _tmp25_ = {0}; - ScanDevice* _tmp26_ = NULL; - const gchar* _tmp27_ = NULL; -#line 451 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp24_ = self->priv->device_model; -#line 451 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp25_ = iter; -#line 451 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp26_ = device; -#line 451 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp27_ = _tmp26_->label; -#line 451 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_list_store_set (_tmp24_, &_tmp25_, 1, _tmp27_, -1, -1); -#line 1724 "ui.c" - { - gboolean _tmp28_ = FALSE; -#line 453 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - i = 0; -#line 453 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp28_ = TRUE; -#line 453 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - while (TRUE) { -#line 1733 "ui.c" - gint _tmp30_ = 0; - gint _tmp31_ = 0; - GtkListStore* _tmp32_ = NULL; - gint _tmp33_ = 0; - GtkTreeIter _tmp34_ = {0}; - GtkListStore* _tmp35_ = NULL; - GtkTreeIter _tmp36_ = {0}; -#line 453 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (!_tmp28_) { -#line 1743 "ui.c" - gint _tmp29_ = 0; -#line 453 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp29_ = i; -#line 453 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - i = _tmp29_ + 1; -#line 1749 "ui.c" - } -#line 453 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp28_ = FALSE; -#line 453 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp30_ = i; -#line 453 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp31_ = n_delete; -#line 453 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (!(_tmp30_ < _tmp31_)) { -#line 453 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - break; -#line 1761 "ui.c" - } -#line 455 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp32_ = self->priv->device_model; -#line 455 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp33_ = index; -#line 455 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_tree_model_iter_nth_child ((GtkTreeModel*) _tmp32_, &_tmp34_, NULL, _tmp33_); -#line 455 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - iter = _tmp34_; -#line 456 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp35_ = self->priv->device_model; -#line 456 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp36_ = iter; -#line 456 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_list_store_remove (_tmp35_, &_tmp36_); -#line 1777 "ui.c" - } - } - } else { - GtkListStore* _tmp37_ = NULL; - gint _tmp38_ = 0; - GtkTreeIter _tmp39_ = {0}; - GtkListStore* _tmp40_ = NULL; - GtkTreeIter _tmp41_ = {0}; - ScanDevice* _tmp42_ = NULL; - const gchar* _tmp43_ = NULL; - ScanDevice* _tmp44_ = NULL; - const gchar* _tmp45_ = NULL; -#line 461 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp37_ = self->priv->device_model; -#line 461 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp38_ = index; -#line 461 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_list_store_insert (_tmp37_, &_tmp39_, _tmp38_); -#line 461 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - iter = _tmp39_; -#line 462 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp40_ = self->priv->device_model; -#line 462 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp41_ = iter; -#line 462 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp42_ = device; -#line 462 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp43_ = _tmp42_->name; -#line 462 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp44_ = device; -#line 462 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp45_ = _tmp44_->label; -#line 462 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_list_store_set (_tmp40_, &_tmp41_, 0, _tmp43_, 1, _tmp45_, -1, -1); -#line 1812 "ui.c" - } -#line 464 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp46_ = index; -#line 464 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - index = _tmp46_ + 1; -#line 420 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _scan_device_unref0 (device); -#line 1820 "ui.c" - } - } - } -#line 468 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - while (TRUE) { -#line 1826 "ui.c" - GtkListStore* _tmp47_ = NULL; - gint _tmp48_ = 0; - GtkTreeIter _tmp49_ = {0}; - gboolean _tmp50_ = FALSE; - GtkListStore* _tmp51_ = NULL; - GtkTreeIter _tmp52_ = {0}; -#line 468 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp47_ = self->priv->device_model; -#line 468 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp48_ = index; -#line 468 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp50_ = gtk_tree_model_iter_nth_child ((GtkTreeModel*) _tmp47_, &_tmp49_, NULL, _tmp48_); -#line 468 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - iter = _tmp49_; -#line 468 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (!_tmp50_) { -#line 468 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - break; -#line 1845 "ui.c" - } -#line 469 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp51_ = self->priv->device_model; -#line 469 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp52_ = iter; -#line 469 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_list_store_remove (_tmp51_, &_tmp52_); -#line 1853 "ui.c" - } -#line 472 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp53_ = have_selection; -#line 472 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (!_tmp53_) { -#line 1859 "ui.c" - gchar* device = NULL; - GSettings* _tmp54_ = NULL; - gchar* _tmp55_ = NULL; - gboolean _tmp56_ = FALSE; - const gchar* _tmp57_ = NULL; -#line 474 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp54_ = self->priv->settings; -#line 474 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp55_ = g_settings_get_string (_tmp54_, "selected-device"); -#line 474 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - device = _tmp55_; -#line 475 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp57_ = device; -#line 475 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp57_ != NULL) { -#line 1875 "ui.c" - const gchar* _tmp58_ = NULL; - GtkTreeIter _tmp59_ = {0}; - gboolean _tmp60_ = FALSE; -#line 475 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp58_ = device; -#line 475 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp60_ = user_interface_find_scan_device (self, _tmp58_, &_tmp59_); -#line 475 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - iter = _tmp59_; -#line 475 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp56_ = _tmp60_; -#line 1887 "ui.c" - } else { -#line 475 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp56_ = FALSE; -#line 1891 "ui.c" - } -#line 475 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp56_) { -#line 1895 "ui.c" - GtkComboBox* _tmp61_ = NULL; - GtkTreeIter _tmp62_ = {0}; -#line 476 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp61_ = self->priv->device_combo; -#line 476 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp62_ = iter; -#line 476 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_combo_box_set_active_iter (_tmp61_, &_tmp62_); -#line 1904 "ui.c" - } else { - GtkComboBox* _tmp63_ = NULL; -#line 478 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp63_ = self->priv->device_combo; -#line 478 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_combo_box_set_active (_tmp63_, 0); -#line 1911 "ui.c" - } -#line 472 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (device); -#line 1915 "ui.c" - } -#line 481 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self->priv->setting_devices = FALSE; -#line 483 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_update_info_bar (self); -#line 1921 "ui.c" -} - - -static void user_interface_add_default_page (UserInterface* self) { - Page* page = NULL; - gint _tmp0_ = 0; - gint _tmp1_ = 0; - gint _tmp2_ = 0; - ScanDirection _tmp3_ = 0; - Page* _tmp4_ = NULL; - Book* _tmp5_ = NULL; - BookView* _tmp6_ = NULL; -#line 486 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 488 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = self->priv->default_page_width; -#line 488 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = self->priv->default_page_height; -#line 488 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = self->priv->default_page_dpi; -#line 488 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = self->priv->default_page_scan_direction; -#line 488 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp4_ = page_new (_tmp0_, _tmp1_, _tmp2_, _tmp3_); -#line 488 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - page = _tmp4_; -#line 492 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp5_ = self->priv->_book; -#line 492 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - book_append_page (_tmp5_, page); -#line 493 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp6_ = self->priv->book_view; -#line 493 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - book_view_set_selected_page (_tmp6_, page); -#line 486 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _page_unref0 (page); -#line 1958 "ui.c" -} - - -static Block1Data* block1_data_ref (Block1Data* _data1_) { -#line 496 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_atomic_int_inc (&_data1_->_ref_count_); -#line 496 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return _data1_; -#line 1967 "ui.c" -} - - -static void block1_data_unref (void * _userdata_) { - Block1Data* _data1_; - _data1_ = (Block1Data*) _userdata_; -#line 496 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (g_atomic_int_dec_and_test (&_data1_->_ref_count_)) { -#line 1976 "ui.c" - UserInterface* self; -#line 496 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self = _data1_->self; -#line 496 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (_data1_->file_type_combo); -#line 496 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (_data1_->file_type_store); -#line 496 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self); -#line 496 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_slice_free (Block1Data, _data1_); -#line 1988 "ui.c" - } -} - - -static gpointer _g_object_ref0 (gpointer self) { -#line 524 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return self ? g_object_ref (self) : NULL; -#line 1996 "ui.c" -} - - -static gint string_last_index_of_char (const gchar* self, gunichar c, gint start_index) { - gint result = 0; - gchar* _result_ = NULL; - gint _tmp0_ = 0; - gunichar _tmp1_ = 0U; - gchar* _tmp2_ = NULL; - gchar* _tmp3_ = NULL; -#line 1017 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" - g_return_val_if_fail (self != NULL, 0); -#line 1018 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" - _tmp0_ = start_index; -#line 1018 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" - _tmp1_ = c; -#line 1018 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" - _tmp2_ = g_utf8_strrchr (((gchar*) self) + _tmp0_, (gssize) -1, _tmp1_); -#line 1018 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" - _result_ = _tmp2_; -#line 1020 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" - _tmp3_ = _result_; -#line 1020 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" - if (_tmp3_ != NULL) { -#line 2021 "ui.c" - gchar* _tmp4_ = NULL; -#line 1021 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" - _tmp4_ = _result_; -#line 1021 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" - result = (gint) (_tmp4_ - ((gchar*) self)); -#line 1021 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" - return result; -#line 2029 "ui.c" - } else { -#line 1023 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" - result = -1; -#line 1023 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" - return result; -#line 2035 "ui.c" - } -} - - -static gchar* string_slice (const gchar* self, glong start, glong end) { - gchar* result = NULL; - glong string_length = 0L; - gint _tmp0_ = 0; - gint _tmp1_ = 0; - glong _tmp2_ = 0L; - glong _tmp5_ = 0L; - gboolean _tmp8_ = FALSE; - glong _tmp9_ = 0L; - gboolean _tmp12_ = FALSE; - glong _tmp13_ = 0L; - glong _tmp16_ = 0L; - glong _tmp17_ = 0L; - glong _tmp18_ = 0L; - glong _tmp19_ = 0L; - glong _tmp20_ = 0L; - gchar* _tmp21_ = NULL; -#line 1328 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" - g_return_val_if_fail (self != NULL, NULL); -#line 1329 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" - _tmp0_ = strlen (self); -#line 1329 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" - _tmp1_ = _tmp0_; -#line 1329 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" - string_length = (glong) _tmp1_; -#line 1330 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" - _tmp2_ = start; -#line 1330 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" - if (_tmp2_ < ((glong) 0)) { -#line 2069 "ui.c" - glong _tmp3_ = 0L; - glong _tmp4_ = 0L; -#line 1331 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" - _tmp3_ = string_length; -#line 1331 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" - _tmp4_ = start; -#line 1331 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" - start = _tmp3_ + _tmp4_; -#line 2078 "ui.c" - } -#line 1333 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" - _tmp5_ = end; -#line 1333 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" - if (_tmp5_ < ((glong) 0)) { -#line 2084 "ui.c" - glong _tmp6_ = 0L; - glong _tmp7_ = 0L; -#line 1334 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" - _tmp6_ = string_length; -#line 1334 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" - _tmp7_ = end; -#line 1334 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" - end = _tmp6_ + _tmp7_; -#line 2093 "ui.c" - } -#line 1336 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" - _tmp9_ = start; -#line 1336 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" - if (_tmp9_ >= ((glong) 0)) { -#line 2099 "ui.c" - glong _tmp10_ = 0L; - glong _tmp11_ = 0L; -#line 1336 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" - _tmp10_ = start; -#line 1336 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" - _tmp11_ = string_length; -#line 1336 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" - _tmp8_ = _tmp10_ <= _tmp11_; -#line 2108 "ui.c" - } else { -#line 1336 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" - _tmp8_ = FALSE; -#line 2112 "ui.c" - } -#line 1336 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" - g_return_val_if_fail (_tmp8_, NULL); -#line 1337 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" - _tmp13_ = end; -#line 1337 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" - if (_tmp13_ >= ((glong) 0)) { -#line 2120 "ui.c" - glong _tmp14_ = 0L; - glong _tmp15_ = 0L; -#line 1337 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" - _tmp14_ = end; -#line 1337 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" - _tmp15_ = string_length; -#line 1337 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" - _tmp12_ = _tmp14_ <= _tmp15_; -#line 2129 "ui.c" - } else { -#line 1337 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" - _tmp12_ = FALSE; -#line 2133 "ui.c" - } -#line 1337 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" - g_return_val_if_fail (_tmp12_, NULL); -#line 1338 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" - _tmp16_ = start; -#line 1338 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" - _tmp17_ = end; -#line 1338 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" - g_return_val_if_fail (_tmp16_ <= _tmp17_, NULL); -#line 1339 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" - _tmp18_ = start; -#line 1339 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" - _tmp19_ = end; -#line 1339 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" - _tmp20_ = start; -#line 1339 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" - _tmp21_ = g_strndup (((gchar*) self) + _tmp18_, (gsize) (_tmp19_ - _tmp20_)); -#line 1339 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" - result = _tmp21_; -#line 1339 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" - return result; -#line 2155 "ui.c" -} - - -static void __lambda5_ (Block1Data* _data1_) { - UserInterface* self; - gchar* extension = NULL; - gchar* _tmp0_ = NULL; - GtkTreeIter i = {0}; - GtkComboBox* _tmp1_ = NULL; - GtkTreeIter _tmp2_ = {0}; - gboolean _tmp3_ = FALSE; - gchar* path = NULL; - GtkFileChooserDialog* _tmp6_ = NULL; - gchar* _tmp7_ = NULL; - gchar* filename = NULL; - const gchar* _tmp8_ = NULL; - gchar* _tmp9_ = NULL; - gint extension_index = 0; - const gchar* _tmp10_ = NULL; - gint _tmp11_ = 0; - gint _tmp12_ = 0; - const gchar* _tmp16_ = NULL; - const gchar* _tmp17_ = NULL; - gchar* _tmp18_ = NULL; - GtkFileChooserDialog* _tmp19_ = NULL; - const gchar* _tmp20_ = NULL; -#line 568 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self = _data1_->self; -#line 570 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = g_strdup (""); -#line 570 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - extension = _tmp0_; -#line 572 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = _data1_->file_type_combo; -#line 572 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = gtk_combo_box_get_active_iter (_tmp1_, &_tmp2_); -#line 572 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - i = _tmp2_; -#line 572 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp3_) { -#line 2196 "ui.c" - GtkListStore* _tmp4_ = NULL; - GtkTreeIter _tmp5_ = {0}; -#line 573 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp4_ = _data1_->file_type_store; -#line 573 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp5_ = i; -#line 573 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_tree_model_get ((GtkTreeModel*) _tmp4_, &_tmp5_, 1, &extension, -1, -1); -#line 2205 "ui.c" - } -#line 575 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp6_ = self->priv->save_dialog; -#line 575 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp7_ = gtk_file_chooser_get_filename ((GtkFileChooser*) _tmp6_); -#line 575 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - path = _tmp7_; -#line 576 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp8_ = path; -#line 576 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp9_ = g_path_get_basename (_tmp8_); -#line 576 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - filename = _tmp9_; -#line 579 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp10_ = filename; -#line 579 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp11_ = string_last_index_of_char (_tmp10_, (gunichar) '.', 0); -#line 579 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - extension_index = _tmp11_; -#line 580 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp12_ = extension_index; -#line 580 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp12_ >= 0) { -#line 2229 "ui.c" - const gchar* _tmp13_ = NULL; - gint _tmp14_ = 0; - gchar* _tmp15_ = NULL; -#line 581 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp13_ = filename; -#line 581 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp14_ = extension_index; -#line 581 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp15_ = string_slice (_tmp13_, (glong) 0, (glong) _tmp14_); -#line 581 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (filename); -#line 581 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - filename = _tmp15_; -#line 2243 "ui.c" - } -#line 582 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp16_ = filename; -#line 582 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp17_ = extension; -#line 582 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp18_ = g_strconcat (_tmp16_, _tmp17_, NULL); -#line 582 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (filename); -#line 582 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - filename = _tmp18_; -#line 583 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp19_ = self->priv->save_dialog; -#line 583 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp20_ = filename; -#line 583 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_file_chooser_set_current_name ((GtkFileChooser*) _tmp19_, _tmp20_); -#line 568 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (filename); -#line 568 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (path); -#line 568 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (extension); -#line 2267 "ui.c" -} - - -static void ___lambda5__gtk_combo_box_changed (GtkComboBox* _sender, gpointer self) { -#line 568 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - __lambda5_ (self); -#line 2274 "ui.c" -} - - -static gchar* user_interface_choose_file_location (UserInterface* self) { - gchar* result = NULL; - Block1Data* _data1_; - gchar* directory = NULL; - GSettings* _tmp0_ = NULL; - gchar* _tmp1_ = NULL; - gboolean _tmp2_ = FALSE; - const gchar* _tmp3_ = NULL; - const gchar* _tmp7_ = NULL; - const gchar* _tmp8_ = NULL; - const gchar* _tmp9_ = NULL; - GtkFileChooserDialog* _tmp10_ = NULL; - GtkFileChooserDialog* _tmp11_ = NULL; - GtkFileChooserDialog* _tmp12_ = NULL; - GtkFileChooserDialog* _tmp13_ = NULL; - const gchar* _tmp14_ = NULL; - GtkFileChooserDialog* _tmp15_ = NULL; - const gchar* _tmp16_ = NULL; - GtkFileFilter* filter = NULL; - GtkFileFilter* _tmp17_ = NULL; - GtkFileFilter* _tmp18_ = NULL; - const gchar* _tmp19_ = NULL; - GtkFileFilter* _tmp20_ = NULL; - GtkFileFilter* _tmp21_ = NULL; - GtkFileChooserDialog* _tmp22_ = NULL; - GtkFileFilter* _tmp23_ = NULL; - GtkFileFilter* _tmp24_ = NULL; - GtkFileFilter* _tmp25_ = NULL; - GtkFileFilter* _tmp26_ = NULL; - const gchar* _tmp27_ = NULL; - GtkFileFilter* _tmp28_ = NULL; - GtkFileChooserDialog* _tmp29_ = NULL; - GtkFileFilter* _tmp30_ = NULL; - GtkFileFilter* _tmp31_ = NULL; - GtkListStore* _tmp32_ = NULL; - GtkTreeIter iter = {0}; - GtkListStore* _tmp33_ = NULL; - GtkTreeIter _tmp34_ = {0}; - GtkListStore* _tmp35_ = NULL; - GtkTreeIter _tmp36_ = {0}; - const gchar* _tmp37_ = NULL; - GtkListStore* _tmp38_ = NULL; - GtkTreeIter _tmp39_ = {0}; - GtkListStore* _tmp40_ = NULL; - GtkTreeIter _tmp41_ = {0}; - const gchar* _tmp42_ = NULL; - GtkListStore* _tmp43_ = NULL; - GtkTreeIter _tmp44_ = {0}; - GtkListStore* _tmp45_ = NULL; - GtkTreeIter _tmp46_ = {0}; - const gchar* _tmp47_ = NULL; - GtkBox* box = NULL; - GtkBox* _tmp48_ = NULL; - GtkBox* _tmp49_ = NULL; - GtkFileChooserDialog* _tmp50_ = NULL; - GtkBox* _tmp51_ = NULL; - GtkLabel* label = NULL; - const gchar* _tmp52_ = NULL; - GtkLabel* _tmp53_ = NULL; - GtkLabel* _tmp54_ = NULL; - GtkBox* _tmp55_ = NULL; - GtkLabel* _tmp56_ = NULL; - GtkListStore* _tmp57_ = NULL; - GtkComboBox* _tmp58_ = NULL; - GtkComboBox* _tmp59_ = NULL; - GtkCellRendererText* renderer = NULL; - GtkCellRendererText* _tmp60_ = NULL; - GtkComboBox* _tmp61_ = NULL; - GtkCellRendererText* _tmp62_ = NULL; - GtkComboBox* _tmp63_ = NULL; - GtkCellRendererText* _tmp64_ = NULL; - GtkComboBox* _tmp65_ = NULL; - GtkComboBox* _tmp66_ = NULL; - GtkBox* _tmp67_ = NULL; - GtkComboBox* _tmp68_ = NULL; - gint response = 0; - GtkFileChooserDialog* _tmp69_ = NULL; - gint _tmp70_ = 0; - gchar* uri = NULL; - gint _tmp71_ = 0; - GSettings* _tmp92_ = NULL; - GtkFileChooserDialog* _tmp93_ = NULL; - gchar* _tmp94_ = NULL; - gchar* _tmp95_ = NULL; - GtkFileChooserDialog* _tmp96_ = NULL; -#line 496 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_val_if_fail (self != NULL, NULL); -#line 496 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data1_ = g_slice_new0 (Block1Data); -#line 496 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data1_->_ref_count_ = 1; -#line 496 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data1_->self = g_object_ref (self); -#line 499 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - directory = NULL; -#line 500 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = self->priv->settings; -#line 500 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = g_settings_get_string (_tmp0_, "save-directory"); -#line 500 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (directory); -#line 500 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - directory = _tmp1_; -#line 502 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = directory; -#line 502 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp3_ == NULL) { -#line 502 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = TRUE; -#line 2387 "ui.c" - } else { - const gchar* _tmp4_ = NULL; -#line 502 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp4_ = directory; -#line 502 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = g_strcmp0 (_tmp4_, "") == 0; -#line 2394 "ui.c" - } -#line 502 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp2_) { -#line 2398 "ui.c" - const gchar* _tmp5_ = NULL; - gchar* _tmp6_ = NULL; -#line 503 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp5_ = g_get_user_special_dir (G_USER_DIRECTORY_DOCUMENTS); -#line 503 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp6_ = g_strdup (_tmp5_); -#line 503 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (directory); -#line 503 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - directory = _tmp6_; -#line 2409 "ui.c" - } -#line 505 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp7_ = _ ("Save As..."); -#line 505 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp8_ = _ ("_Cancel"); -#line 505 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp9_ = _ ("_Save"); -#line 505 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp10_ = (GtkFileChooserDialog*) gtk_file_chooser_dialog_new (_tmp7_, (GtkWindow*) self, GTK_FILE_CHOOSER_ACTION_SAVE, _tmp8_, GTK_RESPONSE_CANCEL, _tmp9_, GTK_RESPONSE_ACCEPT, NULL, NULL); -#line 505 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_object_ref_sink (_tmp10_); -#line 505 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->save_dialog); -#line 505 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self->priv->save_dialog = _tmp10_; -#line 512 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp11_ = self->priv->save_dialog; -#line 512 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_file_chooser_set_do_overwrite_confirmation ((GtkFileChooser*) _tmp11_, TRUE); -#line 513 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp12_ = self->priv->save_dialog; -#line 513 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_file_chooser_set_local_only ((GtkFileChooser*) _tmp12_, FALSE); -#line 514 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp13_ = self->priv->save_dialog; -#line 514 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp14_ = directory; -#line 514 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_file_chooser_set_current_folder ((GtkFileChooser*) _tmp13_, _tmp14_); -#line 516 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp15_ = self->priv->save_dialog; -#line 516 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp16_ = _ ("Scanned Document.pdf"); -#line 516 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_file_chooser_set_current_name ((GtkFileChooser*) _tmp15_, _tmp16_); -#line 519 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp17_ = gtk_file_filter_new (); -#line 519 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_object_ref_sink (_tmp17_); -#line 519 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - filter = _tmp17_; -#line 520 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp18_ = filter; -#line 520 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp19_ = _ ("Image Files"); -#line 520 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_file_filter_set_name (_tmp18_, _tmp19_); -#line 522 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp20_ = filter; -#line 522 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_file_filter_add_pixbuf_formats (_tmp20_); -#line 523 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp21_ = filter; -#line 523 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_file_filter_add_mime_type (_tmp21_, "application/pdf"); -#line 524 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp22_ = self->priv->save_dialog; -#line 524 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp23_ = filter; -#line 524 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp24_ = _g_object_ref0 (_tmp23_); -#line 524 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_file_chooser_add_filter ((GtkFileChooser*) _tmp22_, _tmp24_); -#line 525 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp25_ = gtk_file_filter_new (); -#line 525 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_object_ref_sink (_tmp25_); -#line 525 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (filter); -#line 525 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - filter = _tmp25_; -#line 526 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp26_ = filter; -#line 526 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp27_ = _ ("All Files"); -#line 526 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_file_filter_set_name (_tmp26_, _tmp27_); -#line 528 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp28_ = filter; -#line 528 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_file_filter_add_pattern (_tmp28_, "*"); -#line 529 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp29_ = self->priv->save_dialog; -#line 529 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp30_ = filter; -#line 529 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp31_ = _g_object_ref0 (_tmp30_); -#line 529 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_file_chooser_add_filter ((GtkFileChooser*) _tmp29_, _tmp31_); -#line 531 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp32_ = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING, -1); -#line 531 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data1_->file_type_store = _tmp32_; -#line 533 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp33_ = _data1_->file_type_store; -#line 533 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_list_store_append (_tmp33_, &_tmp34_); -#line 533 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - iter = _tmp34_; -#line 534 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp35_ = _data1_->file_type_store; -#line 534 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp36_ = iter; -#line 534 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp37_ = _ ("PDF (multi-page document)"); -#line 534 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_list_store_set (_tmp35_, &_tmp36_, 0, _tmp37_, 1, ".pdf", -1, -1); -#line 539 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp38_ = _data1_->file_type_store; -#line 539 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_list_store_append (_tmp38_, &_tmp39_); -#line 539 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - iter = _tmp39_; -#line 540 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp40_ = _data1_->file_type_store; -#line 540 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp41_ = iter; -#line 540 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp42_ = _ ("JPEG (compressed)"); -#line 540 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_list_store_set (_tmp40_, &_tmp41_, 0, _tmp42_, 1, ".jpg", -1, -1); -#line 545 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp43_ = _data1_->file_type_store; -#line 545 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_list_store_append (_tmp43_, &_tmp44_); -#line 545 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - iter = _tmp44_; -#line 546 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp45_ = _data1_->file_type_store; -#line 546 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp46_ = iter; -#line 546 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp47_ = _ ("PNG (lossless)"); -#line 546 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_list_store_set (_tmp45_, &_tmp46_, 0, _tmp47_, 1, ".png", -1, -1); -#line 552 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp48_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6); -#line 552 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_object_ref_sink (_tmp48_); -#line 552 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - box = _tmp48_; -#line 553 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp49_ = box; -#line 553 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_set_visible ((GtkWidget*) _tmp49_, TRUE); -#line 554 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp50_ = self->priv->save_dialog; -#line 554 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp51_ = box; -#line 554 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_file_chooser_set_extra_widget ((GtkFileChooser*) _tmp50_, (GtkWidget*) _tmp51_); -#line 557 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp52_ = _ ("File format:"); -#line 557 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp53_ = (GtkLabel*) gtk_label_new (_tmp52_); -#line 557 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_object_ref_sink (_tmp53_); -#line 557 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - label = _tmp53_; -#line 558 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp54_ = label; -#line 558 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_set_visible ((GtkWidget*) _tmp54_, TRUE); -#line 559 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp55_ = box; -#line 559 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp56_ = label; -#line 559 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_box_pack_start (_tmp55_, (GtkWidget*) _tmp56_, FALSE, FALSE, (guint) 0); -#line 561 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp57_ = _data1_->file_type_store; -#line 561 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp58_ = (GtkComboBox*) gtk_combo_box_new_with_model ((GtkTreeModel*) _tmp57_); -#line 561 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_object_ref_sink (_tmp58_); -#line 561 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data1_->file_type_combo = _tmp58_; -#line 562 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp59_ = _data1_->file_type_combo; -#line 562 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_set_visible ((GtkWidget*) _tmp59_, TRUE); -#line 563 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp60_ = (GtkCellRendererText*) gtk_cell_renderer_text_new (); -#line 563 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_object_ref_sink (_tmp60_); -#line 563 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - renderer = _tmp60_; -#line 564 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp61_ = _data1_->file_type_combo; -#line 564 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp62_ = renderer; -#line 564 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_cell_layout_pack_start ((GtkCellLayout*) _tmp61_, (GtkCellRenderer*) _tmp62_, TRUE); -#line 565 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp63_ = _data1_->file_type_combo; -#line 565 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp64_ = renderer; -#line 565 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_cell_layout_add_attribute ((GtkCellLayout*) _tmp63_, (GtkCellRenderer*) _tmp64_, "text", 0); -#line 567 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp65_ = _data1_->file_type_combo; -#line 567 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_combo_box_set_active (_tmp65_, 0); -#line 568 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp66_ = _data1_->file_type_combo; -#line 568 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_signal_connect_data (_tmp66_, "changed", (GCallback) ___lambda5__gtk_combo_box_changed, block1_data_ref (_data1_), (GClosureNotify) block1_data_unref, 0); -#line 585 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp67_ = box; -#line 585 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp68_ = _data1_->file_type_combo; -#line 585 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_box_pack_start (_tmp67_, (GtkWidget*) _tmp68_, FALSE, FALSE, (guint) 0); -#line 587 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp69_ = self->priv->save_dialog; -#line 587 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp70_ = gtk_dialog_run ((GtkDialog*) _tmp69_); -#line 587 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - response = _tmp70_; -#line 589 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - uri = NULL; -#line 590 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp71_ = response; -#line 590 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp71_ == ((gint) GTK_RESPONSE_ACCEPT)) { -#line 2635 "ui.c" - gchar* extension = NULL; - gchar* _tmp72_ = NULL; - GtkTreeIter i = {0}; - GtkComboBox* _tmp73_ = NULL; - GtkTreeIter _tmp74_ = {0}; - gboolean _tmp75_ = FALSE; - gchar* path = NULL; - GtkFileChooserDialog* _tmp78_ = NULL; - gchar* _tmp79_ = NULL; - gchar* filename = NULL; - const gchar* _tmp80_ = NULL; - gchar* _tmp81_ = NULL; - gint extension_index = 0; - const gchar* _tmp82_ = NULL; - gint _tmp83_ = 0; - gint _tmp84_ = 0; - const gchar* _tmp88_ = NULL; - GFile* _tmp89_ = NULL; - GFile* _tmp90_ = NULL; - gchar* _tmp91_ = NULL; -#line 592 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp72_ = g_strdup (""); -#line 592 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - extension = _tmp72_; -#line 594 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp73_ = _data1_->file_type_combo; -#line 594 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp75_ = gtk_combo_box_get_active_iter (_tmp73_, &_tmp74_); -#line 594 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - i = _tmp74_; -#line 594 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp75_) { -#line 2668 "ui.c" - GtkListStore* _tmp76_ = NULL; - GtkTreeIter _tmp77_ = {0}; -#line 595 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp76_ = _data1_->file_type_store; -#line 595 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp77_ = i; -#line 595 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_tree_model_get ((GtkTreeModel*) _tmp76_, &_tmp77_, 1, &extension, -1, -1); -#line 2677 "ui.c" - } -#line 597 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp78_ = self->priv->save_dialog; -#line 597 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp79_ = gtk_file_chooser_get_filename ((GtkFileChooser*) _tmp78_); -#line 597 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - path = _tmp79_; -#line 598 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp80_ = path; -#line 598 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp81_ = g_path_get_basename (_tmp80_); -#line 598 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - filename = _tmp81_; -#line 600 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp82_ = filename; -#line 600 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp83_ = string_last_index_of_char (_tmp82_, (gunichar) '.', 0); -#line 600 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - extension_index = _tmp83_; -#line 601 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp84_ = extension_index; -#line 601 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp84_ < 0) { -#line 2701 "ui.c" - const gchar* _tmp85_ = NULL; - const gchar* _tmp86_ = NULL; - gchar* _tmp87_ = NULL; -#line 602 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp85_ = path; -#line 602 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp86_ = extension; -#line 602 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp87_ = g_strconcat (_tmp85_, _tmp86_, NULL); -#line 602 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (path); -#line 602 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - path = _tmp87_; -#line 2715 "ui.c" - } -#line 604 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp88_ = path; -#line 604 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp89_ = g_file_new_for_path (_tmp88_); -#line 604 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp90_ = _tmp89_; -#line 604 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp91_ = g_file_get_uri (_tmp90_); -#line 604 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (uri); -#line 604 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - uri = _tmp91_; -#line 604 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (_tmp90_); -#line 590 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (filename); -#line 590 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (path); -#line 590 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (extension); -#line 2737 "ui.c" - } -#line 607 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp92_ = self->priv->settings; -#line 607 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp93_ = self->priv->save_dialog; -#line 607 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp94_ = gtk_file_chooser_get_current_folder ((GtkFileChooser*) _tmp93_); -#line 607 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp95_ = _tmp94_; -#line 607 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_settings_set_string (_tmp92_, "save-directory", _tmp95_); -#line 607 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (_tmp95_); -#line 609 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp96_ = self->priv->save_dialog; -#line 609 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_destroy ((GtkWidget*) _tmp96_); -#line 610 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->save_dialog); -#line 610 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self->priv->save_dialog = NULL; -#line 612 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - result = uri; -#line 612 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (renderer); -#line 612 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (label); -#line 612 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (box); -#line 612 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (filter); -#line 612 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (directory); -#line 612 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - block1_data_unref (_data1_); -#line 612 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data1_ = NULL; -#line 612 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return result; -#line 2777 "ui.c" -} - - -static gboolean user_interface_save_document (UserInterface* self, gboolean force_choose_location) { - gboolean result = FALSE; - gchar* uri = NULL; - gboolean _tmp0_ = FALSE; - const gchar* _tmp1_ = NULL; - const gchar* _tmp6_ = NULL; - GFile* file = NULL; - const gchar* _tmp7_ = NULL; - GFile* _tmp8_ = NULL; - const gchar* _tmp9_ = NULL; - gchar* uri_lower = NULL; - const gchar* _tmp10_ = NULL; - gchar* _tmp11_ = NULL; - gchar* format = NULL; - gchar* _tmp12_ = NULL; - const gchar* _tmp13_ = NULL; - gboolean _tmp14_ = FALSE; - const gchar* _tmp39_ = NULL; - gchar* _tmp40_ = NULL; - Book* _tmp41_ = NULL; - GError * _inner_error_ = NULL; -#line 615 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_val_if_fail (self != NULL, FALSE); -#line 618 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = self->priv->book_uri; -#line 618 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp1_ != NULL) { -#line 2808 "ui.c" - gboolean _tmp2_ = FALSE; -#line 618 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = force_choose_location; -#line 618 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = !_tmp2_; -#line 2814 "ui.c" - } else { -#line 618 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = FALSE; -#line 2818 "ui.c" - } -#line 618 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp0_) { -#line 2822 "ui.c" - const gchar* _tmp3_ = NULL; - gchar* _tmp4_ = NULL; -#line 619 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = self->priv->book_uri; -#line 619 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp4_ = g_strdup (_tmp3_); -#line 619 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (uri); -#line 619 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - uri = _tmp4_; -#line 2833 "ui.c" - } else { - gchar* _tmp5_ = NULL; -#line 621 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp5_ = user_interface_choose_file_location (self); -#line 621 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (uri); -#line 621 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - uri = _tmp5_; -#line 2842 "ui.c" - } -#line 622 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp6_ = uri; -#line 622 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp6_ == NULL) { -#line 623 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - result = FALSE; -#line 623 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (uri); -#line 623 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return result; -#line 2854 "ui.c" - } -#line 625 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp7_ = uri; -#line 625 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp8_ = g_file_new_for_uri (_tmp7_); -#line 625 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - file = _tmp8_; -#line 627 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp9_ = uri; -#line 627 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_debug ("ui.vala:627: Saving to '%s'", _tmp9_); -#line 629 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp10_ = uri; -#line 629 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp11_ = g_utf8_strdown (_tmp10_, (gssize) -1); -#line 629 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - uri_lower = _tmp11_; -#line 630 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp12_ = g_strdup ("jpeg"); -#line 630 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - format = _tmp12_; -#line 631 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp13_ = uri_lower; -#line 631 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp14_ = g_str_has_suffix (_tmp13_, ".pdf"); -#line 631 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp14_) { -#line 2882 "ui.c" - gchar* _tmp15_ = NULL; -#line 632 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp15_ = g_strdup ("pdf"); -#line 632 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (format); -#line 632 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - format = _tmp15_; -#line 2890 "ui.c" - } else { - const gchar* _tmp16_ = NULL; - gboolean _tmp17_ = FALSE; -#line 633 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp16_ = uri_lower; -#line 633 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp17_ = g_str_has_suffix (_tmp16_, ".ps"); -#line 633 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp17_) { -#line 2900 "ui.c" - gchar* _tmp18_ = NULL; -#line 634 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp18_ = g_strdup ("ps"); -#line 634 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (format); -#line 634 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - format = _tmp18_; -#line 2908 "ui.c" - } else { - const gchar* _tmp19_ = NULL; - gboolean _tmp20_ = FALSE; -#line 635 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp19_ = uri_lower; -#line 635 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp20_ = g_str_has_suffix (_tmp19_, ".png"); -#line 635 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp20_) { -#line 2918 "ui.c" - gchar* _tmp21_ = NULL; -#line 636 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp21_ = g_strdup ("png"); -#line 636 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (format); -#line 636 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - format = _tmp21_; -#line 2926 "ui.c" - } else { - gboolean _tmp22_ = FALSE; - const gchar* _tmp23_ = NULL; - gboolean _tmp24_ = FALSE; -#line 637 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp23_ = uri_lower; -#line 637 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp24_ = g_str_has_suffix (_tmp23_, ".tif"); -#line 637 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp24_) { -#line 637 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp22_ = TRUE; -#line 2939 "ui.c" - } else { - const gchar* _tmp25_ = NULL; - gboolean _tmp26_ = FALSE; -#line 637 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp25_ = uri_lower; -#line 637 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp26_ = g_str_has_suffix (_tmp25_, ".tiff"); -#line 637 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp22_ = _tmp26_; -#line 2949 "ui.c" - } -#line 637 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp22_) { -#line 2953 "ui.c" - gchar* _tmp27_ = NULL; -#line 638 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp27_ = g_strdup ("tiff"); -#line 638 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (format); -#line 638 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - format = _tmp27_; -#line 2961 "ui.c" - } - } - } - } -#line 640 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_show_progress_dialog (self); -#line 2968 "ui.c" - { - Book* _tmp28_ = NULL; - const gchar* _tmp29_ = NULL; - gint _tmp30_ = 0; - gint _tmp31_ = 0; - GFile* _tmp32_ = NULL; -#line 643 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp28_ = self->priv->_book; -#line 643 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp29_ = format; -#line 643 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp30_ = user_interface_get_quality (self); -#line 643 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp31_ = _tmp30_; -#line 643 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp32_ = file; -#line 643 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - book_save (_tmp28_, _tmp29_, _tmp31_, _tmp32_, &_inner_error_); -#line 643 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 2989 "ui.c" - goto __catch17_g_error; - } - } - goto __finally17; - __catch17_g_error: - { - GError* e = NULL; - GError* _tmp33_ = NULL; - const gchar* _tmp34_ = NULL; - const gchar* _tmp35_ = NULL; - GError* _tmp36_ = NULL; - const gchar* _tmp37_ = NULL; -#line 641 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - e = _inner_error_; -#line 641 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _inner_error_ = NULL; -#line 647 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_hide_progress_dialog (self); -#line 648 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp33_ = e; -#line 648 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp34_ = _tmp33_->message; -#line 648 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_warning ("ui.vala:648: Error saving file: %s", _tmp34_); -#line 649 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp35_ = _ ("Failed to save file"); -#line 649 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp36_ = e; -#line 649 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp37_ = _tmp36_->message; -#line 649 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_show_error (self, _tmp35_, _tmp37_, FALSE); -#line 653 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - result = FALSE; -#line 653 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_error_free0 (e); -#line 653 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (format); -#line 653 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (uri_lower); -#line 653 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (file); -#line 653 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (uri); -#line 653 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return result; -#line 3036 "ui.c" - } - __finally17: -#line 641 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 3041 "ui.c" - gboolean _tmp38_ = FALSE; -#line 641 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (format); -#line 641 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (uri_lower); -#line 641 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (file); -#line 641 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (uri); -#line 641 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - 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); -#line 641 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_clear_error (&_inner_error_); -#line 641 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return _tmp38_; -#line 3057 "ui.c" - } -#line 656 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp39_ = uri; -#line 656 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp40_ = g_strdup (_tmp39_); -#line 656 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (self->priv->book_uri); -#line 656 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self->priv->book_uri = _tmp40_; -#line 657 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp41_ = self->priv->_book; -#line 657 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - book_set_needs_saving (_tmp41_, FALSE); -#line 658 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - result = TRUE; -#line 658 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (format); -#line 658 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (uri_lower); -#line 658 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (file); -#line 658 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (uri); -#line 658 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return result; -#line 3083 "ui.c" -} - - -static gboolean user_interface_prompt_to_save (UserInterface* self, const gchar* title, const gchar* discard_label) { - gboolean result = FALSE; - Book* _tmp0_ = NULL; - gboolean _tmp1_ = FALSE; - gboolean _tmp2_ = FALSE; - GtkMessageDialog* dialog = NULL; - const gchar* _tmp3_ = NULL; - GtkMessageDialog* _tmp4_ = NULL; - GtkMessageDialog* _tmp5_ = NULL; - const gchar* _tmp6_ = NULL; - GtkMessageDialog* _tmp7_ = NULL; - const gchar* _tmp8_ = NULL; - GtkMessageDialog* _tmp9_ = NULL; - const gchar* _tmp10_ = NULL; - GtkMessageDialog* _tmp11_ = NULL; - const gchar* _tmp12_ = NULL; - gint response = 0; - GtkMessageDialog* _tmp13_ = NULL; - gint _tmp14_ = 0; - GtkMessageDialog* _tmp15_ = NULL; - gint _tmp16_ = 0; -#line 661 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_val_if_fail (self != NULL, FALSE); -#line 661 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_val_if_fail (title != NULL, FALSE); -#line 661 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_val_if_fail (discard_label != NULL, FALSE); -#line 663 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = self->priv->_book; -#line 663 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = book_get_needs_saving (_tmp0_); -#line 663 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = _tmp1_; -#line 663 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (!_tmp2_) { -#line 664 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - result = TRUE; -#line 664 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return result; -#line 3126 "ui.c" - } -#line 666 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = title; -#line 666 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp4_ = (GtkMessageDialog*) gtk_message_dialog_new ((GtkWindow*) self, GTK_DIALOG_MODAL, GTK_MESSAGE_WARNING, GTK_BUTTONS_NONE, "%s", _tmp3_); -#line 666 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_object_ref_sink (_tmp4_); -#line 666 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - dialog = _tmp4_; -#line 671 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp5_ = dialog; -#line 671 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp6_ = _ ("If you don't save, changes will be permanently lost."); -#line 671 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_message_dialog_format_secondary_text (_tmp5_, "%s", _tmp6_); -#line 674 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp7_ = dialog; -#line 674 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp8_ = discard_label; -#line 674 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_dialog_add_button ((GtkDialog*) _tmp7_, _tmp8_, (gint) GTK_RESPONSE_NO); -#line 675 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp9_ = dialog; -#line 675 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp10_ = _ ("_Cancel"); -#line 675 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_dialog_add_button ((GtkDialog*) _tmp9_, _tmp10_, (gint) GTK_RESPONSE_CANCEL); -#line 676 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp11_ = dialog; -#line 676 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp12_ = _ ("_Save"); -#line 676 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_dialog_add_button ((GtkDialog*) _tmp11_, _tmp12_, (gint) GTK_RESPONSE_YES); -#line 678 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp13_ = dialog; -#line 678 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp14_ = gtk_dialog_run ((GtkDialog*) _tmp13_); -#line 678 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - response = _tmp14_; -#line 679 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp15_ = dialog; -#line 679 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_destroy ((GtkWidget*) _tmp15_); -#line 681 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp16_ = response; -#line 681 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - switch (_tmp16_) { -#line 681 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - case GTK_RESPONSE_YES: -#line 3176 "ui.c" - { - gboolean _tmp17_ = FALSE; -#line 684 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp17_ = user_interface_save_document (self, FALSE); -#line 684 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp17_) { -#line 685 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - result = TRUE; -#line 685 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (dialog); -#line 685 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return result; -#line 3189 "ui.c" - } else { -#line 687 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - result = FALSE; -#line 687 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (dialog); -#line 687 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return result; -#line 3197 "ui.c" - } - } -#line 681 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - case GTK_RESPONSE_NO: -#line 3202 "ui.c" - { -#line 689 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - result = TRUE; -#line 689 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (dialog); -#line 689 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return result; -#line 3210 "ui.c" - } - default: - { -#line 691 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - result = FALSE; -#line 691 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (dialog); -#line 691 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return result; -#line 3220 "ui.c" - } - } -#line 661 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (dialog); -#line 3225 "ui.c" -} - - -static void user_interface_clear_document (UserInterface* self) { - Book* _tmp0_ = NULL; - Book* _tmp1_ = NULL; - GtkMenuItem* _tmp2_ = NULL; - GtkMenuItem* _tmp3_ = NULL; -#line 695 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 697 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = self->priv->_book; -#line 697 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - book_clear (_tmp0_); -#line 698 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_add_default_page (self); -#line 699 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (self->priv->book_uri); -#line 699 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self->priv->book_uri = NULL; -#line 700 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = self->priv->_book; -#line 700 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - book_set_needs_saving (_tmp1_, FALSE); -#line 701 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = self->priv->save_as_menuitem; -#line 701 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_set_sensitive ((GtkWidget*) _tmp2_, FALSE); -#line 702 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = self->priv->copy_to_clipboard_menuitem; -#line 702 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_set_sensitive ((GtkWidget*) _tmp3_, FALSE); -#line 3258 "ui.c" -} - - -static void user_interface_new_document (UserInterface* self) { - const gchar* _tmp0_ = NULL; - const gchar* _tmp1_ = NULL; - gboolean _tmp2_ = FALSE; - gboolean _tmp3_ = FALSE; - gboolean _tmp4_ = FALSE; -#line 705 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 707 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = _ ("Save current document?"); -#line 707 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = _ ("Discard Changes"); -#line 707 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = user_interface_prompt_to_save (self, _tmp0_, _tmp1_); -#line 707 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (!_tmp2_) { -#line 711 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return; -#line 3280 "ui.c" - } -#line 713 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = user_interface_get_scanning (self); -#line 713 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp4_ = _tmp3_; -#line 713 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp4_) { -#line 714 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_signal_emit_by_name (self, "stop-scan"); -#line 3290 "ui.c" - } -#line 715 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_clear_document (self); -#line 3294 "ui.c" -} - - -static void user_interface_new_button_clicked_cb (UserInterface* self, GtkWidget* widget) { -#line 719 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 719 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (widget != NULL); -#line 721 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_new_document (self); -#line 3305 "ui.c" -} - - -static void _user_interface_new_button_clicked_cb_gtk_button_clicked (GtkButton* _sender, gpointer self) { -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_new_button_clicked_cb ((UserInterface*) self, _sender); -#line 3312 "ui.c" -} - - -void user_interface_new_document_activate_cb (UserInterface* self) { -#line 724 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 726 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_new_document (self); -#line 3321 "ui.c" -} - - -static void user_interface_set_document_hint (UserInterface* self, const gchar* document_hint, gboolean save) { - const gchar* _tmp0_ = NULL; - gchar* _tmp1_ = NULL; - const gchar* _tmp2_ = NULL; - gboolean _tmp10_ = FALSE; -#line 729 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 729 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (document_hint != NULL); -#line 731 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = document_hint; -#line 731 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = g_strdup (_tmp0_); -#line 731 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (self->priv->document_hint); -#line 731 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self->priv->document_hint = _tmp1_; -#line 733 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = document_hint; -#line 733 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (g_strcmp0 (_tmp2_, "text") == 0) { -#line 3346 "ui.c" - GtkRadioMenuItem* _tmp3_ = NULL; - GtkRadioMenuItem* _tmp4_ = NULL; - GtkRadioMenuItem* _tmp5_ = NULL; -#line 735 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = self->priv->text_button_menuitem; -#line 735 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_check_menu_item_set_active ((GtkCheckMenuItem*) _tmp3_, TRUE); -#line 736 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp4_ = self->priv->text_button_hb_menuitem; -#line 736 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_check_menu_item_set_active ((GtkCheckMenuItem*) _tmp4_, TRUE); -#line 737 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp5_ = self->priv->text_menuitem; -#line 737 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_check_menu_item_set_active ((GtkCheckMenuItem*) _tmp5_, TRUE); -#line 3362 "ui.c" - } else { - const gchar* _tmp6_ = NULL; -#line 739 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp6_ = document_hint; -#line 739 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (g_strcmp0 (_tmp6_, "photo") == 0) { -#line 3369 "ui.c" - GtkRadioMenuItem* _tmp7_ = NULL; - GtkRadioMenuItem* _tmp8_ = NULL; - GtkRadioMenuItem* _tmp9_ = NULL; -#line 741 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp7_ = self->priv->photo_button_menuitem; -#line 741 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_check_menu_item_set_active ((GtkCheckMenuItem*) _tmp7_, TRUE); -#line 742 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp8_ = self->priv->photo_button_hb_menuitem; -#line 742 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_check_menu_item_set_active ((GtkCheckMenuItem*) _tmp8_, TRUE); -#line 743 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp9_ = self->priv->photo_menuitem; -#line 743 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_check_menu_item_set_active ((GtkCheckMenuItem*) _tmp9_, TRUE); -#line 3385 "ui.c" - } - } -#line 746 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp10_ = save; -#line 746 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp10_) { -#line 3392 "ui.c" - GSettings* _tmp11_ = NULL; - const gchar* _tmp12_ = NULL; -#line 747 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp11_ = self->priv->settings; -#line 747 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp12_ = document_hint; -#line 747 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_settings_set_string (_tmp11_, "document-type", _tmp12_); -#line 3401 "ui.c" - } -} - - -static void user_interface_text_menuitem_toggled_cb (UserInterface* self, GtkCheckMenuItem* widget) { - GtkCheckMenuItem* _tmp0_ = NULL; - gboolean _tmp1_ = FALSE; - gboolean _tmp2_ = FALSE; -#line 751 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 751 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (widget != NULL); -#line 753 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = widget; -#line 753 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = gtk_check_menu_item_get_active (_tmp0_); -#line 753 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = _tmp1_; -#line 753 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp2_) { -#line 754 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_set_document_hint (self, "text", TRUE); -#line 3424 "ui.c" - } -} - - -static void _user_interface_text_menuitem_toggled_cb_gtk_check_menu_item_toggled (GtkCheckMenuItem* _sender, gpointer self) { -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_text_menuitem_toggled_cb ((UserInterface*) self, _sender); -#line 3432 "ui.c" -} - - -static void user_interface_photo_menuitem_toggled_cb (UserInterface* self, GtkCheckMenuItem* widget) { - GtkCheckMenuItem* _tmp0_ = NULL; - gboolean _tmp1_ = FALSE; - gboolean _tmp2_ = FALSE; -#line 758 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 758 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (widget != NULL); -#line 760 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = widget; -#line 760 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = gtk_check_menu_item_get_active (_tmp0_); -#line 760 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = _tmp1_; -#line 760 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp2_) { -#line 761 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_set_document_hint (self, "photo", TRUE); -#line 3454 "ui.c" - } -} - - -static void _user_interface_photo_menuitem_toggled_cb_gtk_check_menu_item_toggled (GtkCheckMenuItem* _sender, gpointer self) { -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_photo_menuitem_toggled_cb ((UserInterface*) self, _sender); -#line 3462 "ui.c" -} - - -static void user_interface_set_page_side (UserInterface* self, ScanType page_side) { - GtkTreeIter iter = {0}; - GtkListStore* _tmp0_ = NULL; - GtkTreeIter _tmp1_ = {0}; - gboolean _tmp2_ = FALSE; -#line 764 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 768 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = self->priv->page_side_model; -#line 768 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = gtk_tree_model_get_iter_first ((GtkTreeModel*) _tmp0_, &_tmp1_); -#line 768 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - iter = _tmp1_; -#line 768 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp2_) { -#line 3481 "ui.c" - { - gboolean _tmp3_ = FALSE; -#line 770 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = TRUE; -#line 770 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - while (TRUE) { -#line 3488 "ui.c" - gint s = 0; - GtkListStore* _tmp6_ = NULL; - GtkTreeIter _tmp7_ = {0}; - gint _tmp8_ = 0; - ScanType _tmp9_ = 0; -#line 770 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (!_tmp3_) { -#line 3496 "ui.c" - GtkListStore* _tmp4_ = NULL; - gboolean _tmp5_ = FALSE; -#line 779 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp4_ = self->priv->page_side_model; -#line 779 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp5_ = gtk_tree_model_iter_next ((GtkTreeModel*) _tmp4_, &iter); -#line 779 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (!_tmp5_) { -#line 779 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - break; -#line 3507 "ui.c" - } - } -#line 770 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = FALSE; -#line 773 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp6_ = self->priv->page_side_model; -#line 773 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp7_ = iter; -#line 773 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_tree_model_get ((GtkTreeModel*) _tmp6_, &_tmp7_, 0, &s, -1, -1); -#line 774 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp8_ = s; -#line 774 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp9_ = page_side; -#line 774 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp8_ == ((gint) _tmp9_)) { -#line 3524 "ui.c" - GtkComboBox* _tmp10_ = NULL; - GtkTreeIter _tmp11_ = {0}; -#line 776 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp10_ = self->priv->page_side_combo; -#line 776 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp11_ = iter; -#line 776 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_combo_box_set_active_iter (_tmp10_, &_tmp11_); -#line 777 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return; -#line 3535 "ui.c" - } - } - } - } -} - - -static void user_interface_set_paper_size (UserInterface* self, gint width, gint height) { - GtkTreeIter iter = {0}; - gboolean have_iter = FALSE; - gboolean _tmp14_ = FALSE; - gboolean _tmp18_ = FALSE; -#line 783 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 3550 "ui.c" - { - GtkListStore* _tmp0_ = NULL; - GtkTreeIter _tmp1_ = {0}; - gboolean _tmp2_ = FALSE; - gboolean _tmp3_ = FALSE; -#line 788 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = self->priv->paper_size_model; -#line 788 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = gtk_tree_model_get_iter_first ((GtkTreeModel*) _tmp0_, &_tmp1_); -#line 788 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - iter = _tmp1_; -#line 788 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - have_iter = _tmp2_; -#line 788 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = TRUE; -#line 788 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - while (TRUE) { -#line 3568 "ui.c" - gboolean _tmp6_ = FALSE; - gint w = 0; - gint h = 0; - GtkListStore* _tmp7_ = NULL; - GtkTreeIter _tmp8_ = {0}; - gboolean _tmp9_ = FALSE; - gint _tmp10_ = 0; - gint _tmp11_ = 0; -#line 788 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (!_tmp3_) { -#line 3579 "ui.c" - GtkListStore* _tmp4_ = NULL; - gboolean _tmp5_ = FALSE; -#line 790 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp4_ = self->priv->paper_size_model; -#line 790 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp5_ = gtk_tree_model_iter_next ((GtkTreeModel*) _tmp4_, &iter); -#line 790 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - have_iter = _tmp5_; -#line 3588 "ui.c" - } -#line 788 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = FALSE; -#line 789 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp6_ = have_iter; -#line 789 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (!_tmp6_) { -#line 789 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - break; -#line 3598 "ui.c" - } -#line 793 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp7_ = self->priv->paper_size_model; -#line 793 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp8_ = iter; -#line 793 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_tree_model_get ((GtkTreeModel*) _tmp7_, &_tmp8_, 0, &w, 1, &h, -1, -1); -#line 794 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp10_ = w; -#line 794 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp11_ = width; -#line 794 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp10_ == _tmp11_) { -#line 3612 "ui.c" - gint _tmp12_ = 0; - gint _tmp13_ = 0; -#line 794 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp12_ = h; -#line 794 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp13_ = height; -#line 794 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp9_ = _tmp12_ == _tmp13_; -#line 3621 "ui.c" - } else { -#line 794 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp9_ = FALSE; -#line 3625 "ui.c" - } -#line 794 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp9_) { -#line 795 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - break; -#line 3631 "ui.c" - } - } - } -#line 798 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp14_ = have_iter; -#line 798 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (!_tmp14_) { -#line 3639 "ui.c" - GtkListStore* _tmp15_ = NULL; - GtkTreeIter _tmp16_ = {0}; - gboolean _tmp17_ = FALSE; -#line 799 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp15_ = self->priv->paper_size_model; -#line 799 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp17_ = gtk_tree_model_get_iter_first ((GtkTreeModel*) _tmp15_, &_tmp16_); -#line 799 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - iter = _tmp16_; -#line 799 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - have_iter = _tmp17_; -#line 3651 "ui.c" - } -#line 800 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp18_ = have_iter; -#line 800 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp18_) { -#line 3657 "ui.c" - GtkComboBox* _tmp19_ = NULL; - GtkTreeIter _tmp20_ = {0}; -#line 801 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp19_ = self->priv->paper_size_combo; -#line 801 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp20_ = iter; -#line 801 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_combo_box_set_active_iter (_tmp19_, &_tmp20_); -#line 3666 "ui.c" - } -} - - -static gint user_interface_get_text_dpi (UserInterface* self) { - gint result = 0; - GtkTreeIter iter = {0}; - gint dpi = 0; - GtkComboBox* _tmp0_ = NULL; - GtkTreeIter _tmp1_ = {0}; - gboolean _tmp2_ = FALSE; -#line 804 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_val_if_fail (self != NULL, 0); -#line 807 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - dpi = USER_INTERFACE_DEFAULT_TEXT_DPI; -#line 809 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = self->priv->text_dpi_combo; -#line 809 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = gtk_combo_box_get_active_iter (_tmp0_, &_tmp1_); -#line 809 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - iter = _tmp1_; -#line 809 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp2_) { -#line 3690 "ui.c" - GtkListStore* _tmp3_ = NULL; - GtkTreeIter _tmp4_ = {0}; -#line 810 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = self->priv->text_dpi_model; -#line 810 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp4_ = iter; -#line 810 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_tree_model_get ((GtkTreeModel*) _tmp3_, &_tmp4_, 0, &dpi, -1, -1); -#line 3699 "ui.c" - } -#line 812 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - result = dpi; -#line 812 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return result; -#line 3705 "ui.c" -} - - -static gint user_interface_get_photo_dpi (UserInterface* self) { - gint result = 0; - GtkTreeIter iter = {0}; - gint dpi = 0; - GtkComboBox* _tmp0_ = NULL; - GtkTreeIter _tmp1_ = {0}; - gboolean _tmp2_ = FALSE; -#line 815 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_val_if_fail (self != NULL, 0); -#line 818 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - dpi = USER_INTERFACE_DEFAULT_PHOTO_DPI; -#line 820 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = self->priv->photo_dpi_combo; -#line 820 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = gtk_combo_box_get_active_iter (_tmp0_, &_tmp1_); -#line 820 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - iter = _tmp1_; -#line 820 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp2_) { -#line 3728 "ui.c" - GtkListStore* _tmp3_ = NULL; - GtkTreeIter _tmp4_ = {0}; -#line 821 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = self->priv->photo_dpi_model; -#line 821 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp4_ = iter; -#line 821 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_tree_model_get ((GtkTreeModel*) _tmp3_, &_tmp4_, 0, &dpi, -1, -1); -#line 3737 "ui.c" - } -#line 823 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - result = dpi; -#line 823 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return result; -#line 3743 "ui.c" -} - - -static ScanType user_interface_get_page_side (UserInterface* self) { - ScanType result = 0; - GtkTreeIter iter = {0}; - gint page_side = 0; - GtkComboBox* _tmp0_ = NULL; - GtkTreeIter _tmp1_ = {0}; - gboolean _tmp2_ = FALSE; - gint _tmp5_ = 0; -#line 826 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_val_if_fail (self != NULL, 0); -#line 829 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - page_side = (gint) SCAN_TYPE_ADF_BOTH; -#line 831 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = self->priv->page_side_combo; -#line 831 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = gtk_combo_box_get_active_iter (_tmp0_, &_tmp1_); -#line 831 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - iter = _tmp1_; -#line 831 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp2_) { -#line 3767 "ui.c" - GtkListStore* _tmp3_ = NULL; - GtkTreeIter _tmp4_ = {0}; -#line 832 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = self->priv->page_side_model; -#line 832 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp4_ = iter; -#line 832 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_tree_model_get ((GtkTreeModel*) _tmp3_, &_tmp4_, 0, &page_side, -1, -1); -#line 3776 "ui.c" - } -#line 834 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp5_ = page_side; -#line 834 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - result = (ScanType) _tmp5_; -#line 834 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return result; -#line 3784 "ui.c" -} - - -static gboolean user_interface_get_paper_size (UserInterface* self, gint* width, gint* height) { - gint _vala_width = 0; - gint _vala_height = 0; - gboolean result = FALSE; - GtkTreeIter iter = {0}; - gint _tmp0_ = 0; - GtkComboBox* _tmp1_ = NULL; - GtkTreeIter _tmp2_ = {0}; - gboolean _tmp3_ = FALSE; -#line 837 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_val_if_fail (self != NULL, FALSE); -#line 841 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _vala_height = 0; -#line 841 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = _vala_height; -#line 841 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _vala_width = _tmp0_; -#line 842 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = self->priv->paper_size_combo; -#line 842 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = gtk_combo_box_get_active_iter (_tmp1_, &_tmp2_); -#line 842 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - iter = _tmp2_; -#line 842 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp3_) { -#line 3813 "ui.c" - GtkListStore* _tmp4_ = NULL; - GtkTreeIter _tmp5_ = {0}; -#line 844 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp4_ = self->priv->paper_size_model; -#line 844 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp5_ = iter; -#line 844 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_tree_model_get ((GtkTreeModel*) _tmp4_, &_tmp5_, 0, &_vala_width, 1, &_vala_height, -1, -1); -#line 845 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - result = TRUE; -#line 845 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (width) { -#line 845 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - *width = _vala_width; -#line 3828 "ui.c" - } -#line 845 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (height) { -#line 845 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - *height = _vala_height; -#line 3834 "ui.c" - } -#line 845 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return result; -#line 3838 "ui.c" - } -#line 848 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - result = FALSE; -#line 848 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (width) { -#line 848 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - *width = _vala_width; -#line 3846 "ui.c" - } -#line 848 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (height) { -#line 848 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - *height = _vala_height; -#line 3852 "ui.c" - } -#line 848 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return result; -#line 3856 "ui.c" -} - - -static ScanOptions* user_interface_make_scan_options (UserInterface* self) { - ScanOptions* result = NULL; - ScanOptions* options = NULL; - ScanOptions* _tmp0_ = NULL; - const gchar* _tmp1_ = NULL; - ScanOptions* _tmp10_ = NULL; - ScanOptions* _tmp11_ = NULL; - gint _tmp12_ = 0; - gint _tmp13_ = 0; - ScanOptions* _tmp14_ = NULL; - gint _tmp15_ = 0; - gint _tmp16_ = 0; - ScanOptions* _tmp17_ = NULL; - gint _tmp18_ = 0; - gint _tmp19_ = 0; -#line 851 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_val_if_fail (self != NULL, NULL); -#line 853 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = scan_options_new (); -#line 853 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - options = _tmp0_; -#line 854 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = self->priv->document_hint; -#line 854 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (g_strcmp0 (_tmp1_, "text") == 0) { -#line 3885 "ui.c" - ScanOptions* _tmp2_ = NULL; - ScanOptions* _tmp3_ = NULL; - gint _tmp4_ = 0; - ScanOptions* _tmp5_ = NULL; -#line 856 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = options; -#line 856 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_->scan_mode = SCAN_MODE_GRAY; -#line 857 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = options; -#line 857 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp4_ = user_interface_get_text_dpi (self); -#line 857 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_->dpi = _tmp4_; -#line 858 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp5_ = options; -#line 858 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp5_->depth = 2; -#line 3904 "ui.c" - } else { - ScanOptions* _tmp6_ = NULL; - ScanOptions* _tmp7_ = NULL; - gint _tmp8_ = 0; - ScanOptions* _tmp9_ = NULL; -#line 862 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp6_ = options; -#line 862 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp6_->scan_mode = SCAN_MODE_COLOR; -#line 863 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp7_ = options; -#line 863 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp8_ = user_interface_get_photo_dpi (self); -#line 863 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp7_->dpi = _tmp8_; -#line 864 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp9_ = options; -#line 864 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp9_->depth = 8; -#line 3924 "ui.c" - } -#line 866 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp10_ = options; -#line 866 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp11_ = options; -#line 866 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_get_paper_size (self, &_tmp12_, &_tmp13_); -#line 866 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp10_->paper_width = _tmp12_; -#line 866 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp11_->paper_height = _tmp13_; -#line 867 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp14_ = options; -#line 867 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp15_ = user_interface_get_brightness (self); -#line 867 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp16_ = _tmp15_; -#line 867 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp14_->brightness = _tmp16_; -#line 868 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp17_ = options; -#line 868 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp18_ = user_interface_get_contrast (self); -#line 868 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp19_ = _tmp18_; -#line 868 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp17_->contrast = _tmp19_; -#line 870 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - result = options; -#line 870 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return result; -#line 3956 "ui.c" -} - - -static void user_interface_scan_button_clicked_cb (UserInterface* self, GtkWidget* widget) { - ScanOptions* options = NULL; - ScanOptions* _tmp0_ = NULL; - gchar* _tmp1_ = NULL; - gchar* _tmp2_ = NULL; - gchar* _tmp3_ = NULL; -#line 874 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 874 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (widget != NULL); -#line 876 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = user_interface_make_scan_options (self); -#line 876 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - options = _tmp0_; -#line 877 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - options->type = SCAN_TYPE_SINGLE; -#line 878 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = user_interface_get_selected_device (self); -#line 878 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = _tmp1_; -#line 878 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = _tmp2_; -#line 878 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_signal_emit_by_name (self, "start-scan", _tmp3_, options); -#line 878 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (_tmp3_); -#line 874 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _scan_options_unref0 (options); -#line 3988 "ui.c" -} - - -static void _user_interface_scan_button_clicked_cb_gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_scan_button_clicked_cb ((UserInterface*) self, _sender); -#line 3995 "ui.c" -} - - -static void user_interface_stop_scan_button_clicked_cb (UserInterface* self, GtkWidget* widget) { -#line 882 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 882 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (widget != NULL); -#line 884 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_signal_emit_by_name (self, "stop-scan"); -#line 4006 "ui.c" -} - - -static void _user_interface_stop_scan_button_clicked_cb_gtk_button_clicked (GtkButton* _sender, gpointer self) { -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_stop_scan_button_clicked_cb ((UserInterface*) self, _sender); -#line 4013 "ui.c" -} - - -static void user_interface_continuous_scan_button_clicked_cb (UserInterface* self, GtkWidget* widget) { - gboolean _tmp0_ = FALSE; - gboolean _tmp1_ = FALSE; -#line 888 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 888 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (widget != NULL); -#line 890 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = user_interface_get_scanning (self); -#line 890 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = _tmp0_; -#line 890 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp1_) { -#line 891 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_signal_emit_by_name (self, "stop-scan"); -#line 4032 "ui.c" - } else { - ScanOptions* options = NULL; - ScanOptions* _tmp2_ = NULL; - ScanOptions* _tmp3_ = NULL; - ScanType _tmp4_ = 0; - gchar* _tmp5_ = NULL; - gchar* _tmp6_ = NULL; - gchar* _tmp7_ = NULL; - ScanOptions* _tmp8_ = NULL; -#line 894 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = user_interface_make_scan_options (self); -#line 894 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - options = _tmp2_; -#line 895 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = options; -#line 895 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp4_ = user_interface_get_page_side (self); -#line 895 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_->type = _tmp4_; -#line 896 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp5_ = user_interface_get_selected_device (self); -#line 896 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp6_ = _tmp5_; -#line 896 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp7_ = _tmp6_; -#line 896 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp8_ = options; -#line 896 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_signal_emit_by_name (self, "start-scan", _tmp7_, _tmp8_); -#line 896 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (_tmp7_); -#line 890 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _scan_options_unref0 (options); -#line 4066 "ui.c" - } -} - - -static void _user_interface_continuous_scan_button_clicked_cb_gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_continuous_scan_button_clicked_cb ((UserInterface*) self, _sender); -#line 4074 "ui.c" -} - - -static void user_interface_preferences_button_clicked_cb (UserInterface* self, GtkWidget* widget) { - GtkDialog* _tmp0_ = NULL; -#line 901 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 901 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (widget != NULL); -#line 903 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = self->priv->preferences_dialog; -#line 903 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_window_present ((GtkWindow*) _tmp0_); -#line 4088 "ui.c" -} - - -static void _user_interface_preferences_button_clicked_cb_gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_preferences_button_clicked_cb ((UserInterface*) self, _sender); -#line 4095 "ui.c" -} - - -void user_interface_preferences_activate_cb (UserInterface* self) { - GtkDialog* _tmp0_ = NULL; -#line 906 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 908 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = self->priv->preferences_dialog; -#line 908 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_window_present ((GtkWindow*) _tmp0_); -#line 4107 "ui.c" -} - - -static gboolean user_interface_preferences_dialog_delete_event_cb (UserInterface* self, GtkWidget* widget, GdkEventAny* event) { - gboolean result = FALSE; -#line 912 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_val_if_fail (self != NULL, FALSE); -#line 912 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_val_if_fail (widget != NULL, FALSE); -#line 912 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_val_if_fail (event != NULL, FALSE); -#line 914 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - result = TRUE; -#line 914 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return result; -#line 4123 "ui.c" -} - - -static gboolean _user_interface_preferences_dialog_delete_event_cb_gtk_widget_delete_event (GtkWidget* _sender, GdkEventAny* event, gpointer self) { - gboolean result; - result = user_interface_preferences_dialog_delete_event_cb ((UserInterface*) self, _sender, event); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return result; -#line 4132 "ui.c" -} - - -static void user_interface_preferences_dialog_response_cb (UserInterface* self, GtkWidget* widget, gint response_id) { - GtkDialog* _tmp0_ = NULL; -#line 918 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 918 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (widget != NULL); -#line 920 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = self->priv->preferences_dialog; -#line 920 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_set_visible ((GtkWidget*) _tmp0_, FALSE); -#line 4146 "ui.c" -} - - -static void _user_interface_preferences_dialog_response_cb_gtk_dialog_response (GtkDialog* _sender, gint response_id, gpointer self) { -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_preferences_dialog_response_cb ((UserInterface*) self, _sender, response_id); -#line 4153 "ui.c" -} - - -static gpointer _page_ref0 (gpointer self) { -#line 925 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return self ? page_ref (self) : NULL; -#line 4160 "ui.c" -} - - -static void user_interface_update_page_menu (UserInterface* self) { - Page* page = NULL; - BookView* _tmp0_ = NULL; - Page* _tmp1_ = NULL; - Page* _tmp2_ = NULL; - Page* _tmp3_ = NULL; - Page* _tmp4_ = NULL; -#line 923 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 925 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = self->priv->book_view; -#line 925 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = book_view_get_selected_page (_tmp0_); -#line 925 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = _tmp1_; -#line 925 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = _page_ref0 (_tmp2_); -#line 925 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - page = _tmp3_; -#line 926 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp4_ = page; -#line 926 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp4_ == NULL) { -#line 4187 "ui.c" - GtkMenuItem* _tmp5_ = NULL; - GtkMenuItem* _tmp6_ = NULL; -#line 928 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp5_ = self->priv->page_move_left_menuitem; -#line 928 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_set_sensitive ((GtkWidget*) _tmp5_, FALSE); -#line 929 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp6_ = self->priv->page_move_right_menuitem; -#line 929 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_set_sensitive ((GtkWidget*) _tmp6_, FALSE); -#line 4198 "ui.c" - } else { - guint index = 0U; - Book* _tmp7_ = NULL; - Page* _tmp8_ = NULL; - guint _tmp9_ = 0U; - GtkMenuItem* _tmp10_ = NULL; - guint _tmp11_ = 0U; - GtkMenuItem* _tmp12_ = NULL; - guint _tmp13_ = 0U; - Book* _tmp14_ = NULL; - guint _tmp15_ = 0U; - guint _tmp16_ = 0U; -#line 933 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp7_ = self->priv->_book; -#line 933 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp8_ = page; -#line 933 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp9_ = book_get_page_index (_tmp7_, _tmp8_); -#line 933 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - index = _tmp9_; -#line 934 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp10_ = self->priv->page_move_left_menuitem; -#line 934 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp11_ = index; -#line 934 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_set_sensitive ((GtkWidget*) _tmp10_, _tmp11_ > ((guint) 0)); -#line 935 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp12_ = self->priv->page_move_right_menuitem; -#line 935 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp13_ = index; -#line 935 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp14_ = self->priv->_book; -#line 935 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp15_ = book_get_n_pages (_tmp14_); -#line 935 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp16_ = _tmp15_; -#line 935 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_set_sensitive ((GtkWidget*) _tmp12_, _tmp13_ < (_tmp16_ - 1)); -#line 4237 "ui.c" - } -#line 923 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _page_unref0 (page); -#line 4241 "ui.c" -} - - -static void user_interface_page_selected_cb (UserInterface* self, BookView* view, Page* page) { - Page* _tmp0_ = NULL; - GtkRadioMenuItem* menuitem = NULL; - GtkRadioMenuItem* _tmp1_ = NULL; - GtkRadioMenuItem* _tmp2_ = NULL; - Page* _tmp3_ = NULL; - gboolean _tmp4_ = FALSE; - gboolean _tmp5_ = FALSE; - GtkRadioMenuItem* _tmp31_ = NULL; - GtkToggleButton* _tmp32_ = NULL; - Page* _tmp33_ = NULL; - gboolean _tmp34_ = FALSE; - gboolean _tmp35_ = FALSE; - GtkToggleToolButton* _tmp36_ = NULL; - Page* _tmp37_ = NULL; - gboolean _tmp38_ = FALSE; - gboolean _tmp39_ = FALSE; -#line 939 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 939 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (view != NULL); -#line 941 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = page; -#line 941 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp0_ == NULL) { -#line 942 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return; -#line 4272 "ui.c" - } -#line 944 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self->priv->updating_page_menu = TRUE; -#line 946 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_update_page_menu (self); -#line 948 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = self->priv->no_crop_menuitem; -#line 948 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = _g_object_ref0 (_tmp1_); -#line 948 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - menuitem = _tmp2_; -#line 949 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = page; -#line 949 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp4_ = page_get_has_crop (_tmp3_); -#line 949 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp5_ = _tmp4_; -#line 949 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp5_) { -#line 4292 "ui.c" - gchar* crop_name = NULL; - Page* _tmp6_ = NULL; - const gchar* _tmp7_ = NULL; - const gchar* _tmp8_ = NULL; - gchar* _tmp9_ = NULL; - const gchar* _tmp10_ = NULL; -#line 951 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp6_ = page; -#line 951 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp7_ = page_get_crop_name (_tmp6_); -#line 951 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp8_ = _tmp7_; -#line 951 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp9_ = g_strdup (_tmp8_); -#line 951 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - crop_name = _tmp9_; -#line 952 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp10_ = crop_name; -#line 952 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp10_ != NULL) { -#line 4313 "ui.c" - const gchar* _tmp11_ = NULL; -#line 954 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp11_ = crop_name; -#line 954 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (g_strcmp0 (_tmp11_, "A4") == 0) { -#line 4319 "ui.c" - GtkRadioMenuItem* _tmp12_ = NULL; - GtkRadioMenuItem* _tmp13_ = NULL; -#line 955 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp12_ = self->priv->a4_menuitem; -#line 955 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp13_ = _g_object_ref0 (_tmp12_); -#line 955 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (menuitem); -#line 955 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - menuitem = _tmp13_; -#line 4330 "ui.c" - } else { - const gchar* _tmp14_ = NULL; -#line 956 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp14_ = crop_name; -#line 956 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (g_strcmp0 (_tmp14_, "A5") == 0) { -#line 4337 "ui.c" - GtkRadioMenuItem* _tmp15_ = NULL; - GtkRadioMenuItem* _tmp16_ = NULL; -#line 957 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp15_ = self->priv->a5_menuitem; -#line 957 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp16_ = _g_object_ref0 (_tmp15_); -#line 957 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (menuitem); -#line 957 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - menuitem = _tmp16_; -#line 4348 "ui.c" - } else { - const gchar* _tmp17_ = NULL; -#line 958 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp17_ = crop_name; -#line 958 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (g_strcmp0 (_tmp17_, "A6") == 0) { -#line 4355 "ui.c" - GtkRadioMenuItem* _tmp18_ = NULL; - GtkRadioMenuItem* _tmp19_ = NULL; -#line 959 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp18_ = self->priv->a6_menuitem; -#line 959 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp19_ = _g_object_ref0 (_tmp18_); -#line 959 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (menuitem); -#line 959 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - menuitem = _tmp19_; -#line 4366 "ui.c" - } else { - const gchar* _tmp20_ = NULL; -#line 960 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp20_ = crop_name; -#line 960 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (g_strcmp0 (_tmp20_, "letter") == 0) { -#line 4373 "ui.c" - GtkRadioMenuItem* _tmp21_ = NULL; - GtkRadioMenuItem* _tmp22_ = NULL; -#line 961 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp21_ = self->priv->letter_menuitem; -#line 961 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp22_ = _g_object_ref0 (_tmp21_); -#line 961 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (menuitem); -#line 961 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - menuitem = _tmp22_; -#line 4384 "ui.c" - } else { - const gchar* _tmp23_ = NULL; -#line 962 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp23_ = crop_name; -#line 962 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (g_strcmp0 (_tmp23_, "legal") == 0) { -#line 4391 "ui.c" - GtkRadioMenuItem* _tmp24_ = NULL; - GtkRadioMenuItem* _tmp25_ = NULL; -#line 963 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp24_ = self->priv->legal_menuitem; -#line 963 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp25_ = _g_object_ref0 (_tmp24_); -#line 963 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (menuitem); -#line 963 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - menuitem = _tmp25_; -#line 4402 "ui.c" - } else { - const gchar* _tmp26_ = NULL; -#line 964 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp26_ = crop_name; -#line 964 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (g_strcmp0 (_tmp26_, "4x6") == 0) { -#line 4409 "ui.c" - GtkRadioMenuItem* _tmp27_ = NULL; - GtkRadioMenuItem* _tmp28_ = NULL; -#line 965 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp27_ = self->priv->four_by_six_menuitem; -#line 965 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp28_ = _g_object_ref0 (_tmp27_); -#line 965 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (menuitem); -#line 965 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - menuitem = _tmp28_; -#line 4420 "ui.c" - } - } - } - } - } - } - } else { - GtkRadioMenuItem* _tmp29_ = NULL; - GtkRadioMenuItem* _tmp30_ = NULL; -#line 968 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp29_ = self->priv->custom_crop_menuitem; -#line 968 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp30_ = _g_object_ref0 (_tmp29_); -#line 968 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (menuitem); -#line 968 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - menuitem = _tmp30_; -#line 4438 "ui.c" - } -#line 949 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (crop_name); -#line 4442 "ui.c" - } -#line 971 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp31_ = menuitem; -#line 971 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_check_menu_item_set_active ((GtkCheckMenuItem*) _tmp31_, TRUE); -#line 972 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp32_ = self->priv->crop_button; -#line 972 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp33_ = page; -#line 972 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp34_ = page_get_has_crop (_tmp33_); -#line 972 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp35_ = _tmp34_; -#line 972 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_toggle_button_set_active (_tmp32_, _tmp35_); -#line 973 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp36_ = self->priv->crop_toolbutton; -#line 973 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp37_ = page; -#line 973 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp38_ = page_get_has_crop (_tmp37_); -#line 973 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp39_ = _tmp38_; -#line 973 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_toggle_tool_button_set_active (_tmp36_, _tmp39_); -#line 975 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self->priv->updating_page_menu = FALSE; -#line 939 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (menuitem); -#line 4472 "ui.c" -} - - -static void user_interface_show_page_cb (UserInterface* self, BookView* view, Page* page) { - gchar* path = NULL; - gchar* _tmp0_ = NULL; - const gchar* _tmp1_ = NULL; - GFile* file = NULL; - const gchar* _tmp2_ = NULL; - GFile* _tmp3_ = NULL; - GError * _inner_error_ = NULL; -#line 978 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 978 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (view != NULL); -#line 978 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (page != NULL); -#line 980 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = get_temporary_filename ("scanned-page", "tiff"); -#line 980 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - path = _tmp0_; -#line 981 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = path; -#line 981 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp1_ == NULL) { -#line 982 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (path); -#line 982 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return; -#line 4502 "ui.c" - } -#line 983 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = path; -#line 983 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = g_file_new_for_path (_tmp2_); -#line 983 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - file = _tmp3_; -#line 4510 "ui.c" - { - Page* _tmp4_ = NULL; - gint _tmp5_ = 0; - gint _tmp6_ = 0; - GFile* _tmp7_ = NULL; -#line 987 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp4_ = page; -#line 987 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp5_ = user_interface_get_quality (self); -#line 987 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp6_ = _tmp5_; -#line 987 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp7_ = file; -#line 987 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - page_save (_tmp4_, "tiff", _tmp6_, _tmp7_, &_inner_error_); -#line 987 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 4528 "ui.c" - goto __catch18_g_error; - } - } - goto __finally18; - __catch18_g_error: - { - GError* e = NULL; - const gchar* _tmp8_ = NULL; - GError* _tmp9_ = NULL; - const gchar* _tmp10_ = NULL; -#line 985 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - e = _inner_error_; -#line 985 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _inner_error_ = NULL; -#line 991 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp8_ = _ ("Unable to save image for preview"); -#line 991 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp9_ = e; -#line 991 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp10_ = _tmp9_->message; -#line 991 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_show_error_dialog (self, _tmp8_, _tmp10_); -#line 994 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_error_free0 (e); -#line 994 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (file); -#line 994 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (path); -#line 994 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return; -#line 4559 "ui.c" - } - __finally18: -#line 985 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 985 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (file); -#line 985 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (path); -#line 985 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - 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); -#line 985 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_clear_error (&_inner_error_); -#line 985 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return; -#line 4574 "ui.c" - } - { - GdkScreen* _tmp11_ = NULL; - GdkScreen* _tmp12_ = NULL; - GFile* _tmp13_ = NULL; - gchar* _tmp14_ = NULL; - gchar* _tmp15_ = NULL; - guint32 _tmp16_ = 0U; -#line 999 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp11_ = gtk_window_get_screen ((GtkWindow*) self); -#line 999 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp12_ = _tmp11_; -#line 999 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp13_ = file; -#line 999 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp14_ = g_file_get_uri (_tmp13_); -#line 999 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp15_ = _tmp14_; -#line 999 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp16_ = gtk_get_current_event_time (); -#line 999 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_show_uri (_tmp12_, _tmp15_, _tmp16_, &_inner_error_); -#line 999 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (_tmp15_); -#line 999 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 4601 "ui.c" - goto __catch19_g_error; - } - } - goto __finally19; - __catch19_g_error: - { - GError* e = NULL; - const gchar* _tmp17_ = NULL; - GError* _tmp18_ = NULL; - const gchar* _tmp19_ = NULL; -#line 997 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - e = _inner_error_; -#line 997 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _inner_error_ = NULL; -#line 1003 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp17_ = _ ("Unable to open image preview application"); -#line 1003 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp18_ = e; -#line 1003 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp19_ = _tmp18_->message; -#line 1003 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_show_error_dialog (self, _tmp17_, _tmp19_); -#line 997 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_error_free0 (e); -#line 4626 "ui.c" - } - __finally19: -#line 997 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 997 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (file); -#line 997 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (path); -#line 997 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - 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); -#line 997 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_clear_error (&_inner_error_); -#line 997 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return; -#line 4641 "ui.c" - } -#line 978 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (file); -#line 978 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (path); -#line 4647 "ui.c" -} - - -static void user_interface_show_page_menu_cb (UserInterface* self, BookView* view) { - GtkMenu* _tmp0_ = NULL; - guint32 _tmp1_ = 0U; -#line 1009 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 1009 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (view != NULL); -#line 1011 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = self->priv->page_menu; -#line 1011 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = gtk_get_current_event_time (); -#line 1011 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_menu_popup (_tmp0_, NULL, NULL, NULL, NULL, (guint) 3, _tmp1_); -#line 4664 "ui.c" -} - - -static void user_interface_rotate_left_button_clicked_cb (UserInterface* self, GtkWidget* widget) { - gboolean _tmp0_ = FALSE; - Page* page = NULL; - BookView* _tmp1_ = NULL; - Page* _tmp2_ = NULL; - Page* _tmp3_ = NULL; - Page* _tmp4_ = NULL; - Page* _tmp5_ = NULL; -#line 1015 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 1015 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (widget != NULL); -#line 1017 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = self->priv->updating_page_menu; -#line 1017 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp0_) { -#line 1018 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return; -#line 4686 "ui.c" - } -#line 1019 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = self->priv->book_view; -#line 1019 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = book_view_get_selected_page (_tmp1_); -#line 1019 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = _tmp2_; -#line 1019 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp4_ = _page_ref0 (_tmp3_); -#line 1019 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - page = _tmp4_; -#line 1020 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp5_ = page; -#line 1020 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp5_ != NULL) { -#line 4702 "ui.c" - Page* _tmp6_ = NULL; -#line 1021 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp6_ = page; -#line 1021 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - page_rotate_left (_tmp6_); -#line 4708 "ui.c" - } -#line 1015 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _page_unref0 (page); -#line 4712 "ui.c" -} - - -static void _user_interface_rotate_left_button_clicked_cb_gtk_button_clicked (GtkButton* _sender, gpointer self) { -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_rotate_left_button_clicked_cb ((UserInterface*) self, _sender); -#line 4719 "ui.c" -} - - -static void user_interface_rotate_right_button_clicked_cb (UserInterface* self, GtkWidget* widget) { - gboolean _tmp0_ = FALSE; - Page* page = NULL; - BookView* _tmp1_ = NULL; - Page* _tmp2_ = NULL; - Page* _tmp3_ = NULL; - Page* _tmp4_ = NULL; - Page* _tmp5_ = NULL; -#line 1025 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 1025 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (widget != NULL); -#line 1027 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = self->priv->updating_page_menu; -#line 1027 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp0_) { -#line 1028 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return; -#line 4741 "ui.c" - } -#line 1029 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = self->priv->book_view; -#line 1029 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = book_view_get_selected_page (_tmp1_); -#line 1029 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = _tmp2_; -#line 1029 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp4_ = _page_ref0 (_tmp3_); -#line 1029 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - page = _tmp4_; -#line 1030 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp5_ = page; -#line 1030 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp5_ != NULL) { -#line 4757 "ui.c" - Page* _tmp6_ = NULL; -#line 1031 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp6_ = page; -#line 1031 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - page_rotate_right (_tmp6_); -#line 4763 "ui.c" - } -#line 1025 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _page_unref0 (page); -#line 4767 "ui.c" -} - - -static void _user_interface_rotate_right_button_clicked_cb_gtk_button_clicked (GtkButton* _sender, gpointer self) { -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_rotate_right_button_clicked_cb ((UserInterface*) self, _sender); -#line 4774 "ui.c" -} - - -static void user_interface_set_crop (UserInterface* self, const gchar* crop_name) { - GtkMenuItem* _tmp0_ = NULL; - const gchar* _tmp1_ = NULL; - gboolean _tmp2_ = FALSE; - Page* page = NULL; - BookView* _tmp3_ = NULL; - Page* _tmp4_ = NULL; - Page* _tmp5_ = NULL; - Page* _tmp6_ = NULL; - Page* _tmp7_ = NULL; - const gchar* _tmp8_ = NULL; -#line 1034 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 1036 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = self->priv->crop_rotate_menuitem; -#line 1036 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = crop_name; -#line 1036 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_set_sensitive ((GtkWidget*) _tmp0_, _tmp1_ != NULL); -#line 1038 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = self->priv->updating_page_menu; -#line 1038 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp2_) { -#line 1039 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return; -#line 4803 "ui.c" - } -#line 1041 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = self->priv->book_view; -#line 1041 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp4_ = book_view_get_selected_page (_tmp3_); -#line 1041 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp5_ = _tmp4_; -#line 1041 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp6_ = _page_ref0 (_tmp5_); -#line 1041 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - page = _tmp6_; -#line 1042 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp7_ = page; -#line 1042 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp7_ == NULL) { -#line 1044 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_warning ("ui.vala:1044: Trying to set crop but no selected page"); -#line 1045 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _page_unref0 (page); -#line 1045 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return; -#line 4825 "ui.c" - } -#line 1048 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp8_ = crop_name; -#line 1048 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp8_ == NULL) { -#line 4831 "ui.c" - Page* _tmp9_ = NULL; -#line 1049 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp9_ = page; -#line 1049 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - page_set_no_crop (_tmp9_); -#line 4837 "ui.c" - } else { - const gchar* _tmp10_ = NULL; -#line 1050 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp10_ = crop_name; -#line 1050 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (g_strcmp0 (_tmp10_, "custom") == 0) { -#line 4844 "ui.c" - gint width = 0; - Page* _tmp11_ = NULL; - gint _tmp12_ = 0; - gint _tmp13_ = 0; - gint height = 0; - Page* _tmp14_ = NULL; - gint _tmp15_ = 0; - gint _tmp16_ = 0; - gint crop_width = 0; - gint _tmp17_ = 0; - gint crop_height = 0; - gint _tmp18_ = 0; - Page* _tmp19_ = NULL; - gint _tmp20_ = 0; - gint _tmp21_ = 0; - Page* _tmp22_ = NULL; - gint _tmp23_ = 0; - gint _tmp24_ = 0; - gint _tmp25_ = 0; - gint _tmp26_ = 0; -#line 1052 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp11_ = page; -#line 1052 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp12_ = page_get_width (_tmp11_); -#line 1052 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp13_ = _tmp12_; -#line 1052 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - width = _tmp13_; -#line 1053 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp14_ = page; -#line 1053 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp15_ = page_get_height (_tmp14_); -#line 1053 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp16_ = _tmp15_; -#line 1053 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - height = _tmp16_; -#line 1054 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp17_ = width; -#line 1054 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - crop_width = (gint) ((_tmp17_ * 0.8) + 0.5); -#line 1055 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp18_ = height; -#line 1055 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - crop_height = (gint) ((_tmp18_ * 0.8) + 0.5); -#line 1056 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp19_ = page; -#line 1056 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp20_ = crop_width; -#line 1056 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp21_ = crop_height; -#line 1056 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - page_set_custom_crop (_tmp19_, _tmp20_, _tmp21_); -#line 1057 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp22_ = page; -#line 1057 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp23_ = width; -#line 1057 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp24_ = crop_width; -#line 1057 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp25_ = height; -#line 1057 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp26_ = crop_height; -#line 1057 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - page_move_crop (_tmp22_, (_tmp23_ - _tmp24_) / 2, (_tmp25_ - _tmp26_) / 2); -#line 4909 "ui.c" - } else { - Page* _tmp27_ = NULL; - const gchar* _tmp28_ = NULL; -#line 1060 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp27_ = page; -#line 1060 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp28_ = crop_name; -#line 1060 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - page_set_named_crop (_tmp27_, _tmp28_); -#line 4919 "ui.c" - } - } -#line 1034 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _page_unref0 (page); -#line 4924 "ui.c" -} - - -static void user_interface_no_crop_menuitem_toggled_cb (UserInterface* self, GtkCheckMenuItem* widget) { - GtkCheckMenuItem* _tmp0_ = NULL; - gboolean _tmp1_ = FALSE; - gboolean _tmp2_ = FALSE; -#line 1064 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 1064 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (widget != NULL); -#line 1066 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = widget; -#line 1066 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = gtk_check_menu_item_get_active (_tmp0_); -#line 1066 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = _tmp1_; -#line 1066 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp2_) { -#line 1067 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_set_crop (self, NULL); -#line 4946 "ui.c" - } -} - - -static void _user_interface_no_crop_menuitem_toggled_cb_gtk_check_menu_item_toggled (GtkCheckMenuItem* _sender, gpointer self) { -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_no_crop_menuitem_toggled_cb ((UserInterface*) self, _sender); -#line 4954 "ui.c" -} - - -static void user_interface_custom_crop_menuitem_toggled_cb (UserInterface* self, GtkCheckMenuItem* widget) { - GtkCheckMenuItem* _tmp0_ = NULL; - gboolean _tmp1_ = FALSE; - gboolean _tmp2_ = FALSE; -#line 1071 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 1071 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (widget != NULL); -#line 1073 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = widget; -#line 1073 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = gtk_check_menu_item_get_active (_tmp0_); -#line 1073 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = _tmp1_; -#line 1073 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp2_) { -#line 1074 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_set_crop (self, "custom"); -#line 4976 "ui.c" - } -} - - -static void _user_interface_custom_crop_menuitem_toggled_cb_gtk_check_menu_item_toggled (GtkCheckMenuItem* _sender, gpointer self) { -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_custom_crop_menuitem_toggled_cb ((UserInterface*) self, _sender); -#line 4984 "ui.c" -} - - -static void user_interface_crop_button_toggled_cb (UserInterface* self, GtkToggleButton* widget) { - gboolean _tmp0_ = FALSE; - GtkToggleButton* _tmp1_ = NULL; - gboolean _tmp2_ = FALSE; - gboolean _tmp3_ = FALSE; -#line 1078 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 1078 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (widget != NULL); -#line 1080 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = self->priv->updating_page_menu; -#line 1080 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp0_) { -#line 1081 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return; -#line 5003 "ui.c" - } -#line 1083 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = widget; -#line 1083 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = gtk_toggle_button_get_active (_tmp1_); -#line 1083 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = _tmp2_; -#line 1083 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp3_) { -#line 5013 "ui.c" - GtkRadioMenuItem* _tmp4_ = NULL; -#line 1084 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp4_ = self->priv->custom_crop_menuitem; -#line 1084 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_check_menu_item_set_active ((GtkCheckMenuItem*) _tmp4_, TRUE); -#line 5019 "ui.c" - } else { - GtkRadioMenuItem* _tmp5_ = NULL; -#line 1086 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp5_ = self->priv->no_crop_menuitem; -#line 1086 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_check_menu_item_set_active ((GtkCheckMenuItem*) _tmp5_, TRUE); -#line 5026 "ui.c" - } -} - - -static void _user_interface_crop_button_toggled_cb_gtk_toggle_button_toggled (GtkToggleButton* _sender, gpointer self) { -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_crop_button_toggled_cb ((UserInterface*) self, _sender); -#line 5034 "ui.c" -} - - -static void user_interface_crop_toolbutton_toggled_cb (UserInterface* self, GtkToggleToolButton* widget) { - gboolean _tmp0_ = FALSE; - GtkToggleToolButton* _tmp1_ = NULL; - gboolean _tmp2_ = FALSE; - gboolean _tmp3_ = FALSE; -#line 1090 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 1090 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (widget != NULL); -#line 1092 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = self->priv->updating_page_menu; -#line 1092 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp0_) { -#line 1093 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return; -#line 5053 "ui.c" - } -#line 1095 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = widget; -#line 1095 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = gtk_toggle_tool_button_get_active (_tmp1_); -#line 1095 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = _tmp2_; -#line 1095 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp3_) { -#line 5063 "ui.c" - GtkRadioMenuItem* _tmp4_ = NULL; -#line 1096 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp4_ = self->priv->custom_crop_menuitem; -#line 1096 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_check_menu_item_set_active ((GtkCheckMenuItem*) _tmp4_, TRUE); -#line 5069 "ui.c" - } else { - GtkRadioMenuItem* _tmp5_ = NULL; -#line 1098 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp5_ = self->priv->no_crop_menuitem; -#line 1098 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_check_menu_item_set_active ((GtkCheckMenuItem*) _tmp5_, TRUE); -#line 5076 "ui.c" - } -} - - -static void _user_interface_crop_toolbutton_toggled_cb_gtk_toggle_tool_button_toggled (GtkToggleToolButton* _sender, gpointer self) { -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_crop_toolbutton_toggled_cb ((UserInterface*) self, _sender); -#line 5084 "ui.c" -} - - -static void user_interface_four_by_six_menuitem_toggled_cb (UserInterface* self, GtkCheckMenuItem* widget) { - GtkCheckMenuItem* _tmp0_ = NULL; - gboolean _tmp1_ = FALSE; - gboolean _tmp2_ = FALSE; -#line 1102 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 1102 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (widget != NULL); -#line 1104 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = widget; -#line 1104 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = gtk_check_menu_item_get_active (_tmp0_); -#line 1104 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = _tmp1_; -#line 1104 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp2_) { -#line 1105 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_set_crop (self, "4x6"); -#line 5106 "ui.c" - } -} - - -static void _user_interface_four_by_six_menuitem_toggled_cb_gtk_check_menu_item_toggled (GtkCheckMenuItem* _sender, gpointer self) { -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_four_by_six_menuitem_toggled_cb ((UserInterface*) self, _sender); -#line 5114 "ui.c" -} - - -static void user_interface_legal_menuitem_toggled_cb (UserInterface* self, GtkCheckMenuItem* widget) { - GtkCheckMenuItem* _tmp0_ = NULL; - gboolean _tmp1_ = FALSE; - gboolean _tmp2_ = FALSE; -#line 1109 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 1109 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (widget != NULL); -#line 1111 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = widget; -#line 1111 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = gtk_check_menu_item_get_active (_tmp0_); -#line 1111 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = _tmp1_; -#line 1111 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp2_) { -#line 1112 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_set_crop (self, "legal"); -#line 5136 "ui.c" - } -} - - -static void _user_interface_legal_menuitem_toggled_cb_gtk_check_menu_item_toggled (GtkCheckMenuItem* _sender, gpointer self) { -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_legal_menuitem_toggled_cb ((UserInterface*) self, _sender); -#line 5144 "ui.c" -} - - -static void user_interface_letter_menuitem_toggled_cb (UserInterface* self, GtkCheckMenuItem* widget) { - GtkCheckMenuItem* _tmp0_ = NULL; - gboolean _tmp1_ = FALSE; - gboolean _tmp2_ = FALSE; -#line 1116 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 1116 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (widget != NULL); -#line 1118 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = widget; -#line 1118 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = gtk_check_menu_item_get_active (_tmp0_); -#line 1118 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = _tmp1_; -#line 1118 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp2_) { -#line 1119 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_set_crop (self, "letter"); -#line 5166 "ui.c" - } -} - - -static void _user_interface_letter_menuitem_toggled_cb_gtk_check_menu_item_toggled (GtkCheckMenuItem* _sender, gpointer self) { -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_letter_menuitem_toggled_cb ((UserInterface*) self, _sender); -#line 5174 "ui.c" -} - - -static void user_interface_a6_menuitem_toggled_cb (UserInterface* self, GtkCheckMenuItem* widget) { - GtkCheckMenuItem* _tmp0_ = NULL; - gboolean _tmp1_ = FALSE; - gboolean _tmp2_ = FALSE; -#line 1123 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 1123 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (widget != NULL); -#line 1125 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = widget; -#line 1125 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = gtk_check_menu_item_get_active (_tmp0_); -#line 1125 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = _tmp1_; -#line 1125 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp2_) { -#line 1126 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_set_crop (self, "A6"); -#line 5196 "ui.c" - } -} - - -static void _user_interface_a6_menuitem_toggled_cb_gtk_check_menu_item_toggled (GtkCheckMenuItem* _sender, gpointer self) { -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_a6_menuitem_toggled_cb ((UserInterface*) self, _sender); -#line 5204 "ui.c" -} - - -static void user_interface_a5_menuitem_toggled_cb (UserInterface* self, GtkCheckMenuItem* widget) { - GtkCheckMenuItem* _tmp0_ = NULL; - gboolean _tmp1_ = FALSE; - gboolean _tmp2_ = FALSE; -#line 1130 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 1130 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (widget != NULL); -#line 1132 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = widget; -#line 1132 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = gtk_check_menu_item_get_active (_tmp0_); -#line 1132 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = _tmp1_; -#line 1132 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp2_) { -#line 1133 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_set_crop (self, "A5"); -#line 5226 "ui.c" - } -} - - -static void _user_interface_a5_menuitem_toggled_cb_gtk_check_menu_item_toggled (GtkCheckMenuItem* _sender, gpointer self) { -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_a5_menuitem_toggled_cb ((UserInterface*) self, _sender); -#line 5234 "ui.c" -} - - -static void user_interface_a4_menuitem_toggled_cb (UserInterface* self, GtkCheckMenuItem* widget) { - GtkCheckMenuItem* _tmp0_ = NULL; - gboolean _tmp1_ = FALSE; - gboolean _tmp2_ = FALSE; -#line 1137 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 1137 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (widget != NULL); -#line 1139 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = widget; -#line 1139 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = gtk_check_menu_item_get_active (_tmp0_); -#line 1139 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = _tmp1_; -#line 1139 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp2_) { -#line 1140 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_set_crop (self, "A4"); -#line 5256 "ui.c" - } -} - - -static void _user_interface_a4_menuitem_toggled_cb_gtk_check_menu_item_toggled (GtkCheckMenuItem* _sender, gpointer self) { -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_a4_menuitem_toggled_cb ((UserInterface*) self, _sender); -#line 5264 "ui.c" -} - - -static void user_interface_crop_rotate_menuitem_activate_cb (UserInterface* self, GtkWidget* widget) { - Page* page = NULL; - BookView* _tmp0_ = NULL; - Page* _tmp1_ = NULL; - Page* _tmp2_ = NULL; - Page* _tmp3_ = NULL; - Page* _tmp4_ = NULL; - Page* _tmp5_ = NULL; -#line 1144 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 1144 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (widget != NULL); -#line 1146 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = self->priv->book_view; -#line 1146 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = book_view_get_selected_page (_tmp0_); -#line 1146 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = _tmp1_; -#line 1146 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = _page_ref0 (_tmp2_); -#line 1146 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - page = _tmp3_; -#line 1147 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp4_ = page; -#line 1147 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp4_ == NULL) { -#line 1148 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _page_unref0 (page); -#line 1148 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return; -#line 5298 "ui.c" - } -#line 1149 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp5_ = page; -#line 1149 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - page_rotate_crop (_tmp5_); -#line 1144 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _page_unref0 (page); -#line 5306 "ui.c" -} - - -static void _user_interface_crop_rotate_menuitem_activate_cb_gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_crop_rotate_menuitem_activate_cb ((UserInterface*) self, _sender); -#line 5313 "ui.c" -} - - -static void user_interface_page_move_left_menuitem_activate_cb (UserInterface* self, GtkWidget* widget) { - Page* page = NULL; - BookView* _tmp0_ = NULL; - Page* _tmp1_ = NULL; - Page* _tmp2_ = NULL; - Page* _tmp3_ = NULL; - guint index = 0U; - Book* _tmp4_ = NULL; - Page* _tmp5_ = NULL; - guint _tmp6_ = 0U; - guint _tmp7_ = 0U; -#line 1153 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 1153 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (widget != NULL); -#line 1155 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = self->priv->book_view; -#line 1155 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = book_view_get_selected_page (_tmp0_); -#line 1155 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = _tmp1_; -#line 1155 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = _page_ref0 (_tmp2_); -#line 1155 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - page = _tmp3_; -#line 1156 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp4_ = self->priv->_book; -#line 1156 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp5_ = page; -#line 1156 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp6_ = book_get_page_index (_tmp4_, _tmp5_); -#line 1156 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - index = _tmp6_; -#line 1157 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp7_ = index; -#line 1157 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp7_ > ((guint) 0)) { -#line 5354 "ui.c" - Book* _tmp8_ = NULL; - Page* _tmp9_ = NULL; - guint _tmp10_ = 0U; -#line 1158 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp8_ = self->priv->_book; -#line 1158 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp9_ = page; -#line 1158 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp10_ = index; -#line 1158 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - book_move_page (_tmp8_, _tmp9_, _tmp10_ - 1); -#line 5366 "ui.c" - } -#line 1153 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _page_unref0 (page); -#line 5370 "ui.c" -} - - -static void _user_interface_page_move_left_menuitem_activate_cb_gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_page_move_left_menuitem_activate_cb ((UserInterface*) self, _sender); -#line 5377 "ui.c" -} - - -static void user_interface_page_move_right_menuitem_activate_cb (UserInterface* self, GtkWidget* widget) { - Page* page = NULL; - BookView* _tmp0_ = NULL; - Page* _tmp1_ = NULL; - Page* _tmp2_ = NULL; - Page* _tmp3_ = NULL; - guint index = 0U; - Book* _tmp4_ = NULL; - Page* _tmp5_ = NULL; - guint _tmp6_ = 0U; - guint _tmp7_ = 0U; - Book* _tmp8_ = NULL; - guint _tmp9_ = 0U; - guint _tmp10_ = 0U; -#line 1162 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 1162 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (widget != NULL); -#line 1164 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = self->priv->book_view; -#line 1164 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = book_view_get_selected_page (_tmp0_); -#line 1164 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = _tmp1_; -#line 1164 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = _page_ref0 (_tmp2_); -#line 1164 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - page = _tmp3_; -#line 1165 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp4_ = self->priv->_book; -#line 1165 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp5_ = page; -#line 1165 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp6_ = book_get_page_index (_tmp4_, _tmp5_); -#line 1165 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - index = _tmp6_; -#line 1166 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp7_ = index; -#line 1166 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp8_ = self->priv->_book; -#line 1166 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp9_ = book_get_n_pages (_tmp8_); -#line 1166 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp10_ = _tmp9_; -#line 1166 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp7_ < (_tmp10_ - 1)) { -#line 5427 "ui.c" - Book* _tmp11_ = NULL; - Page* _tmp12_ = NULL; - Book* _tmp13_ = NULL; - Page* _tmp14_ = NULL; - guint _tmp15_ = 0U; -#line 1167 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp11_ = self->priv->_book; -#line 1167 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp12_ = page; -#line 1167 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp13_ = self->priv->_book; -#line 1167 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp14_ = page; -#line 1167 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp15_ = book_get_page_index (_tmp13_, _tmp14_); -#line 1167 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - book_move_page (_tmp11_, _tmp12_, _tmp15_ + 1); -#line 5445 "ui.c" - } -#line 1162 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _page_unref0 (page); -#line 5449 "ui.c" -} - - -static void _user_interface_page_move_right_menuitem_activate_cb_gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_page_move_right_menuitem_activate_cb ((UserInterface*) self, _sender); -#line 5456 "ui.c" -} - - -static void user_interface_page_delete_menuitem_activate_cb (UserInterface* self, GtkWidget* widget) { - BookView* _tmp0_ = NULL; - Book* _tmp1_ = NULL; - Book* _tmp2_ = NULL; - BookView* _tmp3_ = NULL; - Page* _tmp4_ = NULL; - Page* _tmp5_ = NULL; -#line 1171 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 1171 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (widget != NULL); -#line 1173 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = self->priv->book_view; -#line 1173 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = book_view_get_book (_tmp0_); -#line 1173 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = _tmp1_; -#line 1173 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = self->priv->book_view; -#line 1173 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp4_ = book_view_get_selected_page (_tmp3_); -#line 1173 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp5_ = _tmp4_; -#line 1173 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - book_delete_page (_tmp2_, _tmp5_); -#line 5485 "ui.c" -} - - -static void _user_interface_page_delete_menuitem_activate_cb_gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_page_delete_menuitem_activate_cb ((UserInterface*) self, _sender); -#line 5492 "ui.c" -} - - -static Block2Data* block2_data_ref (Block2Data* _data2_) { -#line 1176 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_atomic_int_inc (&_data2_->_ref_count_); -#line 1176 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return _data2_; -#line 5501 "ui.c" -} - - -static void block2_data_unref (void * _userdata_) { - Block2Data* _data2_; - _data2_ = (Block2Data*) _userdata_; -#line 1176 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (g_atomic_int_dec_and_test (&_data2_->_ref_count_)) { -#line 5510 "ui.c" - UserInterface* self; -#line 1176 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self = _data2_->self; -#line 1176 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (_data2_->dialog); -#line 1176 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self); -#line 1176 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_slice_free (Block2Data, _data2_); -#line 5520 "ui.c" - } -} - - -static gboolean __lambda6_ (Block2Data* _data2_, GdkEventKey* e) { - UserInterface* self; - gboolean result = FALSE; - gboolean _tmp0_ = FALSE; - GdkEventKey* _tmp1_ = NULL; - GdkModifierType _tmp2_ = 0; -#line 1185 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self = _data2_->self; -#line 1185 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_val_if_fail (e != NULL, FALSE); -#line 1187 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = e; -#line 1187 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = _tmp1_->state; -#line 1187 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp2_ == 0) { -#line 5541 "ui.c" - GdkEventKey* _tmp3_ = NULL; - guint _tmp4_ = 0U; -#line 1187 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = e; -#line 1187 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp4_ = _tmp3_->keyval; -#line 1187 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = _tmp4_ == ((guint) GDK_KEY_Escape); -#line 5550 "ui.c" - } else { -#line 1187 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = FALSE; -#line 5554 "ui.c" - } -#line 1187 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp0_) { -#line 1189 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_destroy ((GtkWidget*) _data2_->dialog); -#line 1190 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - result = TRUE; -#line 1190 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return result; -#line 5564 "ui.c" - } -#line 1193 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - result = FALSE; -#line 1193 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return result; -#line 5570 "ui.c" -} - - -static gboolean ___lambda6__gtk_widget_key_press_event (GtkWidget* _sender, GdkEventKey* event, gpointer self) { - gboolean result; - result = __lambda6_ (self, event); -#line 1185 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return result; -#line 5579 "ui.c" -} - - -static void __lambda7_ (Block2Data* _data2_) { - UserInterface* self; - Book* _tmp0_ = NULL; -#line 1207 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self = _data2_->self; -#line 1209 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = self->priv->_book; -#line 1209 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - book_combine_sides (_tmp0_); -#line 1210 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_destroy ((GtkWidget*) _data2_->dialog); -#line 5594 "ui.c" -} - - -static void ___lambda7__gtk_button_clicked (GtkButton* _sender, gpointer self) { -#line 1207 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - __lambda7_ (self); -#line 5601 "ui.c" -} - - -static void __lambda8_ (Block2Data* _data2_) { - UserInterface* self; - Book* _tmp0_ = NULL; -#line 1217 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self = _data2_->self; -#line 1219 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = self->priv->_book; -#line 1219 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - book_combine_sides_reverse (_tmp0_); -#line 1220 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_destroy ((GtkWidget*) _data2_->dialog); -#line 5616 "ui.c" -} - - -static void ___lambda8__gtk_button_clicked (GtkButton* _sender, gpointer self) { -#line 1217 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - __lambda8_ (self); -#line 5623 "ui.c" -} - - -static void __lambda9_ (Block2Data* _data2_) { - UserInterface* self; - Book* _tmp0_ = NULL; -#line 1227 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self = _data2_->self; -#line 1229 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = self->priv->_book; -#line 1229 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - book_reverse (_tmp0_); -#line 1230 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_destroy ((GtkWidget*) _data2_->dialog); -#line 5638 "ui.c" -} - - -static void ___lambda9__gtk_button_clicked (GtkButton* _sender, gpointer self) { -#line 1227 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - __lambda9_ (self); -#line 5645 "ui.c" -} - - -static void __lambda10_ (Block2Data* _data2_) { - UserInterface* self; -#line 1237 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self = _data2_->self; -#line 1239 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_destroy ((GtkWidget*) _data2_->dialog); -#line 5655 "ui.c" -} - - -static void ___lambda10__gtk_button_clicked (GtkButton* _sender, gpointer self) { -#line 1237 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - __lambda10_ (self); -#line 5662 "ui.c" -} - - -static void user_interface_reorder_document (UserInterface* self) { - Block2Data* _data2_; - GtkWindow* _tmp0_ = NULL; - const gchar* _tmp1_ = NULL; - GtkGrid* g = NULL; - GtkGrid* _tmp2_ = NULL; - GtkButton* b = NULL; - const gchar* _tmp3_ = NULL; - GtkButton* _tmp4_ = NULL; - GtkButton* _tmp5_ = NULL; - GtkButton* _tmp6_ = NULL; - GtkButton* _tmp7_ = NULL; - const gchar* _tmp8_ = NULL; - GtkButton* _tmp9_ = NULL; - GtkButton* _tmp10_ = NULL; - GtkButton* _tmp11_ = NULL; - GtkButton* _tmp12_ = NULL; - const gchar* _tmp13_ = NULL; - GtkButton* _tmp14_ = NULL; - GtkButton* _tmp15_ = NULL; - GtkButton* _tmp16_ = NULL; - GtkButton* _tmp17_ = NULL; - const gchar* _tmp18_ = NULL; - GtkButton* _tmp19_ = NULL; - GtkButton* _tmp20_ = NULL; - GtkButton* _tmp21_ = NULL; - GtkButton* _tmp22_ = NULL; -#line 1176 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 1176 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data2_ = g_slice_new0 (Block2Data); -#line 1176 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data2_->_ref_count_ = 1; -#line 1176 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data2_->self = g_object_ref (self); -#line 1178 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = (GtkWindow*) gtk_window_new (GTK_WINDOW_TOPLEVEL); -#line 1178 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_object_ref_sink (_tmp0_); -#line 1178 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data2_->dialog = _tmp0_; -#line 1179 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_window_set_type_hint (_data2_->dialog, GDK_WINDOW_TYPE_HINT_DIALOG); -#line 1180 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_window_set_modal (_data2_->dialog, TRUE); -#line 1181 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_container_set_border_width ((GtkContainer*) _data2_->dialog, (guint) 12); -#line 1183 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = _ ("Reorder Pages"); -#line 1183 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_window_set_title (_data2_->dialog, _tmp1_); -#line 1184 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_window_set_transient_for (_data2_->dialog, (GtkWindow*) self); -#line 1185 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_signal_connect_data ((GtkWidget*) _data2_->dialog, "key-press-event", (GCallback) ___lambda6__gtk_widget_key_press_event, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0); -#line 1195 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_set_visible ((GtkWidget*) _data2_->dialog, TRUE); -#line 1197 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = (GtkGrid*) gtk_grid_new (); -#line 1197 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_object_ref_sink (_tmp2_); -#line 1197 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g = _tmp2_; -#line 1198 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_grid_set_row_homogeneous (g, TRUE); -#line 1199 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_grid_set_row_spacing (g, 6); -#line 1200 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_grid_set_column_homogeneous (g, TRUE); -#line 1201 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_grid_set_column_spacing (g, 6); -#line 1202 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_set_visible ((GtkWidget*) g, TRUE); -#line 1203 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_container_add ((GtkContainer*) _data2_->dialog, (GtkWidget*) g); -#line 1206 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = _ ("Combine sides"); -#line 1206 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp4_ = user_interface_make_reorder_button (self, _tmp3_, "F1F2F3B1B2B3-F1B1F2B2F3B3"); -#line 1206 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - b = _tmp4_; -#line 1207 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp5_ = b; -#line 1207 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_signal_connect_data (_tmp5_, "clicked", (GCallback) ___lambda7__gtk_button_clicked, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0); -#line 1212 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp6_ = b; -#line 1212 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_set_visible ((GtkWidget*) _tmp6_, TRUE); -#line 1213 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp7_ = b; -#line 1213 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_grid_attach (g, (GtkWidget*) _tmp7_, 0, 0, 1, 1); -#line 1216 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp8_ = _ ("Combine sides (reverse)"); -#line 1216 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp9_ = user_interface_make_reorder_button (self, _tmp8_, "F1F2F3B3B2B1-F1B1F2B2F3B3"); -#line 1216 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (b); -#line 1216 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - b = _tmp9_; -#line 1217 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp10_ = b; -#line 1217 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_signal_connect_data (_tmp10_, "clicked", (GCallback) ___lambda8__gtk_button_clicked, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0); -#line 1222 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp11_ = b; -#line 1222 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_set_visible ((GtkWidget*) _tmp11_, TRUE); -#line 1223 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp12_ = b; -#line 1223 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_grid_attach (g, (GtkWidget*) _tmp12_, 1, 0, 1, 1); -#line 1226 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp13_ = _ ("Reverse"); -#line 1226 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp14_ = user_interface_make_reorder_button (self, _tmp13_, "C1C2C3C4C5C6-C6C5C4C3C2C1"); -#line 1226 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (b); -#line 1226 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - b = _tmp14_; -#line 1227 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp15_ = b; -#line 1227 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_signal_connect_data (_tmp15_, "clicked", (GCallback) ___lambda9__gtk_button_clicked, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0); -#line 1232 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp16_ = b; -#line 1232 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_set_visible ((GtkWidget*) _tmp16_, TRUE); -#line 1233 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp17_ = b; -#line 1233 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_grid_attach (g, (GtkWidget*) _tmp17_, 0, 2, 1, 1); -#line 1236 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp18_ = _ ("Keep unchanged"); -#line 1236 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp19_ = user_interface_make_reorder_button (self, _tmp18_, "C1C2C3C4C5C6-C1C2C3C4C5C6"); -#line 1236 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (b); -#line 1236 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - b = _tmp19_; -#line 1237 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp20_ = b; -#line 1237 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_signal_connect_data (_tmp20_, "clicked", (GCallback) ___lambda10__gtk_button_clicked, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0); -#line 1241 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp21_ = b; -#line 1241 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_set_visible ((GtkWidget*) _tmp21_, TRUE); -#line 1242 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp22_ = b; -#line 1242 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_grid_attach (g, (GtkWidget*) _tmp22_, 1, 2, 1, 1); -#line 1244 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_window_present (_data2_->dialog); -#line 1176 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (b); -#line 1176 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (g); -#line 1176 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - block2_data_unref (_data2_); -#line 1176 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data2_ = NULL; -#line 5829 "ui.c" -} - - -void user_interface_reorder_document_activate_cb (UserInterface* self) { -#line 1247 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 1249 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_reorder_document (self); -#line 5838 "ui.c" -} - - -static void user_interface_reorder_menuitem_activate_cb (UserInterface* self, GtkWidget* widget) { -#line 1253 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 1253 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (widget != NULL); -#line 1255 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_reorder_document (self); -#line 5849 "ui.c" -} - - -static void _user_interface_reorder_menuitem_activate_cb_gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_reorder_menuitem_activate_cb ((UserInterface*) self, _sender); -#line 5856 "ui.c" -} - - -static GtkButton* user_interface_make_reorder_button (UserInterface* self, const gchar* text, const gchar* items) { - GtkButton* result = NULL; - GtkButton* b = NULL; - GtkButton* _tmp0_ = NULL; - GtkBox* vbox = NULL; - GtkBox* _tmp1_ = NULL; - GtkLabel* label = NULL; - const gchar* _tmp2_ = NULL; - GtkLabel* _tmp3_ = NULL; - GtkBox* rb = NULL; - const gchar* _tmp4_ = NULL; - GtkBox* _tmp5_ = NULL; -#line 1258 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_val_if_fail (self != NULL, NULL); -#line 1258 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_val_if_fail (text != NULL, NULL); -#line 1258 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_val_if_fail (items != NULL, NULL); -#line 1260 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = (GtkButton*) gtk_button_new (); -#line 1260 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_object_ref_sink (_tmp0_); -#line 1260 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - b = _tmp0_; -#line 1262 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 6); -#line 1262 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_object_ref_sink (_tmp1_); -#line 1262 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - vbox = _tmp1_; -#line 1263 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_set_visible ((GtkWidget*) vbox, TRUE); -#line 1264 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_container_add ((GtkContainer*) b, (GtkWidget*) vbox); -#line 1266 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = text; -#line 1266 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = (GtkLabel*) gtk_label_new (_tmp2_); -#line 1266 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_object_ref_sink (_tmp3_); -#line 1266 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - label = _tmp3_; -#line 1267 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_set_visible ((GtkWidget*) label, TRUE); -#line 1268 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_box_pack_start (vbox, (GtkWidget*) label, TRUE, TRUE, (guint) 0); -#line 1270 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp4_ = items; -#line 1270 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp5_ = user_interface_make_reorder_box (self, _tmp4_); -#line 1270 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - rb = _tmp5_; -#line 1271 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_set_visible ((GtkWidget*) rb, TRUE); -#line 1272 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_box_pack_start (vbox, (GtkWidget*) rb, TRUE, TRUE, (guint) 0); -#line 1274 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - result = b; -#line 1274 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (rb); -#line 1274 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (label); -#line 1274 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (vbox); -#line 1274 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return result; -#line 5926 "ui.c" -} - - -static gchar string_get (const gchar* self, glong index) { - gchar result = '\0'; - glong _tmp0_ = 0L; - gchar _tmp1_ = '\0'; -#line 1086 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" - g_return_val_if_fail (self != NULL, '\0'); -#line 1087 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" - _tmp0_ = index; -#line 1087 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" - _tmp1_ = ((gchar*) self)[_tmp0_]; -#line 1087 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" - result = _tmp1_; -#line 1087 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" - return result; -#line 5944 "ui.c" -} - - -static GtkBox* user_interface_make_reorder_box (UserInterface* self, const gchar* items) { - GtkBox* result = NULL; - GtkBox* box = NULL; - GtkBox* _tmp0_ = NULL; - GtkBox* _tmp1_ = NULL; - GtkBox* page_box = NULL; -#line 1277 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_val_if_fail (self != NULL, NULL); -#line 1277 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_val_if_fail (items != NULL, NULL); -#line 1279 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6); -#line 1279 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_object_ref_sink (_tmp0_); -#line 1279 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - box = _tmp0_; -#line 1280 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = box; -#line 1280 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_set_visible ((GtkWidget*) _tmp1_, TRUE); -#line 1282 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - page_box = NULL; -#line 5970 "ui.c" - { - gint i = 0; -#line 1283 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - i = 0; -#line 5975 "ui.c" - { - gboolean _tmp2_ = FALSE; -#line 1283 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = TRUE; -#line 1283 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - while (TRUE) { -#line 5982 "ui.c" - const gchar* _tmp4_ = NULL; - gint _tmp5_ = 0; - gchar _tmp6_ = '\0'; - const gchar* _tmp7_ = NULL; - gint _tmp8_ = 0; - gchar _tmp9_ = '\0'; - gchar side = '\0'; - const gchar* _tmp14_ = NULL; - gint _tmp15_ = 0; - gchar _tmp16_ = '\0'; - gint _tmp17_ = 0; - const gchar* _tmp18_ = NULL; - gint _tmp19_ = 0; - gchar _tmp20_ = '\0'; - GtkBox* _tmp21_ = NULL; - gdouble r = 0.0; - gdouble g = 0.0; - gdouble b = 0.0; - gchar _tmp26_ = '\0'; - gdouble _tmp33_ = 0.0; - gdouble _tmp34_ = 0.0; - gdouble _tmp35_ = 0.0; - gdouble _tmp36_ = 0.0; - gdouble _tmp37_ = 0.0; - gdouble _tmp38_ = 0.0; - PageIcon* icon = NULL; - const gchar* _tmp39_ = NULL; - gint _tmp40_ = 0; - gchar _tmp41_ = '\0'; - gchar* _tmp42_ = NULL; - gchar* _tmp43_ = NULL; - gdouble _tmp44_ = 0.0; - gdouble _tmp45_ = 0.0; - gdouble _tmp46_ = 0.0; - PageIcon* _tmp47_ = NULL; - PageIcon* _tmp48_ = NULL; - PageIcon* _tmp49_ = NULL; - GtkBox* _tmp50_ = NULL; - PageIcon* _tmp51_ = NULL; -#line 1283 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (!_tmp2_) { -#line 6024 "ui.c" - gint _tmp3_ = 0; -#line 1283 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = i; -#line 1283 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - i = _tmp3_ + 1; -#line 6030 "ui.c" - } -#line 1283 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = FALSE; -#line 1283 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp4_ = items; -#line 1283 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp5_ = i; -#line 1283 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp6_ = string_get (_tmp4_, (glong) _tmp5_); -#line 1283 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (!(_tmp6_ != '\0')) { -#line 1283 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - break; -#line 6044 "ui.c" - } -#line 1285 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp7_ = items; -#line 1285 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp8_ = i; -#line 1285 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp9_ = string_get (_tmp7_, (glong) _tmp8_); -#line 1285 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp9_ == '-') { -#line 6054 "ui.c" - GtkArrow* a = NULL; - GtkArrow* _tmp10_ = NULL; - GtkArrow* _tmp11_ = NULL; - GtkBox* _tmp12_ = NULL; - GtkArrow* _tmp13_ = NULL; -#line 1287 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp10_ = (GtkArrow*) gtk_arrow_new (GTK_ARROW_RIGHT, GTK_SHADOW_NONE); -#line 1287 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_object_ref_sink (_tmp10_); -#line 1287 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - a = _tmp10_; -#line 1288 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp11_ = a; -#line 1288 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_set_visible ((GtkWidget*) _tmp11_, TRUE); -#line 1289 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp12_ = box; -#line 1289 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp13_ = a; -#line 1289 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_box_pack_start (_tmp12_, (GtkWidget*) _tmp13_, FALSE, FALSE, (guint) 0); -#line 1290 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (page_box); -#line 1290 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - page_box = NULL; -#line 1291 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (a); -#line 1291 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - continue; -#line 6084 "ui.c" - } -#line 1295 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp14_ = items; -#line 1295 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp15_ = i; -#line 1295 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp16_ = string_get (_tmp14_, (glong) _tmp15_); -#line 1295 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - side = _tmp16_; -#line 1296 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp17_ = i; -#line 1296 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - i = _tmp17_ + 1; -#line 1297 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp18_ = items; -#line 1297 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp19_ = i; -#line 1297 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp20_ = string_get (_tmp18_, (glong) _tmp19_); -#line 1297 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp20_ == '\0') { -#line 1298 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - break; -#line 6108 "ui.c" - } -#line 1300 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp21_ = page_box; -#line 1300 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp21_ == NULL) { -#line 6114 "ui.c" - GtkBox* _tmp22_ = NULL; - GtkBox* _tmp23_ = NULL; - GtkBox* _tmp24_ = NULL; - GtkBox* _tmp25_ = NULL; -#line 1302 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp22_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 3); -#line 1302 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_object_ref_sink (_tmp22_); -#line 1302 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (page_box); -#line 1302 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - page_box = _tmp22_; -#line 1303 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp23_ = page_box; -#line 1303 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_set_visible ((GtkWidget*) _tmp23_, TRUE); -#line 1304 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp24_ = box; -#line 1304 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp25_ = page_box; -#line 1304 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_box_pack_start (_tmp24_, (GtkWidget*) _tmp25_, FALSE, FALSE, (guint) 0); -#line 6137 "ui.c" - } -#line 1308 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - r = 1.0; -#line 1309 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g = 1.0; -#line 1310 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - b = 1.0; -#line 1311 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp26_ = side; -#line 1311 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - switch (_tmp26_) { -#line 1311 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - case 'F': -#line 6151 "ui.c" - { -#line 1315 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - r = 0x75 / 255.0; -#line 1316 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g = 0x50 / 255.0; -#line 1317 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - b = 0x7B / 255.0; -#line 1318 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - break; -#line 6161 "ui.c" - } -#line 1311 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - case 'B': -#line 6165 "ui.c" - { -#line 1321 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - r = 0xF5 / 255.0; -#line 1322 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g = 0x79 / 255.0; -#line 1323 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - b = 0.0; -#line 1324 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - break; -#line 6175 "ui.c" - } -#line 1311 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - case 'C': -#line 6179 "ui.c" - { - gdouble p = 0.0; - const gchar* _tmp27_ = NULL; - gint _tmp28_ = 0; - gchar _tmp29_ = '\0'; - gdouble _tmp30_ = 0.0; - gdouble _tmp31_ = 0.0; - gdouble _tmp32_ = 0.0; -#line 1327 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp27_ = items; -#line 1327 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp28_ = i; -#line 1327 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp29_ = string_get (_tmp27_, (glong) _tmp28_); -#line 1327 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - p = (_tmp29_ - '1') / 5.0; -#line 1328 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp30_ = p; -#line 1328 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp31_ = p; -#line 1328 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - r = ((0xED / 255.0) * (1 - _tmp30_)) + (0xCC * _tmp31_); -#line 1329 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp32_ = p; -#line 1329 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g = (0xD4 / 255.0) * (1 - _tmp32_); -#line 1330 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - b = (gdouble) 0; -#line 1331 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - break; -#line 6210 "ui.c" - } - default: -#line 1311 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - break; -#line 6215 "ui.c" - } -#line 1335 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp33_ = r; -#line 1335 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp34_ = r; -#line 1335 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - r = _tmp33_ + ((1.0 - _tmp34_) * 0.7); -#line 1336 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp35_ = g; -#line 1336 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp36_ = g; -#line 1336 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g = _tmp35_ + ((1.0 - _tmp36_) * 0.7); -#line 1337 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp37_ = b; -#line 1337 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp38_ = b; -#line 1337 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - b = _tmp37_ + ((1.0 - _tmp38_) * 0.7); -#line 1339 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp39_ = items; -#line 1339 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp40_ = i; -#line 1339 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp41_ = string_get (_tmp39_, (glong) _tmp40_); -#line 1339 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp42_ = g_strdup_printf ("%c", (gint) _tmp41_); -#line 1339 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp43_ = _tmp42_; -#line 1339 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp44_ = r; -#line 1339 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp45_ = g; -#line 1339 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp46_ = b; -#line 1339 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp47_ = page_icon_new (_tmp43_, _tmp44_, _tmp45_, _tmp46_); -#line 1339 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_object_ref_sink (_tmp47_); -#line 1339 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp48_ = _tmp47_; -#line 1339 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (_tmp43_); -#line 1339 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - icon = _tmp48_; -#line 1340 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp49_ = icon; -#line 1340 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_set_visible ((GtkWidget*) _tmp49_, TRUE); -#line 1341 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp50_ = page_box; -#line 1341 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp51_ = icon; -#line 1341 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_box_pack_start (_tmp50_, (GtkWidget*) _tmp51_, FALSE, FALSE, (guint) 0); -#line 1283 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (icon); -#line 6273 "ui.c" - } - } - } -#line 1344 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - result = box; -#line 1344 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (page_box); -#line 1344 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return result; -#line 6283 "ui.c" -} - - -static void user_interface_save_file_button_clicked_cb (UserInterface* self, GtkWidget* widget) { -#line 1348 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 1348 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (widget != NULL); -#line 1350 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_save_document (self, FALSE); -#line 6294 "ui.c" -} - - -static void _user_interface_save_file_button_clicked_cb_gtk_button_clicked (GtkButton* _sender, gpointer self) { -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_save_file_button_clicked_cb ((UserInterface*) self, _sender); -#line 6301 "ui.c" -} - - -void user_interface_save_document_activate_cb (UserInterface* self) { -#line 1353 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 1355 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_save_document (self, FALSE); -#line 6310 "ui.c" -} - - -static void user_interface_copy_to_clipboard_button_clicked_cb (UserInterface* self, GtkWidget* widget) { - Page* page = NULL; - BookView* _tmp0_ = NULL; - Page* _tmp1_ = NULL; - Page* _tmp2_ = NULL; - Page* _tmp3_ = NULL; - Page* _tmp4_ = NULL; -#line 1359 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 1359 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (widget != NULL); -#line 1361 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = self->priv->book_view; -#line 1361 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = book_view_get_selected_page (_tmp0_); -#line 1361 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = _tmp1_; -#line 1361 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = _page_ref0 (_tmp2_); -#line 1361 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - page = _tmp3_; -#line 1362 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp4_ = page; -#line 1362 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp4_ != NULL) { -#line 6339 "ui.c" - Page* _tmp5_ = NULL; -#line 1363 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp5_ = page; -#line 1363 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - page_copy_to_clipboard (_tmp5_, (GtkWindow*) self); -#line 6345 "ui.c" - } -#line 1359 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _page_unref0 (page); -#line 6349 "ui.c" -} - - -static void _user_interface_copy_to_clipboard_button_clicked_cb_gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_copy_to_clipboard_button_clicked_cb ((UserInterface*) self, _sender); -#line 6356 "ui.c" -} - - -static void user_interface_save_as_file_button_clicked_cb (UserInterface* self, GtkWidget* widget) { -#line 1367 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 1367 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (widget != NULL); -#line 1369 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_save_document (self, TRUE); -#line 6367 "ui.c" -} - - -static void _user_interface_save_as_file_button_clicked_cb_gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_save_as_file_button_clicked_cb ((UserInterface*) self, _sender); -#line 6374 "ui.c" -} - - -void user_interface_save_as_document_activate_cb (UserInterface* self) { -#line 1372 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 1374 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_save_document (self, TRUE); -#line 6383 "ui.c" -} - - -static gpointer _cairo_reference0 (gpointer self) { -#line 1381 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return self ? cairo_reference (self) : NULL; -#line 6390 "ui.c" -} - - -static void user_interface_draw_page (UserInterface* self, GtkPrintOperation* operation, GtkPrintContext* print_context, gint page_number) { - cairo_t* context = NULL; - GtkPrintContext* _tmp0_ = NULL; - cairo_t* _tmp1_ = NULL; - cairo_t* _tmp2_ = NULL; - Page* page = NULL; - Book* _tmp3_ = NULL; - gint _tmp4_ = 0; - Page* _tmp5_ = NULL; - gboolean is_landscape = FALSE; - GtkPrintContext* _tmp6_ = NULL; - gdouble _tmp7_ = 0.0; - GtkPrintContext* _tmp8_ = NULL; - gdouble _tmp9_ = 0.0; - Page* _tmp10_ = NULL; - gboolean _tmp11_ = FALSE; - gboolean _tmp12_ = FALSE; - gboolean _tmp13_ = FALSE; - cairo_t* _tmp18_ = NULL; - GtkPrintContext* _tmp19_ = NULL; - gdouble _tmp20_ = 0.0; - Page* _tmp21_ = NULL; - gint _tmp22_ = 0; - gint _tmp23_ = 0; - GtkPrintContext* _tmp24_ = NULL; - gdouble _tmp25_ = 0.0; - Page* _tmp26_ = NULL; - gint _tmp27_ = 0; - gint _tmp28_ = 0; - GdkPixbuf* image = NULL; - Page* _tmp29_ = NULL; - GdkPixbuf* _tmp30_ = NULL; - cairo_t* _tmp31_ = NULL; - cairo_t* _tmp32_ = NULL; -#line 1377 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 1377 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (operation != NULL); -#line 1377 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (print_context != NULL); -#line 1381 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = print_context; -#line 1381 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = gtk_print_context_get_cairo_context (_tmp0_); -#line 1381 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = _cairo_reference0 (_tmp1_); -#line 1381 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - context = _tmp2_; -#line 1382 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = self->priv->_book; -#line 1382 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp4_ = page_number; -#line 1382 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp5_ = book_get_page (_tmp3_, _tmp4_); -#line 1382 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - page = _tmp5_; -#line 1385 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - is_landscape = FALSE; -#line 1386 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp6_ = print_context; -#line 1386 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp7_ = gtk_print_context_get_width (_tmp6_); -#line 1386 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp8_ = print_context; -#line 1386 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp9_ = gtk_print_context_get_height (_tmp8_); -#line 1386 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp7_ > _tmp9_) { -#line 1387 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - is_landscape = TRUE; -#line 6464 "ui.c" - } -#line 1388 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp10_ = page; -#line 1388 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp11_ = page_get_is_landscape (_tmp10_); -#line 1388 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp12_ = _tmp11_; -#line 1388 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp13_ = is_landscape; -#line 1388 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp12_ != _tmp13_) { -#line 6476 "ui.c" - cairo_t* _tmp14_ = NULL; - GtkPrintContext* _tmp15_ = NULL; - gdouble _tmp16_ = 0.0; - cairo_t* _tmp17_ = NULL; -#line 1390 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp14_ = context; -#line 1390 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp15_ = print_context; -#line 1390 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp16_ = gtk_print_context_get_width (_tmp15_); -#line 1390 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - cairo_translate (_tmp14_, _tmp16_, (gdouble) 0); -#line 1391 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp17_ = context; -#line 1391 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - cairo_rotate (_tmp17_, G_PI_2); -#line 6493 "ui.c" - } -#line 1394 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp18_ = context; -#line 1394 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp19_ = print_context; -#line 1394 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp20_ = gtk_print_context_get_dpi_x (_tmp19_); -#line 1394 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp21_ = page; -#line 1394 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp22_ = page_get_dpi (_tmp21_); -#line 1394 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp23_ = _tmp22_; -#line 1394 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp24_ = print_context; -#line 1394 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp25_ = gtk_print_context_get_dpi_y (_tmp24_); -#line 1394 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp26_ = page; -#line 1394 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp27_ = page_get_dpi (_tmp26_); -#line 1394 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp28_ = _tmp27_; -#line 1394 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - cairo_scale (_tmp18_, _tmp20_ / _tmp23_, _tmp25_ / _tmp28_); -#line 1397 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp29_ = page; -#line 1397 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp30_ = page_get_image (_tmp29_, TRUE); -#line 1397 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - image = _tmp30_; -#line 1398 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp31_ = context; -#line 1398 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gdk_cairo_set_source_pixbuf (_tmp31_, image, (gdouble) 0, (gdouble) 0); -#line 1399 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp32_ = context; -#line 1399 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - cairo_paint (_tmp32_); -#line 1377 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (image); -#line 1377 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _page_unref0 (page); -#line 1377 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _cairo_destroy0 (context); -#line 6539 "ui.c" -} - - -static void user_interface_email_button_clicked_cb (UserInterface* self, GtkWidget* widget) { - const gchar* _tmp0_ = NULL; - gint _tmp1_ = 0; - gint _tmp2_ = 0; -#line 1403 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 1403 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (widget != NULL); -#line 1405 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = self->priv->document_hint; -#line 1405 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = user_interface_get_quality (self); -#line 1405 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = _tmp1_; -#line 1405 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_signal_emit_by_name (self, "email", _tmp0_, _tmp2_); -#line 6559 "ui.c" -} - - -static void _user_interface_email_button_clicked_cb_gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_email_button_clicked_cb ((UserInterface*) self, _sender); -#line 6566 "ui.c" -} - - -void user_interface_email_document_activate_cb (UserInterface* self) { - const gchar* _tmp0_ = NULL; - gint _tmp1_ = 0; - gint _tmp2_ = 0; -#line 1408 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 1410 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = self->priv->document_hint; -#line 1410 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = user_interface_get_quality (self); -#line 1410 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = _tmp1_; -#line 1410 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_signal_emit_by_name (self, "email", _tmp0_, _tmp2_); -#line 6584 "ui.c" -} - - -static void _user_interface_draw_page_gtk_print_operation_draw_page (GtkPrintOperation* _sender, GtkPrintContext* context, gint page_nr, gpointer self) { -#line 1417 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_draw_page ((UserInterface*) self, _sender, context, page_nr); -#line 6591 "ui.c" -} - - -static void user_interface_print_document (UserInterface* self) { - GtkPrintOperation* print = NULL; - GtkPrintOperation* _tmp0_ = NULL; - Book* _tmp1_ = NULL; - guint _tmp2_ = 0U; - guint _tmp3_ = 0U; - guint _tmp6_ = 0U; - GError * _inner_error_ = NULL; -#line 1413 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 1415 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = gtk_print_operation_new (); -#line 1415 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - print = _tmp0_; -#line 1416 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = self->priv->_book; -#line 1416 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = book_get_n_pages (_tmp1_); -#line 1416 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = _tmp2_; -#line 1416 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_object_set (print, "n-pages", (gint) _tmp3_, NULL); -#line 1417 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_signal_connect_object (print, "draw-page", (GCallback) _user_interface_draw_page_gtk_print_operation_draw_page, self, 0); -#line 6619 "ui.c" - { -#line 1421 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_print_operation_run (print, GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG, (GtkWindow*) self, &_inner_error_); -#line 1421 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 6625 "ui.c" - goto __catch20_g_error; - } - } - goto __finally20; - __catch20_g_error: - { - GError* e = NULL; - GError* _tmp4_ = NULL; - const gchar* _tmp5_ = NULL; -#line 1419 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - e = _inner_error_; -#line 1419 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _inner_error_ = NULL; -#line 1425 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp4_ = e; -#line 1425 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp5_ = _tmp4_->message; -#line 1425 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_warning ("ui.vala:1425: Error printing: %s", _tmp5_); -#line 1419 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_error_free0 (e); -#line 6647 "ui.c" - } - __finally20: -#line 1419 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 1419 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (print); -#line 1419 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - 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); -#line 1419 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_clear_error (&_inner_error_); -#line 1419 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return; -#line 6660 "ui.c" - } -#line 1428 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_signal_parse_name ("draw-page", gtk_print_operation_get_type (), &_tmp6_, NULL, FALSE); -#line 1428 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_signal_handlers_disconnect_matched (print, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp6_, 0, NULL, (GCallback) _user_interface_draw_page_gtk_print_operation_draw_page, self); -#line 1413 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (print); -#line 6668 "ui.c" -} - - -static void user_interface_print_button_clicked_cb (UserInterface* self, GtkWidget* widget) { -#line 1432 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 1432 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (widget != NULL); -#line 1434 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_print_document (self); -#line 6679 "ui.c" -} - - -static void _user_interface_print_button_clicked_cb_gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_print_button_clicked_cb ((UserInterface*) self, _sender); -#line 6686 "ui.c" -} - - -void user_interface_print_document_activate_cb (UserInterface* self) { -#line 1437 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 1439 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_print_document (self); -#line 6695 "ui.c" -} - - -static void user_interface_launch_help (UserInterface* self) { - GError * _inner_error_ = NULL; -#line 1442 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 6703 "ui.c" - { - GdkScreen* _tmp0_ = NULL; - GdkScreen* _tmp1_ = NULL; - guint32 _tmp2_ = 0U; -#line 1446 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = gtk_window_get_screen ((GtkWindow*) self); -#line 1446 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = _tmp0_; -#line 1446 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = gtk_get_current_event_time (); -#line 1446 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_show_uri (_tmp1_, "help:simple-scan", _tmp2_, &_inner_error_); -#line 1446 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 6718 "ui.c" - goto __catch21_g_error; - } - } - goto __finally21; - __catch21_g_error: - { - GError* e = NULL; - const gchar* _tmp3_ = NULL; - GError* _tmp4_ = NULL; - const gchar* _tmp5_ = NULL; -#line 1444 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - e = _inner_error_; -#line 1444 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _inner_error_ = NULL; -#line 1450 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = _ ("Unable to open help file"); -#line 1450 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp4_ = e; -#line 1450 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp5_ = _tmp4_->message; -#line 1450 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_show_error_dialog (self, _tmp3_, _tmp5_); -#line 1444 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_error_free0 (e); -#line 6743 "ui.c" - } - __finally21: -#line 1444 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 1444 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - 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); -#line 1444 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_clear_error (&_inner_error_); -#line 1444 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return; -#line 6754 "ui.c" - } -} - - -static void user_interface_help_contents_menuitem_activate_cb (UserInterface* self, GtkWidget* widget) { -#line 1457 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 1457 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (widget != NULL); -#line 1459 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_launch_help (self); -#line 6766 "ui.c" -} - - -static void _user_interface_help_contents_menuitem_activate_cb_gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_help_contents_menuitem_activate_cb ((UserInterface*) self, _sender); -#line 6773 "ui.c" -} - - -void user_interface_help_contents_activate_cb (UserInterface* self) { -#line 1462 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 1464 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_launch_help (self); -#line 6782 "ui.c" -} - - -static void user_interface_show_about (UserInterface* self) { - gchar** authors = NULL; - gchar* _tmp0_ = NULL; - gchar** _tmp1_ = NULL; - gint authors_length1 = 0; - gint _authors_size_ = 0; - gchar* license = NULL; - const gchar* _tmp2_ = NULL; - gchar* _tmp3_ = NULL; - gchar* title = NULL; - const gchar* _tmp4_ = NULL; - gchar* _tmp5_ = NULL; - gchar* description = NULL; - const gchar* _tmp6_ = NULL; - gchar* _tmp7_ = NULL; - const gchar* _tmp8_ = NULL; -#line 1467 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 1469 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = g_strdup ("Robert Ancell <robert.ancell@canonical.com>"); -#line 1469 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = g_new0 (gchar*, 1 + 1); -#line 1469 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_[0] = _tmp0_; -#line 1469 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - authors = _tmp1_; -#line 1469 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - authors_length1 = 1; -#line 1469 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _authors_size_ = authors_length1; -#line 1472 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = _ ("This program is free software: you can redistribute it and/or modify\n" \ -"it under the terms of the GNU General Public License as published by\n" \ -"the Free Software Foundation, either version 3 of the License, or\n" \ -"(at your option) any later version.\n" \ -"\n" \ -"This program is distributed in the hope that it will be useful,\n" \ -"but WITHOUT ANY WARRANTY; without even the implied warranty of\n" \ -"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" \ -"GNU General Public License for more details.\n" \ -"\n" \ -"You should have received a copy of the GNU General Public License\n" \ -"along with this program. If not, see <http://www.gnu.org/licenses/>."); -#line 1472 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = g_strdup (_tmp2_); -#line 1472 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - license = _tmp3_; -#line 1475 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp4_ = _ ("About Simple Scan"); -#line 1475 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp5_ = g_strdup (_tmp4_); -#line 1475 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - title = _tmp5_; -#line 1478 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp6_ = _ ("Simple document scanning tool"); -#line 1478 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp7_ = g_strdup (_tmp6_); -#line 1478 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - description = _tmp7_; -#line 1480 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp8_ = _ ("translator-credits"); -#line 1480 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_show_about_dialog ((GtkWindow*) self, "title", title, "program-name", "Simple Scan", "version", VERSION, "comments", description, "logo-icon-name", "scanner", "authors", authors, "translator-credits", _tmp8_, "website", "https://launchpad.net/simple-scan", "copyright", "Copyright © 2009-2015 Canonical Ltd.", "license", license, "wrap-license", TRUE, NULL, NULL); -#line 1467 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (description); -#line 1467 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (title); -#line 1467 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (license); -#line 1467 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - authors = (_vala_array_free (authors, authors_length1, (GDestroyNotify) g_free), NULL); -#line 6846 "ui.c" -} - - -static void user_interface_about_menuitem_activate_cb (UserInterface* self, GtkWidget* widget) { -#line 1496 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 1496 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (widget != NULL); -#line 1498 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_show_about (self); -#line 6857 "ui.c" -} - - -static void _user_interface_about_menuitem_activate_cb_gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_about_menuitem_activate_cb ((UserInterface*) self, _sender); -#line 6864 "ui.c" -} - - -void user_interface_about_activate_cb (UserInterface* self) { -#line 1501 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 1503 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_show_about (self); -#line 6873 "ui.c" -} - - -static gboolean user_interface_on_quit (UserInterface* self) { - gboolean result = FALSE; - const gchar* _tmp0_ = NULL; - const gchar* _tmp1_ = NULL; - gboolean _tmp2_ = FALSE; - guint _tmp3_ = 0U; - AutosaveManager* _tmp4_ = NULL; -#line 1506 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_val_if_fail (self != NULL, FALSE); -#line 1508 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = _ ("Save document before quitting?"); -#line 1508 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = _ ("Quit without Saving"); -#line 1508 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = user_interface_prompt_to_save (self, _tmp0_, _tmp1_); -#line 1508 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (!_tmp2_) { -#line 1512 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - result = FALSE; -#line 1512 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return result; -#line 6898 "ui.c" - } -#line 1514 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_destroy ((GtkWidget*) self); -#line 1516 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = self->priv->save_state_timeout; -#line 1516 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp3_ != ((guint) 0)) { -#line 1517 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_save_state (self, TRUE); -#line 6908 "ui.c" - } -#line 1519 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp4_ = self->priv->autosave_manager; -#line 1519 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - autosave_manager_cleanup (_tmp4_); -#line 1521 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - result = TRUE; -#line 1521 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return result; -#line 6918 "ui.c" -} - - -static void user_interface_quit_menuitem_activate_cb (UserInterface* self, GtkWidget* widget) { -#line 1525 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 1525 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (widget != NULL); -#line 1527 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_on_quit (self); -#line 6929 "ui.c" -} - - -static void _user_interface_quit_menuitem_activate_cb_gtk_menu_item_activate (GtkMenuItem* _sender, gpointer self) { -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_quit_menuitem_activate_cb ((UserInterface*) self, _sender); -#line 6936 "ui.c" -} - - -void user_interface_quit_activate_cb (UserInterface* self) { -#line 1530 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 1532 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_on_quit (self); -#line 6945 "ui.c" -} - - -static void user_interface_real_size_allocate (GtkWidget* base, GtkAllocation* allocation) { - UserInterface * self; - GtkAllocation _tmp0_ = {0}; - gboolean _tmp1_ = FALSE; - gboolean _tmp2_ = FALSE; -#line 1535 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self = (UserInterface*) base; -#line 1535 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (allocation != NULL); -#line 1537 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = *allocation; -#line 1537 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - GTK_WIDGET_CLASS (user_interface_parent_class)->size_allocate ((GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (self, gtk_application_window_get_type (), GtkApplicationWindow), &_tmp0_); -#line 1539 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = self->priv->window_is_maximized; -#line 1539 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (!_tmp2_) { -#line 6966 "ui.c" - gboolean _tmp3_ = FALSE; -#line 1539 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = self->priv->window_is_fullscreen; -#line 1539 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = !_tmp3_; -#line 6972 "ui.c" - } else { -#line 1539 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = FALSE; -#line 6976 "ui.c" - } -#line 1539 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp1_) { -#line 6980 "ui.c" - gint _tmp4_ = 0; - gint _tmp5_ = 0; -#line 1541 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_window_get_size ((GtkWindow*) self, &_tmp4_, &_tmp5_); -#line 1541 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self->priv->window_width = _tmp4_; -#line 1541 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self->priv->window_height = _tmp5_; -#line 1542 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_save_state (self, FALSE); -#line 6991 "ui.c" - } -} - - -static void user_interface_info_bar_response_cb (UserInterface* self, GtkInfoBar* widget, gint response_id) { - gint _tmp0_ = 0; -#line 1546 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 1546 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (widget != NULL); -#line 1548 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = response_id; -#line 1548 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - switch (_tmp0_) { -#line 1548 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - case 1: -#line 7008 "ui.c" - { - GtkComboBox* _tmp1_ = NULL; - GtkDialog* _tmp2_ = NULL; -#line 1552 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = self->priv->device_combo; -#line 1552 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_grab_focus ((GtkWidget*) _tmp1_); -#line 1553 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = self->priv->preferences_dialog; -#line 1553 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_window_present ((GtkWindow*) _tmp2_); -#line 1554 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - break; -#line 7022 "ui.c" - } -#line 1548 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - case 2: -#line 7026 "ui.c" - { -#line 1557 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_install_drivers (self); -#line 1558 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - break; -#line 7032 "ui.c" - } - default: - { -#line 1560 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self->priv->have_error = FALSE; -#line 1561 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (self->priv->error_title); -#line 1561 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self->priv->error_title = NULL; -#line 1562 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (self->priv->error_text); -#line 1562 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self->priv->error_text = NULL; -#line 1563 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_update_info_bar (self); -#line 1564 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - break; -#line 7050 "ui.c" - } - } -} - - -static Block3Data* block3_data_ref (Block3Data* _data3_) { -#line 1568 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_atomic_int_inc (&_data3_->_ref_count_); -#line 1568 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return _data3_; -#line 7061 "ui.c" -} - - -static void block3_data_unref (void * _userdata_) { - Block3Data* _data3_; - _data3_ = (Block3Data*) _userdata_; -#line 1568 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (g_atomic_int_dec_and_test (&_data3_->_ref_count_)) { -#line 7070 "ui.c" - UserInterface* self; -#line 1568 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self = _data3_->self; -#line 1568 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (_data3_->instructions_label); -#line 1568 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (_data3_->status_label); -#line 1568 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (_data3_->spinner); -#line 1568 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (_data3_->stack); -#line 1568 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self); -#line 1568 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_slice_free (Block3Data, _data3_); -#line 7086 "ui.c" - } -} - - -static void ___lambda12_ (UserInterface* self) { -} - - -static void ____lambda12__pk_progress_callback (PkProgress* progress, PkProgressType type, gpointer self) { -#line 1646 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - ___lambda12_ ((UserInterface*) self); -#line 7098 "ui.c" -} - - -static void ___lambda13_ (Block3Data* _data3_, GObject* object, GAsyncResult* _result_) { - UserInterface* self; - GtkLabel* _tmp0_ = NULL; - GtkSpinner* _tmp1_ = NULL; - GtkLabel* _tmp2_ = NULL; - GtkStack* _tmp3_ = NULL; - GtkLabel* _tmp4_ = NULL; - gchar* result_text = NULL; - const gchar* _tmp5_ = NULL; - gchar* _tmp6_ = NULL; - GtkLabel* _tmp23_ = NULL; - const gchar* _tmp24_ = NULL; - GError * _inner_error_ = NULL; -#line 1646 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self = _data3_->self; -#line 1646 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (_result_ != NULL); -#line 1648 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = _data3_->status_label; -#line 1648 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_set_visible ((GtkWidget*) _tmp0_, TRUE); -#line 1649 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = _data3_->spinner; -#line 1649 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_object_set (_tmp1_, "active", FALSE, NULL); -#line 1650 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = _data3_->status_label; -#line 1650 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_label_set_text (_tmp2_, "☒"); -#line 1651 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = _data3_->stack; -#line 1651 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp4_ = _data3_->status_label; -#line 1651 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_stack_set_visible_child (_tmp3_, (GtkWidget*) _tmp4_); -#line 1653 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp5_ = _ ("Drivers installed successfully!"); -#line 1653 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp6_ = g_strdup (_tmp5_); -#line 1653 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - result_text = _tmp6_; -#line 7143 "ui.c" - { - PkResults* results = NULL; - GAsyncResult* _tmp7_ = NULL; - PkResults* _tmp8_ = NULL; - PkError* _tmp9_ = NULL; - PkError* _tmp10_ = NULL; - gboolean _tmp11_ = FALSE; -#line 1656 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp7_ = _result_; -#line 1656 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp8_ = user_interface_install_packages_finish (self, _tmp7_, &_inner_error_); -#line 1656 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - results = _tmp8_; -#line 1656 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 7159 "ui.c" - goto __catch22_g_error; - } -#line 1657 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp9_ = pk_results_get_error_code (results); -#line 1657 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp10_ = _tmp9_; -#line 1657 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp11_ = _tmp10_ == NULL; -#line 1657 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (_tmp10_); -#line 1657 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp11_) { -#line 7172 "ui.c" - GtkLabel* _tmp12_ = NULL; -#line 1658 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp12_ = _data3_->status_label; -#line 1658 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_label_set_text (_tmp12_, "☑"); -#line 7178 "ui.c" - } else { - PkError* e = NULL; - PkError* _tmp13_ = NULL; - const gchar* _tmp14_ = NULL; - PkError* _tmp15_ = NULL; - PkErrorEnum _tmp16_ = 0; - PkErrorEnum _tmp17_ = 0; - gchar* _tmp18_ = NULL; -#line 1661 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp13_ = pk_results_get_error_code (results); -#line 1661 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - e = _tmp13_; -#line 1663 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp14_ = _ ("Failed to install drivers (error code %d)."); -#line 1663 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp15_ = e; -#line 1663 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_object_get (_tmp15_, "code", &_tmp16_, NULL); -#line 1663 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp17_ = _tmp16_; -#line 1663 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp18_ = g_strdup_printf (_tmp14_, _tmp17_); -#line 1663 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (result_text); -#line 1663 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - result_text = _tmp18_; -#line 1657 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (e); -#line 7207 "ui.c" - } -#line 1654 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (results); -#line 7211 "ui.c" - } - goto __finally22; - __catch22_g_error: - { - GError* e = NULL; - const gchar* _tmp19_ = NULL; - gchar* _tmp20_ = NULL; - GError* _tmp21_ = NULL; - const gchar* _tmp22_ = NULL; -#line 1654 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - e = _inner_error_; -#line 1654 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _inner_error_ = NULL; -#line 1669 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp19_ = _ ("Failed to install drivers."); -#line 1669 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp20_ = g_strdup (_tmp19_); -#line 1669 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (result_text); -#line 1669 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - result_text = _tmp20_; -#line 1670 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp21_ = e; -#line 1670 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp22_ = _tmp21_->message; -#line 1670 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_warning ("ui.vala:1670: Failed to install drivers: %s", _tmp22_); -#line 1654 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_error_free0 (e); -#line 7241 "ui.c" - } - __finally22: -#line 1654 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 1654 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (result_text); -#line 1654 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - 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); -#line 1654 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_clear_error (&_inner_error_); -#line 1654 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return; -#line 7254 "ui.c" - } -#line 1672 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp23_ = _data3_->instructions_label; -#line 1672 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp24_ = result_text; -#line 1672 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_label_set_text (_tmp23_, _tmp24_); -#line 1646 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (result_text); -#line 7264 "ui.c" -} - - -static void ____lambda13__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self) { -#line 1646 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - ___lambda13_ (self, source_object, res); -#line 1646 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - block3_data_unref (self); -#line 7273 "ui.c" -} - - -static void user_interface_install_drivers (UserInterface* self) { - Block3Data* _data3_; - gchar* message = NULL; - gchar* _tmp0_ = NULL; - gchar* instructions = NULL; - gchar* _tmp1_ = NULL; - gchar** packages_to_install = NULL; - gchar** _tmp2_ = NULL; - gint packages_to_install_length1 = 0; - gint _packages_to_install_size_ = 0; - const gchar* _tmp3_ = NULL; - const gchar* _tmp4_ = NULL; - GQuark _tmp6_ = 0U; -#line 1572 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - static GQuark _tmp5_label0 = 0; -#line 1572 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - static GQuark _tmp5_label1 = 0; -#line 1572 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - static GQuark _tmp5_label2 = 0; -#line 1572 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - static GQuark _tmp5_label3 = 0; -#line 1572 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - static GQuark _tmp5_label4 = 0; -#line 1572 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - static GQuark _tmp5_label5 = 0; -#line 1572 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - static GQuark _tmp5_label6 = 0; -#line 7304 "ui.c" - GtkDialog* dialog = NULL; - const gchar* _tmp23_ = NULL; - const gchar* _tmp24_ = NULL; - GtkDialog* _tmp25_ = NULL; - GtkDialog* _tmp26_ = NULL; - GtkBox* _tmp27_ = NULL; - GtkDialog* _tmp28_ = NULL; - GtkBox* _tmp29_ = NULL; - GtkLabel* label = NULL; - const gchar* _tmp30_ = NULL; - GtkLabel* _tmp31_ = NULL; - GtkLabel* _tmp32_ = NULL; - GtkLabel* _tmp33_ = NULL; - GtkDialog* _tmp34_ = NULL; - GtkBox* _tmp35_ = NULL; - GtkLabel* _tmp36_ = NULL; - GtkBox* instructions_box = NULL; - GtkBox* _tmp37_ = NULL; - GtkBox* _tmp38_ = NULL; - GtkDialog* _tmp39_ = NULL; - GtkBox* _tmp40_ = NULL; - GtkBox* _tmp41_ = NULL; - GtkStack* _tmp42_ = NULL; - GtkBox* _tmp43_ = NULL; - GtkStack* _tmp44_ = NULL; - GtkSpinner* _tmp45_ = NULL; - GtkSpinner* _tmp46_ = NULL; - GtkStack* _tmp47_ = NULL; - GtkSpinner* _tmp48_ = NULL; - GtkLabel* _tmp49_ = NULL; - GtkLabel* _tmp50_ = NULL; - GtkStack* _tmp51_ = NULL; - GtkLabel* _tmp52_ = NULL; - const gchar* _tmp53_ = NULL; - GtkLabel* _tmp54_ = NULL; - GtkLabel* _tmp55_ = NULL; - GtkLabel* _tmp56_ = NULL; - GtkLabel* _tmp57_ = NULL; - GtkBox* _tmp58_ = NULL; - GtkLabel* _tmp59_ = NULL; - const gchar* _tmp60_ = NULL; - GtkLabel* _tmp61_ = NULL; - GtkLabel* _tmp62_ = NULL; - GtkLabel* _tmp63_ = NULL; - GtkDialog* _tmp64_ = NULL; - GtkBox* _tmp65_ = NULL; - GtkDialog* _tmp66_ = NULL; - GtkBox* _tmp67_ = NULL; - GtkLabel* _tmp68_ = NULL; - gchar** _tmp69_ = NULL; - gint _tmp69__length1 = 0; - GtkDialog* _tmp75_ = NULL; - GtkDialog* _tmp76_ = NULL; -#line 1568 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 1568 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data3_ = g_slice_new0 (Block3Data); -#line 1568 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data3_->_ref_count_ = 1; -#line 1568 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data3_->self = g_object_ref (self); -#line 1570 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = g_strdup (""); -#line 1570 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - message = _tmp0_; -#line 1570 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = g_strdup (""); -#line 1570 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - instructions = _tmp1_; -#line 1571 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = g_new0 (gchar*, 0 + 1); -#line 1571 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - packages_to_install = _tmp2_; -#line 1571 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - packages_to_install_length1 = 0; -#line 1571 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _packages_to_install_size_ = packages_to_install_length1; -#line 1572 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = self->priv->missing_driver; -#line 1572 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp4_ = _tmp3_; -#line 1572 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp6_ = (NULL == _tmp4_) ? 0 : g_quark_from_string (_tmp4_); -#line 1572 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if ((((_tmp6_ == ((0 != _tmp5_label0) ? _tmp5_label0 : (_tmp5_label0 = g_quark_from_static_string ("brscan")))) || (_tmp6_ == ((0 != _tmp5_label1) ? _tmp5_label1 : (_tmp5_label1 = g_quark_from_static_string ("brscan2"))))) || (_tmp6_ == ((0 != _tmp5_label2) ? _tmp5_label2 : (_tmp5_label2 = g_quark_from_static_string ("brscan3"))))) || (_tmp6_ == ((0 != _tmp5_label3) ? _tmp5_label3 : (_tmp5_label3 = g_quark_from_static_string ("brscan4"))))) { -#line 1572 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - switch (0) { -#line 7392 "ui.c" - default: - { - const gchar* _tmp7_ = NULL; - gchar* _tmp8_ = NULL; - const gchar* _tmp9_ = NULL; - gchar* _tmp10_ = NULL; -#line 1579 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp7_ = _ ("You appear to have a Brother scanner."); -#line 1579 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp8_ = g_strdup (_tmp7_); -#line 1579 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (message); -#line 1579 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - message = _tmp8_; -#line 1581 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp9_ = _ ("Drivers for this are available on the <a href=\"http://support.brother" \ -".com\">Brother website</a>."); -#line 1581 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp10_ = g_strdup (_tmp9_); -#line 1581 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (instructions); -#line 1581 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - instructions = _tmp10_; -#line 1582 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - break; -#line 7417 "ui.c" - } - } - } else if (_tmp6_ == ((0 != _tmp5_label4) ? _tmp5_label4 : (_tmp5_label4 = g_quark_from_static_string ("samsung")))) { -#line 1572 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - switch (0) { -#line 7423 "ui.c" - default: - { - const gchar* _tmp11_ = NULL; - gchar* _tmp12_ = NULL; - const gchar* _tmp13_ = NULL; - gchar* _tmp14_ = NULL; -#line 1585 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp11_ = _ ("You appear to have a Samsung scanner."); -#line 1585 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp12_ = g_strdup (_tmp11_); -#line 1585 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (message); -#line 1585 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - message = _tmp12_; -#line 1587 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp13_ = _ ("Drivers for this are available on the <a href=\"http://samsung.com/sup" \ -"port\">Samsung website</a>."); -#line 1587 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp14_ = g_strdup (_tmp13_); -#line 1587 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (instructions); -#line 1587 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - instructions = _tmp14_; -#line 1588 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - break; -#line 7448 "ui.c" - } - } - } else if (_tmp6_ == ((0 != _tmp5_label5) ? _tmp5_label5 : (_tmp5_label5 = g_quark_from_static_string ("hpaio")))) { -#line 1572 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - switch (0) { -#line 7454 "ui.c" - default: - { - const gchar* _tmp15_ = NULL; - gchar* _tmp16_ = NULL; - gchar* _tmp17_ = NULL; - gchar** _tmp18_ = NULL; -#line 1591 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp15_ = _ ("You appear to have an HP scanner."); -#line 1591 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp16_ = g_strdup (_tmp15_); -#line 1591 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (message); -#line 1591 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - message = _tmp16_; -#line 1592 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp17_ = g_strdup ("libsane-hpaio"); -#line 1592 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp18_ = g_new0 (gchar*, 1 + 1); -#line 1592 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp18_[0] = _tmp17_; -#line 1592 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - packages_to_install = (_vala_array_free (packages_to_install, packages_to_install_length1, (GDestroyNotify) g_free), NULL); -#line 1592 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - packages_to_install = _tmp18_; -#line 1592 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - packages_to_install_length1 = 1; -#line 1592 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _packages_to_install_size_ = packages_to_install_length1; -#line 1593 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - break; -#line 7485 "ui.c" - } - } - } else if (_tmp6_ == ((0 != _tmp5_label6) ? _tmp5_label6 : (_tmp5_label6 = g_quark_from_static_string ("epkowa")))) { -#line 1572 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - switch (0) { -#line 7491 "ui.c" - default: - { - const gchar* _tmp19_ = NULL; - gchar* _tmp20_ = NULL; - const gchar* _tmp21_ = NULL; - gchar* _tmp22_ = NULL; -#line 1596 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp19_ = _ ("You appear to have an Epson scanner."); -#line 1596 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp20_ = g_strdup (_tmp19_); -#line 1596 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (message); -#line 1596 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - message = _tmp20_; -#line 1598 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp21_ = _ ("Drivers for this are available on the <a href=\"http://support.epson.c" \ -"om\">Epson website</a>."); -#line 1598 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp22_ = g_strdup (_tmp21_); -#line 1598 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (instructions); -#line 1598 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - instructions = _tmp22_; -#line 1599 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - break; -#line 7516 "ui.c" - } - } - } -#line 1601 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp23_ = _ ("Install drivers"); -#line 1601 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp24_ = _ ("_Close"); -#line 1601 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp25_ = (GtkDialog*) gtk_dialog_new_with_buttons (_tmp23_, (GtkWindow*) self, GTK_DIALOG_MODAL, _tmp24_, GTK_RESPONSE_CLOSE, NULL); -#line 1601 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_object_ref_sink (_tmp25_); -#line 1601 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - dialog = _tmp25_; -#line 1603 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp26_ = dialog; -#line 1603 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp27_ = (GtkBox*) gtk_dialog_get_content_area (_tmp26_); -#line 1603 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_container_set_border_width ((GtkContainer*) _tmp27_, (guint) 12); -#line 1604 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp28_ = dialog; -#line 1604 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp29_ = (GtkBox*) gtk_dialog_get_content_area (_tmp28_); -#line 1604 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_box_set_spacing (_tmp29_, 6); -#line 1606 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp30_ = message; -#line 1606 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp31_ = (GtkLabel*) gtk_label_new (_tmp30_); -#line 1606 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_object_ref_sink (_tmp31_); -#line 1606 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - label = _tmp31_; -#line 1607 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp32_ = label; -#line 1607 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_set_visible ((GtkWidget*) _tmp32_, TRUE); -#line 1608 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp33_ = label; -#line 1608 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_label_set_xalign (_tmp33_, 0.f); -#line 1609 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp34_ = dialog; -#line 1609 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp35_ = (GtkBox*) gtk_dialog_get_content_area (_tmp34_); -#line 1609 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp36_ = label; -#line 1609 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_box_pack_start (_tmp35_, (GtkWidget*) _tmp36_, TRUE, TRUE, (guint) 0); -#line 1611 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp37_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6); -#line 1611 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_object_ref_sink (_tmp37_); -#line 1611 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - instructions_box = _tmp37_; -#line 1612 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp38_ = instructions_box; -#line 1612 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_set_visible ((GtkWidget*) _tmp38_, TRUE); -#line 1613 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp39_ = dialog; -#line 1613 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp40_ = (GtkBox*) gtk_dialog_get_content_area (_tmp39_); -#line 1613 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp41_ = instructions_box; -#line 1613 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_box_pack_start (_tmp40_, (GtkWidget*) _tmp41_, TRUE, TRUE, (guint) 0); -#line 1615 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp42_ = (GtkStack*) gtk_stack_new (); -#line 1615 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_object_ref_sink (_tmp42_); -#line 1615 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data3_->stack = _tmp42_; -#line 1616 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp43_ = instructions_box; -#line 1616 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp44_ = _data3_->stack; -#line 1616 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_box_pack_start (_tmp43_, (GtkWidget*) _tmp44_, FALSE, FALSE, (guint) 0); -#line 1618 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp45_ = (GtkSpinner*) gtk_spinner_new (); -#line 1618 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_object_ref_sink (_tmp45_); -#line 1618 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data3_->spinner = _tmp45_; -#line 1619 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp46_ = _data3_->spinner; -#line 1619 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_set_visible ((GtkWidget*) _tmp46_, TRUE); -#line 1620 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp47_ = _data3_->stack; -#line 1620 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp48_ = _data3_->spinner; -#line 1620 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_container_add ((GtkContainer*) _tmp47_, (GtkWidget*) _tmp48_); -#line 1622 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp49_ = (GtkLabel*) gtk_label_new (""); -#line 1622 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_object_ref_sink (_tmp49_); -#line 1622 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data3_->status_label = _tmp49_; -#line 1623 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp50_ = _data3_->status_label; -#line 1623 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_set_visible ((GtkWidget*) _tmp50_, TRUE); -#line 1624 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp51_ = _data3_->stack; -#line 1624 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp52_ = _data3_->status_label; -#line 1624 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_container_add ((GtkContainer*) _tmp51_, (GtkWidget*) _tmp52_); -#line 1626 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp53_ = instructions; -#line 1626 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp54_ = (GtkLabel*) gtk_label_new (_tmp53_); -#line 1626 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_object_ref_sink (_tmp54_); -#line 1626 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data3_->instructions_label = _tmp54_; -#line 1627 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp55_ = _data3_->instructions_label; -#line 1627 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_set_visible ((GtkWidget*) _tmp55_, TRUE); -#line 1628 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp56_ = _data3_->instructions_label; -#line 1628 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_label_set_xalign (_tmp56_, 0.f); -#line 1629 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp57_ = _data3_->instructions_label; -#line 1629 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_label_set_use_markup (_tmp57_, TRUE); -#line 1630 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp58_ = instructions_box; -#line 1630 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp59_ = _data3_->instructions_label; -#line 1630 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_box_pack_start (_tmp58_, (GtkWidget*) _tmp59_, FALSE, FALSE, (guint) 0); -#line 1632 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp60_ = _ ("Once installed you will need to restart Simple Scan."); -#line 1632 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp61_ = (GtkLabel*) gtk_label_new (_tmp60_); -#line 1632 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_object_ref_sink (_tmp61_); -#line 1632 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (label); -#line 1632 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - label = _tmp61_; -#line 1634 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp62_ = label; -#line 1634 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_set_visible ((GtkWidget*) _tmp62_, TRUE); -#line 1635 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp63_ = label; -#line 1635 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_label_set_xalign (_tmp63_, 0.f); -#line 1636 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp64_ = dialog; -#line 1636 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp65_ = (GtkBox*) gtk_dialog_get_content_area (_tmp64_); -#line 1636 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_container_set_border_width ((GtkContainer*) _tmp65_, (guint) 12); -#line 1637 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp66_ = dialog; -#line 1637 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp67_ = (GtkBox*) gtk_dialog_get_content_area (_tmp66_); -#line 1637 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp68_ = label; -#line 1637 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_box_pack_start (_tmp67_, (GtkWidget*) _tmp68_, TRUE, TRUE, (guint) 0); -#line 1639 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp69_ = packages_to_install; -#line 1639 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp69__length1 = packages_to_install_length1; -#line 1639 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp69__length1 > 0) { -#line 7692 "ui.c" - GtkStack* _tmp70_ = NULL; - GtkSpinner* _tmp71_ = NULL; - GtkLabel* _tmp72_ = NULL; - const gchar* _tmp73_ = NULL; - gchar** _tmp74_ = NULL; - gint _tmp74__length1 = 0; -#line 1642 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp70_ = _data3_->stack; -#line 1642 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_set_visible ((GtkWidget*) _tmp70_, TRUE); -#line 1643 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp71_ = _data3_->spinner; -#line 1643 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_object_set (_tmp71_, "active", TRUE, NULL); -#line 1644 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp72_ = _data3_->instructions_label; -#line 1644 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp73_ = _ ("Installing drivers..."); -#line 1644 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_label_set_text (_tmp72_, _tmp73_); -#line 1646 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp74_ = packages_to_install; -#line 1646 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp74__length1 = packages_to_install_length1; -#line 1646 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_install_packages (self, _tmp74_, _tmp74__length1, ____lambda12__pk_progress_callback, self, ____lambda13__gasync_ready_callback, block3_data_ref (_data3_)); -#line 7719 "ui.c" - } -#line 1680 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp75_ = dialog; -#line 1680 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_dialog_run (_tmp75_); -#line 1681 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp76_ = dialog; -#line 1681 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_destroy ((GtkWidget*) _tmp76_); -#line 1568 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (instructions_box); -#line 1568 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (label); -#line 1568 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (dialog); -#line 1568 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - packages_to_install = (_vala_array_free (packages_to_install, packages_to_install_length1, (GDestroyNotify) g_free), NULL); -#line 1568 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (instructions); -#line 1568 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (message); -#line 1568 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - block3_data_unref (_data3_); -#line 1568 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data3_ = NULL; -#line 7745 "ui.c" -} - - -static void user_interface_install_packages_data_free (gpointer _data) { - UserInterfaceInstallPackagesData* _data_; - _data_ = _data; -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (_data_->result); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (_data_->self); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_slice_free (UserInterfaceInstallPackagesData, _data_); -#line 7758 "ui.c" -} - - -static void user_interface_install_packages (UserInterface* self, gchar** packages, int packages_length1, PkProgressCallback progress_callback, void* progress_callback_target, GAsyncReadyCallback _callback_, gpointer _user_data_) { - UserInterfaceInstallPackagesData* _data_; - UserInterface* _tmp0_ = NULL; - gchar** _tmp1_ = NULL; - gint _tmp1__length1 = 0; - PkProgressCallback _tmp2_ = NULL; - void* _tmp2__target = NULL; -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_ = g_slice_new0 (UserInterfaceInstallPackagesData); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, user_interface_install_packages); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, user_interface_install_packages_data_free); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = _g_object_ref0 (self); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->self = _tmp0_; -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = packages; -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1__length1 = packages_length1; -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->packages = _tmp1_; -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->packages_length1 = _tmp1__length1; -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = progress_callback; -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2__target = progress_callback_target; -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->progress_callback = _tmp2_; -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->progress_callback_target = _tmp2__target; -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_install_packages_co (_data_); -#line 7797 "ui.c" -} - - -static PkResults* user_interface_install_packages_finish (UserInterface* self, GAsyncResult* _res_, GError** error) { - PkResults* result; - UserInterfaceInstallPackagesData* _data_; -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) { -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return NULL; -#line 7808 "ui.c" - } -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - result = _data_->result; -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->result = NULL; -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return result; -#line 7818 "ui.c" -} - - -static void user_interface_install_packages_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) { - UserInterfaceInstallPackagesData* _data_; -#line 1689 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_ = _user_data_; -#line 1689 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_source_object_ = source_object; -#line 1689 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_res_ = _res_; -#line 1689 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_install_packages_co (_data_); -#line 7832 "ui.c" -} - - -static gint g_ptr_array_get_length (GPtrArray* self) { - gint result; - guint _tmp0_ = 0U; -#line 4858 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" - g_return_val_if_fail (self != NULL, 0); -#line 4858 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" - _tmp0_ = self->len; -#line 4858 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" - result = (gint) _tmp0_; -#line 4858 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" - return result; -#line 7847 "ui.c" -} - - -static void g_ptr_array_set_length (GPtrArray* self, gint value) { - gint _tmp0_ = 0; -#line 4859 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" - g_return_if_fail (self != NULL); -#line 4859 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" - _tmp0_ = value; -#line 4859 "/usr/share/vala-0.34/vapi/glib-2.0.vapi" - g_ptr_array_set_size (self, _tmp0_); -#line 7859 "ui.c" -} - - -static gboolean user_interface_install_packages_co (UserInterfaceInstallPackagesData* _data_) { -#line 1685 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - switch (_data_->_state_) { -#line 1685 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - case 0: -#line 7868 "ui.c" - goto _state_0; -#line 1685 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - case 1: -#line 7872 "ui.c" - goto _state_1; -#line 1685 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - case 2: -#line 7876 "ui.c" - goto _state_2; - default: -#line 1685 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_assert_not_reached (); -#line 7881 "ui.c" - } - _state_0: -#line 1687 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp0_ = NULL; -#line 1687 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp0_ = pk_task_new (); -#line 1687 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->task = _data_->_tmp0_; -#line 1689 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp2_ = NULL; -#line 1689 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp2_ = _data_->task; -#line 1689 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp3_ = NULL; -#line 1689 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp3__length1 = 0; -#line 1689 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp3_ = _data_->packages; -#line 1689 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp3__length1 = _data_->packages_length1; -#line 1689 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp4_ = NULL; -#line 1689 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp4__target = NULL; -#line 1689 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp4_ = _data_->progress_callback; -#line 1689 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp4__target = _data_->progress_callback_target; -#line 1689 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_state_ = 1; -#line 1689 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - pk_task_resolve_async (_data_->_tmp2_, (PkBitfield) PK_FILTER_ENUM_NOT_INSTALLED, _data_->_tmp3_, NULL, _data_->_tmp4_, _data_->_tmp4__target, user_interface_install_packages_ready, _data_); -#line 1689 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return FALSE; -#line 7916 "ui.c" - _state_1: -#line 1689 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp5_ = NULL; -#line 1689 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp5_ = pk_task_generic_finish (_data_->_tmp2_, _data_->_res_, &_data_->_inner_error_); -#line 1689 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp1_ = _data_->_tmp5_; -#line 1689 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (G_UNLIKELY (_data_->_inner_error_ != NULL)) { -#line 1689 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_); -#line 1689 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_error_free (_data_->_inner_error_); -#line 1689 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (_data_->results); -#line 1689 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (_data_->task); -#line 1689 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_data_->_state_ == 0) { -#line 1689 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_simple_async_result_complete_in_idle (_data_->_async_result); -#line 7938 "ui.c" - } else { -#line 1689 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_simple_async_result_complete (_data_->_async_result); -#line 7942 "ui.c" - } -#line 1689 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_object_unref (_data_->_async_result); -#line 1689 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return FALSE; -#line 7948 "ui.c" - } -#line 1689 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp6_ = NULL; -#line 1689 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp6_ = _data_->_tmp1_; -#line 1689 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp1_ = NULL; -#line 1689 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (_data_->results); -#line 1689 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->results = _data_->_tmp6_; -#line 1690 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp8_ = NULL; -#line 1690 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp8_ = _data_->results; -#line 1690 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_data_->_tmp8_ == NULL) { -#line 1690 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp7_ = TRUE; -#line 7968 "ui.c" - } else { -#line 1690 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp9_ = NULL; -#line 1690 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp9_ = _data_->results; -#line 1690 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp10_ = NULL; -#line 1690 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp10_ = pk_results_get_error_code (_data_->_tmp9_); -#line 1690 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp11_ = NULL; -#line 1690 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp11_ = _data_->_tmp10_; -#line 1690 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp7_ = _data_->_tmp11_ != NULL; -#line 1690 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (_data_->_tmp11_); -#line 7986 "ui.c" - } -#line 1690 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_data_->_tmp7_) { -#line 1691 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->result = _data_->results; -#line 1691 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (_data_->_tmp1_); -#line 1691 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (_data_->task); -#line 1691 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_data_->_state_ == 0) { -#line 1691 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_simple_async_result_complete_in_idle (_data_->_async_result); -#line 8000 "ui.c" - } else { -#line 1691 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_simple_async_result_complete (_data_->_async_result); -#line 8004 "ui.c" - } -#line 1691 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_object_unref (_data_->_async_result); -#line 1691 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return FALSE; -#line 8010 "ui.c" - } -#line 1693 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp12_ = NULL; -#line 1693 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp12_ = _data_->results; -#line 1693 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp13_ = NULL; -#line 1693 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp13_ = pk_results_get_package_array (_data_->_tmp12_); -#line 1693 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->package_array = _data_->_tmp13_; -#line 1694 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp14_ = NULL; -#line 1694 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp14_ = _data_->package_array; -#line 1694 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp15_ = 0; -#line 1694 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp15_ = g_ptr_array_get_length (_data_->_tmp14_); -#line 1694 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp16_ = 0; -#line 1694 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp16_ = _data_->_tmp15_; -#line 1694 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp17_ = NULL; -#line 1694 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp17_ = g_new0 (gchar*, (_data_->_tmp16_ + 1) + 1); -#line 1694 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->package_ids_length1 = 0; -#line 1694 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_package_ids_size_ = 0; -#line 1694 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->package_ids = _data_->_tmp17_; -#line 1694 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->package_ids_length1 = _data_->_tmp16_ + 1; -#line 1694 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_package_ids_size_ = _data_->package_ids_length1; -#line 1695 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp18_ = NULL; -#line 1695 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp18__length1 = 0; -#line 1695 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp18_ = _data_->package_ids; -#line 1695 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp18__length1 = _data_->package_ids_length1; -#line 1695 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp19_ = NULL; -#line 1695 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp19_ = _data_->package_array; -#line 1695 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp20_ = 0; -#line 1695 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp20_ = g_ptr_array_get_length (_data_->_tmp19_); -#line 1695 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp21_ = 0; -#line 1695 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp21_ = _data_->_tmp20_; -#line 1695 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (_data_->_tmp18_[_data_->_tmp21_]); -#line 1695 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp18_[_data_->_tmp21_] = NULL; -#line 1695 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp22_ = NULL; -#line 1695 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp22_ = _data_->_tmp18_[_data_->_tmp21_]; -#line 8076 "ui.c" - { -#line 1696 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->i = 0; -#line 8080 "ui.c" - { -#line 1696 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp23_ = TRUE; -#line 1696 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - while (TRUE) { -#line 1696 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (!_data_->_tmp23_) { -#line 1696 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp24_ = 0; -#line 1696 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp24_ = _data_->i; -#line 1696 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->i = _data_->_tmp24_ + 1; -#line 8094 "ui.c" - } -#line 1696 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp23_ = FALSE; -#line 1696 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp25_ = 0; -#line 1696 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp25_ = _data_->i; -#line 1696 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp26_ = NULL; -#line 1696 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp26_ = _data_->package_array; -#line 1696 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp27_ = 0; -#line 1696 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp27_ = g_ptr_array_get_length (_data_->_tmp26_); -#line 1696 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp28_ = 0; -#line 1696 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp28_ = _data_->_tmp27_; -#line 1696 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (!(_data_->_tmp25_ < _data_->_tmp28_)) { -#line 1696 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - break; -#line 8118 "ui.c" - } -#line 1697 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp29_ = NULL; -#line 1697 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp29__length1 = 0; -#line 1697 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp29_ = _data_->package_ids; -#line 1697 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp29__length1 = _data_->package_ids_length1; -#line 1697 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp30_ = 0; -#line 1697 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp30_ = _data_->i; -#line 1697 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp31_ = NULL; -#line 1697 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp31_ = _data_->package_array; -#line 1697 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp32_ = NULL; -#line 1697 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp32__length1 = 0; -#line 1697 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp32_ = _data_->_tmp31_->pdata; -#line 1697 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp32__length1 = (gint) _data_->_tmp31_->len; -#line 1697 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp33_ = 0; -#line 1697 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp33_ = _data_->i; -#line 1697 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp34_ = NULL; -#line 1697 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp34_ = _data_->_tmp32_[_data_->_tmp33_]; -#line 1697 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp35_ = NULL; -#line 1697 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp35_ = pk_package_get_id (_data_->_tmp34_); -#line 1697 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp36_ = NULL; -#line 1697 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp36_ = g_strdup (_data_->_tmp35_); -#line 1697 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (_data_->_tmp29_[_data_->_tmp30_]); -#line 1697 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp29_[_data_->_tmp30_] = _data_->_tmp36_; -#line 1697 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp37_ = NULL; -#line 1697 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp37_ = _data_->_tmp29_[_data_->_tmp30_]; -#line 8168 "ui.c" - } - } - } -#line 1699 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp39_ = NULL; -#line 1699 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp39_ = _data_->task; -#line 1699 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp40_ = NULL; -#line 1699 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp40__length1 = 0; -#line 1699 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp40_ = _data_->package_ids; -#line 1699 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp40__length1 = _data_->package_ids_length1; -#line 1699 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp41_ = NULL; -#line 1699 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp41__target = NULL; -#line 1699 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp41_ = _data_->progress_callback; -#line 1699 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp41__target = _data_->progress_callback_target; -#line 1699 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_state_ = 2; -#line 1699 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - pk_task_install_packages_async (_data_->_tmp39_, _data_->_tmp40_, NULL, _data_->_tmp41_, _data_->_tmp41__target, user_interface_install_packages_ready, _data_); -#line 1699 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return FALSE; -#line 8198 "ui.c" - _state_2: -#line 1699 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp42_ = NULL; -#line 1699 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp42_ = pk_task_generic_finish (_data_->_tmp39_, _data_->_res_, &_data_->_inner_error_); -#line 1699 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp38_ = _data_->_tmp42_; -#line 1699 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (G_UNLIKELY (_data_->_inner_error_ != NULL)) { -#line 1699 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_); -#line 1699 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_error_free (_data_->_inner_error_); -#line 1699 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->package_ids = (_vala_array_free (_data_->package_ids, _data_->package_ids_length1, (GDestroyNotify) g_free), NULL); -#line 1699 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_ptr_array_unref0 (_data_->package_array); -#line 1699 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (_data_->_tmp1_); -#line 1699 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (_data_->results); -#line 1699 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (_data_->task); -#line 1699 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_data_->_state_ == 0) { -#line 1699 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_simple_async_result_complete_in_idle (_data_->_async_result); -#line 8226 "ui.c" - } else { -#line 1699 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_simple_async_result_complete (_data_->_async_result); -#line 8230 "ui.c" - } -#line 1699 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_object_unref (_data_->_async_result); -#line 1699 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return FALSE; -#line 8236 "ui.c" - } -#line 1699 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp43_ = NULL; -#line 1699 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp43_ = _data_->_tmp38_; -#line 1699 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->_tmp38_ = NULL; -#line 1699 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->result = _data_->_tmp43_; -#line 1699 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (_data_->_tmp38_); -#line 1699 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->package_ids = (_vala_array_free (_data_->package_ids, _data_->package_ids_length1, (GDestroyNotify) g_free), NULL); -#line 1699 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_ptr_array_unref0 (_data_->package_array); -#line 1699 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (_data_->_tmp1_); -#line 1699 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (_data_->results); -#line 1699 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (_data_->task); -#line 1699 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_data_->_state_ == 0) { -#line 1699 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_simple_async_result_complete_in_idle (_data_->_async_result); -#line 8262 "ui.c" - } else { -#line 1699 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_simple_async_result_complete (_data_->_async_result); -#line 8266 "ui.c" - } -#line 1699 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_object_unref (_data_->_async_result); -#line 1699 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return FALSE; -#line 1685 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (_data_->_tmp38_); -#line 1685 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _data_->package_ids = (_vala_array_free (_data_->package_ids, _data_->package_ids_length1, (GDestroyNotify) g_free), NULL); -#line 1685 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_ptr_array_unref0 (_data_->package_array); -#line 1685 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (_data_->_tmp1_); -#line 1685 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (_data_->results); -#line 1685 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (_data_->task); -#line 1685 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_data_->_state_ == 0) { -#line 1685 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_simple_async_result_complete_in_idle (_data_->_async_result); -#line 8288 "ui.c" - } else { -#line 1685 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_simple_async_result_complete (_data_->_async_result); -#line 8292 "ui.c" - } -#line 1685 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_object_unref (_data_->_async_result); -#line 1685 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return FALSE; -#line 8298 "ui.c" -} - - -static gboolean user_interface_real_window_state_event (GtkWidget* base, GdkEventWindowState* event) { - UserInterface * self; - gboolean result = FALSE; - gboolean _result_ = FALSE; - GdkEventWindowState* _tmp2_ = NULL; - GdkWindowState _tmp3_ = 0; - GdkEventWindowState* _tmp6_ = NULL; - GdkWindowState _tmp7_ = 0; -#line 1703 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self = (UserInterface*) base; -#line 1703 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_val_if_fail (event != NULL, FALSE); -#line 1705 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _result_ = GDK_EVENT_PROPAGATE; -#line 1707 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (GTK_WIDGET_CLASS (user_interface_parent_class)->window_state_event != NULL) { -#line 8318 "ui.c" - GdkEventWindowState* _tmp0_ = NULL; - gboolean _tmp1_ = FALSE; -#line 1708 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = event; -#line 1708 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = GTK_WIDGET_CLASS (user_interface_parent_class)->window_state_event ((GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (self, gtk_application_window_get_type (), GtkApplicationWindow), _tmp0_); -#line 1708 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _result_ = _tmp1_; -#line 8327 "ui.c" - } -#line 1710 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = event; -#line 1710 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = _tmp2_->changed_mask; -#line 1710 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if ((_tmp3_ & GDK_WINDOW_STATE_MAXIMIZED) != 0) { -#line 8335 "ui.c" - GdkEventWindowState* _tmp4_ = NULL; - GdkWindowState _tmp5_ = 0; -#line 1712 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp4_ = event; -#line 1712 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp5_ = _tmp4_->new_window_state; -#line 1712 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self->priv->window_is_maximized = (_tmp5_ & GDK_WINDOW_STATE_MAXIMIZED) != 0; -#line 1713 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_save_state (self, FALSE); -#line 8346 "ui.c" - } -#line 1715 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp6_ = event; -#line 1715 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp7_ = _tmp6_->changed_mask; -#line 1715 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if ((_tmp7_ & GDK_WINDOW_STATE_FULLSCREEN) != 0) { -#line 8354 "ui.c" - GdkEventWindowState* _tmp8_ = NULL; - GdkWindowState _tmp9_ = 0; -#line 1717 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp8_ = event; -#line 1717 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp9_ = _tmp8_->new_window_state; -#line 1717 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self->priv->window_is_fullscreen = (_tmp9_ & GDK_WINDOW_STATE_FULLSCREEN) != 0; -#line 1718 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_save_state (self, FALSE); -#line 8365 "ui.c" - } -#line 1721 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - result = _result_; -#line 1721 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return result; -#line 8371 "ui.c" -} - - -static gboolean user_interface_window_delete_event_cb (UserInterface* self, GtkWidget* widget, GdkEventAny* event) { - gboolean result = FALSE; - gboolean _tmp0_ = FALSE; -#line 1725 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_val_if_fail (self != NULL, FALSE); -#line 1725 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_val_if_fail (widget != NULL, FALSE); -#line 1725 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_val_if_fail (event != NULL, FALSE); -#line 1727 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = user_interface_on_quit (self); -#line 1727 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - result = !_tmp0_; -#line 1727 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return result; -#line 8390 "ui.c" -} - - -static gboolean _user_interface_window_delete_event_cb_gtk_widget_delete_event (GtkWidget* _sender, GdkEventAny* event, gpointer self) { - gboolean result; - result = user_interface_window_delete_event_cb ((UserInterface*) self, _sender, event); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return result; -#line 8399 "ui.c" -} - - -static void user_interface_page_size_changed_cb (UserInterface* self, Page* page) { - Page* _tmp0_ = NULL; - gint _tmp1_ = 0; - gint _tmp2_ = 0; - Page* _tmp3_ = NULL; - gint _tmp4_ = 0; - gint _tmp5_ = 0; - Page* _tmp6_ = NULL; - gint _tmp7_ = 0; - gint _tmp8_ = 0; -#line 1730 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 1730 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (page != NULL); -#line 1732 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = page; -#line 1732 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = page_get_width (_tmp0_); -#line 1732 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = _tmp1_; -#line 1732 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self->priv->default_page_width = _tmp2_; -#line 1733 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = page; -#line 1733 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp4_ = page_get_height (_tmp3_); -#line 1733 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp5_ = _tmp4_; -#line 1733 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self->priv->default_page_height = _tmp5_; -#line 1734 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp6_ = page; -#line 1734 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp7_ = page_get_dpi (_tmp6_); -#line 1734 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp8_ = _tmp7_; -#line 1734 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self->priv->default_page_dpi = _tmp8_; -#line 1735 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_save_state (self, FALSE); -#line 8443 "ui.c" -} - - -static void user_interface_page_scan_direction_changed_cb (UserInterface* self, Page* page) { - Page* _tmp0_ = NULL; - ScanDirection _tmp1_ = 0; - ScanDirection _tmp2_ = 0; -#line 1738 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 1738 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (page != NULL); -#line 1740 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = page; -#line 1740 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = page_get_scan_direction (_tmp0_); -#line 1740 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = _tmp1_; -#line 1740 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self->priv->default_page_scan_direction = _tmp2_; -#line 1741 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_save_state (self, FALSE); -#line 8465 "ui.c" -} - - -static void _user_interface_page_size_changed_cb_page_size_changed (Page* _sender, gpointer self) { -#line 1748 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_page_size_changed_cb ((UserInterface*) self, _sender); -#line 8472 "ui.c" -} - - -static void _user_interface_page_scan_direction_changed_cb_page_scan_direction_changed (Page* _sender, gpointer self) { -#line 1749 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_page_scan_direction_changed_cb ((UserInterface*) self, _sender); -#line 8479 "ui.c" -} - - -static void user_interface_page_added_cb (UserInterface* self, Book* book, Page* page) { - Page* _tmp0_ = NULL; - Page* _tmp1_ = NULL; - ScanDirection _tmp2_ = 0; - ScanDirection _tmp3_ = 0; - Page* _tmp4_ = NULL; - Page* _tmp5_ = NULL; -#line 1744 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 1744 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (book != NULL); -#line 1744 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (page != NULL); -#line 1746 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = page; -#line 1746 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_page_size_changed_cb (self, _tmp0_); -#line 1747 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = page; -#line 1747 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = page_get_scan_direction (_tmp1_); -#line 1747 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = _tmp2_; -#line 1747 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self->priv->default_page_scan_direction = _tmp3_; -#line 1748 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp4_ = page; -#line 1748 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_signal_connect_object (_tmp4_, "size-changed", (GCallback) _user_interface_page_size_changed_cb_page_size_changed, self, 0); -#line 1749 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp5_ = page; -#line 1749 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_signal_connect_object (_tmp5_, "scan-direction-changed", (GCallback) _user_interface_page_scan_direction_changed_cb_page_scan_direction_changed, self, 0); -#line 1751 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_update_page_menu (self); -#line 8518 "ui.c" -} - - -static void user_interface_reordered_cb (UserInterface* self, Book* book) { -#line 1754 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 1754 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (book != NULL); -#line 1756 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_update_page_menu (self); -#line 8529 "ui.c" -} - - -static void user_interface_page_removed_cb (UserInterface* self, Book* book, Page* page) { - Page* _tmp0_ = NULL; - guint _tmp1_ = 0U; - Page* _tmp2_ = NULL; - guint _tmp3_ = 0U; - Book* _tmp4_ = NULL; - guint _tmp5_ = 0U; - guint _tmp6_ = 0U; -#line 1759 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 1759 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (book != NULL); -#line 1759 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (page != NULL); -#line 1761 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = page; -#line 1761 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_signal_parse_name ("size-changed", TYPE_PAGE, &_tmp1_, NULL, FALSE); -#line 1761 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _user_interface_page_size_changed_cb_page_size_changed, self); -#line 1762 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = page; -#line 1762 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_signal_parse_name ("scan-direction-changed", TYPE_PAGE, &_tmp3_, NULL, FALSE); -#line 1762 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _user_interface_page_scan_direction_changed_cb_page_scan_direction_changed, self); -#line 1765 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp4_ = book; -#line 1765 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp5_ = book_get_n_pages (_tmp4_); -#line 1765 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp6_ = _tmp5_; -#line 1765 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp6_ == ((guint) 0)) { -#line 1766 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_add_default_page (self); -#line 8569 "ui.c" - } -#line 1768 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_update_page_menu (self); -#line 8573 "ui.c" -} - - -static void user_interface_set_dpi_combo (UserInterface* self, GtkComboBox* combo, gint default_dpi, gint current_dpi) { - GtkCellRendererText* renderer = NULL; - GtkCellRendererText* _tmp0_ = NULL; - GtkComboBox* _tmp1_ = NULL; - GtkCellRendererText* _tmp2_ = NULL; - GtkComboBox* _tmp3_ = NULL; - GtkCellRendererText* _tmp4_ = NULL; - GtkListStore* model = NULL; - GtkComboBox* _tmp5_ = NULL; - GtkTreeModel* _tmp6_ = NULL; - GtkTreeModel* _tmp7_ = NULL; - GtkListStore* _tmp8_ = NULL; - gint* scan_resolutions = NULL; - gint* _tmp9_ = NULL; - gint scan_resolutions_length1 = 0; - gint _scan_resolutions_size_ = 0; - gint* _tmp10_ = NULL; - gint _tmp10__length1 = 0; -#line 1771 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 1771 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (combo != NULL); -#line 1773 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = (GtkCellRendererText*) gtk_cell_renderer_text_new (); -#line 1773 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_object_ref_sink (_tmp0_); -#line 1773 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - renderer = _tmp0_; -#line 1774 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = combo; -#line 1774 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = renderer; -#line 1774 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_cell_layout_pack_start ((GtkCellLayout*) _tmp1_, (GtkCellRenderer*) _tmp2_, TRUE); -#line 1775 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = combo; -#line 1775 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp4_ = renderer; -#line 1775 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_cell_layout_add_attribute ((GtkCellLayout*) _tmp3_, (GtkCellRenderer*) _tmp4_, "text", 1); -#line 1777 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp5_ = combo; -#line 1777 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp6_ = gtk_combo_box_get_model (_tmp5_); -#line 1777 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp7_ = _tmp6_; -#line 1777 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp8_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp7_, gtk_list_store_get_type ()) ? ((GtkListStore*) _tmp7_) : NULL); -#line 1777 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - model = _tmp8_; -#line 1778 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp9_ = g_new0 (gint, 6); -#line 1778 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp9_[0] = 75; -#line 1778 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp9_[1] = 150; -#line 1778 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp9_[2] = 300; -#line 1778 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp9_[3] = 600; -#line 1778 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp9_[4] = 1200; -#line 1778 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp9_[5] = 2400; -#line 1778 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - scan_resolutions = _tmp9_; -#line 1778 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - scan_resolutions_length1 = 6; -#line 1778 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _scan_resolutions_size_ = scan_resolutions_length1; -#line 1779 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp10_ = scan_resolutions; -#line 1779 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp10__length1 = scan_resolutions_length1; -#line 8651 "ui.c" - { - gint* dpi_collection = NULL; - gint dpi_collection_length1 = 0; - gint _dpi_collection_size_ = 0; - gint dpi_it = 0; -#line 1779 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - dpi_collection = _tmp10_; -#line 1779 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - dpi_collection_length1 = _tmp10__length1; -#line 1779 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - for (dpi_it = 0; dpi_it < _tmp10__length1; dpi_it = dpi_it + 1) { -#line 8663 "ui.c" - gint dpi = 0; -#line 1779 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - dpi = dpi_collection[dpi_it]; -#line 8667 "ui.c" - { - gchar* label = NULL; - gint _tmp11_ = 0; - gint _tmp12_ = 0; - GtkTreeIter iter = {0}; - GtkListStore* _tmp27_ = NULL; - GtkTreeIter _tmp28_ = {0}; - GtkListStore* _tmp29_ = NULL; - GtkTreeIter _tmp30_ = {0}; - gint _tmp31_ = 0; - const gchar* _tmp32_ = NULL; - gint _tmp33_ = 0; - gint _tmp34_ = 0; -#line 1782 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp11_ = dpi; -#line 1782 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp12_ = default_dpi; -#line 1782 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp11_ == _tmp12_) { -#line 8687 "ui.c" - const gchar* _tmp13_ = NULL; - gint _tmp14_ = 0; - gchar* _tmp15_ = NULL; -#line 1784 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp13_ = _ ("%d dpi (default)"); -#line 1784 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp14_ = dpi; -#line 1784 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp15_ = g_strdup_printf (_tmp13_, _tmp14_); -#line 1784 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (label); -#line 1784 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - label = _tmp15_; -#line 8701 "ui.c" - } else { - gint _tmp16_ = 0; -#line 1785 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp16_ = dpi; -#line 1785 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp16_ == 75) { -#line 8708 "ui.c" - const gchar* _tmp17_ = NULL; - gint _tmp18_ = 0; - gchar* _tmp19_ = NULL; -#line 1787 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp17_ = _ ("%d dpi (draft)"); -#line 1787 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp18_ = dpi; -#line 1787 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp19_ = g_strdup_printf (_tmp17_, _tmp18_); -#line 1787 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (label); -#line 1787 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - label = _tmp19_; -#line 8722 "ui.c" - } else { - gint _tmp20_ = 0; -#line 1788 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp20_ = dpi; -#line 1788 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp20_ == 1200) { -#line 8729 "ui.c" - const gchar* _tmp21_ = NULL; - gint _tmp22_ = 0; - gchar* _tmp23_ = NULL; -#line 1790 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp21_ = _ ("%d dpi (high resolution)"); -#line 1790 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp22_ = dpi; -#line 1790 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp23_ = g_strdup_printf (_tmp21_, _tmp22_); -#line 1790 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (label); -#line 1790 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - label = _tmp23_; -#line 8743 "ui.c" - } else { - const gchar* _tmp24_ = NULL; - gint _tmp25_ = 0; - gchar* _tmp26_ = NULL; -#line 1793 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp24_ = _ ("%d dpi"); -#line 1793 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp25_ = dpi; -#line 1793 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp26_ = g_strdup_printf (_tmp24_, _tmp25_); -#line 1793 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (label); -#line 1793 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - label = _tmp26_; -#line 8758 "ui.c" - } - } - } -#line 1796 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp27_ = model; -#line 1796 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_list_store_append (_tmp27_, &_tmp28_); -#line 1796 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - iter = _tmp28_; -#line 1797 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp29_ = model; -#line 1797 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp30_ = iter; -#line 1797 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp31_ = dpi; -#line 1797 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp32_ = label; -#line 1797 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_list_store_set (_tmp29_, &_tmp30_, 0, _tmp31_, 1, _tmp32_, -1, -1); -#line 1799 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp33_ = dpi; -#line 1799 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp34_ = current_dpi; -#line 1799 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp33_ == _tmp34_) { -#line 8784 "ui.c" - GtkComboBox* _tmp35_ = NULL; - GtkTreeIter _tmp36_ = {0}; -#line 1800 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp35_ = combo; -#line 1800 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp36_ = iter; -#line 1800 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_combo_box_set_active_iter (_tmp35_, &_tmp36_); -#line 8793 "ui.c" - } -#line 1779 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (label); -#line 8797 "ui.c" - } - } - } -#line 1771 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - scan_resolutions = (g_free (scan_resolutions), NULL); -#line 1771 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (model); -#line 1771 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (renderer); -#line 8807 "ui.c" -} - - -static void user_interface_needs_saving_cb (UserInterface* self, Book* book) { - GtkMenuItem* _tmp0_ = NULL; - Book* _tmp1_ = NULL; - gboolean _tmp2_ = FALSE; - gboolean _tmp3_ = FALSE; - GtkButton* _tmp4_ = NULL; - Book* _tmp5_ = NULL; - gboolean _tmp6_ = FALSE; - gboolean _tmp7_ = FALSE; - GtkToolButton* _tmp8_ = NULL; - Book* _tmp9_ = NULL; - gboolean _tmp10_ = FALSE; - gboolean _tmp11_ = FALSE; - Book* _tmp12_ = NULL; - gboolean _tmp13_ = FALSE; - gboolean _tmp14_ = FALSE; - GtkMenuItem* _tmp16_ = NULL; -#line 1804 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 1804 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (book != NULL); -#line 1806 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = self->priv->save_menuitem; -#line 1806 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = book; -#line 1806 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = book_get_needs_saving (_tmp1_); -#line 1806 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = _tmp2_; -#line 1806 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_set_sensitive ((GtkWidget*) _tmp0_, _tmp3_); -#line 1807 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp4_ = self->priv->save_button; -#line 1807 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp5_ = book; -#line 1807 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp6_ = book_get_needs_saving (_tmp5_); -#line 1807 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp7_ = _tmp6_; -#line 1807 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_set_sensitive ((GtkWidget*) _tmp4_, _tmp7_); -#line 1808 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp8_ = self->priv->save_toolbutton; -#line 1808 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp9_ = book; -#line 1808 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp10_ = book_get_needs_saving (_tmp9_); -#line 1808 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp11_ = _tmp10_; -#line 1808 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_set_sensitive ((GtkWidget*) _tmp8_, _tmp11_); -#line 1809 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp12_ = book; -#line 1809 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp13_ = book_get_needs_saving (_tmp12_); -#line 1809 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp14_ = _tmp13_; -#line 1809 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp14_) { -#line 8870 "ui.c" - GtkMenuItem* _tmp15_ = NULL; -#line 1810 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp15_ = self->priv->save_as_menuitem; -#line 1810 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_set_sensitive ((GtkWidget*) _tmp15_, TRUE); -#line 8876 "ui.c" - } -#line 1811 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp16_ = self->priv->copy_to_clipboard_menuitem; -#line 1811 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_set_sensitive ((GtkWidget*) _tmp16_, TRUE); -#line 8882 "ui.c" -} - - -static void _user_interface_info_bar_response_cb_gtk_info_bar_response (GtkInfoBar* _sender, gint response_id, gpointer self) { -#line 1871 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_info_bar_response_cb ((UserInterface*) self, _sender, response_id); -#line 8889 "ui.c" -} - - -static void __lambda14_ (UserInterface* self) { - GSettings* _tmp0_ = NULL; - gint _tmp1_ = 0; -#line 1915 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = self->priv->settings; -#line 1915 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = user_interface_get_text_dpi (self); -#line 1915 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_settings_set_int (_tmp0_, "text-dpi", _tmp1_); -#line 8902 "ui.c" -} - - -static void ___lambda14__gtk_combo_box_changed (GtkComboBox* _sender, gpointer self) { -#line 1915 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - __lambda14_ ((UserInterface*) self); -#line 8909 "ui.c" -} - - -static void __lambda15_ (UserInterface* self) { - GSettings* _tmp0_ = NULL; - gint _tmp1_ = 0; -#line 1920 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = self->priv->settings; -#line 1920 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = user_interface_get_photo_dpi (self); -#line 1920 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_settings_set_int (_tmp0_, "photo-dpi", _tmp1_); -#line 8922 "ui.c" -} - - -static void ___lambda15__gtk_combo_box_changed (GtkComboBox* _sender, gpointer self) { -#line 1920 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - __lambda15_ ((UserInterface*) self); -#line 8929 "ui.c" -} - - -static void __lambda16_ (UserInterface* self) { - GSettings* _tmp0_ = NULL; - ScanType _tmp1_ = 0; -#line 1930 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = self->priv->settings; -#line 1930 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = user_interface_get_page_side (self); -#line 1930 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_settings_set_enum (_tmp0_, "page-side", (gint) _tmp1_); -#line 8942 "ui.c" -} - - -static void ___lambda16__gtk_combo_box_changed (GtkComboBox* _sender, gpointer self) { -#line 1930 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - __lambda16_ ((UserInterface*) self); -#line 8949 "ui.c" -} - - -static void __lambda17_ (UserInterface* self) { - gint w = 0; - gint h = 0; - gint _tmp0_ = 0; - gint _tmp1_ = 0; - GSettings* _tmp2_ = NULL; - GSettings* _tmp3_ = NULL; -#line 1941 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_get_paper_size (self, &_tmp0_, &_tmp1_); -#line 1941 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - w = _tmp0_; -#line 1941 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - h = _tmp1_; -#line 1942 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = self->priv->settings; -#line 1942 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_settings_set_int (_tmp2_, "paper-width", w); -#line 1943 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = self->priv->settings; -#line 1943 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_settings_set_int (_tmp3_, "paper-height", h); -#line 8974 "ui.c" -} - - -static void ___lambda17__gtk_combo_box_changed (GtkComboBox* _sender, gpointer self) { -#line 1938 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - __lambda17_ ((UserInterface*) self); -#line 8981 "ui.c" -} - - -static void __lambda18_ (UserInterface* self) { - GSettings* _tmp0_ = NULL; - gint _tmp1_ = 0; - gint _tmp2_ = 0; -#line 1954 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = self->priv->settings; -#line 1954 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = user_interface_get_brightness (self); -#line 1954 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = _tmp1_; -#line 1954 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_settings_set_int (_tmp0_, "brightness", _tmp2_); -#line 8997 "ui.c" -} - - -static void ___lambda18__gtk_adjustment_value_changed (GtkAdjustment* _sender, gpointer self) { -#line 1954 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - __lambda18_ ((UserInterface*) self); -#line 9004 "ui.c" -} - - -static void __lambda19_ (UserInterface* self) { - GSettings* _tmp0_ = NULL; - gint _tmp1_ = 0; - gint _tmp2_ = 0; -#line 1964 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = self->priv->settings; -#line 1964 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = user_interface_get_contrast (self); -#line 1964 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = _tmp1_; -#line 1964 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_settings_set_int (_tmp0_, "contrast", _tmp2_); -#line 9020 "ui.c" -} - - -static void ___lambda19__gtk_adjustment_value_changed (GtkAdjustment* _sender, gpointer self) { -#line 1964 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - __lambda19_ ((UserInterface*) self); -#line 9027 "ui.c" -} - - -static void __lambda20_ (UserInterface* self) { - GSettings* _tmp0_ = NULL; - gint _tmp1_ = 0; - gint _tmp2_ = 0; -#line 1974 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = self->priv->settings; -#line 1974 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = user_interface_get_quality (self); -#line 1974 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = _tmp1_; -#line 1974 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_settings_set_int (_tmp0_, "jpeg-quality", _tmp2_); -#line 9043 "ui.c" -} - - -static void ___lambda20__gtk_adjustment_value_changed (GtkAdjustment* _sender, gpointer self) { -#line 1974 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - __lambda20_ ((UserInterface*) self); -#line 9050 "ui.c" -} - - -static void _user_interface_page_selected_cb_book_view_page_selected (BookView* _sender, Page* page, gpointer self) { -#line 1983 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_page_selected_cb ((UserInterface*) self, _sender, page); -#line 9057 "ui.c" -} - - -static void _user_interface_show_page_cb_book_view_show_page (BookView* _sender, Page* page, gpointer self) { -#line 1984 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_show_page_cb ((UserInterface*) self, _sender, page); -#line 9064 "ui.c" -} - - -static void _user_interface_show_page_menu_cb_book_view_show_menu (BookView* _sender, gpointer self) { -#line 1985 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_show_page_menu_cb ((UserInterface*) self, _sender); -#line 9071 "ui.c" -} - - -static void _user_interface_book_saving_cb_book_saving (Book* _sender, gint i, gpointer self) { -#line 2009 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_book_saving_cb ((UserInterface*) self, i); -#line 9078 "ui.c" -} - - -static void user_interface_load (UserInterface* self) { - GtkIconTheme* _tmp0_ = NULL; - GtkApplication* app = NULL; - GApplication* _tmp1_ = NULL; - GtkApplication* _tmp2_ = NULL; - gboolean _tmp3_ = FALSE; - GtkApplication* _tmp53_ = NULL; - GtkInfoBar* _tmp54_ = NULL; - GtkInfoBar* _tmp55_ = NULL; - GtkBox* _tmp56_ = NULL; - GtkInfoBar* _tmp57_ = NULL; - GtkBox* hbox = NULL; - GtkBox* _tmp58_ = NULL; - GtkContainer* content_area = NULL; - GtkInfoBar* _tmp59_ = NULL; - GtkContainer* _tmp60_ = NULL; - GtkContainer* _tmp61_ = NULL; - GtkContainer* _tmp62_ = NULL; - GtkBox* _tmp63_ = NULL; - GtkBox* _tmp64_ = NULL; - GtkImage* _tmp65_ = NULL; - GtkBox* _tmp66_ = NULL; - GtkImage* _tmp67_ = NULL; - GtkImage* _tmp68_ = NULL; - GtkLabel* _tmp69_ = NULL; - GtkLabel* _tmp70_ = NULL; - GtkBox* _tmp71_ = NULL; - GtkLabel* _tmp72_ = NULL; - GtkLabel* _tmp73_ = NULL; - GtkInfoBar* _tmp74_ = NULL; - const gchar* _tmp75_ = NULL; - GtkButton* _tmp76_ = NULL; - GtkButton* _tmp77_ = NULL; - GtkInfoBar* _tmp78_ = NULL; - const gchar* _tmp79_ = NULL; - GtkButton* _tmp80_ = NULL; - GtkButton* _tmp81_ = NULL; - GtkInfoBar* _tmp82_ = NULL; - const gchar* _tmp83_ = NULL; - GtkButton* _tmp84_ = NULL; - GtkButton* _tmp85_ = NULL; - GtkTreeIter iter = {0}; - GtkListStore* _tmp86_ = NULL; - GtkTreeIter _tmp87_ = {0}; - GtkListStore* _tmp88_ = NULL; - GtkTreeIter _tmp89_ = {0}; - const gchar* _tmp90_ = NULL; - GtkListStore* _tmp91_ = NULL; - GtkTreeIter _tmp92_ = {0}; - GtkListStore* _tmp93_ = NULL; - GtkTreeIter _tmp94_ = {0}; - GtkListStore* _tmp95_ = NULL; - GtkTreeIter _tmp96_ = {0}; - GtkListStore* _tmp97_ = NULL; - GtkTreeIter _tmp98_ = {0}; - GtkListStore* _tmp99_ = NULL; - GtkTreeIter _tmp100_ = {0}; - GtkListStore* _tmp101_ = NULL; - GtkTreeIter _tmp102_ = {0}; - GtkListStore* _tmp103_ = NULL; - GtkTreeIter _tmp104_ = {0}; - GtkListStore* _tmp105_ = NULL; - GtkTreeIter _tmp106_ = {0}; - GtkListStore* _tmp107_ = NULL; - GtkTreeIter _tmp108_ = {0}; - GtkListStore* _tmp109_ = NULL; - GtkTreeIter _tmp110_ = {0}; - GtkListStore* _tmp111_ = NULL; - GtkTreeIter _tmp112_ = {0}; - GtkListStore* _tmp113_ = NULL; - GtkTreeIter _tmp114_ = {0}; - gint dpi = 0; - GSettings* _tmp115_ = NULL; - gint _tmp116_ = 0; - gint _tmp117_ = 0; - GtkComboBox* _tmp118_ = NULL; - gint _tmp119_ = 0; - GtkComboBox* _tmp120_ = NULL; - GSettings* _tmp121_ = NULL; - gint _tmp122_ = 0; - gint _tmp123_ = 0; - GtkComboBox* _tmp124_ = NULL; - gint _tmp125_ = 0; - GtkComboBox* _tmp126_ = NULL; - GtkCellRendererText* renderer = NULL; - GtkCellRendererText* _tmp127_ = NULL; - GtkComboBox* _tmp128_ = NULL; - GtkCellRendererText* _tmp129_ = NULL; - GtkComboBox* _tmp130_ = NULL; - GtkCellRendererText* _tmp131_ = NULL; - GtkCellRendererText* _tmp132_ = NULL; - GtkComboBox* _tmp133_ = NULL; - GtkCellRendererText* _tmp134_ = NULL; - GtkComboBox* _tmp135_ = NULL; - GtkCellRendererText* _tmp136_ = NULL; - GSettings* _tmp137_ = NULL; - gint _tmp138_ = 0; - GtkComboBox* _tmp139_ = NULL; - GtkCellRendererText* _tmp140_ = NULL; - GtkComboBox* _tmp141_ = NULL; - GtkCellRendererText* _tmp142_ = NULL; - GtkComboBox* _tmp143_ = NULL; - GtkCellRendererText* _tmp144_ = NULL; - gint paper_width = 0; - GSettings* _tmp145_ = NULL; - gint _tmp146_ = 0; - gint paper_height = 0; - GSettings* _tmp147_ = NULL; - gint _tmp148_ = 0; - gint _tmp149_ = 0; - gint _tmp150_ = 0; - GtkComboBox* _tmp151_ = NULL; - gdouble lower = 0.0; - GtkAdjustment* _tmp152_ = NULL; - gdouble _tmp153_ = 0.0; - gdouble _tmp154_ = 0.0; - gchar* darker_label = NULL; - const gchar* _tmp155_ = NULL; - gchar* _tmp156_ = NULL; - gdouble upper = 0.0; - GtkAdjustment* _tmp157_ = NULL; - gdouble _tmp158_ = 0.0; - gdouble _tmp159_ = 0.0; - gchar* lighter_label = NULL; - const gchar* _tmp160_ = NULL; - gchar* _tmp161_ = NULL; - GtkScale* _tmp162_ = NULL; - gdouble _tmp163_ = 0.0; - const gchar* _tmp164_ = NULL; - GtkScale* _tmp165_ = NULL; - GtkScale* _tmp166_ = NULL; - gdouble _tmp167_ = 0.0; - const gchar* _tmp168_ = NULL; - GSettings* _tmp169_ = NULL; - gint _tmp170_ = 0; - GtkAdjustment* _tmp171_ = NULL; - GtkAdjustment* _tmp172_ = NULL; - gdouble _tmp173_ = 0.0; - gdouble _tmp174_ = 0.0; - gchar* less_label = NULL; - const gchar* _tmp175_ = NULL; - gchar* _tmp176_ = NULL; - GtkAdjustment* _tmp177_ = NULL; - gdouble _tmp178_ = 0.0; - gdouble _tmp179_ = 0.0; - gchar* more_label = NULL; - const gchar* _tmp180_ = NULL; - gchar* _tmp181_ = NULL; - GtkScale* _tmp182_ = NULL; - gdouble _tmp183_ = 0.0; - const gchar* _tmp184_ = NULL; - GtkScale* _tmp185_ = NULL; - GtkScale* _tmp186_ = NULL; - gdouble _tmp187_ = 0.0; - const gchar* _tmp188_ = NULL; - GSettings* _tmp189_ = NULL; - gint _tmp190_ = 0; - GtkAdjustment* _tmp191_ = NULL; - GtkAdjustment* _tmp192_ = NULL; - gdouble _tmp193_ = 0.0; - gdouble _tmp194_ = 0.0; - gchar* minimum_label = NULL; - const gchar* _tmp195_ = NULL; - gchar* _tmp196_ = NULL; - GtkAdjustment* _tmp197_ = NULL; - gdouble _tmp198_ = 0.0; - gdouble _tmp199_ = 0.0; - gchar* maximum_label = NULL; - const gchar* _tmp200_ = NULL; - gchar* _tmp201_ = NULL; - GtkScale* _tmp202_ = NULL; - gdouble _tmp203_ = 0.0; - const gchar* _tmp204_ = NULL; - GtkScale* _tmp205_ = NULL; - GtkScale* _tmp206_ = NULL; - gdouble _tmp207_ = 0.0; - const gchar* _tmp208_ = NULL; - GSettings* _tmp209_ = NULL; - gint _tmp210_ = 0; - GtkAdjustment* _tmp211_ = NULL; - gchar* document_type = NULL; - GSettings* _tmp212_ = NULL; - gchar* _tmp213_ = NULL; - const gchar* _tmp214_ = NULL; - Book* _tmp216_ = NULL; - BookView* _tmp217_ = NULL; - BookView* _tmp218_ = NULL; - GtkBox* _tmp219_ = NULL; - BookView* _tmp220_ = NULL; - BookView* _tmp221_ = NULL; - BookView* _tmp222_ = NULL; - BookView* _tmp223_ = NULL; - BookView* _tmp224_ = NULL; - GtkDialog* _tmp225_ = NULL; - GtkDialog* _tmp226_ = NULL; - gint _tmp227_ = 0; - gint _tmp228_ = 0; - gint _tmp229_ = 0; - gint _tmp230_ = 0; - gboolean _tmp231_ = FALSE; - gboolean _tmp232_ = FALSE; - const gchar* _tmp233_ = NULL; - ProgressBarDialog* _tmp234_ = NULL; - Book* _tmp235_ = NULL; -#line 1814 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 1816 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = gtk_icon_theme_get_default (); -#line 1816 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_icon_theme_append_search_path (_tmp0_, ICON_DIR); -#line 1818 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_window_set_default_icon_name ("scanner"); -#line 1820 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = g_application_get_default (); -#line 1820 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, gtk_application_get_type ()) ? ((GtkApplication*) _tmp1_) : NULL); -#line 1820 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - app = _tmp2_; -#line 1822 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = user_interface_is_traditional_desktop (self); -#line 1822 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp3_) { -#line 9304 "ui.c" - GtkMenuBar* _tmp4_ = NULL; - GtkToolbar* _tmp5_ = NULL; -#line 1824 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_window_set_titlebar ((GtkWindow*) self, NULL); -#line 1825 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp4_ = self->priv->menubar; -#line 1825 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_set_visible ((GtkWidget*) _tmp4_, TRUE); -#line 1826 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp5_ = self->priv->toolbar; -#line 1826 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_set_visible ((GtkWidget*) _tmp5_, TRUE); -#line 9317 "ui.c" - } else { - GtkApplication* _tmp6_ = NULL; - GMenu* appmenu = NULL; - GMenu* _tmp7_ = NULL; - GMenu* section = NULL; - GMenu* _tmp8_ = NULL; - GMenu* _tmp9_ = NULL; - GMenu* _tmp10_ = NULL; - GMenu* _tmp11_ = NULL; - const gchar* _tmp12_ = NULL; - GMenu* _tmp13_ = NULL; - GMenu* _tmp14_ = NULL; - GMenu* _tmp15_ = NULL; - GMenu* menu = NULL; - GMenu* _tmp16_ = NULL; - GMenu* _tmp17_ = NULL; - const gchar* _tmp18_ = NULL; - GMenu* _tmp19_ = NULL; - GMenu* _tmp20_ = NULL; - const gchar* _tmp21_ = NULL; - GMenu* _tmp22_ = NULL; - const gchar* _tmp23_ = NULL; - GMenu* _tmp24_ = NULL; - const gchar* _tmp25_ = NULL; - GMenu* _tmp26_ = NULL; - const gchar* _tmp27_ = NULL; - GMenu* _tmp28_ = NULL; - const gchar* _tmp29_ = NULL; - GMenu* _tmp30_ = NULL; - GMenu* _tmp31_ = NULL; - GMenu* _tmp32_ = NULL; - GMenu* _tmp33_ = NULL; - const gchar* _tmp34_ = NULL; - GMenu* _tmp35_ = NULL; - GMenu* _tmp36_ = NULL; - GMenu* _tmp37_ = NULL; - GMenu* _tmp38_ = NULL; - const gchar* _tmp39_ = NULL; - GMenu* _tmp40_ = NULL; - const gchar* _tmp41_ = NULL; - GMenu* _tmp42_ = NULL; - const gchar* _tmp43_ = NULL; - GtkApplication* _tmp44_ = NULL; - GMenu* _tmp45_ = NULL; - GtkApplication* _tmp46_ = NULL; - GtkApplication* _tmp47_ = NULL; - GtkApplication* _tmp48_ = NULL; - GtkApplication* _tmp49_ = NULL; - GtkApplication* _tmp50_ = NULL; - GtkApplication* _tmp51_ = NULL; - GtkApplication* _tmp52_ = NULL; -#line 1830 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp6_ = app; -#line 1830 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_action_map_add_action_entries ((GActionMap*) _tmp6_, USER_INTERFACE_action_entries, G_N_ELEMENTS (USER_INTERFACE_action_entries), self); -#line 1832 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp7_ = g_menu_new (); -#line 1832 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - appmenu = _tmp7_; -#line 1833 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp8_ = g_menu_new (); -#line 1833 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - section = _tmp8_; -#line 1834 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp9_ = appmenu; -#line 1834 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp10_ = section; -#line 1834 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_menu_append_section (_tmp9_, NULL, (GMenuModel*) _tmp10_); -#line 1835 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp11_ = section; -#line 1835 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp12_ = _ ("New Document"); -#line 1835 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_menu_append (_tmp11_, _tmp12_, "app.new_document"); -#line 1837 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp13_ = g_menu_new (); -#line 1837 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (section); -#line 1837 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - section = _tmp13_; -#line 1838 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp14_ = appmenu; -#line 1838 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp15_ = section; -#line 1838 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_menu_append_section (_tmp14_, NULL, (GMenuModel*) _tmp15_); -#line 1839 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp16_ = g_menu_new (); -#line 1839 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - menu = _tmp16_; -#line 1840 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp17_ = section; -#line 1840 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp18_ = _ ("Document"); -#line 1840 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp19_ = menu; -#line 1840 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_menu_append_submenu (_tmp17_, _tmp18_, (GMenuModel*) _tmp19_); -#line 1841 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp20_ = menu; -#line 1841 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp21_ = _ ("Reorder Pages"); -#line 1841 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_menu_append (_tmp20_, _tmp21_, "app.reorder"); -#line 1842 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp22_ = menu; -#line 1842 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp23_ = _ ("Save"); -#line 1842 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_menu_append (_tmp22_, _tmp23_, "app.save"); -#line 1843 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp24_ = menu; -#line 1843 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp25_ = _ ("Save As..."); -#line 1843 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_menu_append (_tmp24_, _tmp25_, "app.save_as"); -#line 1844 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp26_ = menu; -#line 1844 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp27_ = _ ("Email..."); -#line 1844 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_menu_append (_tmp26_, _tmp27_, "app.email"); -#line 1845 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp28_ = menu; -#line 1845 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp29_ = _ ("Print..."); -#line 1845 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_menu_append (_tmp28_, _tmp29_, "app.print"); -#line 1847 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp30_ = g_menu_new (); -#line 1847 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (section); -#line 1847 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - section = _tmp30_; -#line 1848 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp31_ = appmenu; -#line 1848 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp32_ = section; -#line 1848 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_menu_append_section (_tmp31_, NULL, (GMenuModel*) _tmp32_); -#line 1849 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp33_ = section; -#line 1849 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp34_ = _ ("Preferences"); -#line 1849 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_menu_append (_tmp33_, _tmp34_, "app.preferences"); -#line 1851 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp35_ = g_menu_new (); -#line 1851 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (section); -#line 1851 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - section = _tmp35_; -#line 1852 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp36_ = appmenu; -#line 1852 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp37_ = section; -#line 1852 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_menu_append_section (_tmp36_, NULL, (GMenuModel*) _tmp37_); -#line 1853 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp38_ = section; -#line 1853 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp39_ = _ ("Help"); -#line 1853 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_menu_append (_tmp38_, _tmp39_, "app.help"); -#line 1854 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp40_ = section; -#line 1854 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp41_ = _ ("About"); -#line 1854 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_menu_append (_tmp40_, _tmp41_, "app.about"); -#line 1855 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp42_ = section; -#line 1855 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp43_ = _ ("Quit"); -#line 1855 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_menu_append (_tmp42_, _tmp43_, "app.quit"); -#line 1857 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp44_ = app; -#line 1857 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp45_ = appmenu; -#line 1857 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_application_set_app_menu (_tmp44_, (GMenuModel*) _tmp45_); -#line 1859 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp46_ = app; -#line 1859 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_application_add_accelerator (_tmp46_, "<Ctrl>N", "app.new_document", NULL); -#line 1860 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp47_ = app; -#line 1860 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_application_add_accelerator (_tmp47_, "<Ctrl>S", "app.save", NULL); -#line 1861 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp48_ = app; -#line 1861 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_application_add_accelerator (_tmp48_, "<Shift><Ctrl>S", "app.save_as", NULL); -#line 1862 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp49_ = app; -#line 1862 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_application_add_accelerator (_tmp49_, "<Ctrl>E", "app.email", NULL); -#line 1863 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp50_ = app; -#line 1863 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_application_add_accelerator (_tmp50_, "<Ctrl>P", "app.print", NULL); -#line 1864 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp51_ = app; -#line 1864 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_application_add_accelerator (_tmp51_, "F1", "app.help", NULL); -#line 1865 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp52_ = app; -#line 1865 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_application_add_accelerator (_tmp52_, "<Ctrl>Q", "app.quit", NULL); -#line 1822 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (menu); -#line 1822 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (section); -#line 1822 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (appmenu); -#line 9535 "ui.c" - } -#line 1867 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp53_ = app; -#line 1867 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_application_add_window (_tmp53_, (GtkWindow*) self); -#line 1870 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp54_ = (GtkInfoBar*) gtk_info_bar_new (); -#line 1870 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_object_ref_sink (_tmp54_); -#line 1870 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->info_bar); -#line 1870 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self->priv->info_bar = _tmp54_; -#line 1871 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp55_ = self->priv->info_bar; -#line 1871 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_signal_connect_object (_tmp55_, "response", (GCallback) _user_interface_info_bar_response_cb_gtk_info_bar_response, self, 0); -#line 1872 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp56_ = self->priv->main_vbox; -#line 1872 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp57_ = self->priv->info_bar; -#line 1872 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_box_pack_start (_tmp56_, (GtkWidget*) _tmp57_, FALSE, TRUE, (guint) 0); -#line 1873 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp58_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12); -#line 1873 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_object_ref_sink (_tmp58_); -#line 1873 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - hbox = _tmp58_; -#line 1874 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp59_ = self->priv->info_bar; -#line 1874 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp60_ = gtk_info_bar_get_content_area (_tmp59_); -#line 1874 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp61_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp60_, gtk_container_get_type ()) ? ((GtkContainer*) _tmp60_) : NULL); -#line 1874 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - content_area = _tmp61_; -#line 1875 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp62_ = content_area; -#line 1875 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp63_ = hbox; -#line 1875 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_container_add (_tmp62_, (GtkWidget*) _tmp63_); -#line 1876 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp64_ = hbox; -#line 1876 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_set_visible ((GtkWidget*) _tmp64_, TRUE); -#line 1878 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp65_ = (GtkImage*) gtk_image_new_from_icon_name ("dialog-warning", GTK_ICON_SIZE_DIALOG); -#line 1878 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_object_ref_sink (_tmp65_); -#line 1878 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->info_bar_image); -#line 1878 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self->priv->info_bar_image = _tmp65_; -#line 1879 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp66_ = hbox; -#line 1879 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp67_ = self->priv->info_bar_image; -#line 1879 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_box_pack_start (_tmp66_, (GtkWidget*) _tmp67_, FALSE, TRUE, (guint) 0); -#line 1880 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp68_ = self->priv->info_bar_image; -#line 1880 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_set_visible ((GtkWidget*) _tmp68_, TRUE); -#line 1882 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp69_ = (GtkLabel*) gtk_label_new (NULL); -#line 1882 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_object_ref_sink (_tmp69_); -#line 1882 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->info_bar_label); -#line 1882 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self->priv->info_bar_label = _tmp69_; -#line 1883 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp70_ = self->priv->info_bar_label; -#line 1883 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_misc_set_alignment ((GtkMisc*) _tmp70_, 0.0f, 0.5f); -#line 1884 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp71_ = hbox; -#line 1884 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp72_ = self->priv->info_bar_label; -#line 1884 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_box_pack_start (_tmp71_, (GtkWidget*) _tmp72_, TRUE, TRUE, (guint) 0); -#line 1885 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp73_ = self->priv->info_bar_label; -#line 1885 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_set_visible ((GtkWidget*) _tmp73_, TRUE); -#line 1887 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp74_ = self->priv->info_bar; -#line 1887 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp75_ = _ ("_Close"); -#line 1887 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp76_ = gtk_info_bar_add_button (_tmp74_, _tmp75_, (gint) GTK_RESPONSE_CLOSE); -#line 1887 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp77_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp76_, gtk_button_get_type ()) ? ((GtkButton*) _tmp76_) : NULL); -#line 1887 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->info_bar_close_button); -#line 1887 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self->priv->info_bar_close_button = _tmp77_; -#line 1888 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp78_ = self->priv->info_bar; -#line 1888 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp79_ = _ ("Change _Scanner"); -#line 1888 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp80_ = gtk_info_bar_add_button (_tmp78_, _tmp79_, 1); -#line 1888 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp81_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp80_, gtk_button_get_type ()) ? ((GtkButton*) _tmp80_) : NULL); -#line 1888 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->info_bar_change_scanner_button); -#line 1888 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self->priv->info_bar_change_scanner_button = _tmp81_; -#line 1890 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp82_ = self->priv->info_bar; -#line 1890 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp83_ = _ ("_Install Drivers"); -#line 1890 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp84_ = gtk_info_bar_add_button (_tmp82_, _tmp83_, 2); -#line 1890 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp85_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp84_, gtk_button_get_type ()) ? ((GtkButton*) _tmp84_) : NULL); -#line 1890 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->info_bar_install_button); -#line 1890 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self->priv->info_bar_install_button = _tmp85_; -#line 1894 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp86_ = self->priv->paper_size_model; -#line 1894 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_list_store_append (_tmp86_, &_tmp87_); -#line 1894 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - iter = _tmp87_; -#line 1895 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp88_ = self->priv->paper_size_model; -#line 1895 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp89_ = iter; -#line 1895 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp90_ = _ ("Automatic"); -#line 1895 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_list_store_set (_tmp88_, &_tmp89_, 0, 0, 1, 0, 2, _tmp90_, -1, -1); -#line 1898 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp91_ = self->priv->paper_size_model; -#line 1898 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_list_store_append (_tmp91_, &_tmp92_); -#line 1898 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - iter = _tmp92_; -#line 1899 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp93_ = self->priv->paper_size_model; -#line 1899 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp94_ = iter; -#line 1899 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_list_store_set (_tmp93_, &_tmp94_, 0, 1050, 1, 1480, 2, "A6", -1, -1); -#line 1900 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp95_ = self->priv->paper_size_model; -#line 1900 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_list_store_append (_tmp95_, &_tmp96_); -#line 1900 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - iter = _tmp96_; -#line 1901 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp97_ = self->priv->paper_size_model; -#line 1901 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp98_ = iter; -#line 1901 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_list_store_set (_tmp97_, &_tmp98_, 0, 1480, 1, 2100, 2, "A5", -1, -1); -#line 1902 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp99_ = self->priv->paper_size_model; -#line 1902 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_list_store_append (_tmp99_, &_tmp100_); -#line 1902 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - iter = _tmp100_; -#line 1903 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp101_ = self->priv->paper_size_model; -#line 1903 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp102_ = iter; -#line 1903 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_list_store_set (_tmp101_, &_tmp102_, 0, 2100, 1, 2970, 2, "A4", -1, -1); -#line 1904 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp103_ = self->priv->paper_size_model; -#line 1904 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_list_store_append (_tmp103_, &_tmp104_); -#line 1904 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - iter = _tmp104_; -#line 1905 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp105_ = self->priv->paper_size_model; -#line 1905 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp106_ = iter; -#line 1905 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_list_store_set (_tmp105_, &_tmp106_, 0, 2159, 1, 2794, 2, "Letter", -1, -1); -#line 1906 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp107_ = self->priv->paper_size_model; -#line 1906 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_list_store_append (_tmp107_, &_tmp108_); -#line 1906 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - iter = _tmp108_; -#line 1907 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp109_ = self->priv->paper_size_model; -#line 1907 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp110_ = iter; -#line 1907 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_list_store_set (_tmp109_, &_tmp110_, 0, 2159, 1, 3556, 2, "Legal", -1, -1); -#line 1908 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp111_ = self->priv->paper_size_model; -#line 1908 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_list_store_append (_tmp111_, &_tmp112_); -#line 1908 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - iter = _tmp112_; -#line 1909 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp113_ = self->priv->paper_size_model; -#line 1909 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp114_ = iter; -#line 1909 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_list_store_set (_tmp113_, &_tmp114_, 0, 1016, 1, 1524, 2, "4×6", -1, -1); -#line 1911 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp115_ = self->priv->settings; -#line 1911 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp116_ = g_settings_get_int (_tmp115_, "text-dpi"); -#line 1911 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - dpi = _tmp116_; -#line 1912 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp117_ = dpi; -#line 1912 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp117_ <= 0) { -#line 1913 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - dpi = USER_INTERFACE_DEFAULT_TEXT_DPI; -#line 9757 "ui.c" - } -#line 1914 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp118_ = self->priv->text_dpi_combo; -#line 1914 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp119_ = dpi; -#line 1914 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_set_dpi_combo (self, _tmp118_, USER_INTERFACE_DEFAULT_TEXT_DPI, _tmp119_); -#line 1915 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp120_ = self->priv->text_dpi_combo; -#line 1915 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_signal_connect_object (_tmp120_, "changed", (GCallback) ___lambda14__gtk_combo_box_changed, self, 0); -#line 1916 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp121_ = self->priv->settings; -#line 1916 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp122_ = g_settings_get_int (_tmp121_, "photo-dpi"); -#line 1916 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - dpi = _tmp122_; -#line 1917 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp123_ = dpi; -#line 1917 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp123_ <= 0) { -#line 1918 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - dpi = USER_INTERFACE_DEFAULT_PHOTO_DPI; -#line 9781 "ui.c" - } -#line 1919 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp124_ = self->priv->photo_dpi_combo; -#line 1919 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp125_ = dpi; -#line 1919 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_set_dpi_combo (self, _tmp124_, USER_INTERFACE_DEFAULT_PHOTO_DPI, _tmp125_); -#line 1920 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp126_ = self->priv->photo_dpi_combo; -#line 1920 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_signal_connect_object (_tmp126_, "changed", (GCallback) ___lambda15__gtk_combo_box_changed, self, 0); -#line 1922 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp127_ = (GtkCellRendererText*) gtk_cell_renderer_text_new (); -#line 1922 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_object_ref_sink (_tmp127_); -#line 1922 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - renderer = _tmp127_; -#line 1923 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp128_ = self->priv->device_combo; -#line 1923 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp129_ = renderer; -#line 1923 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_cell_layout_pack_start ((GtkCellLayout*) _tmp128_, (GtkCellRenderer*) _tmp129_, TRUE); -#line 1924 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp130_ = self->priv->device_combo; -#line 1924 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp131_ = renderer; -#line 1924 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_cell_layout_add_attribute ((GtkCellLayout*) _tmp130_, (GtkCellRenderer*) _tmp131_, "text", 1); -#line 1926 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp132_ = (GtkCellRendererText*) gtk_cell_renderer_text_new (); -#line 1926 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_object_ref_sink (_tmp132_); -#line 1926 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (renderer); -#line 1926 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - renderer = _tmp132_; -#line 1927 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp133_ = self->priv->page_side_combo; -#line 1927 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp134_ = renderer; -#line 1927 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_cell_layout_pack_start ((GtkCellLayout*) _tmp133_, (GtkCellRenderer*) _tmp134_, TRUE); -#line 1928 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp135_ = self->priv->page_side_combo; -#line 1928 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp136_ = renderer; -#line 1928 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_cell_layout_add_attribute ((GtkCellLayout*) _tmp135_, (GtkCellRenderer*) _tmp136_, "text", 1); -#line 1929 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp137_ = self->priv->settings; -#line 1929 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp138_ = g_settings_get_enum (_tmp137_, "page-side"); -#line 1929 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_set_page_side (self, (ScanType) _tmp138_); -#line 1930 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp139_ = self->priv->page_side_combo; -#line 1930 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_signal_connect_object (_tmp139_, "changed", (GCallback) ___lambda16__gtk_combo_box_changed, self, 0); -#line 1932 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp140_ = (GtkCellRendererText*) gtk_cell_renderer_text_new (); -#line 1932 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_object_ref_sink (_tmp140_); -#line 1932 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (renderer); -#line 1932 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - renderer = _tmp140_; -#line 1933 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp141_ = self->priv->paper_size_combo; -#line 1933 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp142_ = renderer; -#line 1933 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_cell_layout_pack_start ((GtkCellLayout*) _tmp141_, (GtkCellRenderer*) _tmp142_, TRUE); -#line 1934 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp143_ = self->priv->paper_size_combo; -#line 1934 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp144_ = renderer; -#line 1934 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_cell_layout_add_attribute ((GtkCellLayout*) _tmp143_, (GtkCellRenderer*) _tmp144_, "text", 2); -#line 1935 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp145_ = self->priv->settings; -#line 1935 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp146_ = g_settings_get_int (_tmp145_, "paper-width"); -#line 1935 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - paper_width = _tmp146_; -#line 1936 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp147_ = self->priv->settings; -#line 1936 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp148_ = g_settings_get_int (_tmp147_, "paper-height"); -#line 1936 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - paper_height = _tmp148_; -#line 1937 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp149_ = paper_width; -#line 1937 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp150_ = paper_height; -#line 1937 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_set_paper_size (self, _tmp149_, _tmp150_); -#line 1938 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp151_ = self->priv->paper_size_combo; -#line 1938 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_signal_connect_object (_tmp151_, "changed", (GCallback) ___lambda17__gtk_combo_box_changed, self, 0); -#line 1946 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp152_ = self->priv->brightness_adjustment; -#line 1946 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp153_ = gtk_adjustment_get_lower (_tmp152_); -#line 1946 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp154_ = _tmp153_; -#line 1946 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - lower = _tmp154_; -#line 1947 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp155_ = _ ("Darker"); -#line 1947 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp156_ = g_strdup_printf ("<small>%s</small>", _tmp155_); -#line 1947 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - darker_label = _tmp156_; -#line 1948 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp157_ = self->priv->brightness_adjustment; -#line 1948 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp158_ = gtk_adjustment_get_upper (_tmp157_); -#line 1948 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp159_ = _tmp158_; -#line 1948 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - upper = _tmp159_; -#line 1949 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp160_ = _ ("Lighter"); -#line 1949 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp161_ = g_strdup_printf ("<small>%s</small>", _tmp160_); -#line 1949 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - lighter_label = _tmp161_; -#line 1950 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp162_ = self->priv->brightness_scale; -#line 1950 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp163_ = lower; -#line 1950 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp164_ = darker_label; -#line 1950 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_scale_add_mark (_tmp162_, _tmp163_, GTK_POS_BOTTOM, _tmp164_); -#line 1951 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp165_ = self->priv->brightness_scale; -#line 1951 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_scale_add_mark (_tmp165_, (gdouble) 0, GTK_POS_BOTTOM, NULL); -#line 1952 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp166_ = self->priv->brightness_scale; -#line 1952 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp167_ = upper; -#line 1952 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp168_ = lighter_label; -#line 1952 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_scale_add_mark (_tmp166_, _tmp167_, GTK_POS_BOTTOM, _tmp168_); -#line 1953 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp169_ = self->priv->settings; -#line 1953 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp170_ = g_settings_get_int (_tmp169_, "brightness"); -#line 1953 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_set_brightness (self, _tmp170_); -#line 1954 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp171_ = self->priv->brightness_adjustment; -#line 1954 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_signal_connect_object (_tmp171_, "value-changed", (GCallback) ___lambda18__gtk_adjustment_value_changed, self, 0); -#line 1956 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp172_ = self->priv->contrast_adjustment; -#line 1956 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp173_ = gtk_adjustment_get_lower (_tmp172_); -#line 1956 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp174_ = _tmp173_; -#line 1956 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - lower = _tmp174_; -#line 1957 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp175_ = _ ("Less"); -#line 1957 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp176_ = g_strdup_printf ("<small>%s</small>", _tmp175_); -#line 1957 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - less_label = _tmp176_; -#line 1958 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp177_ = self->priv->contrast_adjustment; -#line 1958 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp178_ = gtk_adjustment_get_upper (_tmp177_); -#line 1958 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp179_ = _tmp178_; -#line 1958 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - upper = _tmp179_; -#line 1959 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp180_ = _ ("More"); -#line 1959 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp181_ = g_strdup_printf ("<small>%s</small>", _tmp180_); -#line 1959 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - more_label = _tmp181_; -#line 1960 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp182_ = self->priv->contrast_scale; -#line 1960 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp183_ = lower; -#line 1960 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp184_ = less_label; -#line 1960 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_scale_add_mark (_tmp182_, _tmp183_, GTK_POS_BOTTOM, _tmp184_); -#line 1961 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp185_ = self->priv->contrast_scale; -#line 1961 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_scale_add_mark (_tmp185_, (gdouble) 0, GTK_POS_BOTTOM, NULL); -#line 1962 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp186_ = self->priv->contrast_scale; -#line 1962 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp187_ = upper; -#line 1962 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp188_ = more_label; -#line 1962 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_scale_add_mark (_tmp186_, _tmp187_, GTK_POS_BOTTOM, _tmp188_); -#line 1963 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp189_ = self->priv->settings; -#line 1963 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp190_ = g_settings_get_int (_tmp189_, "contrast"); -#line 1963 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_set_contrast (self, _tmp190_); -#line 1964 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp191_ = self->priv->contrast_adjustment; -#line 1964 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_signal_connect_object (_tmp191_, "value-changed", (GCallback) ___lambda19__gtk_adjustment_value_changed, self, 0); -#line 1966 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp192_ = self->priv->quality_adjustment; -#line 1966 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp193_ = gtk_adjustment_get_lower (_tmp192_); -#line 1966 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp194_ = _tmp193_; -#line 1966 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - lower = _tmp194_; -#line 1967 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp195_ = _ ("Minimum"); -#line 1967 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp196_ = g_strdup_printf ("<small>%s</small>", _tmp195_); -#line 1967 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - minimum_label = _tmp196_; -#line 1968 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp197_ = self->priv->quality_adjustment; -#line 1968 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp198_ = gtk_adjustment_get_upper (_tmp197_); -#line 1968 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp199_ = _tmp198_; -#line 1968 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - upper = _tmp199_; -#line 1969 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp200_ = _ ("Maximum"); -#line 1969 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp201_ = g_strdup_printf ("<small>%s</small>", _tmp200_); -#line 1969 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - maximum_label = _tmp201_; -#line 1970 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp202_ = self->priv->quality_scale; -#line 1970 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp203_ = lower; -#line 1970 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp204_ = minimum_label; -#line 1970 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_scale_add_mark (_tmp202_, _tmp203_, GTK_POS_BOTTOM, _tmp204_); -#line 1971 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp205_ = self->priv->quality_scale; -#line 1971 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_scale_add_mark (_tmp205_, (gdouble) 75, GTK_POS_BOTTOM, NULL); -#line 1972 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp206_ = self->priv->quality_scale; -#line 1972 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp207_ = upper; -#line 1972 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp208_ = maximum_label; -#line 1972 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_scale_add_mark (_tmp206_, _tmp207_, GTK_POS_BOTTOM, _tmp208_); -#line 1973 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp209_ = self->priv->settings; -#line 1973 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp210_ = g_settings_get_int (_tmp209_, "jpeg-quality"); -#line 1973 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_set_quality (self, _tmp210_); -#line 1974 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp211_ = self->priv->quality_adjustment; -#line 1974 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_signal_connect_object (_tmp211_, "value-changed", (GCallback) ___lambda20__gtk_adjustment_value_changed, self, 0); -#line 1976 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp212_ = self->priv->settings; -#line 1976 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp213_ = g_settings_get_string (_tmp212_, "document-type"); -#line 1976 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - document_type = _tmp213_; -#line 1977 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp214_ = document_type; -#line 1977 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp214_ != NULL) { -#line 10067 "ui.c" - const gchar* _tmp215_ = NULL; -#line 1978 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp215_ = document_type; -#line 1978 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_set_document_hint (self, _tmp215_, FALSE); -#line 10073 "ui.c" - } -#line 1980 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp216_ = self->priv->_book; -#line 1980 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp217_ = book_view_new (_tmp216_); -#line 1980 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_object_ref_sink (_tmp217_); -#line 1980 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->book_view); -#line 1980 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self->priv->book_view = _tmp217_; -#line 1981 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp218_ = self->priv->book_view; -#line 1981 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_container_set_border_width ((GtkContainer*) _tmp218_, (guint) 18); -#line 1982 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp219_ = self->priv->main_vbox; -#line 1982 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp220_ = self->priv->book_view; -#line 1982 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_box_pack_end (_tmp219_, (GtkWidget*) _tmp220_, TRUE, TRUE, (guint) 0); -#line 1983 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp221_ = self->priv->book_view; -#line 1983 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_signal_connect_object (_tmp221_, "page-selected", (GCallback) _user_interface_page_selected_cb_book_view_page_selected, self, 0); -#line 1984 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp222_ = self->priv->book_view; -#line 1984 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_signal_connect_object (_tmp222_, "show-page", (GCallback) _user_interface_show_page_cb_book_view_show_page, self, 0); -#line 1985 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp223_ = self->priv->book_view; -#line 1985 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_signal_connect_object (_tmp223_, "show-menu", (GCallback) _user_interface_show_page_menu_cb_book_view_show_menu, self, 0); -#line 1986 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp224_ = self->priv->book_view; -#line 1986 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_set_visible ((GtkWidget*) _tmp224_, TRUE); -#line 1988 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp225_ = self->priv->authorize_dialog; -#line 1988 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_window_set_transient_for ((GtkWindow*) _tmp225_, (GtkWindow*) self); -#line 1989 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp226_ = self->priv->preferences_dialog; -#line 1989 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_window_set_transient_for ((GtkWindow*) _tmp226_, (GtkWindow*) self); -#line 1992 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_load_state (self); -#line 1995 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp227_ = self->priv->window_width; -#line 1995 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp228_ = self->priv->window_height; -#line 1995 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_debug ("ui.vala:1995: Restoring window to %dx%d pixels", _tmp227_, _tmp228_); -#line 1996 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp229_ = self->priv->window_width; -#line 1996 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp230_ = self->priv->window_height; -#line 1996 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_window_set_default_size ((GtkWindow*) self, _tmp229_, _tmp230_); -#line 1997 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp231_ = self->priv->window_is_maximized; -#line 1997 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp231_) { -#line 1999 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_debug ("ui.vala:1999: Restoring window to maximized"); -#line 2000 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_window_maximize ((GtkWindow*) self); -#line 10141 "ui.c" - } -#line 2002 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp232_ = self->priv->window_is_fullscreen; -#line 2002 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp232_) { -#line 2004 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_debug ("ui.vala:2004: Restoring window to fullscreen"); -#line 2005 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_window_fullscreen ((GtkWindow*) self); -#line 10151 "ui.c" - } -#line 2008 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp233_ = _ ("Saving document..."); -#line 2008 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp234_ = progress_bar_dialog_new ((GtkApplicationWindow*) self, _tmp233_); -#line 2008 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_object_ref_sink (_tmp234_); -#line 2008 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->progress_dialog); -#line 2008 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self->priv->progress_dialog = _tmp234_; -#line 2009 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp235_ = self->priv->_book; -#line 2009 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_signal_connect_object (_tmp235_, "saving", (GCallback) _user_interface_book_saving_cb_book_saving, self, 0); -#line 1814 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (document_type); -#line 1814 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (maximum_label); -#line 1814 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (minimum_label); -#line 1814 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (more_label); -#line 1814 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (less_label); -#line 1814 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (lighter_label); -#line 1814 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (darker_label); -#line 1814 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (renderer); -#line 1814 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (content_area); -#line 1814 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (hbox); -#line 1814 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (app); -#line 10189 "ui.c" -} - - -static gboolean user_interface_is_desktop (UserInterface* self, const gchar* name) { - gboolean result = FALSE; - gchar* desktop_name_list = NULL; - const gchar* _tmp0_ = NULL; - gchar* _tmp1_ = NULL; - const gchar* _tmp2_ = NULL; - const gchar* _tmp3_ = NULL; - gchar** _tmp4_ = NULL; - gchar** _tmp5_ = NULL; -#line 2012 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_val_if_fail (self != NULL, FALSE); -#line 2012 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_val_if_fail (name != NULL, FALSE); -#line 2014 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = g_getenv ("XDG_CURRENT_DESKTOP"); -#line 2014 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = g_strdup (_tmp0_); -#line 2014 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - desktop_name_list = _tmp1_; -#line 2015 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = desktop_name_list; -#line 2015 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp2_ == NULL) { -#line 2016 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - result = FALSE; -#line 2016 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (desktop_name_list); -#line 2016 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return result; -#line 10222 "ui.c" - } -#line 2018 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = desktop_name_list; -#line 2018 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp5_ = _tmp4_ = g_strsplit (_tmp3_, ":", 0); -#line 10228 "ui.c" - { - gchar** n_collection = NULL; - gint n_collection_length1 = 0; - gint _n_collection_size_ = 0; - gint n_it = 0; -#line 2018 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - n_collection = _tmp5_; -#line 2018 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - n_collection_length1 = _vala_array_length (_tmp4_); -#line 2018 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - for (n_it = 0; n_it < _vala_array_length (_tmp4_); n_it = n_it + 1) { -#line 10240 "ui.c" - gchar* _tmp6_ = NULL; - gchar* n = NULL; -#line 2018 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp6_ = g_strdup (n_collection[n_it]); -#line 2018 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - n = _tmp6_; -#line 10247 "ui.c" - { - const gchar* _tmp7_ = NULL; - const gchar* _tmp8_ = NULL; -#line 2019 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp7_ = n; -#line 2019 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp8_ = name; -#line 2019 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (g_strcmp0 (_tmp7_, _tmp8_) == 0) { -#line 2020 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - result = TRUE; -#line 2020 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (n); -#line 2020 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - n_collection = (_vala_array_free (n_collection, n_collection_length1, (GDestroyNotify) g_free), NULL); -#line 2020 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (desktop_name_list); -#line 2020 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return result; -#line 10267 "ui.c" - } -#line 2018 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (n); -#line 10271 "ui.c" - } - } -#line 2018 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - n_collection = (_vala_array_free (n_collection, n_collection_length1, (GDestroyNotify) g_free), NULL); -#line 10276 "ui.c" - } -#line 2022 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - result = FALSE; -#line 2022 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (desktop_name_list); -#line 2022 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return result; -#line 10284 "ui.c" -} - - -static gboolean user_interface_is_traditional_desktop (UserInterface* self) { - gboolean result = FALSE; -#line 2027 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - static const gchar* traditional_desktops[] = {"Unity", "XFCE", "MATE", "LXDE", "Cinnamon", "X-Cinnamon"}; -#line 2025 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_val_if_fail (self != NULL, FALSE); -#line 10294 "ui.c" - { - const gchar** name_collection = NULL; - gint name_collection_length1 = 0; - gint _name_collection_size_ = 0; - gint name_it = 0; -#line 2028 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - name_collection = traditional_desktops; -#line 2028 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - name_collection_length1 = G_N_ELEMENTS (traditional_desktops); -#line 2028 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - for (name_it = 0; name_it < G_N_ELEMENTS (traditional_desktops); name_it = name_it + 1) { -#line 10306 "ui.c" - const gchar* name = NULL; -#line 2028 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - name = name_collection[name_it]; -#line 10310 "ui.c" - { - const gchar* _tmp0_ = NULL; - gboolean _tmp1_ = FALSE; -#line 2029 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = name; -#line 2029 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = user_interface_is_desktop (self, _tmp0_); -#line 2029 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp1_) { -#line 2030 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - result = TRUE; -#line 2030 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return result; -#line 10324 "ui.c" - } - } - } - } -#line 2031 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - result = FALSE; -#line 2031 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return result; -#line 10333 "ui.c" -} - - -static void user_interface_load_state (UserInterface* self) { - gchar* _tmp0_ = NULL; - gchar* _tmp1_ = NULL; - gchar* _tmp2_ = NULL; - GKeyFile* f = NULL; - GKeyFile* _tmp3_ = NULL; - GKeyFile* _tmp11_ = NULL; - gint _tmp12_ = 0; - gint _tmp13_ = 0; - GKeyFile* _tmp14_ = NULL; - gint _tmp15_ = 0; - gint _tmp16_ = 0; - GKeyFile* _tmp17_ = NULL; - gboolean _tmp18_ = FALSE; - GKeyFile* _tmp19_ = NULL; - gboolean _tmp20_ = FALSE; - GKeyFile* _tmp21_ = NULL; - gint _tmp22_ = 0; - GKeyFile* _tmp23_ = NULL; - gint _tmp24_ = 0; - GKeyFile* _tmp25_ = NULL; - gint _tmp26_ = 0; - GKeyFile* _tmp27_ = NULL; - gchar* _tmp28_ = NULL; - gchar* _tmp29_ = NULL; - GQuark _tmp31_ = 0U; -#line 2064 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - static GQuark _tmp30_label0 = 0; -#line 2064 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - static GQuark _tmp30_label1 = 0; -#line 2064 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - static GQuark _tmp30_label2 = 0; -#line 10369 "ui.c" - GError * _inner_error_ = NULL; -#line 2039 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 2041 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = user_interface_get_state_filename (self); -#line 2041 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = _tmp0_; -#line 2041 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = _tmp1_; -#line 2041 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_debug ("ui.vala:2041: Loading state from %s", _tmp2_); -#line 2041 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (_tmp2_); -#line 2043 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = g_key_file_new (); -#line 2043 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - f = _tmp3_; -#line 10387 "ui.c" - { - GKeyFile* _tmp4_ = NULL; - gchar* _tmp5_ = NULL; - gchar* _tmp6_ = NULL; - gchar* _tmp7_ = NULL; -#line 2046 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp4_ = f; -#line 2046 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp5_ = user_interface_get_state_filename (self); -#line 2046 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp6_ = _tmp5_; -#line 2046 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp7_ = _tmp6_; -#line 2046 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_key_file_load_from_file (_tmp4_, _tmp7_, G_KEY_FILE_NONE, &_inner_error_); -#line 2046 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (_tmp7_); -#line 2046 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 10407 "ui.c" - goto __catch23_g_error; - } - } - goto __finally23; - __catch23_g_error: - { - GError* e = NULL; - GError* _tmp8_ = NULL; -#line 2044 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - e = _inner_error_; -#line 2044 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _inner_error_ = NULL; -#line 2050 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp8_ = e; -#line 2050 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (!g_error_matches (_tmp8_, G_FILE_ERROR, G_FILE_ERROR_NOENT)) { -#line 10424 "ui.c" - GError* _tmp9_ = NULL; - const gchar* _tmp10_ = NULL; -#line 2051 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp9_ = e; -#line 2051 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp10_ = _tmp9_->message; -#line 2051 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_warning ("ui.vala:2051: Failed to load state: %s", _tmp10_); -#line 10433 "ui.c" - } -#line 2044 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_error_free0 (e); -#line 10437 "ui.c" - } - __finally23: -#line 2044 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 2044 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_key_file_unref0 (f); -#line 2044 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - 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); -#line 2044 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_clear_error (&_inner_error_); -#line 2044 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return; -#line 10450 "ui.c" - } -#line 2053 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp11_ = f; -#line 2053 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp12_ = user_interface_state_get_integer (self, _tmp11_, "window", "width", 600); -#line 2053 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self->priv->window_width = _tmp12_; -#line 2054 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp13_ = self->priv->window_width; -#line 2054 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp13_ <= 0) { -#line 2055 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self->priv->window_width = 600; -#line 10464 "ui.c" - } -#line 2056 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp14_ = f; -#line 2056 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp15_ = user_interface_state_get_integer (self, _tmp14_, "window", "height", 400); -#line 2056 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self->priv->window_height = _tmp15_; -#line 2057 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp16_ = self->priv->window_height; -#line 2057 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp16_ <= 0) { -#line 2058 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self->priv->window_height = 400; -#line 10478 "ui.c" - } -#line 2059 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp17_ = f; -#line 2059 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp18_ = user_interface_state_get_boolean (self, _tmp17_, "window", "is-maximized", FALSE); -#line 2059 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self->priv->window_is_maximized = _tmp18_; -#line 2060 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp19_ = f; -#line 2060 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp20_ = user_interface_state_get_boolean (self, _tmp19_, "window", "is-fullscreen", FALSE); -#line 2060 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self->priv->window_is_fullscreen = _tmp20_; -#line 2061 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp21_ = f; -#line 2061 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp22_ = user_interface_state_get_integer (self, _tmp21_, "last-page", "width", 595); -#line 2061 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self->priv->default_page_width = _tmp22_; -#line 2062 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp23_ = f; -#line 2062 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp24_ = user_interface_state_get_integer (self, _tmp23_, "last-page", "height", 842); -#line 2062 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self->priv->default_page_height = _tmp24_; -#line 2063 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp25_ = f; -#line 2063 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp26_ = user_interface_state_get_integer (self, _tmp25_, "last-page", "dpi", 72); -#line 2063 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self->priv->default_page_dpi = _tmp26_; -#line 2064 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp27_ = f; -#line 2064 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp28_ = user_interface_state_get_string (self, _tmp27_, "last-page", "scan-direction", "top-to-bottom"); -#line 2064 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp29_ = _tmp28_; -#line 2064 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp31_ = (NULL == _tmp29_) ? 0 : g_quark_from_string (_tmp29_); -#line 2064 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_free (_tmp29_); -#line 2064 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp31_ == ((0 != _tmp30_label0) ? _tmp30_label0 : (_tmp30_label0 = g_quark_from_static_string ("bottom-to-top")))) { -#line 2064 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - switch (0) { -#line 10524 "ui.c" - default: - { -#line 2071 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self->priv->default_page_scan_direction = SCAN_DIRECTION_BOTTOM_TO_TOP; -#line 2072 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - break; -#line 10531 "ui.c" - } - } - } else if (_tmp31_ == ((0 != _tmp30_label1) ? _tmp30_label1 : (_tmp30_label1 = g_quark_from_static_string ("left-to-right")))) { -#line 2064 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - switch (0) { -#line 10537 "ui.c" - default: - { -#line 2074 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self->priv->default_page_scan_direction = SCAN_DIRECTION_LEFT_TO_RIGHT; -#line 2075 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - break; -#line 10544 "ui.c" - } - } - } else if (_tmp31_ == ((0 != _tmp30_label2) ? _tmp30_label2 : (_tmp30_label2 = g_quark_from_static_string ("right-to-left")))) { -#line 2064 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - switch (0) { -#line 10550 "ui.c" - default: - { -#line 2077 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self->priv->default_page_scan_direction = SCAN_DIRECTION_RIGHT_TO_LEFT; -#line 2078 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - break; -#line 10557 "ui.c" - } - } - } else { -#line 2064 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - switch (0) { -#line 10563 "ui.c" - default: - { -#line 2068 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self->priv->default_page_scan_direction = SCAN_DIRECTION_TOP_TO_BOTTOM; -#line 2069 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - break; -#line 10570 "ui.c" - } - } - } -#line 2039 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_key_file_unref0 (f); -#line 10576 "ui.c" -} - - -static gint user_interface_state_get_integer (UserInterface* self, GKeyFile* f, const gchar* group_name, const gchar* key, gint _default_) { - gint result = 0; - gint _tmp6_ = 0; - GError * _inner_error_ = NULL; -#line 2082 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_val_if_fail (self != NULL, 0); -#line 2082 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_val_if_fail (f != NULL, 0); -#line 2082 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_val_if_fail (group_name != NULL, 0); -#line 2082 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_val_if_fail (key != NULL, 0); -#line 10592 "ui.c" - { - gint _tmp0_ = 0; - GKeyFile* _tmp1_ = NULL; - const gchar* _tmp2_ = NULL; - const gchar* _tmp3_ = NULL; - gint _tmp4_ = 0; -#line 2086 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = f; -#line 2086 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = group_name; -#line 2086 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = key; -#line 2086 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp4_ = g_key_file_get_integer (_tmp1_, _tmp2_, _tmp3_, &_inner_error_); -#line 2086 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = _tmp4_; -#line 2086 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 10611 "ui.c" - goto __catch24_g_error; - } -#line 2086 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - result = _tmp0_; -#line 2086 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return result; -#line 10618 "ui.c" - } - goto __finally24; - __catch24_g_error: - { - gint _tmp5_ = 0; -#line 2084 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_clear_error (&_inner_error_); -#line 2084 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _inner_error_ = NULL; -#line 2090 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp5_ = _default_; -#line 2090 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - result = _tmp5_; -#line 2090 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return result; -#line 10634 "ui.c" - } - __finally24: -#line 2084 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - 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); -#line 2084 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_clear_error (&_inner_error_); -#line 2084 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return _tmp6_; -#line 10643 "ui.c" -} - - -static gboolean user_interface_state_get_boolean (UserInterface* self, GKeyFile* f, const gchar* group_name, const gchar* key, gboolean _default_) { - gboolean result = FALSE; - gboolean _tmp6_ = FALSE; - GError * _inner_error_ = NULL; -#line 2094 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_val_if_fail (self != NULL, FALSE); -#line 2094 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_val_if_fail (f != NULL, FALSE); -#line 2094 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_val_if_fail (group_name != NULL, FALSE); -#line 2094 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_val_if_fail (key != NULL, FALSE); -#line 10659 "ui.c" - { - gboolean _tmp0_ = FALSE; - GKeyFile* _tmp1_ = NULL; - const gchar* _tmp2_ = NULL; - const gchar* _tmp3_ = NULL; - gboolean _tmp4_ = FALSE; -#line 2098 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = f; -#line 2098 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = group_name; -#line 2098 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = key; -#line 2098 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp4_ = g_key_file_get_boolean (_tmp1_, _tmp2_, _tmp3_, &_inner_error_); -#line 2098 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = _tmp4_; -#line 2098 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 10678 "ui.c" - goto __catch25_g_error; - } -#line 2098 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - result = _tmp0_; -#line 2098 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return result; -#line 10685 "ui.c" - } - goto __finally25; - __catch25_g_error: - { - gboolean _tmp5_ = FALSE; -#line 2096 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_clear_error (&_inner_error_); -#line 2096 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _inner_error_ = NULL; -#line 2102 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp5_ = _default_; -#line 2102 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - result = _tmp5_; -#line 2102 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return result; -#line 10701 "ui.c" - } - __finally25: -#line 2096 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - 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); -#line 2096 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_clear_error (&_inner_error_); -#line 2096 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return _tmp6_; -#line 10710 "ui.c" -} - - -static gchar* user_interface_state_get_string (UserInterface* self, GKeyFile* f, const gchar* group_name, const gchar* key, const gchar* _default_) { - gchar* result = NULL; - GError * _inner_error_ = NULL; -#line 2106 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_val_if_fail (self != NULL, NULL); -#line 2106 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_val_if_fail (f != NULL, NULL); -#line 2106 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_val_if_fail (group_name != NULL, NULL); -#line 2106 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_val_if_fail (key != NULL, NULL); -#line 2106 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_val_if_fail (_default_ != NULL, NULL); -#line 10727 "ui.c" - { - gchar* _tmp0_ = NULL; - GKeyFile* _tmp1_ = NULL; - const gchar* _tmp2_ = NULL; - const gchar* _tmp3_ = NULL; - gchar* _tmp4_ = NULL; - gchar* _tmp5_ = NULL; -#line 2110 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = f; -#line 2110 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = group_name; -#line 2110 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = key; -#line 2110 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp4_ = g_key_file_get_string (_tmp1_, _tmp2_, _tmp3_, &_inner_error_); -#line 2110 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = _tmp4_; -#line 2110 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 10747 "ui.c" - goto __catch26_g_error; - } -#line 2110 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp5_ = _tmp0_; -#line 2110 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = NULL; -#line 2110 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - result = _tmp5_; -#line 2110 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (_tmp0_); -#line 2110 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return result; -#line 10760 "ui.c" - } - goto __finally26; - __catch26_g_error: - { - const gchar* _tmp6_ = NULL; - gchar* _tmp7_ = NULL; -#line 2108 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_clear_error (&_inner_error_); -#line 2108 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _inner_error_ = NULL; -#line 2114 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp6_ = _default_; -#line 2114 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp7_ = g_strdup (_tmp6_); -#line 2114 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - result = _tmp7_; -#line 2114 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return result; -#line 10779 "ui.c" - } - __finally26: -#line 2108 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - 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); -#line 2108 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_clear_error (&_inner_error_); -#line 2108 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return NULL; -#line 10788 "ui.c" -} - - -static gboolean ___lambda11_ (UserInterface* self) { - gboolean result = FALSE; -#line 2126 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_save_state (self, TRUE); -#line 2127 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self->priv->save_state_timeout = (guint) 0; -#line 2128 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - result = FALSE; -#line 2128 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return result; -#line 10802 "ui.c" -} - - -static gboolean ____lambda11__gsource_func (gpointer self) { - gboolean result; - result = ___lambda11_ ((UserInterface*) self); -#line 2124 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return result; -#line 10811 "ui.c" -} - - -static void user_interface_save_state (UserInterface* self, gboolean force) { - gboolean _tmp0_ = FALSE; - gchar* _tmp4_ = NULL; - gchar* _tmp5_ = NULL; - gchar* _tmp6_ = NULL; - GKeyFile* f = NULL; - GKeyFile* _tmp7_ = NULL; - GKeyFile* _tmp8_ = NULL; - gint _tmp9_ = 0; - GKeyFile* _tmp10_ = NULL; - gint _tmp11_ = 0; - GKeyFile* _tmp12_ = NULL; - gboolean _tmp13_ = FALSE; - GKeyFile* _tmp14_ = NULL; - gboolean _tmp15_ = FALSE; - GKeyFile* _tmp16_ = NULL; - gint _tmp17_ = 0; - GKeyFile* _tmp18_ = NULL; - gint _tmp19_ = 0; - GKeyFile* _tmp20_ = NULL; - gint _tmp21_ = 0; - ScanDirection _tmp22_ = 0; - GError * _inner_error_ = NULL; -#line 2118 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 2120 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = force; -#line 2120 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (!_tmp0_) { -#line 10844 "ui.c" - guint _tmp1_ = 0U; - guint _tmp3_ = 0U; -#line 2122 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = self->priv->save_state_timeout; -#line 2122 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp1_ != ((guint) 0)) { -#line 10851 "ui.c" - guint _tmp2_ = 0U; -#line 2123 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = self->priv->save_state_timeout; -#line 2123 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_source_remove (_tmp2_); -#line 10857 "ui.c" - } -#line 2124 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 100, ____lambda11__gsource_func, g_object_ref (self), g_object_unref); -#line 2124 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self->priv->save_state_timeout = _tmp3_; -#line 2130 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return; -#line 10865 "ui.c" - } -#line 2133 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp4_ = user_interface_get_state_filename (self); -#line 2133 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp5_ = _tmp4_; -#line 2133 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp6_ = _tmp5_; -#line 2133 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_debug ("ui.vala:2133: Saving state to %s", _tmp6_); -#line 2133 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (_tmp6_); -#line 2135 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp7_ = g_key_file_new (); -#line 2135 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - f = _tmp7_; -#line 2136 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp8_ = f; -#line 2136 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp9_ = self->priv->window_width; -#line 2136 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_key_file_set_integer (_tmp8_, "window", "width", _tmp9_); -#line 2137 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp10_ = f; -#line 2137 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp11_ = self->priv->window_height; -#line 2137 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_key_file_set_integer (_tmp10_, "window", "height", _tmp11_); -#line 2138 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp12_ = f; -#line 2138 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp13_ = self->priv->window_is_maximized; -#line 2138 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_key_file_set_boolean (_tmp12_, "window", "is-maximized", _tmp13_); -#line 2139 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp14_ = f; -#line 2139 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp15_ = self->priv->window_is_fullscreen; -#line 2139 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_key_file_set_boolean (_tmp14_, "window", "is-fullscreen", _tmp15_); -#line 2140 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp16_ = f; -#line 2140 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp17_ = self->priv->default_page_width; -#line 2140 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_key_file_set_integer (_tmp16_, "last-page", "width", _tmp17_); -#line 2141 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp18_ = f; -#line 2141 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp19_ = self->priv->default_page_height; -#line 2141 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_key_file_set_integer (_tmp18_, "last-page", "height", _tmp19_); -#line 2142 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp20_ = f; -#line 2142 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp21_ = self->priv->default_page_dpi; -#line 2142 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_key_file_set_integer (_tmp20_, "last-page", "dpi", _tmp21_); -#line 2143 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp22_ = self->priv->default_page_scan_direction; -#line 2143 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - switch (_tmp22_) { -#line 2143 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - case SCAN_DIRECTION_TOP_TO_BOTTOM: -#line 10929 "ui.c" - { - GKeyFile* _tmp23_ = NULL; -#line 2146 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp23_ = f; -#line 2146 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_key_file_set_value (_tmp23_, "last-page", "scan-direction", "top-to-bottom"); -#line 2147 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - break; -#line 10938 "ui.c" - } -#line 2143 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - case SCAN_DIRECTION_BOTTOM_TO_TOP: -#line 10942 "ui.c" - { - GKeyFile* _tmp24_ = NULL; -#line 2149 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp24_ = f; -#line 2149 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_key_file_set_value (_tmp24_, "last-page", "scan-direction", "bottom-to-top"); -#line 2150 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - break; -#line 10951 "ui.c" - } -#line 2143 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - case SCAN_DIRECTION_LEFT_TO_RIGHT: -#line 10955 "ui.c" - { - GKeyFile* _tmp25_ = NULL; -#line 2152 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp25_ = f; -#line 2152 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_key_file_set_value (_tmp25_, "last-page", "scan-direction", "left-to-right"); -#line 2153 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - break; -#line 10964 "ui.c" - } -#line 2143 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - case SCAN_DIRECTION_RIGHT_TO_LEFT: -#line 10968 "ui.c" - { - GKeyFile* _tmp26_ = NULL; -#line 2155 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp26_ = f; -#line 2155 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_key_file_set_value (_tmp26_, "last-page", "scan-direction", "right-to-left"); -#line 2156 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - break; -#line 10977 "ui.c" - } - default: -#line 2143 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - break; -#line 10982 "ui.c" - } - { - gchar* _tmp27_ = NULL; - gchar* _tmp28_ = NULL; - gchar* _tmp29_ = NULL; - GKeyFile* _tmp30_ = NULL; - gchar* _tmp31_ = NULL; - gchar* _tmp32_ = NULL; -#line 2160 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp27_ = user_interface_get_state_filename (self); -#line 2160 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp28_ = _tmp27_; -#line 2160 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp29_ = _tmp28_; -#line 2160 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp30_ = f; -#line 2160 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp31_ = g_key_file_to_data (_tmp30_, NULL, NULL); -#line 2160 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp32_ = _tmp31_; -#line 2160 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_file_set_contents (_tmp29_, _tmp32_, (gssize) -1, &_inner_error_); -#line 2160 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (_tmp32_); -#line 2160 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (_tmp29_); -#line 2160 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 11011 "ui.c" - goto __catch27_g_error; - } - } - goto __finally27; - __catch27_g_error: - { - GError* e = NULL; - GError* _tmp33_ = NULL; - const gchar* _tmp34_ = NULL; -#line 2158 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - e = _inner_error_; -#line 2158 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _inner_error_ = NULL; -#line 2164 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp33_ = e; -#line 2164 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp34_ = _tmp33_->message; -#line 2164 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_warning ("ui.vala:2164: Failed to write state: %s", _tmp34_); -#line 2158 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_error_free0 (e); -#line 11033 "ui.c" - } - __finally27: -#line 2158 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 2158 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_key_file_unref0 (f); -#line 2158 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - 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); -#line 2158 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_clear_error (&_inner_error_); -#line 2158 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return; -#line 11046 "ui.c" - } -#line 2118 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_key_file_unref0 (f); -#line 11050 "ui.c" -} - - -static gboolean ___lambda21_ (UserInterface* self) { - gboolean result = FALSE; - ProgressBarDialog* _tmp0_ = NULL; -#line 2179 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = self->priv->progress_dialog; -#line 2179 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_set_visible ((GtkWidget*) _tmp0_, FALSE); -#line 2180 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - result = FALSE; -#line 2180 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return result; -#line 11065 "ui.c" -} - - -static gboolean ____lambda21__gsource_func (gpointer self) { - gboolean result; - result = ___lambda21_ ((UserInterface*) self); -#line 2178 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return result; -#line 11074 "ui.c" -} - - -static void user_interface_book_saving_cb (UserInterface* self, gint page_number) { - gint total = 0; - Book* _tmp1_ = NULL; - guint _tmp2_ = 0U; - guint _tmp3_ = 0U; - gdouble fraction = 0.0; - gint _tmp4_ = 0; - gint _tmp5_ = 0; - gboolean complete = FALSE; - gdouble _tmp6_ = 0.0; - gboolean _tmp7_ = FALSE; - gchar* message = NULL; - const gchar* _tmp8_ = NULL; - gint _tmp9_ = 0; - gint _tmp10_ = 0; - gchar* _tmp11_ = NULL; - ProgressBarDialog* _tmp12_ = NULL; - gdouble _tmp13_ = 0.0; - ProgressBarDialog* _tmp14_ = NULL; -#line 2168 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 2171 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - while (TRUE) { -#line 11101 "ui.c" - gboolean _tmp0_ = FALSE; -#line 2171 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = gtk_events_pending (); -#line 2171 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (!_tmp0_) { -#line 2171 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - break; -#line 11109 "ui.c" - } -#line 2172 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_main_iteration (); -#line 11113 "ui.c" - } -#line 2174 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = self->priv->_book; -#line 2174 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = book_get_n_pages (_tmp1_); -#line 2174 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = _tmp2_; -#line 2174 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - total = (gint) _tmp3_; -#line 2175 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp4_ = page_number; -#line 2175 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp5_ = total; -#line 2175 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - fraction = (_tmp4_ + 1.0) / _tmp5_; -#line 2176 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp6_ = fraction; -#line 2176 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - complete = _tmp6_ == 1.0; -#line 2177 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp7_ = complete; -#line 2177 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp7_) { -#line 2178 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 500, ____lambda21__gsource_func, g_object_ref (self), g_object_unref); -#line 11139 "ui.c" - } -#line 2182 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp8_ = _ ("Saving page %d out of %d"); -#line 2182 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp9_ = page_number; -#line 2182 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp10_ = total; -#line 2182 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp11_ = g_strdup_printf (_tmp8_, _tmp9_ + 1, _tmp10_); -#line 2182 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - message = _tmp11_; -#line 2184 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp12_ = self->priv->progress_dialog; -#line 2184 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp13_ = fraction; -#line 2184 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - progress_bar_dialog_set_fraction (_tmp12_, _tmp13_); -#line 2185 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp14_ = self->priv->progress_dialog; -#line 2185 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - progress_bar_dialog_set_message (_tmp14_, message); -#line 2168 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (message); -#line 11163 "ui.c" -} - - -void user_interface_show_progress_dialog (UserInterface* self) { - ProgressBarDialog* _tmp0_ = NULL; -#line 2188 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 2190 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = self->priv->progress_dialog; -#line 2190 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_set_visible ((GtkWidget*) _tmp0_, TRUE); -#line 11175 "ui.c" -} - - -void user_interface_hide_progress_dialog (UserInterface* self) { - ProgressBarDialog* _tmp0_ = NULL; -#line 2193 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 2195 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = self->priv->progress_dialog; -#line 2195 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_set_visible ((GtkWidget*) _tmp0_, FALSE); -#line 11187 "ui.c" -} - - -void user_interface_show_error (UserInterface* self, const gchar* error_title, const gchar* error_text, gboolean change_scanner_hint) { - const gchar* _tmp0_ = NULL; - gchar* _tmp1_ = NULL; - const gchar* _tmp2_ = NULL; - gchar* _tmp3_ = NULL; - gboolean _tmp4_ = FALSE; -#line 2198 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 2198 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (error_title != NULL); -#line 2198 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (error_text != NULL); -#line 2200 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self->priv->have_error = TRUE; -#line 2201 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = error_title; -#line 2201 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = g_strdup (_tmp0_); -#line 2201 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (self->priv->error_title); -#line 2201 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self->priv->error_title = _tmp1_; -#line 2202 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = error_text; -#line 2202 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = g_strdup (_tmp2_); -#line 2202 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (self->priv->error_text); -#line 2202 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self->priv->error_text = _tmp3_; -#line 2203 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp4_ = change_scanner_hint; -#line 2203 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self->priv->error_change_scanner_hint = _tmp4_; -#line 2204 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_update_info_bar (self); -#line 11227 "ui.c" -} - - -void user_interface_start (UserInterface* self) { -#line 2207 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 2209 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_set_visible ((GtkWidget*) self, TRUE); -#line 11236 "ui.c" -} - - -Book* user_interface_get_book (UserInterface* self) { - Book* result; - Book* _tmp0_ = NULL; -#line 164 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_val_if_fail (self != NULL, NULL); -#line 164 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = self->priv->_book; -#line 164 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - result = _tmp0_; -#line 164 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return result; -#line 11251 "ui.c" -} - - -static gpointer _book_ref0 (gpointer self) { -#line 164 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return self ? book_ref (self) : NULL; -#line 11258 "ui.c" -} - - -static void user_interface_set_book (UserInterface* self, Book* value) { - Book* _tmp0_ = NULL; - Book* _tmp1_ = NULL; -#line 164 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 164 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = value; -#line 164 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = _book_ref0 (_tmp0_); -#line 164 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _book_unref0 (self->priv->_book); -#line 164 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self->priv->_book = _tmp1_; -#line 164 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_object_notify ((GObject *) self, "book"); -#line 11277 "ui.c" -} - - -Page* user_interface_get_selected_page (UserInterface* self) { - Page* result; - BookView* _tmp0_ = NULL; - Page* _tmp1_ = NULL; - Page* _tmp2_ = NULL; -#line 169 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_val_if_fail (self != NULL, NULL); -#line 171 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = self->priv->book_view; -#line 171 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = book_view_get_selected_page (_tmp0_); -#line 171 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = _tmp1_; -#line 171 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - result = _tmp2_; -#line 171 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return result; -#line 11298 "ui.c" -} - - -void user_interface_set_selected_page (UserInterface* self, Page* value) { - BookView* _tmp0_ = NULL; - Page* _tmp1_ = NULL; -#line 173 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 175 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = self->priv->book_view; -#line 175 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = value; -#line 175 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - book_view_set_selected_page (_tmp0_, _tmp1_); -#line 173 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_object_notify ((GObject *) self, "selected-page"); -#line 11315 "ui.c" -} - - -gboolean user_interface_get_scanning (UserInterface* self) { - gboolean result; - gboolean _tmp0_ = FALSE; -#line 193 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_val_if_fail (self != NULL, FALSE); -#line 193 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = self->priv->scanning_; -#line 193 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - result = _tmp0_; -#line 193 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return result; -#line 11330 "ui.c" -} - - -void user_interface_set_scanning (UserInterface* self, gboolean value) { - gboolean _tmp0_ = FALSE; - GtkMenuItem* _tmp1_ = NULL; - gboolean _tmp2_ = FALSE; - GtkMenuItem* _tmp3_ = NULL; - gboolean _tmp4_ = FALSE; - GtkToolButton* _tmp5_ = NULL; - gboolean _tmp6_ = FALSE; - GtkButton* _tmp7_ = NULL; - gboolean _tmp8_ = FALSE; - GtkButton* _tmp9_ = NULL; - gboolean _tmp10_ = FALSE; -#line 194 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 196 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = value; -#line 196 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self->priv->scanning_ = _tmp0_; -#line 197 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = self->priv->page_delete_menuitem; -#line 197 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = value; -#line 197 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_set_sensitive ((GtkWidget*) _tmp1_, !_tmp2_); -#line 198 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = self->priv->stop_scan_menuitem; -#line 198 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp4_ = value; -#line 198 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_set_sensitive ((GtkWidget*) _tmp3_, _tmp4_); -#line 199 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp5_ = self->priv->stop_toolbutton; -#line 199 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp6_ = value; -#line 199 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_set_sensitive ((GtkWidget*) _tmp5_, _tmp6_); -#line 200 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp7_ = self->priv->scan_button; -#line 200 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp8_ = value; -#line 200 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_set_visible ((GtkWidget*) _tmp7_, !_tmp8_); -#line 201 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp9_ = self->priv->stop_button; -#line 201 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp10_ = value; -#line 201 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_set_visible ((GtkWidget*) _tmp9_, _tmp10_); -#line 194 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_object_notify ((GObject *) self, "scanning"); -#line 11384 "ui.c" -} - - -gint user_interface_get_brightness (UserInterface* self) { - gint result; - GtkAdjustment* _tmp0_ = NULL; - gdouble _tmp1_ = 0.0; - gdouble _tmp2_ = 0.0; -#line 214 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_val_if_fail (self != NULL, 0); -#line 214 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = self->priv->brightness_adjustment; -#line 214 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = gtk_adjustment_get_value (_tmp0_); -#line 214 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = _tmp1_; -#line 214 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - result = (gint) _tmp2_; -#line 214 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return result; -#line 11405 "ui.c" -} - - -void user_interface_set_brightness (UserInterface* self, gint value) { - GtkAdjustment* _tmp0_ = NULL; - gint _tmp1_ = 0; -#line 215 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 215 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = self->priv->brightness_adjustment; -#line 215 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = value; -#line 215 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_adjustment_set_value (_tmp0_, (gdouble) _tmp1_); -#line 215 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_object_notify ((GObject *) self, "brightness"); -#line 11422 "ui.c" -} - - -gint user_interface_get_contrast (UserInterface* self) { - gint result; - GtkAdjustment* _tmp0_ = NULL; - gdouble _tmp1_ = 0.0; - gdouble _tmp2_ = 0.0; -#line 220 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_val_if_fail (self != NULL, 0); -#line 220 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = self->priv->contrast_adjustment; -#line 220 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = gtk_adjustment_get_value (_tmp0_); -#line 220 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = _tmp1_; -#line 220 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - result = (gint) _tmp2_; -#line 220 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return result; -#line 11443 "ui.c" -} - - -void user_interface_set_contrast (UserInterface* self, gint value) { - GtkAdjustment* _tmp0_ = NULL; - gint _tmp1_ = 0; -#line 221 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 221 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = self->priv->contrast_adjustment; -#line 221 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = value; -#line 221 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_adjustment_set_value (_tmp0_, (gdouble) _tmp1_); -#line 221 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_object_notify ((GObject *) self, "contrast"); -#line 11460 "ui.c" -} - - -gint user_interface_get_quality (UserInterface* self) { - gint result; - GtkAdjustment* _tmp0_ = NULL; - gdouble _tmp1_ = 0.0; - gdouble _tmp2_ = 0.0; -#line 226 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_val_if_fail (self != NULL, 0); -#line 226 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = self->priv->quality_adjustment; -#line 226 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = gtk_adjustment_get_value (_tmp0_); -#line 226 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = _tmp1_; -#line 226 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - result = (gint) _tmp2_; -#line 226 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return result; -#line 11481 "ui.c" -} - - -void user_interface_set_quality (UserInterface* self, gint value) { - GtkAdjustment* _tmp0_ = NULL; - gint _tmp1_ = 0; -#line 227 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 227 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = self->priv->quality_adjustment; -#line 227 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = value; -#line 227 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_adjustment_set_value (_tmp0_, (gdouble) _tmp1_); -#line 227 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_object_notify ((GObject *) self, "quality"); -#line 11498 "ui.c" -} - - -gchar* user_interface_get_selected_device (UserInterface* self) { - gchar* result; - GtkTreeIter iter = {0}; - GtkComboBox* _tmp0_ = NULL; - GtkTreeIter _tmp1_ = {0}; - gboolean _tmp2_ = FALSE; -#line 232 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_val_if_fail (self != NULL, NULL); -#line 236 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = self->priv->device_combo; -#line 236 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = gtk_combo_box_get_active_iter (_tmp0_, &_tmp1_); -#line 236 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - iter = _tmp1_; -#line 236 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (_tmp2_) { -#line 11518 "ui.c" - gchar* device = NULL; - GtkListStore* _tmp3_ = NULL; - GtkTreeIter _tmp4_ = {0}; -#line 239 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = self->priv->device_model; -#line 239 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp4_ = iter; -#line 239 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_tree_model_get ((GtkTreeModel*) _tmp3_, &_tmp4_, 0, &device, -1, -1); -#line 240 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - result = device; -#line 240 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return result; -#line 11532 "ui.c" - } -#line 243 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - result = NULL; -#line 243 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return result; -#line 11538 "ui.c" -} - - -void user_interface_set_selected_device (UserInterface* self, const gchar* value) { - GtkTreeIter iter = {0}; - const gchar* _tmp0_ = NULL; - GtkTreeIter _tmp1_ = {0}; - gboolean _tmp2_ = FALSE; - GtkComboBox* _tmp3_ = NULL; - GtkTreeIter _tmp4_ = {0}; -#line 246 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 249 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = value; -#line 249 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = user_interface_find_scan_device (self, _tmp0_, &_tmp1_); -#line 249 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - iter = _tmp1_; -#line 249 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (!_tmp2_) { -#line 250 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return; -#line 11561 "ui.c" - } -#line 252 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = self->priv->device_combo; -#line 252 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp4_ = iter; -#line 252 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_combo_box_set_active_iter (_tmp3_, &_tmp4_); -#line 253 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self->priv->user_selected_device = TRUE; -#line 246 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_object_notify ((GObject *) self, "selected-device"); -#line 11573 "ui.c" -} - - -static gchar* user_interface_get_state_filename (UserInterface* self) { - gchar* result; - const gchar* _tmp0_ = NULL; - gchar* _tmp1_ = NULL; -#line 2036 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_val_if_fail (self != NULL, NULL); -#line 2036 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = g_get_user_cache_dir (); -#line 2036 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = g_build_filename (_tmp0_, "simple-scan", "state", NULL); -#line 2036 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - result = _tmp1_; -#line 2036 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return result; -#line 11591 "ui.c" -} - - -static void g_cclosure_user_marshal_VOID__STRING_SCAN_OPTIONS (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) { - typedef void (*GMarshalFunc_VOID__STRING_SCAN_OPTIONS) (gpointer data1, const char* arg_1, gpointer arg_2, gpointer data2); - register GMarshalFunc_VOID__STRING_SCAN_OPTIONS callback; - register GCClosure * cc; - register gpointer data1; - register gpointer data2; - cc = (GCClosure *) closure; -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (n_param_values == 3); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (G_CCLOSURE_SWAP_DATA (closure)) { -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - data1 = closure->data; -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - data2 = param_values->data[0].v_pointer; -#line 11610 "ui.c" - } else { -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - data1 = param_values->data[0].v_pointer; -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - data2 = closure->data; -#line 11616 "ui.c" - } -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - callback = (GMarshalFunc_VOID__STRING_SCAN_OPTIONS) (marshal_data ? marshal_data : cc->callback); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - callback (data1, g_value_get_string (param_values + 1), value_get_scan_options (param_values + 2), data2); -#line 11622 "ui.c" -} - - -static void g_cclosure_user_marshal_VOID__STRING_INT (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) { - typedef void (*GMarshalFunc_VOID__STRING_INT) (gpointer data1, const char* arg_1, gint arg_2, gpointer data2); - register GMarshalFunc_VOID__STRING_INT callback; - register GCClosure * cc; - register gpointer data1; - register gpointer data2; - cc = (GCClosure *) closure; -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (n_param_values == 3); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (G_CCLOSURE_SWAP_DATA (closure)) { -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - data1 = closure->data; -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - data2 = param_values->data[0].v_pointer; -#line 11641 "ui.c" - } else { -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - data1 = param_values->data[0].v_pointer; -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - data2 = closure->data; -#line 11647 "ui.c" - } -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - callback = (GMarshalFunc_VOID__STRING_INT) (marshal_data ? marshal_data : cc->callback); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - callback (data1, g_value_get_string (param_values + 1), g_value_get_int (param_values + 2), data2); -#line 11653 "ui.c" -} - - -static void user_interface_class_init (UserInterfaceClass * klass) { - gint UserInterface_private_offset; -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_parent_class = g_type_class_peek_parent (klass); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_type_class_add_private (klass, sizeof (UserInterfacePrivate)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - ((GtkWidgetClass *) klass)->size_allocate = (void (*)(GtkWidget*, GtkAllocation*)) user_interface_real_size_allocate; -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - ((GtkWidgetClass *) klass)->window_state_event = (gboolean (*)(GtkWidget*, GdkEventWindowState*)) user_interface_real_window_state_event; -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - G_OBJECT_CLASS (klass)->get_property = _vala_user_interface_get_property; -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - G_OBJECT_CLASS (klass)->set_property = _vala_user_interface_set_property; -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - G_OBJECT_CLASS (klass)->finalize = user_interface_finalize; -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_object_class_install_property (G_OBJECT_CLASS (klass), USER_INTERFACE_BOOK, param_spec_book ("book", "book", "book", TYPE_BOOK, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_object_class_install_property (G_OBJECT_CLASS (klass), USER_INTERFACE_SELECTED_PAGE, param_spec_page ("selected-page", "selected-page", "selected-page", TYPE_PAGE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_object_class_install_property (G_OBJECT_CLASS (klass), USER_INTERFACE_SCANNING, g_param_spec_boolean ("scanning", "scanning", "scanning", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_object_class_install_property (G_OBJECT_CLASS (klass), USER_INTERFACE_BRIGHTNESS, g_param_spec_int ("brightness", "brightness", "brightness", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_object_class_install_property (G_OBJECT_CLASS (klass), USER_INTERFACE_CONTRAST, g_param_spec_int ("contrast", "contrast", "contrast", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_object_class_install_property (G_OBJECT_CLASS (klass), USER_INTERFACE_QUALITY, g_param_spec_int ("quality", "quality", "quality", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_object_class_install_property (G_OBJECT_CLASS (klass), USER_INTERFACE_SELECTED_DEVICE, g_param_spec_string ("selected-device", "selected-device", "selected-device", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - UserInterface_private_offset = g_type_class_get_instance_private_offset (klass); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/org/gnome/SimpleScan/simple-scan.ui"); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_signal_new ("start_scan", TYPE_USER_INTERFACE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__STRING_SCAN_OPTIONS, G_TYPE_NONE, 2, G_TYPE_STRING, TYPE_SCAN_OPTIONS); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_signal_new ("stop_scan", TYPE_USER_INTERFACE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_signal_new ("email", TYPE_USER_INTERFACE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__STRING_INT, G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_INT); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "menubar", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, menubar)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "toolbar", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, toolbar)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "page_menu", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, page_menu)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "main_vbox", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, main_vbox)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "custom_crop_menuitem", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, custom_crop_menuitem)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "a4_menuitem", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, a4_menuitem)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "a5_menuitem", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, a5_menuitem)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "a6_menuitem", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, a6_menuitem)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "letter_menuitem", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, letter_menuitem)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "legal_menuitem", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, legal_menuitem)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "four_by_six_menuitem", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, four_by_six_menuitem)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "no_crop_menuitem", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, no_crop_menuitem)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "page_move_left_menuitem", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, page_move_left_menuitem)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "page_move_right_menuitem", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, page_move_right_menuitem)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "page_delete_menuitem", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, page_delete_menuitem)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "crop_rotate_menuitem", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, crop_rotate_menuitem)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "save_menuitem", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, save_menuitem)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "save_as_menuitem", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, save_as_menuitem)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "copy_to_clipboard_menuitem", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, copy_to_clipboard_menuitem)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "save_button", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, save_button)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "save_toolbutton", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, save_toolbutton)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "stop_scan_menuitem", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, stop_scan_menuitem)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "stop_toolbutton", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, stop_toolbutton)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "crop_button", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, crop_button)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "crop_toolbutton", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, crop_toolbutton)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "stop_button", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, stop_button)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "scan_button", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, scan_button)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "text_button_menuitem", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, text_button_menuitem)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "text_button_hb_menuitem", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, text_button_hb_menuitem)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "text_menuitem", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, text_menuitem)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "photo_button_menuitem", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, photo_button_menuitem)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "photo_button_hb_menuitem", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, photo_button_hb_menuitem)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "photo_menuitem", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, photo_menuitem)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "authorize_dialog", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, authorize_dialog)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "authorize_label", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, authorize_label)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "username_entry", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, username_entry)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "password_entry", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, password_entry)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "preferences_dialog", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, preferences_dialog)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "device_combo", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, device_combo)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "text_dpi_combo", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, text_dpi_combo)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "photo_dpi_combo", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, photo_dpi_combo)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "page_side_combo", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, page_side_combo)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "paper_size_combo", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, paper_size_combo)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "brightness_scale", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, brightness_scale)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "contrast_scale", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, contrast_scale)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "quality_scale", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, quality_scale)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "device_model", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, device_model)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "text_dpi_model", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, text_dpi_model)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "photo_dpi_model", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, photo_dpi_model)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "page_side_model", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, page_side_model)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "paper_size_model", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, paper_size_model)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "brightness_adjustment", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, brightness_adjustment)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "contrast_adjustment", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, contrast_adjustment)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "quality_adjustment", FALSE, UserInterface_private_offset + G_STRUCT_OFFSET (UserInterfacePrivate, quality_adjustment)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "device_combo_changed_cb", G_CALLBACK(_user_interface_device_combo_changed_cb_gtk_combo_box_changed)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "new_button_clicked_cb", G_CALLBACK(_user_interface_new_button_clicked_cb_gtk_button_clicked)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "text_menuitem_toggled_cb", G_CALLBACK(_user_interface_text_menuitem_toggled_cb_gtk_check_menu_item_toggled)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "photo_menuitem_toggled_cb", G_CALLBACK(_user_interface_photo_menuitem_toggled_cb_gtk_check_menu_item_toggled)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "scan_button_clicked_cb", G_CALLBACK(_user_interface_scan_button_clicked_cb_gtk_menu_item_activate)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "stop_scan_button_clicked_cb", G_CALLBACK(_user_interface_stop_scan_button_clicked_cb_gtk_button_clicked)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "continuous_scan_button_clicked_cb", G_CALLBACK(_user_interface_continuous_scan_button_clicked_cb_gtk_menu_item_activate)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "preferences_button_clicked_cb", G_CALLBACK(_user_interface_preferences_button_clicked_cb_gtk_menu_item_activate)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "preferences_dialog_delete_event_cb", G_CALLBACK(_user_interface_preferences_dialog_delete_event_cb_gtk_widget_delete_event)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "preferences_dialog_response_cb", G_CALLBACK(_user_interface_preferences_dialog_response_cb_gtk_dialog_response)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "rotate_left_button_clicked_cb", G_CALLBACK(_user_interface_rotate_left_button_clicked_cb_gtk_button_clicked)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "rotate_right_button_clicked_cb", G_CALLBACK(_user_interface_rotate_right_button_clicked_cb_gtk_button_clicked)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "no_crop_menuitem_toggled_cb", G_CALLBACK(_user_interface_no_crop_menuitem_toggled_cb_gtk_check_menu_item_toggled)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "custom_crop_menuitem_toggled_cb", G_CALLBACK(_user_interface_custom_crop_menuitem_toggled_cb_gtk_check_menu_item_toggled)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "crop_button_toggled_cb", G_CALLBACK(_user_interface_crop_button_toggled_cb_gtk_toggle_button_toggled)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "crop_toolbutton_toggled_cb", G_CALLBACK(_user_interface_crop_toolbutton_toggled_cb_gtk_toggle_tool_button_toggled)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "four_by_six_menuitem_toggled_cb", G_CALLBACK(_user_interface_four_by_six_menuitem_toggled_cb_gtk_check_menu_item_toggled)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "legal_menuitem_toggled_cb", G_CALLBACK(_user_interface_legal_menuitem_toggled_cb_gtk_check_menu_item_toggled)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "letter_menuitem_toggled_cb", G_CALLBACK(_user_interface_letter_menuitem_toggled_cb_gtk_check_menu_item_toggled)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "a6_menuitem_toggled_cb", G_CALLBACK(_user_interface_a6_menuitem_toggled_cb_gtk_check_menu_item_toggled)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "a5_menuitem_toggled_cb", G_CALLBACK(_user_interface_a5_menuitem_toggled_cb_gtk_check_menu_item_toggled)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "a4_menuitem_toggled_cb", G_CALLBACK(_user_interface_a4_menuitem_toggled_cb_gtk_check_menu_item_toggled)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "crop_rotate_menuitem_activate_cb", G_CALLBACK(_user_interface_crop_rotate_menuitem_activate_cb_gtk_menu_item_activate)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "page_move_left_menuitem_activate_cb", G_CALLBACK(_user_interface_page_move_left_menuitem_activate_cb_gtk_menu_item_activate)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "page_move_right_menuitem_activate_cb", G_CALLBACK(_user_interface_page_move_right_menuitem_activate_cb_gtk_menu_item_activate)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "page_delete_menuitem_activate_cb", G_CALLBACK(_user_interface_page_delete_menuitem_activate_cb_gtk_menu_item_activate)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "reorder_menuitem_activate_cb", G_CALLBACK(_user_interface_reorder_menuitem_activate_cb_gtk_menu_item_activate)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "save_file_button_clicked_cb", G_CALLBACK(_user_interface_save_file_button_clicked_cb_gtk_button_clicked)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "copy_to_clipboard_button_clicked_cb", G_CALLBACK(_user_interface_copy_to_clipboard_button_clicked_cb_gtk_menu_item_activate)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "save_as_file_button_clicked_cb", G_CALLBACK(_user_interface_save_as_file_button_clicked_cb_gtk_menu_item_activate)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "email_button_clicked_cb", G_CALLBACK(_user_interface_email_button_clicked_cb_gtk_menu_item_activate)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "print_button_clicked_cb", G_CALLBACK(_user_interface_print_button_clicked_cb_gtk_menu_item_activate)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "help_contents_menuitem_activate_cb", G_CALLBACK(_user_interface_help_contents_menuitem_activate_cb_gtk_menu_item_activate)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "about_menuitem_activate_cb", G_CALLBACK(_user_interface_about_menuitem_activate_cb_gtk_menu_item_activate)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "quit_menuitem_activate_cb", G_CALLBACK(_user_interface_quit_menuitem_activate_cb_gtk_menu_item_activate)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "window_delete_event_cb", G_CALLBACK(_user_interface_window_delete_event_cb_gtk_widget_delete_event)); -#line 11877 "ui.c" -} - - -static void user_interface_instance_init (UserInterface * self) { - gchar* _tmp0_ = NULL; -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self->priv = USER_INTERFACE_GET_PRIVATE (self); -#line 153 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self->priv->missing_driver = NULL; -#line 165 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self->priv->book_uri = NULL; -#line 188 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = g_strdup ("photo"); -#line 188 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self->priv->document_hint = _tmp0_; -#line 190 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self->priv->scanning_ = FALSE; -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_init_template (GTK_WIDGET (self)); -#line 11897 "ui.c" -} - - -static void user_interface_finalize (GObject* obj) { - UserInterface * self; - Book* _tmp0_ = NULL; - guint _tmp1_ = 0U; - Book* _tmp2_ = NULL; - guint _tmp3_ = 0U; - Book* _tmp4_ = NULL; - guint _tmp5_ = 0U; -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_USER_INTERFACE, UserInterface); -#line 288 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = self->priv->_book; -#line 288 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_signal_parse_name ("page-added", TYPE_BOOK, &_tmp1_, NULL, FALSE); -#line 288 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _user_interface_page_added_cb_book_page_added, self); -#line 289 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = self->priv->_book; -#line 289 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_signal_parse_name ("reordered", TYPE_BOOK, &_tmp3_, NULL, FALSE); -#line 289 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _user_interface_reordered_cb_book_reordered, self); -#line 290 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp4_ = self->priv->_book; -#line 290 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_signal_parse_name ("page-removed", TYPE_BOOK, &_tmp5_, NULL, FALSE); -#line 290 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_signal_handlers_disconnect_matched (_tmp4_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp5_, 0, NULL, (GCallback) _user_interface_page_removed_cb_book_page_removed, self); -#line 33 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->settings); -#line 36 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->menubar); -#line 38 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->toolbar); -#line 40 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->page_menu); -#line 42 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->main_vbox); -#line 43 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->info_bar); -#line 44 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->info_bar_image); -#line 45 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->info_bar_label); -#line 46 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->info_bar_close_button); -#line 47 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->info_bar_change_scanner_button); -#line 48 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->info_bar_install_button); -#line 50 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->custom_crop_menuitem); -#line 52 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->a4_menuitem); -#line 54 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->a5_menuitem); -#line 56 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->a6_menuitem); -#line 58 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->letter_menuitem); -#line 60 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->legal_menuitem); -#line 62 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->four_by_six_menuitem); -#line 64 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->no_crop_menuitem); -#line 66 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->page_move_left_menuitem); -#line 68 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->page_move_right_menuitem); -#line 70 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->page_delete_menuitem); -#line 72 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->crop_rotate_menuitem); -#line 74 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->save_menuitem); -#line 76 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->save_as_menuitem); -#line 78 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->copy_to_clipboard_menuitem); -#line 80 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->save_button); -#line 82 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->save_toolbutton); -#line 84 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->stop_scan_menuitem); -#line 86 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->stop_toolbutton); -#line 88 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->crop_button); -#line 90 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->crop_toolbutton); -#line 92 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->stop_button); -#line 94 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->scan_button); -#line 97 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->text_button_menuitem); -#line 99 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->text_button_hb_menuitem); -#line 101 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->text_menuitem); -#line 103 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->photo_button_menuitem); -#line 105 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->photo_button_hb_menuitem); -#line 107 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->photo_menuitem); -#line 110 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->authorize_dialog); -#line 112 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->authorize_label); -#line 114 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->username_entry); -#line 116 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->password_entry); -#line 119 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->preferences_dialog); -#line 121 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->device_combo); -#line 123 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->text_dpi_combo); -#line 125 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->photo_dpi_combo); -#line 127 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->page_side_combo); -#line 129 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->paper_size_combo); -#line 131 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->brightness_scale); -#line 133 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->contrast_scale); -#line 135 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->quality_scale); -#line 137 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->device_model); -#line 139 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->text_dpi_model); -#line 141 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->photo_dpi_model); -#line 143 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->page_side_model); -#line 145 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->paper_size_model); -#line 147 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->brightness_adjustment); -#line 149 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->contrast_adjustment); -#line 151 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->quality_adjustment); -#line 153 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (self->priv->missing_driver); -#line 156 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->save_dialog); -#line 157 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->progress_dialog); -#line 160 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (self->priv->error_title); -#line 161 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (self->priv->error_text); -#line 164 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _book_unref0 (self->priv->_book); -#line 165 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (self->priv->book_uri); -#line 179 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _autosave_manager_unref0 (self->priv->autosave_manager); -#line 181 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->book_view); -#line 188 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (self->priv->document_hint); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - G_OBJECT_CLASS (user_interface_parent_class)->finalize (obj); -#line 12073 "ui.c" -} - - -GType user_interface_get_type (void) { - static volatile gsize user_interface_type_id__volatile = 0; - if (g_once_init_enter (&user_interface_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (UserInterfaceClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) user_interface_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (UserInterface), 0, (GInstanceInitFunc) user_interface_instance_init, NULL }; - GType user_interface_type_id; - user_interface_type_id = g_type_register_static (gtk_application_window_get_type (), "UserInterface", &g_define_type_info, 0); - g_once_init_leave (&user_interface_type_id__volatile, user_interface_type_id); - } - return user_interface_type_id__volatile; -} - - -static void _vala_user_interface_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { - UserInterface * self; - self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_USER_INTERFACE, UserInterface); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - switch (property_id) { -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - case USER_INTERFACE_BOOK: -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - value_set_book (value, user_interface_get_book (self)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - break; -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - case USER_INTERFACE_SELECTED_PAGE: -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - value_set_page (value, user_interface_get_selected_page (self)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - break; -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - case USER_INTERFACE_SCANNING: -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_value_set_boolean (value, user_interface_get_scanning (self)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - break; -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - case USER_INTERFACE_BRIGHTNESS: -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_value_set_int (value, user_interface_get_brightness (self)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - break; -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - case USER_INTERFACE_CONTRAST: -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_value_set_int (value, user_interface_get_contrast (self)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - break; -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - case USER_INTERFACE_QUALITY: -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_value_set_int (value, user_interface_get_quality (self)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - break; -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - case USER_INTERFACE_SELECTED_DEVICE: -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_value_take_string (value, user_interface_get_selected_device (self)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - break; -#line 12136 "ui.c" - default: -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - break; -#line 12142 "ui.c" - } -} - - -static void _vala_user_interface_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { - UserInterface * self; - self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_USER_INTERFACE, UserInterface); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - switch (property_id) { -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - case USER_INTERFACE_BOOK: -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_set_book (self, value_get_book (value)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - break; -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - case USER_INTERFACE_SELECTED_PAGE: -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_set_selected_page (self, value_get_page (value)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - break; -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - case USER_INTERFACE_SCANNING: -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_set_scanning (self, g_value_get_boolean (value)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - break; -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - case USER_INTERFACE_BRIGHTNESS: -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_set_brightness (self, g_value_get_int (value)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - break; -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - case USER_INTERFACE_CONTRAST: -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_set_contrast (self, g_value_get_int (value)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - break; -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - case USER_INTERFACE_QUALITY: -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_set_quality (self, g_value_get_int (value)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - break; -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - case USER_INTERFACE_SELECTED_DEVICE: -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - user_interface_set_selected_device (self, g_value_get_string (value)); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - break; -#line 12194 "ui.c" - default: -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); -#line 14 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - break; -#line 12200 "ui.c" - } -} - - -ProgressBarDialog* progress_bar_dialog_construct (GType object_type, GtkApplicationWindow* parent, const gchar* title) { - ProgressBarDialog * self = NULL; - GtkProgressBar* _tmp0_ = NULL; - GtkBox* hbox = NULL; - GtkBox* _tmp1_ = NULL; - GtkBox* vbox = NULL; - GtkBox* _tmp2_ = NULL; - GtkProgressBar* _tmp3_ = NULL; - GtkProgressBar* _tmp4_ = NULL; - GtkProgressBar* _tmp5_ = NULL; - GtkProgressBar* _tmp6_ = NULL; - const gchar* _tmp7_ = NULL; - GtkApplicationWindow* _tmp8_ = NULL; - GtkProgressBar* _tmp9_ = NULL; -#line 2229 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_val_if_fail (parent != NULL, NULL); -#line 2229 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_val_if_fail (title != NULL, NULL); -#line 2229 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self = (ProgressBarDialog*) g_object_new (object_type, NULL); -#line 2231 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = (GtkProgressBar*) gtk_progress_bar_new (); -#line 2231 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_object_ref_sink (_tmp0_); -#line 2231 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->bar); -#line 2231 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self->priv->bar = _tmp0_; -#line 2232 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 5); -#line 2232 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_object_ref_sink (_tmp1_); -#line 2232 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - hbox = _tmp1_; -#line 2233 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 5); -#line 2233 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_object_ref_sink (_tmp2_); -#line 2233 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - vbox = _tmp2_; -#line 2234 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_set_hexpand ((GtkWidget*) hbox, TRUE); -#line 2236 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = self->priv->bar; -#line 2236 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_progress_bar_set_text (_tmp3_, ""); -#line 2237 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp4_ = self->priv->bar; -#line 2237 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_progress_bar_set_show_text (_tmp4_, TRUE); -#line 2238 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp5_ = self->priv->bar; -#line 2238 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_set_size_request ((GtkWidget*) _tmp5_, 225, 25); -#line 2239 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_set_size_request ((GtkWidget*) self, 250, 50); -#line 2241 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp6_ = self->priv->bar; -#line 2241 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_box_pack_start (vbox, (GtkWidget*) _tmp6_, TRUE, FALSE, (guint) 0); -#line 2242 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_box_pack_start (hbox, (GtkWidget*) vbox, TRUE, FALSE, (guint) 0); -#line 2243 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_container_add ((GtkContainer*) self, (GtkWidget*) hbox); -#line 2244 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp7_ = title; -#line 2244 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_window_set_title ((GtkWindow*) self, _tmp7_); -#line 2246 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp8_ = parent; -#line 2246 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_window_set_transient_for ((GtkWindow*) self, (GtkWindow*) _tmp8_); -#line 2247 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_window_set_position ((GtkWindow*) self, GTK_WIN_POS_CENTER_ON_PARENT); -#line 2248 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_window_set_modal ((GtkWindow*) self, TRUE); -#line 2249 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_window_set_resizable ((GtkWindow*) self, FALSE); -#line 2251 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_set_visible ((GtkWidget*) hbox, TRUE); -#line 2252 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_set_visible ((GtkWidget*) vbox, TRUE); -#line 2253 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp9_ = self->priv->bar; -#line 2253 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_widget_set_visible ((GtkWidget*) _tmp9_, TRUE); -#line 2229 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (vbox); -#line 2229 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (hbox); -#line 2229 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return self; -#line 12297 "ui.c" -} - - -ProgressBarDialog* progress_bar_dialog_new (GtkApplicationWindow* parent, const gchar* title) { -#line 2229 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return progress_bar_dialog_construct (TYPE_PROGRESS_BAR_DIALOG, parent, title); -#line 12304 "ui.c" -} - - -gdouble progress_bar_dialog_get_fraction (ProgressBarDialog* self) { - gdouble result; - GtkProgressBar* _tmp0_ = NULL; - gdouble _tmp1_ = 0.0; - gdouble _tmp2_ = 0.0; -#line 2219 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_val_if_fail (self != NULL, 0.0); -#line 2219 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = self->priv->bar; -#line 2219 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = gtk_progress_bar_get_fraction (_tmp0_); -#line 2219 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = _tmp1_; -#line 2219 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - result = _tmp2_; -#line 2219 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return result; -#line 12325 "ui.c" -} - - -void progress_bar_dialog_set_fraction (ProgressBarDialog* self, gdouble value) { - GtkProgressBar* _tmp0_ = NULL; - gdouble _tmp1_ = 0.0; -#line 2220 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 2220 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = self->priv->bar; -#line 2220 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = value; -#line 2220 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_progress_bar_set_fraction (_tmp0_, _tmp1_); -#line 2220 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_object_notify ((GObject *) self, "fraction"); -#line 12342 "ui.c" -} - - -const gchar* progress_bar_dialog_get_message (ProgressBarDialog* self) { - const gchar* result; - GtkProgressBar* _tmp0_ = NULL; - const gchar* _tmp1_ = NULL; - const gchar* _tmp2_ = NULL; -#line 2225 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_val_if_fail (self != NULL, NULL); -#line 2225 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = self->priv->bar; -#line 2225 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = gtk_progress_bar_get_text (_tmp0_); -#line 2225 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = _tmp1_; -#line 2225 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - result = _tmp2_; -#line 2225 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return result; -#line 12363 "ui.c" -} - - -void progress_bar_dialog_set_message (ProgressBarDialog* self, const gchar* value) { - GtkProgressBar* _tmp0_ = NULL; - const gchar* _tmp1_ = NULL; -#line 2226 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_if_fail (self != NULL); -#line 2226 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = self->priv->bar; -#line 2226 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = value; -#line 2226 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - gtk_progress_bar_set_text (_tmp0_, _tmp1_); -#line 2226 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_object_notify ((GObject *) self, "message"); -#line 12380 "ui.c" -} - - -static void progress_bar_dialog_class_init (ProgressBarDialogClass * klass) { -#line 2213 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - progress_bar_dialog_parent_class = g_type_class_peek_parent (klass); -#line 2213 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_type_class_add_private (klass, sizeof (ProgressBarDialogPrivate)); -#line 2213 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - G_OBJECT_CLASS (klass)->get_property = _vala_progress_bar_dialog_get_property; -#line 2213 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - G_OBJECT_CLASS (klass)->set_property = _vala_progress_bar_dialog_set_property; -#line 2213 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - G_OBJECT_CLASS (klass)->finalize = progress_bar_dialog_finalize; -#line 2213 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_object_class_install_property (G_OBJECT_CLASS (klass), PROGRESS_BAR_DIALOG_FRACTION, g_param_spec_double ("fraction", "fraction", "fraction", -G_MAXDOUBLE, G_MAXDOUBLE, 0.0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE)); -#line 2213 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_object_class_install_property (G_OBJECT_CLASS (klass), PROGRESS_BAR_DIALOG_MESSAGE, g_param_spec_string ("message", "message", "message", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE)); -#line 12399 "ui.c" -} - - -static void progress_bar_dialog_instance_init (ProgressBarDialog * self) { -#line 2213 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self->priv = PROGRESS_BAR_DIALOG_GET_PRIVATE (self); -#line 12406 "ui.c" -} - - -static void progress_bar_dialog_finalize (GObject* obj) { - ProgressBarDialog * self; -#line 2213 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_PROGRESS_BAR_DIALOG, ProgressBarDialog); -#line 2215 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_object_unref0 (self->priv->bar); -#line 2213 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - G_OBJECT_CLASS (progress_bar_dialog_parent_class)->finalize (obj); -#line 12418 "ui.c" -} - - -GType progress_bar_dialog_get_type (void) { - static volatile gsize progress_bar_dialog_type_id__volatile = 0; - if (g_once_init_enter (&progress_bar_dialog_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (ProgressBarDialogClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) progress_bar_dialog_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProgressBarDialog), 0, (GInstanceInitFunc) progress_bar_dialog_instance_init, NULL }; - GType progress_bar_dialog_type_id; - progress_bar_dialog_type_id = g_type_register_static (gtk_window_get_type (), "ProgressBarDialog", &g_define_type_info, 0); - g_once_init_leave (&progress_bar_dialog_type_id__volatile, progress_bar_dialog_type_id); - } - return progress_bar_dialog_type_id__volatile; -} - - -static void _vala_progress_bar_dialog_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { - ProgressBarDialog * self; - self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_PROGRESS_BAR_DIALOG, ProgressBarDialog); -#line 2213 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - switch (property_id) { -#line 2213 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - case PROGRESS_BAR_DIALOG_FRACTION: -#line 2213 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_value_set_double (value, progress_bar_dialog_get_fraction (self)); -#line 2213 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - break; -#line 2213 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - case PROGRESS_BAR_DIALOG_MESSAGE: -#line 2213 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_value_set_string (value, progress_bar_dialog_get_message (self)); -#line 2213 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - break; -#line 12451 "ui.c" - default: -#line 2213 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); -#line 2213 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - break; -#line 12457 "ui.c" - } -} - - -static void _vala_progress_bar_dialog_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { - ProgressBarDialog * self; - self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_PROGRESS_BAR_DIALOG, ProgressBarDialog); -#line 2213 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - switch (property_id) { -#line 2213 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - case PROGRESS_BAR_DIALOG_FRACTION: -#line 2213 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - progress_bar_dialog_set_fraction (self, g_value_get_double (value)); -#line 2213 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - break; -#line 2213 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - case PROGRESS_BAR_DIALOG_MESSAGE: -#line 2213 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - progress_bar_dialog_set_message (self, g_value_get_string (value)); -#line 2213 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - break; -#line 12479 "ui.c" - default: -#line 2213 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); -#line 2213 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - break; -#line 12485 "ui.c" - } -} - - -gchar* get_temporary_filename (const gchar* prefix, const gchar* extension) { - gchar* result = NULL; - gchar* filename = NULL; - const gchar* _tmp0_ = NULL; - const gchar* _tmp1_ = NULL; - gchar* _tmp2_ = NULL; - gchar* path = NULL; - GError * _inner_error_ = NULL; -#line 2258 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_val_if_fail (prefix != NULL, NULL); -#line 2258 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_val_if_fail (extension != NULL, NULL); -#line 2263 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = prefix; -#line 2263 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = extension; -#line 2263 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = g_strdup_printf ("%sXXXXXX.%s", _tmp0_, _tmp1_); -#line 2263 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - filename = _tmp2_; -#line 12510 "ui.c" - { - gint fd = 0; - const gchar* _tmp3_ = NULL; - gchar* _tmp4_ = NULL; - gint _tmp5_ = 0; - gint _tmp6_ = 0; -#line 2267 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = filename; -#line 2267 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp5_ = g_file_open_tmp (_tmp3_, &_tmp4_, &_inner_error_); -#line 2267 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (path); -#line 2267 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - path = _tmp4_; -#line 2267 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - fd = _tmp5_; -#line 2267 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 12529 "ui.c" - goto __catch28_g_error; - } -#line 2268 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp6_ = fd; -#line 2268 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - close (_tmp6_); -#line 12536 "ui.c" - } - goto __finally28; - __catch28_g_error: - { - GError* e = NULL; - GError* _tmp7_ = NULL; - const gchar* _tmp8_ = NULL; -#line 2265 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - e = _inner_error_; -#line 2265 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _inner_error_ = NULL; -#line 2272 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp7_ = e; -#line 2272 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp8_ = _tmp7_->message; -#line 2272 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_warning ("ui.vala:2272: Error saving email attachment: %s", _tmp8_); -#line 2273 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - result = NULL; -#line 2273 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_error_free0 (e); -#line 2273 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (path); -#line 2273 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (filename); -#line 2273 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return result; -#line 12564 "ui.c" - } - __finally28: -#line 2265 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 2265 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (path); -#line 2265 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (filename); -#line 2265 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - 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); -#line 2265 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_clear_error (&_inner_error_); -#line 2265 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return NULL; -#line 12579 "ui.c" - } -#line 2276 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - result = path; -#line 2276 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (filename); -#line 2276 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return result; -#line 12587 "ui.c" -} - - -PageIcon* page_icon_construct (GType object_type, const gchar* text, gdouble r, gdouble g, gdouble b) { - PageIcon * self = NULL; - const gchar* _tmp0_ = NULL; - gchar* _tmp1_ = NULL; - gdouble _tmp2_ = 0.0; - gdouble _tmp3_ = 0.0; - gdouble _tmp4_ = 0.0; -#line 2287 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_val_if_fail (text != NULL, NULL); -#line 2287 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self = (PageIcon*) g_object_new (object_type, NULL); -#line 2289 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = text; -#line 2289 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = g_strdup (_tmp0_); -#line 2289 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (self->priv->text); -#line 2289 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self->priv->text = _tmp1_; -#line 2290 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = r; -#line 2290 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self->priv->r = _tmp2_; -#line 2291 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = g; -#line 2291 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self->priv->g = _tmp3_; -#line 2292 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp4_ = b; -#line 2292 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self->priv->b = _tmp4_; -#line 2287 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return self; -#line 12624 "ui.c" -} - - -PageIcon* page_icon_new (const gchar* text, gdouble r, gdouble g, gdouble b) { -#line 2287 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return page_icon_construct (TYPE_PAGE_ICON, text, r, g, b); -#line 12631 "ui.c" -} - - -static void page_icon_real_get_preferred_width (GtkWidget* base, gint* minimum_width, gint* natural_width) { - PageIcon * self; - gint _vala_minimum_width = 0; - gint _vala_natural_width = 0; -#line 2295 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self = (PageIcon*) base; -#line 2297 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _vala_natural_width = PAGE_ICON_MINIMUM_WIDTH; -#line 2297 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _vala_minimum_width = _vala_natural_width; -#line 2295 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (minimum_width) { -#line 2295 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - *minimum_width = _vala_minimum_width; -#line 12649 "ui.c" - } -#line 2295 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (natural_width) { -#line 2295 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - *natural_width = _vala_natural_width; -#line 12655 "ui.c" - } -} - - -static void page_icon_real_get_preferred_height (GtkWidget* base, gint* minimum_height, gint* natural_height) { - PageIcon * self; - gint _vala_minimum_height = 0; - gint _vala_natural_height = 0; - gdouble _tmp0_ = 0.0; -#line 2300 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self = (PageIcon*) base; -#line 2302 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = round (PAGE_ICON_MINIMUM_WIDTH * G_SQRT2); -#line 2302 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _vala_natural_height = (gint) _tmp0_; -#line 2302 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _vala_minimum_height = _vala_natural_height; -#line 2300 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (minimum_height) { -#line 2300 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - *minimum_height = _vala_minimum_height; -#line 12677 "ui.c" - } -#line 2300 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (natural_height) { -#line 2300 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - *natural_height = _vala_natural_height; -#line 12683 "ui.c" - } -} - - -static void page_icon_real_get_preferred_height_for_width (GtkWidget* base, gint width, gint* minimum_height, gint* natural_height) { - PageIcon * self; - gint _vala_minimum_height = 0; - gint _vala_natural_height = 0; - gint _tmp0_ = 0; -#line 2305 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self = (PageIcon*) base; -#line 2307 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = width; -#line 2307 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _vala_natural_height = (gint) (_tmp0_ * G_SQRT2); -#line 2307 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _vala_minimum_height = _vala_natural_height; -#line 2305 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (minimum_height) { -#line 2305 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - *minimum_height = _vala_minimum_height; -#line 12705 "ui.c" - } -#line 2305 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (natural_height) { -#line 2305 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - *natural_height = _vala_natural_height; -#line 12711 "ui.c" - } -} - - -static void page_icon_real_get_preferred_width_for_height (GtkWidget* base, gint height, gint* minimum_width, gint* natural_width) { - PageIcon * self; - gint _vala_minimum_width = 0; - gint _vala_natural_width = 0; - gint _tmp0_ = 0; -#line 2310 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self = (PageIcon*) base; -#line 2312 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = height; -#line 2312 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _vala_natural_width = (gint) (_tmp0_ / G_SQRT2); -#line 2312 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _vala_minimum_width = _vala_natural_width; -#line 2310 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (minimum_width) { -#line 2310 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - *minimum_width = _vala_minimum_width; -#line 12733 "ui.c" - } -#line 2310 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if (natural_width) { -#line 2310 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - *natural_width = _vala_natural_width; -#line 12739 "ui.c" - } -} - - -static gboolean page_icon_real_draw (GtkWidget* base, cairo_t* c) { - PageIcon * self; - gboolean result = FALSE; - gint w = 0; - gint _tmp0_ = 0; - gint h = 0; - gint _tmp1_ = 0; - gint _tmp2_ = 0; - gint _tmp3_ = 0; - cairo_t* _tmp8_ = NULL; - gint _tmp9_ = 0; - gint _tmp10_ = 0; - gint _tmp11_ = 0; - gint _tmp12_ = 0; - cairo_t* _tmp13_ = NULL; - gint _tmp14_ = 0; - gint _tmp15_ = 0; - cairo_t* _tmp16_ = NULL; - gdouble _tmp17_ = 0.0; - gdouble _tmp18_ = 0.0; - gdouble _tmp19_ = 0.0; - cairo_t* _tmp20_ = NULL; - cairo_t* _tmp21_ = NULL; - cairo_t* _tmp22_ = NULL; - cairo_t* _tmp23_ = NULL; - cairo_text_extents_t extents = {0}; - cairo_t* _tmp24_ = NULL; - const gchar* _tmp25_ = NULL; - cairo_text_extents_t _tmp26_ = {0}; - cairo_t* _tmp27_ = NULL; - gint _tmp28_ = 0; - cairo_text_extents_t _tmp29_ = {0}; - gdouble _tmp30_ = 0.0; - gint _tmp31_ = 0; - cairo_text_extents_t _tmp32_ = {0}; - gdouble _tmp33_ = 0.0; - cairo_t* _tmp34_ = NULL; - const gchar* _tmp35_ = NULL; -#line 2315 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self = (PageIcon*) base; -#line 2315 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_return_val_if_fail (c != NULL, FALSE); -#line 2317 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp0_ = gtk_widget_get_allocated_width ((GtkWidget*) self); -#line 2317 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - w = _tmp0_; -#line 2318 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp1_ = gtk_widget_get_allocated_height ((GtkWidget*) self); -#line 2318 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - h = _tmp1_; -#line 2319 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp2_ = w; -#line 2319 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp3_ = h; -#line 2319 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - if ((_tmp2_ * G_SQRT2) > ((gdouble) _tmp3_)) { -#line 12800 "ui.c" - gint _tmp4_ = 0; - gdouble _tmp5_ = 0.0; -#line 2320 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp4_ = h; -#line 2320 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp5_ = round (_tmp4_ / G_SQRT2); -#line 2320 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - w = (gint) _tmp5_; -#line 12809 "ui.c" - } else { - gint _tmp6_ = 0; - gdouble _tmp7_ = 0.0; -#line 2322 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp6_ = w; -#line 2322 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp7_ = round (_tmp6_ * G_SQRT2); -#line 2322 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - h = (gint) _tmp7_; -#line 12819 "ui.c" - } -#line 2324 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp8_ = c; -#line 2324 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp9_ = gtk_widget_get_allocated_width ((GtkWidget*) self); -#line 2324 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp10_ = w; -#line 2324 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp11_ = gtk_widget_get_allocated_height ((GtkWidget*) self); -#line 2324 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp12_ = h; -#line 2324 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - cairo_translate (_tmp8_, (gdouble) ((_tmp9_ - _tmp10_) / 2), (gdouble) ((_tmp11_ - _tmp12_) / 2)); -#line 2326 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp13_ = c; -#line 2326 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp14_ = w; -#line 2326 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp15_ = h; -#line 2326 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - cairo_rectangle (_tmp13_, 0.5, 0.5, (gdouble) (_tmp14_ - 1), (gdouble) (_tmp15_ - 1)); -#line 2328 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp16_ = c; -#line 2328 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp17_ = self->priv->r; -#line 2328 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp18_ = self->priv->g; -#line 2328 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp19_ = self->priv->b; -#line 2328 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - cairo_set_source_rgb (_tmp16_, _tmp17_, _tmp18_, _tmp19_); -#line 2329 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp20_ = c; -#line 2329 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - cairo_fill_preserve (_tmp20_); -#line 2331 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp21_ = c; -#line 2331 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - cairo_set_line_width (_tmp21_, 1.0); -#line 2332 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp22_ = c; -#line 2332 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - cairo_set_source_rgb (_tmp22_, 0.0, 0.0, 0.0); -#line 2333 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp23_ = c; -#line 2333 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - cairo_stroke (_tmp23_); -#line 2336 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp24_ = c; -#line 2336 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp25_ = self->priv->text; -#line 2336 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - cairo_text_extents (_tmp24_, _tmp25_, &_tmp26_); -#line 2336 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - extents = _tmp26_; -#line 2337 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp27_ = c; -#line 2337 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp28_ = w; -#line 2337 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp29_ = extents; -#line 2337 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp30_ = _tmp29_.width; -#line 2337 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp31_ = h; -#line 2337 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp32_ = extents; -#line 2337 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp33_ = _tmp32_.height; -#line 2337 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - cairo_translate (_tmp27_, ((_tmp28_ - _tmp30_) * 0.5) - 0.5, ((_tmp31_ + _tmp33_) * 0.5) - 0.5); -#line 2338 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp34_ = c; -#line 2338 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _tmp35_ = self->priv->text; -#line 2338 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - cairo_show_text (_tmp34_, _tmp35_); -#line 2340 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - result = TRUE; -#line 2340 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - return result; -#line 12901 "ui.c" -} - - -static void page_icon_class_init (PageIconClass * klass) { -#line 2279 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - page_icon_parent_class = g_type_class_peek_parent (klass); -#line 2279 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - g_type_class_add_private (klass, sizeof (PageIconPrivate)); -#line 2279 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - ((GtkWidgetClass *) klass)->get_preferred_width = (void (*)(GtkWidget*, gint*, gint*)) page_icon_real_get_preferred_width; -#line 2279 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - ((GtkWidgetClass *) klass)->get_preferred_height = (void (*)(GtkWidget*, gint*, gint*)) page_icon_real_get_preferred_height; -#line 2279 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - ((GtkWidgetClass *) klass)->get_preferred_height_for_width = (void (*)(GtkWidget*, gint, gint*, gint*)) page_icon_real_get_preferred_height_for_width; -#line 2279 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - ((GtkWidgetClass *) klass)->get_preferred_width_for_height = (void (*)(GtkWidget*, gint, gint*, gint*)) page_icon_real_get_preferred_width_for_height; -#line 2279 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - ((GtkWidgetClass *) klass)->draw = (gboolean (*)(GtkWidget*, cairo_t*)) page_icon_real_draw; -#line 2279 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - G_OBJECT_CLASS (klass)->finalize = page_icon_finalize; -#line 12922 "ui.c" -} - - -static void page_icon_instance_init (PageIcon * self) { -#line 2279 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self->priv = PAGE_ICON_GET_PRIVATE (self); -#line 12929 "ui.c" -} - - -static void page_icon_finalize (GObject* obj) { - PageIcon * self; -#line 2279 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_PAGE_ICON, PageIcon); -#line 2281 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - _g_free0 (self->priv->text); -#line 2279 "/home/bob/bzr/simple-scan/trunk/src/ui.vala" - G_OBJECT_CLASS (page_icon_parent_class)->finalize (obj); -#line 12941 "ui.c" -} - - -GType page_icon_get_type (void) { - static volatile gsize page_icon_type_id__volatile = 0; - if (g_once_init_enter (&page_icon_type_id__volatile)) { - static const GTypeInfo g_define_type_info = { sizeof (PageIconClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) page_icon_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PageIcon), 0, (GInstanceInitFunc) page_icon_instance_init, NULL }; - GType page_icon_type_id; - page_icon_type_id = g_type_register_static (gtk_drawing_area_get_type (), "PageIcon", &g_define_type_info, 0); - g_once_init_leave (&page_icon_type_id__volatile, page_icon_type_id); - } - return page_icon_type_id__volatile; -} - - -static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) { - if ((array != NULL) && (destroy_func != NULL)) { - int i; - for (i = 0; i < array_length; i = i + 1) { - if (((gpointer*) array)[i] != NULL) { - destroy_func (((gpointer*) array)[i]); - } - } - } -} - - -static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) { - _vala_array_destroy (array, array_length, destroy_func); - g_free (array); -} - - -static gint _vala_array_length (gpointer array) { - int length; - length = 0; - if (array) { - while (((gpointer*) array)[length]) { - length++; - } - } - return length; -} - - - |