[gnumeric] Some more layout fixes.
- From: Jean Bréfort <jbrefort src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Some more layout fixes.
- Date: Thu, 28 Feb 2013 17:57:49 +0000 (UTC)
commit cda1540e604a821ea86bd3633aa7b5f8f0d7008d
Author: Jean Brefort <jean brefort normalesup org>
Date: Thu Feb 28 17:56:54 2013 +0100
Some more layout fixes.
src/dialogs/ChangeLog | 9 ++
src/dialogs/chi-squared.ui | 56 +++++---------
src/dialogs/dialog-random-generator.c | 24 +++---
src/dialogs/exp-smoothing.ui | 29 +-------
src/dialogs/kaplan-meier.ui | 41 +++-------
src/dialogs/random-generation.ui | 135 +++++++++++++++++++++------------
6 files changed, 137 insertions(+), 157 deletions(-)
---
diff --git a/src/dialogs/ChangeLog b/src/dialogs/ChangeLog
index 7fa2455..aaee1b7 100644
--- a/src/dialogs/ChangeLog
+++ b/src/dialogs/ChangeLog
@@ -1,5 +1,14 @@
2013-02-28 Jean Brefort <jean brefort normalesup org>
+ * chi-squared.ui: fixed layout.
+ * dialog-random-generator.c (dialog_random_realized),
+ (dialog_random_tool_init): GtkTable to GtkGrid.
+ * exp-smoothing.ui: fixed layout.
+ * kaplan-meier.ui: ditto.
+ * random-generation.ui: GtkTable to GtkGrid.
+
+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.
diff --git a/src/dialogs/chi-squared.ui b/src/dialogs/chi-squared.ui
index 343b959..731a9cc 100644
--- a/src/dialogs/chi-squared.ui
+++ b/src/dialogs/chi-squared.ui
@@ -1,6 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkAdjustment" id="adjustment1">
+ <property name="upper">1</property>
+ <property name="value">0.050000000000000003</property>
+ <property name="step_increment">0.01</property>
+ <property name="page_increment">10</property>
+ </object>
<object class="GtkDialog" id="Chi-Squared Tests">
<property name="can_focus">False</property>
<property name="border_width">5</property>
@@ -186,33 +192,6 @@
</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>
<object class="GtkCheckButton" id="labels_button">
<property name="label" translatable="yes">_Labels</property>
<property name="use_action_appearance">False</property>
@@ -231,6 +210,18 @@
<property name="height">1</property>
</packing>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</object>
</child>
<child type="tab">
@@ -299,7 +290,7 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
- <property name="width">2</property>
+ <property name="width">3</property>
<property name="height">1</property>
</packing>
</child>
@@ -352,9 +343,6 @@
<child>
<placeholder/>
</child>
- <child>
- <placeholder/>
- </child>
</object>
<packing>
<property name="expand">False</property>
@@ -429,10 +417,4 @@
<action-widget response="0">okbutton</action-widget>
</action-widgets>
</object>
- <object class="GtkAdjustment" id="adjustment1">
- <property name="upper">1</property>
- <property name="value">0.050000000000000003</property>
- <property name="step_increment">0.01</property>
- <property name="page_increment">10</property>
- </object>
</interface>
diff --git a/src/dialogs/dialog-random-generator.c b/src/dialogs/dialog-random-generator.c
index ccb77b1..c36c365 100644
--- a/src/dialogs/dialog-random-generator.c
+++ b/src/dialogs/dialog-random-generator.c
@@ -62,7 +62,7 @@
typedef struct {
GenericToolState base;
- GtkWidget *distribution_table;
+ GtkWidget *distribution_grid;
GtkWidget *distribution_combo;
GtkWidget *par1_label;
GtkWidget *par1_entry;
@@ -81,7 +81,7 @@ typedef struct {
typedef struct {
GtkWidget *dialog;
- GtkWidget *distribution_table;
+ GtkWidget *distribution_grid;
GtkWidget *distribution_combo;
GtkWidget *par1_label, *par1_entry;
GtkWidget *par2_label, *par2_entry;
@@ -491,9 +491,9 @@ distribution_callback (G_GNUC_UNUSED GtkWidget *widget,
*
* Make initial geometry of distribution table permanent.
*
- * The dialog is constructed with the distribution_table containing the widgets
+ * The dialog is constructed with the distribution_grid containing the widgets
* which need the most space. At construction time, we do not know how large
- * the distribution_table needs to be, but we do know when the dialog is
+ * the distribution_grid needs to be, but we do know when the dialog is
* realized. This callback for "realized" makes this size the user specified
* size so that the table will not shrink when we later change label texts and
* hide/show widgets.
@@ -502,7 +502,7 @@ distribution_callback (G_GNUC_UNUSED GtkWidget *widget,
static void
dialog_random_realized (GtkWidget *widget, RandomToolState *state)
{
- GtkWidget *t = state->distribution_table;
+ GtkWidget *t = state->distribution_grid;
GtkWidget *l = state->par1_label;
GtkAllocation a;
@@ -715,7 +715,7 @@ dialog_random_tool_init (RandomToolState *state)
int i, dist_str_no;
const DistributionStrs *ds;
/* GList *distribution_type_strs = NULL;*/
- GtkTable *table;
+ GtkGrid *grid;
GtkListStore *store;
GtkTreeIter iter;
GtkCellRenderer *renderer;
@@ -723,8 +723,8 @@ dialog_random_tool_init (RandomToolState *state)
state->distribution = UniformDistribution;
- state->distribution_table = go_gtk_builder_get_widget (state->base.gui,
- "distribution_table");
+ state->distribution_grid = go_gtk_builder_get_widget (state->base.gui,
+ "distribution-grid");
state->distribution_combo = go_gtk_builder_get_widget (state->base.gui,
"distribution_combo");
state->par1_entry = go_gtk_builder_get_widget (state->base.gui, "par1_entry");
@@ -766,14 +766,12 @@ dialog_random_tool_init (RandomToolState *state)
"changed",
G_CALLBACK (random_tool_update_sensitivity_cb), state);
- table = GTK_TABLE (go_gtk_builder_get_widget (state->base.gui, "distribution_table"));
+ grid = GTK_GRID (go_gtk_builder_get_widget (state->base.gui, "distribution-grid"));
state->par1_expr_entry = GTK_WIDGET (gnm_expr_entry_new (state->base.wbcg, TRUE));
gnm_expr_entry_set_flags (GNM_EXPR_ENTRY (state->par1_expr_entry),
GNM_EE_SINGLE_RANGE, GNM_EE_MASK);
- gtk_table_attach (table, state->par1_expr_entry,
- 1, 2, 1, 2,
- GTK_EXPAND | GTK_FILL, 0,
- 0, 0);
+ gtk_widget_set_hexpand (state->par1_expr_entry, TRUE);
+ gtk_grid_attach (grid, state->par1_expr_entry, 1, 1, 1, 1);
gnumeric_editable_enters (GTK_WINDOW (state->base.dialog),
GTK_WIDGET (state->par1_expr_entry));
diff --git a/src/dialogs/exp-smoothing.ui b/src/dialogs/exp-smoothing.ui
index d0da3f7..04e9a92 100644
--- a/src/dialogs/exp-smoothing.ui
+++ b/src/dialogs/exp-smoothing.ui
@@ -480,7 +480,7 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">4</property>
- <property name="width">1</property>
+ <property name="width">2</property>
<property name="height">1</property>
</packing>
</child>
@@ -629,24 +629,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>
</object>
<packing>
<property name="left_attach">0</property>
@@ -655,15 +637,6 @@
<property name="height">1</property>
</packing>
</child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
</object>
<packing>
<property name="position">1</property>
diff --git a/src/dialogs/kaplan-meier.ui b/src/dialogs/kaplan-meier.ui
index 0444975..bcbb351 100644
--- a/src/dialogs/kaplan-meier.ui
+++ b/src/dialogs/kaplan-meier.ui
@@ -229,15 +229,6 @@
<child>
<placeholder/>
</child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
</object>
<packing>
<property name="expand">False</property>
@@ -325,7 +316,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="valign">start</property>
<property name="use_action_appearance">False</property>
<property name="use_stock">True</property>
</object>
@@ -343,7 +333,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="valign">start</property>
<property name="use_action_appearance">False</property>
<property name="use_stock">True</property>
</object>
@@ -364,7 +353,17 @@
<placeholder/>
</child>
<child>
- <placeholder/>
+ <object class="GtkLabel" id="label7">
+ <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">4</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
</child>
</object>
<packing>
@@ -486,24 +485,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>
</object>
<packing>
<property name="position">2</property>
diff --git a/src/dialogs/random-generation.ui b/src/dialogs/random-generation.ui
index 9c6687a..a9071c0 100644
--- a/src/dialogs/random-generation.ui
+++ b/src/dialogs/random-generation.ui
@@ -20,6 +20,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>
@@ -36,6 +37,7 @@
<child>
<object class="GtkButton" id="applybutton">
<property name="label">gtk-apply</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="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>
@@ -68,6 +71,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>
@@ -96,38 +100,39 @@
<property name="can_focus">True</property>
<property name="border_width">5</property>
<child>
- <object class="GtkTable" id="distribution_table">
+ <object class="GtkGrid" id="distribution-grid">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">12</property>
- <property name="n_rows">3</property>
- <property name="n_columns">2</property>
- <property name="column_spacing">12</property>
<property name="row_spacing">6</property>
+ <property name="column_spacing">12</property>
<child>
- <object class="GtkEntry" id="par1_entry">
+ <object class="GtkLabel" id="distribution_label">
<property name="visible">True</property>
- <property name="can_focus">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Distribution:</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="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>
- <object class="GtkEntry" id="par2_entry">
+ <object class="GtkComboBox" id="distribution_combo">
<property name="visible">True</property>
- <property name="can_focus">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">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="y_options"></property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
</packing>
</child>
<child>
@@ -139,10 +144,10 @@
<property name="mnemonic_widget">par1_entry</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>
@@ -154,37 +159,49 @@
<property name="mnemonic_widget">par2_entry</property>
</object>
<packing>
+ <property name="left_attach">0</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="width">1</property>
+ <property name="height">1</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="distribution_label">
+ <object class="GtkEntry" id="par1_entry">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">_Distribution:</property>
- <property name="use_underline">True</property>
- <property name="justify">right</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">●</property>
+ <property name="invisible_char_set">True</property>
</object>
<packing>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></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>
- <object class="GtkComboBox" id="distribution_combo">
+ <object class="GtkEntry" id="par2_entry">
<property name="visible">True</property>
- <property name="can_focus">False</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">1</property>
- <property name="right_attach">2</property>
- <property name="y_options"></property>
+ <property name="top_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
</packing>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</object>
</child>
<child type="tab">
@@ -199,14 +216,12 @@
</packing>
</child>
<child>
- <object class="GtkTable" id="table2">
+ <object class="GtkGrid" id="options-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="column_spacing">12</property>
<property name="row_spacing">6</property>
+ <property name="column_spacing">12</property>
<child>
<object class="GtkLabel" id="vars_label">
<property name="visible">True</property>
@@ -218,8 +233,10 @@
<property name="mnemonic_widget">vars_entry</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>
@@ -233,37 +250,57 @@
<property name="mnemonic_widget">count_entry</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>
<object class="GtkEntry" id="vars_entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="invisible_char">●</property>
<property name="text" translatable="yes">1</property>
+ <property name="invisible_char_set">True</property>
</object>
<packing>
<property name="left_attach">1</property>
- <property name="right_attach">2</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="GtkEntry" id="count_entry">
<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">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>
+ <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>
</object>
<packing>
<property name="position">1</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]