Commit 192ca547 authored by Jim Nelson's avatar Jim Nelson

Merge from 0.7.2.

parents b9ae51a7 c5bd728d
PROGRAM = shotwell
VERSION = 0.7.1+trunk
VERSION = 0.7.2+trunk
GETTEXT_PACKAGE = $(PROGRAM)
BUILD_ROOT = 1
......
Shotwell 0.7.2 - 10 September 2010
----------------------------------
* Fixed major startup problem when the user's Pictures directory is actually
a symbolic link.
* Fixed potential crasher when the user's Pictures directory contains a
large number of subdirectories.
* No longer asking if copying or linking if importing from Pictures directory
(which will always be linked).
* Fixed issue when logging in to PicasaWeb with a password with a '+'
character.
* Fixed update problem when using an external editor on a photo that was
edited externally in an earlier session.
* Various bug fixes.
* Numerous translation updates.
Shotwell 0.7.1 - 26 August 2010
-----------------------------
......
......@@ -7,6 +7,7 @@ Joeny Ang <ang.joeny@gmail.com>
Philip Beam <psbeam@gmail.com>
Jürg Billeter <j@bitron.ch>
Matthias Clasen <matthias.clasen@gmail.com>
Valentin David <valentin.david@gmail.com>
Josh Freeman <josh@twilightedge.com>
Mikko Huhtala <mikko.t.huhtala@gmail.com>
David Jeske <davidj@gmail.com>
......
shotwell (0.7.2-1~lucid1) lucid; urgency=low
* Fixed major startup problem when the user's Pictures directory is actually
a symbolic link.
* Fixed potential crasher when the user's Pictures directory contains a
large number of subdirectories.
* No longer asking if copying or linking if importing from Pictures directory
(which will always be linked).
* Fixed issue when logging in to PicasaWeb with a password with a '+'
character.
* Fixed update problem when using an external editor on a photo that was
edited externally in an earlier session.
* Various bug fixes.
* Numerous translation updates.
-- Jim Nelson <jim@yorba.org> Fri, 10 Sep 2010 15:52:16 -0700
shotwell (0.7.1-1~lucid1) lucid; urgency=low
* Fixed a critical bug that caused Shotwell to crash when
......
......@@ -30,7 +30,9 @@ searchpath() {
}
cflags() {
if pkg-config --silence-errors --cflags libraw; then
if pkg-config --silence-errors --cflags libraw_r; then
:
elif pkg-config --silence-errors --cflags libraw; then
:
elif [ $1 ]; then
printf "%cDLIBRAW_NODLL " "-"
......@@ -42,7 +44,9 @@ cflags() {
}
libs() {
if pkg-config --silence-errors --libs libraw; then
if pkg-config --silence-errors --libs libraw_r; then
:
elif pkg-config --silence-errors --libs libraw; then
:
elif [ $1 ]; then
printf "%clraw_r %clstdc++ %clwsock32 " "-" "-" "-"
......@@ -55,7 +59,9 @@ libs() {
# TODO: Cannot check version of library if no .pc file installed.
exists() {
if pkg-config --silence-errors --exists 'libraw >= $3'; then
if pkg-config --silence-errors --exists 'libraw_r >= $3'; then
:
elif pkg-config --silence-errors --exists 'libraw >= $3'; then
:
elif ! searchpath $LIB_DIRS "libraw_r.a" || ! searchpath $HEADER_DIRS "libraw/libraw.h"; then
printf "\nPackage libraw not found\n"
......
......@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: shotwell-0.7.1\n"
"Project-Id-Version: shotwell-0.7.2+trunk\n"
"Report-Msgid-Bugs-To: vera@yorba.org\n"
"POT-Creation-Date: 2010-06-04 16:30-0700\n"
"PO-Revision-Date: 2010-06-14 06:11+0300\n"
......
......@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: shotwell-0.7.1\n"
"Project-Id-Version: shotwell-0.7.2+trunk\n"
"Report-Msgid-Bugs-To: vera@yorba.org\n"
"POT-Creation-Date: 2010-07-30 12:26-0700\n"
"PO-Revision-Date: 2010-08-01 16:25+0100\n"
......
......@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: shotwell-0.6.1+trunk\n"
"Project-Id-Version: shotwell-0.7.2+trunk\n"
"Report-Msgid-Bugs-To: vera@yorba.org\n"
"POT-Creation-Date: 2010-07-30 12:26-0700\n"
"PO-Revision-Date: 2010-08-30 14:09+0200\n"
......
......@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: shotwell-0.7.1\n"
"Project-Id-Version: shotwell-0.7.2+trunk\n"
"Report-Msgid-Bugs-To: vera@yorba.org\n"
"POT-Creation-Date: 2010-03-04 18:37-0800\n"
"PO-Revision-Date: 2010-03-06 18:40+0530\n"
......
......@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: shotwell-0.7.1+trunk\n"
"Project-Id-Version: shotwell-0.7.2+trunk\n"
"Report-Msgid-Bugs-To: vera@yorba.org\n"
"POT-Creation-Date: 2010-07-30 12:26-0700\n"
"PO-Revision-Date: 2010-07-01 10:22-0300\n"
......
......@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: shotwell-0.7.1\n"
"Project-Id-Version: shotwell-0.7.2+trunk\n"
"Report-Msgid-Bugs-To: vera@yorba.org\n"
"POT-Creation-Date: 2010-07-30 12:26-0700\n"
"PO-Revision-Date: 2010-08-24 10:35+0200\n"
......
......@@ -16,7 +16,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: shotwell-0.7.1+trunk\n"
"Project-Id-Version: shotwell-0.7.2+trunk\n"
"Report-Msgid-Bugs-To: vera@yorba.org\n"
"POT-Creation-Date: 2010-07-30 12:26-0700\n"
"PO-Revision-Date: 2010-09-07 11:25+01:00\n"
......
......@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: shotwell-0.7.1\n"
"Project-Id-Version: shotwell-0.7.2+trunk\n"
"Report-Msgid-Bugs-To: vera@yorba.org\n"
"POT-Creation-Date: 2010-07-30 12:26-0700\n"
"PO-Revision-Date: 2010-06-07 20:54+0100\n"
......
......@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: shotwell-0.7.1\n"
"Project-Id-Version: shotwell-0.7.2+trunk\n"
"Report-Msgid-Bugs-To: vera@yorba.org\n"
"POT-Creation-Date: 2010-07-30 12:26-0700\n"
"PO-Revision-Date: 2010-08-05 20:20+0200\n"
......
......@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: shotwell-0.7.1\n"
"Project-Id-Version: shotwell-0.7.2+trunk\n"
"Report-Msgid-Bugs-To: vera@yorba.org\n"
"POT-Creation-Date: 2010-07-30 12:26-0700\n"
"PO-Revision-Date: 2010-08-02 22:42+0100\n"
......
......@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: shotwell-0.7.1+trunk\n"
"Project-Id-Version: shotwell-0.7.2+trunk\n"
"Report-Msgid-Bugs-To: vera@yorba.org\n"
"POT-Creation-Date: 2010-07-30 12:26-0700\n"
"PO-Revision-Date: 2010-09-07 08:52-0300\n"
......
......@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: shotwell-0.7.1\n"
"Project-Id-Version: shotwell-0.7.2+trunk\n"
"Report-Msgid-Bugs-To: vera@yorba.org\n"
"POT-Creation-Date: 2010-07-30 12:26-0700\n"
"PO-Revision-Date: 2010-08-26 16:31+0300\n"
......
......@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: shotwell-0.7.1+trunk\n"
"Project-Id-Version: shotwell-0.7.2+trunk\n"
"Report-Msgid-Bugs-To: vera@yorba.org\n"
"POT-Creation-Date: 2010-07-30 12:26-0700\n"
"PO-Revision-Date: 2010-08-29 10:17+0300\n"
......
......@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: shotwell-0.7.1+trunk\n"
"Project-Id-Version: shotwell-0.7.2+trunk\n"
"Report-Msgid-Bugs-To: vera@yorba.org\n"
"POT-Creation-Date: 2010-07-30 12:26-0700\n"
"PO-Revision-Date: 2010-09-01 21:55+0200\n"
......
......@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: shotwell-0.7.1\n"
"Project-Id-Version: shotwell-0.7.2+trunk\n"
"Report-Msgid-Bugs-To: vera@yorba.org\n"
"POT-Creation-Date: 2010-07-30 12:26-0700\n"
"PO-Revision-Date: 2010-08-25 17:09+0000\n"
......
......@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: shotwell-0.7.1\n"
"Project-Id-Version: shotwell-0.7.2+trunk\n"
"Report-Msgid-Bugs-To: vera@yorba.org\n"
"POT-Creation-Date: 2010-06-04 16:30-0700\n"
"PO-Revision-Date: 2010-06-07 20:54+0200\n"
......
......@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: shotwell-0.7.1+trunk\n"
"Project-Id-Version: shotwell-0.7.2+trunk\n"
"Report-Msgid-Bugs-To: vera@yorba.org\n"
"POT-Creation-Date: 2010-07-30 12:26-0700\n"
"PO-Revision-Date: 2010-08-27 14:22+0100\n"
......
......@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: shotwell-0.7.1\n"
"Project-Id-Version: shotwell-0.7.2+trunk\n"
"Report-Msgid-Bugs-To: vera@yorba.org\n"
"POT-Creation-Date: 2010-06-04 16:30-0700\n"
"PO-Revision-Date: 2010-05-14 08:00+0200\n"
......
......@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: shotwell-0.7.1+trunk\n"
"Project-Id-Version: shotwell-0.7.2+trunk\n"
"Report-Msgid-Bugs-To: vera@yorba.org\n"
"POT-Creation-Date: 2010-07-30 12:26-0700\n"
"PO-Revision-Date: 2010-08-22 16:26+0200\n"
......
......@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: shotwell-0.6.91\n"
"Project-Id-Version: shotwell-0.7.2+trunk\n"
"Report-Msgid-Bugs-To: vera@yorba.org\n"
"POT-Creation-Date: 2010-07-30 12:26-0700\n"
"PO-Revision-Date: 2010-08-18 20:04-0300\n"
......
......@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: shotwell-0.7.0+trunk\n"
"Project-Id-Version: shotwell-0.7.2+trunk\n"
"Report-Msgid-Bugs-To: vera@yorba.org\n"
"POT-Creation-Date: 2010-07-30 12:26-0700\n"
"PO-Revision-Date: 2010-09-08 11:27+0600\n"
......
......@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: shotwell-0.7.1+trunk\n"
"Project-Id-Version: shotwell-0.7.2+trunk\n"
"Report-Msgid-Bugs-To: vera@yorba.org\n"
"POT-Creation-Date: 2010-07-30 12:26-0700\n"
"PO-Revision-Date: \n"
......
......@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: shotwell-0.7.1\n"
"Project-Id-Version: shotwell-0.7.2+trunk\n"
"Report-Msgid-Bugs-To: vera@yorba.org\n"
"POT-Creation-Date: 2010-07-30 12:26-0700\n"
"PO-Revision-Date: 2010-08-08 13:13+0300\n"
......
......@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: shotwell-0.7.1\n"
"Project-Id-Version: shotwell-0.7.2+trunk\n"
"Report-Msgid-Bugs-To: <vera@yorba.org>\n"
"POT-Creation-Date: 2009-12-11 18:20-0800\n"
"PO-Revision-Date: 2009-12-26 18:42+0200\n"
......
......@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: shotwell-0.7.1\n"
"Project-Id-Version: shotwell-0.7.2+trunk\n"
"Report-Msgid-Bugs-To: vera@yorba.org\n"
"POT-Creation-Date: 2010-07-30 12:26-0700\n"
"PO-Revision-Date: 2010-07-31 01:28+0200\n"
......
......@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: shotwell-0.7.1\n"
"Project-Id-Version: shotwell-0.7.2+trunk\n"
"Report-Msgid-Bugs-To: vera@yorba.org\n"
"POT-Creation-Date: 2010-07-30 12:26-0700\n"
"PO-Revision-Date: 2010-08-31 18:24+0100\n"
......
......@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: shotwell-0.7.1\n"
"Project-Id-Version: shotwell-0.7.2+trunk\n"
"Report-Msgid-Bugs-To: vera@yorba.org\n"
"POT-Creation-Date: 2010-06-04 16:30-0700\n"
"PO-Revision-Date: 2010-06-07 08:55+0530\n"
......
......@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: shotwell-0.7.1\n"
"Project-Id-Version: shotwell-0.7.2+trunk\n"
"Report-Msgid-Bugs-To: vera@yorba.org\n"
"POT-Creation-Date: 2010-07-30 12:26-0700\n"
"PO-Revision-Date: 2010-08-06 18:33+0200\n"
......
......@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: shotwell-0.7.1\n"
"Project-Id-Version: shotwell-0.7.2+trunk\n"
"Report-Msgid-Bugs-To: vera@yorba.org\n"
"POT-Creation-Date: 2010-07-30 12:26-0700\n"
"PO-Revision-Date: 2010-08-21 10:41-0300\n"
......
......@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: shotwell-0.7.1\n"
"Project-Id-Version: shotwell-0.7.2+trunk\n"
"Report-Msgid-Bugs-To: vera@yorba.org\n"
"POT-Creation-Date: 2010-07-30 12:26-0700\n"
"PO-Revision-Date: 2010-08-09 15:06+0200\n"
......
......@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: shotwell-0.7.1\n"
"Project-Id-Version: shotwell-0.7.2+trunk\n"
"Report-Msgid-Bugs-To: vera@yorba.org\n"
"POT-Creation-Date: 2010-07-30 12:26-0700\n"
"PO-Revision-Date: 2010-08-17 23:36+0400\n"
......
......@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: shotwell-0.7.1+trunk\n"
"Project-Id-Version: shotwell-0.7.2+trunk\n"
"Report-Msgid-Bugs-To: vera@yorba.org\n"
"POT-Creation-Date: 2010-07-30 12:26-0700\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
......
......@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: shotwell-0.7.0\n"
"Project-Id-Version: shotwell-0.7.2+trunk\n"
"Report-Msgid-Bugs-To: vera@yorba.org\n"
"POT-Creation-Date: 2010-07-30 12:26-0700\n"
"PO-Revision-Date: 2010-09-10 02:57+0100\n"
......
......@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: shotwell-0.7.1\n"
"Project-Id-Version: shotwell-0.7.2+trunk\n"
"Report-Msgid-Bugs-To: vera@yorba.org\n"
"POT-Creation-Date: 2010-07-30 12:26-0700\n"
"PO-Revision-Date: \n"
......
......@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: shotwell-0.7.1\n"
"Project-Id-Version: shotwell-0.7.2+trunk\n"
"Report-Msgid-Bugs-To: vera@yorba.org\n"
"POT-Creation-Date: 2010-07-30 12:26-0700\n"
"PO-Revision-Date: 2010-06-24 22:02+0100\n"
......
......@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: shotwell-0.7.1\n"
"Project-Id-Version: shotwell-0.7.2+trunk\n"
"Report-Msgid-Bugs-To: vera@yorba.org\n"
"POT-Creation-Date: 2010-07-30 12:26-0700\n"
"PO-Revision-Date: 2010-08-06 13:15+0100\n"
......
......@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: shotwell-0.7.1+trunk\n"
"Project-Id-Version: shotwell-0.7.2+trunk\n"
"Report-Msgid-Bugs-To: vera@yorba.org\n"
"POT-Creation-Date: 2010-07-30 12:26-0700\n"
"PO-Revision-Date: 2010-09-06 15:40+0700\n"
......
......@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: shotwell-0.7.1\n"
"Project-Id-Version: shotwell-0.7.2+trunk\n"
"Report-Msgid-Bugs-To: vera@yorba.org\n"
"POT-Creation-Date: 2010-06-04 16:30-0700\n"
"PO-Revision-Date: 2010-07-17 01:50+0200\n"
......
......@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: shotwell-0.7.1+trunk\n"
"Project-Id-Version: shotwell-0.7.2+trunk\n"
"Report-Msgid-Bugs-To: vera@yorba.org\n"
"POT-Creation-Date: 2010-07-30 12:26-0700\n"
"PO-Revision-Date: 2010-09-04 09:39+0300\n"
......
......@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: shotwell-0.7.1\n"
"Project-Id-Version: shotwell-0.7.2+trunk\n"
"Report-Msgid-Bugs-To: vera@yorba.org\n"
"POT-Creation-Date: 2010-07-30 12:26-0700\n"
"PO-Revision-Date: 2010-08-01 12:53+0100\n"
......
......@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: shotwell-0.7.1+trunk\n"
"Project-Id-Version: shotwell-0.7.2+trunk\n"
"Report-Msgid-Bugs-To: vera@yorba.org\n"
"POT-Creation-Date: 2010-07-30 12:26-0700\n"
"PO-Revision-Date: 2010-09-04 09:17+0800\n"
......
......@@ -45,7 +45,7 @@ public class AlienDatabaseImportSource {
}
}
#if TRACE_MD5
debug("Photo MD5 %s: exif=%s preview=%s", get_filename(), exif_md5, preview_md5);
debug("Photo MD5 %s: preview=%s", get_filename(), preview_md5);
#endif
try {
......
......@@ -31,12 +31,11 @@ class AppDirs {
public static void verify_data_dir() {
File data_dir = get_data_dir();
try {
if (data_dir.query_exists(null) == false) {
if (!data_dir.make_directory_with_parents(null))
error("Unable to create data directory %s", data_dir.get_path());
}
if (!data_dir.query_exists(null))
data_dir.make_directory_with_parents(null);
} catch (Error err) {
error("%s", err.message);
AppWindow.panic(_("Unable to create data directory %s: %s").printf(data_dir.get_path(),
err.message));
}
}
......@@ -51,6 +50,8 @@ class AppDirs {
: data_dir;
}
// The "import directory" is the same as the library directory, and are often used
// interchangeably throughout the code.
public static File get_import_dir() {
string path = Config.get_instance().get_import_dir();
if (!is_string_empty(path)) {
......@@ -73,6 +74,13 @@ class AppDirs {
// If XDG yarfed, use ~/Pictures
return File.new_for_path(Environment.get_home_dir()).get_child(_("Pictures"));
}
// Returns true if the File is in or is equal to the library/import directory.
public static bool is_in_import_dir(File file) {
File import_dir = get_import_dir();
return file.has_prefix(import_dir) || file.equal(import_dir);
}
public static void set_import_dir(string path) {
Config.get_instance().set_import_dir(path);
......@@ -94,16 +102,12 @@ class AppDirs {
// Because multiple instances of the app can run at the same time, place temp files in
// subdir named after process ID
File tmp_dir = get_data_subdir("tmp").get_child("%d".printf((int) Posix.getpid()));
if (!tmp_dir.query_exists(null)) {
bool created = false;
try {
created = tmp_dir.make_directory_with_parents(null);
} catch (Error err) {
created = false;
}
if (!created)
error("Unable to create temporary directory %s", tmp_dir.get_path());
try {
if (!tmp_dir.query_exists(null))
tmp_dir.make_directory_with_parents(null);
} catch (Error err) {
AppWindow.panic(_("Unable to create temporary directory %s: %s").printf(
tmp_dir.get_path(), err.message));
}
return tmp_dir;
......@@ -115,12 +119,11 @@ class AppDirs {
subdir = subdir.get_child(subname);
try {
if (subdir.query_exists(null) == false) {
if (!subdir.make_directory_with_parents(null))
error("Unable to create data subdirectory %s", subdir.get_path());
}
if (!subdir.query_exists(null))
subdir.make_directory_with_parents(null);
} catch (Error err) {
error("%s", err.message);
AppWindow.panic(_("Unable to create data subdirectory %s: %s").printf(subdir.get_path(),
err.message));
}
return subdir;
......
......@@ -610,8 +610,11 @@ public abstract class AppWindow : PageWindow {
}
public static void database_error(DatabaseError err) {
string msg = _("A fatal error occurred when accessing Shotwell's library. Shotwell cannot continue.\n\n%s").printf(
err.message);
panic(_("A fatal error occurred when accessing Shotwell's library. Shotwell cannot continue.\n\n%s").printf(
err.message));
}
public static void panic(string msg) {
critical(msg);
error_message(msg);
......
......@@ -37,7 +37,8 @@ public class DatabaseTable {
int res = Sqlite.Database.open_v2(filename, out db, Sqlite.OPEN_READWRITE | Sqlite.OPEN_CREATE,
null);
if (res != Sqlite.OK)
error("Unable to open/create photo database %s: %d", filename, res);
AppWindow.panic(_("Unable to open/create photo database %s: error code %d").printf(filename,
res));
// disable synchronized commits for performance reasons ... this is not vital, hence we
// don't error out if this fails
......
......@@ -80,7 +80,10 @@ public class LibraryWindow : AppWindow {
}
}
public static Gdk.Color SIDEBAR_BG_COLOR = parse_color("#EEE");
// special Yorba-selected sidebar background color for standard themes (humanity,
// clearlooks, etc.); dark themes use the theme's native background color
public static Gdk.Color SIDEBAR_STANDARD_BG_COLOR = parse_color("#EEE");
public const uint16 STANDARD_COMPONENT_MINIMUM = 0xf00;
private string import_dir = Environment.get_home_dir();
......@@ -473,19 +476,23 @@ public class LibraryWindow : AppWindow {
import_dialog.set_current_folder(import_dir);
int response = import_dialog.run();
if (response == Gtk.ResponseType.OK) {
Gtk.ResponseType copy_files_response = copy_files_dialog();
// force file linking if directory is inside current library directory
Gtk.ResponseType copy_files_response =
AppDirs.is_in_import_dir(File.new_for_uri(import_dialog.get_uri()))
? Gtk.ResponseType.REJECT : copy_files_dialog();
if (copy_files_response != Gtk.ResponseType.CANCEL) {
dispatch_import_jobs(import_dialog.get_uris(), "folders",
copy_files_response == Gtk.ResponseType.ACCEPT);
}
}
import_dir = import_dialog.get_current_folder();
import_dialog.destroy();
}
protected override void switched_pages(Page? old_page, Page? new_page) {
set_common_action_sensitive("CommonEmptyTrash", LibraryPhoto.global.get_trashcan_count() > 0);
......@@ -681,18 +688,18 @@ public class LibraryWindow : AppWindow {
}
private override bool drag_motion(Gdk.DragContext context, int x, int y, uint time) {
Gdk.Atom target = Gtk.drag_dest_find_target(this, context,
Gtk.drag_dest_get_target_list(this));
Gdk.Atom target = Gtk.drag_dest_find_target(this, context, Gtk.drag_dest_get_target_list(this));
if (((int) target) == ((int) Gdk.NONE)) {
debug("drag target is GDK_NONE");
Gdk.drag_status(context, 0, time);
return true;
}
// internal drag
if (Gtk.drag_get_source_widget(context) != null) {
Gdk.drag_status(context, Gdk.DragAction.PRIVATE, time);
return true;
}
......@@ -785,23 +792,30 @@ public class LibraryWindow : AppWindow {
// https://bugzilla.gnome.org/show_bug.cgi?id=599321
string uri_string = (string) selection_data.data;
string[] uris_array = Uri.list_extract_uris(uri_string);
GLib.SList<string> uris = new GLib.SList<string>();
foreach (string uri in uris_array) {
foreach (string uri in uris_array)
uris.append(uri);
}
if (context.action == Gdk.DragAction.ASK) {
Gtk.ResponseType result = copy_files_dialog();
// Default action is to link, unless one or more URIs are external to the library
Gtk.ResponseType result = Gtk.ResponseType.REJECT;
foreach (string uri in uris) {
if (!AppDirs.is_in_import_dir(File.new_for_uri(uri))) {
result = copy_files_dialog();
break;
}
}
switch (result) {
case Gtk.ResponseType.ACCEPT:
context.action = Gdk.DragAction.COPY;
break;
break;
case Gtk.ResponseType.REJECT:
context.action = Gdk.DragAction.LINK;
break;
break;
default:
// cancelled
......@@ -810,9 +824,9 @@ public class LibraryWindow : AppWindow {
return;
}
}
dispatch_import_jobs(uris, "drag-and-drop", context.action == Gdk.DragAction.COPY);
Gtk.drag_finish(context, true, false, time);
}
......@@ -1169,7 +1183,7 @@ public class LibraryWindow : AppWindow {
}
// don't unmount mass storage cameras, as they are then unavailable to gPhoto
if (!camera.uri.has_prefix("file://")) {
if (mount != null && !camera.uri.has_prefix("file://")) {
if (page.unmount_camera(mount))
switch_to_page(page);
else
......@@ -1412,7 +1426,17 @@ public class LibraryWindow : AppWindow {
notebook.set_show_tabs(false);
notebook.set_show_border(false);
sidebar.modify_base(Gtk.StateType.NORMAL, SIDEBAR_BG_COLOR);
Gtk.Settings settings = Gtk.Settings.get_default();
HashTable<string, Gdk.Color?> color_table = settings.color_hash;
Gdk.Color? base_color = color_table.lookup("bg_color");
if (base_color != null && (base_color.red > STANDARD_COMPONENT_MINIMUM ||
base_color.green > STANDARD_COMPONENT_MINIMUM ||
base_color.blue > STANDARD_COMPONENT_MINIMUM)) {
// if the current theme is a standard theme (as opposed to a dark theme), then
// use the specially-selected Yorba muted background color for the sidebar.
// otherwise, use the theme's native background color.
sidebar.modify_base(Gtk.StateType.NORMAL, SIDEBAR_STANDARD_BG_COLOR);
}
// put the sidebar in a scrolling window
Gtk.ScrolledWindow scrolled_sidebar = new Gtk.ScrolledWindow(null, null);
......
......@@ -691,7 +691,7 @@ public abstract class Photo : PhotoSource {
Rating rating = Rating.UNRATED;
#if TRACE_MD5
debug("importing MD5 %s: exif=%s preview=%s full=%s", file.get_basename(), detected.exif_md5,
debug("importing MD5 %s: exif=%s preview=%s full=%s", file.get_path(), detected.exif_md5,
detected.thumbnail_md5, detected.md5);
#endif
......
......@@ -347,7 +347,7 @@ public class RESTTransaction {
string formdata_string = "";
foreach (RESTArgument arg in arguments) {
formdata_string = formdata_string + ("%s=%s&".printf(Soup.URI.encode(arg.key, "&"),
Soup.URI.encode(arg.value, "&")));
Soup.URI.encode(arg.value, "&+")));
}
// if the signature key isn't null, append the signature key-value pair to the
......