[f-spot: 7/14] FacebookTagPopup ported to Builder



commit 4ae85ae7dd0c2f2c777679cf58f887a17f62c85f
Author: Stephane Delcroix <stephane delcroix org>
Date:   Thu Jun 25 09:30:58 2009 +0200

    FacebookTagPopup ported to Builder
    
    the FacebookTagPopup class is now ported to GtkBuidler and lives in tis own .cs file for readability. It inherits from Gtk.Window too. Was it worth the work as I'm not sure if this popup is ever used ??

 .../Exporters/FacebookExport/FacebookExport.cs     |   36 ++-----------------
 .../Exporters/FacebookExport/FacebookTagPopup.cs   |   37 ++++++++++++++++++++
 extensions/Exporters/FacebookExport/Makefile.am    |   11 +++---
 3 files changed, 47 insertions(+), 37 deletions(-)
---
diff --git a/extensions/Exporters/FacebookExport/FacebookExport.cs b/extensions/Exporters/FacebookExport/FacebookExport.cs
index c600c3d..41bdd1c 100644
--- a/extensions/Exporters/FacebookExport/FacebookExport.cs
+++ b/extensions/Exporters/FacebookExport/FacebookExport.cs
@@ -7,8 +7,10 @@
  *   Jim Ramsay <i am jimramsay com>
  *
  * Copyright (C) 2007 George Talusan
- * Copyright (c) 2008 Novell, Inc.
+ * Copyright (c) 2008-2009 Novell, Inc.
  * Later changes (2009) by Jim Ramsay
+ *
+ * This is free software. See COPYING for details.
  */
 
 using System;
@@ -23,7 +25,7 @@ using System.Web;
 using Mono.Unix;
 using Gtk;
 using Gnome.Keyring;
-using Glade;
+using GtkBeans;
 
 using FSpot;
 using FSpot.Utils;
@@ -273,36 +275,6 @@ namespace FSpot.Exporter.Facebook
 		}
 	}
 
-	internal class FacebookTagPopup
-	{
-		private Dictionary<long, User> _friends;
-
-		private Gtk.Window _popup;
-
-		public FacebookTagPopup (Dictionary<long, User> friends)
-		{
-			Friends = friends;
-
-			Glade.XML xml = new Glade.XML (null, "FacebookExport.glade", "facebook_tag_popup", "f-spot");
-			xml.Autoconnect (this);
-
-			Popup = xml.GetWidget ("facebook_tag_popup") as Gtk.Window;
-			Popup.Show ();
-		}
-
-		public Dictionary<long, User> Friends
-		{
-			get { return _friends; }
-			set { _friends = value; }
-		}
-
-		protected Gtk.Window Popup
-		{
-			get { return _popup; }
-			set { _popup = value; }
-		}
-	}
-
 	public class FacebookExport : IExporter
 	{
 		private int size = 604;
diff --git a/extensions/Exporters/FacebookExport/FacebookTagPopup.cs b/extensions/Exporters/FacebookExport/FacebookTagPopup.cs
new file mode 100644
index 0000000..92e1eb7
--- /dev/null
+++ b/extensions/Exporters/FacebookExport/FacebookTagPopup.cs
@@ -0,0 +1,37 @@
+/*
+ * FacebookTagPopup.cs
+ *
+ * Authors:
+ *   George Talusan <george convolve ca>
+ *   Stephane Delcroix <stephane delcroix org>
+ *
+ * Copyright (C) 2007 George Talusan
+ * Copyright (c) 2008-2009 Novell, Inc.
+ *
+ * This is free software. See COPYING for details.
+ */
+
+using System.Collections.Generic;
+using FSpot.Widgets;
+using Mono.Facebook;
+
+namespace FSpot.Exporter.Facebook
+{	
+	internal class FacebookTagPopup : BuilderWindow
+	{
+		private Dictionary<long, User> _friends;
+
+		private Gtk.Window _popup;
+
+		public FacebookTagPopup (Dictionary<long, User> friends) : base ("FacebookExport.ui", "facebook_tag_popup")
+		{
+			Friends = friends;
+		}
+
+		public Dictionary<long, User> Friends
+		{
+			get { return _friends; }
+			set { _friends = value; }
+		}
+	}
+}
diff --git a/extensions/Exporters/FacebookExport/Makefile.am b/extensions/Exporters/FacebookExport/Makefile.am
index 228d353..5515dad 100644
--- a/extensions/Exporters/FacebookExport/Makefile.am
+++ b/extensions/Exporters/FacebookExport/Makefile.am
@@ -8,6 +8,7 @@ PLUGIN_ASSEMBLY = $(PLUGIN_NAME).dll
 
 PLUGIN_SOURCES =			\
 	$(srcdir)/FacebookExport.cs			\
+	$(srcdir)/FacebookTagPopup.cs			\
 	$(srcdir)/Mono.Facebook/Album.cs		\
 	$(srcdir)/Mono.Facebook/AssemblyInfo.cs		\
 	$(srcdir)/Mono.Facebook/Error.cs		\
@@ -33,6 +34,7 @@ REFS =					\
 	-r:$(top_builddir)/src/FSpot.Core.dll	\
 	-r:$(top_builddir)/src/FSpot.Utils.dll	\
 	-r:$(top_builddir)/src/FSpot.Platform.dll	\
+	-r:$(top_builddir)/src/FSpot.Widgets.dll	\
 	$(LINK_GTKSHARPBEANS)				\
 	$(LINK_KEYRING)                     \
 	$(LINK_MONO_ADDINS)					\
@@ -41,19 +43,18 @@ REFS =					\
 	-r:Mono.Posix
 
 PKGS =					\
-	-pkg:gtk-sharp-2.0		\
-	-pkg:glade-sharp-2.0
+	-pkg:gtk-sharp-2.0
 
 RESOURCES =				\
 	-resource:$(srcdir)/$(PLUGIN_MANIFEST)	\
-	-resource:$(srcdir)/$(PLUGIN_NAME).glade
+	-resource:$(srcdir)/$(PLUGIN_NAME).ui
 
 all: $(PLUGIN_ASSEMBLY)
 
 mpack: $(PLUGIN_ASSEMBLY)
 	mautil p $(PLUGIN_ASSEMBLY)
 
-$(PLUGIN_ASSEMBLY): $(PLUGIN_SOURCES) $(PLUGIN_MANIFEST) $(PLUGIN_NAME).glade
+$(PLUGIN_ASSEMBLY): $(PLUGIN_SOURCES) $(PLUGIN_MANIFEST) $(PLUGIN_NAME).ui
 	$(CSC_LIB) -out:$@ $(PLUGIN_SOURCES) $(REFS) $(PKGS) $(ASSEMBLIES) $(RESOURCES)
 
 plugindir = $(pkglibdir)/extensions
@@ -67,7 +68,7 @@ plugin_DATA =			\
 EXTRA_DIST = 			\
 	$(PLUGIN_SOURCES)	\
 	$(PLUGIN_MANIFEST)	\
-	$(PLUGIN_NAME).glade
+	$(PLUGIN_NAME).ui
 
 CLEANFILES =			\
 	$(PLUGIN_ASSEMBLY)	\



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