diff --git a/plugins/notification/notification.c b/plugins/notification/notification.c
index b2c5d25..c0359b1 100644
--- a/plugins/notification/notification.c
+++ b/plugins/notification/notification.c
@@ -32,8 +32,9 @@
 #include "xchat-plugin.h"
 #include "xg-plugin.h"
 #include "preferences-page-plugin-notification.h"
+#include "notification.h"
 
-#define NOTIFICATION_VERSION "0.1"
+#define NOTIFICATION_VERSION "0.2"
 
 void xchat_plugin_get_info   (char **plugin_name, char **plugin_desc, char **plugin_version, void **reserved);
 int  xchat_plugin_init       (xchat_plugin *plugin_handle, char **plugin_name, char **plugin_desc, char **plugin_version, char *arg);
@@ -55,12 +56,15 @@ typedef enum
 static GtkStatusIcon*      status_icon;         /* Notification area icon. */
 static gboolean            focused = TRUE;      /* GTK_WIDGET_HAS_FOCUS doesn't seem to be working... */
 static gint		   level = 0;		/* Level of messages that we want to notify */
+static gint		   on_close = 0;	/* Minimize on close ? */
 static gboolean            hidden = FALSE;      /* True when the main window is hidden. */
 static GtkWidget*          main_window;         /* xchat-gnome's main window. */
 static NotifStatus         status = NOTIF_NONE; /* Current status level. */
 static xchat_gnome_plugin* xgph;                /* xchat gnome plugin handle. */
 static xchat_plugin*       ph;                  /* Plugin handle. */
+
 static guint		   gconf_notify_id;
+static guint		   gconf_notify_on_close;
 
 static const char *images[N_NOTIF] = {
 	"xchat-gnome",
@@ -175,6 +179,18 @@ level_changed (GConfClient *client, guint cnxn_id,  GConfEntry *entry, gpointer
 	update_tray ();
 }
 
+static void
+on_close_changed (GConfClient *client, guint cnxn_id,  GConfEntry *entry, gpointer data)
+{
+	if (level != 0) 
+		return;
+
+        on_close = gconf_value_get_bool (gconf_entry_get_value (entry));
+        update_tray ();
+}
+
+
+
 /*** xchat plugin functions ***/
 int
 xchat_plugin_init (xchat_plugin * plugin_handle, char **plugin_name, char **plugin_desc, char **plugin_version, char *arg)
@@ -190,10 +206,16 @@ xchat_plugin_init (xchat_plugin * plugin_handle, char **plugin_name, char **plug
 	xchat_plugin_get_info (plugin_name, plugin_desc, plugin_version, NULL);
 
 	/* Get our preferences from gconf. */
-	level = gconf_client_get_int (client, "/apps/xchat/plugins/notification/level", NULL);
+	level = gconf_client_get_int (client, NOTIFICATION_KEY, NULL);
+	on_close = gconf_client_get_bool (client, NOTIFICATION_ON_CLOSE, NULL);
+	hidden = gconf_client_get_bool (client, NOTIFICATION_START_HIDDEN, NULL);
+
+	if (level == 0 && hidden)
+		xchat_command (ph, "GUI HIDE");
+	else 
+		hidden = FALSE;
 
 	focused = TRUE;
-	hidden = FALSE;
 	status = NOTIF_NONE;
 
 	/* Create the notification icon. */
@@ -208,7 +230,9 @@ xchat_plugin_init (xchat_plugin * plugin_handle, char **plugin_name, char **plug
 	xchat_hook_print (ph, "Channel Msg Hilight",		XCHAT_PRI_NORM, new_msg_cb, GUINT_TO_POINTER (NOTIF_NICK));
 	xchat_hook_print (ph, "Channel Action Hilight",		XCHAT_PRI_NORM, new_msg_cb, GUINT_TO_POINTER (NOTIF_NICK));
 	xchat_hook_print (ph, "Private Message to Dialog",	XCHAT_PRI_NORM, new_msg_cb, GUINT_TO_POINTER (NOTIF_NICK));
-	gconf_notify_id = gconf_client_notify_add (client, "/apps/xchat/plugins/notification/level", (GConfClientNotifyFunc) level_changed, NULL, NULL, NULL);
+	gconf_notify_id = gconf_client_notify_add (client, NOTIFICATION_KEY, (GConfClientNotifyFunc) level_changed, NULL, NULL, NULL);
+	gconf_notify_on_close = gconf_client_notify_add (client, NOTIFICATION_ON_CLOSE, (GConfClientNotifyFunc) on_close_changed, NULL, NULL, NULL);
+
 	g_object_unref (client);
 
 	xchat_print (ph, _("Notification plugin loaded.\n"));
@@ -229,8 +253,11 @@ xchat_plugin_deinit (void)
 	status_icon = NULL;
 
 	gconf_client_notify_remove (client, gconf_notify_id);
+	gconf_client_notify_remove (client, gconf_notify_on_close);
 	g_object_unref (client);
 	gconf_notify_id = 0;
+	gconf_notify_on_close = 0;
+
 
 	xchat_print (ph, _("Notification plugin unloaded.\n"));
 
diff --git a/plugins/notification/preferences-notification.glade b/plugins/notification/preferences-notification.glade
index a488567..8fbf74a 100644
--- a/plugins/notification/preferences-notification.glade
+++ b/plugins/notification/preferences-notification.glade
@@ -1,132 +1,150 @@
 <?xml version="1.0"?>
-<!--*- mode: xml -*-->
 <interface>
   <object class="GtkVBox" id="vbox_notification">
     <property name="visible">True</property>
-    <property name="homogeneous">False</property>
-    <property name="spacing">6</property>
+    <property name="spacing">18</property>
     <child>
       <object class="GtkLabel" id="label109">
         <property name="visible">True</property>
+        <property name="xalign">0</property>
         <property name="label" translatable="yes">&lt;span weight="bold"&gt;Notification level&lt;/span&gt;</property>
-        <property name="use_underline">False</property>
         <property name="use_markup">True</property>
-        <property name="justify">GTK_JUSTIFY_LEFT</property>
-        <property name="wrap">False</property>
-        <property name="selectable">False</property>
-        <property name="xalign">0</property>
-        <property name="yalign">0.5</property>
-        <property name="xpad">0</property>
-        <property name="ypad">0</property>
-        <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-        <property name="width_chars">-1</property>
-        <property name="single_line_mode">False</property>
-        <property name="angle">0</property>
       </object>
       <packing>
-        <property name="padding">0</property>
         <property name="expand">False</property>
         <property name="fill">False</property>
+        <property name="position">0</property>
       </packing>
     </child>
     <child>
       <object class="GtkAlignment" id="alignment21">
         <property name="visible">True</property>
-        <property name="xalign">0.5</property>
-        <property name="yalign">0.5</property>
-        <property name="xscale">1</property>
-        <property name="yscale">1</property>
-        <property name="top_padding">0</property>
-        <property name="bottom_padding">0</property>
         <property name="left_padding">12</property>
-        <property name="right_padding">0</property>
         <child>
           <object class="GtkVBox" id="vbox57">
             <property name="visible">True</property>
-            <property name="homogeneous">False</property>
             <property name="spacing">6</property>
             <child>
-              <object class="GtkRadioButton" id="notif_level_3">
+              <object class="GtkVBox" id="vbox1">
                 <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="label" translatable="yes">Notify only _private messages</property>
-                <property name="use_underline">True</property>
-                <property name="relief">GTK_RELIEF_NORMAL</property>
-                <property name="focus_on_click">True</property>
-                <property name="active">False</property>
-                <property name="inconsistent">False</property>
-                <property name="draw_indicator">True</property>
+                <property name="spacing">6</property>
+                <child>
+                  <object class="GtkRadioButton" id="notif_level_0">
+                    <property name="label" translatable="yes">_Always display notification icon</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">False</property>
+                    <property name="use_underline">True</property>
+                    <property name="draw_indicator">True</property>
+                    <property name="group">notif_level_3</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkAlignment" id="alignment1">
+                    <property name="visible">True</property>
+                    <property name="left_padding">24</property>
+                    <child>
+                      <object class="GtkVBox" id="vbox2">
+                        <property name="visible">True</property>
+                        <child>
+                          <object class="GtkCheckButton" id="notif_on_close">
+                            <property name="label" translatable="yes">Minimize to Status _Icon on Close</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="use_underline">True</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkCheckButton" id="notif_start_hidden">
+                            <property name="label" translatable="yes">_Start Hidden</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="use_underline">True</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
               </object>
               <packing>
-                <property name="padding">0</property>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
+                <property name="position">0</property>
               </packing>
             </child>
             <child>
-              <object class="GtkRadioButton" id="notif_level_2">
+              <object class="GtkRadioButton" id="notif_level_1">
+                <property name="label" translatable="yes">Notify each _event</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
-                <property name="label" translatable="yes">Notify each _message</property>
+                <property name="receives_default">False</property>
                 <property name="use_underline">True</property>
-                <property name="relief">GTK_RELIEF_NORMAL</property>
-                <property name="focus_on_click">True</property>
-                <property name="active">False</property>
-                <property name="inconsistent">False</property>
                 <property name="draw_indicator">True</property>
                 <property name="group">notif_level_3</property>
               </object>
               <packing>
-                <property name="padding">0</property>
                 <property name="expand">False</property>
                 <property name="fill">False</property>
+                <property name="position">1</property>
               </packing>
             </child>
             <child>
-              <object class="GtkRadioButton" id="notif_level_1">
+              <object class="GtkRadioButton" id="notif_level_2">
+                <property name="label" translatable="yes">Notify each _message</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
-                <property name="label" translatable="yes">Notify each _event</property>
+                <property name="receives_default">False</property>
                 <property name="use_underline">True</property>
-                <property name="relief">GTK_RELIEF_NORMAL</property>
-                <property name="focus_on_click">True</property>
-                <property name="active">False</property>
-                <property name="inconsistent">False</property>
                 <property name="draw_indicator">True</property>
                 <property name="group">notif_level_3</property>
               </object>
               <packing>
-                <property name="padding">0</property>
                 <property name="expand">False</property>
                 <property name="fill">False</property>
+                <property name="position">2</property>
               </packing>
             </child>
             <child>
-              <object class="GtkRadioButton" id="notif_level_0">
+              <object class="GtkRadioButton" id="notif_level_3">
+                <property name="label" translatable="yes">Notify only _private messages</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
-                <property name="label" translatable="yes">_Always display notification icon</property>
+                <property name="receives_default">False</property>
                 <property name="use_underline">True</property>
-                <property name="relief">GTK_RELIEF_NORMAL</property>
-                <property name="focus_on_click">True</property>
-                <property name="active">False</property>
-                <property name="inconsistent">False</property>
                 <property name="draw_indicator">True</property>
-                <property name="group">notif_level_3</property>
               </object>
               <packing>
-                <property name="padding">0</property>
                 <property name="expand">False</property>
                 <property name="fill">False</property>
+                <property name="position">3</property>
               </packing>
             </child>
           </object>
         </child>
       </object>
       <packing>
-        <property name="padding">0</property>
         <property name="expand">False</property>
-        <property name="fill">True</property>
+        <property name="position">1</property>
       </packing>
     </child>
   </object>
diff --git a/plugins/notification/preferences-page-plugin-notification.c b/plugins/notification/preferences-page-plugin-notification.c
index 7aa3209..09ff909 100644
--- a/plugins/notification/preferences-page-plugin-notification.c
+++ b/plugins/notification/preferences-page-plugin-notification.c
@@ -24,7 +24,8 @@
 #include "preferences-page-plugin-notification.h"
 #include "util.h"
 
-#define NOTIFICATION_KEY "/apps/xchat/plugins/notification/level"
+#include "notification.h"
+
 
 G_DEFINE_TYPE(PreferencesPagePluginNotification, preferences_page_plugin_notification, PREFERENCES_PAGE_TYPE)
 
@@ -34,8 +35,6 @@ preferences_page_plugin_notification_finalize (GObject *object)
 	PreferencesPagePluginNotification *page = (PreferencesPagePluginNotification *) object;
 	/* The vbox is already destroyed when the page is removed from the
 	 * gtk_notebook */
-
-	gconf_client_notify_remove (page->gconf, page->notify);
 	g_object_unref (page->gconf);
 
 	G_OBJECT_CLASS (preferences_page_plugin_notification_parent_class)->finalize (object);
@@ -55,6 +54,21 @@ preferences_page_plugin_notification_new (void)
 	return g_object_new (PREFERENCES_PAGE_PLUGIN_NOTIFICATION_TYPE, NULL);
 }
 
+static void 
+notif_behaviour_update (PreferencesPagePluginNotification *page, gint level)
+{
+	gint sensitive = (level == 0)?TRUE: FALSE ;
+
+        gint on_close = gconf_client_get_bool (page->gconf, NOTIFICATION_ON_CLOSE, NULL);
+        gint start_hidden = gconf_client_get_bool (page->gconf, NOTIFICATION_START_HIDDEN, NULL);
+
+	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (page->notif_on_close), on_close);
+	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (page->notif_start_hidden), start_hidden);
+
+	gtk_widget_set_sensitive (page->notif_on_close, sensitive );
+	gtk_widget_set_sensitive (page->notif_start_hidden, sensitive);
+}
+
 static void
 notif_changed (GtkToggleButton *button, PreferencesPagePluginNotification *page)
 {
@@ -66,48 +80,37 @@ notif_changed (GtkToggleButton *button, PreferencesPagePluginNotification *page)
 		level = 2;
 	else if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (page->notif_level_1)))
 		level = 1;
-	else
+	else {
 		level = 0;
+		notif_behaviour_update (page, level);
 
-	gconf_client_set_int (page->gconf, NOTIFICATION_KEY, level, NULL);
-}
+		gconf_client_set_bool (page->gconf, NOTIFICATION_ON_CLOSE, 
+			gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (page->notif_on_close)), NULL); 
+		gconf_client_set_bool (page->gconf, NOTIFICATION_START_HIDDEN, 
+			gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (page->notif_start_hidden)), NULL);
 
-static void
-preferences_page_plugin_notification_set_notif_level (PreferencesPagePluginNotification *page, gint level)
-{
-	switch (level)
-	{
-		case 3:
-			gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (page->notif_level_3), TRUE);
-			break;
-		case 2:
-			gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (page->notif_level_2), TRUE);
-			break;
-		case 1:
-			gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (page->notif_level_1), TRUE);
-			break;
-		case 0:
-			gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (page->notif_level_0), TRUE);
 	}
+
+	gconf_client_set_int (page->gconf, NOTIFICATION_KEY, level, NULL);
 }
 
 static void
-gconf_notif_changed (GConfClient *client, guint cnxn_id, GConfEntry *entry, PreferencesPagePluginNotification *page)
+preferences_page_plugin_set_level (PreferencesPagePluginNotification *page, gint level)
 {
-	gint level;
-
-	g_signal_handlers_block_by_func (G_OBJECT (page->notif_level_3), G_CALLBACK (notif_changed), page);
-	g_signal_handlers_block_by_func (G_OBJECT (page->notif_level_2), G_CALLBACK (notif_changed), page);
-	g_signal_handlers_block_by_func (G_OBJECT (page->notif_level_1), G_CALLBACK (notif_changed), page);
-	g_signal_handlers_block_by_func (G_OBJECT (page->notif_level_0), G_CALLBACK (notif_changed), page);
-
-	level = gconf_client_get_int (client, entry->key, NULL);
-	preferences_page_plugin_notification_set_notif_level (page, level);
-
-	g_signal_handlers_unblock_by_func (G_OBJECT (page->notif_level_3), G_CALLBACK (notif_changed), page);
-	g_signal_handlers_unblock_by_func (G_OBJECT (page->notif_level_2), G_CALLBACK (notif_changed), page);
-	g_signal_handlers_unblock_by_func (G_OBJECT (page->notif_level_1), G_CALLBACK (notif_changed), page);
-	g_signal_handlers_unblock_by_func (G_OBJECT (page->notif_level_0), G_CALLBACK (notif_changed), page);
+        switch (level)
+        {
+                case 3:
+                        gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (page->notif_level_3), TRUE);
+                        break;
+                case 2:
+                        gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (page->notif_level_2), TRUE);
+                        break;
+                case 1:
+                        gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (page->notif_level_1), TRUE);
+                        break;
+                case 0:
+                        gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (page->notif_level_0), TRUE);
+        }
 }
 
 static void
@@ -127,21 +130,26 @@ preferences_page_plugin_notification_init (PreferencesPagePluginNotification *pa
 	PREFERENCES_PAGE (page)->title = g_strdup (_("Notification"));
 
 	page->gconf = gconf_client_get_default ();
-	page->notify = gconf_client_notify_add (page->gconf, NOTIFICATION_KEY,
-				(GConfClientNotifyFunc) gconf_notif_changed, page, NULL, NULL);
 
 #define GW(name) ((page->name) = GTK_WIDGET (gtk_builder_get_object (xml, #name)))
 	GW(notif_level_3);
 	GW(notif_level_2);
 	GW(notif_level_1);
 	GW(notif_level_0);
+
+	GW(notif_on_close);
+	GW(notif_start_hidden);
 #undef GW
 
 	gint level = gconf_client_get_int (page->gconf, NOTIFICATION_KEY, NULL);
-	preferences_page_plugin_notification_set_notif_level (page, level);
+	notif_behaviour_update (page, level);
+	preferences_page_plugin_set_level (page, level);
 
 	g_signal_connect (G_OBJECT (page->notif_level_3), "clicked", G_CALLBACK (notif_changed), page);
 	g_signal_connect (G_OBJECT (page->notif_level_2), "clicked", G_CALLBACK (notif_changed), page);
 	g_signal_connect (G_OBJECT (page->notif_level_1), "clicked", G_CALLBACK (notif_changed), page);
 	g_signal_connect (G_OBJECT (page->notif_level_0), "clicked", G_CALLBACK (notif_changed), page);
+
+	g_signal_connect (G_OBJECT (page->notif_on_close), "clicked", G_CALLBACK (notif_changed), page);
+	g_signal_connect (G_OBJECT (page->notif_start_hidden), "clicked", G_CALLBACK (notif_changed), page);
 }
diff --git a/plugins/notification/preferences-page-plugin-notification.h b/plugins/notification/preferences-page-plugin-notification.h
index c01adb9..a1eabe0 100644
--- a/plugins/notification/preferences-page-plugin-notification.h
+++ b/plugins/notification/preferences-page-plugin-notification.h
@@ -42,12 +42,14 @@ struct _PreferencesPagePluginNotification
 	PreferencesPage parent;
 
 	GConfClient *gconf;
-	guint notify;
 
 	GtkWidget *notif_level_3;
 	GtkWidget *notif_level_2;
 	GtkWidget *notif_level_1;
 	GtkWidget *notif_level_0;
+
+	GtkWidget *notif_on_close;
+	GtkWidget *notif_start_hidden;
 };
 
 struct _PreferencesPagePluginNotificationClass
