f-spot r3568 - in trunk: . src src/UI.Dialog



Author: sdelcroix
Date: Fri Jan 18 12:03:33 2008
New Revision: 3568
URL: http://svn.gnome.org/viewvc/f-spot?rev=3568&view=rev

Log:
2008-01-18  Stephane Delcroix  <sdelcroix novell com>

	* src/UI.Dialog: yet another new folder, yet another new ns

	* src/Makefile.am:
	* src/UI.Dialog/AboutDialog.cs:
	* src/MainWindow.cs:
	* src/SingleView.cs: replaced the deprecated Gnome.About by a 
	Gtk.AboutDialog.

	* configure.in: added a check for GTK2.11


Added:
   trunk/src/UI.Dialog/
   trunk/src/UI.Dialog/AboutDialog.cs
Modified:
   trunk/ChangeLog
   trunk/configure.in
   trunk/src/MainWindow.cs
   trunk/src/Makefile.am
   trunk/src/SingleView.cs

Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in	(original)
+++ trunk/configure.in	Fri Jan 18 12:03:33 2008
@@ -77,6 +77,9 @@
 if pkg-config --atleast-version=2.10 gtk-sharp-2.0; then
    CSC_DEFINES="-d:GTK_2_10"
 fi
+if pkg-config --atleast-version=2.11 gtk-sharp-2.0; then
+   CSC_DEFINES="-d:GTK_2_11"
+fi
 if pkg-config --atleast-version=2.18 gconf-sharp-2.0; then
   CSC_DEFINES="$CSC_DEFINES -d:GCONF_SHARP_2_18"
 fi

Modified: trunk/src/MainWindow.cs
==============================================================================
--- trunk/src/MainWindow.cs	(original)
+++ trunk/src/MainWindow.cs	Fri Jan 18 12:03:33 2008
@@ -1617,62 +1617,9 @@
 //				"f-spot.xml");
 	}
 
-	private static About about = null;
 	public static void HandleAbout (object sender, EventArgs args)
 	{
-		string [] authors = new string [] {
-			"Ettore Perazzoli",
-			"Lawrence Ewing",
-			"Stephane Delcroix",
-			"Laurence Hygate",
-			"Alex Graveley",
-			"Todd Berman",
-			"Ben Monnahan",
-			"Vladimir Vukicevic",
-			"Aaron Bockover",
-			"Bengt Thuree",
-			"Jon Trowbridge",
-			"Joe Shaw",
-			"Nat Friedman",
-			"Ruben Vermeersch",
-			"Tambet Ingo",
-			"MOREAU Vincent",
-			"Alvaro del Castillo",
-			"Lee Willis",
-			"Alessandro Gervaso",
-			"Peter Johanson",
-			"Miguel de Icaza",
-			"Chad Files",
-			"Grahm Orr",
-			"Ewen Cheslack-Postava",
-			"Gabriel Burt",
-			"Patanjali Somayaji",
-			"Matt Jones",
-			"Martin Willemoes Hansen",
-			"Joshua Tauberer",
-			"Joerg Buesse",
-			"Jakub Steiner",
-			"Xavier Bouchoux",
-			"Lorenzo Milesi",
-			"Thomas Van Machelen"
-		};
-
-                // Translators should localize the following string
-                // * which will give them credit in the About box.
-                // * E.g. "Martin Willemoes Hansen"
-                string translators = Catalog.GetString ("translator-credits");
-                if (System.String.Compare (translators, "translator-credits") == 0) {
-                	translators = null;
-                }
-
-		if (about == null)
-			about = new About ("F-Spot", 
-			   FSpot.Defines.VERSION, 
-			   Catalog.GetString ("Copyright \x00a9 2003-2007 Novell Inc."),
-                           null, authors, new string [0], translators, 
-			   PixbufUtils.LoadFromAssembly ("f-spot-logo.svg"));
-		about.Destroyed += delegate (object o, EventArgs e) {about = null;};
-		about.Show ();
+		FSpot.UI.Dialog.AboutDialog.ShowUp ();
 	}
 
 	void HandleTagSizeChange (object sender, EventArgs args)

Modified: trunk/src/Makefile.am
==============================================================================
--- trunk/src/Makefile.am	(original)
+++ trunk/src/Makefile.am	Fri Jan 18 12:03:33 2008
@@ -209,6 +209,7 @@
 	$(srcdir)/TimeAdaptor.cs		\
 	$(srcdir)/TimeDialog.cs			\
 	$(srcdir)/TipWindow.cs			\
+	$(srcdir)/UI.Dialog/AboutDialog.cs	\
 	$(srcdir)/Unix.cs			\
 	$(srcdir)/Updater.cs			\
 	$(srcdir)/UriCollection.cs		\

Modified: trunk/src/SingleView.cs
==============================================================================
--- trunk/src/SingleView.cs	(original)
+++ trunk/src/SingleView.cs	Fri Jan 18 12:03:33 2008
@@ -298,7 +298,7 @@
 
 		private void HandleAbout (object sender, System.EventArgs args)
 		{
-			MainWindow.HandleAbout (sender, args);
+			FSpot.UI.Dialog.AboutDialog.ShowUp ();
 		}
 
 		private void HandleNewWindow (object sender, System.EventArgs args)

Added: trunk/src/UI.Dialog/AboutDialog.cs
==============================================================================
--- (empty file)
+++ trunk/src/UI.Dialog/AboutDialog.cs	Fri Jan 18 12:03:33 2008
@@ -0,0 +1,92 @@
+/*
+ * FSpot.UI.Dialog.AboutDialog.cs
+ *
+ * Author(s):
+ *	Stephane Delcroix <stephane delcroix org>
+ *
+ * This is free software. See COPYING for details.
+ */
+
+using System;
+using Mono.Unix;
+
+namespace FSpot.UI.Dialog
+{
+	public class AboutDialog : Gtk.AboutDialog
+	{
+		private static AboutDialog about = null;
+		
+		private AboutDialog () {
+			Artists = new string [] {
+				"Jakub Steiner",	
+			};
+			Authors = new string [] {
+				"Aaron Bockover",
+				"Alessandro Gervaso",
+				"Alex Graveley",
+				"Alvaro del Castillo",
+				"Ben Monnahan",
+				"Bengt Thuree",
+				"Chad Files",
+				"Ettore Perazzoli",
+				"Ewen Cheslack-Postava",
+				"Joe Shaw",
+				"Joerg Buesse",
+				"Jon Trowbridge",
+				"Joshua Tauberer",
+				"Gabriel Burt",
+				"Grahm Orr",
+				"Laurence Hygate",
+				"Lawrence Ewing",
+				"Lee Willis",
+				"Lorenzo Milesi",
+				"Martin Willemoes Hansen",
+				"Matt Jones",
+				"Miguel de Icaza",
+				"Nat Friedman",
+				"Patanjali Somayaji",
+				"Peter Johanson",
+				"Ruben Vermeersch",
+				"Stephane Delcroix",
+				"Tambet Ingo",
+				"Thomas Van Machelen",
+				"Todd Berman",
+				"Vincent Moreau",
+				"Vladimir Vukicevic",
+				"Xavier Bouchoux",
+			};
+			Comments = "F-Spot is a full-featured personal photo management application for the GNOME desktop.\nIt simplifies digital photography by providing intuitive tools to help you share, touch-up, find and organize your images..";
+			Copyright = Catalog.GetString ("Copyright \x00a9 2003-2008 Novell Inc.");
+			Documenters = new string[] {
+				"Aaron Bockover",
+				"Alexandre Prokoudine",	
+				"Bengt Thuree",
+				"Gabriel Burt",
+				"Miguel de Icaza",
+				"Stephane Delcroix",
+			};
+			License = "GPL v2";
+			LogoIconName = "f-spot";
+	#if !GTK_2_11
+			Name = "F-Spot";
+	#endif
+			TranslatorCredits = Catalog.GetString ("translator-credits");
+                	if (System.String.Compare (TranslatorCredits, "translator-credits") == 0)
+                		TranslatorCredits = null;
+			Version = Defines.VERSION;
+			Website = "http://f-spot.org";;
+			WebsiteLabel = Catalog.GetString ("F-Spot Website");
+			WrapLicense = true;
+		}
+
+		public static AboutDialog ShowUp ()
+		{
+			if (about == null)
+				about = new AboutDialog ();
+			about.Destroyed += delegate (object o, EventArgs e) {about = null;};
+			about.Response += delegate (object o, Gtk.ResponseArgs e) {if (about != null) about.Destroy ();};
+			about.Show ();
+			return about;
+		}
+	}
+}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]