r15759 - gnucash/trunk/src - Add an option to change the tab closing behavior. The two choices are

David Hampton hampton at cvs.gnucash.org
Mon Mar 26 21:55:39 EDT 2007


Author: hampton
Date: 2007-03-26 21:55:38 -0400 (Mon, 26 Mar 2007)
New Revision: 15759
Trac: http://svn.gnucash.org/trac/changeset/15759

Modified:
   gnucash/trunk/src/gnome-utils/glade/preferences.glade
   gnucash/trunk/src/gnome-utils/gnc-main-window.c
   gnucash/trunk/src/gnome/schemas/apps_gnucash_general.schemas.in
Log:
Add an option to change the tab closing behavior.  The two choices are
to move to the tab immediately to the left, or to move to the most
recently viewed tab.  Implements #346314.


Modified: gnucash/trunk/src/gnome/schemas/apps_gnucash_general.schemas.in
===================================================================
--- gnucash/trunk/src/gnome/schemas/apps_gnucash_general.schemas.in	2007-03-27 01:10:09 UTC (rev 15758)
+++ gnucash/trunk/src/gnome/schemas/apps_gnucash_general.schemas.in	2007-03-27 01:55:38 UTC (rev 15759)
@@ -501,9 +501,24 @@
       <type>bool</type>
       <default>false</default>
       <locale name="C">
-        <short>If gnucash should allow file incompatability.  If true, then gnucash will (be allowed to) intentionally break file compatability with old versions.</short>
+        <short>Allow file incompatability with older versions.</short>
+        <long>If gnucash should allow file incompatability.  If true, then gnucash will (be allowed to) intentionally break file compatability with old versions.</long>
       </locale>
     </schema>
 
+    <schema>
+      <key>/schemas/apps/gnucash/general/tab_next_recent</key>
+      <applyto>/apps/gnucash/general/tab_next_recent</applyto>
+      <owner>gnucash</owner>
+      <type>bool</type>
+      <default>FALSE</default>
+      <locale name="C">
+        <short>Closing a tab moves to the the most recent tab.</short>
+        <long>
+	  If true, closing a tab moves to the most recently visited tab.  If false, closing a tab moves one tab to the left.
+	</long>
+      </locale>
+    </schema>
+
   </schemalist>
 </gconfschemafile>

Modified: gnucash/trunk/src/gnome-utils/glade/preferences.glade
===================================================================
--- gnucash/trunk/src/gnome-utils/glade/preferences.glade	2007-03-27 01:10:09 UTC (rev 15758)
+++ gnucash/trunk/src/gnome-utils/glade/preferences.glade	2007-03-27 01:55:38 UTC (rev 15759)
@@ -3457,7 +3457,7 @@
 	    <widget class="GtkTable" id="table5">
 	      <property name="border_width">6</property>
 	      <property name="visible">True</property>
-	      <property name="n_rows">18</property>
+	      <property name="n_rows">19</property>
 	      <property name="n_columns">4</property>
 	      <property name="homogeneous">False</property>
 	      <property name="row_spacing">0</property>
@@ -3695,6 +3695,29 @@
 	      </child>
 
 	      <child>
+		<widget class="GtkCheckButton" id="gconf/general/tab_next_recent">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">Bring the most _recent tab to the front</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <property name="active">False</property>
+		  <property name="inconsistent">False</property>
+		  <property name="draw_indicator">True</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">1</property>
+		  <property name="top_attach">12</property>
+		  <property name="bottom_attach">13</property>
+		  <property name="x_padding">12</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
 		<widget class="GtkLabel" id="label110">
 		  <property name="visible">True</property>
 		  <property name="label" translatable="yes"></property>
@@ -3715,8 +3738,8 @@
 		<packing>
 		  <property name="left_attach">0</property>
 		  <property name="right_attach">1</property>
-		  <property name="top_attach">12</property>
-		  <property name="bottom_attach">13</property>
+		  <property name="top_attach">13</property>
+		  <property name="bottom_attach">14</property>
 		  <property name="x_options">fill</property>
 		  <property name="y_options"></property>
 		</packing>
@@ -3743,8 +3766,8 @@
 		<packing>
 		  <property name="left_attach">0</property>
 		  <property name="right_attach">1</property>
-		  <property name="top_attach">13</property>
-		  <property name="bottom_attach">14</property>
+		  <property name="top_attach">14</property>
+		  <property name="bottom_attach">15</property>
 		  <property name="x_options">fill</property>
 		  <property name="y_options"></property>
 		</packing>
@@ -3766,8 +3789,8 @@
 		<packing>
 		  <property name="left_attach">0</property>
 		  <property name="right_attach">1</property>
-		  <property name="top_attach">14</property>
-		  <property name="bottom_attach">15</property>
+		  <property name="top_attach">15</property>
+		  <property name="bottom_attach">16</property>
 		  <property name="x_padding">12</property>
 		  <property name="x_options">fill</property>
 		  <property name="y_options"></property>
@@ -3791,8 +3814,8 @@
 		<packing>
 		  <property name="left_attach">0</property>
 		  <property name="right_attach">1</property>
-		  <property name="top_attach">15</property>
-		  <property name="bottom_attach">16</property>
+		  <property name="top_attach">16</property>
+		  <property name="bottom_attach">17</property>
 		  <property name="x_padding">12</property>
 		  <property name="x_options">fill</property>
 		  <property name="y_options"></property>
@@ -3816,8 +3839,8 @@
 		<packing>
 		  <property name="left_attach">0</property>
 		  <property name="right_attach">1</property>
-		  <property name="top_attach">16</property>
-		  <property name="bottom_attach">17</property>
+		  <property name="top_attach">17</property>
+		  <property name="bottom_attach">18</property>
 		  <property name="x_padding">12</property>
 		  <property name="x_options">fill</property>
 		  <property name="y_options"></property>
@@ -3841,8 +3864,8 @@
 		<packing>
 		  <property name="left_attach">0</property>
 		  <property name="right_attach">1</property>
-		  <property name="top_attach">17</property>
-		  <property name="bottom_attach">18</property>
+		  <property name="top_attach">18</property>
+		  <property name="bottom_attach">19</property>
 		  <property name="x_padding">12</property>
 		  <property name="x_options">fill</property>
 		  <property name="y_options"></property>

Modified: gnucash/trunk/src/gnome-utils/gnc-main-window.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-main-window.c	2007-03-27 01:10:09 UTC (rev 15758)
+++ gnucash/trunk/src/gnome-utils/gnc-main-window.c	2007-03-27 01:55:38 UTC (rev 15759)
@@ -81,6 +81,7 @@
 #define PLUGIN_PAGE_CLOSE_BUTTON "close-button"
 
 #define KEY_SHOW_CLOSE_BUTTON	"tab_close_buttons"
+#define KEY_TAB_NEXT_RECENT	"tab_next_recent"
 #define KEY_TAB_POSITION	"tab_position"
 
 #define GNC_MAIN_WINDOW_NAME "GncMainWindow"
@@ -2006,11 +2007,13 @@
 
 	/* Switch to the last recently used page */
 	notebook = GTK_NOTEBOOK (priv->notebook);
-	new_page = g_list_nth_data (priv->usage_order, 0);
-	if (new_page) {
-	  page_num =  gtk_notebook_page_num(notebook, new_page->notebook_page);
-	  gtk_notebook_set_current_page(notebook, page_num);
-	}
+        if (gnc_gconf_get_bool(GCONF_GENERAL, KEY_TAB_NEXT_RECENT, NULL)) {
+            new_page = g_list_nth_data (priv->usage_order, 0);
+            if (new_page) {
+                page_num =  gtk_notebook_page_num(notebook, new_page->notebook_page);
+                gtk_notebook_set_current_page(notebook, page_num);
+            }
+        }
 
 	/* Remove the page from the notebook */
 	page_num =  gtk_notebook_page_num(notebook, page->notebook_page);



More information about the gnucash-changes mailing list