f-spot r3585 - in trunk: . src src/UI.Dialog
- From: sdelcroix svn gnome org
- To: svn-commits-list gnome org
- Subject: f-spot r3585 - in trunk: . src src/UI.Dialog
- Date: Sat, 19 Jan 2008 12:04:19 +0000 (GMT)
Author: sdelcroix
Date: Sat Jan 19 12:04:19 2008
New Revision: 3585
URL: http://svn.gnome.org/viewvc/f-spot?rev=3585&view=rev
Log:
2008-01-19 Stephane Delcroix <sdelcroix novell com>
* src/makefile.am:
* src/UI.Dialog/HigMessageDialog.cs:
* src/UI.Dialog/EditExceptionDialog: moving
EditExceptionDialog to its own file.
Added:
trunk/src/UI.Dialog/EditExceptionDialog.cs
Modified:
trunk/ChangeLog
trunk/src/Makefile.am
trunk/src/UI.Dialog/HigMessageDialog.cs
Modified: trunk/src/Makefile.am
==============================================================================
--- trunk/src/Makefile.am (original)
+++ trunk/src/Makefile.am Sat Jan 19 12:04:19 2008
@@ -219,6 +219,7 @@
$(srcdir)/TimeDialog.cs \
$(srcdir)/TipWindow.cs \
$(srcdir)/UI.Dialog/AboutDialog.cs \
+ $(srcdir)/UI.Dialog/EditExceptionDialog.cs \
$(srcdir)/UI.Dialog/HigMessageDialog.cs \
$(srcdir)/Unix.cs \
$(srcdir)/Updater.cs \
Added: trunk/src/UI.Dialog/EditExceptionDialog.cs
==============================================================================
--- (empty file)
+++ trunk/src/UI.Dialog/EditExceptionDialog.cs Sat Jan 19 12:04:19 2008
@@ -0,0 +1,61 @@
+/*
+ * FSpot.UI.Dialog.EditExceptionDialog.cs
+ *
+ * Author(s)
+ * Larry Ewing <lewing novell com>
+ *
+ * This is free software. See COPYING for details.
+ */
+
+using System;
+using Mono.Unix;
+using Gtk;
+
+namespace FSpot.UI.Dialog
+{
+ public class EditException : Exception
+ {
+ IBrowsableItem item;
+
+ public IBrowsableItem Item {
+ get { return item; }
+ }
+
+ public EditException (IBrowsableItem item, Exception e) : base (
+ String.Format (Catalog.GetString ("Received exception \"{0}\". Unable to save photo {1}"),
+ e.Message, item.Name), e)
+ {
+ this.item = item;
+ }
+ }
+
+ public class EditExceptionDialog : HigMessageDialog
+ {
+ private const int MaxErrors = 10;
+
+ public EditExceptionDialog (Gtk.Window parent, Exception [] errors) : base (parent, DialogFlags.DestroyWithParent,
+ Gtk.MessageType.Error, ButtonsType.Ok,
+ Catalog.GetString ("Error editing photo"),
+ GenerateMessage (errors))
+ {
+ }
+
+ public EditExceptionDialog (Gtk.Window parent, Exception e, IBrowsableItem item) : this (parent, new EditException (item, e))
+ {
+ }
+
+ public EditExceptionDialog (Gtk.Window parent, Exception e) : this (parent, new Exception [] { e })
+ {
+ }
+
+ private static string GenerateMessage (Exception [] errors)
+ {
+ string desc = String.Empty;
+ for (int i = 0; i < errors.Length && i < MaxErrors; i++) {
+ Exception e = errors [i];
+ desc += e.Message + Environment.NewLine;
+ }
+ return desc;
+ }
+ }
+}
Modified: trunk/src/UI.Dialog/HigMessageDialog.cs
==============================================================================
--- trunk/src/UI.Dialog/HigMessageDialog.cs (original)
+++ trunk/src/UI.Dialog/HigMessageDialog.cs Sat Jan 19 12:04:19 2008
@@ -12,52 +12,6 @@
using Gtk;
namespace FSpot.UI.Dialog {
- public class EditException : Exception
- {
- IBrowsableItem item;
-
- public IBrowsableItem Item {
- get { return item; }
- }
-
- public EditException (IBrowsableItem item, Exception e) : base (
- String.Format (Catalog.GetString ("Received exception \"{0}\". Unable to save photo {1}"),
- e.Message, item.Name), e)
- {
- this.item = item;
- }
- }
-
- public class EditExceptionDialog : HigMessageDialog
- {
- private const int MaxErrors = 10;
-
- public EditExceptionDialog (Gtk.Window parent, Exception [] errors) : base (parent, DialogFlags.DestroyWithParent,
- Gtk.MessageType.Error, ButtonsType.Ok,
- Catalog.GetString ("Error editing photo"),
- GenerateMessage (errors))
- {
- }
-
- public EditExceptionDialog (Gtk.Window parent, Exception e, IBrowsableItem item) : this (parent, new EditException (item, e))
- {
- }
-
- public EditExceptionDialog (Gtk.Window parent, Exception e) : this (parent, new Exception [] { e })
- {
- }
-
- private static string GenerateMessage (Exception [] errors)
- {
- string desc = String.Empty;
- for (int i = 0; i < errors.Length && i < MaxErrors; i++) {
- Exception e = errors [i];
- desc += e.Message + Environment.NewLine;
- }
- return desc;
- }
- }
-
// created on 24/01/2005 at 20:14
// Taken pretty much wholesale from Tomboy
public class HigMessageDialog : Gtk.Dialog
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]