From cda1540e604a821ea86bd3633aa7b5f8f0d7008d Mon Sep 17 00:00:00 2001 From: Jean Brefort Date: Thu, 28 Feb 2013 17:56:54 +0100 Subject: [PATCH] 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 7fa24553c..aaee1b7b0 100644 --- a/src/dialogs/ChangeLog +++ b/src/dialogs/ChangeLog @@ -1,5 +1,14 @@ 2013-02-28 Jean Brefort + * 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 + * 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 343b95918..731a9cc5d 100644 --- a/src/dialogs/chi-squared.ui +++ b/src/dialogs/chi-squared.ui @@ -1,6 +1,12 @@ + + 1 + 0.050000000000000003 + 0.01 + 10 + False 5 @@ -186,33 +192,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - _Labels False @@ -231,6 +210,18 @@ 1 + + + + + + + + + + + + @@ -299,7 +290,7 @@ 0 1 - 2 + 3 1 @@ -352,9 +343,6 @@ - - - False @@ -429,10 +417,4 @@ okbutton - - 1 - 0.050000000000000003 - 0.01 - 10 - diff --git a/src/dialogs/dialog-random-generator.c b/src/dialogs/dialog-random-generator.c index ccb77b12e..c36c365c2 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 d0da3f734..04e9a9235 100644 --- a/src/dialogs/exp-smoothing.ui +++ b/src/dialogs/exp-smoothing.ui @@ -480,7 +480,7 @@ 0 4 - 1 + 2 1 @@ -629,24 +629,6 @@ 1 - - - - - - - - - - - - - - - - - - 0 @@ -655,15 +637,6 @@ 1 - - - - - - - - - 1 diff --git a/src/dialogs/kaplan-meier.ui b/src/dialogs/kaplan-meier.ui index 04449759b..bcbb3513c 100644 --- a/src/dialogs/kaplan-meier.ui +++ b/src/dialogs/kaplan-meier.ui @@ -229,15 +229,6 @@ - - - - - - - - - False @@ -325,7 +316,6 @@ True True True - start False True @@ -343,7 +333,6 @@ True True True - start False True @@ -364,7 +353,17 @@ - + + True + False + True + + + 2 + 4 + 1 + 1 + @@ -486,24 +485,6 @@ 1 - - - - - - - - - - - - - - - - - - 2 diff --git a/src/dialogs/random-generation.ui b/src/dialogs/random-generation.ui index 9c6687a60..a9071c0c7 100644 --- a/src/dialogs/random-generation.ui +++ b/src/dialogs/random-generation.ui @@ -20,6 +20,7 @@ gtk-help + False True True True @@ -36,6 +37,7 @@ gtk-apply + False True True True @@ -52,6 +54,7 @@ gtk-cancel + False True True True @@ -68,6 +71,7 @@ gtk-ok + False True True True @@ -96,38 +100,39 @@ True 5 - + True False 12 - 3 - 2 - 12 6 + 12 - + True - True + False + 0 + _Distribution: + True + right - 1 - 2 - 1 - 2 - + 0 + 0 + 1 + 1 - + True - True + False + True 1 - 2 - 2 - 3 - + 0 + 1 + 1 @@ -139,10 +144,10 @@ par1_entry + 0 1 - 2 - GTK_FILL - + 1 + 1 @@ -154,37 +159,49 @@ par2_entry + 0 2 - 3 - GTK_FILL - + 1 + 1 - + True - False - 0 - _Distribution: - True - right + True + + True - GTK_FILL - + 1 + 1 + 1 + 1 - + True - False + True + + True 1 - 2 - + 2 + 1 + 1 + + + + + + + + + @@ -199,14 +216,12 @@ - + True False 12 - 2 - 2 - 12 6 + 12 True @@ -218,8 +233,10 @@ vars_entry - GTK_FILL - + 0 + 0 + 1 + 1 @@ -233,37 +250,57 @@ count_entry + 0 1 - 2 - GTK_FILL - + 1 + 1 True True + True + 1 + True 1 - 2 - + 0 + 1 + 1 True True + + True 1 - 2 1 - 2 - + 1 + 1 + + + + + + + + + + + + + + + 1 -- 2.11.4.GIT