--- terminal-tab-label.c.old	2008-12-09 16:48:20.000000000 -0400
+++ terminal-tab-label.c	2008-12-10 00:30:17.000000000 -0400
@@ -20,9 +20,11 @@
 #include <config.h>
 
 #include <gtk/gtk.h>
+#include <gconf/gconf-client.h>
 #include <glib/gi18n.h>
-
 #include "terminal-tab-label.h"
+#include "terminal-app.h"
 
 #define TERMINAL_TAB_LABEL_GET_PRIVATE(tab_label)(G_TYPE_INSTANCE_GET_PRIVATE ((tab_label), TERMINAL_TYPE_TAB_LABEL, TerminalTabLabelPrivate))
 
@@ -119,6 +121,7 @@
                                 guint n_construct_properties,
                                 GObjectConstructParam *construct_params)
 {
+  GConfClient *conf = gconf_client_get_default ();
   GObject *object;
   TerminalTabLabel *tab_label;
   TerminalTabLabelPrivate *priv;
@@ -143,24 +146,27 @@
 
   gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0);
 
-  priv->close_button = close_button = gtk_button_new ();
-  gtk_button_set_relief (GTK_BUTTON (close_button), GTK_RELIEF_NONE);
-  gtk_button_set_focus_on_click (GTK_BUTTON (close_button), FALSE);
-  gtk_button_set_relief (GTK_BUTTON (close_button), GTK_RELIEF_NONE);
-  gtk_widget_set_name (close_button, "gnome-terminal-tab-close-button");
-  gtk_widget_set_tooltip_text (close_button, _("Close tab"));
-
-  image = gtk_image_new_from_stock (GTK_STOCK_CLOSE, GTK_ICON_SIZE_MENU);
-  gtk_container_add (GTK_CONTAINER (close_button), image);
-  gtk_box_pack_end (GTK_BOX (hbox), close_button, FALSE, FALSE, 0);
+  if (gconf_client_get_bool (conf, CONF_GLOBAL_PREFIX "/show_tab_close", 0))
+  {
+	priv->close_button = close_button = gtk_button_new ();
+	gtk_button_set_relief (GTK_BUTTON (close_button), GTK_RELIEF_NONE);
+	gtk_button_set_focus_on_click (GTK_BUTTON (close_button), FALSE);
+	gtk_button_set_relief (GTK_BUTTON (close_button), GTK_RELIEF_NONE);
+	gtk_widget_set_name (close_button, "gnome-terminal-tab-close-button");
+	gtk_widget_set_tooltip_text (close_button, _("Close tab"));
+
+	image = gtk_image_new_from_stock (GTK_STOCK_CLOSE, GTK_ICON_SIZE_MENU);
+	gtk_container_add (GTK_CONTAINER (close_button), image);
+	gtk_box_pack_end (GTK_BOX (hbox), close_button, FALSE, FALSE, 0);
+
+	g_signal_connect (close_button, "clicked",
+		    G_CALLBACK (close_button_clicked_cb), tab_label);
+  }
 
   sync_tab_label (priv->screen, NULL, label);
   g_signal_connect (priv->screen, "notify::title",
                     G_CALLBACK (sync_tab_label), label);
 
-  g_signal_connect (close_button, "clicked",
-		    G_CALLBACK (close_button_clicked_cb), tab_label);
-
   gtk_widget_show_all (hbox);
 
   return object;
