summaryrefslogtreecommitdiff
path: root/src/camera/ImportPage.vala
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2017-11-12 17:19:32 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2017-11-12 17:19:32 +0100
commit0b7ebb2f0f7d70d50054380ff5878104b72710e9 (patch)
tree7dcb662c7fa4ea100bccfc3042b1785d305458e8 /src/camera/ImportPage.vala
parent73542a3b4379319fc2d0a4d134f1f8a6d488dfc4 (diff)
Add missing .gitignore
Diffstat (limited to 'src/camera/ImportPage.vala')
-rw-r--r--src/camera/ImportPage.vala47
1 files changed, 13 insertions, 34 deletions
diff --git a/src/camera/ImportPage.vala b/src/camera/ImportPage.vala
index 67a298a..4e055ec 100644
--- a/src/camera/ImportPage.vala
+++ b/src/camera/ImportPage.vala
@@ -773,15 +773,6 @@ public class ImportPage : CheckerboardPage {
~ImportPage() {
LibraryPhoto.global.contents_altered.disconnect(on_media_added_removed);
Video.global.contents_altered.disconnect(on_media_added_removed);
-
- // iOS 8 issue. Release the camera here
- if (camera != null) {
- GPhoto.Result res = camera.exit(spin_idle_context.context);
- if (res != GPhoto.Result.OK) {
- // log but don't fail
- warning("ImportPage destructor: Unable to unlock camera: %s", res.to_full_string());
- }
- }
}
public override Gtk.Toolbar get_toolbar() {
@@ -1171,14 +1162,11 @@ public class ImportPage : CheckerboardPage {
update_status(busy, false);
refresh_error = null;
- // iOS 8 issue
- if (camera == null) {
- refresh_result = camera.init(spin_idle_context.context);
- if (refresh_result != GPhoto.Result.OK) {
- warning("Unable to initialize camera: %s", refresh_result.to_full_string());
-
- return (refresh_result == GPhoto.Result.IO_LOCK) ? RefreshResult.LOCKED : RefreshResult.LIBRARY_ERROR;
- }
+ refresh_result = camera.init(spin_idle_context.context);
+ if (refresh_result != GPhoto.Result.OK) {
+ warning("Unable to initialize camera: %s", refresh_result.to_full_string());
+
+ return (refresh_result == GPhoto.Result.IO_LOCK) ? RefreshResult.LOCKED : RefreshResult.LIBRARY_ERROR;
}
update_status(true, refreshed);
@@ -1283,15 +1271,13 @@ public class ImportPage : CheckerboardPage {
progress_bar.set_ellipsize(Pango.EllipsizeMode.NONE);
progress_bar.set_text("");
progress_bar.set_fraction(0.0);
-
-#if 0
+
GPhoto.Result res = camera.exit(spin_idle_context.context);
if (res != GPhoto.Result.OK) {
// log but don't fail
warning("Unable to unlock camera: %s", res.to_full_string());
}
-#endif
-
+
if (refresh_result == GPhoto.Result.OK) {
if (import_sources.get_count () == 0) {
this.set_page_message (this.get_view_empty_message ());
@@ -1660,15 +1646,11 @@ public class ImportPage : CheckerboardPage {
}
private void import(Gee.Iterable<DataObject> items) {
- // We now keep the camera open as long as we can to
- // work around the iOS 8 directory name shuffling issue.
- if (camera == null) {
- GPhoto.Result res = camera.init(spin_idle_context.context);
- if (res != GPhoto.Result.OK) {
- AppWindow.error_message(_("Unable to lock camera: %s").printf(res.to_full_string()));
-
- return;
- }
+ GPhoto.Result res = camera.init(spin_idle_context.context);
+ if (res != GPhoto.Result.OK) {
+ AppWindow.error_message(_("Unable to lock camera: %s").printf(res.to_full_string()));
+
+ return;
}
update_status(true, refreshed);
@@ -1804,15 +1786,12 @@ public class ImportPage : CheckerboardPage {
}
private void close_import() {
-// iOS 8 issue
-#if 0
GPhoto.Result res = camera.exit(spin_idle_context.context);
if (res != GPhoto.Result.OK) {
// log but don't fail
message("Unable to unlock camera: %s", res.to_full_string());
}
-#endif
-
+
update_status(false, refreshed);
on_view_changed();