diff -u -p -r1.86 rhythmbox.schemas
--- data/rhythmbox.schemas	9 Dec 2006 00:38:40 -0000	1.86
+++ data/rhythmbox.schemas	11 Dec 2006 10:56:31 -0000
@@ -890,50 +890,6 @@
 	</locale>
       </schema>
       <schema>
-        <key>/schemas/apps/rhythmbox/plugins/magnatune/cc_number</key>
-        <applyto>/apps/rhythmbox/plugins/magnatune/cc_number</applyto>
-        <owner>rhythmbox</owner>
-        <type>string</type>
-        <default></default>
-        <locale name="C">
-        <short>The user's credit card number.</short>
-	<long>The user's credit card number. Visa/Mastercard only.</long>
-	</locale>
-      </schema>
-      <schema>
-        <key>/schemas/apps/rhythmbox/plugins/magnatune/cc_month</key>
-        <applyto>/apps/rhythmbox/plugins/magnatune/cc_month</applyto>
-        <owner>rhythmbox</owner>
-        <type>string</type>
-        <default></default>
-        <locale name="C">
-        <short>Expiry month of the user's credit card.</short>
-	<long>Expiry month of the user's credit card.</long>
-	</locale>
-      </schema>
-      <schema>
-        <key>/schemas/apps/rhythmbox/plugins/magnatune/cc_year</key>
-        <applyto>/apps/rhythmbox/plugins/magnatune/cc_year</applyto>
-        <owner>rhythmbox</owner>
-        <type>string</type>
-        <default></default>
-        <locale name="C">
-        <short>Expiry year of the user's credit card.</short>
-	<long>Expiry year of the user's credit card.</long>
-	</locale>
-      </schema>
-      <schema>
-        <key>/schemas/apps/rhythmbox/plugins/magnatune/email</key>
-        <applyto>/apps/rhythmbox/plugins/magnatune/email</applyto>
-        <owner>rhythmbox</owner>
-        <type>string</type>
-        <default></default>
-        <locale name="C">
-        <short>User's email address.</short>
-	<long>User's email address.</long>
-	</locale>
-      </schema>
-      <schema>
         <key>/schemas/apps/rhythmbox/plugins/magnatune/format</key>
         <applyto>/apps/rhythmbox/plugins/magnatune/format</applyto>
         <owner>rhythmbox</owner>
@@ -942,28 +898,6 @@
         <locale name="C">
         <short>Desired format of downloaded audio.</short>
 	<long>Desired format of downloaded audio. Valid values are: ogg, flac, wav, mp3-vbr, mp3-cbr</long>
-	</locale>
-      </schema>
-      <schema>
-        <key>/schemas/apps/rhythmbox/plugins/magnatune/forget</key>
-        <applyto>/apps/rhythmbox/plugins/magnatune/forget</applyto>
-        <owner>rhythmbox</owner>
-        <type>bool</type>
-        <default>FALSE</default>
-        <locale name="C">
-        <short>True if the user's credit card information should not be stored.</short>
-	<long>True if the user's credit card information should not be stored.</long>
-	</locale>
-      </schema>
-      <schema>
-        <key>/schemas/apps/rhythmbox/plugins/magnatune/name</key>
-        <applyto>/apps/rhythmbox/plugins/magnatune/name</applyto>
-        <owner>rhythmbox</owner>
-        <type>string</type>
-        <default></default>
-        <locale name="C">
-        <short>User's name.</short>
-	<long>User's name.</long>
 	</locale>
       </schema>
       <schema>
diff -u -p -r1.32 rb-util.c
--- lib/rb-util.c	2 Oct 2006 14:04:19 -0000	1.32
+++ lib/rb-util.c	11 Dec 2006 10:56:31 -0000
@@ -404,15 +404,29 @@ purge_useless_threads (gpointer data)
 	return TRUE;
 }
 
+
+static GStaticRecMutex rb_gdk_mutex;
+
+static void
+_threads_enter (void)
+{
+	g_static_rec_mutex_lock (&rb_gdk_mutex);
+}
+
+static void
+_threads_leave (void)
+{
+	g_static_rec_mutex_unlock (&rb_gdk_mutex);
+}
+
 void
 rb_threads_init (void)
 {
 	private_is_primary_thread = g_private_new (NULL);
 	g_private_set (private_is_primary_thread, GUINT_TO_POINTER (1));
 
-	/* not really necessary, but in case it does something besides
-	 * set up lock functions some day..
-	 */
+	g_static_rec_mutex_init (&rb_gdk_mutex);
+	gdk_threads_set_lock_functions (_threads_enter, _threads_leave);
 	gdk_threads_init ();
 
 	/* purge useless thread-pool threads occasionally */
diff -u -p -r1.3 magnatune-prefs.glade
--- plugins/magnatune/magnatune-prefs.glade	9 Dec 2006 00:38:41 -0000	1.3
+++ plugins/magnatune/magnatune-prefs.glade	11 Dec 2006 10:56:31 -0000
@@ -77,8 +77,7 @@
 	  </child>
 
 	  <child>
-	    <widget class="GtkVBox" id="vbox2">
-	      <property name="visible">True</property>
+	    <widget class="GtkVBox" id="cc_details_box">
 	      <property name="homogeneous">False</property>
 	      <property name="spacing">6</property>
 
@@ -139,338 +138,346 @@
 		  </child>
 
 		  <child>
-		    <widget class="GtkVBox" id="vbox13">
+		    <widget class="GtkFrame" id="frame1">
 		      <property name="visible">True</property>
-		      <property name="homogeneous">False</property>
-		      <property name="spacing">6</property>
+		      <property name="label_xalign">0</property>
+		      <property name="label_yalign">0.5</property>
+		      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
 
 		      <child>
-			<widget class="GtkTable" id="table1">
+			<widget class="GtkAlignment" id="alignment1">
 			  <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">12</property>
-
-			  <child>
-			    <widget class="GtkLabel" id="username_label">
-			      <property name="visible">True</property>
-			      <property name="label" translatable="yes">_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">0</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">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>
-			      <signal name="changed" handler="rb_magnatune_name_entry_changed_cb" last_modification_time="Mon, 26 Jun 2006 19:58:32 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="y_options"></property>
-			    </packing>
-			  </child>
+			  <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">6</property>
+			  <property name="bottom_padding">6</property>
+			  <property name="left_padding">12</property>
+			  <property name="right_padding">6</property>
 
 			  <child>
-			    <widget class="GtkEntry" id="email_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>
-			      <signal name="changed" handler="rb_magnatune_email_entry_changed_cb" last_modification_time="Mon, 26 Jun 2006 19:58:51 GMT"/>
-			    </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="password_label">
-			      <property name="visible">True</property>
-			      <property name="label" translatable="yes">_Email:</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</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			      <property name="mnemonic_widget">email_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="cc_label">
-			      <property name="visible">True</property>
-			      <property name="label" translatable="yes">C_redit Card:</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</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			      <property name="mnemonic_widget">cc_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="cc_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>
-			      <signal name="changed" handler="rb_magnatune_cc_entry_changed_cb" last_modification_time="Mon, 26 Jun 2006 19:55:57 GMT"/>
-			    </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="GtkHBox" id="hbox20">
+			    <widget class="GtkTable" id="table1">
 			      <property name="visible">True</property>
+			      <property name="n_rows">4</property>
+			      <property name="n_columns">2</property>
 			      <property name="homogeneous">False</property>
-			      <property name="spacing">0</property>
+			      <property name="row_spacing">6</property>
+			      <property name="column_spacing">12</property>
 
 			      <child>
-				<widget class="GtkLabel" id="mm_label">
+				<widget class="GtkLabel" id="username_label">
 				  <property name="visible">True</property>
-				  <property name="label" translatable="yes">_Month:</property>
+				  <property name="label" translatable="yes">_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">0.5</property>
+				  <property name="xalign">0</property>
 				  <property name="yalign">0.5</property>
-				  <property name="xpad">8</property>
+				  <property name="xpad">0</property>
 				  <property name="ypad">0</property>
-				  <property name="mnemonic_widget">mm_entry</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="padding">0</property>
-				  <property name="expand">False</property>
-				  <property name="fill">False</property>
+				  <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="GtkComboBox" id="mm_entry">
+				<widget class="GtkEntry" id="name_entry">
 				  <property name="visible">True</property>
-				  <property name="items" translatable="yes">01
-02
-03
-04
-05
-06
-07
-08
-09
-10
-11
-12</property>
-				  <property name="add_tearoffs">False</property>
-				  <property name="focus_on_click">True</property>
-				  <signal name="changed" handler="rb_magnatune_mm_entry_changed_cb" last_modification_time="Sat, 26 Aug 2006 18:57:16 GMT"/>
+				  <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>
+				  <signal name="changed" handler="rb_magnatune_name_entry_changed_cb" last_modification_time="Mon, 26 Jun 2006 19:58:32 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="y_options"></property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkEntry" id="email_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>
+				  <signal name="changed" handler="rb_magnatune_email_entry_changed_cb" last_modification_time="Mon, 26 Jun 2006 19:58:51 GMT"/>
+				</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="password_label">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">_Email:</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</property>
+				  <property name="yalign">0.5</property>
+				  <property name="xpad">0</property>
+				  <property name="ypad">0</property>
+				  <property name="mnemonic_widget">email_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="padding">0</property>
-				  <property name="expand">False</property>
-				  <property name="fill">True</property>
+				  <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="yy_label">
+				<widget class="GtkLabel" id="cc_label">
 				  <property name="visible">True</property>
-				  <property name="label" translatable="yes">_Year:</property>
+				  <property name="label" translatable="yes">C_redit Card:</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="xalign">0</property>
 				  <property name="yalign">0.5</property>
-				  <property name="xpad">8</property>
+				  <property name="xpad">0</property>
 				  <property name="ypad">0</property>
-				  <property name="mnemonic_widget">yy_entry</property>
+				  <property name="mnemonic_widget">cc_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="padding">0</property>
-				  <property name="expand">False</property>
-				  <property name="fill">False</property>
+				  <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="yy_entry">
+				<widget class="GtkEntry" id="cc_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">2</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>
-				  <signal name="changed" handler="rb_magnatune_yy_entry_changed_cb" last_modification_time="Sat, 26 Aug 2006 18:56:35 GMT"/>
+				  <signal name="changed" handler="rb_magnatune_cc_entry_changed_cb" last_modification_time="Mon, 26 Jun 2006 19:55:57 GMT"/>
 				</widget>
 				<packing>
-				  <property name="padding">0</property>
-				  <property name="expand">True</property>
-				  <property name="fill">True</property>
+				  <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>
-			    </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="x_options">fill</property>
-			    </packing>
-			  </child>
 
-			  <child>
-			    <widget class="GtkLabel" id="exp_label">
-			      <property name="visible">True</property>
-			      <property name="label" translatable="yes">Expiry:</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>
+			      <child>
+				<widget class="GtkHBox" id="hbox20">
+				  <property name="visible">True</property>
+				  <property name="homogeneous">False</property>
+				  <property name="spacing">0</property>
+
+				  <child>
+				    <widget class="GtkLabel" id="mm_label">
+				      <property name="visible">True</property>
+				      <property name="label" translatable="yes">_Month:</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">8</property>
+				      <property name="ypad">0</property>
+				      <property name="mnemonic_widget">mm_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="padding">0</property>
+				      <property name="expand">False</property>
+				      <property name="fill">False</property>
+				    </packing>
+				  </child>
+
+				  <child>
+				    <widget class="GtkComboBox" id="mm_entry">
+				      <property name="visible">True</property>
+				      <property name="items" translatable="yes">01
+02
+03
+04
+05
+06
+07
+08
+09
+10
+11
+12</property>
+				      <property name="add_tearoffs">False</property>
+				      <property name="focus_on_click">True</property>
+				      <signal name="changed" handler="rb_magnatune_mm_entry_changed_cb" last_modification_time="Sat, 26 Aug 2006 18:57:16 GMT"/>
+				    </widget>
+				    <packing>
+				      <property name="padding">0</property>
+				      <property name="expand">False</property>
+				      <property name="fill">True</property>
+				    </packing>
+				  </child>
+
+				  <child>
+				    <widget class="GtkLabel" id="yy_label">
+				      <property name="visible">True</property>
+				      <property name="label" translatable="yes">_Year:</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">8</property>
+				      <property name="ypad">0</property>
+				      <property name="mnemonic_widget">yy_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="padding">0</property>
+				      <property name="expand">False</property>
+				      <property name="fill">False</property>
+				    </packing>
+				  </child>
+
+				  <child>
+				    <widget class="GtkEntry" id="yy_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">2</property>
+				      <property name="text" translatable="yes"></property>
+				      <property name="has_frame">True</property>
+				      <property name="invisible_char">●</property>
+				      <property name="activates_default">False</property>
+				      <signal name="changed" handler="rb_magnatune_yy_entry_changed_cb" last_modification_time="Sat, 26 Aug 2006 18:56:35 GMT"/>
+				    </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">1</property>
+				  <property name="right_attach">2</property>
+				  <property name="top_attach">3</property>
+				  <property name="bottom_attach">4</property>
+				  <property name="x_options">fill</property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkLabel" id="exp_label">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">Expiry:</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="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>
 			    </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>
 			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
 		      </child>
 
 		      <child>
-			<widget class="GtkCheckButton" id="ignore_cc_info_checkbox">
+			<widget class="GtkCheckButton" id="remember_cc_details">
 			  <property name="visible">True</property>
 			  <property name="can_focus">True</property>
-			  <property name="label" translatable="yes">Don't store credit card information</property>
+			  <property name="label" translatable="yes">Remember my credit card details</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="rb_magnatune_ignore_cc_info_checkbox_toggled_cb" last_modification_time="Sun, 10 Sep 2006 22:45:43 GMT"/>
+			  <signal name="toggled" handler="rb_magnatune_remember_cc_details_toggled_cb" last_modification_time="Tue, 05 Dec 2006 13:27:17 GMT"/>
 			</widget>
 			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
+			  <property name="type">label_item</property>
 			</packing>
 		      </child>
 		    </widget>
@@ -530,20 +537,20 @@
 	      <child>
 		<widget class="GtkComboBox" id="pay_combobox">
 		  <property name="visible">True</property>
-		  <property name="items" translatable="yes">$5
-$6
-$7
-$8 (typical)
-$9
-$10 (better than average)
-$11
-$12 (generous)
-$13
-$14
-$15 (VERY generous!)
-$16
-$17
-$18 (We love you!)</property>
+		  <property name="items" translatable="yes">$5 US
+$6 US
+$7 US
+$8 US (typical)
+$9 US
+$10 US (better than average)
+$11 US
+$12 US (generous)
+$13 US
+$14 US
+$15 US (very generous)
+$16 US
+$17 US
+$18 US (we love you)</property>
 		  <property name="add_tearoffs">False</property>
 		  <property name="focus_on_click">True</property>
 		  <signal name="changed" handler="rb_magnatune_pay_combobox_changed_cb" last_modification_time="Mon, 26 Jun 2006 20:12:55 GMT"/>
@@ -556,28 +563,7 @@ $18 (We love you!)</property>
 	      </child>
 
 	      <child>
-		<widget class="GtkLabel" id="label56">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">(US Dollars)</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">8</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>
+		<placeholder/>
 	      </child>
 	    </widget>
 	    <packing>
diff -u -p -r1.3 magnatune-purchase.glade
--- plugins/magnatune/magnatune-purchase.glade	9 Dec 2006 00:38:41 -0000	1.3
+++ plugins/magnatune/magnatune-purchase.glade	11 Dec 2006 10:56:31 -0000
@@ -24,7 +24,7 @@
     <widget class="GtkVBox" id="dialog-vbox1">
       <property name="visible">True</property>
       <property name="homogeneous">False</property>
-      <property name="spacing">0</property>
+      <property name="spacing">6</property>
 
       <child internal-child="action_area">
 	<widget class="GtkHButtonBox" id="dialog-action_area1">
@@ -147,59 +147,67 @@
 	<widget class="GtkTable" id="table1">
 	  <property name="border_width">12</property>
 	  <property name="visible">True</property>
-	  <property name="n_rows">7</property>
-	  <property name="n_columns">3</property>
+	  <property name="n_rows">5</property>
+	  <property name="n_columns">2</property>
 	  <property name="homogeneous">False</property>
-	  <property name="row_spacing">0</property>
-	  <property name="column_spacing">0</property>
+	  <property name="row_spacing">3</property>
+	  <property name="column_spacing">3</property>
 
 	  <child>
-	    <widget class="GtkLabel" id="audio_label">
+	    <widget class="GtkLabel" id="info_label">
 	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Audio _format:</property>
-	      <property name="use_underline">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label"></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="wrap">True</property>
+	      <property name="selectable">True</property>
+	      <property name="xalign">0.5</property>
 	      <property name="yalign">0.5</property>
 	      <property name="xpad">8</property>
-	      <property name="ypad">0</property>
-	      <property name="mnemonic_widget">audio_combobox</property>
+	      <property name="ypad">8</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">1</property>
+	      <property name="left_attach">0</property>
 	      <property name="right_attach">2</property>
-	      <property name="top_attach">2</property>
-	      <property name="bottom_attach">3</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="GtkComboBox" id="audio_combobox">
+	    <widget class="GtkLabel" id="pay_label">
 	      <property name="visible">True</property>
-	      <property name="items" translatable="yes">Ogg Vorbis
-FLAC
-WAV
-VBR MP3
-128K MP3</property>
-	      <property name="add_tearoffs">False</property>
-	      <property name="focus_on_click">True</property>
+	      <property name="label" translatable="yes">_Amount to pay:</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</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">8</property>
+	      <property name="ypad">0</property>
+	      <property name="mnemonic_widget">pay_combobox</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">2</property>
-	      <property name="right_attach">3</property>
-	      <property name="top_attach">2</property>
-	      <property name="bottom_attach">3</property>
+	      <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">fill</property>
+	      <property name="y_options"></property>
 	    </packing>
 	  </child>
 
@@ -224,8 +232,8 @@ $18 (We love you!)</property>
 	      <property name="focus_on_click">True</property>
 	    </widget>
 	    <packing>
-	      <property name="left_attach">2</property>
-	      <property name="right_attach">3</property>
+	      <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="x_options">fill</property>
@@ -234,9 +242,9 @@ $18 (We love you!)</property>
 	  </child>
 
 	  <child>
-	    <widget class="GtkLabel" id="pay_label">
+	    <widget class="GtkLabel" id="audio_label">
 	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">_Amount to pay:</property>
+	      <property name="label" translatable="yes">Audio _format:</property>
 	      <property name="use_underline">True</property>
 	      <property name="use_markup">False</property>
 	      <property name="justify">GTK_JUSTIFY_LEFT</property>
@@ -246,64 +254,7 @@ $18 (We love you!)</property>
 	      <property name="yalign">0.5</property>
 	      <property name="xpad">8</property>
 	      <property name="ypad">0</property>
-	      <property name="mnemonic_widget">pay_combobox</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">1</property>
-	      <property name="right_attach">2</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="info_label">
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label"></property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">True</property>
-	      <property name="selectable">True</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">8</property>
-	      <property name="ypad">8</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">1</property>
-	      <property name="right_attach">3</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="label2">
-	      <property name="visible">True</property>
-	      <property name="label"></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="mnemonic_widget">audio_combobox</property>
 	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
 	      <property name="width_chars">-1</property>
 	      <property name="single_line_mode">False</property>
@@ -312,7 +263,7 @@ $18 (We love you!)</property>
 	    <packing>
 	      <property name="left_attach">0</property>
 	      <property name="right_attach">1</property>
-	      <property name="top_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>
@@ -320,130 +271,298 @@ $18 (We love you!)</property>
 	  </child>
 
 	  <child>
-	    <widget class="GtkImage" id="image1">
+	    <widget class="GtkComboBox" id="audio_combobox">
 	      <property name="visible">True</property>
-	      <property name="icon_size">6</property>
-	      <property name="icon_name">gtk-dialog-question</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">0</property>
-	      <property name="ypad">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">fill</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkLabel" id="name_label">
-	      <property name="label" translatable="yes">Name:</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">8</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>
+	      <property name="items" translatable="yes">Ogg Vorbis
+FLAC
+WAV
+VBR MP3
+128K MP3</property>
+	      <property name="add_tearoffs">False</property>
+	      <property name="focus_on_click">True</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="top_attach">2</property>
+	      <property name="bottom_attach">3</property>
 	      <property name="x_options">fill</property>
-	      <property name="y_options"></property>
+	      <property name="y_options">fill</property>
 	    </packing>
 	  </child>
 
 	  <child>
-	    <widget class="GtkEntry" id="name_entry">
-	      <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">2</property>
-	      <property name="right_attach">3</property>
-	      <property name="top_attach">3</property>
-	      <property name="bottom_attach">4</property>
-	      <property name="y_options"></property>
-	    </packing>
-	  </child>
+	    <widget class="GtkFrame" id="">
+	      <property name="border_width">6</property>
+	      <property name="visible">True</property>
+	      <property name="label_xalign">0</property>
+	      <property name="label_yalign">0.5</property>
+	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
 
-	  <child>
-	    <widget class="GtkLabel" id="cc_label">
-	      <property name="label" translatable="yes">Credit Card number:</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">8</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>
+	      <child>
+		<widget class="GtkAlignment" id="alignment2">
+		  <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="GtkTable" id="table2">
+		      <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">3</property>
+		      <property name="column_spacing">3</property>
+
+		      <child>
+			<widget class="GtkLabel" id="name_label">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">_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">0</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">8</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">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="cc_label">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">C_redit Card number:</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</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">8</property>
+			  <property name="ypad">0</property>
+			  <property name="mnemonic_widget">cc_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="mm_label">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Expiry _month:</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</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">8</property>
+			  <property name="ypad">0</property>
+			  <property name="mnemonic_widget">mm_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="GtkLabel" id="yy_label">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Expiry _year:</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</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">8</property>
+			  <property name="ypad">0</property>
+			  <property name="mnemonic_widget">yy_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="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">0</property>
+			  <property name="bottom_attach">1</property>
+			  <property name="y_options"></property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkEntry" id="cc_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="GtkComboBox" id="mm_entry">
+			  <property name="visible">True</property>
+			  <property name="items" translatable="yes">January (01)
+February (02)
+March (03)
+April (04)
+May (05)
+June (06)
+July (07)
+August (08)
+September (09)
+October (10)
+November (11)
+December (12)</property>
+			  <property name="add_tearoffs">False</property>
+			  <property name="focus_on_click">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">fill</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkEntry" id="yy_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">2</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>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+
+	      <child>
+		<widget class="GtkCheckButton" id="remember_cc_details">
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">_Remember my credit card details</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="type">label_item</property>
+		</packing>
+	      </child>
 	    </widget>
 	    <packing>
-	      <property name="left_attach">1</property>
+	      <property name="left_attach">0</property>
 	      <property name="right_attach">2</property>
 	      <property name="top_attach">4</property>
 	      <property name="bottom_attach">5</property>
 	      <property name="x_options">fill</property>
-	      <property name="y_options"></property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkLabel" id="mm_label">
-	      <property name="label" translatable="yes">Expiry month:</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">8</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="left_attach">1</property>
-	      <property name="right_attach">2</property>
-	      <property name="top_attach">5</property>
-	      <property name="bottom_attach">6</property>
-	      <property name="x_options">fill</property>
-	      <property name="y_options"></property>
+	      <property name="y_options">fill</property>
 	    </packing>
 	  </child>
 
 	  <child>
-	    <widget class="GtkLabel" id="yy_label">
-	      <property name="label" translatable="yes">Expiry year:</property>
-	      <property name="use_underline">False</property>
+	    <widget class="GtkLabel" id="label4">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">_Email address:</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>
@@ -452,23 +571,25 @@ $18 (We love you!)</property>
 	      <property name="yalign">0.5</property>
 	      <property name="xpad">8</property>
 	      <property name="ypad">0</property>
+	      <property name="mnemonic_widget">email_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">1</property>
-	      <property name="right_attach">2</property>
-	      <property name="top_attach">6</property>
-	      <property name="bottom_attach">7</property>
+	      <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="cc_entry">
+	    <widget class="GtkEntry" id="email_entry">
+	      <property name="visible">True</property>
 	      <property name="can_focus">True</property>
 	      <property name="editable">True</property>
 	      <property name="visibility">True</property>
@@ -479,63 +600,16 @@ $18 (We love you!)</property>
 	      <property name="activates_default">False</property>
 	    </widget>
 	    <packing>
-	      <property name="left_attach">2</property>
-	      <property name="right_attach">3</property>
-	      <property name="top_attach">4</property>
-	      <property name="bottom_attach">5</property>
-	      <property name="y_options"></property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkEntry" id="yy_entry">
-	      <property name="can_focus">True</property>
-	      <property name="editable">True</property>
-	      <property name="visibility">True</property>
-	      <property name="max_length">2</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">2</property>
-	      <property name="right_attach">3</property>
-	      <property name="top_attach">6</property>
-	      <property name="bottom_attach">7</property>
+	      <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="GtkComboBox" id="mm_combobox">
-	      <property name="items" translatable="yes">01
-02
-03
-04
-05
-06
-07
-08
-09
-10
-11
-12</property>
-	      <property name="add_tearoffs">False</property>
-	      <property name="focus_on_click">True</property>
-	    </widget>
-	    <packing>
-	      <property name="left_attach">2</property>
-	      <property name="right_attach">3</property>
-	      <property name="top_attach">5</property>
-	      <property name="bottom_attach">6</property>
-	      <property name="x_options">fill</property>
-	      <property name="y_options">fill</property>
-	    </packing>
-	  </child>
 	</widget>
 	<packing>
-	  <property name="padding">0</property>
+	  <property name="padding">6</property>
 	  <property name="expand">True</property>
 	  <property name="fill">True</property>
 	</packing>
diff -u -p -r1.7 MagnatuneSource.py
--- plugins/magnatune/magnatune/MagnatuneSource.py	9 Dec 2006 00:38:41 -0000	1.7
+++ plugins/magnatune/magnatune/MagnatuneSource.py	11 Dec 2006 10:56:32 -0000
@@ -8,6 +8,14 @@ import gnomevfs, gnome, gconf
 import xml
 import urllib, zipfile
 
+has_gnome_keyring = False
+#try:
+#	import gnomekeyring
+#	has_gnome_keyring = True
+#except:
+#	pass	
+
+
 magnatune_partner_id = "zimmerman"
 
 # URIs
@@ -160,40 +168,49 @@ class MagnatuneSource(rb.BrowserSource):
 			album = self.__db.entry_get(track, rhythmdb.PROP_ALBUM)	
 
 			gladexml = gtk.glade.XML(self.__plugin.find_file("magnatune-purchase.glade"))
-			pay_combo = gladexml.get_widget("pay_combobox")
-			format_combo = gladexml.get_widget("audio_combobox")
-			text_label = gladexml.get_widget("info_label")
-
-			pay_combo.set_active(self.__client.get_int(self.__plugin.gconf_keys['pay']) - 5)
-			format_combo.set_active(self.__plugin.format_list.index(self.__client.get_string(self.__plugin.gconf_keys['format'])))
-			text_label.set_text(_("Would you like to purchase the album '%s' by '%s'.") % (album, artist))
-			
-			if self.__client.get_bool(self.__plugin.gconf_keys['forget']):
-				gladexml.get_widget("name_label").visible = True
-				gladexml.get_widget("name_entry").visible = True
-				gladexml.get_widget("cc_label").visible = True
-				gladexml.get_widget("cc_entry").visible = True
-				gladexml.get_widget("mm_label").visible = True
-				gladexml.get_widget("mm_combobox").visible = True
-				gladexml.get_widget("yy_label").visible = True
-				gladexml.get_widget("yy_entry").visible = True
-				gladexml.get_widget("name_label").show()
-				gladexml.get_widget("name_entry").show()
-				gladexml.get_widget("cc_label").show()
-				gladexml.get_widget("cc_entry").show()
-				gladexml.get_widget("mm_label").show()
-				gladexml.get_widget("mm_combobox").show()
-				gladexml.get_widget("yy_label").show()
-				gladexml.get_widget("yy_entry").show()
+
+			gladexml.get_widget("pay_combobox").set_active(self.__client.get_int(self.__plugin.gconf_keys['pay']) - 5)
+			gladexml.get_widget("audio_combobox").set_active(self.__plugin.format_list.index(self.__client.get_string(self.__plugin.gconf_keys['format'])))
+			gladexml.get_widget("info_label").set_text(_("Would you like to purchase the album '%s' by '%s'.") % (album, artist))
+			gladexml.get_widget("remember_cc_details").props.visible = has_gnome_keyring
+
+			try:
+				(ccnumber, ccyear, ccmonth, name, email) = self.__plugin.get_cc_details()
+				gladexml.get_widget("cc_entry").set_text(ccnumber)
+				gladexml.get_widget("yy_entry").set_text(ccyear)
+				gladexml.get_widget("mm_entry").set_active(ccmonth-1)
+				gladexml.get_widget("name_entry").set_text(name)
+				gladexml.get_widget("email_entry").set_text(email)
+
+				gladexml.get_widget("remember_cc_details").set_active(True)
+			except Exception, e:
+				print e
+
+				gladexml.get_widget("cc_entry").set_text("")
+				gladexml.get_widget("yy_entry").set_text("")
+				gladexml.get_widget("mm_entry").set_active(0)
+				gladexml.get_widget("name_entry").set_text("")
+				gladexml.get_widget("email_entry").set_text("")
+
+				gladexml.get_widget("remember_cc_details").set_active(False)
+							
 			
 			window = gladexml.get_widget("purchase_dialog")
 			if window.run() == gtk.RESPONSE_ACCEPT:
-				if self.__client.get_bool(self.__plugin.gconf_keys['forget']):
-					self.__tmp_name = gladexml.get_widget("name_entry").get_text()
-					self.__tmp_cc = gladexml.get_widget("cc_entry").get_text()
-					self.__tmp_mm = gladexml.get_widget("mm_combobox").get_active_text()
-					self.__tmp_yy = gladexml.get_widget("yy_entry").get_text()
-				self.__purchase_album (sku, pay_combo.get_active() + 5, self.__plugin.format_list[format_combo.get_active()])
+				amount = gladexml.get_widget("pay_combobox").get_active() + 5
+				format = self.__plugin.format_list[gladexml.get_widget("audio_combobox").get_active()]
+				ccnumber = gladexml.get_widget("cc_entry").get_text()
+				ccyear = gladexml.get_widget("yy_entry").get_text()
+				ccmonth = str(gladexml.get_widget("mm_entry").get_active() + 1).zfill(2)
+				name = gladexml.get_widget("name_entry").get_text()
+				email = gladexml.get_widget("email_entry").get_text()
+
+				if gladexml.get_widget("remember_cc_details").props.active:
+					self.__plugin.store_cc_details(ccnumber, ccyear, ccmonth, name, email)
+				else:
+					self.__plugin.clear_cc_details()
+
+				self.__purchase_album (sku, amount, format, ccnumber, ccyear, ccmonth, name, email)
 
 			window.destroy()
 
@@ -203,24 +220,26 @@ class MagnatuneSource(rb.BrowserSource):
 	def __load_catalogue_read_cb (self, handle, data, exc_type, bytes_requested, parser):
 		if exc_type:
 			if issubclass (exc_type, gnomevfs.EOFError):
-				# successfully loaded
-				gtk.gdk.threads_enter()
-				self.__show_loading_screen (False)
+				def finish_loadscreen():
+					# successfully loaded
+					gtk.gdk.threads_enter()
+					self.__show_loading_screen (False)
 				
-				in_progress_dir = gnomevfs.DirectoryHandle(gnomevfs.URI(magnatune_dir))
-				in_progress = in_progress_dir.next()
-				while True:
-					if in_progress.name[0:12] == "in_progress_":
-						in_progress = gnomevfs.read_entire_file(magnatune_dir + in_progress.name)
-						for uri in in_progress.split("\n"):
-							if uri == '':
-								continue
-							self.__download_album(gnomevfs.URI(uri))
-					try:
-						in_progress = in_progress_dir.next()
-					except:
-						break
-				gtk.gdk.threads_leave()
+					in_progress_dir = gnomevfs.DirectoryHandle(gnomevfs.URI(magnatune_dir))
+					in_progress = in_progress_dir.next()
+					while True:
+						if in_progress.name[0:12] == "in_progress_":
+							in_progress = gnomevfs.read_entire_file(magnatune_dir + in_progress.name)
+							for uri in in_progress.split("\n"):
+								if uri == '':
+									continue
+								self.__download_album(gnomevfs.URI(uri))
+						try:
+							in_progress = in_progress_dir.next()
+						except:
+							break
+					gtk.gdk.threads_leave()
+				gobject.idle_add (finish_loadscreen)
 			else:
 				# error reading file
 				raise exc_type
@@ -354,19 +373,7 @@ class MagnatuneSource(rb.BrowserSource):
 	#
 	# internal purchasing code
 	#
-	def __purchase_album(self, sku, pay, format):
-		ccnumber = self.__client.get_string(self.__plugin.gconf_keys['ccnumber'])
-		ccyear = self.__client.get_string(self.__plugin.gconf_keys['ccyear'])
-		ccmonth = self.__client.get_string(self.__plugin.gconf_keys['ccmonth'])
-		name = self.__client.get_string(self.__plugin.gconf_keys['ccname'])
-		email = self.__client.get_string(self.__plugin.gconf_keys['email'])
-		
-		if self.__client.get_bool(self.__plugin.gconf_keys['forget']):
-			ccnumber = self.__tmp_cc
-			ccyear = self.__tmp_yy
-			ccmonth = self.__tmp_mm
-			name = self.__tmp_name
-
+	def __purchase_album(self, sku, pay, format, ccnumber, ccyear, ccmonth, name, email):
 		print "purchasing tracks:", sku, pay, format, name, email
 
 		try:
@@ -417,19 +424,21 @@ class MagnatuneSource(rb.BrowserSource):
 		data = data.replace("<br>", "") # get rid of any stray <br> tags that will mess up the parser
 		if exc_type:
 			if issubclass (exc_type, gnomevfs.EOFError):
-				# successfully loaded
-				gtk.gdk.threads_enter()
-				audio_dl_uri = gnomevfs.URI(buy_album_handler.url)
-				audio_dl_uri = gnomevfs.URI(buy_album_handler.url[0:buy_album_handler.url.rfind("/") + 1] + urllib.quote(audio_dl_uri.short_name))
-				audio_dl_uri.user_name = str(buy_album_handler.username) # URI objects don't like unicode strings
-				audio_dl_uri.password = str(buy_album_handler.password)
+				def start_download ():
+					# successfully loaded
+					gtk.gdk.threads_enter()
+					audio_dl_uri = gnomevfs.URI(buy_album_handler.url)
+					audio_dl_uri = gnomevfs.URI(buy_album_handler.url[0:buy_album_handler.url.rfind("/") + 1] + urllib.quote(audio_dl_uri.short_name))
+					audio_dl_uri.user_name = str(buy_album_handler.username) # URI objects don't like unicode strings
+					audio_dl_uri.password = str(buy_album_handler.password)
 				
-				in_progress = create_if_needed(gnomevfs.URI(magnatune_dir + "in_progress_" + audio_dl_uri.short_name), gnomevfs.OPEN_WRITE)
-				in_progress.write(str(audio_dl_uri))
-				in_progress.close()
-				self.__download_album(audio_dl_uri)
-				self.__wait_dlg.destroy()
-				gtk.gdk.threads_leave()
+					in_progress = create_if_needed(gnomevfs.URI(magnatune_dir + "in_progress_" + audio_dl_uri.short_name), gnomevfs.OPEN_WRITE)
+					in_progress.write(str(audio_dl_uri))
+					in_progress.close()
+					self.__download_album(audio_dl_uri)
+					self.__wait_dlg.destroy()
+					gtk.gdk.threads_leave()
+				gobject.idle_add (start_download)
 			else:
 				# error reading file
 				raise exc_type
@@ -438,9 +447,13 @@ class MagnatuneSource(rb.BrowserSource):
 			handle.close(lambda handle, exc: None) # FIXME: report it?
 			
  		else:
-
-			auth_parser.feed(data)
-			handle.read(64 * 1024, self.__auth_read_cb, parser)
+			try :
+				print data
+				auth_parser.feed(data)
+				handle.read(64 * 1024, self.__auth_read_cb, parser)
+			except Exception, e:
+				print e
+				raise e
 	
 	def __download_album(self, audio_dl_uri):
 			library_location = self.__client.get_list("/apps/rhythmbox/library_locations", gconf.VALUE_STRING)[0] # Just use the first library location
@@ -451,7 +464,9 @@ class MagnatuneSource(rb.BrowserSource):
 			manager.get_action("/MagnatuneSourceViewPopup/MagnatuneCancelDownload").set_sensitive(True)
 			self.__downloading = True
 			self.cancelled = False
+			gtk.gdk.threads_leave()
 			self.purchase_filesize += gnomevfs.get_file_info(audio_dl_uri).size
+			gtk.gdk.threads_enter()
 			create_if_needed(to_file_uri, gnomevfs.OPEN_WRITE).close()
 			gnomevfs.async.xfer (source_uri_list = [audio_dl_uri],
 							target_uri_list = [to_file_uri],
@@ -473,7 +488,7 @@ class MagnatuneSource(rb.BrowserSource):
 				del self.__downloads[str(audio_dl_uri)]
 			except:
 				return 0
-			self.purchase_filesize -= gnomevfs.get_file_info(audio_dl_uri).size
+			self.purchase_filesize -= gnommVfs.get_file_info(audio_dl_uri).size
 			album = zipfile.ZipFile(to_file_uri.path)
 			for track in album.namelist():
 				track_uri = gnomevfs.URI(library_location + "/" + track)
diff -u -p -r1.4 __init__.py
--- plugins/magnatune/magnatune/__init__.py	9 Dec 2006 00:38:41 -0000	1.4
+++ plugins/magnatune/magnatune/__init__.py	11 Dec 2006 10:56:32 -0000
@@ -8,9 +8,17 @@ import zipfile
 import sys, os.path
 import xml
 import datetime
+import string
 
 from MagnatuneSource import MagnatuneSource
 
+has_gnome_keyring = False
+#try:
+#	import gnomekeyring
+#	has_gnome_keyring = True
+#except:
+#	pass	
+
 
 popup_ui = """
 <ui>
@@ -29,6 +37,8 @@ popup_ui = """
 </ui>
 """
 
+keyring_attributes = {"name": "rb-magnatune-cc-data"}
+
 
 class Magnatune(rb.Plugin):
 	client = gconf.client_get_default()
@@ -38,12 +48,7 @@ class Magnatune(rb.Plugin):
 	gconf_keys = {
 		'format': "/apps/rhythmbox/plugins/magnatune/format",
 		'pay': "/apps/rhythmbox/plugins/magnatune/pay",
-		'ccnumber': "/apps/rhythmbox/plugins/magnatune/cc_number",
-		'ccyear': "/apps/rhythmbox/plugins/magnatune/cc_year",
-		'ccmonth': "/apps/rhythmbox/plugins/magnatune/cc_month",
-		'ccname': "/apps/rhythmbox/plugins/magnatune/name",
-		'email': "/apps/rhythmbox/plugins/magnatune/email",
-		'forget': "/apps/rhythmbox/plugins/magnatune/forget"
+		'ccauthtoken': "/apps/rhythmbox/plugins/magnatune/ccauthtoken"
 	}
 
 
@@ -57,6 +62,7 @@ class Magnatune(rb.Plugin):
 	def activate(self, shell):
 		self.shell = shell # so buy_track can update the progress bar
 		self.db = shell.get_property("db")
+		self.keyring = None
 
 		self.entry_type = self.db.entry_register_type("MagnatuneEntryType")
 		# allow changes which don't do anything
@@ -104,69 +110,108 @@ class Magnatune(rb.Plugin):
 		self.source.delete_thyself()
 		self.source = None
 		self.shell = None
+		self.keyring = None
+
+
+	def get_keyring(self):
+		if self.keyring is None:
+			self.keyring = gnomekeyring.get_default_keyring_sync()
+		return self.keyring
+
+	def store_cc_details(self, *details):
+		if has_gnome_keyring:
+			print "storing CC details"
+			try:
+				id = gnomekeyring.item_create_sync(self.get_keyring(),
+						gnomekeyring.ITEM_GENERIC_SECRET,
+						"Magnatune credit card info", keyring_attributes,
+						string.join (details, '\n'), True)
+			except Exception, e:
+				print e
+
+	def clear_cc_details(self):
+		if has_gnome_keyring:
+			print "clearing CC details"
+			try:
+				ids = gnomekeyring.find_items_sync (gnomekeyring.ITEM_GENERIC_SECRET, keyring_attributes)
+				gnomekeyring.item_delete_sync (self.get_keyring(), id[0])
+			except Exception, e:
+				print e
+	
+	def get_cc_details(self):
+		if has_gnome_keyring:
+			print "getting CC details"
+			try:
+				ids = gnomekeyring.find_items_sync (gnomekeyring.ITEM_GENERIC_SECRET, keyring_attributes)
+				data =  gnomekeyring.item_get_info_sync(self.get_keyring(), ids[0]).get_secret()
+				return string.split(data, "\n")
+			except Exception, e:
+				print e
+		return ("", "", 0, "", "")
 	
 	def create_configure_dialog(self, dialog=None):
 		if dialog == None:
-			
-			def ignore_checkbox_toggled(button):
-				if button.get_active():
-					gladexml.get_widget("name_entry").set_sensitive(False)
-					gladexml.get_widget("cc_entry").set_sensitive(False)
-					gladexml.get_widget("mm_entry").set_sensitive(False)
-					gladexml.get_widget("yy_entry").set_sensitive(False)
-					gladexml.get_widget("name_entry").set_text("")
-					gladexml.get_widget("cc_entry").set_text("")
-					gladexml.get_widget("mm_entry").set_active(0)
-					gladexml.get_widget("yy_entry").set_text("")
-					self.client.set_bool(self.gconf_keys['forget'], True)
-				else:
-					gladexml.get_widget("name_entry").set_sensitive(True)
-					gladexml.get_widget("cc_entry").set_sensitive(True)
-					gladexml.get_widget("mm_entry").set_sensitive(True)
-					gladexml.get_widget("yy_entry").set_sensitive(True)
-					self.client.set_bool(self.gconf_keys['forget'], False)
-			
-			def yy_entry_changed(entry):
-				self.client.set_string(self.gconf_keys['ccyear'], entry.get_text())
+			def fill_cc_details():
 				try:
-					mm = gladexml.get_widget("mm_entry").get_active_text()
-					if int(entry.get_text()) < (datetime.date.today().year % 100):
-						gladexml.get_widget("cc_expired_label").visible = True
-						gladexml.get_widget("cc_expired_label").show()
-					elif (int(entry.get_text()) == (datetime.date.today().year % 100) and int(mm) < datetime.date.today().month):
-						gladexml.get_widget("cc_expired_label").visible = True
-						gladexml.get_widget("cc_expired_label").show()
-					else:
-						gladexml.get_widget("cc_expired_label").visible = False
-						gladexml.get_widget("cc_expired_label").hide()
-				except Exception,e:
+					(ccnumber, ccyear, ccmonth, name, email) = self.get_cc_details()
+					gladexml.get_widget("cc_entry").set_text(ccnumber)
+					gladexml.get_widget("yy_entry").set_text(ccyear)
+					gladexml.get_widget("mm_entry").set_active(int(ccmonth)-1)
+					gladexml.get_widget("name_entry").set_text(name)
+					gladexml.get_widget("email_entry").set_text(email)
+					gladexml.get_widget("remember_cc_details").set_active(True)
+				except Exception, e:
 					print e
-			
-			def mm_entry_changed(entry):
-				self.client.set_string(self.gconf_keys['ccmonth'], entry.get_active_text())
+
+					gladexml.get_widget("cc_entry").set_text("")
+					gladexml.get_widget("yy_entry").set_text("")
+					gladexml.get_widget("mm_entry").set_active(0)
+					gladexml.get_widget("name_entry").set_text("")
+					gladexml.get_widget("email_entry").set_text("")
+					gladexml.get_widget("remember_cc_details").set_active(False)
+
+			def update_expired():
+				mm = gladexml.get_widget("mm_entry").get_active() + 1
+				yy = 0
 				try:
-					yy = gladexml.get_widget("yy_entry").get_text()
-					if int(yy) < (datetime.date.today().year % 100):
-						gladexml.get_widget("cc_expired_label").visible = True
-						gladexml.get_widget("cc_expired_label").show()
-					elif (int(yy) == (datetime.date.today().year % 100) and int(entry.get_active_text()) < datetime.date.today().month):
-						gladexml.get_widget("cc_expired_label").visible = True
-						gladexml.get_widget("cc_expired_label").show()
-					else:
-						gladexml.get_widget("cc_expired_label").visible = False
-						gladexml.get_widget("cc_expired_label").hide()
-				except Exception,e:
+					yy = int(gladexml.get_widget("yy_entry").get_text())
+				except Exception, e:
 					print e
+					gladexml.get_widget("cc_expired_label").hide()
+					return
+
+				if yy < (datetime.date.today().year % 100):
+					gladexml.get_widget("cc_expired_label").show()
+				elif (yy == (datetime.date.today().year % 100) and mm < datetime.date.today().month):
+					gladexml.get_widget("cc_expired_label").show()
+				else:
+					gladexml.get_widget("cc_expired_label").hide()
 			
+			def remember_checkbox_toggled (button):
+				print "remember CC details toggled " + str(button.get_active())
+				gladexml.get_widget("cc_entry").set_sensitive(button.get_active())
+				gladexml.get_widget("mm_entry").set_sensitive(button.get_active())
+				gladexml.get_widget("yy_entry").set_sensitive(button.get_active())
+				gladexml.get_widget("name_entry").set_sensitive(button.get_active())
+				gladexml.get_widget("email_entry").set_sensitive(button.get_active())
+
+				if not button.get_active():
+					try:
+						self.clear_cc_details ()
+					except Exception, e:
+						print e
+#				fill_cc_details()
+
+
 			self.configure_callback_dic = {
-				"rb_magnatune_name_entry_changed_cb" : lambda w: self.client.set_string(self.gconf_keys['ccname'], w.get_text()),
-				"rb_magnatune_email_entry_changed_cb" : lambda w: self.client.set_string(self.gconf_keys['email'], w.get_text()),
-				"rb_magnatune_cc_entry_changed_cb" : lambda w: self.client.set_string(self.gconf_keys['ccnumber'], w.get_text()),
-				"rb_magnatune_yy_entry_changed_cb" : yy_entry_changed,
-				"rb_magnatune_mm_entry_changed_cb" : mm_entry_changed,
+#				"rb_magnatune_yy_entry_changed_cb" : lambda w: update_expired(),
+#				"rb_magnatune_mm_entry_changed_cb" : lambda w: update_expired(),
+#				"rb_magnatune_name_entry_changed_cb" : lambda w: None,
+#				"rb_magnatune_cc_entry_changed_cb" : lambda w: None,
+#				"rb_magnatune_email_entry_changed_cb" : lambda w: None,
 				"rb_magnatune_pay_combobox_changed_cb" : lambda w: self.client.set_int(self.gconf_keys['pay'], w.get_active() + 5),
 				"rb_magnatune_audio_combobox_changed_cb" : lambda w: self.client.set_string(self.gconf_keys['format'], self.format_list[w.get_active()]),
-				"rb_magnatune_ignore_cc_info_checkbox_toggled_cb" : ignore_checkbox_toggled
+				"rb_magnatune_remember_cc_details_toggled_cb" : remember_checkbox_toggled
 			}
 
 			gladexml = gtk.glade.XML(self.find_file("magnatune-prefs.glade"))
@@ -174,16 +219,21 @@ class Magnatune(rb.Plugin):
 
 			# FIXME this bit should be in glade too
 			dialog = gladexml.get_widget('preferences_dialog')
-			dialog.connect("response", lambda w, r: w.hide())
+			def dialog_response (dialog, response):
+				if gladexml.get_widget("remember_cc_details").get_active():
+					ccnumber = gladexml.get_widget("cc_entry").get_text()
+					ccyear = gladexml.get_widget("yy_entry").get_text()
+					ccmonth = str(gladexml.get_widget("mm_entry").get_active() + 1)
+					name = gladexml.get_widget("name_entry").get_text()
+					email = gladexml.get_widget("email_entry").get_text()
+					self.store_cc_details(ccnumber, ccyear, ccmonth, name, email)
+				dialog.hide()
+			dialog.connect("response", dialog_response)
 			
-			gladexml.get_widget("name_entry").set_text(self.client.get_string(self.gconf_keys['ccname']))
-			gladexml.get_widget("email_entry").set_text(self.client.get_string(self.gconf_keys['email']))
-			gladexml.get_widget("cc_entry").set_text(self.client.get_string(self.gconf_keys['ccnumber']))
-			gladexml.get_widget("yy_entry").set_text(self.client.get_string(self.gconf_keys['ccyear']))
-			gladexml.get_widget("mm_entry").set_active(int(self.client.get_string(self.gconf_keys['ccmonth'])) - 1)
+			gladexml.get_widget("cc_details_box").props.visible = has_gnome_keyring
 			gladexml.get_widget("pay_combobox").set_active(self.client.get_int(self.gconf_keys['pay']) - 5)
 			gladexml.get_widget("audio_combobox").set_active(self.format_list.index(self.client.get_string(self.gconf_keys['format'])))
-			gladexml.get_widget("ignore_cc_info_checkbox").set_active(self.client.get_bool(self.gconf_keys['forget']))
+			fill_cc_details()
 
 		dialog.present()
 		return dialog
