diff options
| author | Alessio Treglia <alessio@debian.org> | 2013-05-13 08:57:50 +0100 | 
|---|---|---|
| committer | Alessio Treglia <alessio@debian.org> | 2013-05-13 08:57:50 +0100 | 
| commit | d670e5d2f26f878d1a7a40327356adbb28d16e3e (patch) | |
| tree | 2dac8b3fdd7843d05506769e692ce1b2611d8fed | |
| parent | 93eebefec15eb81549cedb49a59190338a9d95e8 (diff) | |
| parent | 695f537db79b0921621b54998ae46f331fff9105 (diff) | |
Merge tag 'upstream/3.6.1'
Upstream version 3.6.1
| -rw-r--r-- | NEWS | 5 | ||||
| -rwxr-xr-x | configure | 2 | ||||
| -rw-r--r-- | configure.ac | 2 | ||||
| -rw-r--r-- | src/book-view.c | 2 | ||||
| -rw-r--r-- | src/book.c | 2 | ||||
| -rw-r--r-- | src/page-view.c | 2 | ||||
| -rw-r--r-- | src/page.c | 2 | ||||
| -rw-r--r-- | src/scanner.c | 66 | ||||
| -rw-r--r-- | src/scanner.vala | 8 | ||||
| -rw-r--r-- | src/simple-scan.c | 2 | ||||
| -rw-r--r-- | src/ui.c | 8 | 
11 files changed, 62 insertions, 39 deletions
| @@ -1,3 +1,8 @@ +Overview of changes in simple-scan 3.6.1 + +  * Fix scan no longer working after an ADF scan completes +  * Fix erroneous warning about failing to set ADF source +  Overview of changes in simple-scan 3.6.0    * No change version bump @@ -2753,7 +2753,7 @@ fi  # Define the identity of the package.   PACKAGE=simple-scan - VERSION=3.6.0 + VERSION=3.6.1  cat >>confdefs.h <<_ACEOF diff --git a/configure.ac b/configure.ac index 0d135ea..26a07d8 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@  dnl Process this file with autoconf to produce a configure script.  AC_INIT(configure.ac) -AM_INIT_AUTOMAKE(simple-scan, 3.6.0) +AM_INIT_AUTOMAKE(simple-scan, 3.6.1)  AM_CONFIG_HEADER(config.h)  AM_MAINTAINER_MODE  GNOME_MAINTAINER_MODE_DEFINES diff --git a/src/book-view.c b/src/book-view.c index 53e2ad8..6bbf359 100644 --- a/src/book-view.c +++ b/src/book-view.c @@ -1,4 +1,4 @@ -/* book-view.c generated by valac 0.17.7, the Vala compiler +/* book-view.c generated by valac 0.18.1, the Vala compiler   * generated from book-view.vala, do not modify */  /* @@ -1,4 +1,4 @@ -/* book.c generated by valac 0.17.7, the Vala compiler +/* book.c generated by valac 0.18.1, the Vala compiler   * generated from book.vala, do not modify */  /* diff --git a/src/page-view.c b/src/page-view.c index 53cf3a9..e18691e 100644 --- a/src/page-view.c +++ b/src/page-view.c @@ -1,4 +1,4 @@ -/* page-view.c generated by valac 0.17.7, the Vala compiler +/* page-view.c generated by valac 0.18.1, the Vala compiler   * generated from page-view.vala, do not modify */  /* @@ -1,4 +1,4 @@ -/* page.c generated by valac 0.17.7, the Vala compiler +/* page.c generated by valac 0.18.1, the Vala compiler   * generated from page.vala, do not modify */  /* diff --git a/src/scanner.c b/src/scanner.c index 8319ee3..d564732 100644 --- a/src/scanner.c +++ b/src/scanner.c @@ -1,4 +1,4 @@ -/* scanner.c generated by valac 0.17.7, the Vala compiler +/* scanner.c generated by valac 0.18.1, the Vala compiler   * generated from scanner.vala, do not modify */  /* @@ -914,6 +914,9 @@ static void _scan_job_unref0_ (gpointer var);  static void _g_list_free__scan_job_unref0_ (GList* self);  static Scanner* scanner_new (void);  static Scanner* scanner_construct (GType object_type); +static void _request_unref0_ (gpointer var); +static void _notify_unref0_ (gpointer var); +static void _credentials_unref0_ (gpointer var);  Scanner* scanner_get_instance (void);  static gboolean scanner_notify_idle_cb (Scanner* self);  static void scanner_notify (Scanner* self, Notify* notification); @@ -3144,19 +3147,34 @@ static void _g_list_free__scan_job_unref0_ (GList* self) {  } +static void _request_unref0_ (gpointer var) { +	(var == NULL) ? NULL : (var = (request_unref (var), NULL)); +} + + +static void _notify_unref0_ (gpointer var) { +	(var == NULL) ? NULL : (var = (notify_unref (var), NULL)); +} + + +static void _credentials_unref0_ (gpointer var) { +	(var == NULL) ? NULL : (var = (credentials_unref (var), NULL)); +} + +  static Scanner* scanner_construct (GType object_type) {  	Scanner* self = NULL;  	GAsyncQueue* _tmp0_;  	GAsyncQueue* _tmp1_;  	GAsyncQueue* _tmp2_;  	self = (Scanner*) g_type_create_instance (object_type); -	_tmp0_ = g_async_queue_new (); +	_tmp0_ = g_async_queue_new_full (_request_unref0_);  	_g_async_queue_unref0 (self->priv->request_queue);  	self->priv->request_queue = _tmp0_; -	_tmp1_ = g_async_queue_new (); +	_tmp1_ = g_async_queue_new_full (_notify_unref0_);  	_g_async_queue_unref0 (self->priv->notify_queue);  	self->priv->notify_queue = _tmp1_; -	_tmp2_ = g_async_queue_new (); +	_tmp2_ = g_async_queue_new_full (_credentials_unref0_);  	_g_async_queue_unref0 (self->priv->authorize_queue);  	self->priv->authorize_queue = _tmp2_;  	return self; @@ -6001,7 +6019,7 @@ static void scanner_do_get_option (Scanner* self) {  						_tmp64_ = adf_sources;  						_tmp64__length1 = adf_sources_length1;  						_tmp65_ = scanner_set_constrained_string_option (self, _tmp61_, _tmp62_, _tmp63_, _tmp64_, _tmp64__length1, NULL); -						if (!(!_tmp65_)) { +						if (!_tmp65_) {  							g_warning ("scanner.vala:894: Unable to set front ADF source, please file a bug");  						}  					} @@ -6790,23 +6808,27 @@ static SANE_Option_Descriptor* scanner_get_option_by_name (Scanner* self, SANE_H  static void scanner_do_complete_document (Scanner* self) { -	GList* _tmp0_; +	SANE_Handle _tmp0_;  	GList* _tmp1_; -	NotifyDocumentDone* _tmp2_; +	GList* _tmp2_;  	NotifyDocumentDone* _tmp3_; +	NotifyDocumentDone* _tmp4_;  	g_return_if_fail (self != NULL); -	_tmp0_ = self->priv->job_queue; -	self->priv->job_queue = g_list_remove_link (self->priv->job_queue, _tmp0_); -	self->priv->state = SCAN_STATE_IDLE; +	_tmp0_ = self->priv->handle; +	sane_cancel (_tmp0_); +	g_debug ("scanner.vala:1117: sane_cancel ()");  	_tmp1_ = self->priv->job_queue; -	if (_tmp1_ != NULL) { +	self->priv->job_queue = g_list_remove_link (self->priv->job_queue, _tmp1_); +	self->priv->state = SCAN_STATE_IDLE; +	_tmp2_ = self->priv->job_queue; +	if (_tmp2_ != NULL) {  		self->priv->state = SCAN_STATE_OPEN;  		return;  	} -	_tmp2_ = notify_document_done_new (); -	_tmp3_ = _tmp2_; -	scanner_notify (self, (Notify*) _tmp3_); -	_notify_unref0 (_tmp3_); +	_tmp3_ = notify_document_done_new (); +	_tmp4_ = _tmp3_; +	scanner_notify (self, (Notify*) _tmp4_); +	_notify_unref0 (_tmp4_);  	scanner_set_scanning (self, FALSE);  } @@ -6836,7 +6858,7 @@ static void scanner_do_start (Scanner* self) {  	_tmp6_ = status;  	_tmp7_ = sane_status_to_string (_tmp6_);  	_tmp8_ = _tmp7_; -	g_debug ("scanner.vala:1141: sane_start (page=%d, pass=%d) -> %s", _tmp4_, _tmp5_, _tmp8_); +	g_debug ("scanner.vala:1144: sane_start (page=%d, pass=%d) -> %s", _tmp4_, _tmp5_, _tmp8_);  	_g_free0 (_tmp8_);  	_tmp9_ = status;  	if (_tmp9_ == SANE_STATUS_GOOD) { @@ -6853,7 +6875,7 @@ static void scanner_do_start (Scanner* self) {  			const gchar* _tmp14_ = NULL;  			_tmp11_ = status;  			_tmp12_ = sane_strstatus (_tmp11_); -			g_warning ("scanner.vala:1148: Unable to start device: %s", _tmp12_); +			g_warning ("scanner.vala:1151: Unable to start device: %s", _tmp12_);  			_tmp13_ = status;  			_tmp14_ = _ ("Unable to start scan");  			scanner_fail_scan (self, (gint) _tmp13_, _tmp14_); @@ -6989,7 +7011,7 @@ static void scanner_do_get_parameters (Scanner* self) {  	_tmp3_ = status;  	_tmp4_ = sane_status_to_string (_tmp3_);  	_tmp5_ = _tmp4_; -	g_debug ("scanner.vala:1158: sane_get_parameters () -> %s", _tmp5_); +	g_debug ("scanner.vala:1161: sane_get_parameters () -> %s", _tmp5_);  	_g_free0 (_tmp5_);  	_tmp6_ = status;  	if (_tmp6_ != SANE_STATUS_GOOD) { @@ -6999,7 +7021,7 @@ static void scanner_do_get_parameters (Scanner* self) {  		const gchar* _tmp10_ = NULL;  		_tmp7_ = status;  		_tmp8_ = sane_strstatus (_tmp7_); -		g_warning ("scanner.vala:1161: Unable to get device parameters: %s", _tmp8_); +		g_warning ("scanner.vala:1164: Unable to get device parameters: %s", _tmp8_);  		_tmp9_ = status;  		_tmp10_ = _ ("Error communicating with scanner");  		scanner_fail_scan (self, (gint) _tmp9_, _tmp10_); @@ -7029,7 +7051,7 @@ static void scanner_do_get_parameters (Scanner* self) {  	_tmp27_ = _tmp26_.lines;  	_tmp28_ = self->priv->parameters;  	_tmp29_ = _tmp28_.depth; -	g_debug ("scanner.vala:1170: Parameters: format=%s last_frame=%s bytes_per_line=" \ +	g_debug ("scanner.vala:1173: Parameters: format=%s last_frame=%s bytes_per_line=" \  "%d pixels_per_line=%d lines=%d depth=%d", _tmp20_, _tmp21_, _tmp23_, _tmp25_, _tmp27_, _tmp29_);  	_g_free0 (_tmp20_);  	_tmp30_ = scan_page_info_new (); @@ -7156,7 +7178,6 @@ static void scanner_do_complete_page (Scanner* self) {  	gboolean _tmp8_;  	ScanJob* _tmp10_;  	ScanType _tmp11_; -	SANE_Handle _tmp17_;  	g_return_if_fail (self != NULL);  	_tmp0_ = self->priv->job_queue;  	_tmp1_ = _tmp0_->data; @@ -7199,9 +7220,6 @@ static void scanner_do_complete_page (Scanner* self) {  		_scan_job_unref0 (job);  		return;  	} -	_tmp17_ = self->priv->handle; -	sane_cancel (_tmp17_); -	g_debug ("scanner.vala:1230: sane_cancel ()");  	scanner_do_complete_document (self);  	_scan_job_unref0 (job);  } diff --git a/src/scanner.vala b/src/scanner.vala index 03f1e24..722f308 100644 --- a/src/scanner.vala +++ b/src/scanner.vala @@ -890,7 +890,7 @@ public class Scanner                      break;                  case ScanType.ADF_FRONT:                      if (!set_constrained_string_option (handle, option, index, adf_front_sources, null)) -                        if (!!set_constrained_string_option (handle, option, index, adf_sources, null)) +                        if (!set_constrained_string_option (handle, option, index, adf_sources, null))                              warning ("Unable to set front ADF source, please file a bug");                      break;                  case ScanType.ADF_BACK: @@ -1113,6 +1113,9 @@ public class Scanner      private void do_complete_document ()      { +        Sane.cancel (handle); +        debug ("sane_cancel ()"); +          job_queue.remove_link (job_queue);          state = ScanState.IDLE; @@ -1226,9 +1229,6 @@ public class Scanner              return;          } -        Sane.cancel (handle); -        debug ("sane_cancel ()"); -          do_complete_document ();      } diff --git a/src/simple-scan.c b/src/simple-scan.c index aa96f80..ee347c7 100644 --- a/src/simple-scan.c +++ b/src/simple-scan.c @@ -1,4 +1,4 @@ -/* simple-scan.c generated by valac 0.17.7, the Vala compiler +/* simple-scan.c generated by valac 0.18.1, the Vala compiler   * generated from simple-scan.vala, do not modify */  /* @@ -1,4 +1,4 @@ -/* ui.c generated by valac 0.17.7, the Vala compiler +/* ui.c generated by valac 0.18.1, the Vala compiler   * generated from ui.vala, do not modify */  /* @@ -3852,7 +3852,7 @@ static void user_interface_load (UserInterface* self) {  	GtkBox* _tmp107_;  	GtkBox* hbox;  	GtkInfoBar* _tmp108_; -	GtkWidget* _tmp109_ = NULL; +	GtkContainer* _tmp109_ = NULL;  	GtkContainer* _tmp110_;  	GtkContainer* content_area;  	GtkContainer* _tmp111_; @@ -3868,11 +3868,11 @@ static void user_interface_load (UserInterface* self) {  	GtkLabel* _tmp121_;  	GtkLabel* _tmp122_;  	GtkInfoBar* _tmp123_; -	GtkWidget* _tmp124_ = NULL; +	GtkButton* _tmp124_ = NULL;  	GtkButton* _tmp125_;  	GtkInfoBar* _tmp126_;  	const gchar* _tmp127_ = NULL; -	GtkWidget* _tmp128_ = NULL; +	GtkButton* _tmp128_ = NULL;  	GtkButton* _tmp129_;  	GtkTreeIter iter = {0};  	GtkListStore* _tmp130_; | 
