summaryrefslogtreecommitdiff
path: root/src/ui.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui.c')
-rw-r--r--src/ui.c120
1 files changed, 62 insertions, 58 deletions
diff --git a/src/ui.c b/src/ui.c
index 122b1d4..10ae780 100644
--- a/src/ui.c
+++ b/src/ui.c
@@ -1,4 +1,4 @@
-/* ui.c generated by valac 0.14.0, the Vala compiler
+/* ui.c generated by valac 0.15.2, the Vala compiler
* generated from ui.vala, do not modify */
/*
@@ -24,9 +24,9 @@
#include <cairo.h>
#include <float.h>
#include <math.h>
-#include <gdk-pixbuf/gdk-pixdata.h>
+#include <gdk-pixbuf/gdk-pixbuf.h>
#include <gdk/gdk.h>
-#include <config.h>
+#include "config.h"
#include <gobject/gvaluecollector.h>
@@ -1637,11 +1637,11 @@ static gboolean simple_scan_save_document (SimpleScan* self, gboolean force_choo
_tmp32_ = file;
book_save (_tmp30_, _tmp31_, _tmp32_, &_inner_error_);
if (_inner_error_ != NULL) {
- goto __catch11_g_error;
+ goto __catch15_g_error;
}
}
- goto __finally11;
- __catch11_g_error:
+ goto __finally15;
+ __catch15_g_error:
{
GError* e = NULL;
GError* _tmp33_;
@@ -1666,7 +1666,7 @@ static gboolean simple_scan_save_document (SimpleScan* self, gboolean force_choo
_g_free0 (uri);
return result;
}
- __finally11:
+ __finally15:
if (_inner_error_ != NULL) {
_g_free0 (format);
_g_free0 (uri_lower);
@@ -2076,19 +2076,23 @@ static gboolean simple_scan_get_paper_size (SimpleScan* self, gint* width, gint*
gint _vala_height = 0;
gboolean result = FALSE;
GtkTreeIter iter = {0};
- GtkComboBox* _tmp0_;
- GtkTreeIter _tmp1_ = {0};
- gboolean _tmp2_ = FALSE;
+ gint _tmp0_;
+ GtkComboBox* _tmp1_;
+ GtkTreeIter _tmp2_ = {0};
+ gboolean _tmp3_ = FALSE;
g_return_val_if_fail (self != NULL, FALSE);
- _tmp0_ = self->priv->paper_size_combo;
- _tmp2_ = gtk_combo_box_get_active_iter (_tmp0_, &_tmp1_);
- iter = _tmp1_;
- if (_tmp2_) {
- GtkListStore* _tmp3_;
- GtkTreeIter _tmp4_;
- _tmp3_ = self->priv->paper_size_model;
- _tmp4_ = iter;
- gtk_tree_model_get ((GtkTreeModel*) _tmp3_, &_tmp4_, 0, &_vala_width, 1, &_vala_height, -1, -1);
+ _vala_height = 0;
+ _tmp0_ = _vala_height;
+ _vala_width = _tmp0_;
+ _tmp1_ = self->priv->paper_size_combo;
+ _tmp3_ = gtk_combo_box_get_active_iter (_tmp1_, &_tmp2_);
+ iter = _tmp2_;
+ if (_tmp3_) {
+ GtkListStore* _tmp4_;
+ GtkTreeIter _tmp5_;
+ _tmp4_ = self->priv->paper_size_model;
+ _tmp5_ = iter;
+ gtk_tree_model_get ((GtkTreeModel*) _tmp4_, &_tmp5_, 0, &_vala_width, 1, &_vala_height, -1, -1);
result = TRUE;
if (width) {
*width = _vala_width;
@@ -2438,13 +2442,13 @@ static gchar* simple_scan_get_temporary_filename (SimpleScan* self, const gchar*
path = _tmp4_;
fd = _tmp5_;
if (_inner_error_ != NULL) {
- goto __catch12_g_error;
+ goto __catch16_g_error;
}
_tmp6_ = fd;
close (_tmp6_);
}
- goto __finally12;
- __catch12_g_error:
+ goto __finally16;
+ __catch16_g_error:
{
GError* e = NULL;
GError* _tmp7_;
@@ -2453,14 +2457,14 @@ static gchar* simple_scan_get_temporary_filename (SimpleScan* self, const gchar*
_inner_error_ = NULL;
_tmp7_ = e;
_tmp8_ = _tmp7_->message;
- g_warning ("ui.vala:788: Error saving email attachment: %s", _tmp8_);
+ g_warning ("ui.vala:789: Error saving email attachment: %s", _tmp8_);
result = NULL;
_g_error_free0 (e);
_g_free0 (path);
_g_free0 (filename);
return result;
}
- __finally12:
+ __finally16:
if (_inner_error_ != NULL) {
_g_free0 (path);
_g_free0 (filename);
@@ -2502,11 +2506,11 @@ static void simple_scan_show_page_cb (SimpleScan* self, BookView* view, Page* pa
_tmp5_ = file;
page_save (_tmp4_, "tiff", _tmp5_, &_inner_error_);
if (_inner_error_ != NULL) {
- goto __catch13_g_error;
+ goto __catch17_g_error;
}
}
- goto __finally13;
- __catch13_g_error:
+ goto __finally17;
+ __catch17_g_error:
{
GError* e = NULL;
const gchar* _tmp6_ = NULL;
@@ -2523,7 +2527,7 @@ static void simple_scan_show_page_cb (SimpleScan* self, BookView* view, Page* pa
_g_free0 (path);
return;
}
- __finally13:
+ __finally17:
if (_inner_error_ != NULL) {
_g_object_unref0 (file);
_g_free0 (path);
@@ -2547,11 +2551,11 @@ static void simple_scan_show_page_cb (SimpleScan* self, BookView* view, Page* pa
gtk_show_uri (_tmp10_, _tmp13_, _tmp14_, &_inner_error_);
_g_free0 (_tmp13_);
if (_inner_error_ != NULL) {
- goto __catch14_g_error;
+ goto __catch18_g_error;
}
}
- goto __finally14;
- __catch14_g_error:
+ goto __finally18;
+ __catch18_g_error:
{
GError* e = NULL;
const gchar* _tmp15_ = NULL;
@@ -2565,7 +2569,7 @@ static void simple_scan_show_page_cb (SimpleScan* self, BookView* view, Page* pa
simple_scan_show_error_dialog (self, _tmp15_, _tmp17_);
_g_error_free0 (e);
}
- __finally14:
+ __finally18:
if (_inner_error_ != NULL) {
_g_object_unref0 (file);
_g_free0 (path);
@@ -3132,11 +3136,11 @@ void G_MODULE_EXPORT print_button_clicked_cb (GtkWidget* widget, SimpleScan* sel
_tmp3_ = self->priv->window;
gtk_print_operation_run (print, GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG, _tmp3_, &_inner_error_);
if (_inner_error_ != NULL) {
- goto __catch15_g_error;
+ goto __catch19_g_error;
}
}
- goto __finally15;
- __catch15_g_error:
+ goto __finally19;
+ __catch19_g_error:
{
GError* e = NULL;
GError* _tmp4_;
@@ -3145,10 +3149,10 @@ void G_MODULE_EXPORT print_button_clicked_cb (GtkWidget* widget, SimpleScan* sel
_inner_error_ = NULL;
_tmp4_ = e;
_tmp5_ = _tmp4_->message;
- g_warning ("ui.vala:1044: Error printing: %s", _tmp5_);
+ g_warning ("ui.vala:1045: Error printing: %s", _tmp5_);
_g_error_free0 (e);
}
- __finally15:
+ __finally19:
if (_inner_error_ != NULL) {
_g_object_unref0 (print);
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
@@ -3172,11 +3176,11 @@ void G_MODULE_EXPORT help_contents_menuitem_activate_cb (GtkWidget* widget, Simp
_tmp2_ = gtk_get_current_event_time ();
gtk_show_uri (_tmp1_, "ghelp:simple-scan", _tmp2_, &_inner_error_);
if (_inner_error_ != NULL) {
- goto __catch16_g_error;
+ goto __catch20_g_error;
}
}
- goto __finally16;
- __catch16_g_error:
+ goto __finally20;
+ __catch20_g_error:
{
GError* e = NULL;
const gchar* _tmp3_ = NULL;
@@ -3190,7 +3194,7 @@ void G_MODULE_EXPORT help_contents_menuitem_activate_cb (GtkWidget* widget, Simp
simple_scan_show_error_dialog (self, _tmp3_, _tmp5_);
_g_error_free0 (e);
}
- __finally16:
+ __finally20:
if (_inner_error_ != NULL) {
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
g_clear_error (&_inner_error_);
@@ -3836,25 +3840,25 @@ static void simple_scan_load (SimpleScan* self) {
GtkInfoBar* _tmp101_;
GtkVBox* _tmp102_;
GtkInfoBar* _tmp103_;
- GtkHBox* _tmp104_;
- GtkHBox* _tmp105_;
- GtkHBox* hbox;
+ GtkBox* _tmp104_;
+ GtkBox* _tmp105_;
+ GtkBox* hbox;
GtkInfoBar* _tmp106_;
GtkWidget* _tmp107_ = NULL;
GtkContainer* _tmp108_;
GtkContainer* content_area;
GtkContainer* _tmp109_;
- GtkHBox* _tmp110_;
- GtkHBox* _tmp111_;
+ GtkBox* _tmp110_;
+ GtkBox* _tmp111_;
GtkImage* _tmp112_;
GtkImage* _tmp113_;
- GtkHBox* _tmp114_;
+ GtkBox* _tmp114_;
GtkImage* _tmp115_;
GtkImage* _tmp116_;
GtkLabel* _tmp117_;
GtkLabel* _tmp118_;
GtkLabel* _tmp119_;
- GtkHBox* _tmp120_;
+ GtkBox* _tmp120_;
GtkLabel* _tmp121_;
GtkLabel* _tmp122_;
GtkInfoBar* _tmp123_;
@@ -3996,11 +4000,11 @@ static void simple_scan_load (SimpleScan* self) {
_tmp3_ = self->priv->builder;
gtk_builder_add_from_file (_tmp3_, filename, &_inner_error_);
if (_inner_error_ != NULL) {
- goto __catch17_g_error;
+ goto __catch21_g_error;
}
}
- goto __finally17;
- __catch17_g_error:
+ goto __finally21;
+ __catch21_g_error:
{
GError* e = NULL;
GError* _tmp4_;
@@ -4011,14 +4015,14 @@ static void simple_scan_load (SimpleScan* self) {
_inner_error_ = NULL;
_tmp4_ = e;
_tmp5_ = _tmp4_->message;
- g_critical ("ui.vala:1261: Unable to load UI %s: %s\n", filename, _tmp5_);
+ g_critical ("ui.vala:1262: Unable to load UI %s: %s\n", filename, _tmp5_);
_tmp6_ = _ ("Files missing");
_tmp7_ = _ ("Please check your installation");
simple_scan_show_error_dialog (self, _tmp6_, _tmp7_);
exit (EXIT_FAILURE);
_g_error_free0 (e);
}
- __finally17:
+ __finally21:
if (_inner_error_ != NULL) {
_g_free0 (filename);
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
@@ -4186,7 +4190,7 @@ static void simple_scan_load (SimpleScan* self) {
_tmp102_ = self->priv->main_vbox;
_tmp103_ = self->priv->info_bar;
gtk_box_pack_start ((GtkBox*) _tmp102_, (GtkWidget*) _tmp103_, FALSE, TRUE, (guint) 0);
- _tmp104_ = (GtkHBox*) gtk_hbox_new (FALSE, 12);
+ _tmp104_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
_tmp105_ = g_object_ref_sink (_tmp104_);
hbox = _tmp105_;
_tmp106_ = self->priv->info_bar;
@@ -4204,7 +4208,7 @@ static void simple_scan_load (SimpleScan* self) {
self->priv->info_bar_image = _tmp113_;
_tmp114_ = hbox;
_tmp115_ = self->priv->info_bar_image;
- gtk_box_pack_start ((GtkBox*) _tmp114_, (GtkWidget*) _tmp115_, FALSE, TRUE, (guint) 0);
+ gtk_box_pack_start (_tmp114_, (GtkWidget*) _tmp115_, FALSE, TRUE, (guint) 0);
_tmp116_ = self->priv->info_bar_image;
gtk_widget_show ((GtkWidget*) _tmp116_);
_tmp117_ = (GtkLabel*) gtk_label_new (NULL);
@@ -4215,7 +4219,7 @@ static void simple_scan_load (SimpleScan* self) {
gtk_misc_set_alignment ((GtkMisc*) _tmp119_, 0.0f, 0.5f);
_tmp120_ = hbox;
_tmp121_ = self->priv->info_bar_label;
- gtk_box_pack_start ((GtkBox*) _tmp120_, (GtkWidget*) _tmp121_, TRUE, TRUE, (guint) 0);
+ gtk_box_pack_start (_tmp120_, (GtkWidget*) _tmp121_, TRUE, TRUE, (guint) 0);
_tmp122_ = self->priv->info_bar_label;
gtk_widget_show ((GtkWidget*) _tmp122_);
_tmp123_ = self->priv->info_bar;
@@ -4419,7 +4423,7 @@ static void simple_scan_load (SimpleScan* self) {
}
_tmp234_ = self->priv->window_width;
_tmp235_ = self->priv->window_height;
- g_debug ("ui.vala:1407: Restoring window to %dx%d pixels", _tmp234_, _tmp235_);
+ g_debug ("ui.vala:1408: Restoring window to %dx%d pixels", _tmp234_, _tmp235_);
_tmp236_ = self->priv->window;
_tmp237_ = self->priv->window_width;
_tmp238_ = self->priv->window_height;
@@ -4430,7 +4434,7 @@ static void simple_scan_load (SimpleScan* self) {
_tmp241_ = self->priv->window_is_maximized;
if (_tmp241_) {
GtkWindow* _tmp242_;
- g_debug ("ui.vala:1412: Restoring window to maximized");
+ g_debug ("ui.vala:1413: Restoring window to maximized");
_tmp242_ = self->priv->window;
gtk_window_maximize (_tmp242_);
}