diff -ur gnome-terminal-2.22.3/src/gnome-terminal.schemas.in gnome-terminal-2.22.3-new/src/gnome-terminal.schemas.in
--- gnome-terminal-2.22.3/src/gnome-terminal.schemas.in	2008-03-20 11:16:25.000000000 +0100
+++ gnome-terminal-2.22.3-new/src/gnome-terminal.schemas.in	2008-09-14 23:23:16.000000000 +0200
@@ -111,7 +111,21 @@
       </locale>
     </schema>
  
-
+    <schema>
+      <key>/schemas/apps/gnome-terminal/profiles/global/tab_switching_wraparound</key>
+      <applyto>/apps/gnome-terminal/profiles/global/tab_switching_wraparound</applyto>
+      <owner>gnome-terminal</owner>
+      <type>bool</type>
+      <default>false</default>
+      <locale name="C">
+         <short>Whether to wrap around when switching tabs</short>
+         <long>
+           True if you want the last tab to be activated when you switch to
+           the previous tab and the first tab is the active one, or the next
+           tab and that last tab is active. Think of it as a wrap-around.
+         </long>
+      </locale>
+    </schema>
 
 
     <!-- Per-profile settings -->
diff -ur gnome-terminal-2.22.3/src/terminal-window.c gnome-terminal-2.22.3-new/src/terminal-window.c
--- gnome-terminal-2.22.3/src/terminal-window.c	2008-05-10 00:58:12.000000000 +0200
+++ gnome-terminal-2.22.3-new/src/terminal-window.c	2008-09-14 23:22:50.000000000 +0200
@@ -1315,6 +1315,24 @@
   gtk_widget_set_sensitive (window->priv->copy_menuitem, can_copy);
 }
 
+static gboolean allow_tab_wraparound (TerminalWindow *window)
+{
+  GError *error = NULL;
+
+  gboolean allowed = gconf_client_get_bool (window->priv->conf,
+                 CONF_GLOBAL_PREFIX "/tab_switching_wraparound", &error);
+
+  if (error)
+    {
+      g_printerr (_("There was an error loading config value for whether to allow tab wrap-around. (%s)\n"),
+                  error->message);
+      g_error_free (error);
+      allowed = FALSE;
+    }
+
+  return (allowed);
+}
+
 static void
 update_tab_sensitivity (TerminalWindow *window)
 {
@@ -1333,7 +1351,7 @@
   page_num = gtk_notebook_get_current_page (GTK_NOTEBOOK (notebook));
   
   gtk_widget_set_sensitive (window->priv->previous_tab_menuitem,
-                            page_num > 0);
+                            (page_num > 0) || allow_tab_wraparound (window));
 
   on_last_page = (page_num >= num_pages - 1);
 
@@ -1356,7 +1374,7 @@
     }
 
   gtk_widget_set_sensitive (window->priv->next_tab_menuitem,
-                            !on_last_page);
+                            !on_last_page || allow_tab_wraparound (window));
 }
 
 static void
@@ -2741,14 +2759,40 @@
 next_tab_callback(GtkWidget      *menuitem,
                   TerminalWindow *window)
 {
-  gtk_notebook_next_page (GTK_NOTEBOOK (window->priv->notebook));
+  int num_pages, page_num;
+
+  if (allow_tab_wraparound (window))
+  {
+    num_pages = gtk_notebook_get_n_pages (GTK_NOTEBOOK (window->priv->notebook));
+    page_num = gtk_notebook_get_current_page (GTK_NOTEBOOK (window->priv->notebook));
+
+    if (page_num >= num_pages - 1)
+      gtk_notebook_set_current_page (GTK_NOTEBOOK (window->priv->notebook), 0);
+    else
+      gtk_notebook_next_page (GTK_NOTEBOOK (window->priv->notebook));
+  }
+  else
+    gtk_notebook_next_page (GTK_NOTEBOOK (window->priv->notebook));
 }
 
 static void
 previous_tab_callback (GtkWidget      *menuitem,
                        TerminalWindow *window)
 {
-  gtk_notebook_prev_page (GTK_NOTEBOOK (window->priv->notebook));
+  int page_num;
+
+  if (allow_tab_wraparound (window))
+  {
+    page_num = gtk_notebook_get_current_page (GTK_NOTEBOOK (window->priv->notebook));
+
+    if (page_num == 0)
+      gtk_notebook_set_current_page (GTK_NOTEBOOK (window->priv->notebook),
+          gtk_notebook_get_n_pages (GTK_NOTEBOOK (window->priv->notebook)) - 1);
+    else
+      gtk_notebook_prev_page (GTK_NOTEBOOK (window->priv->notebook));
+  }
+  else
+    gtk_notebook_prev_page (GTK_NOTEBOOK (window->priv->notebook));
 }
 
 static void
