Index: src/seahorse-sign.c
===================================================================
--- src/seahorse-sign.c	(revision 2165)
+++ src/seahorse-sign.c	(working copy)
@@ -20,7 +20,7 @@
  * Boston, MA 02111-1307, USA.
  */
 
-#include <gnome.h>
+#include <glib/gi18n.h>
 
 #include "seahorse-gpgmex.h"
 #include "seahorse-windows.h"
Index: src/seahorse-delete.c
===================================================================
--- src/seahorse-delete.c	(revision 2165)
+++ src/seahorse-delete.c	(working copy)
@@ -20,7 +20,8 @@
  */
 
 #include <config.h>
-#include <gnome.h>
+
+#include <glib/gi18n.h>
 
 #include "seahorse-gpgmex.h"
 #include "seahorse-windows.h"
Index: src/seahorse-add-uid.c
===================================================================
--- src/seahorse-add-uid.c	(revision 2165)
+++ src/seahorse-add-uid.c	(working copy)
@@ -20,7 +20,10 @@
  */
 
 #include <config.h> 
-#include <gnome.h>
+
+#include <string.h>
+
+#include <glib/gi18n.h>
  
 #include "seahorse-gpgmex.h"
 #include "seahorse-key-dialogs.h"
Index: src/seahorse-pgp-generate.glade
===================================================================
--- src/seahorse-pgp-generate.glade	(revision 2165)
+++ src/seahorse-pgp-generate.glade	(working copy)
@@ -1,658 +1,410 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
+<!--*- mode: xml -*-->
 <glade-interface>
-<requires lib="gnome"/>
-
-<widget class="GtkDialog" id="pgp-generate">
-  <property name="border_width">5</property>
-  <property name="visible">True</property>
-  <property name="title" translatable="yes">New PGP Key</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">False</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>
-  <accessibility>
-    <atkproperty name="AtkObject::accessible_name" translatable="yes">Create a PGP Key</atkproperty>
-  </accessibility>
-  <signal name="delete_event" handler="delete_event" last_modification_time="Fri, 10 Jan 2003 08:53:02 GMT"/>
-
-  <child internal-child="vbox">
-    <widget class="GtkVBox" id="dialog-vbox1">
-      <property name="visible">True</property>
-      <property name="homogeneous">False</property>
-      <property name="spacing">2</property>
-
-      <child internal-child="action_area">
-	<widget class="GtkHButtonBox" id="dialog-action_area1">
-	  <property name="visible">True</property>
-	  <property name="layout_style">GTK_BUTTONBOX_END</property>
-
-	  <child>
-	    <widget class="GtkButton" id="helpbutton1">
-	      <property name="visible">True</property>
-	      <property name="can_default">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-help</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">-11</property>
-	      <signal name="clicked" handler="help" last_modification_time="Sun, 10 Nov 2002 19:54:20 GMT"/>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="cancelbutton1">
-	      <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>
-	      <signal name="clicked" handler="closed" last_modification_time="Sun, 10 Nov 2002 19:54:11 GMT"/>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="ok">
-	      <property name="visible">True</property>
-	      <property name="sensitive">False</property>
-	      <property name="tooltip" translatable="yes">Generate a new key</property>
-	      <property name="can_default">True</property>
-	      <property name="has_default">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <property name="response_id">-5</property>
-	      <signal name="clicked" handler="ok_clicked" last_modification_time="Sun, 10 Nov 2002 19:54:32 GMT"/>
-
-	      <child>
-		<widget class="GtkAlignment" id="alignment1">
-		  <property name="visible">True</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xscale">0</property>
-		  <property name="yscale">0</property>
-		  <property name="top_padding">0</property>
-		  <property name="bottom_padding">0</property>
-		  <property name="left_padding">0</property>
-		  <property name="right_padding">0</property>
-
-		  <child>
-		    <widget class="GtkHBox" id="hbox1">
-		      <property name="visible">True</property>
-		      <property name="homogeneous">False</property>
-		      <property name="spacing">2</property>
-
-		      <child>
-			<widget class="GtkImage" id="image1">
-			  <property name="visible">True</property>
-			  <property name="stock">gtk-ok</property>
-			  <property name="icon_size">4</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="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">False</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkLabel" id="label44">
-			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">C_reate</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="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>
-	    </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="GtkHBox" id="hbox2">
-	  <property name="border_width">7</property>
-	  <property name="visible">True</property>
-	  <property name="homogeneous">False</property>
-	  <property name="spacing">12</property>
-
-	  <child>
-	    <widget class="GtkImage" id="pgp-image">
-	      <property name="visible">True</property>
-	      <property name="icon_name"></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">0</property>
-	      <property name="expand">False</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkVBox" id="vbox1">
-	      <property name="visible">True</property>
-	      <property name="homogeneous">False</property>
-	      <property name="spacing">12</property>
-
-	      <child>
-		<widget class="GtkLabel" id="label45">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">A PGP key allows you to encrypt email or files to other people.</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</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="GtkTable" id="table12">
-		  <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">12</property>
-
-		  <child>
-		    <widget class="GtkEntry" id="email-entry">
-		      <property name="width_request">180</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"></property>
-		      <property name="has_frame">True</property>
-		      <property name="activates_default">True</property>
-		      <signal name="changed" handler="on_entry_changed" last_modification_time="Fri, 18 Aug 2006 15:15:31 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="label46">
-		      <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>
-		      <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">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="label53">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Full _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="width_request">180</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"></property>
-		      <property name="has_frame">True</property>
-		      <property name="activates_default">True</property>
-		      <signal name="changed" handler="on_entry_changed" last_modification_time="Fri, 18 Aug 2006 15:15:39 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="comment-entry">
-		      <property name="width_request">180</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"></property>
-		      <property name="has_frame">True</property>
-		      <property name="activates_default">True</property>
-		      <signal name="changed" handler="on_entry_changed" last_modification_time="Fri, 18 Aug 2006 15:15:46 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="GtkLabel" id="label54">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">_Comment:</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">comment-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>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">True</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkExpander" id="expander1">
-		  <property name="visible">True</property>
-		  <property name="can_focus">True</property>
-		  <property name="expanded">False</property>
-		  <property name="spacing">0</property>
-
-		  <child>
-		    <widget class="GtkAlignment" id="alignment2">
-		      <property name="visible">True</property>
-		      <property name="xalign">0</property>
-		      <property name="yalign">0</property>
-		      <property name="xscale">0</property>
-		      <property name="yscale">0</property>
-		      <property name="top_padding">12</property>
-		      <property name="bottom_padding">0</property>
-		      <property name="left_padding">12</property>
-		      <property name="right_padding">0</property>
-
-		      <child>
-			<widget class="GtkTable" id="table11">
-			  <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">12</property>
-
-			  <child>
-			    <widget class="GtkLabel" id="label49">
-			      <property name="visible">True</property>
-			      <property name="label" translatable="yes">Encryption _Type:</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="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="label50">
-			      <property name="visible">True</property>
-			      <property name="label" translatable="yes">Key _Strength (bits):</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="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="GtkAlignment" id="alignment4">
-			      <property name="visible">True</property>
-			      <property name="xalign">0</property>
-			      <property name="yalign">0</property>
-			      <property name="xscale">0</property>
-			      <property name="yscale">1</property>
-			      <property name="top_padding">0</property>
-			      <property name="bottom_padding">0</property>
-			      <property name="left_padding">0</property>
-			      <property name="right_padding">0</property>
-
-			      <child>
-				<widget class="GtkComboBox" id="algorithm-choice">
-				  <property name="visible">True</property>
-				  <property name="items" translatable="yes">Algorithms here</property>
-				  <property name="add_tearoffs">False</property>
-				  <property name="focus_on_click">True</property>
-				  <signal name="changed" handler="on_algorithm_changed" last_modification_time="Fri, 18 Aug 2006 15:22:24 GMT"/>
-				</widget>
-			      </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="y_options"></property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkAlignment" id="alignment5">
-			      <property name="visible">True</property>
-			      <property name="xalign">0</property>
-			      <property name="yalign">0</property>
-			      <property name="xscale">0</property>
-			      <property name="yscale">0</property>
-			      <property name="top_padding">0</property>
-			      <property name="bottom_padding">0</property>
-			      <property name="left_padding">0</property>
-			      <property name="right_padding">0</property>
-
-			      <child>
-				<widget class="GtkSpinButton" id="bits-entry">
-				  <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">True</property>
-				  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-				  <property name="snap_to_ticks">False</property>
-				  <property name="wrap">False</property>
-				  <property name="adjustment">2048 512 8192 512 1 1</property>
-				</widget>
-			      </child>
-			    </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">fill</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkLabel" id="label55">
-			      <property name="visible">True</property>
-			      <property name="label" translatable="yes">E_xpiration Date:</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="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="GtkHBox" id="hbox3">
-			      <property name="visible">True</property>
-			      <property name="homogeneous">False</property>
-			      <property name="spacing">12</property>
-
-			      <child>
-				<widget class="GnomeDateEdit" id="expiry-date">
-				  <property name="visible">True</property>
-				  <property name="sensitive">False</property>
-				  <property name="dateedit_flags"></property>
-				  <property name="lower_hour">7</property>
-				  <property name="upper_hour">19</property>
-				</widget>
-				<packing>
-				  <property name="padding">0</property>
-				  <property name="expand">True</property>
-				  <property name="fill">True</property>
-				</packing>
-			      </child>
-
-			      <child>
-				<widget class="GtkCheckButton" id="expires-check">
-				  <property name="visible">True</property>
-				  <property name="can_focus">True</property>
-				  <property name="label" translatable="yes">Ne_ver Expires</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>
-				  <signal name="toggled" handler="on_expires_toggled" last_modification_time="Fri, 18 Aug 2006 15:16:55 GMT"/>
-				</widget>
-				<packing>
-				  <property name="padding">0</property>
-				  <property name="expand">False</property>
-				  <property name="fill">False</property>
-				</packing>
-			      </child>
-			    </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>
-			</widget>
-		      </child>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label48">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">&lt;b&gt;_Advanced key options&lt;/b&gt;</property>
-		      <property name="use_underline">True</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">True</property>
-		  <property name="fill">True</property>
-		</packing>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">False</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="pgp-generate">
+    <property name="visible">True</property>
+    <property name="border_width">5</property>
+    <property name="title" translatable="yes">New PGP Key</property>
+    <property name="resizable">False</property>
+    <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+    <property name="has_separator">False</property>
+    <accessibility>
+      <atkproperty name="AtkObject::accessible_name" translatable="yes">Create a PGP Key</atkproperty>
+    </accessibility>
+    <signal name="delete_event" handler="delete_event"/>
+    <child internal-child="vbox">
+      <widget class="GtkVBox" id="dialog-vbox1">
+        <property name="visible">True</property>
+        <property name="spacing">2</property>
+        <child>
+          <widget class="GtkHBox" id="hbox2">
+            <property name="visible">True</property>
+            <property name="border_width">7</property>
+            <property name="spacing">12</property>
+            <child>
+              <widget class="GtkImage" id="pgp-image">
+                <property name="visible">True</property>
+                <property name="yalign">0</property>
+                <property name="stock">gtk-missing-image</property>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkVBox" id="vbox1">
+                <property name="visible">True</property>
+                <property name="spacing">12</property>
+                <child>
+                  <widget class="GtkLabel" id="label45">
+                    <property name="visible">True</property>
+                    <property name="xalign">0</property>
+                    <property name="yalign">0</property>
+                    <property name="label" translatable="yes">A PGP key allows you to encrypt email or files to other people.</property>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkTable" id="table12">
+                    <property name="visible">True</property>
+                    <property name="n_rows">3</property>
+                    <property name="n_columns">2</property>
+                    <property name="column_spacing">12</property>
+                    <property name="row_spacing">6</property>
+                    <child>
+                      <widget class="GtkLabel" id="label54">
+                        <property name="visible">True</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">_Comment:</property>
+                        <property name="use_underline">True</property>
+                        <property name="mnemonic_widget">comment-entry</property>
+                      </widget>
+                      <packing>
+                        <property name="top_attach">2</property>
+                        <property name="bottom_attach">3</property>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkEntry" id="comment-entry">
+                        <property name="width_request">180</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="activates_default">True</property>
+                        <signal name="changed" handler="on_entry_changed"/>
+                      </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="GtkEntry" id="name-entry">
+                        <property name="width_request">180</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="activates_default">True</property>
+                        <signal name="changed" handler="on_entry_changed"/>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label53">
+                        <property name="visible">True</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">Full _Name:</property>
+                        <property name="use_underline">True</property>
+                        <property name="mnemonic_widget">name-entry</property>
+                      </widget>
+                      <packing>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label46">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">_Email Address:</property>
+                        <property name="use_underline">True</property>
+                        <property name="mnemonic_widget">email-entry</property>
+                      </widget>
+                      <packing>
+                        <property name="top_attach">1</property>
+                        <property name="bottom_attach">2</property>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkEntry" id="email-entry">
+                        <property name="width_request">180</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="activates_default">True</property>
+                        <signal name="changed" handler="on_entry_changed"/>
+                      </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="expand">False</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkExpander" id="expander1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <child>
+                      <widget class="GtkAlignment" id="alignment2">
+                        <property name="visible">True</property>
+                        <property name="xalign">0</property>
+                        <property name="yalign">0</property>
+                        <property name="xscale">0</property>
+                        <property name="yscale">0</property>
+                        <property name="top_padding">12</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <widget class="GtkTable" id="table11">
+                            <property name="visible">True</property>
+                            <property name="n_rows">3</property>
+                            <property name="n_columns">2</property>
+                            <property name="column_spacing">12</property>
+                            <property name="row_spacing">6</property>
+                            <child>
+                              <widget class="GtkHBox" id="expiry-date-container">
+                                <property name="visible">True</property>
+                                <property name="spacing">12</property>
+                                <child>
+                                  <placeholder/>
+                                </child>
+                                <child>
+                                  <widget class="GtkCheckButton" id="expires-check">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="label" translatable="yes">Ne_ver Expires</property>
+                                    <property name="use_underline">True</property>
+                                    <property name="response_id">0</property>
+                                    <property name="active">True</property>
+                                    <property name="draw_indicator">True</property>
+                                    <signal name="toggled" handler="on_expires_toggled"/>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </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">GTK_FILL</property>
+                                <property name="y_options">GTK_FILL</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkLabel" id="label55">
+                                <property name="visible">True</property>
+                                <property name="xalign">0</property>
+                                <property name="label" translatable="yes">E_xpiration Date:</property>
+                                <property name="use_underline">True</property>
+                              </widget>
+                              <packing>
+                                <property name="top_attach">2</property>
+                                <property name="bottom_attach">3</property>
+                                <property name="x_options">GTK_FILL</property>
+                                <property name="y_options"></property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkAlignment" id="alignment5">
+                                <property name="visible">True</property>
+                                <property name="xalign">0</property>
+                                <property name="yalign">0</property>
+                                <property name="xscale">0</property>
+                                <property name="yscale">0</property>
+                                <child>
+                                  <widget class="GtkSpinButton" id="bits-entry">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="adjustment">2048 512 8192 512 1 1</property>
+                                    <property name="climb_rate">1</property>
+                                    <property name="numeric">True</property>
+                                  </widget>
+                                </child>
+                              </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">GTK_FILL</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkAlignment" id="alignment4">
+                                <property name="visible">True</property>
+                                <property name="xalign">0</property>
+                                <property name="yalign">0</property>
+                                <property name="xscale">0</property>
+                                <child>
+                                  <widget class="GtkComboBox" id="algorithm-choice">
+                                    <property name="visible">True</property>
+                                    <property name="items" translatable="yes">Algorithms here</property>
+                                    <signal name="changed" handler="on_algorithm_changed"/>
+                                  </widget>
+                                </child>
+                              </widget>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">2</property>
+                                <property name="y_options"></property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkLabel" id="label50">
+                                <property name="visible">True</property>
+                                <property name="xalign">0</property>
+                                <property name="label" translatable="yes">Key _Strength (bits):</property>
+                                <property name="use_underline">True</property>
+                              </widget>
+                              <packing>
+                                <property name="top_attach">1</property>
+                                <property name="bottom_attach">2</property>
+                                <property name="x_options">GTK_FILL</property>
+                                <property name="y_options"></property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkLabel" id="label49">
+                                <property name="visible">True</property>
+                                <property name="xalign">0</property>
+                                <property name="label" translatable="yes">Encryption _Type:</property>
+                                <property name="use_underline">True</property>
+                              </widget>
+                              <packing>
+                                <property name="x_options">GTK_FILL</property>
+                                <property name="y_options"></property>
+                              </packing>
+                            </child>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label48">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">&lt;b&gt;_Advanced key options&lt;/b&gt;</property>
+                        <property name="use_markup">True</property>
+                        <property name="use_underline">True</property>
+                      </widget>
+                      <packing>
+                        <property name="type">label_item</property>
+                      </packing>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child internal-child="action_area">
+          <widget class="GtkHButtonBox" id="dialog-action_area1">
+            <property name="visible">True</property>
+            <property name="layout_style">GTK_BUTTONBOX_END</property>
+            <child>
+              <widget class="GtkButton" id="helpbutton1">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="label">gtk-help</property>
+                <property name="use_stock">True</property>
+                <property name="response_id">-11</property>
+                <signal name="clicked" handler="help"/>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkButton" id="cancelbutton1">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="label">gtk-cancel</property>
+                <property name="use_stock">True</property>
+                <property name="response_id">-6</property>
+                <signal name="clicked" handler="closed"/>
+              </widget>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkButton" id="ok">
+                <property name="visible">True</property>
+                <property name="sensitive">False</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="tooltip" translatable="yes">Generate a new key</property>
+                <property name="response_id">-5</property>
+                <signal name="clicked" handler="ok_clicked"/>
+                <child>
+                  <widget class="GtkAlignment" id="alignment1">
+                    <property name="visible">True</property>
+                    <property name="xscale">0</property>
+                    <property name="yscale">0</property>
+                    <child>
+                      <widget class="GtkHBox" id="hbox1">
+                        <property name="visible">True</property>
+                        <property name="spacing">2</property>
+                        <child>
+                          <widget class="GtkImage" id="image1">
+                            <property name="visible">True</property>
+                            <property name="stock">gtk-ok</property>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkLabel" id="label44">
+                            <property name="visible">True</property>
+                            <property name="label" translatable="yes">C_reate</property>
+                            <property name="use_underline">True</property>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </widget>
+                    </child>
+                  </widget>
+                </child>
+              </widget>
+              <packing>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="pack_type">GTK_PACK_END</property>
+          </packing>
+        </child>
+      </widget>
+    </child>
+  </widget>
 </glade-interface>
Index: src/seahorse-ssh-key-properties.c
===================================================================
--- src/seahorse-ssh-key-properties.c	(revision 2165)
+++ src/seahorse-ssh-key-properties.c	(working copy)
@@ -19,7 +19,8 @@
  * Boston, MA 02111-1307, USA.
  */
 #include <config.h>
-#include <gnome.h>
+
+#include <glib/gi18n.h>
 
 #include "seahorse-key-widget.h"
 #include "seahorse-util.h"
Index: src/seahorse-ssh-generate.c
===================================================================
--- src/seahorse-ssh-generate.c	(revision 2165)
+++ src/seahorse-ssh-generate.c	(working copy)
@@ -20,7 +20,10 @@
  */
 
 #include "config.h"
-#include <gnome.h>
+
+#include <string.h>
+
+#include <glib/gi18n.h>
 
 #include "seahorse-ssh-source.h"
 #include "seahorse-ssh-key.h"
Index: src/seahorse-add-subkey.c
===================================================================
--- src/seahorse-add-subkey.c	(revision 2165)
+++ src/seahorse-add-subkey.c	(working copy)
@@ -20,7 +20,10 @@
  */
 
 #include <config.h> 
-#include <gnome.h>
+
+#include <glib/gi18n.h>
+
+#include "egg-datetime.h"
  
 #include "seahorse-gpgmex.h"
 #include "seahorse-key-dialogs.h"
@@ -28,7 +31,6 @@
 #include "seahorse-pgp-key-op.h"
 #include "seahorse-util.h"
 
-#define EXPIRES "expires"
 #define LENGTH "length"
 
 enum {
@@ -69,11 +71,38 @@
 	}
 }
 
+static GtkWidget *
+_seahorse_add_subkey_get_expires (SeahorseWidget *swidget)
+{
+    GtkWidget *widget;
+    GList *children;
+
+    g_return_val_if_fail (swidget != NULL, NULL);
+
+    widget = seahorse_widget_get_widget (swidget, "table1");
+    g_return_val_if_fail (widget != NULL, NULL);
+
+    children = gtk_container_get_children (GTK_CONTAINER (widget));
+    g_return_val_if_fail (children, NULL);
+
+    /* The fifth element should be expires */
+    widget = g_list_nth_data (children, 5);
+
+    g_list_free (children);
+
+    return widget;
+}
+
 static void
 never_expires_toggled (GtkToggleButton *togglebutton, SeahorseWidget *swidget)
 {
-	gtk_widget_set_sensitive (glade_xml_get_widget (swidget->xml, EXPIRES),
-		!gtk_toggle_button_get_active (togglebutton));
+    GtkWidget *widget;
+
+    widget = _seahorse_add_subkey_get_expires (swidget);
+    g_return_if_fail (widget);
+
+    gtk_widget_set_sensitive (GTK_WIDGET (widget),
+                              !gtk_toggle_button_get_active (togglebutton));
 }
 
 static void
@@ -105,9 +134,12 @@
 	if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (
 	glade_xml_get_widget (swidget->xml, "never_expires"))))
 		expires = 0;
-	else
-		expires = gnome_date_edit_get_time (GNOME_DATE_EDIT (
-			glade_xml_get_widget (swidget->xml, EXPIRES)));
+	else {
+        widget = _seahorse_add_subkey_get_expires (swidget);
+        g_return_if_fail (widget);
+
+        egg_datetime_get_as_time_t (EGG_DATETIME (widget), &expires);
+   }
 	
 	switch (type) {
 		case 0:
@@ -145,6 +177,7 @@
     GtkTreeModel *model;
     GtkTreeIter iter;
     GtkCellRenderer *renderer;
+    GtkWidget *widget;
 	
 	swidget = seahorse_key_widget_new ("add-subkey", parent, SEAHORSE_KEY (pkey));
 	g_return_if_fail (swidget != NULL);
@@ -198,4 +231,8 @@
 		G_CALLBACK (never_expires_toggled), swidget);
 	glade_xml_signal_connect_data (swidget->xml, "type_changed",
 		G_CALLBACK (type_changed), swidget);
+
+    widget = seahorse_widget_get_widget (swidget, "table1");
+    g_return_if_fail (widget != NULL);
+    gtk_table_attach_defaults (GTK_TABLE (widget), egg_datetime_new (), 1, 2, 2, 3);
 }
Index: src/seahorse-preferences.c
===================================================================
--- src/seahorse-preferences.c	(revision 2165)
+++ src/seahorse-preferences.c	(working copy)
@@ -20,8 +20,6 @@
  * Boston, MA 02111-1307, USA.
  */
 
-#include <gnome.h>
-
 #include "seahorse-prefs.h"
 #include "seahorse-gconf.h"
 #include "seahorse-preferences.h"
Index: src/seahorse-gkeyring-item-properties.c
===================================================================
--- src/seahorse-gkeyring-item-properties.c	(revision 2165)
+++ src/seahorse-gkeyring-item-properties.c	(working copy)
@@ -19,7 +19,8 @@
  * Boston, MA 02111-1307, USA.
  */
 #include <config.h>
-#include <gnome.h>
+
+#include <glib/gi18n.h>
 
 #include "seahorse-key-widget.h"
 #include "seahorse-util.h"
Index: src/seahorse-keyserver-results.glade
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: src/seahorse-gkeyring-item.c
===================================================================
--- src/seahorse-gkeyring-item.c	(revision 2165)
+++ src/seahorse-gkeyring-item.c	(working copy)
@@ -20,7 +20,10 @@
  */
 
 #include "config.h"
-#include <gnome.h>
+
+#include <string.h>
+
+#include <glib/gi18n.h>
 
 #include "seahorse-context.h"
 #include "seahorse-key-source.h"
@@ -35,6 +38,11 @@
 #include "seahorse-ssh-key.h"
 #endif 
 
+/* XXX Copied from libgnomeui */
+#define GNOME_STOCK_AUTHENTICATION      "gnome-stock-authentication"
+#define GNOME_STOCK_BOOK_OPEN           "gnome-stock-book-open"
+#define GNOME_STOCK_BLANK               "gnome-stock-blank"
+
 enum {
     PROP_0,
     PROP_ITEM_ID,
Index: src/seahorse-gkeyring-source.c
===================================================================
--- src/seahorse-gkeyring-source.c	(revision 2165)
+++ src/seahorse-gkeyring-source.c	(working copy)
@@ -20,9 +20,12 @@
  */
 
 #include "config.h"
+
 #include <stdlib.h>
+#include <string.h>
 #include <libintl.h>
-#include <gnome.h>
+
+#include <glib/gi18n.h>
 
 #include "seahorse-gkeyring-source.h"
 #include "seahorse-operation.h"
Index: src/seahorse-pgp-generate.c
===================================================================
--- src/seahorse-pgp-generate.c	(revision 2165)
+++ src/seahorse-pgp-generate.c	(working copy)
@@ -20,7 +20,13 @@
  */
 
 #include "config.h"
-#include <gnome.h>
+
+#include <time.h>
+#include <string.h>
+
+#include <glib/gi18n.h>
+
+#include "egg-datetime.h"
 
 #include "seahorse-pgp-source.h"
 #include "seahorse-pgp-key.h"
@@ -55,12 +61,35 @@
     }
 }
 
+static GtkWidget *
+_seahorse_pgp_generate_get_expiry_date (SeahorseWidget *swidget)
+{
+    GtkWidget *widget;
+    GList *children;
+
+    g_return_val_if_fail (swidget != NULL, NULL);
+
+    widget = seahorse_widget_get_widget (swidget, "expiry-date-container");
+    g_return_val_if_fail (widget != NULL, NULL);
+
+    children = gtk_container_get_children (GTK_CONTAINER (widget));
+    g_return_val_if_fail (children, NULL);
+
+    /* The first widget should be the expiry-date */
+    widget = g_list_nth_data (children, 0);
+
+    g_list_free (children);
+
+    return widget;
+}
+
 static void
 on_response (GtkDialog *dialog, guint response, SeahorseWidget *swidget)
 {
     SeahorsePGPSource *sksrc;
     SeahorseOperation *op;
     GtkWidget *widget;
+    GList *children;
     gchar *name;
     const gchar *email;
     const gchar *comment;
@@ -68,7 +97,7 @@
     gpgme_error_t gerr;
     gint sel;
     guint type;
-    glong expires;
+    time_t expires;
     guint bits;
     
     if (response == GTK_RESPONSE_HELP) {
@@ -122,11 +151,11 @@
     g_return_if_fail (widget != NULL);
     if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)))
         expires = 0;
-    else 
-    {
-        widget = seahorse_widget_get_widget (swidget, "expiry-date");
-        g_return_if_fail (widget != NULL);
-        expires = gnome_date_edit_get_time (GNOME_DATE_EDIT (widget));
+    else {
+        widget = _seahorse_pgp_generate_get_expiry_date (swidget);
+        g_return_if_fail (widget);
+
+        egg_datetime_get_as_time_t (EGG_DATETIME (widget), &expires);
     }
 
     sksrc = SEAHORSE_PGP_SOURCE (g_object_get_data (G_OBJECT (swidget), "key-source"));
@@ -181,8 +210,9 @@
 {
     GtkWidget *widget;
     
-    widget = seahorse_widget_get_widget (swidget, "expiry-date");
-    g_return_if_fail (widget != NULL);
+    widget = _seahorse_pgp_generate_get_expiry_date (swidget);
+    g_return_if_fail (widget);
+
     gtk_widget_set_sensitive (widget, !gtk_toggle_button_get_active (button));
 }
 
@@ -208,7 +238,7 @@
 {
     SeahorseWidget *swidget;
     GtkWidget *widget;
-    gulong expires;
+    time_t expires;
     guint i;
     
     swidget = seahorse_widget_new ("pgp-generate", parent);
@@ -231,12 +261,13 @@
     gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 0);
     algorithm_changed (GTK_COMBO_BOX (widget), swidget);
     
+    expires = time (NULL);
+    expires += (60 * 60 * 24 * 365); /* Seconds in a year */
+
     /* Default expiry date */
-    widget = seahorse_widget_get_widget (swidget, "expiry-date");
+    widget = seahorse_widget_get_widget (swidget, "expiry-date-container");
     g_return_if_fail (widget != NULL);
-    expires = time(NULL);
-    expires += (60 * 60 * 24 * 365); /* Seconds in a year */
-    gnome_date_edit_set_time (GNOME_DATE_EDIT (widget), expires);
+    gtk_box_pack_start (GTK_BOX (widget), egg_datetime_new_from_time_t (expires), TRUE, TRUE, 0);
     
     g_object_ref (sksrc);
     g_object_set_data_full (G_OBJECT (swidget), "key-source", sksrc, g_object_unref);
Index: src/seahorse-ssh-upload.c
===================================================================
--- src/seahorse-ssh-upload.c	(revision 2165)
+++ src/seahorse-ssh-upload.c	(working copy)
@@ -20,7 +20,10 @@
  */
 
 #include <config.h>
-#include <gnome.h>
+
+#include <string.h>
+
+#include <glib/gi18n.h>
 
 #include "seahorse-widget.h"
 #include "seahorse-util.h"
Index: src/seahorse-expires.c
===================================================================
--- src/seahorse-expires.c	(revision 2165)
+++ src/seahorse-expires.c	(working copy)
@@ -20,7 +20,10 @@
  */
  
 #include <config.h>
-#include <gnome.h>
+
+#include <string.h>
+
+#include <glib/gi18n.h>
  
 #include "seahorse-gpgmex.h"
 #include "seahorse-key-dialogs.h"
Index: src/seahorse-key-properties.c
===================================================================
--- src/seahorse-key-properties.c	(revision 2165)
+++ src/seahorse-key-properties.c	(working copy)
@@ -24,8 +24,11 @@
 /* TODO: Make sure to free when getting text from seahorse_pgp_key_* */
 
 #include "config.h"
-#include <gnome.h>
+
 #include <time.h>
+#include <string.h>
+
+#include <glib/gi18n.h>
 
 #include "seahorse-gpgmex.h"
 #include "seahorse-key-dialogs.h"
Index: src/seahorse-key-manager.glade
===================================================================
--- src/seahorse-key-manager.glade	(revision 2165)
+++ src/seahorse-key-manager.glade	(working copy)
@@ -1,775 +1,438 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
+<!--Generated with glade3 3.4.3 on Mon Apr  7 09:08:54 2008 -->
 <glade-interface>
-<requires lib="gnome"/>
-<requires lib="bonobo"/>
-
-<widget class="GnomeApp" id="key-manager">
-  <property name="title" translatable="yes">Passwords and Encryption Keys</property>
-  <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_NONE</property>
-  <property name="modal">False</property>
-  <property name="default_width">640</property>
-  <property name="default_height">476</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_NORMAL</property>
-  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
-  <property name="focus_on_map">True</property>
-  <property name="urgency_hint">False</property>
-  <property name="enable_layout_config">True</property>
-  <signal name="delete_event" handler="quit_event" last_modification_time="Mon, 28 Oct 2002 05:11:14 GMT"/>
-
-  <child internal-child="dock">
-    <widget class="BonoboDock" id="bonobodock1">
-      <property name="visible">True</property>
-      <property name="allow_floating">True</property>
-
-      <child>
-	<widget class="BonoboDockItem" id="bonobodockitem1">
-	  <property name="visible">True</property>
-	  <property name="shadow_type">GTK_SHADOW_NONE</property>
-
-	  <child>
-	    <widget class="GtkVBox" id="menu-placeholder">
-	      <property name="visible">True</property>
-	      <property name="homogeneous">False</property>
-	      <property name="spacing">0</property>
-
-	      <child>
-		<placeholder/>
-	      </child>
-	    </widget>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="placement">BONOBO_DOCK_TOP</property>
-	  <property name="band">0</property>
-	  <property name="position">0</property>
-	  <property name="offset">0</property>
-	  <property name="behavior">BONOBO_DOCK_ITEM_BEH_EXCLUSIVE|BONOBO_DOCK_ITEM_BEH_NEVER_VERTICAL|BONOBO_DOCK_ITEM_BEH_LOCKED</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="BonoboDockItem" id="tool_dock">
-	  <property name="visible">True</property>
-	  <property name="shadow_type">GTK_SHADOW_OUT</property>
-
-	  <child>
-	    <widget class="GtkHBox" id="hbox1">
-	      <property name="visible">True</property>
-	      <property name="homogeneous">False</property>
-	      <property name="spacing">0</property>
-
-	      <child>
-		<widget class="GtkVBox" id="toolbar-placeholder">
-		  <property name="visible">True</property>
-		  <property name="homogeneous">False</property>
-		  <property name="spacing">0</property>
-
-		  <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="GtkHBox" id="hbox1">
-		  <property name="visible">True</property>
-		  <property name="homogeneous">False</property>
-		  <property name="spacing">0</property>
-
-		  <child>
-		    <widget class="GtkLabel" id="label1">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Filter:</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_RIGHT</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">1</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">3</property>
-		      <property name="expand">False</property>
-		      <property name="fill">True</property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkEntry" id="filter">
-		      <property name="width_request">140</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="activates_default">False</property>
-		      <signal name="changed" handler="on_filter_changed" last_modification_time="Thu, 07 Oct 2004 02:48:36 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="label2">
-		      <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">2</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">False</property>
-		  <property name="fill">True</property>
-		</packing>
-	      </child>
-	    </widget>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="placement">BONOBO_DOCK_TOP</property>
-	  <property name="band">1</property>
-	  <property name="position">0</property>
-	  <property name="offset">0</property>
-	  <property name="behavior">BONOBO_DOCK_ITEM_BEH_EXCLUSIVE</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkVBox" id="vbox1">
-	  <property name="visible">True</property>
-	  <property name="homogeneous">False</property>
-	  <property name="spacing">0</property>
-
-	  <child>
-	    <widget class="GtkNotebook" id="notebook">
-	      <property name="border_width">3</property>
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="show_tabs">True</property>
-	      <property name="show_border">True</property>
-	      <property name="tab_pos">GTK_POS_TOP</property>
-	      <property name="scrollable">False</property>
-	      <property name="enable_popup">False</property>
-	      <signal name="switch_page" handler="on_tab_changed" last_modification_time="Fri, 20 May 2005 23:25:06 GMT"/>
-
-	      <child>
-		<widget class="GtkScrolledWindow" id="sec-key-tab">
-		  <property name="border_width">3</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_ALWAYS</property>
-		  <property name="shadow_type">GTK_SHADOW_NONE</property>
-		  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
-		  <child>
-		    <widget class="GtkTreeView" id="sec-key-list">
-		      <property name="border_width">12</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="headers_visible">True</property>
-		      <property name="rules_hint">True</property>
-		      <property name="reorderable">False</property>
-		      <property name="enable_search">True</property>
-		      <property name="fixed_height_mode">False</property>
-		      <property name="hover_selection">False</property>
-		      <property name="hover_expand">False</property>
-		      <signal name="row_activated" handler="row_activated" last_modification_time="Thu, 07 Nov 2002 04:38:39 GMT"/>
-		      <signal name="button_press_event" handler="key_list_button_pressed" last_modification_time="Wed, 12 Feb 2003 02:29:41 GMT"/>
-		      <signal name="popup_menu" handler="key_list_popup_menu" last_modification_time="Sun, 02 Mar 2003 19:43:39 GMT"/>
-		    </widget>
-		  </child>
-		</widget>
-		<packing>
-		  <property name="tab_expand">False</property>
-		  <property name="tab_fill">True</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="label13">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">My _Personal Keys</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">3</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">tab</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkScrolledWindow" id="trust-key-tab">
-		  <property name="border_width">3</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_ALWAYS</property>
-		  <property name="shadow_type">GTK_SHADOW_NONE</property>
-		  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
-		  <child>
-		    <widget class="GtkTreeView" id="trust-key-list">
-		      <property name="border_width">12</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="headers_visible">True</property>
-		      <property name="rules_hint">True</property>
-		      <property name="reorderable">False</property>
-		      <property name="enable_search">True</property>
-		      <property name="fixed_height_mode">False</property>
-		      <property name="hover_selection">False</property>
-		      <property name="hover_expand">False</property>
-		      <signal name="row_activated" handler="row_activated" last_modification_time="Thu, 07 Nov 2002 04:38:39 GMT"/>
-		      <signal name="button_press_event" handler="key_list_button_pressed" last_modification_time="Wed, 12 Feb 2003 02:29:41 GMT"/>
-		      <signal name="popup_menu" handler="key_list_popup_menu" last_modification_time="Sun, 02 Mar 2003 19:43:39 GMT"/>
-		    </widget>
-		  </child>
-		</widget>
-		<packing>
-		  <property name="tab_expand">False</property>
-		  <property name="tab_fill">True</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="label15">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">_Trusted Keys</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">3</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">tab</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkScrolledWindow" id="pub-key-tab">
-		  <property name="border_width">3</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_ALWAYS</property>
-		  <property name="shadow_type">GTK_SHADOW_NONE</property>
-		  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
-		  <child>
-		    <widget class="GtkTreeView" id="pub-key-list">
-		      <property name="border_width">12</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="headers_visible">True</property>
-		      <property name="rules_hint">True</property>
-		      <property name="reorderable">False</property>
-		      <property name="enable_search">True</property>
-		      <property name="fixed_height_mode">False</property>
-		      <property name="hover_selection">False</property>
-		      <property name="hover_expand">False</property>
-		      <signal name="row_activated" handler="row_activated" last_modification_time="Thu, 07 Nov 2002 04:38:39 GMT"/>
-		      <signal name="button_press_event" handler="key_list_button_pressed" last_modification_time="Wed, 12 Feb 2003 02:29:41 GMT"/>
-		      <signal name="popup_menu" handler="key_list_popup_menu" last_modification_time="Sun, 02 Mar 2003 19:43:39 GMT"/>
-		    </widget>
-		  </child>
-		</widget>
-		<packing>
-		  <property name="tab_expand">False</property>
-		  <property name="tab_fill">True</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="label14">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">Other _Collected Keys</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">3</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">tab</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkScrolledWindow" id="password-tab">
-		  <property name="border_width">3</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_ALWAYS</property>
-		  <property name="shadow_type">GTK_SHADOW_NONE</property>
-		  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
-		  <child>
-		    <widget class="GtkTreeView" id="password-list">
-		      <property name="border_width">12</property>
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="headers_visible">True</property>
-		      <property name="rules_hint">True</property>
-		      <property name="reorderable">False</property>
-		      <property name="enable_search">True</property>
-		      <property name="fixed_height_mode">False</property>
-		      <property name="hover_selection">False</property>
-		      <property name="hover_expand">False</property>
-		      <signal name="row_activated" handler="row_activated" last_modification_time="Thu, 07 Nov 2002 04:38:39 GMT"/>
-		      <signal name="button_press_event" handler="key_list_button_pressed" last_modification_time="Wed, 12 Feb 2003 02:29:41 GMT"/>
-		      <signal name="popup_menu" handler="key_list_popup_menu" last_modification_time="Sun, 02 Mar 2003 19:43:39 GMT"/>
-		    </widget>
-		  </child>
-		</widget>
-		<packing>
-		  <property name="tab_expand">False</property>
-		  <property name="tab_fill">True</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="label16">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">_Passwords</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">3</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">tab</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="GtkAlignment" id="alignment3">
-	      <property name="visible">True</property>
-	      <property name="xalign">0</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xscale">1</property>
-	      <property name="yscale">0</property>
-	      <property name="top_padding">0</property>
-	      <property name="bottom_padding">0</property>
-	      <property name="left_padding">0</property>
-	      <property name="right_padding">0</property>
-
-	      <child>
-		<widget class="GtkVBox" id="first-time-box">
-		  <property name="border_width">12</property>
-		  <property name="homogeneous">False</property>
-		  <property name="spacing">6</property>
-
-		  <child>
-		    <widget class="GtkLabel" id="label8">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">&lt;big&gt;&lt;b&gt;First time options:&lt;/b&gt;&lt;/big&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">6</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="GtkHSeparator" id="hseparator2">
-		      <property name="visible">True</property>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">True</property>
-		      <property name="fill">True</property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkTable" id="table3">
-		      <property name="border_width">6</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">12</property>
-
-		      <child>
-			<widget class="GtkLabel" id="label9">
-			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">To get started with encryption you will need keys.</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">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">0</property>
-			  <property name="bottom_attach">1</property>
-			  <property name="x_options">fill</property>
-			  <property name="y_options"></property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkButton" id="help-button">
-			  <property name="visible">True</property>
-			  <property name="can_default">True</property>
-			  <property name="has_default">True</property>
-			  <property name="can_focus">True</property>
-			  <property name="has_focus">True</property>
-			  <property name="label">gtk-help</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="help" last_modification_time="Tue, 26 Oct 2004 01:51:22 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>
-
-		      <child>
-			<widget class="GtkLabel" id="label10">
-			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">Import existing keys from a file:</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">1</property>
-			  <property name="bottom_attach">2</property>
-			  <property name="x_options">fill</property>
-			  <property name="y_options"></property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkButton" id="import-button">
-			  <property name="visible">True</property>
-			  <property name="can_default">True</property>
-			  <property name="has_default">True</property>
-			  <property name="can_focus">True</property>
-			  <property name="has_focus">True</property>
-			  <property name="relief">GTK_RELIEF_NORMAL</property>
-			  <property name="focus_on_click">True</property>
-			  <signal name="clicked" handler="import_button_clicked" last_modification_time="Tue, 26 Oct 2004 01:53:24 GMT"/>
-
-			  <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">0</property>
-			      <property name="yscale">0</property>
-			      <property name="top_padding">0</property>
-			      <property name="bottom_padding">0</property>
-			      <property name="left_padding">0</property>
-			      <property name="right_padding">0</property>
-
-			      <child>
-				<widget class="GtkHBox" id="hbox3">
-				  <property name="visible">True</property>
-				  <property name="homogeneous">False</property>
-				  <property name="spacing">2</property>
-
-				  <child>
-				    <widget class="GtkImage" id="image1774">
-				      <property name="visible">True</property>
-				      <property name="stock">gtk-open</property>
-				      <property name="icon_size">4</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="padding">0</property>
-				      <property name="expand">False</property>
-				      <property name="fill">False</property>
-				    </packing>
-				  </child>
-
-				  <child>
-				    <widget class="GtkLabel" id="label11">
-				      <property name="visible">True</property>
-				      <property name="label" translatable="yes">_Import</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="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>
-			</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="label12">
-			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">Generate a new key of your own: </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">2</property>
-			  <property name="bottom_attach">3</property>
-			  <property name="x_options">fill</property>
-			  <property name="y_options"></property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkButton" id="new-button">
-			  <property name="visible">True</property>
-			  <property name="can_focus">True</property>
-			  <property name="label">gtk-new</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="new_button_clicked" last_modification_time="Tue, 26 Oct 2004 01:53:14 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="x_options">fill</property>
-			  <property name="y_options"></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>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">False</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkHBox" id="status-bar-area">
-	      <property name="visible">True</property>
-	      <property name="homogeneous">False</property>
-	      <property name="spacing">0</property>
-
-	      <child>
-		<widget class="GtkProgressBar" id="progress">
-		  <property name="visible">True</property>
-		  <property name="orientation">GTK_PROGRESS_LEFT_TO_RIGHT</property>
-		  <property name="fraction">0</property>
-		  <property name="pulse_step">0.10000000149</property>
-		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		</widget>
-		<packing>
-		  <property name="padding">0</property>
-		  <property name="expand">False</property>
-		  <property name="fill">False</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkStatusbar" id="status">
-		  <property name="visible">True</property>
-		  <property name="has_resize_grip">True</property>
-		</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">False</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-	</widget>
-      </child>
-    </widget>
-    <packing>
-      <property name="padding">0</property>
-      <property name="expand">True</property>
-      <property name="fill">True</property>
-    </packing>
-  </child>
-</widget>
-
+  <widget class="GtkWindow" id="key-manager">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <child>
+      <widget class="GtkVBox" id="vbox1">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <child>
+          <widget class="GtkVBox" id="menu-placeholder">
+            <property name="visible">True</property>
+            <child>
+              <placeholder/>
+            </child>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+          </packing>
+        </child>
+        <child>
+          <widget class="GtkHBox" id="hbox11">
+            <property name="visible">True</property>
+            <child>
+              <widget class="GtkVBox" id="toolbar-placeholder">
+                <property name="visible">True</property>
+                <child>
+                  <placeholder/>
+                </child>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkHBox" id="hbox12">
+                <property name="visible">True</property>
+                <child>
+                  <widget class="GtkLabel" id="label36">
+                    <property name="visible">True</property>
+                    <property name="xalign">1</property>
+                    <property name="xpad">1</property>
+                    <property name="label" translatable="yes">Filter:</property>
+                    <property name="justify">GTK_JUSTIFY_RIGHT</property>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="padding">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkEntry" id="filter">
+                    <property name="width_request">140</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkLabel" id="label37">
+                    <property name="visible">True</property>
+                    <property name="xpad">2</property>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child>
+          <widget class="GtkNotebook" id="notebook">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="border_width">3</property>
+            <child>
+              <widget class="GtkScrolledWindow" id="sec-key-tab">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="border_width">3</property>
+                <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+                <child>
+                  <widget class="GtkTreeView" id="sec-key-list">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="border_width">12</property>
+                    <property name="rules_hint">True</property>
+                    <signal name="popup_menu" handler="key_list_popup_menu"/>
+                    <signal name="button_press_event" handler="key_list_button_pressed"/>
+                    <signal name="row_activated" handler="row_activated"/>
+                  </widget>
+                </child>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkLabel" id="label26">
+                <property name="visible">True</property>
+                <property name="xpad">3</property>
+                <property name="label" translatable="yes">My _Personal Keys</property>
+                <property name="use_underline">True</property>
+              </widget>
+              <packing>
+                <property name="type">tab</property>
+                <property name="tab_fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkScrolledWindow" id="trust-key-tab">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="border_width">3</property>
+                <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+                <child>
+                  <widget class="GtkTreeView" id="trust-key-list">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="border_width">12</property>
+                    <property name="rules_hint">True</property>
+                    <signal name="popup_menu" handler="key_list_popup_menu"/>
+                    <signal name="button_press_event" handler="key_list_button_pressed"/>
+                    <signal name="row_activated" handler="row_activated"/>
+                  </widget>
+                </child>
+              </widget>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkLabel" id="label27">
+                <property name="visible">True</property>
+                <property name="xpad">3</property>
+                <property name="label" translatable="yes">_Trusted Keys</property>
+                <property name="use_underline">True</property>
+              </widget>
+              <packing>
+                <property name="type">tab</property>
+                <property name="position">1</property>
+                <property name="tab_fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkScrolledWindow" id="pub-key-tab">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="border_width">3</property>
+                <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+                <child>
+                  <widget class="GtkTreeView" id="pub-key-list">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="border_width">12</property>
+                    <property name="rules_hint">True</property>
+                    <signal name="popup_menu" handler="key_list_popup_menu"/>
+                    <signal name="button_press_event" handler="key_list_button_pressed"/>
+                    <signal name="row_activated" handler="row_activated"/>
+                  </widget>
+                </child>
+              </widget>
+              <packing>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkLabel" id="label28">
+                <property name="visible">True</property>
+                <property name="xpad">3</property>
+                <property name="label" translatable="yes">Other _Collected Keys</property>
+                <property name="use_underline">True</property>
+              </widget>
+              <packing>
+                <property name="type">tab</property>
+                <property name="position">2</property>
+                <property name="tab_fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkScrolledWindow" id="password-tab">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="border_width">3</property>
+                <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+                <child>
+                  <widget class="GtkTreeView" id="password-list">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="border_width">12</property>
+                    <property name="rules_hint">True</property>
+                    <signal name="popup_menu" handler="key_list_popup_menu"/>
+                    <signal name="button_press_event" handler="key_list_button_pressed"/>
+                    <signal name="row_activated" handler="row_activated"/>
+                  </widget>
+                </child>
+              </widget>
+              <packing>
+                <property name="position">3</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkLabel" id="label29">
+                <property name="visible">True</property>
+                <property name="xpad">3</property>
+                <property name="label" translatable="yes">_Passwords</property>
+                <property name="use_underline">True</property>
+              </widget>
+              <packing>
+                <property name="type">tab</property>
+                <property name="position">3</property>
+                <property name="tab_fill">False</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="position">2</property>
+          </packing>
+        </child>
+        <child>
+          <widget class="GtkAlignment" id="alignment5">
+            <property name="visible">True</property>
+            <property name="xalign">0</property>
+            <property name="yscale">0</property>
+            <child>
+              <widget class="GtkVBox" id="first-time-box">
+                <property name="border_width">12</property>
+                <property name="spacing">6</property>
+                <child>
+                  <widget class="GtkLabel" id="label17">
+                    <property name="visible">True</property>
+                    <property name="xalign">0</property>
+                    <property name="xpad">6</property>
+                    <property name="label" translatable="yes">&lt;big&gt;&lt;b&gt;First time options:&lt;/b&gt;&lt;/big&gt;</property>
+                    <property name="use_markup">True</property>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkHSeparator" id="hseparator3">
+                    <property name="visible">True</property>
+                  </widget>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="GtkTable" id="table2">
+                    <property name="visible">True</property>
+                    <property name="border_width">6</property>
+                    <property name="n_rows">3</property>
+                    <property name="n_columns">2</property>
+                    <property name="column_spacing">12</property>
+                    <property name="row_spacing">6</property>
+                    <child>
+                      <widget class="GtkButton" id="new-button">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="label">gtk-new</property>
+                        <property name="use_stock">True</property>
+                        <property name="response_id">0</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">GTK_FILL</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label21">
+                        <property name="visible">True</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">Generate a new key of your own: </property>
+                      </widget>
+                      <packing>
+                        <property name="top_attach">2</property>
+                        <property name="bottom_attach">3</property>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkButton" id="import-button">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="has_focus">True</property>
+                        <property name="can_default">True</property>
+                        <property name="has_default">True</property>
+                        <property name="response_id">0</property>
+                        <child>
+                          <widget class="GtkAlignment" id="alignment6">
+                            <property name="visible">True</property>
+                            <property name="xscale">0</property>
+                            <property name="yscale">0</property>
+                            <child>
+                              <widget class="GtkHBox" id="hbox4">
+                                <property name="visible">True</property>
+                                <property name="spacing">2</property>
+                                <child>
+                                  <widget class="GtkImage" id="image2">
+                                    <property name="visible">True</property>
+                                    <property name="stock">gtk-open</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <widget class="GtkLabel" id="label20">
+                                    <property name="visible">True</property>
+                                    <property name="label" translatable="yes">_Import</property>
+                                    <property name="use_underline">True</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </widget>
+                            </child>
+                          </widget>
+                        </child>
+                      </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">GTK_FILL</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label19">
+                        <property name="visible">True</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">Import existing keys from a file:</property>
+                      </widget>
+                      <packing>
+                        <property name="top_attach">1</property>
+                        <property name="bottom_attach">2</property>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkButton" id="help-button">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="has_focus">True</property>
+                        <property name="can_default">True</property>
+                        <property name="has_default">True</property>
+                        <property name="label">gtk-help</property>
+                        <property name="use_stock">True</property>
+                        <property name="response_id">0</property>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label18">
+                        <property name="visible">True</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">To get started with encryption you will need keys.</property>
+                        <property name="wrap">True</property>
+                      </widget>
+                      <packing>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
+              </widget>
+            </child>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="position">3</property>
+          </packing>
+        </child>
+        <child>
+          <widget class="GtkHBox" id="status-bar-area">
+            <property name="visible">True</property>
+            <child>
+              <widget class="GtkProgressBar" id="progress">
+                <property name="visible">True</property>
+                <property name="pulse_step">0.10000000149</property>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkStatusbar" id="status">
+                <property name="visible">True</property>
+              </widget>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="position">4</property>
+          </packing>
+        </child>
+      </widget>
+    </child>
+  </widget>
 </glade-interface>
Index: src/seahorse-revoke.c
===================================================================
--- src/seahorse-revoke.c	(revision 2165)
+++ src/seahorse-revoke.c	(working copy)
@@ -20,7 +20,10 @@
  */
 
 #include <config.h> 
-#include <gnome.h>
+
+#include <string.h>
+
+#include <glib/gi18n.h>
  
 #include "seahorse-gpgmex.h"
 #include "seahorse-key-dialogs.h"
Index: src/seahorse-key-widget.c
===================================================================
--- src/seahorse-key-widget.c	(revision 2165)
+++ src/seahorse-key-widget.c	(working copy)
@@ -19,8 +19,6 @@
  * Boston, MA 02111-1307, USA.
  */
 
-#include <gnome.h>
-
 #include "seahorse-key-widget.h"
 
 #define PROPERTIES "key-properties"
Index: src/seahorse-keyserver-results.c
===================================================================
--- src/seahorse-keyserver-results.c	(revision 2165)
+++ src/seahorse-keyserver-results.c	(working copy)
@@ -20,7 +20,10 @@
  */
 
 #include <config.h>
-#include <gnome.h>
+
+#include <string.h>
+
+#include <glib/gi18n.h>
 
 #include "seahorse-gpgmex.h"
 #include "seahorse-windows.h"
Index: src/seahorse-keyserver-search.c
===================================================================
--- src/seahorse-keyserver-search.c	(revision 2165)
+++ src/seahorse-keyserver-search.c	(working copy)
@@ -19,7 +19,6 @@
  * Boston, MA 02111-1307, USA.
  */
 
-#include <gnome.h>
 
 #include "seahorse-widget.h"
 #include "seahorse-gpgmex.h"
Index: src/seahorse-keyserver-sync.c
===================================================================
--- src/seahorse-keyserver-sync.c	(revision 2165)
+++ src/seahorse-keyserver-sync.c	(working copy)
@@ -20,7 +20,8 @@
  */
 
 #include <config.h>
-#include <gnome.h>
+
+#include <glib/gi18n.h>
 
 #include "seahorse-widget.h"
 #include "seahorse-util.h"
Index: src/seahorse-key-manager-store.c
===================================================================
--- src/seahorse-key-manager-store.c	(revision 2165)
+++ src/seahorse-key-manager-store.c	(working copy)
@@ -21,7 +21,10 @@
  */
 
 #include "config.h"
-#include <gnome.h>
+
+#include <string.h>
+
+#include <glib/gi18n.h>
 
 #include "seahorse-key-manager-store.h"
 #include "seahorse-preferences.h"
Index: src/seahorse-key-manager.c
===================================================================
--- src/seahorse-key-manager.c	(revision 2165)
+++ src/seahorse-key-manager.c	(working copy)
@@ -21,7 +21,11 @@
  */
 
 #include "config.h"
-#include <gnome.h>
+
+#include <string.h>
+
+#include <glib/gi18n.h>
+
 #include <gconf/gconf-client.h>
 #include <libgnomevfs/gnome-vfs.h>
 
@@ -814,7 +818,7 @@
                                            const gchar *url,
                                            gpointer data)
 {
-    gnome_url_show (url, NULL);
+   gnome_vfs_url_show (url);
 }
 
 /* Shows about dialog */
@@ -1355,9 +1359,10 @@
 		G_CALLBACK (row_activated), swidget);
 	glade_xml_signal_connect_data (swidget->xml, "key_list_button_pressed",
 		G_CALLBACK (key_list_button_pressed), swidget);
+
 	glade_xml_signal_connect_data (swidget->xml, "key_list_popup_menu",
 		G_CALLBACK (key_list_popup_menu), swidget);
-        
+
 	/* first time signals */
 	glade_xml_signal_connect_data (swidget->xml, "import_button_clicked",
 		G_CALLBACK (import_activate), swidget);
@@ -1376,6 +1381,8 @@
     /* Set focus to the current key list */
     w = GTK_WIDGET (get_current_view (swidget));
     gtk_widget_grab_focus (w);
+
+/* glade_xml_signal_autoconnect (swidget->xml); */
     
     /* To avoid flicker */
     seahorse_widget_show (swidget);
Index: src/seahorse-generate-select.c
===================================================================
--- src/seahorse-generate-select.c	(revision 2165)
+++ src/seahorse-generate-select.c	(working copy)
@@ -20,7 +20,8 @@
  */
 
 #include "config.h"
-#include <gnome.h>
+
+#include <glib/gi18n.h>
 
 #include "seahorse-widget.h"
 #include "seahorse-util.h"
Index: src/seahorse-photos.c
===================================================================
--- src/seahorse-photos.c	(revision 2165)
+++ src/seahorse-photos.c	(working copy)
@@ -24,7 +24,8 @@
 #include <sys/stat.h>
 #include <errno.h>
 
-#include <gnome.h>
+#include <glib/gi18n.h>
+
 #include <gdk-pixbuf/gdk-pixbuf.h>
 
 #include "seahorse-widget.h"
Index: src/main.c
===================================================================
--- src/main.c	(revision 2165)
+++ src/main.c	(working copy)
@@ -21,9 +21,13 @@
  */
 
 #include <config.h>
-#include <gnome.h>
-#include <libgnomevfs/gnome-vfs.h>
+
 #include <locale.h>
+#include <stdlib.h>
+
+#include <glib/gi18n.h>
+
+#include <libgnomevfs/gnome-vfs.h>
 
 #include "seahorse-context.h"
 #include "seahorse-windows.h"
@@ -57,9 +61,12 @@
     gpgme_set_locale(NULL, LC_MESSAGES, setlocale(LC_MESSAGES, NULL));
 #endif
 
-    gnome_program_init(PACKAGE, VERSION, LIBGNOMEUI_MODULE, argc, argv,
-                       GNOME_PARAM_HUMAN_READABLE_NAME, _("Encryption Key Manager"),
-                       GNOME_PARAM_APP_DATADIR, DATA_DIR, NULL);
+    gtk_init_with_args (&argc, &argv, _("Encryption Key Manager"), NULL, GETTEXT_PACKAGE, NULL);
+
+    if (!gnome_vfs_init ()) {
+        g_critical ("Could not initialize GnomeVFS\n");
+        return EXIT_FAILURE;
+    }
 
     /* Insert Icons into Stock */ 
     seahorse_gtkstock_init();
Index: src/seahorse-gkeyring-operation.c
===================================================================
--- src/seahorse-gkeyring-operation.c	(revision 2165)
+++ src/seahorse-gkeyring-operation.c	(working copy)
@@ -20,11 +20,13 @@
  */
 
 #include "config.h"
+
 #include <sys/wait.h>
 #include <sys/socket.h>
-#include <gnome.h>
 #include <fcntl.h>
 
+#include <glib/gi18n.h>
+
 #include "seahorse-gkeyring-operation.h"
 #include "seahorse-util.h"
 #include "seahorse-gpgmex.h"
Index: src/Makefile.am
===================================================================
--- src/Makefile.am	(revision 2165)
+++ src/Makefile.am	(working copy)
@@ -5,6 +5,7 @@
 
 INCLUDES = -I$(top_builddir) \
 	-I$(top_srcdir) \
+	-I$(top_srcdir)/libegg \
 	-I$(top_srcdir)/libcryptui \
 	-I$(top_srcdir)/libseahorse \
 	$(SEAHORSE_CFLAGS) \
@@ -60,6 +61,7 @@
 seahorse_LDADD = \
 	$(top_builddir)/libseahorse/libseahorse.a \
 	$(top_builddir)/libcryptui/libcryptui.la \
+	$(top_builddir)/libegg/libeggdatetime.la \
 	$(SEAHORSE_LIBS)
 
 glade_DATA = \
Index: src/seahorse-add-subkey.glade
===================================================================
--- src/seahorse-add-subkey.glade	(revision 2165)
+++ src/seahorse-add-subkey.glade	(working copy)
@@ -2,7 +2,6 @@
 <!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
 <!--*- mode: xml -*-->
 <glade-interface>
-  <requires lib="gnome"/>
   <widget class="GtkDialog" id="add-subkey">
     <property name="visible">True</property>
     <property name="border_width">5</property>
@@ -22,50 +21,32 @@
             <property name="column_spacing">12</property>
             <property name="row_spacing">6</property>
             <child>
-              <widget class="GtkComboBox" id="type">
-                <property name="visible">True</property>
-                <signal name="changed" handler="type_changed"/>
-              </widget>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="right_attach">3</property>
-                <property name="y_options"></property>
-              </packing>
+              <placeholder/>
             </child>
             <child>
-              <widget class="GtkSpinButton" id="length">
+              <widget class="GtkLabel" id="label1">
                 <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="adjustment">1024 768 1024 32 128 128</property>
-                <property name="climb_rate">128</property>
-                <property name="snap_to_ticks">True</property>
-                <property name="numeric">True</property>
-                <property name="tooltip" translatable="yes">Length of Key</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">Key _Type:</property>
+                <property name="use_underline">True</property>
+                <property name="mnemonic_widget">type</property>
               </widget>
               <packing>
-                <property name="left_attach">1</property>
-                <property name="right_attach">3</property>
-                <property name="top_attach">1</property>
-                <property name="bottom_attach">2</property>
+                <property name="x_options">GTK_FILL</property>
                 <property name="y_options"></property>
               </packing>
             </child>
             <child>
-              <widget class="GtkCheckButton" id="never_expires">
+              <widget class="GtkLabel" id="label2">
                 <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="label" translatable="yes">Never E_xpires</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">Key _Length:</property>
                 <property name="use_underline">True</property>
-                <property name="active">True</property>
-                <property name="draw_indicator">True</property>
-                <property name="tooltip" translatable="yes">If key never expires</property>
-                <signal name="toggled" handler="never_expires_toggled"/>
+                <property name="mnemonic_widget">length</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="top_attach">1</property>
+                <property name="bottom_attach">2</property>
                 <property name="x_options">GTK_FILL</property>
                 <property name="y_options"></property>
               </packing>
@@ -84,44 +65,52 @@
               </packing>
             </child>
             <child>
-              <widget class="GnomeDateEdit" id="expires">
+              <widget class="GtkCheckButton" id="never_expires">
                 <property name="visible">True</property>
-                <property name="sensitive">False</property>
-                <property name="dateedit_flags"></property>
+                <property name="can_focus">True</property>
+                <property name="tooltip" translatable="yes">If key never expires</property>
+                <property name="label" translatable="yes">Never E_xpires</property>
+                <property name="use_underline">True</property>
+                <property name="response_id">0</property>
+                <property name="active">True</property>
+                <property name="draw_indicator">True</property>
+                <signal name="toggled" handler="never_expires_toggled"/>
               </widget>
               <packing>
-                <property name="left_attach">1</property>
-                <property name="right_attach">2</property>
+                <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="x_options">GTK_FILL</property>
                 <property name="y_options"></property>
               </packing>
             </child>
             <child>
-              <widget class="GtkLabel" id="label2">
+              <widget class="GtkSpinButton" id="length">
                 <property name="visible">True</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">Key _Length:</property>
-                <property name="use_underline">True</property>
-                <property name="mnemonic_widget">length</property>
+                <property name="can_focus">True</property>
+                <property name="tooltip" translatable="yes">Length of Key</property>
+                <property name="adjustment">1024 768 1024 32 128 128</property>
+                <property name="climb_rate">128</property>
+                <property name="snap_to_ticks">True</property>
+                <property name="numeric">True</property>
               </widget>
               <packing>
+                <property name="left_attach">1</property>
+                <property name="right_attach">3</property>
                 <property name="top_attach">1</property>
                 <property name="bottom_attach">2</property>
-                <property name="x_options">GTK_FILL</property>
                 <property name="y_options"></property>
               </packing>
             </child>
             <child>
-              <widget class="GtkLabel" id="label1">
+              <widget class="GtkComboBox" id="type">
                 <property name="visible">True</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">Key _Type:</property>
-                <property name="use_underline">True</property>
-                <property name="mnemonic_widget">type</property>
+                <signal name="changed" handler="type_changed"/>
               </widget>
               <packing>
-                <property name="x_options">GTK_FILL</property>
+                <property name="left_attach">1</property>
+                <property name="right_attach">3</property>
                 <property name="y_options"></property>
               </packing>
             </child>
@@ -165,9 +154,9 @@
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
                 <property name="has_default">True</property>
+                <property name="tooltip" translatable="yes">Generate a new subkey</property>
                 <property name="label">gtk-ok</property>
                 <property name="use_stock">True</property>
-                <property name="tooltip" translatable="yes">Generate a new subkey</property>
                 <property name="response_id">-5</property>
                 <signal name="clicked" handler="ok_clicked"/>
               </widget>
Index: libegg/egg-datetime.h
===================================================================
--- libegg/egg-datetime.h	(revision 0)
+++ libegg/egg-datetime.h	(revision 0)
@@ -0,0 +1,124 @@
+/*
+ * Copyright (C) 2002, 2003  Sebastian Rittau <srittau@jroger.in-berlin.de>
+ * $Id$
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with the Gnome Library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __EGG_DATETIME_H__
+#define __EGG_DATETIME_H__
+
+#include <time.h>
+
+#include <glib.h>
+
+#include <gtk/gtkhbox.h>
+
+G_BEGIN_DECLS
+
+typedef enum
+{
+   /* don't use the following values for now... */
+   EGG_DATETIME_DISPLAY_YEAR       = 1 << 0,
+   EGG_DATETIME_DISPLAY_MONTH      = 1 << 1,
+   EGG_DATETIME_DISPLAY_DAY        = 1 << 2,
+   EGG_DATETIME_DISPLAY_HOUR       = 1 << 3,
+   EGG_DATETIME_DISPLAY_MINUTE     = 1 << 4,
+   EGG_DATETIME_DISPLAY_SECOND     = 1 << 5,
+   EGG_DATETIME_DISPLAY_YEAR_OPT   = 1 << 6,
+   EGG_DATETIME_DISPLAY_MONTH_OPT  = 1 << 7,
+   EGG_DATETIME_DISPLAY_DAY_OPT    = 1 << 8,
+   EGG_DATETIME_DISPLAY_HOUR_OPT   = 1 << 9,
+   EGG_DATETIME_DISPLAY_MINUTE_OPT = 1 << 10,
+   EGG_DATETIME_DISPLAY_SECOND_OPT = 1 << 11
+} EggDateTimeDisplayMode;
+
+/* ... use these instead */
+#define EGG_DATETIME_DISPLAY_DATE (EGG_DATETIME_DISPLAY_YEAR | EGG_DATETIME_DISPLAY_MONTH | EGG_DATETIME_DISPLAY_DAY)
+#define EGG_DATETIME_DISPLAY_TIME (EGG_DATETIME_DISPLAY_HOUR | EGG_DATETIME_DISPLAY_MINUTE)
+#define EGG_DATETIME_DISPLAY_TIME_SECONDS (EGG_DATETIME_DISPLAY_HOUR | EGG_DATETIME_DISPLAY_MINUTE | EGG_DATETIME_DISPLAY_SECOND)
+
+#define EGG_DATETIME_INVALID_DATE (0)
+#define EGG_DATETIME_INVALID_TIME (0xff)
+
+
+#define EGG_TYPE_DATETIME     (egg_datetime_get_type ())
+#define EGG_DATETIME(obj)     (G_TYPE_CHECK_INSTANCE_CAST ((obj), EGG_TYPE_DATETIME, EggDateTime))
+#define EGG_DATETIME_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST ((klass), EGG_TYPE_DATETIME, EggDateTimeClass))
+#define EGG_IS_DATETIME(obj)     (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EGG_TYPE_DATETIME))
+#define EGG_IS_DATETIME_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), EGG_TYPE_DATETIME))
+#define EGG_DATETIME_GET_CLASS(obj) (G_TYPE_CHECK_GET_CLASS ((obj), EGG_TYPE_DATETIME, EggDateTimeClass))
+
+typedef struct _EggDateTime      EggDateTime;
+typedef struct _EggDateTimeClass EggDateTimeClass;
+typedef struct _EggDateTimePrivate  EggDateTimePrivate;
+
+struct _EggDateTime
+{
+   GtkHBox parent;
+
+   EggDateTimePrivate *priv;
+};
+
+struct _EggDateTimeClass
+{
+   GtkHBoxClass parent_class;
+
+   /* Signals */
+
+   void (*date_changed) (EggDateTime *edt);
+   void (*time_changed) (EggDateTime *edt);
+};
+
+
+/* Constructors */
+GtkType         egg_datetime_get_type        (void);
+GtkWidget      *egg_datetime_new       (void); 
+GtkWidget      *egg_datetime_new_from_time_t    (time_t t);
+GtkWidget      *egg_datetime_new_from_struct_tm (struct tm *tm);
+GtkWidget      *egg_datetime_new_from_gdate     (GDate *date);
+GtkWidget      *egg_datetime_new_from_datetime     (GDateYear year, GDateMonth month, GDateDay day, guint8 hour, guint8 minute, guint8 second);
+
+/* Accessors */
+void         egg_datetime_set_none        (EggDateTime *edt);
+void         egg_datetime_set_from_time_t    (EggDateTime *edt, time_t t);
+gboolean     egg_datetime_get_as_time_t      (EggDateTime *edt, time_t *t);
+void         egg_datetime_set_from_struct_tm (EggDateTime *edt, struct tm *tm);
+gboolean     egg_datetime_get_as_struct_tm      (EggDateTime *edt, struct tm *tm);
+void         egg_datetime_set_from_gdate     (EggDateTime *edt, GDate *date);
+gboolean     egg_datetime_get_as_gdate    (EggDateTime *edt, GDate *date);
+void         egg_datetime_set_date        (EggDateTime *edt, GDateYear year, GDateMonth month, GDateDay day);
+gboolean     egg_datetime_get_date        (EggDateTime *edt, GDateYear *year, GDateMonth *month, GDateDay *day);
+void         egg_datetime_set_time        (EggDateTime *edt, guint8 hour, guint8 minute, guint8 second);
+gboolean     egg_datetime_get_time        (EggDateTime *edt, guint8 *hour, guint8 *minute, guint8 *second);
+
+void         egg_datetime_set_lazy        (EggDateTime *edt, gboolean lazy);
+gboolean     egg_datetime_get_lazy        (EggDateTime *edt);
+void         egg_datetime_set_display_mode      (EggDateTime *edt, EggDateTimeDisplayMode mode);
+EggDateTimeDisplayMode   egg_datetime_get_display_mode      (EggDateTime *edt);
+
+void         egg_datetime_set_clamp_date     (EggDateTime *edt, GDateYear minyear, GDateMonth minmonth, GDateDay minday, GDateYear maxyear, GDateMonth maxmonth, GDateDay maxday);
+void         egg_datetime_set_clamp_time     (EggDateTime *edt, guint8 minhour, guint8 minminute, guint8 minsecond, guint8 maxhour, guint8 maxminute, guint8 maxsecond);
+void         egg_datetime_set_clamp_time_t      (EggDateTime *edt);
+void         egg_datetime_get_clamp_date     (EggDateTime *edt, GDateYear *minyear, GDateMonth *minmonth, GDateDay *minday, GDateYear *maxyear, GDateMonth *maxmonth, GDateDay *maxday);
+void         egg_datetime_get_clamp_time     (EggDateTime *edt, guint8 *minhour, guint8 *minminute, guint8 *minsecond, guint8 *maxhour, guint8 *maxminute, guint8 *maxsecond);
+
+PangoLayout    *egg_datetime_get_date_layout    (EggDateTime *edt);
+PangoLayout    *egg_datetime_get_time_layout    (EggDateTime *edt);
+
+G_END_DECLS
+
+#endif /* __EGG_DATETIME_H__ */
Index: libegg/Makefile.am
===================================================================
--- libegg/Makefile.am	(revision 0)
+++ libegg/Makefile.am	(revision 0)
@@ -0,0 +1,10 @@
+INCLUDES = -DGTK_DISABLE_DEPRECATED \
+	   -DGDK_DISABLE_DEPRECATED \
+	   -DG_DISABLE_DEPRECATED \
+	   -DGETTEXT_PACKAGE=NULL
+
+noinst_LTLIBRARIES = libeggdatetime.la
+
+libeggdatetime_la_LIBADD = $(GTK_LIBS)
+libeggdatetime_la_CFLAGS = $(GTK_CFLAGS)
+libeggdatetime_la_SOURCES = egg-datetime.h egg-datetime.c
Index: libegg/egg-datetime.c
===================================================================
--- libegg/egg-datetime.c	(revision 0)
+++ libegg/egg-datetime.c	(revision 0)
@@ -0,0 +1,2325 @@
+/*
+ * Copyright (C) 2002-2005  Sebastian Rittau <srittau@jroger.in-berlin.de>
+ * $Id$
+ *
+ * Based on GnomeDateEdit by Miguel de Icaza.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with the Gnome Library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <libintl.h>
+
+#include <stdio.h>
+#include <string.h>
+#include <time.h>
+
+#include <gdk/gdkkeysyms.h>
+#include <gtk/gtk.h>
+
+#include "egg-datetime.h"
+
+#ifdef G_OS_WIN32
+/* The gmtime() in Microsoft's C library *is* thread-safe. It has no gmtime_r(). */
+
+static struct tm *
+gmtime_r (const time_t *timep, struct tm *result)
+{
+  struct tm *tmp = gmtime (timep);
+
+  if (tmp == NULL)
+    return NULL;
+
+  memcpy (result, tmp, sizeof (struct tm));
+
+  return result;
+}
+
+/* Ditto for localtime() and localtime_r(). */
+
+static struct tm *
+localtime_r (const time_t *timep, struct tm *result)
+{
+  struct tm *tmp = localtime (timep);
+
+  if (tmp == NULL)
+    return NULL;
+
+  memcpy (result, tmp, sizeof (struct tm));
+
+  return result;
+}
+
+#endif
+
+#ifndef _
+#define _(x) (x)
+#endif
+
+
+/* TODO:
+ *  o "now" button in calendar popup?
+ *  o timezone support
+ *  o Implement time list as a popup a la Evo, or time as a spin button?
+ *  o In lazy mode: choose a different way to mark an invalid date instead
+ *    of just blanking the widget.
+ */
+
+/* FIXME:
+ *  o limit GtkCalendar to clamp times
+ */
+
+
+/* from libgnomeui */
+static void
+_add_atk_name_desc (GtkWidget *widget, gchar *name, gchar *desc)
+{
+   AtkObject *aobj;
+
+   g_return_if_fail (GTK_IS_WIDGET (widget));
+
+   aobj = gtk_widget_get_accessible (widget);
+
+   if (name)
+      atk_object_set_name (aobj, name);
+   if (desc)
+      atk_object_set_description (aobj, desc);
+}
+
+static void
+_add_atk_relation (GtkWidget *widget1, GtkWidget *widget2,
+         AtkRelationType w1_to_w2, AtkRelationType w2_to_w1)
+{
+   AtkObject      *atk_widget1;
+   AtkObject      *atk_widget2;
+   AtkRelationSet *relation_set;
+   AtkRelation    *relation;
+   AtkObject      *targets[1];
+
+   atk_widget1 = gtk_widget_get_accessible (widget1);
+   atk_widget2 = gtk_widget_get_accessible (widget2);
+
+   /* Create the widget1 -> widget2 relation */
+   relation_set = atk_object_ref_relation_set (atk_widget1);
+   targets[0] = atk_widget2;
+   relation = atk_relation_new (targets, 1, w1_to_w2);
+   atk_relation_set_add (relation_set, relation);
+   g_object_unref (relation);
+
+   /* Create the widget2 -> widget1 relation */
+   relation_set = atk_object_ref_relation_set (atk_widget2);
+   targets[0] = atk_widget1;
+   relation = atk_relation_new (targets, 1, w2_to_w1);
+   atk_relation_set_add (relation_set, relation);
+   g_object_unref (relation);
+}
+
+/*
+ * Time List Declarations
+ */
+
+#define TIMELIST(x) GTK_SCROLLED_WINDOW(x)
+#define Timelist GtkScrolledWindow
+
+static GtkWidget *timelist_new (void);
+static void timelist_set_list (Timelist *timelist, guint8 minhour, guint8 minminute, guint8 maxhour, guint8 maxminute);
+static void timelist_set_time (Timelist *timelist, guint8 hour, guint8 minute);
+static gboolean timelist_get_time (Timelist *timelist, guint8 *hour, guint8 *minute);
+static void timelist_clamp (Timelist *timelist, guint8 minhour, guint8 minminute, guint8 maxhour, guint8 maxminute);
+static void timelist_set_selection_callback (Timelist *timelist, void (*cb)(void), gpointer data);
+
+/*
+ * Class and Object Handling
+ */
+
+struct _EggDateTimePrivate
+{
+   /* Children */
+
+   GtkWidget *date_box;
+   GtkWidget *date_entry;
+   GtkWidget *date_button;
+   GtkWidget *time_box;
+   GtkWidget *time_entry;
+   GtkWidget *time_button;
+   GtkWidget *cal_popup;
+   GtkWidget *calendar;
+   GtkWidget *time_popup;
+   GtkWidget *timelist;
+
+   /* Flags */
+
+   EggDateTimeDisplayMode display_mode;
+   gboolean lazy;
+   gboolean week_start_monday;
+
+   /* Current Date/Time */
+
+   gboolean   date_valid;
+   GDateYear  year;
+   GDateMonth month;
+   GDateDay   day;
+   gboolean   time_valid;
+   guint8     hour;
+   guint8     minute;
+   guint8     second;
+
+   /* Clamp Values */
+
+   guint16 clamp_minyear,   clamp_maxyear;
+   guint8  clamp_minmonth,  clamp_maxmonth;
+   guint8  clamp_minday,    clamp_maxday;
+   guint8  clamp_minhour,   clamp_maxhour;
+   guint8  clamp_minminute, clamp_maxminute;
+   guint8  clamp_minsecond, clamp_maxsecond;
+};
+
+enum {
+   SIGNAL_DATE_CHANGED,
+   SIGNAL_TIME_CHANGED,
+   SIGNAL_LAST
+};
+
+enum {
+   ARG_DISPLAY_MODE = 1,
+   ARG_LAZY,
+   ARG_YEAR,
+   ARG_MONTH,
+   ARG_DAY,
+   ARG_HOUR,
+   ARG_MINUTE,
+   ARG_SECOND,
+   ARG_CLAMP_MINYEAR,
+   ARG_CLAMP_MINMONTH,
+   ARG_CLAMP_MINDAY,
+   ARG_CLAMP_MINHOUR,
+   ARG_CLAMP_MINMINUTE,
+   ARG_CLAMP_MINSECOND,
+   ARG_CLAMP_MAXYEAR,
+   ARG_CLAMP_MAXMONTH,
+   ARG_CLAMP_MAXDAY,
+   ARG_CLAMP_MAXHOUR,
+   ARG_CLAMP_MAXMINUTE,
+   ARG_CLAMP_MAXSECOND
+};
+
+
+static gint egg_datetime_signals [SIGNAL_LAST] = { 0 };
+
+
+static void  egg_datetime_class_init   (EggDateTimeClass *klass);
+static void  egg_datetime_init      (EggDateTime      *edt);
+static void  egg_datetime_set_property (GObject    *object,
+                   guint          property_id,
+                   const GValue     *value,
+                   GParamSpec    *pspec);
+static void  egg_datetime_get_property (GObject    *object,
+                   guint          property_id,
+                   GValue        *value,
+                   GParamSpec    *pspec);
+
+static void  egg_datetime_destroy      (GtkObject *object);
+static void  egg_datetime_finalize     (GObject    *object);
+
+static gchar   *get_time_string     (guint8 hour, guint8 minute, guint8 second);
+
+static gboolean    date_focus_out         (EggDateTime *edt,   GtkEntry *entry);
+static gboolean    time_focus_out         (EggDateTime *edt,   GtkEntry *entry);
+static void  date_arrow_toggled     (EggDateTime *edt,   GtkToggleButton *button);
+static void  time_arrow_toggled     (EggDateTime *edt,   GtkToggleButton *button);
+static void  cal_popup_changed      (EggDateTime *edt,   GtkCalendar *calendar);
+static void  cal_popup_double_click    (EggDateTime *edt,   GtkCalendar *calendar);
+static gboolean    cal_popup_key_pressed     (EggDateTime *edt,   GdkEventKey *event, GtkWidget *widget);
+static gboolean    cal_popup_button_pressed  (EggDateTime *edt,   GdkEventButton *event, GtkWidget *widget);
+static gboolean    cal_popup_closed    (EggDateTime *edt,   GtkWindow *popup);
+static void  cal_popup_hide         (EggDateTime *edt);
+static void  time_popup_changed     (EggDateTime *edt,   Timelist *timelist);
+static gboolean    time_popup_key_pressed    (EggDateTime *edt,   GdkEventKey *event, GtkWidget *widget);
+static gboolean    time_popup_button_pressed (EggDateTime *edt,   GdkEventButton *event, GtkWidget *widget);
+static gboolean    time_popup_closed      (EggDateTime *edt,   GtkWindow *popup);
+static void  time_popup_hide     (EggDateTime *edt);
+
+static void  apply_display_mode     (EggDateTime *edt);
+static void  clamp_time_labels      (EggDateTime *edt);
+static void  parse_date       (EggDateTime *edt);
+static void  parse_time       (EggDateTime *edt);
+static void  normalize_date         (EggDateTime *edt);
+static void  normalize_time         (EggDateTime *edt);
+static void  parse_and_update_date     (EggDateTime *edt);
+static void  parse_and_update_time     (EggDateTime *edt);
+static void  update_date_label      (EggDateTime *edt);
+static void  update_time_label      (EggDateTime *edt);
+
+
+static GtkHBoxClass *parent_class = NULL;
+
+
+GtkType
+egg_datetime_get_type (void)
+{
+   static GtkType datetime_type = 0;
+
+   if (!datetime_type) {
+      static const GTypeInfo datetime_info = {
+         sizeof (EggDateTimeClass),
+         NULL,    /* base_init */
+         NULL,    /* base_finalize */
+         (GClassInitFunc) egg_datetime_class_init,
+         NULL,    /* class_finalize */
+         NULL,    /* class_data */
+         sizeof (EggDateTime),
+         0,    /* n_preallocs */
+         (GInstanceInitFunc) egg_datetime_init
+      };
+
+      datetime_type = g_type_register_static (GTK_TYPE_HBOX, "EggDateTime", &datetime_info, 0);
+   }
+
+   return datetime_type;
+}
+
+static void
+egg_datetime_class_init (EggDateTimeClass *klass)
+{
+   GObjectClass *o_class;
+   GtkObjectClass *go_class;
+   GParamSpec *pspec;
+
+   parent_class = g_type_class_peek_parent (klass);
+
+   o_class  = (GObjectClass *)   klass;
+   go_class = (GtkObjectClass *) klass;
+
+   o_class->finalize     = egg_datetime_finalize;
+        o_class->set_property = egg_datetime_set_property;
+        o_class->get_property = egg_datetime_get_property;
+   go_class->destroy     = egg_datetime_destroy;
+
+   /* Properties */
+
+   pspec = g_param_spec_uint ("display-flags",
+               _("Display flags"),
+               _("Displayed date and/or time properties"),
+               0, G_MAXUINT, EGG_DATETIME_DISPLAY_DATE,
+               G_PARAM_READWRITE | G_PARAM_CONSTRUCT);
+   g_object_class_install_property (o_class, ARG_DISPLAY_MODE, pspec);
+   pspec = g_param_spec_boolean ("lazy",
+                  _("Lazy mode"),
+                  _("Lazy mode doesn't normalize entered date and time values"),
+                  FALSE,
+                  G_PARAM_READWRITE | G_PARAM_CONSTRUCT);
+   g_object_class_install_property (o_class, ARG_LAZY, pspec);
+   pspec = g_param_spec_uint ("year",
+               _("Year"),
+               _("Displayed year"),
+               1, 9999, 2000,
+               G_PARAM_READWRITE | G_PARAM_CONSTRUCT);
+   g_object_class_install_property (o_class, ARG_YEAR, pspec);
+   pspec = g_param_spec_uint ("month",
+               _("Month"),
+               _("Displayed month"),
+               G_DATE_JANUARY, G_DATE_DECEMBER, G_DATE_JANUARY,
+               G_PARAM_READWRITE | G_PARAM_CONSTRUCT);
+   g_object_class_install_property (o_class, ARG_MONTH, pspec);
+   pspec = g_param_spec_uint ("day",
+               _("Day"),
+               _("Displayed day of month"),
+               1, 31, 1,
+               G_PARAM_READWRITE | G_PARAM_CONSTRUCT);
+   g_object_class_install_property (o_class, ARG_DAY, pspec);
+   pspec = g_param_spec_uint ("hour",
+               _("Hour"),
+               _("Displayed hour"),
+               0, 23, 0,
+               G_PARAM_READWRITE | G_PARAM_CONSTRUCT);
+   g_object_class_install_property (o_class, ARG_HOUR, pspec);
+   pspec = g_param_spec_uint ("minute",
+               _("Minute"),
+               _("Displayed minute"),
+               0, 59, 0,
+               G_PARAM_READWRITE | G_PARAM_CONSTRUCT);
+   g_object_class_install_property (o_class, ARG_MINUTE, pspec);
+   pspec = g_param_spec_uint ("second",
+               _("Second"),
+               _("Displayed second"),
+               0, 59, 0,
+               G_PARAM_READWRITE | G_PARAM_CONSTRUCT);
+   g_object_class_install_property (o_class, ARG_SECOND, pspec);
+   pspec = g_param_spec_uint ("clamp-minyear",
+               _("Lower limit year"),
+               _("Year part of the lower date limit"),
+               1, 9999, 1,
+               G_PARAM_READWRITE | G_PARAM_CONSTRUCT);
+   g_object_class_install_property (o_class, ARG_CLAMP_MINYEAR, pspec);
+   pspec = g_param_spec_uint ("clamp-maxyear",
+               _("Upper limit year"),
+               _("Year part of the upper date limit"),
+               1, 9999, 9999,
+               G_PARAM_READWRITE | G_PARAM_CONSTRUCT);
+   g_object_class_install_property (o_class, ARG_CLAMP_MAXYEAR, pspec);
+   pspec = g_param_spec_uint ("clamp-minmonth",
+               _("Lower limit month"),
+               _("Month part of the lower date limit"),
+               G_DATE_JANUARY, G_DATE_DECEMBER, G_DATE_JANUARY,
+               G_PARAM_READWRITE | G_PARAM_CONSTRUCT);
+   g_object_class_install_property (o_class, ARG_CLAMP_MINMONTH, pspec);
+   pspec = g_param_spec_uint ("clamp-maxmonth",
+               _("Upper limit month"),
+               _("Month part of the upper date limit"),
+               G_DATE_JANUARY, G_DATE_DECEMBER, G_DATE_DECEMBER,
+               G_PARAM_READWRITE | G_PARAM_CONSTRUCT);
+   g_object_class_install_property (o_class, ARG_CLAMP_MAXMONTH, pspec);
+   pspec = g_param_spec_uint ("clamp-minday",
+               _("Lower limit day"),
+               _("Day of month part of the lower date limit"),
+               1, 31, 1,
+               G_PARAM_READWRITE | G_PARAM_CONSTRUCT);
+   g_object_class_install_property (o_class, ARG_CLAMP_MINDAY, pspec);
+   pspec = g_param_spec_uint ("clamp-maxday",
+               _("Upper limit day"),
+               _("Day of month part of the upper date limit"),
+               1, 31, 31,
+               G_PARAM_READWRITE | G_PARAM_CONSTRUCT);
+   g_object_class_install_property (o_class, ARG_CLAMP_MAXDAY, pspec);
+   pspec = g_param_spec_uint ("clamp-minhour",
+               _("Lower limit hour"),
+               _("Hour part of the lower time limit"),
+               0, 23, 0,
+               G_PARAM_READWRITE | G_PARAM_CONSTRUCT);
+   g_object_class_install_property (o_class, ARG_CLAMP_MINHOUR, pspec);
+   pspec = g_param_spec_uint ("clamp-maxhour",
+               _("Upper limit hour"),
+               _("Hour part of the upper time limit"),
+               0, 23, 23,
+               G_PARAM_READWRITE | G_PARAM_CONSTRUCT);
+   g_object_class_install_property (o_class, ARG_CLAMP_MAXHOUR, pspec);
+   pspec = g_param_spec_uint ("clamp-minminute",
+               _("Lower limit minute"),
+               _("Minute part of the lower time limit"),
+               0, 59, 0,
+               G_PARAM_READWRITE | G_PARAM_CONSTRUCT);
+   g_object_class_install_property (o_class, ARG_CLAMP_MINMINUTE, pspec);
+   pspec = g_param_spec_uint ("clamp-maxminute",
+               _("Upper limit minute"),
+               _("Minute part of the upper time limit"),
+               0, 59, 59,
+               G_PARAM_READWRITE | G_PARAM_CONSTRUCT);
+   g_object_class_install_property (o_class, ARG_CLAMP_MAXMINUTE, pspec);
+   pspec = g_param_spec_uint ("clamp-minsecond",
+               _("Lower limit second"),
+               _("Second part of the lower time limit"),
+               0, 59, 0,
+               G_PARAM_READWRITE | G_PARAM_CONSTRUCT);
+   g_object_class_install_property (o_class, ARG_CLAMP_MINSECOND, pspec);
+   pspec = g_param_spec_uint ("clamp-maxsecond",
+               _("Upper limit second"),
+               _("Second part of the upper time limit"),
+               0, 59, 59,
+               G_PARAM_READWRITE | G_PARAM_CONSTRUCT);
+   g_object_class_install_property (o_class, ARG_CLAMP_MAXSECOND, pspec);
+
+   /* Signals */
+
+   egg_datetime_signals [SIGNAL_DATE_CHANGED] =
+      g_signal_new ("date-changed",
+               G_TYPE_FROM_CLASS (klass),
+               G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
+               G_STRUCT_OFFSET (EggDateTimeClass, date_changed),
+               NULL, NULL,
+               g_cclosure_marshal_VOID__VOID,
+               G_TYPE_NONE, 0);
+
+   egg_datetime_signals [SIGNAL_TIME_CHANGED] =
+      g_signal_new ("time-changed",
+               G_TYPE_FROM_CLASS (klass),
+               G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
+               G_STRUCT_OFFSET (EggDateTimeClass, time_changed),
+               NULL, NULL,
+               g_cclosure_marshal_VOID__VOID,
+               G_TYPE_NONE, 0);
+}
+
+static void
+egg_datetime_init (EggDateTime *edt)
+{
+   EggDateTimePrivate *priv;
+   GtkWidget *arrow;
+   GtkCalendarDisplayOptions cal_options;
+   const gchar *week_start;
+
+   priv = g_new0 (EggDateTimePrivate, 1);
+   edt->priv = priv;
+
+   /* Translate to calendar:week_start:1 if you want Monday to be the
+    * first day of the week; otherwise translate to calendar:week_start:0.
+    * Do *not* translate it to anything else, if it isn't calendar:week_start:1
+    * or calendar:week_start:0 it will not work.
+    */
+   week_start = _("calendar:week_start:0");
+   if (strcmp (week_start, "calendar:week_start:1") == 0)
+      priv->week_start_monday = TRUE;
+   else if (strcmp (week_start, "calendar:week_start:0") == 0)
+      priv->week_start_monday = FALSE;
+   else
+      g_warning ("Whoever translated calendar:week_start:0 did so wrongly.\n");
+
+   priv->date_valid = FALSE;
+   priv->time_valid = FALSE;
+
+   /* Initialize Widgets */
+
+   gtk_box_set_spacing (GTK_BOX (edt), 4);
+
+   /* Date Widgets */
+
+   priv->date_box = gtk_hbox_new (FALSE, 0);
+   gtk_box_pack_start (GTK_BOX (edt), priv->date_box, TRUE, TRUE, 0);
+
+   priv->date_entry = gtk_entry_new ();
+   gtk_entry_set_width_chars (GTK_ENTRY (priv->date_entry), 12);
+   _add_atk_name_desc (priv->date_entry, _("Date"), _("Enter the date directly"));
+   g_signal_connect_swapped (G_OBJECT (priv->date_entry), "focus-out-event",
+              G_CALLBACK (date_focus_out), edt);
+   gtk_widget_show (priv->date_entry);
+   gtk_box_pack_start (GTK_BOX (priv->date_box), priv->date_entry, TRUE, TRUE, 0);
+
+   priv->date_button = gtk_toggle_button_new ();
+   _add_atk_name_desc (priv->date_button, _("Select Date"), _("Select the date from a calendar"));
+   gtk_box_pack_start (GTK_BOX (priv->date_box), priv->date_button, FALSE, FALSE, 0);
+   arrow = gtk_arrow_new (GTK_ARROW_DOWN, GTK_SHADOW_OUT);
+   gtk_container_add (GTK_CONTAINER (priv->date_button), arrow);
+   gtk_widget_show (arrow);
+   g_signal_connect_swapped (G_OBJECT (priv->date_button), "toggled",
+              G_CALLBACK (date_arrow_toggled), edt);
+
+   _add_atk_relation (priv->date_button, priv->date_entry,
+            ATK_RELATION_CONTROLLER_FOR, ATK_RELATION_CONTROLLED_BY);
+
+   /* Time Widgets */
+
+   priv->time_box = gtk_hbox_new (FALSE, 0);
+   gtk_box_pack_start (GTK_BOX (edt), priv->time_box, TRUE, TRUE, 0);
+
+   priv->time_entry = gtk_entry_new ();
+   gtk_entry_set_width_chars (GTK_ENTRY (priv->time_entry), 10);
+   _add_atk_name_desc (priv->time_entry, _("Time"), _("Enter the time directly"));
+   g_signal_connect_swapped (G_OBJECT (priv->time_entry), "focus-out-event",
+              G_CALLBACK (time_focus_out), edt);
+   gtk_widget_show (priv->time_entry);
+   gtk_box_pack_start (GTK_BOX (priv->time_box), priv->time_entry, TRUE, TRUE, 0);
+
+   priv->time_button = gtk_toggle_button_new ();
+   _add_atk_name_desc (priv->date_button, _("Select Time"), _("Select the time from a list"));
+   gtk_box_pack_start (GTK_BOX (priv->time_box), priv->time_button, FALSE, FALSE, 0);
+   arrow = gtk_arrow_new (GTK_ARROW_DOWN, GTK_SHADOW_OUT);
+   gtk_container_add (GTK_CONTAINER (priv->time_button), arrow);
+   gtk_widget_show (arrow);
+   g_signal_connect_swapped (G_OBJECT (priv->time_button), "toggled",
+              G_CALLBACK (time_arrow_toggled), edt);
+
+   _add_atk_relation (priv->time_button, priv->time_entry,
+            ATK_RELATION_CONTROLLER_FOR, ATK_RELATION_CONTROLLED_BY);
+
+   /* Calendar Popup */
+
+   priv->cal_popup = gtk_window_new (GTK_WINDOW_POPUP);
+   gtk_widget_set_events (priv->cal_popup,
+                gtk_widget_get_events (priv->cal_popup) | GDK_KEY_PRESS_MASK);
+   gtk_window_set_resizable (GTK_WINDOW (priv->cal_popup), FALSE);
+   g_signal_connect_swapped (G_OBJECT (priv->cal_popup), "delete-event",
+              G_CALLBACK (cal_popup_closed), edt);
+   g_signal_connect_swapped (G_OBJECT (priv->cal_popup), "key-press-event",
+              G_CALLBACK (cal_popup_key_pressed), edt);
+   g_signal_connect_swapped (G_OBJECT (priv->cal_popup), "button-press-event",
+              G_CALLBACK (cal_popup_button_pressed), edt);
+
+   priv->calendar = gtk_calendar_new ();
+   cal_options = GTK_CALENDAR_SHOW_DAY_NAMES | GTK_CALENDAR_SHOW_HEADING;
+   if (priv->week_start_monday)
+      cal_options |= GTK_CALENDAR_WEEK_START_MONDAY;
+   gtk_calendar_set_display_options (GTK_CALENDAR (priv->calendar), cal_options);
+        gtk_container_add (GTK_CONTAINER (priv->cal_popup), priv->calendar);
+   g_signal_connect_swapped (G_OBJECT (priv->calendar), "day-selected",
+              G_CALLBACK (cal_popup_changed), edt);
+   g_signal_connect_swapped (G_OBJECT (priv->calendar), "day-selected-double-click",
+              G_CALLBACK (cal_popup_double_click), edt);
+        gtk_widget_show (priv->calendar);
+
+   /* Time Popup */
+
+   priv->time_popup = gtk_window_new (GTK_WINDOW_POPUP);
+   gtk_widget_set_events (priv->time_popup,
+                gtk_widget_get_events (priv->time_popup) | GDK_KEY_PRESS_MASK);
+   gtk_window_set_resizable (GTK_WINDOW (priv->time_popup), FALSE);
+   g_signal_connect_swapped (G_OBJECT (priv->time_popup), "delete-event",
+              G_CALLBACK (time_popup_closed), edt);
+   g_signal_connect_swapped (G_OBJECT (priv->time_popup), "key-press-event",
+              G_CALLBACK (time_popup_key_pressed), edt);
+   g_signal_connect_swapped (G_OBJECT (priv->time_popup), "button-press-event",
+              G_CALLBACK (time_popup_button_pressed), edt);
+
+   priv->timelist = timelist_new ();
+   timelist_set_selection_callback (TIMELIST (priv->timelist), G_CALLBACK (time_popup_changed), edt);
+   gtk_widget_set_size_request (priv->timelist, -1, 400);
+        gtk_container_add (GTK_CONTAINER (priv->time_popup), priv->timelist);
+        gtk_widget_show (priv->timelist);
+}
+
+static void
+egg_datetime_set_property (GObject  *object,
+            guint  property_id,
+            const GValue   *value,
+            GParamSpec  *pspec)
+{
+   EggDateTime *edt;
+   EggDateTimePrivate *priv;
+
+   g_return_if_fail (object != NULL);
+   g_return_if_fail (EGG_IS_DATETIME (object));
+ 
+   edt = EGG_DATETIME (object);
+   priv = edt->priv;
+ 
+   switch (property_id) {
+   case ARG_DISPLAY_MODE:
+      egg_datetime_set_display_mode (edt, g_value_get_uint (value));
+      break;
+   case ARG_LAZY:
+      egg_datetime_set_lazy (edt, g_value_get_boolean (value));
+      break;
+   case ARG_YEAR:
+      priv->year = g_value_get_uint (value);
+      break;
+   case ARG_MONTH:
+      priv->minute = g_value_get_uint (value);
+      break;
+   case ARG_DAY:
+      priv->day = g_value_get_uint (value);
+      break;
+   case ARG_HOUR:
+      priv->hour = g_value_get_uint (value);
+      break;
+   case ARG_MINUTE:
+      priv->minute = g_value_get_uint (value);
+      break;
+   case ARG_SECOND:
+      priv->second = g_value_get_uint (value);
+      break;
+   case ARG_CLAMP_MINYEAR:
+      priv->clamp_minyear = g_value_get_uint (value);
+      break;
+   case ARG_CLAMP_MINMONTH:
+      priv->clamp_minmonth = g_value_get_uint (value);
+      break;
+   case ARG_CLAMP_MINDAY:
+      priv->clamp_minday = g_value_get_uint (value);
+      break;
+   case ARG_CLAMP_MINHOUR:
+      priv->clamp_minhour = g_value_get_uint (value);
+      break;
+   case ARG_CLAMP_MINMINUTE:
+      priv->clamp_minminute = g_value_get_uint (value);
+      break;
+   case ARG_CLAMP_MINSECOND:
+      priv->clamp_minsecond = g_value_get_uint (value);
+      break;
+   case ARG_CLAMP_MAXYEAR:
+      priv->clamp_maxyear = g_value_get_uint (value);
+      break;
+   case ARG_CLAMP_MAXMONTH:
+      priv->clamp_maxmonth = g_value_get_uint (value);
+      break;
+   case ARG_CLAMP_MAXDAY:
+      priv->clamp_maxday = g_value_get_uint (value);
+      break;
+   case ARG_CLAMP_MAXHOUR:
+      priv->clamp_maxhour = g_value_get_uint (value);
+      break;
+   case ARG_CLAMP_MAXMINUTE:
+      priv->clamp_maxminute = g_value_get_uint (value);
+      break;
+   case ARG_CLAMP_MAXSECOND:
+      priv->clamp_maxsecond = g_value_get_uint (value);
+      break;
+   }
+}
+
+static void
+egg_datetime_get_property (GObject  *object,
+            guint  property_id,
+            GValue   *value,
+            GParamSpec  *pspec)
+{
+   EggDateTimePrivate *priv;
+
+   g_return_if_fail (object != NULL);
+   g_return_if_fail (EGG_IS_DATETIME (object));
+ 
+   priv = EGG_DATETIME (object)->priv;
+ 
+   switch (property_id) {
+   case ARG_DISPLAY_MODE:
+      g_value_set_uint (value, (guint) priv->display_mode);
+      break;
+   case ARG_LAZY:
+      g_value_set_boolean (value, priv->lazy);
+      break;
+   case ARG_YEAR:
+      g_value_set_uint (value, priv->year);
+      break;
+   case ARG_MONTH:
+      g_value_set_uint (value, priv->month);
+      break;
+   case ARG_DAY:
+      g_value_set_uint (value, priv->day);
+      break;
+   case ARG_HOUR:
+      g_value_set_uint (value, priv->hour);
+      break;
+   case ARG_MINUTE:
+      g_value_set_uint (value, priv->minute);
+      break;
+   case ARG_SECOND:
+      g_value_set_uint (value, priv->second);
+      break;
+   case ARG_CLAMP_MINYEAR:
+      g_value_set_uint (value, priv->clamp_minyear);
+      break;
+   case ARG_CLAMP_MINMONTH:
+      g_value_set_uint (value, priv->clamp_minmonth);
+      break;
+   case ARG_CLAMP_MINDAY:
+      g_value_set_uint (value, priv->clamp_minday);
+      break;
+   case ARG_CLAMP_MINHOUR:
+      g_value_set_uint (value, priv->clamp_minhour);
+      break;
+   case ARG_CLAMP_MINMINUTE:
+      g_value_set_uint (value, priv->clamp_minminute);
+      break;
+   case ARG_CLAMP_MINSECOND:
+      g_value_set_uint (value, priv->clamp_minsecond);
+      break;
+   case ARG_CLAMP_MAXYEAR:
+      g_value_set_uint (value, priv->clamp_maxyear);
+      break;
+   case ARG_CLAMP_MAXMONTH:
+      g_value_set_uint (value, priv->clamp_maxmonth);
+      break;
+   case ARG_CLAMP_MAXDAY:
+      g_value_set_uint (value, priv->clamp_maxday);
+      break;
+   case ARG_CLAMP_MAXHOUR:
+      g_value_set_uint (value, priv->clamp_maxhour);
+      break;
+   case ARG_CLAMP_MAXMINUTE:
+      g_value_set_uint (value, priv->clamp_maxminute);
+      break;
+   case ARG_CLAMP_MAXSECOND:
+      g_value_set_uint (value, priv->clamp_maxsecond);
+      break;
+   }
+}
+
+static void
+egg_datetime_destroy (GtkObject *object)
+{
+   EggDateTime *edt = EGG_DATETIME (object);
+   EggDateTimePrivate *priv = edt->priv;
+
+   if (priv->cal_popup) {
+      gtk_widget_destroy (priv->cal_popup);
+      priv->cal_popup = NULL;
+   }
+
+   if (priv->time_popup) {
+      gtk_widget_destroy (priv->time_popup);
+      priv->time_popup = NULL;
+   }
+
+   if (GTK_OBJECT_CLASS (parent_class)->destroy)
+      (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
+}
+
+static void
+egg_datetime_finalize (GObject *object)
+{
+   EggDateTime *edt = EGG_DATETIME (object);
+
+   g_free (edt->priv);
+
+   if (G_OBJECT_CLASS (parent_class)->finalize)
+      (* G_OBJECT_CLASS (parent_class)->finalize) (object);
+}
+
+/*
+ * Utility Functions
+ */
+
+/* Determine the number of bits, time_t uses. */
+static guint
+time_t_bits (void) {
+   guint i;
+   time_t t;
+
+   for (t = 1, i = 0; t != 0; t = t << 1, i++)
+      ;
+
+   return i;
+}
+
+static gchar *
+get_time_string (guint8 hour, guint8 minute, guint8 second)
+{
+   gchar *s;
+
+   /* Translators: set this to anything else if you want to use a
+    * 24 hour clock.
+    */
+   if (!strcmp (_("24hr: no"), "24hr: no")) {
+      const gchar *ampm_s;
+
+      if (hour < 12)
+         ampm_s = _("AM");
+      else
+         ampm_s = _("PM");
+
+      hour %= 12;
+      if (hour == 0)
+         hour = 12;
+
+      if (second <= 59)
+         /* Translators: This is hh:mm:ss AM/PM. */
+         s = g_strdup_printf (_("%02d:%02d:%02d %s"), hour, minute, second, ampm_s);
+      else
+         /* Translators: This is hh:mm AM/PM. */
+         s = g_strdup_printf (_("%02d:%02d %s"), hour, minute, ampm_s);
+   } else {
+      if (second <= 59)
+         /* Translators: This is hh:mm:ss. */
+         s = g_strdup_printf (_("%02d:%02d:%02d"), hour, minute, second);
+      else
+         /* Translators: This is hh:mm. */
+         s = g_strdup_printf (_("%02d:%02d"), hour, minute);
+   }
+
+   return s;
+}
+
+static void
+popup_position (GtkWidget *widget, GtkWindow *popup)
+{
+   GtkRequisition requisition;
+   gint x, y, width, height;
+
+   gtk_widget_size_request (GTK_WIDGET (popup), &requisition);
+   gdk_window_get_origin (widget->window, &x, &y);
+
+   x += widget->allocation.x;
+   y += widget->allocation.y;
+   width  = widget->allocation.width;
+   height = widget->allocation.height;
+
+   x += width - requisition.width;
+   y += height;
+
+   if (x < 0)
+      x = 0;
+   if (y < 0)
+      y = 0;
+
+   gtk_window_move (popup, x, y);
+}
+
+static void
+popup_show (GtkWindow *popup)
+{
+   GdkCursor *cursor;
+
+   gtk_widget_show (GTK_WIDGET (popup));
+   gtk_widget_grab_focus (GTK_WIDGET (popup));
+   gtk_grab_add (GTK_WIDGET (popup));
+
+   cursor = gdk_cursor_new (GDK_ARROW);
+   gdk_pointer_grab (GTK_WIDGET (popup)->window, TRUE,
+           (GDK_BUTTON_PRESS_MASK
+            | GDK_BUTTON_RELEASE_MASK
+            | GDK_POINTER_MOTION_MASK),
+           NULL, cursor, GDK_CURRENT_TIME);
+   gdk_cursor_unref (cursor);
+}
+
+static void
+popup_hide (GtkWindow *popup)
+{
+   gtk_widget_hide (GTK_WIDGET (popup));
+   gtk_grab_remove (GTK_WIDGET (popup));
+   gdk_pointer_ungrab (GDK_CURRENT_TIME);
+}
+
+/*
+ * Calendar Popup
+ */
+
+static void
+date_arrow_toggled (EggDateTime *edt, GtkToggleButton *button)
+{
+   EggDateTimePrivate *priv = edt->priv;
+
+   if (!gtk_toggle_button_get_active (button))
+      return;
+
+   /* Set Date */
+
+   parse_date (edt);
+
+   gtk_calendar_select_month (GTK_CALENDAR (priv->calendar), priv->month - 1, priv->year);
+   gtk_calendar_select_day (GTK_CALENDAR (priv->calendar), priv->day);
+
+   /* Position Popup */
+
+   popup_position (priv->date_button, GTK_WINDOW (priv->cal_popup));
+
+   /* Show Popup */
+
+   popup_show (GTK_WINDOW (priv->cal_popup));
+}
+
+static void
+cal_popup_changed (EggDateTime *edt, GtkCalendar *calendar)
+{
+   guint year, month, day;
+
+   gtk_calendar_get_date (GTK_CALENDAR (edt->priv->calendar), &year, &month, &day);
+
+   edt->priv->year  = year;
+   edt->priv->month = month + 1;
+   edt->priv->day   = day;
+   edt->priv->date_valid = TRUE;
+
+   normalize_date (edt);
+   update_date_label (edt);
+
+   g_signal_emit (G_OBJECT (edt), egg_datetime_signals[SIGNAL_DATE_CHANGED], 0);
+}
+
+static void
+cal_popup_double_click (EggDateTime *edt, GtkCalendar *calendar)
+{
+   cal_popup_hide (edt);
+}
+
+static gboolean
+cal_popup_key_pressed (EggDateTime *edt, GdkEventKey *event, GtkWidget *widget)
+{
+   if (event->keyval != GDK_Escape)
+      return FALSE;
+
+   g_signal_stop_emission_by_name (G_OBJECT (widget), "key_press_event");
+
+   cal_popup_hide (edt);
+
+   return TRUE;
+}
+
+static gboolean
+cal_popup_button_pressed (EggDateTime *edt, GdkEventButton *event, GtkWidget *widget)
+{
+   GtkWidget *child;
+
+   child = gtk_get_event_widget ((GdkEvent *) event);
+
+   /* We don't ask for button press events on the grab widget, so
+    * if an event is reported directly to the grab widget, it must
+    * be on a window outside the application (and thus we remove
+    * the popup window). Otherwise, we check if the widget is a child
+    * of the grab widget, and only remove the popup window if it
+    * is not.
+    */
+   if (child != widget) {
+      while (child) {
+         if (child == widget)
+            return FALSE;
+         child = child->parent;
+      }
+   }
+
+   cal_popup_hide (edt);
+
+   return TRUE;
+}
+
+static gboolean
+cal_popup_closed (EggDateTime *edt, GtkWindow *popup)
+{
+   cal_popup_hide (edt);
+
+   return TRUE;
+}
+
+static void
+cal_popup_hide (EggDateTime *edt)
+{
+   EggDateTimePrivate *priv = edt->priv;
+
+   popup_hide (GTK_WINDOW (priv->cal_popup));
+
+   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->date_button), FALSE);
+   gtk_widget_grab_focus (priv->date_entry);
+
+   g_signal_emit (G_OBJECT (edt), egg_datetime_signals[SIGNAL_DATE_CHANGED], 0);
+}
+
+/*
+ * Time Popup
+ */
+
+static void
+time_arrow_toggled (EggDateTime *edt, GtkToggleButton *button)
+{
+   EggDateTimePrivate *priv = edt->priv;
+
+   if (!gtk_toggle_button_get_active (button))
+      return;
+
+   /* Set Time */
+
+   parse_time (edt);
+
+   timelist_set_time (TIMELIST (priv->timelist), priv->hour, priv->minute);
+
+   /* Position Popup */
+
+   popup_position (priv->time_button, GTK_WINDOW (priv->time_popup));
+
+   /* Show Popup */
+
+   popup_show (GTK_WINDOW (priv->time_popup));
+}
+
+static void
+time_popup_changed (EggDateTime *edt, Timelist *timelist)
+{
+   EggDateTimePrivate *priv = edt->priv;
+
+   if (!timelist_get_time (timelist, &priv->hour, &priv->minute))
+      return;
+
+   priv->second = 0;
+   priv->time_valid = TRUE;
+
+   normalize_time (edt);
+   update_time_label (edt);
+
+   g_signal_emit (G_OBJECT (edt), egg_datetime_signals[SIGNAL_TIME_CHANGED], 0);
+}
+
+static gboolean
+time_popup_key_pressed (EggDateTime *edt, GdkEventKey *event, GtkWidget *widget)
+{
+   if (event->keyval != GDK_Escape)
+      return FALSE;
+
+   g_signal_stop_emission_by_name (G_OBJECT (widget), "key_press_event");
+
+   time_popup_hide (edt);
+
+   return TRUE;
+}
+
+static gboolean
+time_popup_button_pressed (EggDateTime *edt, GdkEventButton *event, GtkWidget *widget)
+{
+   GtkWidget *child;
+
+   child = gtk_get_event_widget ((GdkEvent *) event);
+
+   /* We don't ask for button press events on the grab widget, so
+    * if an event is reported directly to the grab widget, it must
+    * be on a window outside the application (and thus we remove
+    * the popup window). Otherwise, we check if the widget is a child
+    * of the grab widget, and only remove the popup window if it
+    * is not.
+    */
+   if (child != widget) {
+      while (child) {
+         if (child == widget)
+            return FALSE;
+         child = child->parent;
+      }
+   }
+
+   time_popup_hide (edt);
+
+   return TRUE;
+}
+
+static gboolean
+time_popup_closed (EggDateTime *edt, GtkWindow *popup)
+{
+   time_popup_hide (edt);
+
+   return TRUE;
+}
+
+static void
+time_popup_hide (EggDateTime *edt)
+{
+   EggDateTimePrivate *priv = edt->priv;
+
+   popup_hide (GTK_WINDOW (priv->time_popup));
+
+   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->time_button), FALSE);
+   gtk_widget_grab_focus (priv->time_entry);
+
+   g_signal_emit (G_OBJECT (edt), egg_datetime_signals[SIGNAL_TIME_CHANGED], 0);
+}
+
+/*
+ * Callbacks
+ */
+
+static gboolean
+date_focus_out (EggDateTime *edt, GtkEntry *entry)
+{
+   parse_date (edt);
+   update_date_label (edt);
+
+   g_signal_emit (G_OBJECT (edt), egg_datetime_signals[SIGNAL_DATE_CHANGED], 0);
+
+   return FALSE;
+}
+
+static gboolean
+time_focus_out (EggDateTime *edt, GtkEntry *entry)
+{
+   parse_time (edt);
+   update_time_label (edt);
+
+   g_signal_emit (G_OBJECT (edt), egg_datetime_signals[SIGNAL_TIME_CHANGED], 0);
+
+   return FALSE;
+}
+
+/*
+ * Private Methods
+ */
+
+static void
+apply_display_mode (EggDateTime *edt)
+{
+   if (edt->priv->display_mode & EGG_DATETIME_DISPLAY_DATE)
+      gtk_widget_show (edt->priv->date_box);
+   else
+      gtk_widget_hide (edt->priv->date_box);
+   if (edt->priv->display_mode & EGG_DATETIME_DISPLAY_MONTH)
+      gtk_widget_show (edt->priv->date_button);
+   else
+      gtk_widget_hide (edt->priv->date_button);
+
+   if (edt->priv->display_mode & EGG_DATETIME_DISPLAY_TIME)
+      gtk_widget_show (edt->priv->time_box);
+   else
+      gtk_widget_hide (edt->priv->time_box);
+   if (edt->priv->display_mode & EGG_DATETIME_DISPLAY_HOUR)
+      gtk_widget_show (edt->priv->time_button);
+   else
+      gtk_widget_hide (edt->priv->time_button);
+}
+
+static void
+clamp_time_labels (EggDateTime *edt)
+{
+   EggDateTimePrivate *priv = edt->priv;
+
+   timelist_clamp (TIMELIST (priv->timelist),
+         priv->clamp_minhour,
+         priv->clamp_minminute,
+         priv->clamp_maxhour,
+         priv->clamp_maxminute);
+}
+
+/* Updates the date entry to the current date. */
+static void
+update_date_label (EggDateTime *edt)
+{
+   EggDateTimePrivate *priv = edt->priv;
+   gchar *s;
+
+   if (!priv->date_valid) {
+      gtk_entry_set_text (GTK_ENTRY (priv->date_entry), "");
+      return;
+   }
+
+   /* TODO: should handle other display modes as well... */
+
+   /* Translators: This is YYYY-MM-DD */
+   s = g_strdup_printf (_("%04d-%02d-%02d"), priv->year, priv->month, priv->day);
+   gtk_entry_set_text (GTK_ENTRY (priv->date_entry), s);
+   g_free (s);
+}
+
+/* Updates the time entry to the current time. */
+static void
+update_time_label (EggDateTime *edt)
+{
+   EggDateTimePrivate *priv = edt->priv;
+   gchar *s;
+
+   if (!priv->time_valid) {
+      gtk_entry_set_text (GTK_ENTRY (priv->time_entry), "");
+      return;
+   }
+
+   /* TODO: should handle other display modes as well... */
+
+   if ((priv->display_mode & EGG_DATETIME_DISPLAY_SECOND) ||
+       (priv->display_mode & EGG_DATETIME_DISPLAY_SECOND_OPT))
+      s = get_time_string (priv->hour, priv->minute, priv->second);
+   else
+      s = get_time_string (priv->hour, priv->minute, 0xff);
+
+   gtk_entry_set_text (GTK_ENTRY (priv->time_entry), s);
+
+   g_free (s);
+}
+
+/* Parse the current date entry and normalize the date. */
+static void
+parse_date (EggDateTime *edt)
+{
+   GDate date;
+
+   g_date_set_parse (&date, gtk_entry_get_text (GTK_ENTRY (edt->priv->date_entry)));
+   if (!g_date_valid (&date)) {
+      if (edt->priv->lazy)
+         edt->priv->date_valid = FALSE;
+      return;
+   }
+
+   edt->priv->year  = date.year;
+   edt->priv->month = date.month;
+   edt->priv->day   = date.day;
+   edt->priv->date_valid = TRUE;
+
+   normalize_date (edt);
+}
+
+/* Parse the current time entry and normalize the time. */
+static void
+parse_time (EggDateTime *edt)
+{
+   const gchar *s;
+   gchar *scp;
+   unsigned int hour, minute, second = 0;
+   size_t len1, len2, len3;
+
+   /* Retrieve and Parse String */
+
+   s = gtk_entry_get_text (GTK_ENTRY (edt->priv->time_entry));
+
+   /* Translators: This is hh:mm:ss. */
+   if (sscanf (s, _("%u:%u:%u"), &hour, &minute, &second) < 2) {
+      if (sscanf (s, "%u:%u:%u", &hour, &minute, &second) < 2) {
+         if (edt->priv->lazy)
+            edt->priv->time_valid = FALSE;
+         return;
+      }
+   }
+
+   if (hour > 23 || minute > 59 || second > 59) {
+      if (edt->priv->lazy)
+         edt->priv->time_valid = FALSE;
+      return;
+   }
+
+   /* AM/PM Handling */
+
+   scp = g_strdup (s);
+   scp = g_strchomp (scp);
+
+   len1 = strlen (_("AM"));
+   len2 = strlen (_("PM"));
+   len3 = strlen (scp);
+
+   if (len1 < len3 && !strcasecmp (scp + len3 - len1, _("AM"))) {
+      if (hour == 12)
+         hour = 0;
+   }
+   if (len2 < len3 && !strcasecmp (scp + len3 - len2, _("PM"))) {
+      if (hour == 12)
+         hour = 0;
+      hour += 12;
+   }
+
+   /* Store Time */
+
+   edt->priv->hour   = hour;
+   edt->priv->minute = minute;
+   edt->priv->second = second;
+   edt->priv->time_valid = TRUE;
+
+   /* Cleanup */
+
+   g_free (scp);
+
+   normalize_time (edt);
+}
+
+/* Clamp the current date to the date clamp range if lazy is turned off. */
+static void
+normalize_date (EggDateTime *edt)
+{
+   GDate date, min_date, max_date;
+
+   if (edt->priv->lazy)
+      return;
+
+   g_date_clear (&date, 1);
+   g_date_set_dmy (&date, edt->priv->day, edt->priv->month, edt->priv->year);
+   g_date_clear (&min_date, 1);
+   g_date_set_dmy (&min_date, edt->priv->clamp_minday, edt->priv->clamp_minmonth, edt->priv->clamp_minyear);
+   g_date_clear (&max_date, 1);
+   g_date_set_dmy (&max_date, edt->priv->clamp_maxday, edt->priv->clamp_maxmonth, edt->priv->clamp_maxyear);
+
+   g_date_clamp (&date, &min_date, &max_date);
+
+   edt->priv->year  = date.year;
+   edt->priv->month = date.month;
+   edt->priv->day   = date.day;
+   edt->priv->date_valid = TRUE;
+}
+
+/* Clamp the current time to the time clamp range if lazy is turned off. */
+static void
+normalize_time (EggDateTime *edt)
+{
+   if (edt->priv->lazy)
+      return;
+
+   if (edt->priv->hour < edt->priv->clamp_minhour) {
+      edt->priv->hour   = edt->priv->clamp_minhour;
+      edt->priv->minute = edt->priv->clamp_minminute;
+      edt->priv->second = edt->priv->clamp_minsecond;
+   } else if (edt->priv->hour == edt->priv->clamp_minhour) {
+      if (edt->priv->minute < edt->priv->clamp_minminute) {
+         edt->priv->minute = edt->priv->clamp_minminute;
+         edt->priv->second = edt->priv->clamp_minsecond;
+      } else if (edt->priv->minute == edt->priv->clamp_minminute) {
+         if (edt->priv->second < edt->priv->clamp_minsecond)
+            edt->priv->second = edt->priv->clamp_minsecond;
+      }
+   }
+
+   if (edt->priv->hour > edt->priv->clamp_maxhour) {
+      edt->priv->hour   = edt->priv->clamp_maxhour;
+      edt->priv->minute = edt->priv->clamp_maxminute;
+      edt->priv->second = edt->priv->clamp_maxsecond;
+   } else if (edt->priv->hour == edt->priv->clamp_maxhour) {
+      if (edt->priv->minute > edt->priv->clamp_maxminute) {
+         edt->priv->minute = edt->priv->clamp_maxminute;
+         edt->priv->second = edt->priv->clamp_maxsecond;
+      } else if (edt->priv->minute == edt->priv->clamp_maxminute) {
+         if (edt->priv->second > edt->priv->clamp_maxsecond)
+            edt->priv->second = edt->priv->clamp_maxsecond;
+      }
+   }
+
+   edt->priv->time_valid = TRUE;
+}
+
+static void
+parse_and_update_date (EggDateTime *edt)
+{
+   if (edt->priv->lazy)
+      return;
+
+   parse_date (edt);
+   update_date_label (edt);
+}
+
+static void
+parse_and_update_time (EggDateTime *edt)
+{
+   if (edt->priv->lazy)
+      return;
+
+   parse_time (edt);
+   update_time_label (edt);
+}
+
+/*
+ * Public Methods
+ */
+
+/**
+ * egg_datetime_new:
+ *
+ * Creates a new #EggDateTime widget. By default this widget will show
+ * only the date component and is set to the current date and time.
+ *
+ * Return value: a newly created #EggDateTime widget
+ **/
+GtkWidget *
+egg_datetime_new (void)
+{
+   EggDateTime *edt;
+
+   edt = g_object_new (EGG_TYPE_DATETIME, NULL);
+   egg_datetime_set_from_time_t (edt, time (NULL));
+
+   return GTK_WIDGET (edt);
+}
+
+/**
+ * egg_datetime_new_from_time_t:
+ * @t: initial time and date
+ *
+ * Creates a new #EggDateTime widget and sets it to the date and time
+ * given as @t argument. This does also call egg_datetime_set_clamp_time_t().
+ * By default this widget will show only the date component.
+ *
+ * Return value: a newly created #EggDateTime widget
+ **/
+GtkWidget *
+egg_datetime_new_from_time_t (time_t t)
+{
+   EggDateTime *edt;
+
+   g_return_val_if_fail (t >= 0, NULL);
+
+   edt = g_object_new (EGG_TYPE_DATETIME, NULL);
+   egg_datetime_set_from_time_t (edt, t);
+   egg_datetime_set_clamp_time_t (edt);
+
+   return GTK_WIDGET (edt);
+}
+
+/**
+ * egg_datetime_new_from_struct_tm:
+ * @tm: initial time and date
+ *
+ * Creates a new #EggDateTime widget and sets it to the date and time
+ * given as @tm argument. By default this widget will show only the date
+ * component.
+ *
+ * Return value: a newly created #EggDateTime widget
+ **/
+GtkWidget *
+egg_datetime_new_from_struct_tm (struct tm *tm)
+{
+   EggDateTime *edt;
+
+   g_return_val_if_fail (tm != NULL, NULL);
+
+   edt = g_object_new (EGG_TYPE_DATETIME, NULL);
+   egg_datetime_set_from_struct_tm (edt, tm);
+
+   return GTK_WIDGET (edt);
+}
+
+/**
+ * egg_datetime_new_from_gdate:
+ * @date: initial time and date
+ *
+ * Creates a new #EggDateTime widget and sets it to the date and time
+ * given as @date argument. By default this widget will show only the
+ * date component.
+ *
+ * Return value: a newly created #EggDateTime widget
+ **/
+GtkWidget *
+egg_datetime_new_from_gdate (GDate *date)
+{
+   EggDateTime *edt;
+
+   g_return_val_if_fail (date != NULL, NULL);
+
+   edt = g_object_new (EGG_TYPE_DATETIME, NULL);
+   egg_datetime_set_from_gdate (edt, date);
+
+   return GTK_WIDGET (edt);
+}
+
+/**
+ * egg_datetime_new_from_datetime:
+ * @year: initial year
+ * @month: initial month
+ * @day: initial day
+ * @hour: initial hour
+ * @minute: initial minute
+ * @second: initial second
+ *
+ * Creates a new #EggDateTime widget and sets it to the date and time
+ * given as arguments.
+ *
+ * Return value: a newly created #EggDateTime widget
+ **/
+GtkWidget *
+egg_datetime_new_from_datetime (GDateYear year, GDateMonth month, GDateDay day, guint8 hour, guint8 minute, guint8 second)
+{
+   EggDateTime *edt;
+
+   edt = g_object_new (EGG_TYPE_DATETIME, NULL);
+   egg_datetime_set_date (edt, year, month, day);
+   egg_datetime_set_time (edt, hour, minute, second);
+
+   return GTK_WIDGET (edt);
+}
+
+/**
+ * egg_datetime_set_none:
+ * @edt: an #EggDateTime
+ *
+ * Sets the date to an invalid value. If lazy mode is turned off the date
+ * and time will be set to a random value.
+ **/
+void
+egg_datetime_set_none (EggDateTime *edt)
+{
+   g_return_if_fail (edt != NULL);
+   g_return_if_fail (EGG_IS_DATETIME (edt));
+
+   edt->priv->date_valid = FALSE;
+   edt->priv->time_valid = FALSE;
+
+   update_date_label (edt);
+   update_time_label (edt);
+
+   g_signal_emit (G_OBJECT (edt), egg_datetime_signals[SIGNAL_DATE_CHANGED], 0);
+   g_signal_emit (G_OBJECT (edt), egg_datetime_signals[SIGNAL_TIME_CHANGED], 0);
+}
+
+/**
+ * egg_datetime_set_from_time_t:
+ * @edt: an #EggDateTime
+ * @t: date and time to set the widget to
+ *
+ * Sets the date and time of the widget to @t.
+ **/
+void
+egg_datetime_set_from_time_t (EggDateTime *edt, time_t t)
+{
+   struct tm tm;
+
+   g_return_if_fail (edt != NULL);
+   g_return_if_fail (EGG_IS_DATETIME (edt));
+
+   if (localtime_r (&t, &tm)) {
+      egg_datetime_set_date (edt, tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday);
+      egg_datetime_set_time (edt, tm.tm_hour, tm.tm_min, tm.tm_sec);
+   } else
+      egg_datetime_set_none (edt);
+}
+
+/**
+ * egg_datetime_get_as_time_t:
+ * @edt: an #EggDateTime
+ * @t: pointer to a %time_t value
+ *
+ * Returns the current time as a %time_t value. If the currently entered
+ * value is invalid and lazy mode is turned on or if the entered date
+ * can't be represented as a %time_t value, the value is set to -1 and
+ * FALSE is returned.
+ *
+ * Return value: success indicator
+ **/
+gboolean
+egg_datetime_get_as_time_t (EggDateTime *edt, time_t *t)
+{
+   struct tm tm;
+   GDateYear year;
+        GDateMonth month;
+   GDateDay day;
+   guint8 hour, minute, second;
+
+   g_return_val_if_fail (edt != NULL, FALSE);
+   g_return_val_if_fail (EGG_IS_DATETIME (edt), FALSE);
+
+   if (!t)
+      return FALSE;
+
+   if (!egg_datetime_get_date (edt, &year, &month, &day)) {
+      *t = -1;
+      return FALSE;
+   }
+   if (!egg_datetime_get_time (edt, &hour, &minute, &second)) {
+      *t = -1;
+      return FALSE;
+   }
+
+   memset (&tm, 0, sizeof (struct tm));
+   tm.tm_year = year - 1900;
+   tm.tm_mon  = month - 1;
+   tm.tm_mday = day;
+   tm.tm_hour = hour;
+   tm.tm_min  = minute;
+   tm.tm_sec  = second;
+
+   *t = mktime (&tm);
+
+   if (*t < 0) {
+      *t = -1;
+      return FALSE;
+   }
+   
+   return TRUE;
+}
+
+/**
+ * egg_datetime_set_from_struct_tm:
+ * @edt: an #EggDateTime
+ * @tm: date and time to set the widget to
+ *
+ * Sets the date and time of the widget to @tm.
+ **/
+void
+egg_datetime_set_from_struct_tm (EggDateTime *edt, struct tm *tm)
+{
+   g_return_if_fail (edt != NULL);
+   g_return_if_fail (EGG_IS_DATETIME (edt));
+   g_return_if_fail (tm != NULL);
+
+   egg_datetime_set_date (edt, tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday);
+   egg_datetime_set_time (edt, tm->tm_hour, tm->tm_min, tm->tm_sec);
+}
+
+/**
+ * egg_datetime_get_as_struct_tm:
+ * @edt: an #EggDateTime
+ * @tm: pointer to an allocated struct tm
+ *
+ * Fill the supplied struct tm with the widget's current date and time.
+ * If the currently entered value is invalid and lazy mode is turned
+ * on or if the entered date can't be represented as a struct tm, the
+ * struct is filled with invalid data and FALSE is returned.
+ *
+ * Return value: success indicator
+ **/
+gboolean
+egg_datetime_get_as_struct_tm (EggDateTime *edt, struct tm *tm)
+{
+   GDateYear year;
+   GDateMonth month;
+   GDateDay day;
+   guint8 hour, minute, second;
+
+   g_return_val_if_fail (edt != NULL, FALSE);
+   g_return_val_if_fail (EGG_IS_DATETIME (edt), FALSE);
+
+   if (!tm)
+      return FALSE;
+
+   memset (tm, 0, sizeof (struct tm));
+
+   if (!egg_datetime_get_date (edt, &year, &month, &day))
+      return FALSE;
+   if (!egg_datetime_get_time (edt, &hour, &minute, &second))
+      return FALSE;
+
+   tm->tm_year = year - 1900;
+   tm->tm_mon  = month - 1;
+   tm->tm_mday = day;
+   tm->tm_hour = hour;
+   tm->tm_min  = minute;
+   tm->tm_sec  = second;
+
+   mktime (tm);
+   
+   return TRUE;
+}
+
+/**
+ * egg_datetime_set_from_gdate:
+ * @edt: an #EggDateTime
+ * @date: date to set the widget to
+ *
+ * Sets the date of the widget to @date. The time will remain unchanged.
+ **/
+void
+egg_datetime_set_from_gdate (EggDateTime *edt, GDate *date)
+{
+   g_return_if_fail (edt != NULL);
+   g_return_if_fail (EGG_IS_DATETIME (edt));
+   g_return_if_fail (date != NULL);
+
+   if (g_date_valid (date))
+      egg_datetime_set_date (edt, date->year, date->month, date->day);
+   else
+      egg_datetime_set_none (edt);
+}
+
+/**
+ * egg_datetime_get_as_gdate:
+ * @edt: an #EggDateTime
+ * @date: pointer to an allocated #GDate
+ *
+ * Fills the supplied #GDate with the widget's current date. If the
+ * currently entered date value is invalid and lazy mode is turned
+ * on or if the entered date can't be represented as a #GDate, the
+ * @date is set to an invalid value and FALSE is returned.
+ *
+ * Return value: success indicator
+ **/
+gboolean
+egg_datetime_get_as_gdate (EggDateTime *edt, GDate *date)
+{
+   GDateYear year;
+   GDateMonth month;
+   GDateDay day;
+
+   g_return_val_if_fail (edt != NULL, FALSE);
+   g_return_val_if_fail (EGG_IS_DATETIME (edt), FALSE);
+
+   if (!date)
+      return FALSE;
+
+   g_date_clear (date, 1);
+
+   if (!egg_datetime_get_date (edt, &year, &month, &day))
+      return FALSE;
+
+   g_date_set_dmy (date, day, month, year);
+
+   return TRUE;
+}
+
+/**
+ * egg_datetime_set_date:
+ * @edt: an #EggDateTime
+ * @year: a #guint16 between 1 and 9999
+ * @month: a #guint8 between 1 and 12
+ * @day: a #guint8 between 1 and 28-31 (depending on @month)
+ *
+ * Sets the date of the widget. The time will remain unchanged.
+ **/
+void
+egg_datetime_set_date (EggDateTime *edt, GDateYear year, GDateMonth month, GDateDay day)
+{
+   g_return_if_fail (edt != NULL);
+   g_return_if_fail (EGG_IS_DATETIME (edt));
+   g_return_if_fail (year >= 1 && year <= 9999);
+   g_return_if_fail (month >= 1 && month <= 12);
+   g_return_if_fail (day >= 1 && day <= g_date_get_days_in_month (month, year));
+
+   edt->priv->year  = year;
+   edt->priv->month = month;
+   edt->priv->day   = day;
+   edt->priv->date_valid = TRUE;
+
+   normalize_date (edt);
+   update_date_label (edt);
+
+   g_signal_emit (G_OBJECT (edt), egg_datetime_signals[SIGNAL_DATE_CHANGED], 0);
+}
+
+/**
+ * egg_datetime_get_date:
+ * @edt: an #EggDateTime
+ * @year: a pointer to a #guint16 or %NULL
+ * @month: a pointer to #guint8 or %NULL
+ * @day: a pointer to a #guint8 or %NULL
+ *
+ * Fills the supplied arguments with the widget's current date. If the
+ * currently entered date value is invalid and lazy mode is turned
+ * on, the arguments are set to %EGG_DATETIME_INVALID_DATE and FALSE
+ * is returned.
+ *
+ * Return value: success indicator
+ **/
+gboolean
+egg_datetime_get_date (EggDateTime *edt, GDateYear *year, GDateMonth *month, GDateDay *day)
+{
+   g_return_val_if_fail (edt != NULL, FALSE);
+   g_return_val_if_fail (EGG_IS_DATETIME (edt), FALSE);
+
+   parse_date (edt);
+
+   if (!edt->priv->date_valid) {
+      if (year)
+         *year = 0;
+      if (month)
+         *month = 0;
+      if (day)
+         *day = 0;
+      return FALSE;
+   }
+
+   if (year)
+      *year  = edt->priv->year;
+   if (month)
+      *month = edt->priv->month;
+   if (day)
+      *day   = edt->priv->day;
+   
+   return TRUE;
+}
+
+/**
+ * egg_datetime_set_time:
+ * @edt: an #EggDateTime
+ * @hour: a #guint8 between 0 and 23
+ * @minute: a #guint8 between 0 and 59
+ * @second: a #guint8 between 0 and 59
+ *
+ * Sets the time of the widget. The date will remain unchanged.
+ **/
+void
+egg_datetime_set_time (EggDateTime *edt, guint8 hour, guint8 minute, guint8 second)
+{
+   g_return_if_fail (edt != NULL);
+   g_return_if_fail (EGG_IS_DATETIME (edt));
+   g_return_if_fail (hour <= 23);
+   g_return_if_fail (minute <= 59);
+   g_return_if_fail (second <= 59);
+
+   edt->priv->hour   = hour;
+   edt->priv->minute = minute;
+   edt->priv->second = second;
+   edt->priv->time_valid = TRUE;
+
+   normalize_time (edt);
+   update_time_label (edt);
+
+   g_signal_emit (G_OBJECT (edt), egg_datetime_signals[SIGNAL_TIME_CHANGED], 0);
+}
+
+/**
+ * egg_datetime_get_date:
+ * @edt: an #EggDateTime
+ * @hour: a pointer to a #guint8 or %NULL
+ * @minute: a pointer to #guint8 or %NULL
+ * @second: a pointer to a #guint8 or %NULL
+ *
+ * Fills the supplied arguments with the widget's current time. If the
+ * currently entered time value is invalid and lazy mode is turned
+ * on, the arguments are set to %EGG_DATETIME_INVALID_TIME and FALSE
+ * is returned.
+ *
+ * Return value: success indicator
+ **/
+gboolean
+egg_datetime_get_time (EggDateTime *edt, guint8 *hour, guint8 *minute, guint8 *second)
+{
+   g_return_val_if_fail (edt != NULL, FALSE);
+   g_return_val_if_fail (EGG_IS_DATETIME (edt), FALSE);
+
+   parse_time (edt);
+
+   if (!edt->priv->time_valid) {
+      if (hour)
+         *hour = 0xff;
+      if (minute)
+         *minute = 0xff;
+      if (second)
+         *second = 0xff;
+      return FALSE;
+   }
+
+   if (hour)
+      *hour   = edt->priv->hour;
+   if (minute)
+      *minute = edt->priv->minute;
+   if (second)
+      *second = edt->priv->second;
+   
+   return TRUE;
+}
+
+/**
+ * egg_datetime_set_lazy:
+ * @edt: an #EggDateTime
+ * @lazy: a boolean value
+ *
+ * Turns the widget's lazy mode on or off. In lazy mode the widget will
+ * allow invalid values to be entered. If lazy mode is turned off the
+ * widget will normalize all invalid values entered in the date and time
+ * widgets to the nearest valid value. This guarantees that the get methods
+ * will always return valid values.
+ *
+ * Lazy mode defaults to %TRUE.
+ **/
+void
+egg_datetime_set_lazy (EggDateTime *edt, gboolean lazy)
+{
+   g_return_if_fail (edt != NULL);
+   g_return_if_fail (EGG_IS_DATETIME (edt));
+
+   edt->priv->lazy = lazy ? TRUE : FALSE;
+
+   parse_and_update_date (edt);
+   parse_and_update_time (edt);
+
+   g_signal_emit (G_OBJECT (edt), egg_datetime_signals[SIGNAL_DATE_CHANGED], 0);
+   g_signal_emit (G_OBJECT (edt), egg_datetime_signals[SIGNAL_TIME_CHANGED], 0);
+}
+
+/**
+ * egg_datetime_get_lazy:
+ * @edt: an #EggDateTime
+ *
+ * Returns whether the widget is in lazy mode.
+ *
+ * Return value: a boolean value
+ **/
+gboolean
+egg_datetime_get_lazy (EggDateTime *edt)
+{
+   g_return_val_if_fail (edt != NULL, FALSE);
+   g_return_val_if_fail (EGG_IS_DATETIME (edt), FALSE);
+
+   return edt->priv->lazy;
+}
+
+/**
+ * egg_datetime_set_display_mode:
+ * @edt: an #EggDateTime
+ * @mode: new display mode
+ *
+ * Sets the widget's new display mode to @mode. The display mode defaults
+ * to %EGG_DATETIME_DISPLAY_DATE.
+ **/
+void
+egg_datetime_set_display_mode (EggDateTime *edt, EggDateTimeDisplayMode mode)
+{
+   g_return_if_fail (edt != NULL);
+   g_return_if_fail (EGG_IS_DATETIME (edt));
+
+   edt->priv->display_mode = mode;
+
+   apply_display_mode (edt);
+}
+
+/**
+ * egg_datetime_get_display_mode:
+ * @edt: an #EggDateTime
+ *
+ * Returns the current display mode.
+ *
+ * Return value: The current display mode.
+ **/
+EggDateTimeDisplayMode
+egg_datetime_get_display_mode (EggDateTime *edt)
+{
+   g_return_val_if_fail (edt != NULL, 0);
+   g_return_val_if_fail (EGG_IS_DATETIME (edt), 0);
+
+   return edt->priv->display_mode;
+}
+
+/**
+ * egg_datetime_set_clamp_date:
+ * @edt: an #EggDateTime
+ * @minyear: minimum year
+ * @minmonth: minimum month
+ * @minday: minimum day
+ * @maxyear: maximum year
+ * @maxmonth: maximum month
+ * @maxday: maximum day
+ *
+ * Limits the allowed dates to the range given. If lazy mode is
+ * turned off, dates that are outside of this range are snapped to the
+ * minimum or maximum date. Otherwise such dates return an invalid value.
+ *
+ * This defaults to the minimum date 1-1-1 and maximum date 9999-12-31.
+ * The maximum year is always limited to 9999.
+ **/
+void
+egg_datetime_set_clamp_date (EggDateTime *edt,
+              GDateYear  minyear,
+              GDateMonth minmonth,
+              GDateDay   minday,
+              GDateYear  maxyear,
+              GDateMonth maxmonth,
+              GDateDay   maxday)
+{
+   if (maxyear > 9999)
+      maxyear = 9999;
+
+   g_return_if_fail (minyear >= 1 && minyear <= 9999 && maxyear >= 1);
+   g_return_if_fail (minmonth >= 1 && minmonth <= 12 && maxmonth >= 1 && maxmonth <= 12);
+   g_return_if_fail (minday >= 1 && minday <= g_date_get_days_in_month (minmonth, minyear));
+   g_return_if_fail (maxday >= 1 && maxday <= g_date_get_days_in_month (maxmonth, maxyear));
+   g_return_if_fail (minyear <= maxyear);
+   g_return_if_fail (minyear < maxyear || minmonth <= maxmonth);
+   g_return_if_fail (minyear < maxyear || minmonth < maxmonth || minday <= maxday);
+
+   edt->priv->clamp_minyear  = minyear;
+   edt->priv->clamp_minmonth = minmonth;
+   edt->priv->clamp_minday   = minday;
+   edt->priv->clamp_maxyear  = maxyear;
+   edt->priv->clamp_maxmonth = maxmonth;
+   edt->priv->clamp_maxday   = maxday;
+
+   parse_and_update_date (edt);
+
+   g_signal_emit (G_OBJECT (edt), egg_datetime_signals[SIGNAL_DATE_CHANGED], 0);
+}
+
+/**
+ * egg_datetime_set_clamp_time:
+ * @edt: an #EggDateTime
+ * @minhour: minimum hour
+ * @minminute: minimum minute
+ * @minsecond: minimum second
+ * @maxhour: maximum hour
+ * @maxminute: maximum minute
+ * @maxsecond: maximum second
+ *
+ * Limits the allowed times to the range given. If lazy mode is turned
+ * off, times that are outside of this range are snapped to the minimum or
+ * maximum time. Otherwise such times return an invalid value.
+ **/
+void
+egg_datetime_set_clamp_time (EggDateTime *edt, guint8 minhour, guint8 minminute, guint8 minsecond, guint8 maxhour, guint8 maxminute, guint8 maxsecond)
+{
+   g_return_if_fail (minhour <= 23 && maxhour <= 23);
+   g_return_if_fail (minminute <= 59 && maxminute <= 59);
+   g_return_if_fail (minsecond <= 59 && maxsecond <= 59);
+   g_return_if_fail (minhour <= maxhour);
+   g_return_if_fail (minhour < maxhour || minminute <= maxminute);
+   g_return_if_fail (minhour < maxhour || minminute < maxminute || minsecond <= maxsecond);
+
+   edt->priv->clamp_minhour   = minhour;
+   edt->priv->clamp_minminute = minminute;
+   edt->priv->clamp_minsecond = minsecond;
+   edt->priv->clamp_maxhour   = maxhour;
+   edt->priv->clamp_maxminute = maxminute;
+   edt->priv->clamp_maxsecond = maxsecond;
+
+   clamp_time_labels (edt);
+   parse_and_update_time (edt);
+
+   g_signal_emit (G_OBJECT (edt), egg_datetime_signals[SIGNAL_TIME_CHANGED], 0);
+}
+
+/**
+ * egg_datetime_set_clamp_time_t:
+ * @edt: an #EggDateTime
+ *
+ * Clamps the allowed dates of the widget to valid #time_t values.
+ * The time clamp settings are not changed.
+ **/
+void
+egg_datetime_set_clamp_time_t (EggDateTime *edt)
+{
+   time_t t;
+   struct tm start_tm, end_tm;
+   guint bits;
+   guint16 year;
+   guint8 month, day;
+
+   g_return_if_fail (edt != NULL);
+   g_return_if_fail (EGG_IS_DATETIME (edt));
+
+   t = 0;
+   gmtime_r (&t, &start_tm);
+
+   /* evil hack */
+   bits = time_t_bits ();
+   t = ~0;
+   t &= ~(1 << (bits - 1));
+
+   gmtime_r (&t, &end_tm);
+
+   /* Subtract one day from the end date, since not all times of
+    * the last day can be represented.
+    */
+
+   year  = end_tm.tm_year + 1900;
+   month = end_tm.tm_mon + 1;
+   day   = end_tm.tm_mday;
+
+   if (--day == 0)   {
+      if (--month == 0) {
+         year--;
+         month = 12;
+      }
+
+      day = g_date_get_days_in_month (month, year);
+   }
+
+   egg_datetime_set_clamp_date (edt, start_tm.tm_year + 1900, start_tm.tm_mon + 1, start_tm.tm_mday, year, month, day);
+}
+
+/**
+ * egg_datetime_get_clamp_date:
+ * @edt: an #EggDateTime
+ * @minyear: #guint16 pointer or %NULL
+ * @minmonth: #guint8 pointer or %NULL
+ * @minday: #guint8 pointer or %NULL
+ * @maxyear: #guint16 pointer or %NULL
+ * @maxmonth: #guint8 pointer or %NULL
+ * @maxday: #guint8 pointer or %NULL
+ *
+ * Returns the current date limit settings.
+ **/
+void
+egg_datetime_get_clamp_date (EggDateTime *edt,
+              GDateYear   *minyear,
+              GDateMonth  *minmonth,
+              GDateDay    *minday,
+              GDateYear   *maxyear,
+              GDateMonth  *maxmonth,
+              GDateDay    *maxday)
+{
+   g_return_if_fail (edt != NULL);
+   g_return_if_fail (EGG_IS_DATETIME (edt));
+
+   if (minyear)
+      *minyear = edt->priv->clamp_minyear;
+   if (minmonth)
+      *minmonth = edt->priv->clamp_minmonth;
+   if (minday)
+      *minday = edt->priv->clamp_minday;
+   if (maxyear)
+      *maxyear = edt->priv->clamp_maxyear;
+   if (maxmonth)
+      *maxmonth = edt->priv->clamp_maxmonth;
+   if (maxday)
+      *maxday = edt->priv->clamp_maxday;
+}
+
+/**
+ * egg_datetime_get_clamp_time:
+ * @edt: an #EggDateTime
+ * @minhour: #guint8 pointer or %NULL
+ * @minminute: #guint8 pointer or %NULL
+ * @minsecond: #guint8 pointer or %NULL
+ * @maxhour: #guint8 pointer or %NULL
+ * @maxminute: #guint8 pointer or %NULL
+ * @maxsecond: #guint8 pointer or %NULL
+ *
+ * Returns the current time limit settings.
+ **/
+void
+egg_datetime_get_clamp_time (EggDateTime *edt, guint8 *minhour, guint8 *minminute, guint8 *minsecond, guint8 *maxhour, guint8 *maxminute, guint8 *maxsecond)
+{
+   g_return_if_fail (edt != NULL);
+   g_return_if_fail (EGG_IS_DATETIME (edt));
+
+   if (minhour)
+      *minhour = edt->priv->clamp_minhour;
+   if (minminute)
+      *minminute = edt->priv->clamp_minminute;
+   if (minsecond)
+      *minsecond = edt->priv->clamp_minsecond;
+   if (maxhour)
+      *maxhour = edt->priv->clamp_maxhour;
+   if (maxminute)
+      *maxminute = edt->priv->clamp_maxminute;
+   if (maxsecond)
+      *maxsecond = edt->priv->clamp_maxsecond;
+}
+
+/**
+ * egg_datetime_get_date_layout:
+ * @edt: an #EggDateTime
+ *
+ * Gets the PangoLayout used to display the date. See gtk_entry_get_layout()
+ * for more information. The returned layout is owned by the date/time
+ * widget so need not be freed by the caller.
+ *
+ * Return value: the #PangoLayout for this widget's date part
+ */
+PangoLayout *
+egg_datetime_get_date_layout (EggDateTime *edt)
+{
+   g_return_val_if_fail (edt != NULL, NULL);
+   g_return_val_if_fail (EGG_IS_DATETIME (edt), NULL);
+
+   return gtk_entry_get_layout (GTK_ENTRY (edt->priv->date_entry));
+}
+
+/**
+ * egg_datetime_get_time_layout:
+ * @edt: an #EggDateTime
+ *
+ * Gets the PangoLayout used to display the time. See gtk_entry_get_layout()
+ * for more information. The returned layout is owned by the date/time
+ * widget so need not be freed by the caller.
+ *
+ * Return value: the #PangoLayout for this widget's time part
+ */
+PangoLayout *
+egg_datetime_get_time_layout (EggDateTime *edt)
+{
+   g_return_val_if_fail (edt != NULL, NULL);
+   g_return_val_if_fail (EGG_IS_DATETIME (edt), NULL);
+
+   return gtk_entry_get_layout (GTK_ENTRY (edt->priv->time_entry));
+}
+
+/**************************************************************************/
+
+/* This is a private time list widget implementation for use as time popup.
+ */
+
+static GtkWidget *
+timelist_new (void)
+{
+   GtkWidget *timelist;
+   GtkWidget *list;
+   GtkListStore *model;
+   GtkTreeSelection *selection;
+   GtkCellRenderer *renderer;
+
+   timelist = gtk_scrolled_window_new (NULL, NULL);
+   gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (timelist),
+               GTK_POLICY_NEVER,
+               GTK_POLICY_ALWAYS);
+
+   model = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_UINT);
+   list = gtk_tree_view_new_with_model (GTK_TREE_MODEL (model));
+   gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (list), FALSE);
+   gtk_widget_show (list);
+
+   renderer = gtk_cell_renderer_text_new ();
+   gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (list),
+                       -1,
+                       _("Time"),
+                       renderer,
+                       "text", 0,
+                       NULL);
+
+   gtk_container_add (GTK_CONTAINER (timelist), list);
+
+   selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (list));
+   gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE);
+
+   timelist_set_list (TIMELIST (timelist), 00, 00, 23, 59);
+
+   return timelist;
+}
+
+static void
+timelist_set_list (Timelist *timelist,
+         guint8 minhour, guint8 minminute,
+         guint8 maxhour, guint8 maxminute)
+{
+   GtkWidget *tree = gtk_bin_get_child (GTK_BIN (timelist));
+   GtkTreeModel *model = gtk_tree_view_get_model (GTK_TREE_VIEW (tree));
+   gint minidx, maxidx;
+   gint i;
+
+   minidx = minhour * 2 + (minminute + 29) / 30;
+   maxidx = maxhour * 2 + (maxminute + 29) / 30;
+
+   for (i = minidx; i < maxidx; i++) {
+      GtkTreeIter iter;
+      gchar *s;
+      guint hour, minute;
+
+      hour = i / 2;
+      minute = (i % 2) * 30;
+
+      s = get_time_string (hour, minute, 0xff);
+
+      gtk_list_store_append (GTK_LIST_STORE (model), &iter);
+      gtk_list_store_set (GTK_LIST_STORE (model), &iter,
+                0, s,
+                1, hour * 100 + minute,
+                -1);
+
+      g_free (s);
+   }
+}
+
+static void
+timelist_set_time (Timelist *timelist, guint8 hour, guint8 minute)
+{
+   GtkWidget *tree = gtk_bin_get_child (GTK_BIN (timelist));
+   GtkTreeModel *model;
+   GtkTreeSelection *selection;
+   GtkTreeIter iter;
+
+   model = gtk_tree_view_get_model (GTK_TREE_VIEW (tree));
+   selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tree));
+
+   if (!gtk_tree_model_get_iter_first (model, &iter))
+      return;
+
+   do {
+      guint time;
+
+      gtk_tree_model_get (model, &iter, 1, &time, -1);
+
+      if (time / 100 == hour && time % 100 == minute) {
+         gtk_tree_selection_select_iter (selection, &iter);
+         return;
+      }
+
+   } while (gtk_tree_model_iter_next (model, &iter));
+
+   gtk_tree_selection_unselect_all (selection);
+}
+
+static gboolean
+timelist_get_time (Timelist *timelist, guint8 *hour, guint8 *minute)
+{
+   GtkWidget *tree = gtk_bin_get_child (GTK_BIN (timelist));
+   GtkTreeSelection *selection;
+   GtkTreeModel *model;
+   GtkTreeIter iter;
+   guint time;
+
+   selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tree));
+
+   if (!gtk_tree_selection_get_selected (selection, &model, &iter))
+      return FALSE;
+
+   gtk_tree_model_get (model, &iter, 1, &time, -1);
+
+   if (hour)
+      *hour = time / 100;
+   if (minute)
+      *minute = time % 100;
+
+   return TRUE;
+}
+
+static void
+timelist_clamp (Timelist *timelist,
+      guint8 minhour, guint8 minminute,
+      guint8 maxhour, guint8 maxminute)
+{
+   timelist_set_list (timelist, minhour, minminute, maxhour, maxminute);
+}
+
+static void
+timelist_selection_cb (Timelist *timelist, GtkTreeSelection *selection)
+{
+   void (*cb)(gpointer, Timelist *);
+   gpointer data;
+
+   cb   = g_object_get_data (G_OBJECT (selection), "cb");
+   data = g_object_get_data (G_OBJECT (selection), "data");
+
+   cb (data, timelist);
+}
+
+static void
+timelist_set_selection_callback (Timelist *timelist, void (*cb)(void), gpointer data)
+{
+   GtkWidget *tree = gtk_bin_get_child (GTK_BIN (timelist));
+   GtkTreeSelection *selection;
+
+   selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tree));
+
+   g_object_set_data (G_OBJECT (selection), "cb", cb);
+   g_object_set_data (G_OBJECT (selection), "data", data);
+   g_signal_connect_swapped (G_OBJECT (selection), "changed",
+              G_CALLBACK (timelist_selection_cb), timelist);
+}
Index: INSTALL
===================================================================
--- INSTALL	(revision 2165)
+++ INSTALL	(working copy)
@@ -15,8 +15,6 @@
  - DBUS 0.35 (or later)
  - GPGME 1.x 
  - GnuPG 1.2.x or 1.4.x 
- - libgnome 2.14 (or later)
- - libgnomeui 2.x 
  - libglade 2.x 
  - GConf 2.x 
  - GnomeVFS 2.x
Index: plugins/nautilus/seahorse-tool-files.c
===================================================================
--- plugins/nautilus/seahorse-tool-files.c	(revision 2165)
+++ plugins/nautilus/seahorse-tool-files.c	(working copy)
@@ -20,12 +20,16 @@
  */
 
 #include "config.h"
+
 #include <sys/types.h>
 #include <sys/wait.h>
 #include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
 #include <libintl.h>
 
-#include <gnome.h>
+#include <glib/gi18n.h>
+
 #include <libgnomevfs/gnome-vfs.h>
 
 #include "seahorse-tool.h"
Index: plugins/nautilus/seahorse-tool.c
===================================================================
--- plugins/nautilus/seahorse-tool.c	(revision 2165)
+++ plugins/nautilus/seahorse-tool.c	(working copy)
@@ -20,9 +20,14 @@
  */
 
 #include "config.h"
-#include <gnome.h>
+
+#include <errno.h>
+#include <string.h>
+
 #include <glib.h>
+#include <glib/gi18n.h>
 #include <glib/gprintf.h>
+
 #include <libgnomevfs/gnome-vfs.h>
 
 #include <dbus/dbus-glib-bindings.h>
@@ -651,11 +656,7 @@
     octx = g_option_context_new ("");
     g_option_context_add_main_entries (octx, options, GETTEXT_PACKAGE);
 
-    /* Main operation process */
-    gnome_program_init("seahorse-tool", VERSION, LIBGNOMEUI_MODULE, argc, argv,
-                       GNOME_PARAM_GOPTION_CONTEXT, octx,
-                       GNOME_PARAM_HUMAN_READABLE_NAME, _("File Encryption Tool"),
-                       GNOME_PARAM_APP_DATADIR, DATA_DIR, NULL);
+    gtk_init_with_args (&argc, &argv, _("File Encryption Tool"), options, GETTEXT_PACKAGE, NULL);
 
     /* Load up all our arguments */
     uris = read_uri_arguments ();
Index: plugins/nautilus/seahorse-tool-progress.c
===================================================================
--- plugins/nautilus/seahorse-tool-progress.c	(revision 2165)
+++ plugins/nautilus/seahorse-tool-progress.c	(working copy)
@@ -20,10 +20,11 @@
  */
 
 #include "config.h"
+
 #include <sys/types.h>
 #include <signal.h>
+#include <stdlib.h>
 
-#include <gnome.h>
 #include <libgnomevfs/gnome-vfs.h>
 
 #include "seahorse-gtkstock.h"
Index: plugins/nautilus/seahorse-pgp-preferences.c
===================================================================
--- plugins/nautilus/seahorse-pgp-preferences.c	(revision 2165)
+++ plugins/nautilus/seahorse-pgp-preferences.c	(working copy)
@@ -20,9 +20,12 @@
  */
 
 #include <config.h>
-#include <gnome.h>
+
+#include <stdlib.h>
 #include <locale.h>
 
+#include <glib/gi18n.h>
+
 #include "seahorse-context.h"
 #include "seahorse-prefs.h"
 #include "seahorse-gtkstock.h"
@@ -52,7 +55,7 @@
 static void
 destroyed (GtkObject *object, gpointer data)
 {
-	gtk_exit (0);
+	exit (0);
 }
 
 int
@@ -69,10 +72,7 @@
     octx = g_option_context_new ("");
     g_option_context_add_main_entries (octx, options, GETTEXT_PACKAGE);
 
-    gnome_program_init ("seahorse-preferences", VERSION, LIBGNOMEUI_MODULE, argc, argv,
-                GNOME_PARAM_GOPTION_CONTEXT, octx,
-                GNOME_PARAM_HUMAN_READABLE_NAME, _("Encryption Preferences"),
-                GNOME_PARAM_APP_DATADIR, DATA_DIR, NULL);
+    gtk_init_with_args (&argc, &argv, _("Encryption Preferences"), options, GETTEXT_PACKAGE, NULL);
 
     /* Insert Icons into Stock */ 
     seahorse_gtkstock_init();
Index: plugins/applet/seahorse-applet.c
===================================================================
--- plugins/applet/seahorse-applet.c	(revision 2165)
+++ plugins/applet/seahorse-applet.c	(working copy)
@@ -20,7 +20,12 @@
  */
 
 #include <config.h>
-#include <gnome.h>
+
+#include <string.h>
+#include <stdlib.h>
+
+#include <glib/gi18n.h>
+
 #include <panel-applet.h>
 
 #include <dbus/dbus-glib-bindings.h>
Index: plugins/gedit/seahorse-gedit-bonobo.c
===================================================================
--- plugins/gedit/seahorse-gedit-bonobo.c	(revision 2165)
+++ plugins/gedit/seahorse-gedit-bonobo.c	(working copy)
@@ -23,7 +23,7 @@
 #include <config.h>
 #endif
 
-#include <libgnome/gnome-i18n.h>
+#include <glib/gi18n.h>
 
 #include <errno.h>
 #include <unistd.h>
Index: configure.in
===================================================================
--- configure.in	(revision 2165)
+++ configure.in	(working copy)
@@ -39,10 +39,12 @@
 AC_CHECK_FUNCS(setresuid setresgid)
 AC_CHECK_FUNCS(strsep)
 
-AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
+PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.10)
+AC_SUBST([GTK_LIBS])
+AC_SUBST([GTK_CFLAGS])
 
-PKG_CHECK_MODULES(SEAHORSE, libgnome-2.0 >= 2.14 libgnomeui-2.0 
-                  libglade-2.0 gconf-2.0 gtk+-2.0 >= 2.10.0 gnome-vfs-2.0)
+AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
+PKG_CHECK_MODULES(SEAHORSE, libglade-2.0 gconf-2.0 gtk+-2.0 >= 2.10.0 gnome-vfs-2.0)
 
 AC_MSG_CHECKING([for some Win32 platform])
 case "$host" in
@@ -156,7 +158,7 @@
   AC_MSG_ERROR(GPGME $min_gpgme_version or later needed)
 fi
 
-SEAHORSE_CFLAGS="$SEAHORSE_CFLAGS $GPGME_CFLAGS -O0"
+SEAHORSE_CFLAGS="$SEAHORSE_CFLAGS $GPGME_CFLAGS -O0 -DBONOBO_DISABLE_DEPRECATED -DDISABLE_DEPRECATED"
 SEAHORSE_LIBS="$SEAHORSE_LIBS $GPGME_LIBS"
 
 
@@ -852,6 +854,7 @@
 libcryptui/cryptui.pc
 libcryptui/Makefile
 libcryptui/tests/Makefile
+libegg/Makefile
 libseahorse/Makefile
 po/Makefile.in
 help/Makefile
Index: agent/seahorse-agent-actions.c
===================================================================
--- agent/seahorse-agent-actions.c	(revision 2165)
+++ agent/seahorse-agent-actions.c	(working copy)
@@ -23,7 +23,7 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include <gnome.h>
+#include <glib/gi18n.h>
 
 #include "seahorse-gconf.h"
 #include "seahorse-agent.h"
Index: agent/seahorse-agent-prompt.c
===================================================================
--- agent/seahorse-agent-prompt.c	(revision 2165)
+++ agent/seahorse-agent-prompt.c	(working copy)
@@ -30,7 +30,7 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include <gnome.h>
+#include <glib/gi18n.h>
 
 #include "seahorse-agent.h"
 #include "seahorse-check-button-control.h"
Index: agent/seahorse-agent.c
===================================================================
--- agent/seahorse-agent.c	(revision 2165)
+++ agent/seahorse-agent.c	(working copy)
@@ -32,8 +32,6 @@
 #include <syslog.h>
 #include <fcntl.h>
 
-#include <gnome.h>
-
 #include "seahorse-agent.h"
 #include "seahorse-gpg-options.h"
 #include "seahorse-passphrase.h"
Index: agent/seahorse-agent-cache.c
===================================================================
--- agent/seahorse-agent-cache.c	(revision 2165)
+++ agent/seahorse-agent-cache.c	(working copy)
@@ -25,7 +25,7 @@
 #include <string.h>
 #include <time.h>
 
-#include <gnome.h>
+#include <glib/gi18n.h>
 
 #include <gnome-keyring.h>
 #include <gnome-keyring-memory.h>
Index: agent/seahorse-agent-status.c
===================================================================
--- agent/seahorse-agent-status.c	(revision 2165)
+++ agent/seahorse-agent-status.c	(working copy)
@@ -23,8 +23,9 @@
 #include <sys/types.h>
 #include <stdlib.h>
 
+#include <glib/gi18n.h>
+
 #include <gtk/gtk.h>
-#include <gnome.h>
 #include <glade/glade-xml.h>
 
 #include "seahorse-pgp-key.h"
Index: agent/seahorse-agent-main.c
===================================================================
--- agent/seahorse-agent-main.c	(revision 2165)
+++ agent/seahorse-agent-main.c	(working copy)
@@ -18,6 +18,7 @@
  * 59 Temple Place, Suite 330,
  * Boston, MA 02111-1307, USA.
  */
+#include "config.h"
 
 #include <sys/types.h>
 #include <sys/signal.h>
@@ -29,10 +30,10 @@
 #include <unistd.h>
 #include <syslog.h>
 #include <fcntl.h>
+#include <errno.h>
 
-#include <gnome.h>
+#include <glib/gi18n.h>
 
-#include "config.h"
 #include "seahorse-context.h"
 #include "seahorse-gtkstock.h"
 #include "seahorse-gconf.h"
@@ -199,16 +200,9 @@
     g_log_set_handler ("Gnome", flags, log_handler, NULL);
 }
 
-static void
-client_die ()
-{
-    gtk_main_quit ();
-}
-
 int main(int argc, char* argv[])
 {
     SeahorseOperation *op;
-    GnomeClient *client = NULL;
     GOptionContext *octx = NULL;
 
     seahorse_secure_memory_init ();
@@ -220,10 +214,7 @@
     octx = g_option_context_new ("");
     g_option_context_add_main_entries (octx, options, GETTEXT_PACKAGE);
 
-    gnome_program_init("seahorse-agent", VERSION, LIBGNOMEUI_MODULE, argc, argv,
-                    GNOME_PARAM_GOPTION_CONTEXT, octx,
-                    GNOME_PARAM_HUMAN_READABLE_NAME, _("Encryption Key Agent (Seahorse)"),
-                    GNOME_PARAM_APP_DATADIR, DATA_DIR, NULL);
+    gtk_init_with_args (&argc, &argv, _("Encryption Key Agent (Seahorse)"), options, GETTEXT_PACKAGE, NULL);
 
     seahorse_agent_prefork ();
 
@@ -248,9 +239,6 @@
     if (!agent_no_daemonize)
         seahorse_gconf_disconnect ();    
     
-    client = gnome_master_client();
-    g_signal_connect(client, "die", G_CALLBACK(client_die), NULL);
-    
     /* We log to the syslog */
     prepare_logging ();
 
Index: agent/seahorse-agent-io.c
===================================================================
--- agent/seahorse-agent-io.c	(revision 2165)
+++ agent/seahorse-agent-io.c	(working copy)
@@ -35,8 +35,6 @@
 #include <errno.h>
 #include <ctype.h>
 
-#include <gnome.h>
-
 #include "seahorse-agent.h"
 
 /* Set from seahorse-agent-main.c */
Index: libseahorse/seahorse-key-source.h
===================================================================
--- libseahorse/seahorse-key-source.h	(revision 2165)
+++ libseahorse/seahorse-key-source.h	(working copy)
@@ -42,7 +42,6 @@
 #ifndef __SEAHORSE_KEY_SOURCE_H__
 #define __SEAHORSE_KEY_SOURCE_H__
 
-#include <gnome.h>
 #include <gpgme.h>
 
 #include "seahorse-key.h"
Index: libseahorse/seahorse-unix-signal.c
===================================================================
--- libseahorse/seahorse-unix-signal.c	(revision 2165)
+++ libseahorse/seahorse-unix-signal.c	(working copy)
@@ -29,8 +29,9 @@
 #include <unistd.h>
 #include <syslog.h>
 #include <fcntl.h>
+#include <string.h>
+#include <errno.h>
 
-#include <gnome.h>
 #include "seahorse-unix-signal.h"
 
 #define MAX_SIGNAL 32
Index: libseahorse/seahorse-server-source.c
===================================================================
--- libseahorse/seahorse-server-source.c	(revision 2165)
+++ libseahorse/seahorse-server-source.c	(working copy)
@@ -19,9 +19,12 @@
  * Boston, MA 02111-1307, USA.
  */
 
-#include <stdlib.h>
 #include <config.h>
-#include <gnome.h>
+
+#include <stdlib.h>
+#include <string.h>
+
+#include <glib/gi18n.h>
 
 #include "seahorse-gpgmex.h"
 #include "seahorse-operation.h"
Index: libseahorse/seahorse-prefs-keyrings.c
===================================================================
--- libseahorse/seahorse-prefs-keyrings.c	(revision 2165)
+++ libseahorse/seahorse-prefs-keyrings.c	(working copy)
@@ -19,7 +19,9 @@
  * Boston, MA 02111-1307, USA.
  */
 #include <config.h>
-#include <gnome.h>
+
+#include <glib/gi18n.h>
+
 #include <gnome-keyring.h>
 
 #include "seahorse-context.h"
Index: libseahorse/seahorse-passphrase.c
===================================================================
--- libseahorse/seahorse-passphrase.c	(revision 2165)
+++ libseahorse/seahorse-passphrase.c	(working copy)
@@ -36,8 +36,13 @@
 #include <unistd.h>
 #include <syslog.h>
 #include <fcntl.h>
+#include <errno.h>
+
+#include <glib.h>
+#include <glib/gi18n.h>
+
+#include <gdk/gdkkeysyms.h>
 
-#include <gnome.h>
 #include <glade/glade-xml.h>
 
 #include "seahorse-gpgmex.h"
Index: libseahorse/seahorse-pgp-key.c
===================================================================
--- libseahorse/seahorse-pgp-key.c	(revision 2165)
+++ libseahorse/seahorse-pgp-key.c	(working copy)
@@ -19,7 +19,10 @@
  * Boston, MA 02111-1307, USA.
  */
 #include <config.h>
-#include <gnome.h>
+
+#include <string.h>
+
+#include <glib/gi18n.h>
 
 #include "seahorse-gpgmex.h"
 #include "seahorse-context.h"
Index: libseahorse/seahorse-util.c
===================================================================
--- libseahorse/seahorse-util.c	(revision 2165)
+++ libseahorse/seahorse-util.c	(working copy)
@@ -28,8 +28,10 @@
 #include <stdio.h>
 #include <unistd.h>
 #include <string.h>
+#include <errno.h>
+
+#include <glib/gi18n.h>
 
-#include <gnome.h>
 #include <libgnomevfs/gnome-vfs.h>
 
 #ifdef WITH_SHARING
Index: libseahorse/seahorse-passphrase.h
===================================================================
--- libseahorse/seahorse-passphrase.h	(revision 2165)
+++ libseahorse/seahorse-passphrase.h	(working copy)
@@ -22,6 +22,7 @@
 #ifndef __SEAHORSE_PASSPHRASE__
 #define __SEAHORSE_PASSPHRASE__
 
+#include <gtk/gtk.h>
 #include <gpgme.h>
 
 #define SEAHORSE_PASS_BAD    0x00000001
Index: libseahorse/seahorse-prefs.c
===================================================================
--- libseahorse/seahorse-prefs.c	(revision 2165)
+++ libseahorse/seahorse-prefs.c	(working copy)
@@ -19,7 +19,8 @@
  * Boston, MA 02111-1307, USA.
  */
 #include <config.h>
-#include <gnome.h>
+
+#include <glib/gi18n.h>
 
 #include "config.h"
 #include "seahorse-prefs.h"
Index: libseahorse/seahorse-transfer-operation.c
===================================================================
--- libseahorse/seahorse-transfer-operation.c	(revision 2165)
+++ libseahorse/seahorse-transfer-operation.c	(working copy)
@@ -20,7 +20,8 @@
  */
  
 #include "config.h"
-#include <gnome.h>
+
+#include <stdlib.h>
 
 #include "seahorse-transfer-operation.h"
 #include "seahorse-pgp-source.h"
Index: libseahorse/seahorse-ssh-key.c
===================================================================
--- libseahorse/seahorse-ssh-key.c	(revision 2165)
+++ libseahorse/seahorse-ssh-key.c	(working copy)
@@ -21,9 +21,11 @@
 
 #include "config.h"
 
-#include <gnome.h>
 #include <string.h>
 
+#include <glib.h>
+#include <glib/gi18n.h>
+
 #include "seahorse-context.h"
 #include "seahorse-key-source.h"
 #include "seahorse-ssh-source.h"
Index: libseahorse/seahorse-context.c
===================================================================
--- libseahorse/seahorse-context.c	(revision 2165)
+++ libseahorse/seahorse-context.c	(working copy)
@@ -21,9 +21,10 @@
  */
 
 #include "config.h"
+
 #include <stdlib.h>
+#include <string.h>
 #include <libintl.h>
-#include <gnome.h>
 
 #include "seahorse-pgp-key.h"
 #include "seahorse-pgp-source.h"
Index: libseahorse/seahorse-unknown-key.c
===================================================================
--- libseahorse/seahorse-unknown-key.c	(revision 2165)
+++ libseahorse/seahorse-unknown-key.c	(working copy)
@@ -20,7 +20,8 @@
  */
 
 #include "config.h"
-#include <gnome.h>
+
+#include <glib/gi18n.h>
 
 #include "seahorse-unknown-key.h"
 #include "seahorse-unknown-source.h"
Index: libseahorse/seahorse-notification.c
===================================================================
--- libseahorse/seahorse-notification.c	(revision 2165)
+++ libseahorse/seahorse-notification.c	(working copy)
@@ -21,8 +21,13 @@
  
 #include "config.h"
 
+#include <string.h>
+#include <libintl.h>
+
 #include <gtk/gtk.h>
+
 #include <glib.h>
+#include <glib/gi18n.h>
 
 #include "seahorse-libdialogs.h"
 #include "seahorse-util.h"
Index: libseahorse/seahorse-unknown-source.c
===================================================================
--- libseahorse/seahorse-unknown-source.c	(revision 2165)
+++ libseahorse/seahorse-unknown-source.c	(working copy)
@@ -20,7 +20,8 @@
  */
 
 #include "config.h"
-#include <gnome.h>
+
+#include <glib/gi18n.h>
 
 #include "seahorse-context.h"
 #include "seahorse-unknown-source.h"
Index: libseahorse/seahorse-hkp-source.c
===================================================================
--- libseahorse/seahorse-hkp-source.c	(revision 2165)
+++ libseahorse/seahorse-hkp-source.c	(working copy)
@@ -19,9 +19,13 @@
  * Boston, MA 02111-1307, USA.
  */
  
-#include <stdlib.h>
 #include <config.h>
-#include <gnome.h>
+
+#include <stdlib.h>
+#include <string.h>
+
+#include <glib/gi18n.h>
+
 #include <libsoup/soup.h>
 
 #include "seahorse-gpgmex.h"
Index: libseahorse/seahorse-pgp-source.c
===================================================================
--- libseahorse/seahorse-pgp-source.c	(revision 2165)
+++ libseahorse/seahorse-pgp-source.c	(working copy)
@@ -20,9 +20,12 @@
  */
 
 #include <config.h>
+
 #include <stdlib.h>
 #include <libintl.h>
-#include <gnome.h>
+
+#include <glib/gi18n.h>
+
 #include <libgnomevfs/gnome-vfs.h>
 
 #include "seahorse-gpgmex.h"
Index: libseahorse/seahorse-signer.c
===================================================================
--- libseahorse/seahorse-signer.c	(revision 2165)
+++ libseahorse/seahorse-signer.c	(working copy)
@@ -19,9 +19,11 @@
  * Boston, MA 02111-1307, USA.
  */
 
-#include <stdlib.h>
 #include <config.h>
-#include <gnome.h>
+
+#include <stdlib.h>
+
+#include <glib/gi18n.h>
 
 #include "seahorse-operation.h"
 #include "seahorse-progress.h"
Index: libseahorse/seahorse-pgp-key-op.c
===================================================================
--- libseahorse/seahorse-pgp-key-op.c	(revision 2165)
+++ libseahorse/seahorse-pgp-key-op.c	(working copy)
@@ -22,7 +22,11 @@
  */
 
 #include "config.h"
-#include <gnome.h>
+
+#include <errno.h>
+#include <stdlib.h>
+#include <string.h>
+
 #include <glib/gstdio.h>
 
 #include "seahorse-gpgmex.h"
Index: libseahorse/seahorse-vfs-data.c
===================================================================
--- libseahorse/seahorse-vfs-data.c	(revision 2165)
+++ libseahorse/seahorse-vfs-data.c	(working copy)
@@ -20,10 +20,11 @@
  */
 
 #include <sys/types.h>
+#include <string.h>
 #include <stdlib.h>
 #include <fcntl.h>
+#include <errno.h>
 
-#include <gnome.h>
 #include <libgnomevfs/gnome-vfs.h>
 
 #include "seahorse-gpgmex.h"
Index: libseahorse/seahorse-vfs-data.h
===================================================================
--- libseahorse/seahorse-vfs-data.h	(revision 2165)
+++ libseahorse/seahorse-vfs-data.h	(working copy)
@@ -19,6 +19,8 @@
  * Boston, MA 02111-1307, USA.
  */
 
+#include <libgnomevfs/gnome-vfs-file-size.h>
+
 /**
  * A gpgme_data_t implementation which maps to a gnome-vfs handle.
  * Allows for accessing data on remote machines (ie: smb, sftp)
Index: libseahorse/seahorse-widget.c
===================================================================
--- libseahorse/seahorse-widget.c	(revision 2165)
+++ libseahorse/seahorse-widget.c	(working copy)
@@ -21,10 +21,16 @@
  */
 
 #include <config.h>
-#include <gnome.h>
+
+#include <string.h>
+
+#include <glib/gi18n.h>
+
 #include <glade/glade.h>
 #include <glade/glade-build.h>
 
+#include <libgnomevfs/gnome-vfs-result.h>
+
 #include "seahorse-widget.h"
 #include "seahorse-gtkstock.h"
 
@@ -310,25 +316,29 @@
 void
 seahorse_widget_show_help (SeahorseWidget *swidget)
 {
-    GError *err = NULL;
+    gchar *document = NULL;
+    GnomeVFSResult error;
 
     if (g_str_equal (swidget->name, "key-manager") || 
-        g_str_equal (swidget->name, "keyserver-results"))
-        gnome_help_display_with_doc_id (NULL, PACKAGE, PACKAGE, "introduction", &err);
-    else
-       gnome_help_display_with_doc_id (NULL, PACKAGE, PACKAGE, swidget->name, &err);
+        g_str_equal (swidget->name, "keyserver-results")) {
+        document = g_strdup ("ghelp:" PACKAGE "?introduction");
+    } else {
+        document = g_strdup_printf ("ghelp:" PACKAGE "?%s", swidget->name);
+    }
+
+    error = gnome_vfs_url_show (document);
+    g_free (document);
 
-    if (err != NULL) {
+    if (error != GNOME_VFS_OK) {
         GtkWidget *dialog;
 
         dialog = gtk_message_dialog_new (GTK_WINDOW (seahorse_widget_get_top (swidget)), GTK_DIALOG_MODAL, 
                                          GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, 
                                          _("Could not display help: %s"),
-                                         err->message);
+                                         gnome_vfs_result_to_string (error));
         g_signal_connect (G_OBJECT (dialog), "response",
                           G_CALLBACK (gtk_widget_destroy), NULL);
         gtk_widget_show (dialog);
-        g_error_free (err);
     }
 }
 
Index: libseahorse/seahorse-dns-sd.c
===================================================================
--- libseahorse/seahorse-dns-sd.c	(revision 2165)
+++ libseahorse/seahorse-dns-sd.c	(working copy)
@@ -21,8 +21,6 @@
 
 #include "config.h"
 
-#include <gnome.h>
-
 #ifdef WITH_SHARING 
 #include <avahi-client/client.h>
 #include <avahi-client/lookup.h>
Index: libseahorse/seahorse-key.c
===================================================================
--- libseahorse/seahorse-key.c	(revision 2165)
+++ libseahorse/seahorse-key.c	(working copy)
@@ -20,7 +20,7 @@
  * Boston, MA 02111-1307, USA.
  */
 
-#include <gnome.h>
+#include <string.h>
 
 #include "seahorse-key.h"
 #include "seahorse-context.h"
Index: libseahorse/seahorse-ssh-operation.c
===================================================================
--- libseahorse/seahorse-ssh-operation.c	(revision 2165)
+++ libseahorse/seahorse-ssh-operation.c	(working copy)
@@ -20,11 +20,15 @@
  */
 
 #include "config.h"
+
 #include <sys/wait.h>
 #include <sys/socket.h>
-#include <gnome.h>
+#include <string.h>
+#include <errno.h>
 #include <fcntl.h>
 
+#include <glib/gi18n.h>
+
 #include "seahorse-ssh-operation.h"
 #include "seahorse-util.h"
 #include "seahorse-gpgmex.h"
Index: libseahorse/seahorse-ssh-source.c
===================================================================
--- libseahorse/seahorse-ssh-source.c	(revision 2165)
+++ libseahorse/seahorse-ssh-source.c	(working copy)
@@ -20,11 +20,16 @@
  */
 
 #include "config.h"
+
+#include <string.h>
 #include <stdlib.h>
 #include <unistd.h>
-#include <gnome.h>
 #include <fcntl.h>
+#include <errno.h>
+
+#include <glib/gi18n.h>
 #include <glib/gstdio.h>
+
 #include <libgnomevfs/gnome-vfs.h>
 
 #include "seahorse-gpgmex.h"
Index: libseahorse/seahorse-operation.c
===================================================================
--- libseahorse/seahorse-operation.c	(revision 2165)
+++ libseahorse/seahorse-operation.c	(working copy)
@@ -18,10 +18,8 @@
  * 59 Temple Place, Suite 330,
  * Boston, MA 02111-1307, USA.
  */
- 
-#include <gnome.h>
-
 #include "config.h"
+
 #include "seahorse-util.h"
 #include "seahorse-marshal.h"
 #include "seahorse-operation.h"
Index: libseahorse/seahorse-ssh-askpass.c
===================================================================
--- libseahorse/seahorse-ssh-askpass.c	(revision 2165)
+++ libseahorse/seahorse-ssh-askpass.c	(working copy)
@@ -20,9 +20,14 @@
  */
  
 #include "config.h"
-#include <gnome.h>
+
+#include <errno.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
+
+#include <glib.h>
+#include <glib/gi18n.h>
 
 static FILE* seahorse_link = NULL;
  
Index: libseahorse/seahorse-operation.h
===================================================================
--- libseahorse/seahorse-operation.h	(revision 2165)
+++ libseahorse/seahorse-operation.h	(working copy)
@@ -47,7 +47,7 @@
 #ifndef __SEAHORSE_OPERATION_H__
 #define __SEAHORSE_OPERATION_H__
 
-#include <gnome.h>
+#include <glib-object.h>
 
 #define SEAHORSE_TYPE_OPERATION            (seahorse_operation_get_type ())
 #define SEAHORSE_OPERATION(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), SEAHORSE_TYPE_OPERATION, SeahorseOperation))
Index: libseahorse/seahorse-ldap-source.c
===================================================================
--- libseahorse/seahorse-ldap-source.c	(revision 2165)
+++ libseahorse/seahorse-ldap-source.c	(working copy)
@@ -20,9 +20,13 @@
  */
 
 #include "config.h"
+
 #include <stdlib.h>
+#include <string.h>
 #include <libintl.h>
-#include <gnome.h>
+
+#include <glib/gi18n.h>
+
 #include <ldap.h>
 
 #ifdef WITH_SOUP
Index: libseahorse/seahorse-prefs-cache.c
===================================================================
--- libseahorse/seahorse-prefs-cache.c	(revision 2165)
+++ libseahorse/seahorse-prefs-cache.c	(working copy)
@@ -25,7 +25,6 @@
 #include <sys/wait.h>
 
 #include <stdlib.h>
-#include <gnome.h>
 
 #define DBUS_API_SUBJECT_TO_CHANGE
 #include <dbus/dbus.h>
Index: libseahorse/seahorse-validity.c
===================================================================
--- libseahorse/seahorse-validity.c	(revision 2165)
+++ libseahorse/seahorse-validity.c	(working copy)
@@ -19,7 +19,8 @@
  * Boston, MA 02111-1307, USA.
  */
 #include <config.h>
-#include <gnome.h>
+
+#include <glib/gi18n.h>
 
 #include "seahorse-validity.h"
 
Index: libseahorse/seahorse-key-model.c
===================================================================
--- libseahorse/seahorse-key-model.c	(revision 2165)
+++ libseahorse/seahorse-key-model.c	(working copy)
@@ -20,7 +20,8 @@
  */
  
 #include "config.h"
-#include <gnome.h>
+
+#include <string.h>
 
 #include "seahorse-key-model.h"
 #include "seahorse-marshal.h"
Index: libseahorse/seahorse-key-source.c
===================================================================
--- libseahorse/seahorse-key-source.c	(revision 2165)
+++ libseahorse/seahorse-key-source.c	(working copy)
@@ -20,7 +20,6 @@
  */
  
 #include "config.h"
-#include <gnome.h>
 
 #include "seahorse-key-source.h"
 #include "seahorse-marshal.h"
Index: daemon/seahorse-sharing.c
===================================================================
--- daemon/seahorse-sharing.c	(revision 2165)
+++ daemon/seahorse-sharing.c	(working copy)
@@ -20,7 +20,8 @@
  */
 
 #include <config.h>
-#include <gnome.h>
+
+#include <glib/gi18n.h>
 
 #include <avahi-client/client.h>
 #include <avahi-client/publish.h>
Index: daemon/seahorse-service.c
===================================================================
--- daemon/seahorse-service.c	(revision 2165)
+++ daemon/seahorse-service.c	(working copy)
@@ -20,7 +20,12 @@
  */
 
 #include "config.h"
+
+#include <string.h>
+
 #include <glib.h>
+#include <glib/gi18n.h>
+
 #include <dbus/dbus-glib-bindings.h>
 
 #include "seahorse-daemon.h"
Index: daemon/seahorse-service-keyset.c
===================================================================
--- daemon/seahorse-service-keyset.c	(revision 2165)
+++ daemon/seahorse-service-keyset.c	(working copy)
@@ -20,7 +20,11 @@
  */
 
 #include "config.h"
+
+#include <string.h>
+
 #include <glib.h>
+#include <glib/gi18n.h>
 
 #include "seahorse-service.h"
 #include "seahorse-util.h"
Index: daemon/seahorse-daemon.c
===================================================================
--- daemon/seahorse-daemon.c	(revision 2165)
+++ daemon/seahorse-daemon.c	(working copy)
@@ -30,7 +30,7 @@
 #include <syslog.h>
 #include <fcntl.h>
 
-#include <gnome.h>
+#include <glib/gi18n.h>
 
 #include "config.h"
 #include "seahorse-daemon.h"
@@ -166,16 +166,9 @@
     g_log_set_handler ("Gnome", flags, log_handler, NULL);
 }
 
-static void
-client_die ()
-{
-    gtk_main_quit ();
-}
-
 int main(int argc, char* argv[])
 {
     SeahorseOperation *op;
-    GnomeClient *client = NULL;
     GOptionContext *octx = NULL;
 
     seahorse_secure_memory_init ();
@@ -183,10 +176,7 @@
     octx = g_option_context_new ("");
     g_option_context_add_main_entries (octx, options, GETTEXT_PACKAGE);
 
-    gnome_program_init ("seahorse-daemon", VERSION, LIBGNOMEUI_MODULE, argc, argv,
-                    GNOME_PARAM_GOPTION_CONTEXT, octx,
-                    GNOME_PARAM_HUMAN_READABLE_NAME, _("Encryption Daemon (Seahorse)"),
-                    GNOME_PARAM_APP_DATADIR, DATA_DIR, NULL);
+    gtk_init_with_args (&argc, &argv, _("Encryption Daemon (Seahorse)"), options, GETTEXT_PACKAGE, NULL);
 
     /* 
      * All functions after this point have to print messages 
@@ -202,9 +192,6 @@
     if (!daemon_no_daemonize)
         seahorse_gconf_disconnect ();    
         
-    client = gnome_master_client();
-    g_signal_connect(client, "die", G_CALLBACK(client_die), NULL);
-    
     /* We log to the syslog */
     prepare_logging ();
 
Index: daemon/seahorse-service-crypto.c
===================================================================
--- daemon/seahorse-service-crypto.c	(revision 2165)
+++ daemon/seahorse-service-crypto.c	(working copy)
@@ -19,7 +19,10 @@
  * Boston, MA 02111-1307, USA.
  */
 
+#include <string.h>
+
 #include <glib.h>
+#include <glib/gi18n.h>
 
 #include "seahorse-service.h"
 #include "seahorse-key.h"
Index: daemon/seahorse-hkp-server.c
===================================================================
--- daemon/seahorse-hkp-server.c	(revision 2165)
+++ daemon/seahorse-hkp-server.c	(working copy)
@@ -18,11 +18,13 @@
  * 59 Temple Place, Suite 330,
  * Boston, MA 02111-1307, USA.
  */
+#include "config.h"
+
+#include <errno.h>
+#include <string.h>
  
-#include <gnome.h>
 #include <libsoup/soup.h>
 
-#include "config.h"
 #include "seahorse-gpgmex.h"
 #include "seahorse-daemon.h"
 
Index: Makefile.am
===================================================================
--- Makefile.am	(revision 2165)
+++ Makefile.am	(working copy)
@@ -8,7 +8,8 @@
 AGENT_DIR = 
 endif
 
-SUBDIRS = libcryptui \
+SUBDIRS = libegg \
+          libcryptui \
           libseahorse \
           src \
           po \
