f-spot r4296 - trunk/extensions/MergeDb
- From: sdelcroix svn gnome org
- To: svn-commits-list gnome org
- Subject: f-spot r4296 - trunk/extensions/MergeDb
- Date: Tue, 26 Aug 2008 07:14:16 +0000 (UTC)
Author: sdelcroix
Date: Tue Aug 26 07:14:16 2008
New Revision: 4296
URL: http://svn.gnome.org/viewvc/f-spot?rev=4296&view=rev
Log:
catch connect exception, bump addin version
Modified:
trunk/extensions/MergeDb/Makefile.am
trunk/extensions/MergeDb/MergeDb.addin.xml
trunk/extensions/MergeDb/MergeDb.cs
Modified: trunk/extensions/MergeDb/Makefile.am
==============================================================================
--- trunk/extensions/MergeDb/Makefile.am (original)
+++ trunk/extensions/MergeDb/Makefile.am Tue Aug 26 07:14:16 2008
@@ -10,6 +10,7 @@
$(srcdir)/MergeDb.cs
REFS = \
+ -r:Mono.Posix \
-r:../../src/f-spot.exe \
-r:../../src/FSpot.Core.dll \
-r:../../src/FSpot.Utils.dll \
Modified: trunk/extensions/MergeDb/MergeDb.addin.xml
==============================================================================
--- trunk/extensions/MergeDb/MergeDb.addin.xml (original)
+++ trunk/extensions/MergeDb/MergeDb.addin.xml Tue Aug 26 07:14:16 2008
@@ -1,14 +1,14 @@
<Addin namespace="FSpot"
id="MergeDb"
name="MergeDb"
- version="0.4.4.99"
+ version="0.4.4.100"
description="Merge another db back to the main one"
author="Stephane Delcroix"
url="http://f-spot.org/Extensions"
category="Tools"
defaultEnabled="false">
<Dependencies>
- <Addin id="Core" version="0.4.4.102"/>
+ <Addin id="Core" version="0.4.4.103"/>
</Dependencies>
<Extension path = "/FSpot/Menus/Tools">
<Command id = "MergeDb" _label = "Merge Db" command_type = "MergeDbExtension.MergeDb" />
Modified: trunk/extensions/MergeDb/MergeDb.cs
==============================================================================
--- trunk/extensions/MergeDb/MergeDb.cs (original)
+++ trunk/extensions/MergeDb/MergeDb.cs Tue Aug 26 07:14:16 2008
@@ -15,6 +15,8 @@
using FSpot.Extensions;
using FSpot.Utils;
using FSpot.Query;
+using FSpot.UI.Dialog;
+using Mono.Unix;
namespace MergeDbExtension
{
@@ -41,11 +43,17 @@
public void Run (object o, EventArgs e)
{
from_db = new Db ();
+ from_db.ExceptionThrown += HandleDbException;
to_db = Core.Database;
ShowDialog ();
}
+ void HandleDbException (Exception e)
+ {
+ Log.Exception (e);
+ }
+
public void ShowDialog () {
Glade.XML xml = new Glade.XML (null, "MergeDb.glade", "mergedb_dialog", "f-spot");
xml.Autoconnect (this);
@@ -66,9 +74,9 @@
void HandleFileSet (object o, EventArgs e)
{
- Log.DebugFormat ("FileChooser Activated, trying to open {0}...", db_filechooser.Filename);
try {
from_db.Init (db_filechooser.Filename, true);
+ Log.Debug ("HE");
query = new PhotoQuery (from_db.Photos);
CheckRolls ();
@@ -83,6 +91,17 @@
newrolls_radio.Active = true;
HandleRollsChanged (null, null);
} catch (Exception ex) {
+ string msg = Catalog.GetString ("Error opening the selected file");
+ string desc = String.Format (Catalog.GetString ("The file you selected is not a valid or supported database.\n\nReceived exception \"{0}\"."), ex.Message);
+
+ HigMessageDialog md = new HigMessageDialog (mergedb_dialog, DialogFlags.DestroyWithParent,
+ Gtk.MessageType.Error,
+ ButtonsType.Ok,
+ msg,
+ desc);
+ md.Run ();
+ md.Destroy ();
+
Log.Exception (ex);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]