Commit 4003af68 authored by Jean Bréfort's avatar Jean Bréfort

Still more GtkGrid instead of GtkTable.

parent 61949fd7
2013-02-28 Jean Brefort <jean.brefort@normalesup.org>
* dialog-hyperlink.c (dhl_init): GtkTable to GtkGrid.
* dialog-merge.c (dialog_merge): ditto.
* dialog-plugin-manager.c (dialog_plugin_manager): ditto.
* hyperlink.ui: ditto.
* insert-cells.ui: ditto.
* mean-tests.ui: ditto.
* merge.ui: ditto.
* paste-special.ui: ditto.
* plugin-manager.ui: ditto.
2013-02-27 Jean Brefort <jean.brefort@normalesup.org>
* dialog-goto-cell.c (dialog_goto_init): GtkTable to GtkGrid.
......
......@@ -304,23 +304,23 @@ static struct {
char * (*get_target) (HyperlinkState *state, gboolean *success);
} const type [] = {
{ N_("Internal Link"), "Gnumeric_Link_Internal",
"GnmHLinkCurWB", "internal-link-box",
"GnmHLinkCurWB", "internal-link-grid",
N_("Jump to specific cells or named range in the current workbook"),
dhl_set_target_cur_wb,
dhl_get_target_cur_wb },
{ N_("External Link"), "Gnumeric_Link_External",
"GnmHLinkExternal", "external-link-box" ,
"GnmHLinkExternal", "external-link-grid" ,
N_("Open an external file with the specified name"),
dhl_set_target_external,
dhl_get_target_external },
{ N_("Email Link"), "Gnumeric_Link_EMail",
"GnmHLinkEMail", "email-box" ,
"GnmHLinkEMail", "email-grid" ,
N_("Prepare an email"),
dhl_set_target_email,
dhl_get_target_email },
{ N_("Web Link"), "Gnumeric_Link_URL",
"GnmHLinkURL", "url-box" ,
"GnmHLinkURL", "url-grid" ,
N_("Browse to the specified URL"),
dhl_set_target_url,
dhl_get_target_url }
......@@ -482,7 +482,7 @@ dhl_init (HyperlinkState *state)
GtkCellRenderer *renderer;
#ifdef GNM_NO_MAILTO
gtk_widget_hide (go_gtk_builder_get_widget (state->gui, "email-box"));
gtk_widget_hide (go_gtk_builder_get_widget (state->gui, "email-grid"));
#endif
size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
for (i = 0 ; i < G_N_ELEMENTS (label); i++)
......@@ -495,9 +495,10 @@ dhl_init (HyperlinkState *state)
w = go_gtk_builder_get_widget (state->gui, "link-type-descriptor");
state->type_descriptor = GTK_LABEL (w);
w = go_gtk_builder_get_widget (state->gui, "internal-link-box");
w = go_gtk_builder_get_widget (state->gui, "internal-link-grid");
expr_entry = gnm_expr_entry_new (state->wbcg, TRUE);
gtk_box_pack_end (GTK_BOX (w), GTK_WIDGET (expr_entry), TRUE, TRUE, 0);
gtk_widget_set_hexpand (GTK_WIDGET (expr_entry), TRUE);
gtk_container_add (GTK_CONTAINER (w), GTK_WIDGET (expr_entry));
gtk_entry_set_activates_default
(gnm_expr_entry_get_entry (expr_entry), TRUE);
state->internal_link_ee = expr_entry;
......
......@@ -312,7 +312,7 @@ dialog_merge (WBCGtk *wbcg)
{
MergeState *state;
GtkBuilder *gui;
GtkTable *table;
GtkGrid *grid;
GtkWidget *scrolled;
GtkTreeViewColumn *column;
GtkTreeSelection *selection;
......@@ -344,17 +344,15 @@ dialog_merge (WBCGtk *wbcg)
gtk_button_set_alignment (GTK_BUTTON (state->delete_btn), 0., .5);
gtk_button_set_alignment (GTK_BUTTON (state->change_btn), 0., .5);
table = GTK_TABLE (go_gtk_builder_get_widget (gui, "main_table"));
grid = GTK_GRID (go_gtk_builder_get_widget (gui, "main-grid"));
state->zone = gnm_expr_entry_new (wbcg, TRUE);
gnm_expr_entry_set_flags (state->zone, GNM_EE_SINGLE_RANGE, GNM_EE_MASK);
gnumeric_editable_enters (GTK_WINDOW (state->dialog),
GTK_WIDGET (state->zone));
gtk_label_set_mnemonic_widget (GTK_LABEL (go_gtk_builder_get_widget (gui, "var1-label")),
GTK_WIDGET (state->zone));
gtk_table_attach (table, GTK_WIDGET (state->zone),
1, 3, 0, 1,
GTK_EXPAND | GTK_FILL, 0,
0, 0);
gtk_widget_set_hexpand (GTK_WIDGET (state->zone), TRUE);
gtk_grid_attach (grid, GTK_WIDGET (state->zone), 1, 0, 2, 1);
r = selection_first_range (
wb_control_cur_sheet_view (WORKBOOK_CONTROL (wbcg)), NULL, NULL);
if (r != NULL)
......@@ -363,17 +361,13 @@ dialog_merge (WBCGtk *wbcg)
state->data = gnm_expr_entry_new (wbcg, TRUE);
gnm_expr_entry_set_flags (state->data, GNM_EE_SINGLE_RANGE, GNM_EE_MASK);
gtk_table_attach (table, GTK_WIDGET (state->data),
0, 1, 8, 9,
GTK_EXPAND | GTK_FILL, 0,
0, 0);
gtk_widget_set_hexpand (GTK_WIDGET (state->data), TRUE);
gtk_grid_attach (grid, GTK_WIDGET (state->data), 0, 5, 1, 1);
state->field = gnm_expr_entry_new (wbcg, TRUE);
gnm_expr_entry_set_flags (state->field, GNM_EE_SINGLE_RANGE, GNM_EE_MASK);
gtk_table_attach (table, GTK_WIDGET (state->field),
1, 2, 8, 9,
GTK_EXPAND | GTK_FILL, 0,
0, 0);
gtk_widget_set_hexpand (GTK_WIDGET (state->field), TRUE);
gtk_grid_attach (grid, GTK_WIDGET (state->field), 1, 5, 1, 1);
scrolled = go_gtk_builder_get_widget (state->gui, "scrolled");
state->model = gtk_list_store_new (NUM_COLMNS, G_TYPE_STRING, G_TYPE_STRING);
......
......@@ -728,7 +728,7 @@ dialog_plugin_manager (WBCGtk *wbcg)
gtk_container_add (GTK_CONTAINER (scrolled), GTK_WIDGET (pm_gui->view_details));
pm_gui->frame_mark_for_deactivation =
go_gtk_builder_get_widget (gui, "frame_mark_for_deactivation");
go_gtk_builder_get_widget (gui, "mark-for-deactivation-grid");
pm_gui->checkbutton_mark_for_deactivation =
go_gtk_builder_get_widget (gui, "checkbutton_mark_for_deactivation");
......
This diff is collapsed.
......@@ -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,130 +79,139 @@
</packing>
</child>
<child>
<object class="GtkAlignment" id="alignment1">
<object class="GtkGrid" id="insert-cells-grid">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xscale">0</property>
<property name="row_spacing">6</property>
<property name="column_spacing">12</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="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;Insert 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="GtkRadioButton" id="radio_0">
<property name="label" translatable="yes">_Shift cells right</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 _down</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">Insert _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="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">4</property>
<property name="x_options"></property>
<property name="y_options"></property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="radio_3">
<property name="label" translatable="yes">_Insert 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>
<placeholder/>
</child>
<property name="xalign">0</property>
<property name="label" translatable="yes">&lt;span weight="bold"&gt;Insert 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 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="margin_left">18</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 _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="margin_left">18</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">Insert _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">18</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">_Insert 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">18</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>
<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>
......
......@@ -103,24 +103,6 @@
<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>
<object class="GtkLabel" id="var2-label">
<property name="visible">True</property>
......@@ -436,21 +418,6 @@
<property name="border_width">12</property>
<property name="row_spacing">6</property>
<property name="column_spacing">12</property>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<object class="GtkLabel" id="label6">
<property name="visible">True</property>
......@@ -575,25 +542,4 @@
<action-widget response="0">okbutton</action-widget>
</action-widgets>
</object>
<object class="GtkTable" id="table3">
<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="column_spacing">12</property>
<property name="row_spacing">6</property>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object>
</interface>
......@@ -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="merge_button">
<property name="label" translatable="yes">_Merge</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>
......@@ -75,78 +78,77 @@
</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">8</property>
<property name="n_columns">3</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="GtkButton" id="add_button">
<property name="label">gtk-add</property>
<object class="GtkScrolledWindow" id="scrolled">
<property name="width_request">200</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_stock">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
</object>
<packing>
<property name="left_attach">2</property>
<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>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
<property name="width">2</property>
<property name="height">4</property>
</packing>
</child>
<child>
<object class="GtkButton" id="change_button">
<property name="label">gtk-convert</property>
<object class="GtkButton" id="remove_button">
<property name="label">gtk-remove</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="receives_default">True</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">6</property>
<property name="bottom_attach">7</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
<property name="top_attach">4</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="remove_button">
<property name="label">gtk-remove</property>
<object class="GtkButton" id="change_button">
<property name="label">gtk-convert</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="receives_default">True</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">7</property>
<property name="bottom_attach">8</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="GtkScrolledWindow" id="scrolled">
<property name="width_request">200</property>
<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="can_focus">False</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">8</property>
<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>
......@@ -161,20 +163,24 @@
<property name="justify">right</property>
</object>
<packing>
<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>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
<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">2</property>
<property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<placeholder/>
......
This diff is collapsed.
......@@ -22,6 +22,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>
......@@ -38,6 +39,7 @@
<child>
<object class="GtkButton" id="button_close_manager">
<property name="label">gtk-close</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>
......@@ -67,9 +69,9 @@
<child>
<object class="GtkBox" id="page_plugin_list">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="can_focus">False</property>
<property name="border_width">12</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkScrolledWindow" id="scrolled_plugin_list">
......@@ -111,11 +113,13 @@
<child>
<object class="GtkCheckButton" id="checkbutton_install_new">
<property name="label" translatable="yes">Activate _new plugins by default</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.5</property>
<property name="draw_indicator">True</property>
</object>
<packing>
......@@ -138,6 +142,7 @@
<child>
<object class="GtkButton" id="button_activate_all">
<property name="label" translatable="yes">_Activate All</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
......@@ -171,120 +176,141 @@
</packing>
</child>
<child>
<object class="GtkBox" id="page_plugin_details">
<object class="GtkGrid" id="details-grid">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="can_focus">False</property>
<property name="vexpand">True</property>
<property name="border_width">12</property>
<property name="spacing">6</property>
<property name="row_spacing">6</property>
<property name="column_spacing">12</property>
<child>
<object class="GtkTable" id="table1">
<object class="GtkLabel" id="label_directory">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="n_columns">2</property>