summaryrefslogtreecommitdiff
path: root/src/camera
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2016-06-26 08:39:49 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2016-06-26 08:39:49 +0200
commit29a7aef998e975b42401cfa96d1b750d91eadf06 (patch)
treeeda2bdff398789ea2358cc39986dd1f7ee9d027a /src/camera
parent4e10e30c2f99d552239871aa1b27a08a6c18f1a4 (diff)
Imported Upstream version 0.23.2upstream/0.23.2
Diffstat (limited to 'src/camera')
-rw-r--r--src/camera/CameraTable.vala12
-rw-r--r--src/camera/GPhoto.vala66
2 files changed, 1 insertions, 77 deletions
diff --git a/src/camera/CameraTable.vala b/src/camera/CameraTable.vala
index f59dcff..7eb7ae2 100644
--- a/src/camera/CameraTable.vala
+++ b/src/camera/CameraTable.vala
@@ -276,11 +276,7 @@ public class CameraTable {
do_op(camera.gcamera.get_port_info(out port_info),
"retrieve missing camera port information");
-#if WITH_GPHOTO_25
port_info.get_path(out tmp_path);
-#else
- tmp_path = port_info.path;
-#endif
GPhoto.CameraAbilities abilities;
do_op(camera.gcamera.get_abilities(out abilities), "retrieve camera abilities");
@@ -303,11 +299,7 @@ public class CameraTable {
do_op(camera.gcamera.get_port_info(out port_info),
"retrieve missing camera port information");
-#if WITH_GPHOTO_25
port_info.get_path(out tmp_path);
-#else
- tmp_path = port_info.path;
-#endif
GPhoto.CameraAbilities abilities;
do_op(camera.gcamera.get_abilities(out abilities), "retrieve missing camera abilities");
@@ -363,11 +355,7 @@ public class CameraTable {
string tmp_path;
do_op(port_info_list.get_info(index, out port_info), "get port info for %s".printf(port));
-#if WITH_GPHOTO_25
port_info.get_path(out tmp_path);
-#else
- tmp_path = port_info.path;
-#endif
// this should match, every time
assert(port == tmp_path);
diff --git a/src/camera/GPhoto.vala b/src/camera/GPhoto.vala
index ac911dd..b16e32b 100644
--- a/src/camera/GPhoto.vala
+++ b/src/camera/GPhoto.vala
@@ -25,8 +25,6 @@ namespace GPhoto {
public virtual void idle() {
}
-#if WITH_GPHOTO_25
-
public virtual void error(string text, void *data) {
}
@@ -75,57 +73,6 @@ namespace GPhoto {
progress_stop();
}
-#else
-
- public virtual void error(string format, void *va_list) {
- }
-
- public virtual void status(string format, void *va_list) {
- }
-
- public virtual void message(string format, void *va_list) {
- }
-
- public virtual void progress_start(float target, string format, void *va_list) {
- }
-
- public virtual void progress_update(float current) {
- }
-
- public virtual void progress_stop() {
- }
-
- private void on_idle(Context context) {
- idle();
- }
-
- private void on_error(Context context, string format, void *va_list) {
- error(format, va_list);
- }
-
- private void on_status(Context context, string format, void *va_list) {
- status(format, va_list);
- }
-
- private void on_message(Context context, string format, void *va_list) {
- message(format, va_list);
- }
-
- private uint on_progress_start(Context context, float target, string format, void *va_list) {
- progress_start(target, format, va_list);
-
- return 0;
- }
-
- private void on_progress_update(Context context, uint id, float current) {
- progress_update(current);
- }
-
- private void on_progress_stop(Context context, uint id) {
- progress_stop();
- }
-
-#endif
}
public class SpinIdleWrapper : ContextWrapper {
@@ -137,19 +84,12 @@ namespace GPhoto {
spin_event_loop();
}
-#if WITH_GPHOTO_25
+
public override void progress_update(float current, void *data) {
base.progress_update(current, data);
spin_event_loop();
}
-#else
- public override void progress_update(float current) {
- base.progress_update(current);
-
- spin_event_loop();
- }
-#endif
}
// For CameraFileInfoFile, CameraFileInfoPreview, and CameraStorageInformation. See:
@@ -187,11 +127,7 @@ namespace GPhoto {
camera.get_port_info(out port_info);
string path;
-#if WITH_GPHOTO_25
port_info.get_path(out path);
-#else
- path = port_info.path;
-#endif
string prefix = "disk:";
if(path.has_prefix(prefix))