Commit c8a627b0 authored by Jean Bréfort's avatar Jean Bréfort

More GtkTable to GtkGrid replacements.

parent 72df2e52
2013-02-26 Jean Brefort <jean.brefort@normalesup.org>
* src/number-match.c: more introspection warnings.
2013-02-23 Morten Welinder <terra@gnome.org>
* */*.c: Avoid G_OBJECT casts for g_object_ref and g_object_unref.
......
2013-02-26 Jean Brefort <jean.brefort@normalesup.org>
* cell-format.ui: replaced GtkTable with GtkGrid.
* dialog-cell-format.c (fmt_dialog_init_font_page): ditto.
* dialog-goal-seek.c (cb_dialog_apply_clicked), (dialog_realized),
(dialog_init): ditto.
* font-sel.ui: ditto.
* formula-guru.ui: ditto.
* goalseek.ui: ditto.
2013-02-24 Jean Brefort <jean.brefort@normalesup.org>
* dialog-doc-metadata.c: replaced GtkTable with GtkGrid.
......
......@@ -506,6 +506,27 @@
<property name="height">1</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object>
</child>
<child type="tab">
......@@ -523,6 +544,7 @@
<object class="GtkGrid" id="font-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>
......@@ -632,6 +654,24 @@
<property name="height">1</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="position">1</property>
......@@ -892,6 +932,63 @@
<property name="height">1</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>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="left_attach">0</property>
......@@ -1175,6 +1272,9 @@
<property name="height">1</property>
</packing>
</child>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="position">2</property>
......@@ -1797,6 +1897,15 @@
<property name="height">1</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="position">3</property>
......@@ -2208,6 +2317,30 @@
<property name="height">1</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>
</object>
<packing>
<property name="position">5</property>
......
......@@ -832,6 +832,7 @@ fmt_dialog_init_font_page (FormatState *state)
/* TODO: How to insert the font box in the right place initially */
gtk_widget_show (tmp);
gtk_widget_set_vexpand (tmp, TRUE);
gtk_widget_set_hexpand (tmp, TRUE);
gtk_grid_attach (GTK_GRID (container), tmp, 0, 0, 5, 1);
font_selector_editable_enters (font_widget, GTK_WINDOW (state->dialog));
......
......@@ -73,7 +73,7 @@ typedef struct {
GtkWidget *current_value_label;
GtkWidget *solution_label;
GtkWidget *result_label;
GtkWidget *result_table;
GtkWidget *result_grid;
Sheet *sheet;
Workbook *wb;
WBCGtk *wbcg;
......@@ -456,7 +456,7 @@ cb_dialog_apply_clicked (G_GNUC_UNUSED GtkWidget *button,
}
state->cancelled = FALSE;
gtk_widget_show (state->result_table);
gtk_widget_show (state->result_grid);
return;
}
......@@ -472,7 +472,7 @@ static void
dialog_realized (G_GNUC_UNUSED GtkWidget *dialog,
GoalSeekState *state)
{
gtk_widget_hide (state->result_table);
gtk_widget_hide (state->result_grid);
}
/**
......@@ -505,7 +505,7 @@ dialog_preload_selection (GoalSeekState *state, GnmExprEntry *entry)
static gboolean
dialog_init (GoalSeekState *state)
{
GtkTable *table;
GtkGrid *grid;
state->dialog = go_gtk_builder_get_widget (state->gui, "GoalSeek");
if (state->dialog == NULL)
......@@ -540,18 +540,17 @@ dialog_init (GoalSeekState *state)
gtk_label_set_justify (GTK_LABEL (state->solution_label), GTK_JUSTIFY_RIGHT);
state->result_label = go_gtk_builder_get_widget (state->gui, "result-label");
state->result_table = go_gtk_builder_get_widget (state->gui, "result-table");
state->result_grid = go_gtk_builder_get_widget (state->gui, "result-grid");
table = GTK_TABLE (go_gtk_builder_get_widget (state->gui, "goal-table"));
grid = GTK_GRID (go_gtk_builder_get_widget (state->gui, "goal-grid"));
state->set_cell_entry = gnm_expr_entry_new (state->wbcg, TRUE);
gnm_expr_entry_set_flags (state->set_cell_entry,
GNM_EE_SINGLE_RANGE |
GNM_EE_FORCE_ABS_REF,
GNM_EE_MASK);
gtk_table_attach (table, GTK_WIDGET (state->set_cell_entry),
2, 3, 1, 2,
GTK_EXPAND | GTK_FILL, 0,
0, 0);
gtk_grid_attach (grid, GTK_WIDGET (state->set_cell_entry),
1, 0, 1, 1);
gtk_widget_set_hexpand (GTK_WIDGET (state->set_cell_entry), TRUE);
gnumeric_editable_enters (GTK_WINDOW (state->dialog),
GTK_WIDGET (state->set_cell_entry));
dialog_preload_selection (state, state->set_cell_entry);
......@@ -562,10 +561,9 @@ dialog_init (GoalSeekState *state)
GNM_EE_SINGLE_RANGE |
GNM_EE_FORCE_ABS_REF,
GNM_EE_MASK);
gtk_table_attach (table, GTK_WIDGET (state->change_cell_entry),
2, 3, 3, 4,
GTK_EXPAND | GTK_FILL, 0,
0, 0);
gtk_grid_attach (grid, GTK_WIDGET (state->change_cell_entry),
1, 2, 1, 1);
gtk_widget_set_hexpand (GTK_WIDGET (state->change_cell_entry), TRUE);
gnumeric_editable_enters (GTK_WINDOW (state->dialog),
GTK_WIDGET (state->change_cell_entry));
dialog_preload_selection (state, state->change_cell_entry);
......
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object class="GtkTable" id="toplevel-table">
<object class="GtkGrid" id="toplevel-grid">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="n_rows">4</property>
<property name="n_columns">3</property>
<property name="column_spacing">4</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="row_spacing">4</property>
<child>
<object class="GtkEntry" id="font-style-entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">False</property>
<property name="invisible_char"></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="y_options"></property>
</packing>
</child>
<property name="column_spacing">4</property>
<child>
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
......@@ -32,8 +17,10 @@
<property name="justify">center</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>
......@@ -46,9 +33,9 @@
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</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>
......@@ -61,9 +48,9 @@
</object>
<packing>
<property name="left_attach">2</property>
<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>
......@@ -72,30 +59,28 @@
<property name="can_focus">True</property>
<property name="editable">False</property>
<property name="invisible_char"></property>
<property name="invisible_char_set">True</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="y_options"></property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkFrame" id="font-preview-frame">
<object class="GtkEntry" id="font-style-entry">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
<child type="label">
<object class="GtkLabel" id="label4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Preview</property>
</object>
</child>
<property name="can_focus">True</property>
<property name="editable">False</property>
<property name="invisible_char"></property>
<property name="invisible_char_set">True</property>
</object>
<packing>
<property name="right_attach">3</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="left_attach">1</property>
<property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
......@@ -103,56 +88,74 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char"></property>
<property name="invisible_char_set">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"></property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow" id="scrolledwindow2">
<object class="GtkLabel" id="label4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Preview</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="GtkScrolledWindow" id="scrolledwindow1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hscrollbar_policy">never</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkTreeView" id="font-style-list">
<object class="GtkTreeView" id="font-name-list">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="vexpand">True</property>
<child internal-child="selection">
<object class="GtkTreeSelection" id="treeview-selection1"/>
<object class="GtkTreeSelection" id="treeview-selection"/>
</child>
</object>
</child>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow" id="scrolledwindow1">
<object class="GtkScrolledWindow" id="scrolledwindow2">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkTreeView" id="font-name-list">
<object class="GtkTreeView" id="font-style-list">
<property name="visible">True</property>
<property name="can_focus">True</property>
<child internal-child="selection">
<object class="GtkTreeSelection" id="treeview-selection2"/>
<object class="GtkTreeSelection" id="treeview-selection1"/>
</child>
</object>
</child>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
......@@ -166,17 +169,16 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<child internal-child="selection">
<object class="GtkTreeSelection" id="treeview-selection3"/>
<object class="GtkTreeSelection" id="treeview-selection2"/>
</child>
</object>
</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="x_options">GTK_FILL</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
</object>
......
......@@ -20,6 +20,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>
......@@ -36,6 +37,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>
......@@ -52,6 +54,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>
......@@ -74,77 +77,80 @@
</packing>
</child>
<child>
<object class="GtkTable" id="main_table">
<object class="GtkGrid" id="main-grid">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">5</property>
<property name="n_rows">5</property>
<property name="n_columns">2</property>
<property name="column_spacing">4</property>
<property name="row_spacing">4</property>
<property name="vexpand">True</property>
<property name="border_width">6</property>
<property name="row_spacing">6</property>
<property name="column_spacing">12</property>
<child>
<object class="GtkScrolledWindow" id="scrolled">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="border_width">5</property>
<property name="shadow_type">etched-in</property>
</object>
<packing>
<property name="bottom_attach">4</property>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">4</property>
</packing>
</child>
<child>
<object class="GtkButton" id="select_func">
<object class="GtkButton" id="trash">
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="receives_default">False</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
<child>
<object class="GtkImage" id="image1">
<object class="GtkImage" id="image2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">Gnumeric_FormulaGuru</property>
<property name="stock">gtk-clear</property>
<property name="icon-size">3</property>
</object>
</child>
</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_SHRINK</property>
<property name="y_options">GTK_SHRINK</property>
<property name="top_attach">3</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="trash">
<object class="GtkButton" id="select_func">
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="receives_default">False</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
<child>
<object class="GtkImage" id="image2">
<object class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-clear</property>
<property name="stock">Gnumeric_FormulaGuru</property>
<property name="icon-size">3</property>
</object>
</child>
</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_SHRINK</property>
<property name="y_options">GTK_SHRINK</property>
<property name="top_attach">2</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkToggleButton" id="zoom">
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="receives_default">False</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
<child>
<object class="GtkImage" id="image3">
......@@ -157,60 +163,75 @@
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="x_options">GTK_SHRINK</property>
<property name="y_options">GTK_SHRINK</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="vexpand">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkBox" id="hbox1">
<object class="GtkGrid" id="check-grid">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="column_spacing">12</property>
<child>
<object class="GtkCheckButton" id="array_button">
<property name="label" translatable="yes">Enter as array function</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="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="expand">True</property>
<property name="fill">True</property>
<property name="padding">2</property>
<property name="position">0</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>
<object class="GtkCheckButton" id="quote-button">
<property name="label" translatable="yes">Quote unknown names</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="use_action_appearance">False</property>
<property name="xalign">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="padding">2</property>
<property name="position">1</property>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
</object>
<packing>
<property name="right_attach">2</property>
<property name="left_attach">0</property>
<property name="top_attach">4</property>
<property name="bottom_attach">5</property>
<property name="y_options"></property>
<property name="width">2</property>
<property name="height">1</property>
</packing>
</child>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">False</property>
......
This diff is collapsed.