[gnumeric] Replace more GtkTable instances.



commit eb668f5032c31253e8fa5ffe6a8b61c5d1abead2
Author: Jean Brefort <jean brefort normalesup org>
Date:   Tue Dec 27 15:45:38 2011 +0100

    Replace more GtkTable instances.

 ChangeLog                         |    4 +
 plugins/excel/ChangeLog           |    5 +
 plugins/excel/xlsx-read-drawing.c |    7 +-
 src/dialogs/ChangeLog             |    9 +
 src/dialogs/cell-sort.ui          |  589 ++++++++++++++++++-------------------
 src/dialogs/dao.ui                |  537 +++++++++++++++------------------
 src/dialogs/data-table.ui         |   33 ++-
 src/dialogs/delete-cells.ui       |  215 +++++++-------
 src/dialogs/dialog-cell-sort.c    |   29 +-
 src/dialogs/dialog-data-table.c   |   10 +-
 src/sheet-object-image.c          |    2 +-
 src/widgets/ChangeLog             |    4 +
 src/widgets/gnm-dao.c             |   20 +-
 13 files changed, 698 insertions(+), 766 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index b542992..ebdaf9c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2011-12-27  Jean Brefort  <jean brefort normalesup org>
+
+	* src/sheet-object-image.c (gnm_soi_assign_to_sheet): fix image life time.
+
 2011-12-25  Morten Welinder  <terra gnome org>
 
 	* src/gutils.c (map_nonascii_digits): Map signs too.  Terminate
diff --git a/plugins/excel/ChangeLog b/plugins/excel/ChangeLog
index 286ef00..8878f1c 100644
--- a/plugins/excel/ChangeLog
+++ b/plugins/excel/ChangeLog
@@ -1,3 +1,8 @@
+2011-12-27  Jean Brefort  <jean brefort normalesup org>
+
+	* xlsx-read-drawing.c (xlsx_chart_text_start),
+	(xlsx_draw_text_run_props): always set a font size.
+
 2011-11-30 Andreas J. Guelzow <aguelzow pyrshep ca>
 
 	* xlsx-read-docprops.c (xlsx_read_core_keys): use G_VALUE_INIT
diff --git a/plugins/excel/xlsx-read-drawing.c b/plugins/excel/xlsx-read-drawing.c
index 84aff46..6c150e0 100644
--- a/plugins/excel/xlsx-read-drawing.c
+++ b/plugins/excel/xlsx-read-drawing.c
@@ -69,6 +69,7 @@ xlsx_chart_text_start (GsfXMLIn *xin, G_GNUC_UNUSED xmlChar const **attrs)
 	if (!GOG_IS_LABEL (state->cur_obj) && IS_SHEET_OBJECT_GRAPH (state->so) && NULL == state->series) { /* Hmm, why? */
 		GogObject *label = gog_object_add_by_name (state->cur_obj,
 			(state->cur_obj == (GogObject *)state->chart) ? "Title" : "Label", NULL);
+		g_object_set (G_OBJECT (label), "allow-wrap", TRUE, "justification", "center", NULL);
 		xlsx_chart_push_obj (state, label);
 	}
 }
@@ -158,13 +159,13 @@ xlsx_draw_text_run_props (GsfXMLIn *xin, xmlChar const **attrs)
 	/* FIXME: this should be for a text run, not for the full object */
 	if (GO_IS_STYLED_OBJECT (state->cur_obj) && state->cur_style) {
 		PangoFontDescription *desc = pango_font_description_new ();
-		int size;
+		int size = 1000; /* seems 10*100 is the default */
 		GOFont const *font;
 		/* looks like the default font is Calibri, FIXME: import that from file instead */
 		pango_font_description_set_family (desc, "Calibri");
 		for (; attrs && *attrs; attrs += 2)
-			if (attr_int (xin, attrs, "sz", &size))
-				pango_font_description_set_size (desc, size * PANGO_SCALE / 100);
+			attr_int (xin, attrs, "sz", &size);
+		pango_font_description_set_size (desc, size * PANGO_SCALE / 100);
 		/* FIXME: don't set the size to the whole object, only to the run,
 		 * anyway, this has to wait until we support rich text in chart labels */
 		font = go_font_new_by_desc (desc);
diff --git a/src/dialogs/ChangeLog b/src/dialogs/ChangeLog
index a17f36b..0595be0 100644
--- a/src/dialogs/ChangeLog
+++ b/src/dialogs/ChangeLog
@@ -1,3 +1,12 @@
+2011-12-27  Jean Brefort  <jean brefort normalesup org>
+
+	* cell-sort.ui: more GtkTable eradication.
+	* dao.ui: ditto.
+	* data-table.ui: ditto.
+	* delete-cells.ui: ditto.
+	* dialog-cell-sort.c (dialog_init): ditto.
+	* dialog-data-table.c (init_entry), (data_table_init): ditto.
+
 2011-12-01  Morten Welinder  <terra gnome org>
 
 	* Makefile.am (embedded-ui.c): use --id-prefix.
diff --git a/src/dialogs/cell-sort.ui b/src/dialogs/cell-sort.ui
index 8359c95..deb7a22 100644
--- a/src/dialogs/cell-sort.ui
+++ b/src/dialogs/cell-sort.ui
@@ -21,6 +21,7 @@
             <child>
               <object class="GtkButton" id="help_button">
                 <property name="label">gtk-help</property>
+                <property name="use_action_appearance">False</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
@@ -37,6 +38,7 @@
             <child>
               <object class="GtkButton" id="cancel_button">
                 <property name="label">gtk-cancel</property>
+                <property name="use_action_appearance">False</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
@@ -53,6 +55,7 @@
             <child>
               <object class="GtkButton" id="ok_button">
                 <property name="label">gtk-ok</property>
+                <property name="use_action_appearance">False</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
@@ -76,318 +79,300 @@
           </packing>
         </child>
         <child>
-          <object class="GtkTable" id="cell_sort_table">
+          <object class="GtkGrid" id="cell-sort-grid">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
-            <property name="border_width">5</property>
-            <property name="n_rows">2</property>
-            <property name="n_columns">2</property>
-            <property name="column_spacing">4</property>
-            <property name="row_spacing">18</property>
+            <property name="hexpand">True</property>
+            <property name="vexpand">True</property>
+            <property name="row_spacing">6</property>
+            <property name="column_spacing">12</property>
             <child>
-              <object class="GtkTable" id="cell_sort_options_table">
+              <object class="GtkLabel" id="label7">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="n_rows">6</property>
-                <property name="n_columns">3</property>
-                <property name="column_spacing">12</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">&lt;span weight="bold"&gt;Sort Options&lt;/span&gt;</property>
+                <property name="use_markup">True</property>
+              </object>
+              <packing>
+                <property name="left_attach">0</property>
+                <property name="top_attach">0</property>
+                <property name="width">3</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel" id="label5">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">&lt;span weight="bold"&gt;Sort Specification&lt;/span&gt;</property>
+                <property name="use_markup">True</property>
+              </object>
+              <packing>
+                <property name="left_attach">0</property>
+                <property name="top_attach">6</property>
+                <property name="width">3</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel" id="label9">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">Locale:</property>
+                <property name="use_underline">True</property>
+                <property name="justify">right</property>
+              </object>
+              <packing>
+                <property name="left_attach">0</property>
+                <property name="top_attach">5</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkCheckButton" id="retain_format_button">
+                <property name="label" translatable="yes">Sorting _preserves formats</property>
+                <property name="use_action_appearance">False</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="has_tooltip">True</property>
+                <property name="tooltip_markup" translatable="yes">When this checkbox is checked, cell formatting such as borders, hyperlinks, fore and background colors will remain in the original location. Uncheck this checkbox to have these formats move with the content. </property>
+                <property name="tooltip_text" translatable="yes">When this checkbox is checked, cell formatting such as borders, hyperlinks, fore and background colors will remain in the original location. Uncheck this checkbox to have these formats move with the content. </property>
+                <property name="margin_left">12</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_underline">True</property>
+                <property name="xalign">0</property>
+                <property name="draw_indicator">True</property>
+              </object>
+              <packing>
+                <property name="left_attach">0</property>
+                <property name="top_attach">4</property>
+                <property name="width">3</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkCheckButton" id="cell_sort_header_check">
+                <property name="label" translatable="yes">Sort range has a _header</property>
+                <property name="use_action_appearance">False</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="has_tooltip">True</property>
+                <property name="tooltip_markup" translatable="yes">The first row or column of the range is excluded from sorting and assumed to contain column or row headers.</property>
+                <property name="tooltip_text" translatable="yes">The first row or column of the range is excluded from sorting and assumed to contain column or row headers.</property>
+                <property name="margin_left">12</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_underline">True</property>
+                <property name="xalign">0</property>
+                <property name="draw_indicator">True</property>
+              </object>
+              <packing>
+                <property name="left_attach">0</property>
+                <property name="top_attach">3</property>
+                <property name="width">3</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel" id="label4">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="margin_left">12</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">Direction:</property>
+                <accessibility>
+                  <relation type="label-for" target="cell_sort_col_rb"/>
+                </accessibility>
+              </object>
+              <packing>
+                <property name="left_attach">0</property>
+                <property name="top_attach">2</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel" id="var1-label">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="margin_left">12</property>
+                <property name="xalign">0</property>
+                <property name="ypad">5</property>
+                <property name="label" translatable="yes">Range:</property>
+                <property name="use_underline">True</property>
+                <property name="justify">right</property>
+              </object>
+              <packing>
+                <property name="left_attach">0</property>
+                <property name="top_attach">1</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkRadioButton" id="cell_sort_row_rb">
+                <property name="label" translatable="yes">_Left-Right</property>
+                <property name="use_action_appearance">False</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="has_tooltip">True</property>
+                <property name="tooltip_markup" translatable="yes">Sort columns by the specified rows</property>
+                <property name="tooltip_text" translatable="yes">Sort columns by the specified rows</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_underline">True</property>
+                <property name="xalign">0</property>
+                <property name="active">True</property>
+                <property name="draw_indicator">True</property>
+                <accessibility>
+                  <relation type="labelled-by" target="label4"/>
+                </accessibility>
+              </object>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="top_attach">2</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkRadioButton" id="cell_sort_col_rb">
+                <property name="label" translatable="yes">_Top-Bottom</property>
+                <property name="use_action_appearance">False</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="has_tooltip">True</property>
+                <property name="tooltip_markup" translatable="yes">Sort rows by the specified columns</property>
+                <property name="tooltip_text" translatable="yes">Sort rows by the specified columns</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_underline">True</property>
+                <property name="xalign">0</property>
+                <property name="draw_indicator">True</property>
+                <property name="group">cell_sort_row_rb</property>
+                <accessibility>
+                  <relation type="labelled-by" target="label4"/>
+                </accessibility>
+              </object>
+              <packing>
+                <property name="left_attach">2</property>
+                <property name="top_attach">2</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkGrid" id="cell-sort-spec-grid">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="hexpand">True</property>
+                <property name="vexpand">True</property>
                 <property name="row_spacing">6</property>
+                <property name="column_spacing">12</property>
                 <child>
-                  <object class="GtkLabel" id="var1-label">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="xalign">0</property>
-                    <property name="ypad">5</property>
-                    <property name="label" translatable="yes">Range:</property>
-                    <property name="use_underline">True</property>
-                    <property name="justify">right</property>
-                  </object>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">2</property>
-                    <property name="x_options">GTK_FILL</property>
-                    <property name="y_options"></property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkLabel" id="label4">
+                  <object class="GtkButton" id="up_button">
+                    <property name="label">gtk-go-up</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="xalign">0</property>
-                    <property name="label" translatable="yes">Direction:</property>
-                    <accessibility>
-                      <relation type="label-for" target="cell_sort_col_rb"/>
-                    </accessibility>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="has_tooltip">True</property>
+                    <property name="tooltip_markup" translatable="yes">Move selected field up in the sort order</property>
+                    <property name="tooltip_text" translatable="yes">Move selected field up in the sort order</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="use_stock">True</property>
                   </object>
                   <packing>
                     <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="top_attach">2</property>
-                    <property name="bottom_attach">3</property>
-                    <property name="x_options">GTK_FILL</property>
-                    <property name="y_options"></property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkLabel" id="label7">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="xalign">0</property>
-                    <property name="label" translatable="yes">&lt;span weight="bold"&gt;Sort Options&lt;/span&gt;</property>
-                    <property name="use_markup">True</property>
-                  </object>
-                  <packing>
-                    <property name="right_attach">3</property>
-                    <property name="x_options">GTK_FILL</property>
-                    <property name="y_options"></property>
+                    <property name="top_attach">0</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkCheckButton" id="cell_sort_header_check">
-                    <property name="label" translatable="yes">Sort range has a _header</property>
+                  <object class="GtkButton" id="down_button">
+                    <property name="label">gtk-go-down</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="tooltip_text" translatable="yes">The first row or column of the range is excluded from sorting and assumed to contain column or row headers.</property>
+                    <property name="receives_default">True</property>
+                    <property name="has_tooltip">True</property>
+                    <property name="tooltip_markup" translatable="yes">Move the selected field down in the sort order</property>
+                    <property name="tooltip_text" translatable="yes">Move the selected field down in the sort order</property>
                     <property name="use_action_appearance">False</property>
-                    <property name="use_underline">True</property>
-                    <property name="draw_indicator">True</property>
+                    <property name="use_stock">True</property>
                   </object>
                   <packing>
                     <property name="left_attach">1</property>
-                    <property name="right_attach">3</property>
-                    <property name="top_attach">3</property>
-                    <property name="bottom_attach">4</property>
-                    <property name="x_options">GTK_FILL</property>
-                    <property name="y_options"></property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkLabel" id="label8">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="xalign">0</property>
-                  </object>
-                  <packing>
                     <property name="top_attach">1</property>
-                    <property name="bottom_attach">5</property>
-                    <property name="x_options"></property>
-                    <property name="y_options"></property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkCheckButton" id="retain_format_button">
-                    <property name="label" translatable="yes">Sorting _preserves formats</property>
+                  <object class="GtkButton" id="clear_button">
+                    <property name="label">gtk-clear</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="tooltip_text" translatable="yes">When this checkbox is checked, cell formatting such as borders, hyperlinks, fore and background colors will remain in the original location. Uncheck this checkbox to have these formats move with the content. </property>
+                    <property name="can_default">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="has_tooltip">True</property>
+                    <property name="tooltip_markup" translatable="yes">Clear all fields from the sort specification</property>
+                    <property name="tooltip_text" translatable="yes">Clear all fields from the sort specification</property>
                     <property name="use_action_appearance">False</property>
-                    <property name="use_underline">True</property>
-                    <property name="draw_indicator">True</property>
+                    <property name="use_stock">True</property>
                   </object>
                   <packing>
                     <property name="left_attach">1</property>
-                    <property name="right_attach">3</property>
-                    <property name="top_attach">4</property>
-                    <property name="bottom_attach">5</property>
-                    <property name="x_options">GTK_FILL</property>
-                    <property name="y_options"></property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkBox" id="hbox2">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="spacing">12</property>
-                    <child>
-                      <object class="GtkRadioButton" id="cell_sort_row_rb">
-                        <property name="label" translatable="yes">_Left-Right</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">False</property>
-                        <property name="tooltip_text" translatable="yes">Sort columns by the specified rows</property>
-                        <property name="use_action_appearance">False</property>
-                        <property name="use_underline">True</property>
-                        <property name="draw_indicator">True</property>
-                        <accessibility>
-                          <relation type="labelled-by" target="label4"/>
-                        </accessibility>
-                      </object>
-                      <packing>
-                        <property name="expand">True</property>
-                        <property name="fill">True</property>
-                        <property name="position">0</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkRadioButton" id="cell_sort_col_rb">
-                        <property name="label" translatable="yes">_Top-Bottom</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">False</property>
-                        <property name="tooltip_text" translatable="yes">Sort rows by the specified columns</property>
-                        <property name="use_action_appearance">False</property>
-                        <property name="use_underline">True</property>
-                        <property name="active">True</property>
-                        <property name="draw_indicator">True</property>
-                        <property name="group">cell_sort_row_rb</property>
-                        <accessibility>
-                          <relation type="labelled-by" target="label4"/>
-                        </accessibility>
-                      </object>
-                      <packing>
-                        <property name="expand">True</property>
-                        <property name="fill">True</property>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                  </object>
-                  <packing>
-                    <property name="left_attach">2</property>
-                    <property name="right_attach">3</property>
                     <property name="top_attach">2</property>
-                    <property name="bottom_attach">3</property>
-                    <property name="y_options">GTK_FILL</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkLabel" id="label9">
+                  <object class="GtkButton" id="delete_button">
+                    <property name="label">gtk-remove</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="xalign">0</property>
-                    <property name="label" translatable="yes">Locale:</property>
-                    <property name="use_underline">True</property>
-                    <property name="justify">right</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="has_tooltip">True</property>
+                    <property name="tooltip_markup" translatable="yes">Remove the selected field from the sort specification</property>
+                    <property name="tooltip_text" translatable="yes">Remove the selected field from the sort specification</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="use_stock">True</property>
                   </object>
                   <packing>
                     <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="top_attach">5</property>
-                    <property name="bottom_attach">6</property>
-                    <property name="x_options">GTK_FILL</property>
-                    <property name="y_options"></property>
-                  </packing>
-                </child>
-                <child>
-                  <placeholder/>
-                </child>
-                <child>
-                  <placeholder/>
-                </child>
-                <child>
-                  <placeholder/>
-                </child>
-              </object>
-              <packing>
-                <property name="right_attach">2</property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkTable" id="cell_sort_spec_table">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="n_rows">3</property>
-                <property name="n_columns">3</property>
-                <property name="column_spacing">6</property>
-                <property name="row_spacing">6</property>
-                <child>
-                  <object class="GtkLabel" id="label5">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="xalign">0</property>
-                    <property name="label" translatable="yes">&lt;span weight="bold"&gt;Sort Specification&lt;/span&gt;</property>
-                    <property name="use_markup">True</property>
-                  </object>
-                  <packing>
-                    <property name="right_attach">3</property>
-                    <property name="x_options">GTK_FILL</property>
-                    <property name="y_options"></property>
+                    <property name="top_attach">3</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkButtonBox" id="vbuttonbox1">
+                  <object class="GtkButton" id="add_button">
+                    <property name="label">gtk-add</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="visible">True</property>
-                    <property name="orientation">vertical</property>
-                    <property name="can_focus">False</property>
-                    <property name="spacing">6</property>
-                    <property name="layout_style">start</property>
-                    <child>
-                      <object class="GtkButton" id="up_button">
-                        <property name="label">gtk-go-up</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">False</property>
-                        <property name="tooltip_text" translatable="yes">Move selected field up in the sort order</property>
-                        <property name="use_action_appearance">False</property>
-                        <property name="use_stock">True</property>
-                      </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="position">0</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkButton" id="down_button">
-                        <property name="label">gtk-go-down</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">False</property>
-                        <property name="tooltip_text" translatable="yes">Move the selected field down in the sort order</property>
-                        <property name="use_action_appearance">False</property>
-                        <property name="use_stock">True</property>
-                      </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkButton" id="clear_button">
-                        <property name="label">gtk-clear</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="can_default">True</property>
-                        <property name="receives_default">False</property>
-                        <property name="tooltip_text" translatable="yes">Clear all fields from the sort specification</property>
-                        <property name="use_action_appearance">False</property>
-                        <property name="use_stock">True</property>
-                      </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="position">2</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkButton" id="delete_button">
-                        <property name="label">gtk-remove</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">False</property>
-                        <property name="tooltip_text" translatable="yes">Remove the selected field from the sort specification</property>
-                        <property name="use_action_appearance">False</property>
-                        <property name="use_stock">True</property>
-                      </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="position">3</property>
-                      </packing>
-                    </child>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="has_tooltip">True</property>
+                    <property name="tooltip_markup" translatable="yes">Adds any fields in the range box to the left to the sort criteria or allows selection of fields from a menu.</property>
+                    <property name="tooltip_text" translatable="yes">Adds any fields in the range box to the left to the sort criteria or allows selection of fields from a menu.</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="use_stock">True</property>
                   </object>
                   <packing>
-                    <property name="left_attach">2</property>
-                    <property name="right_attach">3</property>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">2</property>
-                    <property name="x_options">GTK_FILL</property>
-                    <property name="y_options">GTK_FILL</property>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">5</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
                   </packing>
                 </child>
                 <child>
@@ -395,58 +380,54 @@
                     <property name="width_request">300</property>
                     <property name="height_request">200</property>
                     <property name="visible">True</property>
-                    <property name="can_focus">False</property>
+                    <property name="can_focus">True</property>
+                    <property name="margin_left">12</property>
+                    <property name="hexpand">True</property>
+                    <property name="vexpand">True</property>
                   </object>
                   <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">2</property>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">0</property>
+                    <property name="width">1</property>
+                    <property name="height">5</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkLabel" id="label6">
-                    <property name="width_request">6</property>
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="xalign">0</property>
-                  </object>
-                  <packing>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">3</property>
-                    <property name="x_options">GTK_FILL</property>
-                    <property name="y_options">GTK_FILL</property>
-                  </packing>
+                  <placeholder/>
                 </child>
                 <child>
-                  <object class="GtkButton" id="add_button">
-                    <property name="label">gtk-add</property>
+                  <object class="GtkLabel" id="label1">
                     <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="tooltip_text" translatable="yes">Adds any fields in the range box to the left to the sort criteria or allows selection of fields from a menu.</property>
-                    <property name="use_action_appearance">False</property>
-                    <property name="use_stock">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="vexpand">True</property>
                   </object>
                   <packing>
-                    <property name="left_attach">2</property>
-                    <property name="right_attach">3</property>
-                    <property name="top_attach">2</property>
-                    <property name="bottom_attach">3</property>
-                    <property name="x_options">GTK_FILL</property>
-                    <property name="y_options"></property>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">4</property>
+                    <property name="width">1</property>
+                    <property name="height">1</property>
                   </packing>
                 </child>
-                <child>
-                  <placeholder/>
-                </child>
               </object>
               <packing>
-                <property name="right_attach">2</property>
-                <property name="top_attach">1</property>
-                <property name="bottom_attach">2</property>
+                <property name="left_attach">0</property>
+                <property name="top_attach">7</property>
+                <property name="width">3</property>
+                <property name="height">1</property>
               </packing>
             </child>
+            <child>
+              <placeholder/>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
           </object>
           <packing>
             <property name="expand">False</property>
diff --git a/src/dialogs/dao.ui b/src/dialogs/dao.ui
index ff5bbf5..2faa87b 100644
--- a/src/dialogs/dao.ui
+++ b/src/dialogs/dao.ui
@@ -1,299 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
   <!-- interface-requires gtk+ 3.0 -->
-  <object class="GtkWindow" id="gnm_dao">
-    <property name="can_focus">False</property>
-    <child>
-      <object class="GtkBox" id="dao_box">
-        <property name="visible">True</property>
-        <property name="orientation">vertical</property>
-        <property name="can_focus">False</property>
-        <child>
-          <object class="GtkTable" id="output-table">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="border_width">7</property>
-            <property name="n_rows">11</property>
-            <property name="n_columns">3</property>
-            <property name="column_spacing">12</property>
-            <property name="row_spacing">6</property>
-            <child>
-              <object class="GtkRadioButton" id="newsheet-button">
-                <property name="label" translatable="yes">New _sheet</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_action_appearance">False</property>
-                <property name="use_underline">True</property>
-                <property name="active">True</property>
-                <property name="draw_indicator">True</property>
-              </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="right_attach">2</property>
-                <property name="top_attach">1</property>
-                <property name="bottom_attach">2</property>
-                <property name="x_options">GTK_FILL</property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkRadioButton" id="newworkbook-button">
-                <property name="label" translatable="yes">New _workbook</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_action_appearance">False</property>
-                <property name="use_underline">True</property>
-                <property name="draw_indicator">True</property>
-                <property name="group">newsheet-button</property>
-              </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="right_attach">2</property>
-                <property name="top_attach">2</property>
-                <property name="bottom_attach">3</property>
-                <property name="x_options">GTK_FILL</property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkRadioButton" id="outputrange-button">
-                <property name="label" translatable="yes">Output _range:</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_action_appearance">False</property>
-                <property name="use_underline">True</property>
-                <property name="draw_indicator">True</property>
-                <property name="group">newsheet-button</property>
-              </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="right_attach">2</property>
-                <property name="top_attach">3</property>
-                <property name="bottom_attach">4</property>
-                <property name="x_options">GTK_FILL</property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkCheckButton" id="autofit_button">
-                <property name="label" translatable="yes">A_utofit columns</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_action_appearance">False</property>
-                <property name="use_underline">True</property>
-                <property name="active">True</property>
-                <property name="draw_indicator">True</property>
-              </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="right_attach">3</property>
-                <property name="top_attach">6</property>
-                <property name="bottom_attach">7</property>
-                <property name="x_options">GTK_FILL</property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkCheckButton" id="clear_outputrange_button">
-                <property name="label" translatable="yes">C_lear output range</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_action_appearance">False</property>
-                <property name="use_underline">True</property>
-                <property name="active">True</property>
-                <property name="draw_indicator">True</property>
-              </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="right_attach">3</property>
-                <property name="top_attach">7</property>
-                <property name="bottom_attach">8</property>
-                <property name="x_options">GTK_FILL</property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkCheckButton" id="retain_format_button">
-                <property name="label" translatable="yes">Retain output range _formatting</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_action_appearance">False</property>
-                <property name="use_underline">True</property>
-                <property name="draw_indicator">True</property>
-              </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="right_attach">3</property>
-                <property name="top_attach">8</property>
-                <property name="bottom_attach">9</property>
-                <property name="x_options">GTK_FILL</property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkCheckButton" id="retain_comments_button">
-                <property name="label" translatable="yes">Retain output range co_mments</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_action_appearance">False</property>
-                <property name="use_underline">True</property>
-                <property name="draw_indicator">True</property>
-              </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="right_attach">3</property>
-                <property name="top_attach">9</property>
-                <property name="bottom_attach">10</property>
-                <property name="x_options">GTK_FILL</property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkComboBox" id="put_menu">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="model">model1</property>
-                <child>
-                  <object class="GtkCellRendererText" id="renderer1"/>
-                  <attributes>
-                    <attribute name="text">0</attribute>
-                  </attributes>
-                </child>
-              </object>
-              <packing>
-                <property name="left_attach">2</property>
-                <property name="right_attach">3</property>
-                <property name="top_attach">10</property>
-                <property name="bottom_attach">11</property>
-                <property name="x_options">GTK_FILL</property>
-                <property name="y_options">GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkLabel" id="label5">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">_Enter into cells:</property>
-                <property name="use_underline">True</property>
-                <property name="justify">center</property>
-                <property name="mnemonic_widget">put_menu</property>
-              </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="right_attach">2</property>
-                <property name="top_attach">10</property>
-                <property name="bottom_attach">11</property>
-                <property name="x_options">GTK_FILL</property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkRadioButton" id="inplace-button">
-                <property name="label" translatable="yes">Filter _in-place</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_action_appearance">False</property>
-                <property name="use_underline">True</property>
-                <property name="draw_indicator">True</property>
-                <property name="group">newsheet-button</property>
-              </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="right_attach">2</property>
-                <property name="top_attach">4</property>
-                <property name="bottom_attach">5</property>
-                <property name="x_options">GTK_FILL</property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkLabel" id="label7">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">&lt;b&gt;Output Placement&lt;/b&gt;</property>
-                <property name="use_markup">True</property>
-              </object>
-              <packing>
-                <property name="right_attach">3</property>
-                <property name="x_options">GTK_FILL</property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkLabel" id="label6">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="xalign">0</property>
-                <property name="label" translatable="yes">&lt;b&gt;Output Formatting&lt;/b&gt;</property>
-                <property name="use_markup">True</property>
-              </object>
-              <packing>
-                <property name="right_attach">3</property>
-                <property name="top_attach">5</property>
-                <property name="bottom_attach">6</property>
-                <property name="x_options">GTK_FILL</property>
-                <property name="y_options"></property>
-              </packing>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">True</property>
-            <property name="fill">True</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
-      </object>
-    </child>
-  </object>
   <object class="GtkListStore" id="model1">
     <columns>
       <!-- column-name gchararray -->
@@ -308,4 +15,248 @@
       </row>
     </data>
   </object>
+  <object class="GtkGrid" id="output-grid">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="hexpand">True</property>
+    <property name="border_width">12</property>
+    <property name="row_spacing">6</property>
+    <property name="column_spacing">12</property>
+    <child>
+      <object class="GtkLabel" id="label7">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="xalign">0</property>
+        <property name="label" translatable="yes">&lt;b&gt;Output Placement&lt;/b&gt;</property>
+        <property name="use_markup">True</property>
+      </object>
+      <packing>
+        <property name="left_attach">0</property>
+        <property name="top_attach">0</property>
+        <property name="width">2</property>
+        <property name="height">1</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkRadioButton" id="newsheet-button">
+        <property name="label" translatable="yes">New _sheet</property>
+        <property name="use_action_appearance">False</property>
+        <property name="visible">True</property>
+        <property name="can_focus">True</property>
+        <property name="receives_default">False</property>
+        <property name="margin_left">12</property>
+        <property name="use_action_appearance">False</property>
+        <property name="use_underline">True</property>
+        <property name="xalign">0</property>
+        <property name="active">True</property>
+        <property name="draw_indicator">True</property>
+      </object>
+      <packing>
+        <property name="left_attach">0</property>
+        <property name="top_attach">1</property>
+        <property name="width">2</property>
+        <property name="height">1</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkRadioButton" id="newworkbook-button">
+        <property name="label" translatable="yes">New _workbook</property>
+        <property name="use_action_appearance">False</property>
+        <property name="visible">True</property>
+        <property name="can_focus">True</property>
+        <property name="receives_default">False</property>
+        <property name="margin_left">12</property>
+        <property name="use_action_appearance">False</property>
+        <property name="use_underline">True</property>
+        <property name="xalign">0</property>
+        <property name="draw_indicator">True</property>
+        <property name="group">newsheet-button</property>
+      </object>
+      <packing>
+        <property name="left_attach">0</property>
+        <property name="top_attach">2</property>
+        <property name="width">2</property>
+        <property name="height">1</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkRadioButton" id="outputrange-button">
+        <property name="label" translatable="yes">Output _range:</property>
+        <property name="use_action_appearance">False</property>
+        <property name="visible">True</property>
+        <property name="can_focus">True</property>
+        <property name="receives_default">False</property>
+        <property name="margin_left">12</property>
+        <property name="use_action_appearance">False</property>
+        <property name="use_underline">True</property>
+        <property name="xalign">0</property>
+        <property name="draw_indicator">True</property>
+        <property name="group">newsheet-button</property>
+      </object>
+      <packing>
+        <property name="left_attach">0</property>
+        <property name="top_attach">3</property>
+        <property name="width">1</property>
+        <property name="height">1</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkRadioButton" id="inplace-button">
+        <property name="label" translatable="yes">Filter _in-place</property>
+        <property name="use_action_appearance">False</property>
+        <property name="visible">True</property>
+        <property name="can_focus">True</property>
+        <property name="receives_default">False</property>
+        <property name="margin_left">12</property>
+        <property name="use_action_appearance">False</property>
+        <property name="use_underline">True</property>
+        <property name="xalign">0</property>
+        <property name="draw_indicator">True</property>
+        <property name="group">newsheet-button</property>
+      </object>
+      <packing>
+        <property name="left_attach">0</property>
+        <property name="top_attach">4</property>
+        <property name="width">2</property>
+        <property name="height">1</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkLabel" id="label6">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="xalign">0</property>
+        <property name="label" translatable="yes">&lt;b&gt;Output Formatting&lt;/b&gt;</property>
+        <property name="use_markup">True</property>
+      </object>
+      <packing>
+        <property name="left_attach">0</property>
+        <property name="top_attach">5</property>
+        <property name="width">2</property>
+        <property name="height">1</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkCheckButton" id="autofit_button">
+        <property name="label" translatable="yes">A_utofit columns</property>
+        <property name="use_action_appearance">False</property>
+        <property name="visible">True</property>
+        <property name="can_focus">True</property>
+        <property name="receives_default">False</property>
+        <property name="margin_left">12</property>
+        <property name="use_action_appearance">False</property>
+        <property name="use_underline">True</property>
+        <property name="xalign">0</property>
+        <property name="active">True</property>
+        <property name="draw_indicator">True</property>
+      </object>
+      <packing>
+        <property name="left_attach">0</property>
+        <property name="top_attach">6</property>
+        <property name="width">2</property>
+        <property name="height">1</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkCheckButton" id="clear_outputrange_button">
+        <property name="label" translatable="yes">C_lear output range</property>
+        <property name="use_action_appearance">False</property>
+        <property name="visible">True</property>
+        <property name="can_focus">True</property>
+        <property name="receives_default">False</property>
+        <property name="margin_left">12</property>
+        <property name="use_action_appearance">False</property>
+        <property name="use_underline">True</property>
+        <property name="xalign">0</property>
+        <property name="active">True</property>
+        <property name="draw_indicator">True</property>
+      </object>
+      <packing>
+        <property name="left_attach">0</property>
+        <property name="top_attach">7</property>
+        <property name="width">2</property>
+        <property name="height">1</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkCheckButton" id="retain_format_button">
+        <property name="label" translatable="yes">Retain output range _formatting</property>
+        <property name="use_action_appearance">False</property>
+        <property name="visible">True</property>
+        <property name="can_focus">True</property>
+        <property name="receives_default">False</property>
+        <property name="margin_left">12</property>
+        <property name="use_action_appearance">False</property>
+        <property name="use_underline">True</property>
+        <property name="xalign">0</property>
+        <property name="draw_indicator">True</property>
+      </object>
+      <packing>
+        <property name="left_attach">0</property>
+        <property name="top_attach">8</property>
+        <property name="width">2</property>
+        <property name="height">1</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkCheckButton" id="retain_comments_button">
+        <property name="label" translatable="yes">Retain output range co_mments</property>
+        <property name="use_action_appearance">False</property>
+        <property name="visible">True</property>
+        <property name="can_focus">True</property>
+        <property name="receives_default">False</property>
+        <property name="margin_left">12</property>
+        <property name="use_action_appearance">False</property>
+        <property name="use_underline">True</property>
+        <property name="xalign">0</property>
+        <property name="draw_indicator">True</property>
+      </object>
+      <packing>
+        <property name="left_attach">0</property>
+        <property name="top_attach">9</property>
+        <property name="width">2</property>
+        <property name="height">1</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkLabel" id="label5">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="margin_left">12</property>
+        <property name="xalign">0</property>
+        <property name="label" translatable="yes">_Enter into cells:</property>
+        <property name="use_underline">True</property>
+        <property name="justify">center</property>
+        <property name="mnemonic_widget">put_menu</property>
+      </object>
+      <packing>
+        <property name="left_attach">0</property>
+        <property name="top_attach">10</property>
+        <property name="width">1</property>
+        <property name="height">1</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkComboBox" id="put_menu">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="model">model1</property>
+        <child>
+          <object class="GtkCellRendererText" id="renderer1"/>
+          <attributes>
+            <attribute name="text">0</attribute>
+          </attributes>
+        </child>
+      </object>
+      <packing>
+        <property name="left_attach">1</property>
+        <property name="top_attach">10</property>
+        <property name="width">1</property>
+        <property name="height">1</property>
+      </packing>
+    </child>
+    <child>
+      <placeholder/>
+    </child>
+  </object>
 </interface>
diff --git a/src/dialogs/data-table.ui b/src/dialogs/data-table.ui
index 788f920..6ef5b34 100644
--- a/src/dialogs/data-table.ui
+++ b/src/dialogs/data-table.ui
@@ -19,6 +19,7 @@
             <child>
               <object class="GtkButton" id="help">
                 <property name="label">gtk-help</property>
+                <property name="use_action_appearance">False</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
@@ -35,6 +36,7 @@
             <child>
               <object class="GtkButton" id="cancel">
                 <property name="label">gtk-cancel</property>
+                <property name="use_action_appearance">False</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
@@ -51,6 +53,7 @@
             <child>
               <object class="GtkButton" id="ok">
                 <property name="label">gtk-ok</property>
+                <property name="use_action_appearance">False</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
@@ -73,14 +76,18 @@
           </packing>
         </child>
         <child>
-          <object class="GtkTable" id="table">
+          <object class="GtkGrid" id="table-grid">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
             <property name="border_width">12</property>
-            <property name="n_rows">2</property>
-            <property name="n_columns">2</property>
+            <property name="row_spacing">6</property>
             <property name="column_spacing">12</property>
-            <property name="row_spacing">12</property>
+            <child>
+              <placeholder/>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
             <child>
               <object class="GtkLabel" id="row-label">
                 <property name="visible">True</property>
@@ -90,8 +97,10 @@
                 <property name="use_underline">True</property>
               </object>
               <packing>
-                <property name="x_options">GTK_FILL</property>
-                <property name="y_options"></property>
+                <property name="left_attach">0</property>
+                <property name="top_attach">0</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
               </packing>
             </child>
             <child>
@@ -103,18 +112,12 @@
                 <property name="use_underline">True</property>
               </object>
               <packing>
+                <property name="left_attach">0</property>
                 <property name="top_attach">1</property>
-                <property name="bottom_attach">2</property>
-                <property name="x_options">GTK_FILL</property>
-                <property name="y_options"></property>
+                <property name="width">1</property>
+                <property name="height">1</property>
               </packing>
             </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
           </object>
           <packing>
             <property name="expand">False</property>
diff --git a/src/dialogs/delete-cells.ui b/src/dialogs/delete-cells.ui
index bed199c..c8aaeb8 100644
--- a/src/dialogs/delete-cells.ui
+++ b/src/dialogs/delete-cells.ui
@@ -21,6 +21,7 @@
             <child>
               <object class="GtkButton" id="helpbutton">
                 <property name="label">gtk-help</property>
+                <property name="use_action_appearance">False</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
@@ -37,6 +38,7 @@
             <child>
               <object class="GtkButton" id="cancelbutton">
                 <property name="label">gtk-cancel</property>
+                <property name="use_action_appearance">False</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
@@ -53,6 +55,7 @@
             <child>
               <object class="GtkButton" id="okbutton">
                 <property name="label">gtk-ok</property>
+                <property name="use_action_appearance">False</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
@@ -76,127 +79,109 @@
           </packing>
         </child>
         <child>
-          <object class="GtkAlignment" id="alignment1">
+          <object class="GtkGrid" id="delete-cells-grid">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
-            <property name="xscale">0</property>
+            <property name="border_width">12</property>
+            <property name="row_spacing">6</property>
             <child>
-              <object class="GtkTable" id="table1">
+              <object class="GtkLabel" id="label1">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="border_width">6</property>
-                <property name="n_rows">5</property>
-                <property name="n_columns">2</property>
-                <property name="column_spacing">6</property>
-                <property name="row_spacing">6</property>
-                <child>
-                  <object class="GtkRadioButton" id="radio_0">
-                    <property name="label" translatable="yes">Shift cells _left</property>
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="has_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="use_action_appearance">False</property>
-                    <property name="use_underline">True</property>
-                    <property name="draw_indicator">True</property>
-                  </object>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">2</property>
-                    <property name="x_options">GTK_FILL</property>
-                    <property name="y_options"></property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkRadioButton" id="radio_1">
-                    <property name="label" translatable="yes">Shift cells _up</property>
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="use_action_appearance">False</property>
-                    <property name="use_underline">True</property>
-                    <property name="draw_indicator">True</property>
-                    <property name="group">radio_0</property>
-                  </object>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="top_attach">2</property>
-                    <property name="bottom_attach">3</property>
-                    <property name="x_options">GTK_FILL</property>
-                    <property name="y_options"></property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkRadioButton" id="radio_2">
-                    <property name="label" translatable="yes">Delete _row(s)</property>
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="use_action_appearance">False</property>
-                    <property name="use_underline">True</property>
-                    <property name="draw_indicator">True</property>
-                    <property name="group">radio_0</property>
-                  </object>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="top_attach">3</property>
-                    <property name="bottom_attach">4</property>
-                    <property name="x_options">GTK_FILL</property>
-                    <property name="y_options"></property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkRadioButton" id="radio_3">
-                    <property name="label" translatable="yes">Delete _column(s)</property>
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">False</property>
-                    <property name="use_action_appearance">False</property>
-                    <property name="use_underline">True</property>
-                    <property name="draw_indicator">True</property>
-                    <property name="group">radio_0</property>
-                  </object>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="top_attach">4</property>
-                    <property name="bottom_attach">5</property>
-                    <property name="x_options">GTK_FILL</property>
-                    <property name="y_options"></property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkLabel" id="label1">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="xalign">0</property>
-                    <property name="label" translatable="yes">&lt;span weight="bold"&gt;Delete Method&lt;/span&gt;</property>
-                    <property name="use_markup">True</property>
-                  </object>
-                  <packing>
-                    <property name="right_attach">2</property>
-                    <property name="x_options">GTK_FILL</property>
-                    <property name="y_options"></property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkLabel" id="label2">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="xalign">0</property>
-                  </object>
-                  <packing>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">5</property>
-                    <property name="x_options"></property>
-                    <property name="y_options"></property>
-                  </packing>
-                </child>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">&lt;span weight="bold"&gt;Delete Method&lt;/span&gt;</property>
+                <property name="use_markup">True</property>
+              </object>
+              <packing>
+                <property name="left_attach">0</property>
+                <property name="top_attach">0</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkRadioButton" id="radio_0">
+                <property name="label" translatable="yes">Shift cells _left</property>
+                <property name="use_action_appearance">False</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="margin_left">12</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_underline">True</property>
+                <property name="xalign">0</property>
+                <property name="active">True</property>
+                <property name="draw_indicator">True</property>
+              </object>
+              <packing>
+                <property name="left_attach">0</property>
+                <property name="top_attach">1</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkRadioButton" id="radio_1">
+                <property name="label" translatable="yes">Shift cells _up</property>
+                <property name="use_action_appearance">False</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="margin_left">12</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_underline">True</property>
+                <property name="xalign">0</property>
+                <property name="draw_indicator">True</property>
+                <property name="group">radio_0</property>
               </object>
+              <packing>
+                <property name="left_attach">0</property>
+                <property name="top_attach">2</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkRadioButton" id="radio_2">
+                <property name="label" translatable="yes">Delete _row(s)</property>
+                <property name="use_action_appearance">False</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="margin_left">12</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_underline">True</property>
+                <property name="xalign">0</property>
+                <property name="draw_indicator">True</property>
+                <property name="group">radio_0</property>
+              </object>
+              <packing>
+                <property name="left_attach">0</property>
+                <property name="top_attach">3</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkRadioButton" id="radio_3">
+                <property name="label" translatable="yes">Delete _column(s)</property>
+                <property name="use_action_appearance">False</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="margin_left">12</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_underline">True</property>
+                <property name="xalign">0</property>
+                <property name="draw_indicator">True</property>
+                <property name="group">radio_0</property>
+              </object>
+              <packing>
+                <property name="left_attach">0</property>
+                <property name="top_attach">4</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
             </child>
           </object>
           <packing>
diff --git a/src/dialogs/dialog-cell-sort.c b/src/dialogs/dialog-cell-sort.c
index e1b5a69..7867955 100644
--- a/src/dialogs/dialog-cell-sort.c
+++ b/src/dialogs/dialog-cell-sort.c
@@ -951,23 +951,22 @@ cb_toggled_case_sensitive (GtkCellRendererToggle *cell,
 static void
 dialog_init (SortFlowState *state)
 {
-	GtkTable *table;
+	GtkGrid *grid;
 	GtkWidget *scrolled;
 	GtkTreeViewColumn *column;
 	GtkCellRenderer *renderer;
 	gboolean col_rb;
 	GnmRange const *range;
 
-	table = GTK_TABLE (go_gtk_builder_get_widget (state->gui, "cell_sort_options_table"));
+	grid = GTK_GRID (go_gtk_builder_get_widget (state->gui, "cell-sort-grid"));
 	/* setup range entry */
 	state->range_entry = gnm_expr_entry_new (state->wbcg, TRUE);
 	gnm_expr_entry_set_flags (state->range_entry,
 				  GNM_EE_SINGLE_RANGE,
 				  GNM_EE_MASK);
-	gtk_table_attach (table, GTK_WIDGET (state->range_entry),
-			  2, 3, 1, 2,
-			  GTK_EXPAND | GTK_FILL, 0,
-			  0, 0);
+	gtk_widget_set_hexpand (GTK_WIDGET (state->range_entry), TRUE);
+	gtk_grid_attach (grid, GTK_WIDGET (state->range_entry),
+			  1, 1, 2, 1);
 	gnumeric_editable_enters (GTK_WINDOW (state->dialog),
 				  GTK_WIDGET (state->range_entry));
 	gnm_expr_entry_set_update_policy (state->range_entry, GNM_UPDATE_DISCONTINUOUS);
@@ -977,22 +976,20 @@ dialog_init (SortFlowState *state)
 				  G_CALLBACK (cb_update_to_new_range), state);
 
 	state->locale_selector = GO_LOCALE_SEL (go_locale_sel_new ());
+	gtk_widget_set_hexpand (GTK_WIDGET (state->locale_selector), TRUE);
 	gtk_widget_show_all (GTK_WIDGET (state->locale_selector));
-	gtk_table_attach (table, GTK_WIDGET (state->locale_selector),
-			  2, 3, 5, 6,
-			  GTK_EXPAND | GTK_FILL, 0,
-			  0, 0);
+	gtk_grid_attach (grid, GTK_WIDGET (state->locale_selector),
+			  1, 5, 2, 1);
 
-	table = GTK_TABLE (go_gtk_builder_get_widget (state->gui, "cell_sort_spec_table"));
+	grid = GTK_GRID (go_gtk_builder_get_widget (state->gui, "cell-sort-spec-grid"));
 	/* setup add entry */
 	state->add_entry = gnm_expr_entry_new (state->wbcg, TRUE);
 	gnm_expr_entry_set_flags (state->add_entry,
 				  GNM_EE_SINGLE_RANGE,
 				  GNM_EE_MASK);
-	gtk_table_attach (table, GTK_WIDGET (state->add_entry),
-			  1, 2, 2, 3,
-			  GTK_EXPAND | GTK_FILL, 0,
-			  0, 0);
+	gtk_widget_set_hexpand (GTK_WIDGET (state->add_entry), TRUE);
+	gtk_grid_attach (grid, GTK_WIDGET (state->add_entry),
+			  0, 5, 1, 1);
 	gnumeric_editable_enters (GTK_WINDOW (state->dialog),
 				  GTK_WIDGET (state->add_entry));
 	gtk_widget_show (GTK_WIDGET (state->add_entry));
@@ -1013,7 +1010,7 @@ dialog_init (SortFlowState *state)
 				  G_CALLBACK (cb_sort_selection_changed), state);
 
 	state->header_column = gtk_tree_view_column_new_with_attributes (_("Header"),
-									 gtk_cell_renderer_text_new (),
+								 gtk_cell_renderer_text_new (),
 									 "text", ITEM_HEADER, NULL);
 	gtk_tree_view_append_column (state->treeview, state->header_column);
 
diff --git a/src/dialogs/dialog-data-table.c b/src/dialogs/dialog-data-table.c
index 90321d1..72acf3f 100644
--- a/src/dialogs/dialog-data-table.c
+++ b/src/dialogs/dialog-data-table.c
@@ -63,16 +63,15 @@ static GnmExprEntry *
 init_entry (GnmDialogDataTable *state, int row)
 {
 	GnmExprEntry *gee = gnm_expr_entry_new (state->wbcg, TRUE);
-	GtkWidget *table = go_gtk_builder_get_widget (state->gui, "table");
+	GtkWidget *grid = go_gtk_builder_get_widget (state->gui, "table-grid");
 
-	g_return_val_if_fail (table != NULL, NULL);
+	g_return_val_if_fail (grid != NULL, NULL);
 
 	gnm_expr_entry_set_flags (gee,
 		GNM_EE_SINGLE_RANGE | GNM_EE_SHEET_OPTIONAL | GNM_EE_FORCE_REL_REF,
 		GNM_EE_MASK);
 	g_object_set (G_OBJECT (gee), "with-icon", TRUE, NULL);
-	gtk_table_attach (GTK_TABLE (table), GTK_WIDGET (gee), 1, 2,
-	                  row, row + 1, GTK_FILL, GTK_FILL, 0, 0);
+	gtk_grid_attach (GTK_GRID (grid), GTK_WIDGET (gee), 1, row, 1, 1);
 	return gee;
 }
 
@@ -92,14 +91,11 @@ cb_data_table_response (GtkWidget *dialog, gint response_id, GnmDialogDataTable
 static gboolean
 data_table_init (GnmDialogDataTable *state, WBCGtk *wbcg)
 {
-	GtkTable *table;
-
 	state->gui = gnm_gtk_builder_new ("data-table.ui", NULL, GO_CMD_CONTEXT (wbcg));
         if (state->gui == NULL)
                 return TRUE;
 
 	state->dialog = go_gtk_builder_get_widget (state->gui, "DataTable");
-	table = GTK_TABLE (go_gtk_builder_get_widget (state->gui, "table"));
 
 	state->row_entry = init_entry (state, 0);
 	state->col_entry = init_entry (state, 1);
diff --git a/src/sheet-object-image.c b/src/sheet-object-image.c
index 5466631..a7c8aba 100644
--- a/src/sheet-object-image.c
+++ b/src/sheet-object-image.c
@@ -541,7 +541,7 @@ gnm_soi_assign_to_sheet (SheetObject *so, Sheet *sheet)
 		GOImage *image = go_doc_add_image (doc, NULL, soi->image);
 		if (soi->image != image) {
 			g_object_unref (soi->image);
-			soi->image = image;
+			soi->image = g_object_ref (image);
 		}
 	} else if (soi->name) {
 		GODoc *doc = GO_DOC (sheet->workbook);
diff --git a/src/widgets/ChangeLog b/src/widgets/ChangeLog
index b292604..1cfb527 100644
--- a/src/widgets/ChangeLog
+++ b/src/widgets/ChangeLog
@@ -1,3 +1,7 @@
+2011-12-27  Jean Brefort  <jean brefort normalesup org>
+
+	* gnm-dao.c (gnm_dao_init), (gnm_dao_new): don't use GtkTable anymore.
+
 2011-11-30  Andreas J. Guelzow <aguelzow pyrshep ca>
 
 	* gnumeric-expr-entry.c (cb_icon_clicked): use G_VALUE_INIT;
diff --git a/src/widgets/gnm-dao.c b/src/widgets/gnm-dao.c
index d6980f2..4636cea 100644
--- a/src/widgets/gnm-dao.c
+++ b/src/widgets/gnm-dao.c
@@ -69,13 +69,12 @@ static void
 gnm_dao_init (GnmDao *gdao)
 {
 	GtkWidget *toplevel;
-	GtkWidget *old_parent;
 
 	gdao->gui = gnm_gtk_builder_new ("dao.ui", NULL, NULL);
 	if (gdao->gui == NULL)
 		return;
 
-	toplevel = go_gtk_builder_get_widget (gdao->gui, "dao_box");
+	toplevel = go_gtk_builder_get_widget (gdao->gui, "output-grid");
 
 	gdao->new_sheet  = go_gtk_builder_get_widget (gdao->gui,
 						 "newsheet-button");
@@ -98,10 +97,8 @@ gnm_dao_init (GnmDao *gdao)
 	gdao->output_entry = NULL;
 	gdao->wbcg = NULL;
 
-	old_parent = gtk_widget_get_toplevel (toplevel);
-	gtk_widget_reparent (toplevel, GTK_WIDGET (gdao));
-	gtk_widget_destroy (old_parent);
-	gtk_widget_queue_resize (toplevel);
+	gtk_container_add (GTK_CONTAINER (gdao), toplevel);
+//	gtk_widget_queue_resize (toplevel);
 }
 
 static void
@@ -232,20 +229,19 @@ GtkWidget *
 gnm_dao_new (WBCGtk *wbcg, gchar *inplace_str)
 {
 	GnmDao *gdao = GNM_DAO (g_object_new (GNM_DAO_TYPE, NULL));
-	GtkTable *table;
+	GtkGrid *grid;
 
 	g_return_val_if_fail (wbcg != NULL, NULL);
 	gdao->wbcg = wbcg;
 
 	/* Create the output range expression entry */
-	table = GTK_TABLE (go_gtk_builder_get_widget (gdao->gui, "output-table"));
+	grid = GTK_GRID (go_gtk_builder_get_widget (gdao->gui, "output-grid"));
 	gdao->output_entry = gnm_expr_entry_new (wbcg, TRUE);
 	gnm_expr_entry_set_flags (gdao->output_entry,
 				  GNM_EE_SINGLE_RANGE, GNM_EE_MASK);
-	gtk_table_attach (table, GTK_WIDGET (gdao->output_entry),
-			  2, 3, 3, 4,
-			  GTK_EXPAND | GTK_FILL, 0,
-			  0, 0);
+	gtk_widget_set_hexpand (GTK_WIDGET (gdao->output_entry), TRUE);
+	gtk_grid_attach (grid, GTK_WIDGET (gdao->output_entry),
+			  1, 3, 1, 1);
 	go_atk_setup_label (gdao->output_range,
 			     GTK_WIDGET (gdao->output_entry));
 	gtk_widget_show (GTK_WIDGET (gdao->output_entry));



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]