summaryrefslogtreecommitdiff
path: root/src/simple-scan.c
diff options
context:
space:
mode:
authorAlessio Treglia <alessio@debian.org>2013-01-15 00:46:37 +0000
committerAlessio Treglia <alessio@debian.org>2013-01-15 00:46:37 +0000
commit8f1bef0c8abe53da0001b0d4df1f5439fecd9c3b (patch)
tree67137e06f48cbe06c0bf16052ea446edf63eb7a0 /src/simple-scan.c
parentd723aded8c1b91731f391754358750e9119d6689 (diff)
parentb99db4e5834bb8668c249bb7ce30af9a4d23527e (diff)
Merge tag 'upstream/3.6.0'
Upstream version 3.6.0
Diffstat (limited to 'src/simple-scan.c')
-rw-r--r--src/simple-scan.c202
1 files changed, 91 insertions, 111 deletions
diff --git a/src/simple-scan.c b/src/simple-scan.c
index 4ead7e5..aa96f80 100644
--- a/src/simple-scan.c
+++ b/src/simple-scan.c
@@ -1,4 +1,4 @@
-/* simple-scan.c generated by valac 0.16.1, the Vala compiler
+/* simple-scan.c generated by valac 0.17.7, the Vala compiler
* generated from simple-scan.vala, do not modify */
/*
@@ -530,7 +530,7 @@ static void simple_scan_real_startup (GApplication* base) {
GUdevClient* _tmp20_;
ScanDevice* _tmp21_;
self = (SimpleScan*) base;
- G_APPLICATION_CLASS (simple_scan_parent_class)->startup ((GApplication*) GTK_APPLICATION (self));
+ G_APPLICATION_CLASS (simple_scan_parent_class)->startup ((GApplication*) G_TYPE_CHECK_INSTANCE_CAST (self, GTK_TYPE_APPLICATION, GtkApplication));
_tmp0_ = user_interface_new ();
_user_interface_unref0 (self->priv->ui);
self->priv->ui = _tmp0_;
@@ -611,7 +611,7 @@ static void simple_scan_real_activate (GApplication* base) {
UserInterface* _tmp0_;
Scanner* _tmp1_;
self = (SimpleScan*) base;
- G_APPLICATION_CLASS (simple_scan_parent_class)->activate ((GApplication*) GTK_APPLICATION (self));
+ G_APPLICATION_CLASS (simple_scan_parent_class)->activate ((GApplication*) G_TYPE_CHECK_INSTANCE_CAST (self, GTK_TYPE_APPLICATION, GtkApplication));
_tmp0_ = self->priv->ui;
user_interface_start (_tmp0_);
_tmp1_ = self->priv->scanner;
@@ -623,7 +623,7 @@ static void simple_scan_real_shutdown (GApplication* base) {
SimpleScan * self;
Scanner* _tmp0_;
self = (SimpleScan*) base;
- G_APPLICATION_CLASS (simple_scan_parent_class)->shutdown ((GApplication*) GTK_APPLICATION (self));
+ G_APPLICATION_CLASS (simple_scan_parent_class)->shutdown ((GApplication*) G_TYPE_CHECK_INSTANCE_CAST (self, GTK_TYPE_APPLICATION, GtkApplication));
_book_unref0 (self->priv->book);
self->priv->book = NULL;
_user_interface_unref0 (self->priv->ui);
@@ -1649,115 +1649,95 @@ static void simple_scan_email_cb (SimpleScan* self, UserInterface* ui, const gch
static void simple_scan_log_cb (const gchar* log_domain, GLogLevelFlags log_level, const gchar* message) {
- FILE* _tmp0_;
- GLogLevelFlags _tmp14_;
+ gchar* prefix = NULL;
+ GLogLevelFlags _tmp0_;
+ FILE* _tmp8_;
+ GTimer* _tmp9_;
+ gdouble _tmp10_ = 0.0;
+ const gchar* _tmp11_;
+ const gchar* _tmp12_;
+ gboolean _tmp13_;
g_return_if_fail (message != NULL);
- _tmp0_ = simple_scan_log_file;
- if (_tmp0_ != NULL) {
- gchar* prefix = NULL;
- GLogLevelFlags _tmp1_;
- FILE* _tmp9_;
- GTimer* _tmp10_;
- gdouble _tmp11_ = 0.0;
- const gchar* _tmp12_;
- const gchar* _tmp13_;
- _tmp1_ = log_level;
- switch (_tmp1_ & G_LOG_LEVEL_MASK) {
- case G_LOG_LEVEL_ERROR:
- {
- gchar* _tmp2_;
- _tmp2_ = g_strdup ("ERROR:");
- _g_free0 (prefix);
- prefix = _tmp2_;
- break;
- }
- case G_LOG_LEVEL_CRITICAL:
- {
- gchar* _tmp3_;
- _tmp3_ = g_strdup ("CRITICAL:");
- _g_free0 (prefix);
- prefix = _tmp3_;
- break;
- }
- case G_LOG_LEVEL_WARNING:
- {
- gchar* _tmp4_;
- _tmp4_ = g_strdup ("WARNING:");
- _g_free0 (prefix);
- prefix = _tmp4_;
- break;
- }
- case G_LOG_LEVEL_MESSAGE:
- {
- gchar* _tmp5_;
- _tmp5_ = g_strdup ("MESSAGE:");
- _g_free0 (prefix);
- prefix = _tmp5_;
- break;
- }
- case G_LOG_LEVEL_INFO:
- {
- gchar* _tmp6_;
- _tmp6_ = g_strdup ("INFO:");
- _g_free0 (prefix);
- prefix = _tmp6_;
- break;
- }
- case G_LOG_LEVEL_DEBUG:
- {
- gchar* _tmp7_;
- _tmp7_ = g_strdup ("DEBUG:");
- _g_free0 (prefix);
- prefix = _tmp7_;
- break;
- }
- default:
- {
- gchar* _tmp8_;
- _tmp8_ = g_strdup ("LOG:");
- _g_free0 (prefix);
- prefix = _tmp8_;
- break;
- }
+ _tmp0_ = log_level;
+ switch (_tmp0_ & G_LOG_LEVEL_MASK) {
+ case G_LOG_LEVEL_ERROR:
+ {
+ gchar* _tmp1_;
+ _tmp1_ = g_strdup ("ERROR:");
+ _g_free0 (prefix);
+ prefix = _tmp1_;
+ break;
}
- _tmp9_ = simple_scan_log_file;
- _tmp10_ = simple_scan_log_timer;
- _tmp11_ = g_timer_elapsed (_tmp10_, NULL);
- _tmp12_ = prefix;
- _tmp13_ = message;
- fprintf (_tmp9_, "[%+.2fs] %s %s\n", _tmp11_, _tmp12_, _tmp13_);
- _g_free0 (prefix);
- }
- _tmp14_ = log_level;
- if ((_tmp14_ & G_LOG_LEVEL_DEBUG) != 0) {
- gboolean _tmp15_;
- _tmp15_ = simple_scan_debug_enabled;
- if (_tmp15_) {
- GLogFunc _tmp16_;
- void* _tmp16__target;
- const gchar* _tmp17_;
- GLogLevelFlags _tmp18_;
- const gchar* _tmp19_;
- _tmp16_ = g_log_default_handler;
- _tmp16__target = NULL;
- _tmp17_ = log_domain;
- _tmp18_ = log_level;
- _tmp19_ = message;
- _tmp16_ (_tmp17_, _tmp18_, _tmp19_, _tmp16__target);
+ case G_LOG_LEVEL_CRITICAL:
+ {
+ gchar* _tmp2_;
+ _tmp2_ = g_strdup ("CRITICAL:");
+ _g_free0 (prefix);
+ prefix = _tmp2_;
+ break;
}
- } else {
- GLogFunc _tmp20_;
- void* _tmp20__target;
- const gchar* _tmp21_;
- GLogLevelFlags _tmp22_;
- const gchar* _tmp23_;
- _tmp20_ = g_log_default_handler;
- _tmp20__target = NULL;
- _tmp21_ = log_domain;
- _tmp22_ = log_level;
- _tmp23_ = message;
- _tmp20_ (_tmp21_, _tmp22_, _tmp23_, _tmp20__target);
+ case G_LOG_LEVEL_WARNING:
+ {
+ gchar* _tmp3_;
+ _tmp3_ = g_strdup ("WARNING:");
+ _g_free0 (prefix);
+ prefix = _tmp3_;
+ break;
+ }
+ case G_LOG_LEVEL_MESSAGE:
+ {
+ gchar* _tmp4_;
+ _tmp4_ = g_strdup ("MESSAGE:");
+ _g_free0 (prefix);
+ prefix = _tmp4_;
+ break;
+ }
+ case G_LOG_LEVEL_INFO:
+ {
+ gchar* _tmp5_;
+ _tmp5_ = g_strdup ("INFO:");
+ _g_free0 (prefix);
+ prefix = _tmp5_;
+ break;
+ }
+ case G_LOG_LEVEL_DEBUG:
+ {
+ gchar* _tmp6_;
+ _tmp6_ = g_strdup ("DEBUG:");
+ _g_free0 (prefix);
+ prefix = _tmp6_;
+ break;
+ }
+ default:
+ {
+ gchar* _tmp7_;
+ _tmp7_ = g_strdup ("LOG:");
+ _g_free0 (prefix);
+ prefix = _tmp7_;
+ break;
+ }
+ }
+ _tmp8_ = simple_scan_log_file;
+ _tmp9_ = simple_scan_log_timer;
+ _tmp10_ = g_timer_elapsed (_tmp9_, NULL);
+ _tmp11_ = prefix;
+ _tmp12_ = message;
+ fprintf (_tmp8_, "[%+.2fs] %s %s\n", _tmp10_, _tmp11_, _tmp12_);
+ _tmp13_ = simple_scan_debug_enabled;
+ if (_tmp13_) {
+ FILE* _tmp14_;
+ GTimer* _tmp15_;
+ gdouble _tmp16_ = 0.0;
+ const gchar* _tmp17_;
+ const gchar* _tmp18_;
+ _tmp14_ = stderr;
+ _tmp15_ = simple_scan_log_timer;
+ _tmp16_ = g_timer_elapsed (_tmp15_, NULL);
+ _tmp17_ = prefix;
+ _tmp18_ = message;
+ fprintf (_tmp14_, "[%+.2fs] %s %s\n", _tmp16_, _tmp17_, _tmp18_);
}
+ _g_free0 (prefix);
}
@@ -2427,7 +2407,7 @@ gint simple_scan_main (gchar** args, int args_length1) {
simple_scan_log_file = _tmp46_;
g_log_set_default_handler (_simple_scan_log_cb_glog_func, NULL);
_tmp47_ = getpid ();
- g_debug ("simple-scan.vala:593: Starting Simple Scan %s, PID=%i", VERSION, (gint) _tmp47_);
+ g_debug ("simple-scan.vala:582: Starting Simple Scan %s, PID=%i", VERSION, (gint) _tmp47_);
_tmp48_ = device;
_tmp49_ = simple_scan_new (_tmp48_);
app = _tmp49_;
@@ -2467,7 +2447,7 @@ static void simple_scan_instance_init (SimpleScan * self) {
static void simple_scan_finalize (GObject* obj) {
SimpleScan * self;
- self = SIMPLE_SCAN (obj);
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_SIMPLE_SCAN, SimpleScan);
_scan_device_unref0 (self->priv->default_device);
_g_object_unref0 (self->priv->udev_client);
_user_interface_unref0 (self->priv->ui);