diff options
Diffstat (limited to 'src/autosave-manager.c')
-rw-r--r-- | src/autosave-manager.c | 254 |
1 files changed, 128 insertions, 126 deletions
diff --git a/src/autosave-manager.c b/src/autosave-manager.c index 8dab65b..5ea1792 100644 --- a/src/autosave-manager.c +++ b/src/autosave-manager.c @@ -1,4 +1,4 @@ -/* autosave-manager.c generated by valac 0.34.2, the Vala compiler +/* autosave-manager.c generated by valac 0.34.6, the Vala compiler * generated from autosave-manager.vala, do not modify */ /* @@ -963,6 +963,7 @@ static gchar* autosave_manager_get_value (AutosaveManager* self, GKeyFile* file, static gint autosave_manager_get_integer (AutosaveManager* self, GKeyFile* file, const gchar* group_name, const gchar* key, gint _default_) { gint result = 0; + gint _tmp6_ = 0; GError * _inner_error_ = NULL; #line 169 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" g_return_val_if_fail (self != NULL, 0); @@ -972,7 +973,7 @@ static gint autosave_manager_get_integer (AutosaveManager* self, GKeyFile* file, g_return_val_if_fail (group_name != NULL, 0); #line 169 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" g_return_val_if_fail (key != NULL, 0); -#line 975 "autosave-manager.c" +#line 976 "autosave-manager.c" { gint _tmp0_ = 0; GKeyFile* _tmp1_ = NULL; @@ -991,14 +992,14 @@ static gint autosave_manager_get_integer (AutosaveManager* self, GKeyFile* file, _tmp0_ = _tmp4_; #line 173 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 994 "autosave-manager.c" +#line 995 "autosave-manager.c" goto __catch32_g_error; } #line 173 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" result = _tmp0_; #line 173 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" return result; -#line 1001 "autosave-manager.c" +#line 1002 "autosave-manager.c" } goto __finally32; __catch32_g_error: @@ -1017,7 +1018,7 @@ static gint autosave_manager_get_integer (AutosaveManager* self, GKeyFile* file, _g_error_free0 (e); #line 177 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" return result; -#line 1020 "autosave-manager.c" +#line 1021 "autosave-manager.c" } __finally32: #line 171 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" @@ -1025,13 +1026,14 @@ static gint autosave_manager_get_integer (AutosaveManager* self, GKeyFile* file, #line 171 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" g_clear_error (&_inner_error_); #line 171 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" - return 0; -#line 1029 "autosave-manager.c" + return _tmp6_; +#line 1030 "autosave-manager.c" } static gboolean autosave_manager_get_boolean (AutosaveManager* self, GKeyFile* file, const gchar* group_name, const gchar* key, gboolean _default_) { gboolean result = FALSE; + gboolean _tmp6_ = FALSE; GError * _inner_error_ = NULL; #line 181 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" g_return_val_if_fail (self != NULL, FALSE); @@ -1041,7 +1043,7 @@ static gboolean autosave_manager_get_boolean (AutosaveManager* self, GKeyFile* f g_return_val_if_fail (group_name != NULL, FALSE); #line 181 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" g_return_val_if_fail (key != NULL, FALSE); -#line 1044 "autosave-manager.c" +#line 1046 "autosave-manager.c" { gboolean _tmp0_ = FALSE; GKeyFile* _tmp1_ = NULL; @@ -1060,14 +1062,14 @@ static gboolean autosave_manager_get_boolean (AutosaveManager* self, GKeyFile* f _tmp0_ = _tmp4_; #line 185 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 1063 "autosave-manager.c" +#line 1065 "autosave-manager.c" goto __catch33_g_error; } #line 185 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" result = _tmp0_; #line 185 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" return result; -#line 1070 "autosave-manager.c" +#line 1072 "autosave-manager.c" } goto __finally33; __catch33_g_error: @@ -1086,7 +1088,7 @@ static gboolean autosave_manager_get_boolean (AutosaveManager* self, GKeyFile* f _g_error_free0 (e); #line 189 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" return result; -#line 1089 "autosave-manager.c" +#line 1091 "autosave-manager.c" } __finally33: #line 183 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" @@ -1094,8 +1096,8 @@ static gboolean autosave_manager_get_boolean (AutosaveManager* self, GKeyFile* f #line 183 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" g_clear_error (&_inner_error_); #line 183 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" - return FALSE; -#line 1098 "autosave-manager.c" + return _tmp6_; +#line 1100 "autosave-manager.c" } @@ -1111,17 +1113,17 @@ void autosave_manager_cleanup (AutosaveManager* self) { _tmp0_ = self->priv->update_timeout; #line 197 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" if (_tmp0_ > ((guint) 0)) { -#line 1114 "autosave-manager.c" +#line 1116 "autosave-manager.c" guint _tmp1_ = 0U; #line 198 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" _tmp1_ = self->priv->update_timeout; #line 198 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" g_source_remove (_tmp1_); -#line 1120 "autosave-manager.c" +#line 1122 "autosave-manager.c" } #line 199 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" self->priv->update_timeout = (guint) 0; -#line 1124 "autosave-manager.c" +#line 1126 "autosave-manager.c" { GDir* _tmp2_ = NULL; const gchar* _tmp3_ = NULL; @@ -1135,7 +1137,7 @@ void autosave_manager_cleanup (AutosaveManager* self) { _tmp2_ = _tmp4_; #line 204 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 1138 "autosave-manager.c" +#line 1140 "autosave-manager.c" goto __catch34_g_error; } #line 204 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" @@ -1148,7 +1150,7 @@ void autosave_manager_cleanup (AutosaveManager* self) { dir = _tmp5_; #line 202 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" _g_dir_close0 (_tmp2_); -#line 1151 "autosave-manager.c" +#line 1153 "autosave-manager.c" } goto __finally34; __catch34_g_error: @@ -1172,7 +1174,7 @@ void autosave_manager_cleanup (AutosaveManager* self) { _g_dir_close0 (dir); #line 209 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" return; -#line 1175 "autosave-manager.c" +#line 1177 "autosave-manager.c" } __finally34: #line 202 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" @@ -1185,11 +1187,11 @@ void autosave_manager_cleanup (AutosaveManager* self) { g_clear_error (&_inner_error_); #line 202 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" return; -#line 1188 "autosave-manager.c" +#line 1190 "autosave-manager.c" } #line 212 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" while (TRUE) { -#line 1192 "autosave-manager.c" +#line 1194 "autosave-manager.c" gchar* filename = NULL; GDir* _tmp8_ = NULL; const gchar* _tmp9_ = NULL; @@ -1216,7 +1218,7 @@ void autosave_manager_cleanup (AutosaveManager* self) { _g_free0 (filename); #line 216 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" break; -#line 1219 "autosave-manager.c" +#line 1221 "autosave-manager.c" } #line 217 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" _tmp12_ = autosave_manager_AUTOSAVE_DIR; @@ -1234,25 +1236,25 @@ void autosave_manager_cleanup (AutosaveManager* self) { _g_free0 (path); #line 212 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" _g_free0 (filename); -#line 1237 "autosave-manager.c" +#line 1239 "autosave-manager.c" } #line 193 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" _g_dir_close0 (dir); -#line 1241 "autosave-manager.c" +#line 1243 "autosave-manager.c" } static void _autosave_manager_on_scan_finished_page_scan_finished (Page* _sender, gpointer self) { #line 224 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" autosave_manager_on_scan_finished ((AutosaveManager*) self, _sender); -#line 1248 "autosave-manager.c" +#line 1250 "autosave-manager.c" } static void _autosave_manager_on_changed_page_crop_changed (Page* _sender, gpointer self) { #line 225 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" autosave_manager_on_changed ((AutosaveManager*) self); -#line 1255 "autosave-manager.c" +#line 1257 "autosave-manager.c" } @@ -1271,7 +1273,7 @@ void autosave_manager_on_page_added (AutosaveManager* self, Page* page) { _tmp1_ = page; #line 225 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" g_signal_connect (_tmp1_, "crop-changed", (GCallback) _autosave_manager_on_changed_page_crop_changed, self); -#line 1274 "autosave-manager.c" +#line 1276 "autosave-manager.c" } @@ -1318,13 +1320,13 @@ void autosave_manager_on_page_removed (AutosaveManager* self, Page* page) { _tmp8_ = filename; #line 234 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" if (_tmp8_ != NULL) { -#line 1321 "autosave-manager.c" +#line 1323 "autosave-manager.c" const gchar* _tmp9_ = NULL; #line 235 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" _tmp9_ = filename; #line 235 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" g_unlink (_tmp9_); -#line 1327 "autosave-manager.c" +#line 1329 "autosave-manager.c" } #line 236 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" _tmp10_ = self->priv->page_filenames; @@ -1334,7 +1336,7 @@ void autosave_manager_on_page_removed (AutosaveManager* self, Page* page) { g_hash_table_remove (_tmp10_, _tmp11_); #line 228 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" _g_free0 (filename); -#line 1337 "autosave-manager.c" +#line 1339 "autosave-manager.c" } @@ -1350,7 +1352,7 @@ void autosave_manager_on_scan_finished (AutosaveManager* self, Page* page) { autosave_manager_save_pixels (self, _tmp0_); #line 242 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" autosave_manager_save (self, FALSE); -#line 1353 "autosave-manager.c" +#line 1355 "autosave-manager.c" } @@ -1359,7 +1361,7 @@ void autosave_manager_on_changed (AutosaveManager* self) { g_return_if_fail (self != NULL); #line 247 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" autosave_manager_save (self, TRUE); -#line 1362 "autosave-manager.c" +#line 1364 "autosave-manager.c" } @@ -1373,7 +1375,7 @@ void autosave_manager_on_cleared (AutosaveManager* self) { g_hash_table_remove_all (_tmp0_); #line 253 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" autosave_manager_save (self, TRUE); -#line 1376 "autosave-manager.c" +#line 1378 "autosave-manager.c" } @@ -1387,7 +1389,7 @@ static gboolean ___lambda4_ (AutosaveManager* self) { result = FALSE; #line 272 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" return result; -#line 1390 "autosave-manager.c" +#line 1392 "autosave-manager.c" } @@ -1396,7 +1398,7 @@ static gboolean ____lambda4__gsource_func (gpointer self) { result = ___lambda4_ ((AutosaveManager*) self); #line 268 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" return result; -#line 1399 "autosave-manager.c" +#line 1401 "autosave-manager.c" } @@ -1411,35 +1413,35 @@ static void autosave_manager_save (AutosaveManager* self, gboolean do_timeout) { _tmp1_ = self->priv->update_timeout; #line 258 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" if (_tmp1_ == ((guint) 0)) { -#line 1414 "autosave-manager.c" +#line 1416 "autosave-manager.c" gboolean _tmp2_ = FALSE; #line 258 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" _tmp2_ = do_timeout; #line 258 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" _tmp0_ = _tmp2_; -#line 1420 "autosave-manager.c" +#line 1422 "autosave-manager.c" } else { #line 258 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" _tmp0_ = FALSE; -#line 1424 "autosave-manager.c" +#line 1426 "autosave-manager.c" } #line 258 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" if (_tmp0_) { #line 259 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" g_debug ("autosave-manager.vala:259: Waiting to autosave..."); -#line 1430 "autosave-manager.c" +#line 1432 "autosave-manager.c" } #line 262 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" _tmp3_ = self->priv->update_timeout; #line 262 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" if (_tmp3_ > ((guint) 0)) { -#line 1436 "autosave-manager.c" +#line 1438 "autosave-manager.c" guint _tmp4_ = 0U; #line 263 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" _tmp4_ = self->priv->update_timeout; #line 263 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" g_source_remove (_tmp4_); -#line 1442 "autosave-manager.c" +#line 1444 "autosave-manager.c" } #line 264 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" self->priv->update_timeout = (guint) 0; @@ -1447,17 +1449,17 @@ static void autosave_manager_save (AutosaveManager* self, gboolean do_timeout) { _tmp5_ = do_timeout; #line 266 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" if (_tmp5_) { -#line 1450 "autosave-manager.c" +#line 1452 "autosave-manager.c" guint _tmp6_ = 0U; #line 268 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" _tmp6_ = g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 100, ____lambda4__gsource_func, autosave_manager_ref (self), autosave_manager_unref); #line 268 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" self->priv->update_timeout = _tmp6_; -#line 1456 "autosave-manager.c" +#line 1458 "autosave-manager.c" } else { #line 276 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" autosave_manager_real_save (self); -#line 1460 "autosave-manager.c" +#line 1462 "autosave-manager.c" } } @@ -1482,19 +1484,19 @@ static void autosave_manager_real_save (AutosaveManager* self) { _tmp1_ = g_strdup (""); #line 284 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" page_names = _tmp1_; -#line 1485 "autosave-manager.c" +#line 1487 "autosave-manager.c" { gint i = 0; #line 285 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" i = 0; -#line 1490 "autosave-manager.c" +#line 1492 "autosave-manager.c" { gboolean _tmp2_ = FALSE; #line 285 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" _tmp2_ = TRUE; #line 285 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" while (TRUE) { -#line 1497 "autosave-manager.c" +#line 1499 "autosave-manager.c" gint _tmp4_ = 0; Book* _tmp5_ = NULL; Book* _tmp6_ = NULL; @@ -1594,13 +1596,13 @@ static void autosave_manager_real_save (AutosaveManager* self) { gint _tmp108_ = 0; #line 285 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" if (!_tmp2_) { -#line 1597 "autosave-manager.c" +#line 1599 "autosave-manager.c" gint _tmp3_ = 0; #line 285 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" _tmp3_ = i; #line 285 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" i = _tmp3_ + 1; -#line 1603 "autosave-manager.c" +#line 1605 "autosave-manager.c" } #line 285 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" _tmp2_ = FALSE; @@ -1618,7 +1620,7 @@ static void autosave_manager_real_save (AutosaveManager* self) { if (!(((guint) _tmp4_) < _tmp8_)) { #line 285 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" break; -#line 1621 "autosave-manager.c" +#line 1623 "autosave-manager.c" } #line 287 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" _tmp9_ = autosave_manager_get_book (self); @@ -1642,7 +1644,7 @@ static void autosave_manager_real_save (AutosaveManager* self) { _page_unref0 (page); #line 291 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" continue; -#line 1645 "autosave-manager.c" +#line 1647 "autosave-manager.c" } #line 293 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" _tmp16_ = i; @@ -1654,7 +1656,7 @@ static void autosave_manager_real_save (AutosaveManager* self) { _tmp18_ = page_names; #line 294 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" if (g_strcmp0 (_tmp18_, "") != 0) { -#line 1657 "autosave-manager.c" +#line 1659 "autosave-manager.c" const gchar* _tmp19_ = NULL; gchar* _tmp20_ = NULL; #line 295 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" @@ -1665,7 +1667,7 @@ static void autosave_manager_real_save (AutosaveManager* self) { _g_free0 (page_names); #line 295 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" page_names = _tmp20_; -#line 1668 "autosave-manager.c" +#line 1670 "autosave-manager.c" } #line 296 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" _tmp21_ = page_names; @@ -1763,7 +1765,7 @@ static void autosave_manager_real_save (AutosaveManager* self) { switch (_tmp57_) { #line 306 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" case SCAN_DIRECTION_TOP_TO_BOTTOM: -#line 1766 "autosave-manager.c" +#line 1768 "autosave-manager.c" { GKeyFile* _tmp58_ = NULL; const gchar* _tmp59_ = NULL; @@ -1775,11 +1777,11 @@ static void autosave_manager_real_save (AutosaveManager* self) { g_key_file_set_value (_tmp58_, _tmp59_, "scan-direction", "TOP_TO_BOTTOM"); #line 310 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" break; -#line 1778 "autosave-manager.c" +#line 1780 "autosave-manager.c" } #line 306 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" case SCAN_DIRECTION_LEFT_TO_RIGHT: -#line 1782 "autosave-manager.c" +#line 1784 "autosave-manager.c" { GKeyFile* _tmp60_ = NULL; const gchar* _tmp61_ = NULL; @@ -1791,11 +1793,11 @@ static void autosave_manager_real_save (AutosaveManager* self) { g_key_file_set_value (_tmp60_, _tmp61_, "scan-direction", "LEFT_TO_RIGHT"); #line 313 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" break; -#line 1794 "autosave-manager.c" +#line 1796 "autosave-manager.c" } #line 306 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" case SCAN_DIRECTION_BOTTOM_TO_TOP: -#line 1798 "autosave-manager.c" +#line 1800 "autosave-manager.c" { GKeyFile* _tmp62_ = NULL; const gchar* _tmp63_ = NULL; @@ -1807,11 +1809,11 @@ static void autosave_manager_real_save (AutosaveManager* self) { g_key_file_set_value (_tmp62_, _tmp63_, "scan-direction", "BOTTOM_TO_TOP"); #line 316 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" break; -#line 1810 "autosave-manager.c" +#line 1812 "autosave-manager.c" } #line 306 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" case SCAN_DIRECTION_RIGHT_TO_LEFT: -#line 1814 "autosave-manager.c" +#line 1816 "autosave-manager.c" { GKeyFile* _tmp64_ = NULL; const gchar* _tmp65_ = NULL; @@ -1823,12 +1825,12 @@ static void autosave_manager_real_save (AutosaveManager* self) { g_key_file_set_value (_tmp64_, _tmp65_, "scan-direction", "RIGHT_TO_LEFT"); #line 319 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" break; -#line 1826 "autosave-manager.c" +#line 1828 "autosave-manager.c" } default: #line 306 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" break; -#line 1831 "autosave-manager.c" +#line 1833 "autosave-manager.c" } #line 321 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" _tmp67_ = page; @@ -1842,7 +1844,7 @@ static void autosave_manager_real_save (AutosaveManager* self) { if (_tmp66_ == NULL) { #line 321 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" _tmp66_ = ""; -#line 1845 "autosave-manager.c" +#line 1847 "autosave-manager.c" } #line 321 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" _tmp70_ = file; @@ -1862,7 +1864,7 @@ static void autosave_manager_real_save (AutosaveManager* self) { if (_tmp72_ == NULL) { #line 322 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" _tmp72_ = ""; -#line 1865 "autosave-manager.c" +#line 1867 "autosave-manager.c" } #line 322 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" _tmp76_ = file; @@ -1894,7 +1896,7 @@ static void autosave_manager_real_save (AutosaveManager* self) { if (_tmp83_ == NULL) { #line 324 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" _tmp83_ = ""; -#line 1897 "autosave-manager.c" +#line 1899 "autosave-manager.c" } #line 324 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" _tmp87_ = file; @@ -1954,7 +1956,7 @@ static void autosave_manager_real_save (AutosaveManager* self) { _g_free0 (page_name); #line 285 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" _page_unref0 (page); -#line 1957 "autosave-manager.c" +#line 1959 "autosave-manager.c" } } } @@ -1964,7 +1966,7 @@ static void autosave_manager_real_save (AutosaveManager* self) { _tmp110_ = page_names; #line 330 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" g_key_file_set_value (_tmp109_, "simple-scan", "pages", _tmp110_); -#line 1967 "autosave-manager.c" +#line 1969 "autosave-manager.c" { const gchar* _tmp111_ = NULL; const gchar* _tmp112_ = NULL; @@ -1989,7 +1991,7 @@ static void autosave_manager_real_save (AutosaveManager* self) { _g_free0 (_tmp115_); #line 335 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 1992 "autosave-manager.c" +#line 1994 "autosave-manager.c" goto __catch35_g_error; } } @@ -2011,7 +2013,7 @@ static void autosave_manager_real_save (AutosaveManager* self) { g_warning ("autosave-manager.vala:339: Failed to write autosave: %s", _tmp117_); #line 332 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" _g_error_free0 (e); -#line 2014 "autosave-manager.c" +#line 2016 "autosave-manager.c" } __finally35: #line 332 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" @@ -2026,13 +2028,13 @@ static void autosave_manager_real_save (AutosaveManager* self) { g_clear_error (&_inner_error_); #line 332 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" return; -#line 2029 "autosave-manager.c" +#line 2031 "autosave-manager.c" } #line 279 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" _g_free0 (page_names); #line 279 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" _g_key_file_unref0 (file); -#line 2035 "autosave-manager.c" +#line 2037 "autosave-manager.c" } @@ -2088,7 +2090,7 @@ static void autosave_manager_save_pixels (AutosaveManager* self, Page* page) { _tmp10_ = g_file_new_for_path (path); #line 351 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" file = _tmp10_; -#line 2091 "autosave-manager.c" +#line 2093 "autosave-manager.c" { Page* _tmp11_ = NULL; gint _tmp12_ = 0; @@ -2101,7 +2103,7 @@ static void autosave_manager_save_pixels (AutosaveManager* self, Page* page) { g_file_replace_contents (file, _tmp13_, (gsize) _tmp12_, NULL, FALSE, G_FILE_CREATE_NONE, NULL, NULL, &_inner_error_); #line 354 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 2104 "autosave-manager.c" +#line 2106 "autosave-manager.c" goto __catch36_g_error; } } @@ -2123,7 +2125,7 @@ static void autosave_manager_save_pixels (AutosaveManager* self, Page* page) { g_warning ("autosave-manager.vala:358: Failed to autosave page contents: %s", _tmp15_); #line 352 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" _g_error_free0 (e); -#line 2126 "autosave-manager.c" +#line 2128 "autosave-manager.c" } __finally36: #line 352 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" @@ -2140,7 +2142,7 @@ static void autosave_manager_save_pixels (AutosaveManager* self, Page* page) { g_clear_error (&_inner_error_); #line 352 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" return; -#line 2143 "autosave-manager.c" +#line 2145 "autosave-manager.c" } #line 343 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" _g_object_unref0 (file); @@ -2148,7 +2150,7 @@ static void autosave_manager_save_pixels (AutosaveManager* self, Page* page) { _g_free0 (path); #line 343 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" _g_free0 (filename); -#line 2151 "autosave-manager.c" +#line 2153 "autosave-manager.c" } @@ -2163,42 +2165,42 @@ Book* autosave_manager_get_book (AutosaveManager* self) { result = _tmp0_; #line 28 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" return result; -#line 2166 "autosave-manager.c" +#line 2168 "autosave-manager.c" } static void _autosave_manager_on_page_added_book_page_added (Book* _sender, Page* page, gpointer self) { #line 39 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" autosave_manager_on_page_added ((AutosaveManager*) self, page); -#line 2173 "autosave-manager.c" +#line 2175 "autosave-manager.c" } static void _autosave_manager_on_page_removed_book_page_removed (Book* _sender, Page* page, gpointer self) { #line 40 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" autosave_manager_on_page_removed ((AutosaveManager*) self, page); -#line 2180 "autosave-manager.c" +#line 2182 "autosave-manager.c" } static void _autosave_manager_on_changed_book_reordered (Book* _sender, gpointer self) { #line 41 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" autosave_manager_on_changed ((AutosaveManager*) self); -#line 2187 "autosave-manager.c" +#line 2189 "autosave-manager.c" } static void _autosave_manager_on_cleared_book_cleared (Book* _sender, gpointer self) { #line 42 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" autosave_manager_on_cleared ((AutosaveManager*) self); -#line 2194 "autosave-manager.c" +#line 2196 "autosave-manager.c" } static gpointer _book_ref0 (gpointer self) { #line 44 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" return self ? book_ref (self) : NULL; -#line 2201 "autosave-manager.c" +#line 2203 "autosave-manager.c" } @@ -2216,7 +2218,7 @@ void autosave_manager_set_book (AutosaveManager* self, Book* value) { _tmp0_ = self->priv->book_; #line 32 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" if (_tmp0_ != NULL) { -#line 2219 "autosave-manager.c" +#line 2221 "autosave-manager.c" Book* _tmp11_ = NULL; guint _tmp12_ = 0U; Book* _tmp13_ = NULL; @@ -2229,14 +2231,14 @@ void autosave_manager_set_book (AutosaveManager* self, Book* value) { gint i = 0; #line 34 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" i = 0; -#line 2232 "autosave-manager.c" +#line 2234 "autosave-manager.c" { gboolean _tmp1_ = FALSE; #line 34 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" _tmp1_ = TRUE; #line 34 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" while (TRUE) { -#line 2239 "autosave-manager.c" +#line 2241 "autosave-manager.c" gint _tmp3_ = 0; Book* _tmp4_ = NULL; guint _tmp5_ = 0U; @@ -2248,13 +2250,13 @@ void autosave_manager_set_book (AutosaveManager* self, Book* value) { Page* _tmp10_ = NULL; #line 34 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" if (!_tmp1_) { -#line 2251 "autosave-manager.c" +#line 2253 "autosave-manager.c" gint _tmp2_ = 0; #line 34 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" _tmp2_ = i; #line 34 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" i = _tmp2_ + 1; -#line 2257 "autosave-manager.c" +#line 2259 "autosave-manager.c" } #line 34 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" _tmp1_ = FALSE; @@ -2270,7 +2272,7 @@ void autosave_manager_set_book (AutosaveManager* self, Book* value) { if (!(((guint) _tmp3_) < _tmp6_)) { #line 34 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" break; -#line 2273 "autosave-manager.c" +#line 2275 "autosave-manager.c" } #line 36 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" _tmp7_ = self->priv->book_; @@ -2286,7 +2288,7 @@ void autosave_manager_set_book (AutosaveManager* self, Book* value) { autosave_manager_on_page_removed (self, _tmp10_); #line 34 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" _page_unref0 (page); -#line 2289 "autosave-manager.c" +#line 2291 "autosave-manager.c" } } } @@ -2314,7 +2316,7 @@ void autosave_manager_set_book (AutosaveManager* self, Book* value) { g_signal_parse_name ("cleared", TYPE_BOOK, &_tmp18_, NULL, FALSE); #line 42 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" g_signal_handlers_disconnect_matched (_tmp17_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp18_, 0, NULL, (GCallback) _autosave_manager_on_cleared_book_cleared, self); -#line 2317 "autosave-manager.c" +#line 2319 "autosave-manager.c" } #line 44 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" _tmp19_ = value; @@ -2340,19 +2342,19 @@ void autosave_manager_set_book (AutosaveManager* self, Book* value) { _tmp24_ = self->priv->book_; #line 48 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" g_signal_connect (_tmp24_, "cleared", (GCallback) _autosave_manager_on_cleared_book_cleared, self); -#line 2343 "autosave-manager.c" +#line 2345 "autosave-manager.c" { gint i = 0; #line 49 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" i = 0; -#line 2348 "autosave-manager.c" +#line 2350 "autosave-manager.c" { gboolean _tmp25_ = FALSE; #line 49 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" _tmp25_ = TRUE; #line 49 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" while (TRUE) { -#line 2355 "autosave-manager.c" +#line 2357 "autosave-manager.c" gint _tmp27_ = 0; Book* _tmp28_ = NULL; guint _tmp29_ = 0U; @@ -2364,13 +2366,13 @@ void autosave_manager_set_book (AutosaveManager* self, Book* value) { Page* _tmp34_ = NULL; #line 49 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" if (!_tmp25_) { -#line 2367 "autosave-manager.c" +#line 2369 "autosave-manager.c" gint _tmp26_ = 0; #line 49 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" _tmp26_ = i; #line 49 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" i = _tmp26_ + 1; -#line 2373 "autosave-manager.c" +#line 2375 "autosave-manager.c" } #line 49 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" _tmp25_ = FALSE; @@ -2386,7 +2388,7 @@ void autosave_manager_set_book (AutosaveManager* self, Book* value) { if (!(((guint) _tmp27_) < _tmp30_)) { #line 49 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" break; -#line 2389 "autosave-manager.c" +#line 2391 "autosave-manager.c" } #line 51 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" _tmp31_ = self->priv->book_; @@ -2402,7 +2404,7 @@ void autosave_manager_set_book (AutosaveManager* self, Book* value) { autosave_manager_on_page_added (self, _tmp34_); #line 49 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" _page_unref0 (page); -#line 2405 "autosave-manager.c" +#line 2407 "autosave-manager.c" } } } @@ -2412,7 +2414,7 @@ void autosave_manager_set_book (AutosaveManager* self, Book* value) { static void value_autosave_manager_init (GValue* value) { #line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" value->data[0].v_pointer = NULL; -#line 2415 "autosave-manager.c" +#line 2417 "autosave-manager.c" } @@ -2421,7 +2423,7 @@ static void value_autosave_manager_free_value (GValue* value) { if (value->data[0].v_pointer) { #line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" autosave_manager_unref (value->data[0].v_pointer); -#line 2424 "autosave-manager.c" +#line 2426 "autosave-manager.c" } } @@ -2431,11 +2433,11 @@ static void value_autosave_manager_copy_value (const GValue* src_value, GValue* if (src_value->data[0].v_pointer) { #line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" dest_value->data[0].v_pointer = autosave_manager_ref (src_value->data[0].v_pointer); -#line 2434 "autosave-manager.c" +#line 2436 "autosave-manager.c" } else { #line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" dest_value->data[0].v_pointer = NULL; -#line 2438 "autosave-manager.c" +#line 2440 "autosave-manager.c" } } @@ -2443,37 +2445,37 @@ static void value_autosave_manager_copy_value (const GValue* src_value, GValue* static gpointer value_autosave_manager_peek_pointer (const GValue* value) { #line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" return value->data[0].v_pointer; -#line 2446 "autosave-manager.c" +#line 2448 "autosave-manager.c" } static gchar* value_autosave_manager_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { #line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" if (collect_values[0].v_pointer) { -#line 2453 "autosave-manager.c" +#line 2455 "autosave-manager.c" AutosaveManager* object; object = collect_values[0].v_pointer; #line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" if (object->parent_instance.g_class == NULL) { #line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 2460 "autosave-manager.c" +#line 2462 "autosave-manager.c" } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { #line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 2464 "autosave-manager.c" +#line 2466 "autosave-manager.c" } #line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" value->data[0].v_pointer = autosave_manager_ref (object); -#line 2468 "autosave-manager.c" +#line 2470 "autosave-manager.c" } else { #line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" value->data[0].v_pointer = NULL; -#line 2472 "autosave-manager.c" +#line 2474 "autosave-manager.c" } #line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" return NULL; -#line 2476 "autosave-manager.c" +#line 2478 "autosave-manager.c" } @@ -2484,25 +2486,25 @@ static gchar* value_autosave_manager_lcopy_value (const GValue* value, guint n_c if (!object_p) { #line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); -#line 2487 "autosave-manager.c" +#line 2489 "autosave-manager.c" } #line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" if (!value->data[0].v_pointer) { #line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" *object_p = NULL; -#line 2493 "autosave-manager.c" +#line 2495 "autosave-manager.c" } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { #line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" *object_p = value->data[0].v_pointer; -#line 2497 "autosave-manager.c" +#line 2499 "autosave-manager.c" } else { #line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" *object_p = autosave_manager_ref (value->data[0].v_pointer); -#line 2501 "autosave-manager.c" +#line 2503 "autosave-manager.c" } #line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" return NULL; -#line 2505 "autosave-manager.c" +#line 2507 "autosave-manager.c" } @@ -2516,7 +2518,7 @@ GParamSpec* param_spec_autosave_manager (const gchar* name, const gchar* nick, c G_PARAM_SPEC (spec)->value_type = object_type; #line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" return G_PARAM_SPEC (spec); -#line 2519 "autosave-manager.c" +#line 2521 "autosave-manager.c" } @@ -2525,7 +2527,7 @@ gpointer value_get_autosave_manager (const GValue* value) { g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_AUTOSAVE_MANAGER), NULL); #line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" return value->data[0].v_pointer; -#line 2528 "autosave-manager.c" +#line 2530 "autosave-manager.c" } @@ -2545,17 +2547,17 @@ void value_set_autosave_manager (GValue* value, gpointer v_object) { value->data[0].v_pointer = v_object; #line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" autosave_manager_ref (value->data[0].v_pointer); -#line 2548 "autosave-manager.c" +#line 2550 "autosave-manager.c" } else { #line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" value->data[0].v_pointer = NULL; -#line 2552 "autosave-manager.c" +#line 2554 "autosave-manager.c" } #line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" if (old) { #line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" autosave_manager_unref (old); -#line 2558 "autosave-manager.c" +#line 2560 "autosave-manager.c" } } @@ -2574,17 +2576,17 @@ void value_take_autosave_manager (GValue* value, gpointer v_object) { g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); #line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" value->data[0].v_pointer = v_object; -#line 2577 "autosave-manager.c" +#line 2579 "autosave-manager.c" } else { #line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" value->data[0].v_pointer = NULL; -#line 2581 "autosave-manager.c" +#line 2583 "autosave-manager.c" } #line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" if (old) { #line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" autosave_manager_unref (old); -#line 2587 "autosave-manager.c" +#line 2589 "autosave-manager.c" } } @@ -2620,7 +2622,7 @@ static void autosave_manager_class_init (AutosaveManagerClass * klass) { _tmp5_ = g_build_filename (_tmp3_, _tmp4_, NULL); #line 17 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" autosave_manager_AUTOSAVE_PATH = _tmp5_; -#line 2623 "autosave-manager.c" +#line 2625 "autosave-manager.c" } @@ -2633,7 +2635,7 @@ static void autosave_manager_instance_init (AutosaveManager * self) { self->priv->book_ = NULL; #line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" self->ref_count = 1; -#line 2636 "autosave-manager.c" +#line 2638 "autosave-manager.c" } @@ -2647,7 +2649,7 @@ static void autosave_manager_finalize (AutosaveManager* obj) { _g_hash_table_unref0 (self->priv->page_filenames); #line 23 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" _book_unref0 (self->priv->book_); -#line 2650 "autosave-manager.c" +#line 2652 "autosave-manager.c" } @@ -2672,7 +2674,7 @@ gpointer autosave_manager_ref (gpointer instance) { g_atomic_int_inc (&self->ref_count); #line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" return instance; -#line 2675 "autosave-manager.c" +#line 2677 "autosave-manager.c" } @@ -2685,7 +2687,7 @@ void autosave_manager_unref (gpointer instance) { AUTOSAVE_MANAGER_GET_CLASS (self)->finalize (self); #line 13 "/home/bob/bzr/simple-scan/trunk/src/autosave-manager.vala" g_type_free_instance ((GTypeInstance *) self); -#line 2688 "autosave-manager.c" +#line 2690 "autosave-manager.c" } } |