All pastes #105871 Raw Edit

Miscellany

public text v1 · immutable
#105871 ·published 2006-07-29 23:23 UTC
rendered paste body
Index: src/gnome-utils/gnc-main-window.c
===================================================================
--- src/gnome-utils/gnc-main-window.c	(Revision 14575)
+++ src/gnome-utils/gnc-main-window.c	(Arbeitskopie)
@@ -83,6 +83,7 @@
 #define PLUGIN_PAGE_CLOSE_BUTTON "close-button"
 
 #define KEY_SHOW_CLOSE_BUTTON	"tab_close_buttons"
+#define KEY_TAB_POSITION	"tab_position"
 
 /* Static Globals *******************************************************/
 
@@ -2369,6 +2370,28 @@
 	LEAVE("");
 }
 
+static void
+gnc_main_window_update_tab_position (GncMainWindow *window)
+{
+	GtkPositionType position = GTK_POS_TOP;
+	gchar *conf_string;
+	GncMainWindowPrivate *priv;
+
+	ENTER ("window %p", window);
+	conf_string = gnc_gconf_get_string (GCONF_GENERAL,
+					    KEY_TAB_POSITION, NULL);
+	if (conf_string) {
+		position = gnc_enum_from_nick (GTK_TYPE_POSITION_TYPE,
+					       conf_string, GTK_POS_TOP);
+		g_free (conf_string);
+	}
+
+	priv = GNC_MAIN_WINDOW_GET_PRIVATE (window);
+	gtk_notebook_set_tab_pos (GTK_NOTEBOOK (priv->notebook), position);
+
+	LEAVE ("");
+}
+
 /*
  * Based on code from Epiphany (src/ephy-window.c)
  */
@@ -2502,6 +2525,8 @@
 	  key_tail++;
 	if (strcmp(key_tail, KEY_TOOLBAR_STYLE) == 0) {
 	  gnc_main_window_update_toolbar(window);
+	} else if (strcmp(key_tail, KEY_TAB_POSITION) == 0) {
+	  gnc_main_window_update_tab_position(window);
 	}
 }
 
@@ -2710,6 +2735,7 @@
 	gnc_gconf_add_notification(G_OBJECT(window), DESKTOP_GNOME_INTERFACE,
 				   gnc_main_window_gconf_changed);
 	gnc_main_window_update_toolbar(window);
+	gnc_main_window_update_tab_position(window);
 
 	gnc_main_window_init_menu_updaters(window);
 
Index: src/gnome-utils/glade/preferences.glade
===================================================================
--- src/gnome-utils/glade/preferences.glade	(Revision 14575)
+++ src/gnome-utils/glade/preferences.glade	(Arbeitskopie)
@@ -3020,7 +3020,7 @@
 	    <widget class="GtkTable" id="table5">
 	      <property name="border_width">6</property>
 	      <property name="visible">True</property>
-	      <property name="n_rows">9</property>
+	      <property name="n_rows">15</property>
 	      <property name="n_columns">4</property>
 	      <property name="homogeneous">False</property>
 	      <property name="row_spacing">0</property>
@@ -3244,6 +3244,150 @@
 		  <property name="y_options"></property>
 		</packing>
 	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label110">
+		  <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</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">1</property>
+		  <property name="top_attach">9</property>
+		  <property name="bottom_attach">10</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label111">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">&lt;b&gt;Tab Position&lt;/b&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>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">1</property>
+		  <property name="top_attach">10</property>
+		  <property name="bottom_attach">11</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkRadioButton" id="gconf/general/tab_position/top">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">Top</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">gconf/general/toolbar_style/text</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">1</property>
+		  <property name="top_attach">11</property>
+		  <property name="bottom_attach">12</property>
+		  <property name="x_padding">12</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkRadioButton" id="gconf/general/tab_position/left">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">Left</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">gconf/general/toolbar_style/text</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="GtkRadioButton" id="gconf/general/tab_position/bottom">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">Bottom</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">gconf/general/toolbar_style/text</property>
+		</widget>
+		<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="x_padding">12</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkRadioButton" id="gconf/general/tab_position/right">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">Right</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">gconf/general/toolbar_style/text</property>
+		</widget>
+		<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="x_padding">12</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
 	    </widget>
 	    <packing>
 	      <property name="tab_expand">False</property>
Index: src/gnome/schemas/apps_gnucash_general.schemas.in
===================================================================
--- src/gnome/schemas/apps_gnucash_general.schemas.in	(Revision 14575)
+++ src/gnome/schemas/apps_gnucash_general.schemas.in	(Arbeitskopie)
@@ -462,5 +462,22 @@
       </locale>
     </schema>
 
+    <schema>
+      <key>/schemas/apps/gnucash/general/tab_position</key>
+      <applyto>/apps/gnucash/general/tab_position</applyto>
+      <owner>gnucash</owner>
+      <type>string</type>
+      <default>top</default>
+      <locale name="C">
+        <short>Position of the notebook tabs</short>
+        <long>
+	  This setting determines the edge at which the tabs for
+	  switching pages in notebooks are drawn. Possible values
+	  are "top", "left", "bottom" and "right".
+	  It defaults to "top".
+	</long>
+      </locale>
+    </schema>
+
   </schemalist>
 </gconfschemafile>