Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/f-spot/ChangeLog,v
retrieving revision 1.1532
diff -u -p -r1.1532 ChangeLog
--- ChangeLog	30 Jul 2006 18:17:12 -0000	1.1532
+++ ChangeLog	2 Aug 2006 10:03:03 -0000
@@ -1,3 +1,12 @@
+2006-08-02  Stephane Delcroix <stephane@delcroix.org>
+
+	* src/GoogleExport.cs:
+	* src/Makefile.am:
+	* src/Preferences.cs:
+	* src/f-spot.glade:
+	* src/MainWindow.cs: Export to PicassaWeb added. Require google-sharp.
+	Fix b.g.o.: #344851
+
 2006-07-30  Larry Ewing  <lewing@novell.com>
 
 	* src/Loupe.cs: clean up the loupe a little more, calculate the
Index: src/MainWindow.cs
===================================================================
RCS file: /cvs/gnome/f-spot/src/MainWindow.cs,v
retrieving revision 1.303
diff -u -p -r1.303 MainWindow.cs
--- src/MainWindow.cs	20 Jul 2006 18:57:52 -0000	1.303
+++ src/MainWindow.cs	2 Aug 2006 10:03:05 -0000
@@ -1374,6 +1374,10 @@ public class MainWindow {
 		info_display_window.Destroyed += HandleInfoDisplayDestroy;
 	}
 
+	void HandleExportToPicasa (object sender, EventArgs args)
+	{
+		new FSpot.GoogleExport (new FSpot.PhotoArray (SelectedPhotos ()));
+	}
 
 	void HandleExportToGallery (object sender, EventArgs args)
 	{
Index: src/Makefile.am
===================================================================
RCS file: /cvs/gnome/f-spot/src/Makefile.am,v
retrieving revision 1.64
diff -u -p -r1.64 Makefile.am
--- src/Makefile.am	18 Jul 2006 23:16:24 -0000	1.64
+++ src/Makefile.am	2 Aug 2006 10:03:05 -0000
@@ -36,6 +36,7 @@ F_SPOT_CSDISTFILES =				\
 	$(srcdir)/GalleryExport.cs		\
 	$(srcdir)/GladeDialog.cs		\
 	$(srcdir)/Global.cs			\
+	$(srcdir)/GoogleExport.cs		\
 	$(srcdir)/GroupAdaptor.cs		\
 	$(srcdir)/GroupSelector.cs		\
 	$(srcdir)/Accelerometer.cs		\
@@ -135,6 +136,7 @@ ASSEMBLIES =					\
 	-pkg:gtkhtml-sharp-2.0			\
 	-pkg:glade-sharp-2.0			\
 	-pkg:gnome-vfs-sharp-2.0		\
+	-pkg:mono-google			\
 	-pkg:gconf-sharp-2.0
 
 RESOURCES =										\
Index: src/Preferences.cs
===================================================================
RCS file: /cvs/gnome/f-spot/src/Preferences.cs,v
retrieving revision 1.13
diff -u -p -r1.13 Preferences.cs
--- src/Preferences.cs	19 May 2006 16:21:10 -0000	1.13
+++ src/Preferences.cs	2 Aug 2006 10:03:05 -0000
@@ -71,6 +71,11 @@ namespace FSpot
 		public const string EXPORT_GALLERY_BROWSER = "/apps/f-spot/export/gallery/browser";
 		public const string EXPORT_GALLERY_META = "/apps/f-spot/export/gallery/meta";
 
+		public const string EXPORT_GOOGLE_SCALE = "/apps/f-spot/export/google/scale";
+		public const string EXPORT_GOOGLE_SIZE = "/apps/f-spot/export/google/size";
+		public const string EXPORT_GOOGLE_ROTATE = "/apps/f-spot/export/google/rotate";
+		public const string EXPORT_GOOGLE_BROWSER = "/apps/f-spot/export/google/browser";
+
 		public const string SCREENSAVER_TAG = "/apps/f-spot/screensaver/tag_id";
 
 		public const string METADATA_EMBED_IN_IMAGE = "/apps/f-spot/metadata/embed_in_image";
Index: src/f-spot.glade
===================================================================
RCS file: /cvs/gnome/f-spot/src/f-spot.glade,v
retrieving revision 1.164
diff -u -p -r1.164 f-spot.glade
--- src/f-spot.glade	6 Jun 2006 18:09:47 -0000	1.164
+++ src/f-spot.glade	2 Aug 2006 10:03:15 -0000
@@ -3123,7 +3123,7 @@ Photo Details</property>
   </child>
 </widget>
 
-<widget class="GtkDialog" id="gallery_export_dialog">
+<widget class="GtkDialog" id="google_export_dialog">
   <property name="title" translatable="yes">Export</property>
   <property name="type">GTK_WINDOW_TOPLEVEL</property>
   <property name="window_position">GTK_WIN_POS_NONE</property>
@@ -3412,7 +3412,7 @@ Photo Details</property>
 		  <child>
 		    <widget class="GtkLabel" id="label44">
 		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">&lt;b&gt;Gallery&lt;/b&gt;</property>
+		      <property name="label" translatable="yes">&lt;b&gt;PicasaWeb Export&lt;/b&gt;</property>
 		      <property name="use_underline">False</property>
 		      <property name="use_markup">True</property>
 		      <property name="justify">GTK_JUSTIFY_LEFT</property>
@@ -3693,14 +3693,14 @@ Photo Details</property>
 			  </child>
 
 			  <child>
-			    <widget class="GtkCheckButton" id="meta_check">
+			    <widget class="GtkCheckButton" id="rotate_check">
 			      <property name="visible">True</property>
 			      <property name="can_focus">True</property>
-			      <property name="label" translatable="yes">Export _titles and comments</property>
+			      <property name="label" translatable="yes">Autorotate</property>
 			      <property name="use_underline">True</property>
 			      <property name="relief">GTK_RELIEF_NORMAL</property>
 			      <property name="focus_on_click">True</property>
-			      <property name="active">True</property>
+			      <property name="active">False</property>
 			      <property name="inconsistent">False</property>
 			      <property name="draw_indicator">True</property>
 			    </widget>
@@ -3762,9 +3762,8 @@ Photo Details</property>
   </child>
 </widget>
 
-<widget class="GtkDialog" id="gallery_add_album_dialog">
-  <property name="visible">True</property>
-  <property name="title" translatable="yes"></property>
+<widget class="GtkDialog" id="gallery_export_dialog">
+  <property name="title" translatable="yes">Export</property>
   <property name="type">GTK_WINDOW_TOPLEVEL</property>
   <property name="window_position">GTK_WIN_POS_NONE</property>
   <property name="modal">False</property>
@@ -3780,13 +3779,13 @@ Photo Details</property>
   <property name="has_separator">False</property>
 
   <child internal-child="vbox">
-    <widget class="GtkVBox" id="dialog-vbox12">
+    <widget class="GtkVBox" id="dialog-vbox11">
       <property name="visible">True</property>
       <property name="homogeneous">False</property>
       <property name="spacing">0</property>
 
       <child internal-child="action_area">
-	<widget class="GtkHButtonBox" id="dialog-action_area12">
+	<widget class="GtkHButtonBox" id="dialog-action_area11">
 	  <property name="visible">True</property>
 	  <property name="layout_style">GTK_BUTTONBOX_END</property>
 
@@ -3804,11 +3803,11 @@ Photo Details</property>
 	  </child>
 
 	  <child>
-	    <widget class="GtkButton" id="add_button">
+	    <widget class="GtkButton" id="ok_button">
 	      <property name="visible">True</property>
 	      <property name="can_default">True</property>
 	      <property name="can_focus">True</property>
-	      <property name="label">gtk-add</property>
+	      <property name="label">gtk-ok</property>
 	      <property name="use_stock">True</property>
 	      <property name="relief">GTK_RELIEF_NORMAL</property>
 	      <property name="focus_on_click">True</property>
@@ -3825,208 +3824,1408 @@ Photo Details</property>
       </child>
 
       <child>
-	<widget class="GtkTable" id="table10">
-	  <property name="border_width">12</property>
+	<widget class="GtkHBox" id="hbox17">
+	  <property name="border_width">6</property>
 	  <property name="visible">True</property>
-	  <property name="n_rows">4</property>
-	  <property name="n_columns">2</property>
 	  <property name="homogeneous">False</property>
-	  <property name="row_spacing">6</property>
-	  <property name="column_spacing">7</property>
+	  <property name="spacing">0</property>
 
 	  <child>
-	    <widget class="GtkLabel" id="gallery_label">
+	    <widget class="GtkFrame" id="frame8">
 	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">_Parent Album:</property>
-	      <property name="use_underline">True</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">1</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">0</property>
-	      <property name="ypad">0</property>
-	      <property name="mnemonic_widget">album_optionmenu</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="left_attach">0</property>
-	      <property name="right_attach">1</property>
-	      <property name="top_attach">0</property>
-	      <property name="bottom_attach">1</property>
-	      <property name="x_options">fill</property>
-	      <property name="y_options"></property>
-	    </packing>
-	  </child>
+	      <property name="label_xalign">0</property>
+	      <property name="label_yalign">0.5</property>
+	      <property name="shadow_type">GTK_SHADOW_NONE</property>
 
-	  <child>
-	    <widget class="GtkLabel" id="password_label">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">_Title:</property>
-	      <property name="use_underline">True</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">1</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">0</property>
-	      <property name="ypad">0</property>
-	      <property name="mnemonic_widget">title_entry</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="left_attach">0</property>
-	      <property name="right_attach">1</property>
-	      <property name="top_attach">3</property>
-	      <property name="bottom_attach">4</property>
-	      <property name="x_options">fill</property>
-	      <property name="y_options"></property>
-	    </packing>
-	  </child>
+	      <child>
+		<widget class="GtkAlignment" id="alignment12">
+		  <property name="visible">True</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xscale">1</property>
+		  <property name="yscale">1</property>
+		  <property name="top_padding">0</property>
+		  <property name="bottom_padding">0</property>
+		  <property name="left_padding">12</property>
+		  <property name="right_padding">0</property>
 
-	  <child>
-	    <widget class="GtkEntry" id="title_entry">
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="editable">True</property>
-	      <property name="visibility">True</property>
-	      <property name="max_length">0</property>
-	      <property name="text" translatable="yes"></property>
-	      <property name="has_frame">True</property>
-	      <property name="invisible_char">*</property>
-	      <property name="activates_default">False</property>
+		  <child>
+		    <widget class="GtkScrolledWindow" id="thumb_scrolledwindow">
+		      <property name="width_request">180</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+		      <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+		      <property name="shadow_type">GTK_SHADOW_IN</property>
+		      <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+		      <child>
+			<placeholder/>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="photo_frame">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">&lt;b&gt;Photos&lt;/b&gt;</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">True</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="type">label_item</property>
+		</packing>
+	      </child>
 	    </widget>
 	    <packing>
-	      <property name="left_attach">1</property>
-	      <property name="right_attach">2</property>
-	      <property name="top_attach">3</property>
-	      <property name="bottom_attach">4</property>
-	      <property name="y_options"></property>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
 	    </packing>
 	  </child>
 
 	  <child>
-	    <widget class="GtkLabel" id="descroption_label">
+	    <widget class="GtkVBox" id="vbox11">
 	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">_Description:</property>
-	      <property name="use_underline">True</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">1</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">0</property>
-	      <property name="ypad">0</property>
-	      <property name="mnemonic_widget">description_entry</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">6</property>
+
+	      <child>
+		<widget class="GtkFrame" id="frame9">
+		  <property name="visible">True</property>
+		  <property name="label_xalign">0</property>
+		  <property name="label_yalign">0.5</property>
+		  <property name="shadow_type">GTK_SHADOW_NONE</property>
+
+		  <child>
+		    <widget class="GtkAlignment" id="alignment13">
+		      <property name="visible">True</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xscale">1</property>
+		      <property name="yscale">1</property>
+		      <property name="top_padding">0</property>
+		      <property name="bottom_padding">0</property>
+		      <property name="left_padding">12</property>
+		      <property name="right_padding">0</property>
+
+		      <child>
+			<widget class="GtkVBox" id="vbox12">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">6</property>
+
+			  <child>
+			    <widget class="GtkHBox" id="hbox20">
+			      <property name="visible">True</property>
+			      <property name="homogeneous">False</property>
+			      <property name="spacing">6</property>
+
+			      <child>
+				<widget class="GtkLabel" id="gallery_label">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">_Gallery:</property>
+				  <property name="use_underline">True</property>
+				  <property name="use_markup">False</property>
+				  <property name="justify">GTK_JUSTIFY_LEFT</property>
+				  <property name="wrap">False</property>
+				  <property name="selectable">False</property>
+				  <property name="xalign">0.5</property>
+				  <property name="yalign">0.5</property>
+				  <property name="xpad">0</property>
+				  <property name="ypad">0</property>
+				  <property name="mnemonic_widget">gallery_optionmenu</property>
+				  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+				  <property name="width_chars">-1</property>
+				  <property name="single_line_mode">False</property>
+				  <property name="angle">0</property>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">False</property>
+				  <property name="fill">False</property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkOptionMenu" id="gallery_optionmenu">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="history">-1</property>
+				  <signal name="changed" handler="HandleAccountSelected" last_modification_time="Fri, 08 Oct 2004 22:18:26 GMT"/>
+
+				  <child>
+				    <widget class="GtkMenu" id="menu1">
+				    </widget>
+				  </child>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">True</property>
+				  <property name="fill">True</property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkButton" id="gallery_button">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="label">gtk-add</property>
+				  <property name="use_stock">True</property>
+				  <property name="relief">GTK_RELIEF_NORMAL</property>
+				  <property name="focus_on_click">True</property>
+				  <signal name="clicked" handler="HandleAddGallery" last_modification_time="Fri, 08 Oct 2004 22:16:40 GMT"/>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">False</property>
+				  <property name="fill">False</property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkButton" id="edit_button">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="label">gtk-edit</property>
+				  <property name="use_stock">True</property>
+				  <property name="relief">GTK_RELIEF_NORMAL</property>
+				  <property name="focus_on_click">True</property>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">False</property>
+				  <property name="fill">False</property>
+				</packing>
+			      </child>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">True</property>
+			      <property name="fill">True</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="status_label">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes"></property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_LEFT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+			      <property name="width_chars">-1</property>
+			      <property name="single_line_mode">False</property>
+			      <property name="angle">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+			</widget>
+		      </child>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label44">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">&lt;b&gt;Gallery&lt;/b&gt;</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">True</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="type">label_item</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkFrame" id="frame10">
+		  <property name="visible">True</property>
+		  <property name="label_xalign">0</property>
+		  <property name="label_yalign">0.5</property>
+		  <property name="shadow_type">GTK_SHADOW_NONE</property>
+
+		  <child>
+		    <widget class="GtkAlignment" id="alignment14">
+		      <property name="visible">True</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xscale">1</property>
+		      <property name="yscale">1</property>
+		      <property name="top_padding">0</property>
+		      <property name="bottom_padding">0</property>
+		      <property name="left_padding">12</property>
+		      <property name="right_padding">0</property>
+
+		      <child>
+			<widget class="GtkVBox" id="vbox13">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">6</property>
+
+			  <child>
+			    <widget class="GtkHBox" id="hbox18">
+			      <property name="visible">True</property>
+			      <property name="homogeneous">False</property>
+			      <property name="spacing">6</property>
+
+			      <child>
+				<widget class="GtkLabel" id="album_label">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">_Export to Album:</property>
+				  <property name="use_underline">True</property>
+				  <property name="use_markup">False</property>
+				  <property name="justify">GTK_JUSTIFY_LEFT</property>
+				  <property name="wrap">False</property>
+				  <property name="selectable">False</property>
+				  <property name="xalign">0.5</property>
+				  <property name="yalign">0.5</property>
+				  <property name="xpad">0</property>
+				  <property name="ypad">0</property>
+				  <property name="mnemonic_widget">album_optionmenu</property>
+				  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+				  <property name="width_chars">-1</property>
+				  <property name="single_line_mode">False</property>
+				  <property name="angle">0</property>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">False</property>
+				  <property name="fill">False</property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkOptionMenu" id="album_optionmenu">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="history">-1</property>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">True</property>
+				  <property name="fill">True</property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkButton" id="album_button">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="label">gtk-add</property>
+				  <property name="use_stock">True</property>
+				  <property name="relief">GTK_RELIEF_NORMAL</property>
+				  <property name="focus_on_click">True</property>
+				  <signal name="clicked" handler="HandleAddAlbum" last_modification_time="Sat, 05 Nov 2005 17:24:31 GMT"/>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">False</property>
+				  <property name="fill">False</property>
+				</packing>
+			      </child>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">True</property>
+			      <property name="fill">True</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkCheckButton" id="browser_check">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="label" translatable="yes">Open _album in browser when done uploading</property>
+			      <property name="use_underline">True</property>
+			      <property name="relief">GTK_RELIEF_NORMAL</property>
+			      <property name="focus_on_click">True</property>
+			      <property name="active">True</property>
+			      <property name="inconsistent">False</property>
+			      <property name="draw_indicator">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+			</widget>
+		      </child>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label45">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">&lt;b&gt;Album&lt;/b&gt;</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">True</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="type">label_item</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkFrame" id="frame11">
+		  <property name="visible">True</property>
+		  <property name="label_xalign">0</property>
+		  <property name="label_yalign">0.5</property>
+		  <property name="shadow_type">GTK_SHADOW_NONE</property>
+
+		  <child>
+		    <widget class="GtkAlignment" id="alignment15">
+		      <property name="visible">True</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xscale">1</property>
+		      <property name="yscale">1</property>
+		      <property name="top_padding">0</property>
+		      <property name="bottom_padding">0</property>
+		      <property name="left_padding">12</property>
+		      <property name="right_padding">0</property>
+
+		      <child>
+			<widget class="GtkVBox" id="vbox14">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">6</property>
+
+			  <child>
+			    <widget class="GtkHBox" id="hbox58">
+			      <property name="visible">True</property>
+			      <property name="homogeneous">False</property>
+			      <property name="spacing">0</property>
+
+			      <child>
+				<widget class="GtkCheckButton" id="scale_check">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="label" translatable="yes">_Resize to: </property>
+				  <property name="use_underline">True</property>
+				  <property name="relief">GTK_RELIEF_NORMAL</property>
+				  <property name="focus_on_click">True</property>
+				  <property name="active">False</property>
+				  <property name="inconsistent">False</property>
+				  <property name="draw_indicator">True</property>
+				  <signal name="toggled" handler="HandleSizeActive" last_modification_time="Sat, 12 Feb 2005 10:29:48 GMT"/>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">False</property>
+				  <property name="fill">False</property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkSpinButton" id="size_spin">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="climb_rate">1</property>
+				  <property name="digits">0</property>
+				  <property name="numeric">False</property>
+				  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+				  <property name="snap_to_ticks">False</property>
+				  <property name="wrap">False</property>
+				  <property name="adjustment">400 0 10000 1 10 10</property>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">False</property>
+				  <property name="fill">False</property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkLabel" id="label153">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">pixels</property>
+				  <property name="use_underline">False</property>
+				  <property name="use_markup">False</property>
+				  <property name="justify">GTK_JUSTIFY_LEFT</property>
+				  <property name="wrap">False</property>
+				  <property name="selectable">False</property>
+				  <property name="xalign">0.5</property>
+				  <property name="yalign">0.5</property>
+				  <property name="xpad">0</property>
+				  <property name="ypad">0</property>
+				  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+				  <property name="width_chars">-1</property>
+				  <property name="single_line_mode">False</property>
+				  <property name="angle">0</property>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">False</property>
+				  <property name="fill">False</property>
+				</packing>
+			      </child>
+
+			      <child>
+				<placeholder/>
+			      </child>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">True</property>
+			      <property name="fill">True</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkCheckButton" id="meta_check">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="label" translatable="yes">Export _titles and comments</property>
+			      <property name="use_underline">True</property>
+			      <property name="relief">GTK_RELIEF_NORMAL</property>
+			      <property name="focus_on_click">True</property>
+			      <property name="active">True</property>
+			      <property name="inconsistent">False</property>
+			      <property name="draw_indicator">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+			</widget>
+		      </child>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label46">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">&lt;b&gt;Style&lt;/b&gt;</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">True</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="type">label_item</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkDialog" id="google_add_album_dialog">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes"></property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="urgency_hint">False</property>
+  <property name="has_separator">False</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox12">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area12">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="cancel_button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-6</property>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="add_button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-add</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-5</property>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkTable" id="table10">
+	  <property name="border_width">12</property>
+	  <property name="visible">True</property>
+	  <property name="n_rows">3</property>
+	  <property name="n_columns">2</property>
+	  <property name="homogeneous">False</property>
+	  <property name="row_spacing">6</property>
+	  <property name="column_spacing">7</property>
+
+	  <child>
+	    <widget class="GtkLabel" id="descroption_label">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">_Description:</property>
+	      <property name="use_underline">True</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">1</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="mnemonic_widget">description_entry</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">0</property>
+	      <property name="right_attach">1</property>
+	      <property name="top_attach">1</property>
+	      <property name="bottom_attach">2</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkEntry" id="description_entry">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="editable">True</property>
+	      <property name="visibility">True</property>
+	      <property name="max_length">0</property>
+	      <property name="text" translatable="yes"></property>
+	      <property name="has_frame">True</property>
+	      <property name="invisible_char">*</property>
+	      <property name="activates_default">False</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">1</property>
+	      <property name="right_attach">2</property>
+	      <property name="top_attach">1</property>
+	      <property name="bottom_attach">2</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="name_label">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">_Album Title:</property>
+	      <property name="use_underline">True</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">1</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="mnemonic_widget">title_entry</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">0</property>
+	      <property name="right_attach">1</property>
+	      <property name="top_attach">0</property>
+	      <property name="bottom_attach">1</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkEntry" id="title_entry">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="editable">True</property>
+	      <property name="visibility">True</property>
+	      <property name="max_length">0</property>
+	      <property name="text" translatable="yes"></property>
+	      <property name="has_frame">True</property>
+	      <property name="invisible_char">*</property>
+	      <property name="activates_default">False</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">1</property>
+	      <property name="right_attach">2</property>
+	      <property name="top_attach">0</property>
+	      <property name="bottom_attach">1</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkCheckButton" id="public_check">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes">Public Album</property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="active">False</property>
+	      <property name="inconsistent">False</property>
+	      <property name="draw_indicator">True</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">1</property>
+	      <property name="right_attach">2</property>
+	      <property name="top_attach">2</property>
+	      <property name="bottom_attach">3</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkDialog" id="gallery_add_album_dialog">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes"></property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="urgency_hint">False</property>
+  <property name="has_separator">False</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox12">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area12">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="cancel_button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-6</property>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="add_button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-add</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-5</property>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkTable" id="table10">
+	  <property name="border_width">12</property>
+	  <property name="visible">True</property>
+	  <property name="n_rows">4</property>
+	  <property name="n_columns">2</property>
+	  <property name="homogeneous">False</property>
+	  <property name="row_spacing">6</property>
+	  <property name="column_spacing">7</property>
+
+	  <child>
+	    <widget class="GtkLabel" id="gallery_label">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">_Parent Album:</property>
+	      <property name="use_underline">True</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">1</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="mnemonic_widget">album_optionmenu</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">0</property>
+	      <property name="right_attach">1</property>
+	      <property name="top_attach">0</property>
+	      <property name="bottom_attach">1</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="password_label">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">_Title:</property>
+	      <property name="use_underline">True</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">1</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="mnemonic_widget">title_entry</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">0</property>
+	      <property name="right_attach">1</property>
+	      <property name="top_attach">3</property>
+	      <property name="bottom_attach">4</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkEntry" id="title_entry">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="editable">True</property>
+	      <property name="visibility">True</property>
+	      <property name="max_length">0</property>
+	      <property name="text" translatable="yes"></property>
+	      <property name="has_frame">True</property>
+	      <property name="invisible_char">*</property>
+	      <property name="activates_default">False</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">1</property>
+	      <property name="right_attach">2</property>
+	      <property name="top_attach">3</property>
+	      <property name="bottom_attach">4</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="descroption_label">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">_Description:</property>
+	      <property name="use_underline">True</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">1</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="mnemonic_widget">description_entry</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">0</property>
+	      <property name="right_attach">1</property>
+	      <property name="top_attach">2</property>
+	      <property name="bottom_attach">3</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkEntry" id="description_entry">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="editable">True</property>
+	      <property name="visibility">True</property>
+	      <property name="max_length">0</property>
+	      <property name="text" translatable="yes"></property>
+	      <property name="has_frame">True</property>
+	      <property name="invisible_char">*</property>
+	      <property name="activates_default">False</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">1</property>
+	      <property name="right_attach">2</property>
+	      <property name="top_attach">2</property>
+	      <property name="bottom_attach">3</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="name_label">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">_Album Name:</property>
+	      <property name="use_underline">True</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">1</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="mnemonic_widget">name_entry</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">0</property>
+	      <property name="right_attach">1</property>
+	      <property name="top_attach">1</property>
+	      <property name="bottom_attach">2</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkEntry" id="name_entry">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="editable">True</property>
+	      <property name="visibility">True</property>
+	      <property name="max_length">0</property>
+	      <property name="text" translatable="yes"></property>
+	      <property name="has_frame">True</property>
+	      <property name="invisible_char">*</property>
+	      <property name="activates_default">False</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">1</property>
+	      <property name="right_attach">2</property>
+	      <property name="top_attach">1</property>
+	      <property name="bottom_attach">2</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkOptionMenu" id="album_optionmenu">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="history">-1</property>
+	      <signal name="changed" handler="HandleChanged" last_modification_time="Sun, 06 Nov 2005 16:52:31 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">1</property>
+	      <property name="right_attach">2</property>
+	      <property name="top_attach">0</property>
+	      <property name="bottom_attach">1</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkDialog" id="google_add_dialog">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes"></property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="urgency_hint">False</property>
+  <property name="has_separator">False</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox12">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area12">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="cancel_button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-6</property>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="remove_button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-remove</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-2</property>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="add_button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-add</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-5</property>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkVBox" id="vbox63">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <widget class="GtkHBox" id="status_area">
+	      <property name="border_width">12</property>
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<widget class="GtkImage" id="image12">
+		  <property name="visible">True</property>
+		  <property name="stock">gtk-dialog-question</property>
+		  <property name="icon_size">6</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">2</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkVBox" id="vbox64">
+		  <property name="border_width">6</property>
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="summary_label">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">&lt;span weight='bold' size='larger'&gt;Error Connecting to Gallery&lt;/span&gt;
+</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">True</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="description_label">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Please verify that the settings for this gallery are correct.</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
 	    </widget>
 	    <packing>
-	      <property name="left_attach">0</property>
-	      <property name="right_attach">1</property>
-	      <property name="top_attach">2</property>
-	      <property name="bottom_attach">3</property>
-	      <property name="x_options">fill</property>
-	      <property name="y_options"></property>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">False</property>
 	    </packing>
 	  </child>
 
 	  <child>
-	    <widget class="GtkEntry" id="description_entry">
+	    <widget class="GtkTable" id="table10">
+	      <property name="border_width">12</property>
 	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="editable">True</property>
-	      <property name="visibility">True</property>
-	      <property name="max_length">0</property>
-	      <property name="text" translatable="yes"></property>
-	      <property name="has_frame">True</property>
-	      <property name="invisible_char">*</property>
-	      <property name="activates_default">False</property>
-	    </widget>
-	    <packing>
-	      <property name="left_attach">1</property>
-	      <property name="right_attach">2</property>
-	      <property name="top_attach">2</property>
-	      <property name="bottom_attach">3</property>
-	      <property name="y_options"></property>
-	    </packing>
-	  </child>
+	      <property name="n_rows">3</property>
+	      <property name="n_columns">2</property>
+	      <property name="homogeneous">False</property>
+	      <property name="row_spacing">6</property>
+	      <property name="column_spacing">7</property>
 
-	  <child>
-	    <widget class="GtkLabel" id="name_label">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">_Album Name:</property>
-	      <property name="use_underline">True</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">1</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">0</property>
-	      <property name="ypad">0</property>
-	      <property name="mnemonic_widget">name_entry</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="left_attach">0</property>
-	      <property name="right_attach">1</property>
-	      <property name="top_attach">1</property>
-	      <property name="bottom_attach">2</property>
-	      <property name="x_options">fill</property>
-	      <property name="y_options"></property>
-	    </packing>
-	  </child>
+	      <child>
+		<widget class="GtkLabel" id="gallery_label">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">_Gallery Name:</property>
+		  <property name="use_underline">True</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">1</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="mnemonic_widget">gallery_entry</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">1</property>
+		  <property name="top_attach">0</property>
+		  <property name="bottom_attach">1</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
 
-	  <child>
-	    <widget class="GtkEntry" id="name_entry">
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="editable">True</property>
-	      <property name="visibility">True</property>
-	      <property name="max_length">0</property>
-	      <property name="text" translatable="yes"></property>
-	      <property name="has_frame">True</property>
-	      <property name="invisible_char">*</property>
-	      <property name="activates_default">False</property>
-	    </widget>
-	    <packing>
-	      <property name="left_attach">1</property>
-	      <property name="right_attach">2</property>
-	      <property name="top_attach">1</property>
-	      <property name="bottom_attach">2</property>
-	      <property name="y_options"></property>
-	    </packing>
-	  </child>
+	      <child>
+		<widget class="GtkEntry" id="gallery_entry">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="editable">True</property>
+		  <property name="visibility">True</property>
+		  <property name="max_length">0</property>
+		  <property name="text" translatable="yes"></property>
+		  <property name="has_frame">True</property>
+		  <property name="invisible_char">*</property>
+		  <property name="activates_default">False</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">1</property>
+		  <property name="right_attach">2</property>
+		  <property name="top_attach">0</property>
+		  <property name="bottom_attach">1</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
 
-	  <child>
-	    <widget class="GtkOptionMenu" id="album_optionmenu">
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="history">-1</property>
-	      <signal name="changed" handler="HandleChanged" last_modification_time="Sun, 06 Nov 2005 16:52:31 GMT"/>
+	      <child>
+		<widget class="GtkLabel" id="password_label">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">_Password:</property>
+		  <property name="use_underline">True</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">1</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="mnemonic_widget">password_entry</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">1</property>
+		  <property name="top_attach">2</property>
+		  <property name="bottom_attach">3</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkEntry" id="password_entry">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="editable">True</property>
+		  <property name="visibility">False</property>
+		  <property name="max_length">0</property>
+		  <property name="text" translatable="yes"></property>
+		  <property name="has_frame">True</property>
+		  <property name="invisible_char">*</property>
+		  <property name="activates_default">False</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">1</property>
+		  <property name="right_attach">2</property>
+		  <property name="top_attach">2</property>
+		  <property name="bottom_attach">3</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="username_label">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">_Username:</property>
+		  <property name="use_underline">True</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">1</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="mnemonic_widget">username_entry</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">1</property>
+		  <property name="top_attach">1</property>
+		  <property name="bottom_attach">2</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkEntry" id="username_entry">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="editable">True</property>
+		  <property name="visibility">True</property>
+		  <property name="max_length">0</property>
+		  <property name="text" translatable="yes"></property>
+		  <property name="has_frame">True</property>
+		  <property name="invisible_char">*</property>
+		  <property name="activates_default">False</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">1</property>
+		  <property name="right_attach">2</property>
+		  <property name="top_attach">1</property>
+		  <property name="bottom_attach">2</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
 	    </widget>
 	    <packing>
-	      <property name="left_attach">1</property>
-	      <property name="right_attach">2</property>
-	      <property name="top_attach">0</property>
-	      <property name="bottom_attach">1</property>
-	      <property name="x_options">fill</property>
-	      <property name="y_options"></property>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
 	    </packing>
 	  </child>
 	</widget>
@@ -7225,6 +8424,15 @@ Photo Details</property>
 			  </child>
 
 			  <child>
+			    <widget class="GtkMenuItem" id="export_to_picasa1">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Export to _Picasa...</property>
+			      <property name="use_underline">True</property>
+			      <signal name="activate" handler="HandleExportToPicasa" last_modification_time="Fri, 28 Jul 2006 09:03:16 GMT"/>
+			    </widget>
+			  </child>
+
+			  <child>
 			    <widget class="GtkMenuItem" id="export_to_gallery">
 			      <property name="visible">True</property>
 			      <property name="label" translatable="yes">Export to _Web Gallery...</property>
@@ -7272,7 +8480,7 @@ Photo Details</property>
 		      <signal name="activate" handler="HandleSendMailCommand" last_modification_time="Mon, 07 Jun 2004 22:31:01 GMT"/>
 
 		      <child internal-child="image">
-			<widget class="GtkImage" id="image40">
+			<widget class="GtkImage" id="image44">
 			  <property name="visible">True</property>
 			  <property name="stock">gnome-stock-mail-fwd</property>
 			  <property name="icon_size">1</property>
@@ -7297,8 +8505,8 @@ Photo Details</property>
 		      <property name="label" translatable="yes">_Close</property>
 		      <property name="use_underline">True</property>
 		      <signal name="activate" handler="HandleCloseCommand" last_modification_time="Tue, 09 Dec 2003 20:59:54 GMT"/>
-		      <accelerator key="q" modifiers="GDK_CONTROL_MASK" signal="activate"/>
 		      <accelerator key="w" modifiers="GDK_CONTROL_MASK" signal="activate"/>
+		      <accelerator key="q" modifiers="GDK_CONTROL_MASK" signal="activate"/>
 		    </widget>
 		  </child>
 		</widget>
@@ -7635,7 +8843,7 @@ Photo Details</property>
 			      <property name="visible">True</property>
 			      <property name="label" translatable="yes">_Folder</property>
 			      <property name="use_underline">True</property>
-			      <property name="active">False</property>
+			      <property name="active">True</property>
 			      <property name="group">month</property>
 			      <signal name="activate" handler="HandleArrangeByDirectory" last_modification_time="Fri, 20 Aug 2004 22:26:32 GMT"/>
 			    </widget>
--- /dev/null	2006-08-02 08:53:16.412264250 +0200
+++ src/GoogleExport.cs	2006-08-02 11:58:02.000000000 +0200
@@ -0,0 +1,810 @@
+/*
+ * GoogleExport.cs
+ *
+ * Authors:
+ *   Stephane Delcroix <stephane@delcroix.org>
+ *
+ * Copyright (C) 2006 Stephane Delcroix
+ */
+
+using System;
+using System.Net;
+using System.IO;
+using System.Text;
+using System.Collections;
+using System.Collections.Specialized;
+using System.Web;
+using Mono.Unix;
+
+using Mono.Google;
+using Mono.Google.Picasa;
+
+namespace FSpot {
+	public class GoogleAccount {
+
+		private string name;
+		private string username;
+		private string password;
+		private bool connected;
+		private GoogleConnection connection;
+		private PicasaWeb picasa;
+
+		public GoogleAccount (string name, string username, string password)
+		{
+			this.name = name;
+			this.username = username;
+			this.password = password;
+		}
+
+		public PicasaWeb Connect ()
+		{
+			System.Console.WriteLine ("GoogleAccount.Connect()");
+			GoogleConnection conn = new GoogleConnection (GoogleService.Picasa);
+			ServicePointManager.CertificatePolicy = new NoCheckCertificatePolicy ();
+			conn.Authenticate(username, password);
+			connection = conn;
+			PicasaWeb picasa = new PicasaWeb(conn);
+			this.picasa = picasa;
+			return picasa;
+		}
+
+		private void MarkChanged()
+		{
+			connection = null;
+			connected = false;
+		}
+
+		public bool Connected {
+			get {
+				return (connection != null);
+			}
+		}
+
+		public string Name {
+			get {
+				return name;
+			}
+			set {
+				name = value;
+			}
+		}
+		
+		public string Username {
+			get {
+				return username;
+			}
+			set {
+				if (username != value) {
+					username = value;
+					MarkChanged ();
+				}
+			}
+		}
+
+		public string Password {
+			get {
+				return password;
+			}
+			set {
+				if (password != value) {
+					password = value;
+					MarkChanged ();
+				}
+			}
+		}
+
+		public PicasaWeb Picasa {
+			get {
+				return picasa;
+			}
+		}
+	}
+
+	
+	public class GoogleAccountManager 
+	{
+		private static GoogleAccountManager instance;
+		string xml_path;
+		ArrayList accounts;
+
+		public delegate void AccountListChangedHandler (GoogleAccountManager manager, GoogleAccount changed_account);
+		public event AccountListChangedHandler AccountListChanged;
+		
+		public static GoogleAccountManager GetInstance ()
+		{
+			if (instance == null) {
+				instance = new GoogleAccountManager ();
+			}
+
+			return instance;
+		}
+
+		private GoogleAccountManager ()
+		{
+			// FIXME this xml file path should be be retrieved from a central location not hard coded there
+			this.xml_path = System.IO.Path.Combine (FSpot.Global.BaseDirectory, "GoogleAccounts.xml");
+			
+			accounts = new ArrayList ();
+			ReadAccounts ();
+		}	
+
+		public void MarkChanged ()
+		{
+			MarkChanged (true, null);
+		}
+
+		public void MarkChanged (bool write, GoogleAccount changed_account)
+		{
+			if (write)
+				WriteAccounts ();
+
+			if (AccountListChanged != null)
+				AccountListChanged (this, changed_account);
+		}
+
+		public ArrayList GetAccounts ()
+		{
+			return accounts;
+		}
+
+		public void AddAccount (GoogleAccount account)
+		{
+			AddAccount (account, true);
+		}
+
+		public void AddAccount (GoogleAccount account, bool write)
+		{
+			accounts.Add (account);
+			MarkChanged (write, account);
+		}
+
+		public void RemoveAccount (GoogleAccount account)
+		{
+			accounts.Remove (account);
+			MarkChanged ();
+		}
+
+		public void WriteAccounts ()
+		{
+			System.Xml.XmlTextWriter writer = new System.Xml.XmlTextWriter (xml_path, System.Text.Encoding.Default);
+			
+			writer.Formatting = System.Xml.Formatting.Indented;
+			writer.Indentation = 2;
+			writer.IndentChar = ' ';
+
+			writer.WriteStartDocument (true);
+			
+			writer.WriteStartElement ("PicasaWeb");
+			foreach (GoogleAccount account in accounts) {
+				writer.WriteStartElement ("Account");
+				writer.WriteElementString ("Name", account.Name);
+				
+				writer.WriteElementString ("Username", account.Username);
+				writer.WriteElementString ("Password", account.Password);
+				writer.WriteEndElement (); //Account
+			}
+			writer.WriteEndElement ();
+			writer.WriteEndDocument ();
+			writer.Close ();
+		}
+
+		private GoogleAccount ParseAccount (System.Xml.XmlNode node) 
+		{
+			if (node.Name != "Account")
+				
+				return null;
+
+			string name = null;
+			string username = null;
+			string password = null;
+
+			foreach (System.Xml.XmlNode child in node.ChildNodes) {
+				if (child.Name == "Name") {
+					name = child.ChildNodes [0].Value;
+				
+				} else if (child.Name == "Password") {
+					password = child.ChildNodes [0].Value;
+				} else if (child.Name == "Username") {
+					username = child.ChildNodes [0].Value;
+				}
+			}
+			return new GoogleAccount (name, username, password);
+		}
+
+		private void ReadAccounts ()
+		{
+
+			if (! File.Exists (xml_path)) {
+				MarkChanged ();
+				return;
+			}
+
+			try {
+				string query = "//PicasaWeb/Account";
+				System.Xml.XmlDocument doc = new System.Xml.XmlDocument ();
+				
+				//System.Console.WriteLine ("xml_path: " + xml_path);
+				doc.Load (xml_path);
+				System.Xml.XmlNodeList nodes = doc.SelectNodes (query);
+				
+				//System.Console.WriteLine ("selected {0} nodes match {1}", nodes.Count, query);
+				foreach (System.Xml.XmlNode node in nodes) {
+					GoogleAccount account = ParseAccount (node);
+					if (account != null)
+						AddAccount (account, false);
+				
+				}
+			} catch (System.Exception e) {
+				// FIXME do something
+				System.Console.WriteLine ("Exception loading Google accounts");
+				System.Console.WriteLine (e);
+			}
+
+			MarkChanged ();
+		}
+	}
+	
+	public class GoogleAccountDialog : GladeDialog {
+		public GoogleAccountDialog (Gtk.Window parent) : this (parent, null, false) { 
+			Dialog.Response += HandleAddResponse;
+			add_button.Sensitive = false;
+		}
+		
+		public GoogleAccountDialog (Gtk.Window parent, GoogleAccount account, bool show_error) :  base ("google_add_dialog")
+		{
+			this.Dialog.Modal = false;
+			this.Dialog.TransientFor = parent;
+			this.Dialog.DefaultResponse = Gtk.ResponseType.Ok;
+			
+			this.account = account;
+
+			status_area.Visible = show_error;
+
+			if (account != null) {
+				gallery_entry.Text = account.Name;
+				password_entry.Text = account.Password;
+				username_entry.Text = account.Username;
+				add_button.Label = Gtk.Stock.Ok;
+				Dialog.Response += HandleEditResponse;
+			}
+
+			if (remove_button != null)
+				remove_button.Visible = account != null;
+
+			this.Dialog.Show ();
+
+			gallery_entry.Changed += HandleChanged;
+			password_entry.Changed += HandleChanged;
+			username_entry.Changed += HandleChanged;
+			HandleChanged (null, null);
+		}
+
+		private void HandleChanged (object sender, System.EventArgs args)
+		{
+			name = gallery_entry.Text;
+			password = password_entry.Text;
+			username = username_entry.Text;
+
+			if (name == "" || password == "" || username == "")
+				add_button.Sensitive = false;
+			else
+				add_button.Sensitive = true;
+
+		}
+		
+		[GLib.ConnectBefore]
+		protected void HandleAddResponse (object sender, Gtk.ResponseArgs args)
+		{
+			if (args.ResponseId == Gtk.ResponseType.Ok) {
+				GoogleAccount account = new GoogleAccount (name, 
+									     username,
+									     password);
+				GoogleAccountManager.GetInstance ().AddAccount (account);
+			}
+			Dialog.Destroy ();
+		}
+
+		protected void HandleEditResponse (object sender, Gtk.ResponseArgs args)
+		{
+			if (args.ResponseId == Gtk.ResponseType.Ok) {
+				account.Name = name;
+				account.Username = username;
+				account.Password = password;
+				GoogleAccountManager.GetInstance ().MarkChanged (true, account);
+			} else if (args.ResponseId == Gtk.ResponseType.Reject) {
+				// NOTE we are using Reject to signal the remove action.
+				GoogleAccountManager.GetInstance ().RemoveAccount (account);
+			}
+			Dialog.Destroy ();				
+		}
+
+		private GoogleAccount account;
+		private string name;
+		private string password;
+		private string username;
+
+		// widgets 
+		[Glade.Widget] Gtk.Entry password_entry;
+		[Glade.Widget] Gtk.Entry gallery_entry;
+		[Glade.Widget] Gtk.Entry username_entry;
+
+		[Glade.Widget] Gtk.Button add_button;
+		[Glade.Widget] Gtk.Button remove_button;
+		[Glade.Widget] Gtk.Button cancel_button;
+
+		[Glade.Widget] Gtk.HBox status_area;
+	}
+
+	public class GoogleAddAlbum : GladeDialog {
+		[Glade.Widget] Gtk.OptionMenu album_optionmenu;
+
+		[Glade.Widget] Gtk.Entry title_entry;
+		[Glade.Widget] Gtk.Entry description_entry;
+		[Glade.Widget] Gtk.CheckButton public_check;
+		
+		[Glade.Widget] Gtk.Button add_button;
+		[Glade.Widget] Gtk.Button cancel_button;
+
+		private GoogleExport export;
+		private PicasaWeb picasa;
+		private string description;
+		private string title;
+		private bool public_album;
+
+		public GoogleAddAlbum (GoogleExport export, PicasaWeb picasa) : base ("google_add_album_dialog")
+		{
+			this.export = export;
+			this.picasa = picasa;	
+			PopulateAlbums ();
+			
+			Dialog.Response += HandleAddResponse;
+
+			description_entry.Changed += HandleChanged;
+			title_entry.Changed += HandleChanged;
+			HandleChanged (null, null);
+		}
+		
+		private void PopulateAlbums ()
+		{
+//			Gtk.Menu menu = new Gtk.Menu ();
+//			Gtk.MenuItem top_item = new Gtk.MenuItem (Mono.Posix.Catalog.GetString ("(TopLevel)"));
+//			menu.Append (top_item);
+//
+//			PicasaAlbumCollection albums = picasa.GetAlbums();
+//
+//			foreach (PicasaAlbum album in albums.AllValues) {
+//				System.Text.StringBuilder label_builder = new System.Text.StringBuilder ();
+//				
+//				label_builder.Append (album.Title);
+//				
+//				Gtk.MenuItem item = new Gtk.MenuItem (label_builder.ToString ());
+//				((Gtk.Label)item.Child).UseUnderline = false;
+//				menu.Append (item);
+//			}
+//
+//			album_optionmenu.Sensitive = true;
+//			menu.ShowAll ();
+//			album_optionmenu.Menu = menu;
+		}
+		
+		private void HandleChanged (object sender, EventArgs args)
+		{
+			description = description_entry.Text;
+			title = title_entry.Text;
+			public_album = public_check.Active;
+
+			if (title == "")
+				add_button.Sensitive = false;
+			else
+				add_button.Sensitive = true;
+		}
+		
+		[GLib.ConnectBefore]
+		protected void HandleAddResponse (object sender, Gtk.ResponseArgs args)
+		{
+			if (args.ResponseId == Gtk.ResponseType.Ok) {
+				public_album = public_check.Active;
+
+				if (public_album)
+					picasa.CreateAlbum (title, description, AlbumAccess.Public);
+				else	
+					picasa.CreateAlbum (title, description, AlbumAccess.Private);
+				export.HandleAlbumAdded (title);
+			}
+			Dialog.Destroy ();
+		}
+	}
+
+	
+	public class GoogleExport : GladeDialog {
+		public GoogleExport (IBrowsableCollection selection) : base ("google_export_dialog")
+		{
+			this.photos = (Photo []) selection.Items;
+			album_button.Sensitive = false;
+			IconView view = new IconView (selection);
+			view.DisplayDates = false;
+			view.DisplayTags = false;
+
+			Dialog.Modal = false;
+			Dialog.TransientFor = null;
+
+			thumb_scrolledwindow.Add (view);
+			view.Show ();
+			Dialog.Show ();
+
+
+			GoogleAccountManager manager = GoogleAccountManager.GetInstance ();
+			manager.AccountListChanged += PopulateGoogleOptionMenu;
+			PopulateGoogleOptionMenu (manager, null);
+
+			if (edit_button != null)
+				edit_button.Clicked += HandleEditGallery;
+			
+			rh = new Gtk.ResponseHandler (HandleResponse);
+			Dialog.Response += HandleResponse;
+			connect = true;
+			HandleSizeActive (null, null);
+			Connect ();
+
+			LoadPreference (Preferences.EXPORT_GOOGLE_SCALE);
+			LoadPreference (Preferences.EXPORT_GOOGLE_SIZE);
+			LoadPreference (Preferences.EXPORT_GOOGLE_ROTATE);
+			LoadPreference (Preferences.EXPORT_GOOGLE_BROWSER);
+//			LoadPreference (Preferences.EXPORT_GOOGLE_META);
+		}
+		
+		Gtk.ResponseHandler rh;
+		
+		private bool scale;
+		private int size;
+		private bool browser;
+		private bool rotate;
+//		private bool meta;
+		private bool connect = false;
+
+		Photo [] photos;
+		int photo_index;
+		FSpot.ThreadProgressDialog progress_dialog;
+		
+		ArrayList accounts;
+		private GoogleAccount account;
+		private PicasaAlbum album;
+
+		private string xml_path;
+
+		// Dialogs
+		private GoogleAccountDialog gallery_add;
+		private GoogleAddAlbum album_add;
+
+		// Widgets
+		[Glade.Widget] Gtk.OptionMenu gallery_optionmenu;
+		[Glade.Widget] Gtk.OptionMenu album_optionmenu;
+		
+		[Glade.Widget] Gtk.Entry width_entry;
+		[Glade.Widget] Gtk.Entry height_entry;
+
+		[Glade.Widget] Gtk.CheckButton browser_check;
+		[Glade.Widget] Gtk.CheckButton scale_check;
+		[Glade.Widget] Gtk.CheckButton rotate_check;
+//		[Glade.Widget] Gtk.CheckButton meta_check;
+		
+		[Glade.Widget] Gtk.SpinButton size_spin;
+
+		[Glade.Widget] Gtk.Button album_button;
+		[Glade.Widget] Gtk.Button add_button;
+		[Glade.Widget] Gtk.Button edit_button;
+		
+		[Glade.Widget] Gtk.Button ok_button;
+		[Glade.Widget] Gtk.Button cancel_button;
+
+		[Glade.Widget] Gtk.ScrolledWindow thumb_scrolledwindow;
+
+		System.Threading.Thread command_thread;
+		
+
+		private void HandleResponse (object sender, Gtk.ResponseArgs args)
+		{
+			if (args.ResponseId != Gtk.ResponseType.Ok) {
+				Dialog.Destroy ();
+				return;
+			}
+
+			if (scale_check != null) {
+				scale = scale_check.Active;
+				size = size_spin.ValueAsInt;
+			} else
+				scale = false;
+
+			browser = browser_check.Active;
+			rotate = rotate_check.Active;
+//			meta = meta_check.Active;
+
+			if (account != null) { 
+				//System.Console.WriteLine ("history = {0}", album_optionmenu.History);
+				album = (PicasaAlbum) account.Picasa.GetAlbums() [Math.Max (0, album_optionmenu.History)]; 
+				photo_index = 0;
+				
+				Dialog.Destroy ();
+
+				command_thread = new System.Threading.Thread (new System.Threading.ThreadStart (this.Upload));
+				command_thread.Name = Mono.Posix.Catalog.GetString ("Uploading Pictures");
+				
+				progress_dialog = new FSpot.ThreadProgressDialog (command_thread, photos.Length);
+				progress_dialog.Start ();
+
+				// Save these settings for next time
+				Preferences.Set (Preferences.EXPORT_GOOGLE_SCALE, scale);
+				Preferences.Set (Preferences.EXPORT_GOOGLE_SIZE, size);
+				Preferences.Set (Preferences.EXPORT_GOOGLE_ROTATE, rotate);
+				Preferences.Set (Preferences.EXPORT_GOOGLE_BROWSER, browser);
+//				Preferences.Set (Preferences.EXPORT_GALLERY_META, meta);
+			}
+		}
+		
+		private void HandleProgressChanged (ProgressItem item)
+		{
+			//System.Console.WriteLine ("Changed value = {0}", item.Value);
+			progress_dialog.Fraction = (photo_index - 1.0 + item.Value) / (double) photos.Length;
+		}
+
+		public void HandleSizeActive (object sender, EventArgs args)
+		{
+			size_spin.Sensitive = scale_check.Active;
+		}
+
+		private void Upload ()
+		{
+			try {
+//				account.Gallery.Progress = new ProgressItem ();
+//				account.Gallery.Progress.Changed += HandleProgressChanged;
+
+				System.Console.WriteLine ("Starting upload");
+				while (photo_index < photos.Length) {
+					Photo photo = photos [photo_index];
+
+					System.Console.WriteLine ("uploading {0}", photo_index);
+
+					progress_dialog.Message = System.String.Format (Mono.Posix.Catalog.GetString ("Uploading picture \"{0}\""), photo.Name);
+					progress_dialog.Fraction = photo_index / (double) photos.Length;
+					photo_index++;
+
+					progress_dialog.ProgressText = System.String.Format (Mono.Posix.Catalog.GetString ("{0} of {1}"), photo_index, photos.Length);
+					
+					if (scale) {
+						/* FIXME this is sick */
+						string orig = photo.DefaultVersionUri.LocalPath;
+						string path = PixbufUtils.Resize (orig, size, true);
+						string final = path + System.IO.Path.GetExtension (orig);
+						System.IO.File.Move (path, final);
+						album.UploadPicture (final);
+						System.IO.File.Delete (final);
+					} else if (rotate){
+						string orig = photo.DefaultVersionUri.LocalPath;
+						string path = System.IO.Path.GetTempFileName();
+						Exif.ExifData exif_data = new Exif.ExifData(orig);
+						PixbufOrientation orientation = PixbufUtils.GetOrientation (exif_data);
+						if (orientation == PixbufOrientation.RightTop)
+							JpegUtils.Transform (orig, path, JpegUtils.TransformType.Rotate90);
+						else if (orientation == PixbufOrientation.LeftBottom)
+							JpegUtils.Transform (orig, path, JpegUtils.TransformType.Rotate270);
+						else
+							File.Copy(orig, path, true);
+						string final = path + System.IO.Path.GetExtension (orig);
+						System.IO.File.Move (path, final);
+						album.UploadPicture (final);
+						System.IO.File.Delete (final);
+					} else {
+						album.UploadPicture (photo.DefaultVersionUri.LocalPath);
+					}
+				}
+
+				progress_dialog.Message = Mono.Posix.Catalog.GetString ("Done Sending Photos");
+				progress_dialog.Fraction = 1.0;
+				progress_dialog.ProgressText = Mono.Posix.Catalog.GetString ("Upload Complete");
+				progress_dialog.ButtonLabel = Gtk.Stock.Ok;
+			} catch (System.Exception e) {
+				progress_dialog.Message = String.Format (Mono.Posix.Catalog.GetString ("Error Uploading To Gallery: {0}"),
+									 e.Message);
+				progress_dialog.ProgressText = Mono.Posix.Catalog.GetString ("Error");
+				System.Console.WriteLine (e);
+			}
+			
+			if (browser) {
+				//GnomeUtil.UrlShow (null, album.GetUrl());
+			}
+		}
+		
+		private void PopulateGoogleOptionMenu (GoogleAccountManager manager, GoogleAccount changed_account)
+		{
+			Gtk.Menu menu = new Gtk.Menu ();
+			this.account = changed_account;
+			int pos = -1;
+
+			accounts = manager.GetAccounts ();
+			if (accounts == null || accounts.Count == 0) {
+				Gtk.MenuItem item = new Gtk.MenuItem (Mono.Posix.Catalog.GetString ("(No Gallery)"));
+				menu.Append (item);
+				gallery_optionmenu.Sensitive = false;
+				edit_button.Sensitive = false;
+			} else {
+				int i = 0;
+				foreach (GoogleAccount account in accounts) {
+					if (account == changed_account)
+						pos = i;
+					
+					Gtk.MenuItem item = new Gtk.MenuItem (account.Name);
+					menu.Append (item);		
+					i++;
+				}
+				gallery_optionmenu.Sensitive = true;
+				edit_button.Sensitive = true;
+			}
+
+			menu.ShowAll ();
+			gallery_optionmenu.Menu = menu;
+			gallery_optionmenu.SetHistory ((uint)pos);
+		}
+
+		private void Connect ()
+		{
+			Connect (null);
+		}
+
+		private void Connect (GoogleAccount selected)
+		{
+			try {
+				if (accounts.Count != 0 && connect) {
+					if (selected == null)
+						account = (GoogleAccount) accounts [gallery_optionmenu.History];
+					else
+						account = selected;
+
+					if (!account.Connected)
+						account.Connect ();
+					
+					PopulateAlbumOptionMenu (account.Picasa);
+					album_button.Sensitive = true;
+				}
+			} catch (System.Exception ex) {
+				if (selected != null)
+					account = selected;
+
+				System.Console.WriteLine ("{0}",ex);
+				PopulateAlbumOptionMenu (account.Picasa);
+				album_button.Sensitive = false;
+				
+				GoogleAccountDialog dialog = new GoogleAccountDialog (this.Dialog, account, true);
+				Gtk.ResponseType response = (Gtk.ResponseType) dialog.Dialog.Run ();
+
+				if (response == Gtk.ResponseType.Ok) {
+					Connect (account);					
+				}
+			} 
+		}
+
+		private void HandleAccountSelected (object sender, System.EventArgs args)
+		{
+			Connect ();
+		}
+
+		public void HandleAlbumAdded (string title) {
+			GoogleAccount account = (GoogleAccount) accounts [gallery_optionmenu.History];
+			PopulateAlbumOptionMenu (account.Picasa);
+				
+			// make the newly created album selected
+			PicasaAlbumCollection albums = account.Picasa.GetAlbums();
+			for (int i=0; i < albums.Count; i++) {
+				if (((PicasaAlbum)albums[i]).Title == title) {
+					album_optionmenu.SetHistory((uint)i);
+				}
+			}
+		}
+
+		private void PopulateAlbumOptionMenu (PicasaWeb picasa)
+		{
+			PicasaAlbumCollection albums = null;
+			if (picasa != null) {
+				//gallery.FetchAlbumsPrune ();
+				albums = picasa.GetAlbums();
+			}
+
+			Gtk.Menu menu = new Gtk.Menu ();
+
+			bool disconnected = picasa == null || !account.Connected || albums == null;
+
+			if (disconnected || albums.Count == 0) {
+				string msg = disconnected ? Mono.Posix.Catalog.GetString ("(Not Connected)") 
+					: Mono.Posix.Catalog.GetString ("(No Albums)");
+
+				Gtk.MenuItem item = new Gtk.MenuItem (msg);
+				menu.Append (item);
+
+				ok_button.Sensitive = false;
+				album_optionmenu.Sensitive = false;
+				album_button.Sensitive = false;
+
+				if (disconnected) 
+					album_button.Sensitive = false;
+			} else {
+				foreach (PicasaAlbum album in albums.AllValues) {
+					System.Text.StringBuilder label_builder = new System.Text.StringBuilder ();
+					
+//					for (int i=0; i < album.Parents.Count; i++) {
+//						label_builder.Append ("  ");
+//					}
+					label_builder.Append (album.Title);
+
+					Gtk.MenuItem item = new Gtk.MenuItem (label_builder.ToString ());
+					((Gtk.Label)item.Child).UseUnderline = false;
+					menu.Append (item);
+			
+				        //AlbumPermission add_permission = album.Perms & AlbumPermission.Add;
+
+//					if (add_permission == 0)
+//						item.Sensitive = false;
+				}
+
+				ok_button.Sensitive = photos.Length > 0;
+				album_optionmenu.Sensitive = true;
+				album_button.Sensitive = true;
+			}
+
+			menu.ShowAll ();
+			album_optionmenu.Menu = menu;
+		}
+		
+		public void HandleAddGallery (object sender, System.EventArgs args)
+		{
+			gallery_add = new GoogleAccountDialog (this.Dialog);
+		}
+		
+		public void HandleEditGallery (object sender, System.EventArgs args)
+		{
+			gallery_add = new GoogleAccountDialog (this.Dialog, account, false);
+		}
+
+		public void HandleAddAlbum (object sender, System.EventArgs args)
+		{
+			if (account == null)
+				throw new Exception (Catalog.GetString ("No account selected"));
+				
+			album_add = new GoogleAddAlbum (this, account.Picasa);
+		}
+
+		void LoadPreference (string key)
+		{
+			object val = Preferences.Get (key);
+
+			if (val == null)
+				return;
+			
+			//System.Console.WriteLine ("Setting {0} to {1}", key, val);
+
+			switch (key) {
+			case Preferences.EXPORT_GOOGLE_SCALE:
+				if (scale_check.Active != (bool) val)
+					scale_check.Active = (bool) val;
+				break;
+
+			case Preferences.EXPORT_GOOGLE_SIZE:
+				size_spin.Value = (double) (int) val;
+				break;
+			
+			case Preferences.EXPORT_GOOGLE_BROWSER:
+				if (browser_check.Active != (bool) val)
+					browser_check.Active = (bool) val;
+				break;
+			
+			case Preferences.EXPORT_GOOGLE_ROTATE:
+				if (rotate_check.Active != (bool) val)
+					rotate_check.Active = (bool) val;
+				break;
+			
+//			case Preferences.EXPORT_GALLERY_META:
+//				if (meta_check.Active != (bool) val)
+//					meta_check.Active = (bool) val;
+//				break;
+			}
+		}
+	}
+}
