f-spot r4534 - in branches/FSPOT_0_5_0_STABLE: . src tools
- From: sdelcroix svn gnome org
- To: svn-commits-list gnome org
- Subject: f-spot r4534 - in branches/FSPOT_0_5_0_STABLE: . src tools
- Date: Fri, 24 Oct 2008 09:29:27 +0000 (UTC)
Author: sdelcroix
Date: Fri Oct 24 09:29:27 2008
New Revision: 4534
URL: http://svn.gnome.org/viewvc/f-spot?rev=4534&view=rev
Log:
2008-10-23 Stephane Delcroix <sdelcroix novell com>
* src/MainWindow.cs:
* tools/f-spot-import: fix the import uri to match the nautilus one,
avoid popping the multiple camera detection dialog.
Modified:
branches/FSPOT_0_5_0_STABLE/ChangeLog
branches/FSPOT_0_5_0_STABLE/src/MainWindow.cs
branches/FSPOT_0_5_0_STABLE/tools/f-spot-import
Modified: branches/FSPOT_0_5_0_STABLE/src/MainWindow.cs
==============================================================================
--- branches/FSPOT_0_5_0_STABLE/src/MainWindow.cs (original)
+++ branches/FSPOT_0_5_0_STABLE/src/MainWindow.cs Fri Oct 24 09:29:27 2008
@@ -1659,6 +1659,7 @@
public void ImportCamera (string camera_device)
{
+ Log.DebugFormat ("ImportCamera {0}", camera_device);
GPhotoCamera cam = new GPhotoCamera();
try {
@@ -1679,10 +1680,9 @@
selected_cam = 0;
} else {
bool found = false;
- if (camera_device != null) {
- string port = camera_device.Remove (0, "gphoto2:".Length);
- for (int i = 0; i < num_cameras; i++)
- if (cam.CameraList.GetValue (i) == port) {
+ if (camera_device != null)
+ for (int i = 0; i < num_cameras; i++) {
+ if (camera_device.IndexOf (cam.CameraList.GetValue(i)) != 0) {
selected_cam = i;
found = true;
break;
Modified: branches/FSPOT_0_5_0_STABLE/tools/f-spot-import
==============================================================================
--- branches/FSPOT_0_5_0_STABLE/tools/f-spot-import (original)
+++ branches/FSPOT_0_5_0_STABLE/tools/f-spot-import Fri Oct 24 09:29:27 2008
@@ -1,20 +1,23 @@
-#!/bin/bash
+#!/bin/bash -x
udi="$1"
#xmessage $udi
-mount_point=`hal-get-property --udi="$udi" --key=volume.mount_point`
-if [ -n "$mount_point" ]; then
- # USB Mass Storage camera: need to pass f-spot a mount point
- f-spot --import "$mount_point"
+if [ "$udi" != "${udi#gphoto2:}" ]; then
+ # gphoto2, as passed by nautilus.
+ f-spot --import "$udi"
+ exit
+fi
+mount_point=`hal-get-property --udi="$udi" --key=volume.mount_point` || true
+if [ -n "$mount_point" ]; then
+ # USB Mass Storage camera: need to pass f-spot a mount point
+ f-spot --import "$mount_point"
else
- # Some other camera try GPhoto2
-
- bus=`hal-get-property --udi="$udi" --key=usb.bus_number`
- dev=`hal-get-property --udi="$udi" --key=usb.linux.device_number`
- uri=`printf gphoto2:usb:%.3d,%.3d $bus $dev`
+ # Some other camera try GPhoto2
- echo $uri
+ bus=`hal-get-property --udi="$udi" --key=usb.bus_number`
+ dev=`hal-get-property --udi="$udi" --key=usb.linux.device_number`
+ uri=`printf gphoto2:[usb:%.3d,%.3d] $bus $dev`
- f-spot --import "$uri"
+ f-spot --import "$uri"
fi
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]