[gnumeric] code cleanup.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] code cleanup.
- Date: Wed, 20 Oct 2010 20:30:07 +0000 (UTC)
commit 8bcbc3663ef71b9a4ab9831faaea58bb864525e1
Author: Morten Welinder <terra gnome org>
Date: Wed Oct 20 16:29:44 2010 -0400
code cleanup.
ChangeLog | 7 +
src/dialogs/dao-gui-utils.c | 4 +-
src/dialogs/dialog-advanced-filter.c | 2 +-
src/dialogs/dialog-analysis-tool-chi-squared.c | 4 +-
src/dialogs/dialog-analysis-tool-frequency.c | 8 +-
src/dialogs/dialog-analysis-tool-kaplan-meier.c | 30 ++--
src/dialogs/dialog-analysis-tool-normality.c | 4 +-
.../dialog-analysis-tool-principal-components.c | 2 +-
src/dialogs/dialog-analysis-tool-sign-test.c | 12 +-
.../dialog-analysis-tool-wilcoxon-mann-whitney.c | 4 +-
src/dialogs/dialog-analysis-tools.c | 220 ++++++++++----------
src/dialogs/dialog-autofilter.c | 50 +++---
src/dialogs/dialog-autoformat.c | 26 ++--
src/dialogs/dialog-autosave.c | 14 +-
src/dialogs/dialog-cell-comment.c | 20 +-
src/dialogs/dialog-cell-format.c | 110 +++++-----
src/dialogs/dialog-cell-sort.c | 32 ++--
src/dialogs/dialog-col-row.c | 10 +-
src/dialogs/dialog-col-width.c | 18 +-
src/dialogs/dialog-consolidate.c | 12 +-
src/dialogs/dialog-data-slicer.c | 16 +-
src/dialogs/dialog-data-table.c | 8 +-
src/dialogs/dialog-define-names.c | 10 +-
src/dialogs/dialog-delete-cells.c | 12 +-
src/dialogs/dialog-doc-metadata.c | 84 ++++----
src/dialogs/dialog-fill-series.c | 20 +-
src/dialogs/dialog-formula-guru.c | 22 +-
src/dialogs/dialog-function-select.c | 26 ++--
src/dialogs/dialog-goal-seek.c | 28 ++--
src/dialogs/dialog-goto-cell.c | 12 +-
src/dialogs/dialog-hyperlink.c | 54 +++---
src/dialogs/dialog-insert-cells.c | 12 +-
src/dialogs/dialog-merge.c | 20 +-
src/dialogs/dialog-paste-special.c | 30 ++--
src/dialogs/dialog-plugin-manager.c | 34 ++--
src/dialogs/dialog-preferences.c | 10 +-
src/dialogs/dialog-printer-setup.c | 214 ++++++++++----------
src/dialogs/dialog-random-generator-cor.c | 2 +-
src/dialogs/dialog-random-generator.c | 18 +-
src/dialogs/dialog-row-height.c | 18 +-
src/dialogs/dialog-scenarios.c | 24 +-
src/dialogs/dialog-search-replace.c | 38 ++--
src/dialogs/dialog-sheet-order.c | 36 ++--
src/dialogs/dialog-sheetobject-size.c | 30 ++--
src/dialogs/dialog-shuffle.c | 2 +-
src/dialogs/dialog-simulation.c | 30 ++--
src/dialogs/dialog-solver.c | 52 +++---
src/dialogs/dialog-stf-csv-page.c | 28 ++--
src/dialogs/dialog-stf-export.c | 42 ++--
src/dialogs/dialog-stf-fixed-page.c | 6 +-
src/dialogs/dialog-stf-format-page.c | 8 +-
src/dialogs/dialog-stf-main-page.c | 22 +-
src/dialogs/dialog-stf.c | 14 +-
src/dialogs/dialog-tabulate.c | 12 +-
src/dialogs/dialog-view.c | 16 +-
src/dialogs/dialog-workbook-attr.c | 12 +-
src/dialogs/dialog-zoom.c | 16 +-
src/gui-util.c | 10 +-
src/gui-util.h | 2 -
src/widgets/gnm-dao.c | 22 +-
src/widgets/widget-font-selector.c | 16 +-
61 files changed, 837 insertions(+), 840 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 35f6d3c..61c78f3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-10-20 Morten Welinder <terra gnome org>
+
+ * src/gui-util.c (gnm_xml_get_widget): Elminate. Change all
+ callers to go_gtk_builder_get_widget. ("The light that burns
+ twice as bright burns for half as long - and you have burned so
+ very, very brightly, Roy.")
+
2010-10-19 Morten Welinder <terra gnome org>
* src/gui-util.c (gnumeric_keyed_dialog): When dialog is
diff --git a/src/dialogs/dao-gui-utils.c b/src/dialogs/dao-gui-utils.c
index 2610f30..6d9c80b 100644
--- a/src/dialogs/dao-gui-utils.c
+++ b/src/dialogs/dao-gui-utils.c
@@ -65,7 +65,7 @@ dialog_tool_preset_to_range (GenericToolState *state)
gnm_dao_load_range (GNM_DAO (state->gdao), sel);
gnm_dao_focus_output_range (GNM_DAO (state->gdao));
- w = gnm_xml_get_widget (state->gui, "notebook1");
+ w = go_gtk_builder_get_widget (state->gui, "notebook1");
g_return_if_fail (w && GTK_IS_NOTEBOOK (w));
gtk_notebook_set_current_page (GTK_NOTEBOOK(w), 0);
}
@@ -84,7 +84,7 @@ dialog_tool_init_outputs (GenericToolState *state, GCallback sensitivity_cb)
{
GtkWidget *dao_box;
- dao_box = gnm_xml_get_widget (state->gui, "dao");
+ dao_box = go_gtk_builder_get_widget (state->gui, "dao");
if (dao_box == NULL) {
state->gdao = NULL;
diff --git a/src/dialogs/dialog-advanced-filter.c b/src/dialogs/dialog-advanced-filter.c
index 6e10feb..da8dd27 100644
--- a/src/dialogs/dialog-advanced-filter.c
+++ b/src/dialogs/dialog-advanced-filter.c
@@ -125,7 +125,7 @@ advanced_filter_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
dao = parse_output ((GenericToolState *) state, NULL);
- w = gnm_xml_get_widget (state->gui, "unique-button");
+ w = go_gtk_builder_get_widget (state->gui, "unique-button");
unique = (1 == gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w)));
if (dao->type == InPlaceOutput)
diff --git a/src/dialogs/dialog-analysis-tool-chi-squared.c b/src/dialogs/dialog-analysis-tool-chi-squared.c
index f60633a..eae2412 100644
--- a/src/dialogs/dialog-analysis-tool-chi-squared.c
+++ b/src/dialogs/dialog-analysis-tool-chi-squared.c
@@ -92,7 +92,7 @@ chi_squared_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
data->alpha = gtk_spin_button_get_value
(GTK_SPIN_BUTTON (state->alpha_entry));
- w = gnm_xml_get_widget (state->base.gui, "test-of-independence");
+ w = go_gtk_builder_get_widget (state->base.gui, "test-of-independence");
data->independence = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w));
data->n_c = (data->input->v_range.cell.b.col - data->input->v_range.cell.a.col + 1);
@@ -228,7 +228,7 @@ dialog_chi_square_tool (WBCGtk *wbcg, Sheet *sheet, gboolean independence)
else
type ="test-of-homogeneity";
gtk_toggle_button_set_active
- (GTK_TOGGLE_BUTTON (gnm_xml_get_widget (state->base.gui,
+ (GTK_TOGGLE_BUTTON (go_gtk_builder_get_widget (state->base.gui,
type)),
TRUE);
diff --git a/src/dialogs/dialog-analysis-tool-frequency.c b/src/dialogs/dialog-analysis-tool-frequency.c
index 93826bf..4c4d5df 100644
--- a/src/dialogs/dialog-analysis-tool-frequency.c
+++ b/src/dialogs/dialog-analysis-tool-frequency.c
@@ -164,7 +164,7 @@ frequency_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
data->predetermined = gtk_toggle_button_get_active (
GTK_TOGGLE_BUTTON (state->predetermined_button));
if (data->predetermined) {
- w = gnm_xml_get_widget (state->base.gui, "labels_2_button");
+ w = go_gtk_builder_get_widget (state->base.gui, "labels_2_button");
data->bin = gnm_expr_entry_parse_as_value
(GNM_EXPR_ENTRY (state->base.input_entry_2),
state->base.sheet);
@@ -175,11 +175,11 @@ frequency_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
data->chart = gnm_gui_group_value (state->base.gui, chart_group);
- w = gnm_xml_get_widget (state->base.gui, "labels_button");
+ w = go_gtk_builder_get_widget (state->base.gui, "labels_button");
data->base.labels = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w));
- w = gnm_xml_get_widget (state->base.gui, "percentage-button");
+ w = go_gtk_builder_get_widget (state->base.gui, "percentage-button");
data->percentage = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w));
- w = gnm_xml_get_widget (state->base.gui, "exact-button");
+ w = go_gtk_builder_get_widget (state->base.gui, "exact-button");
data->exact = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w));
if (!cmd_analysis_tool (WORKBOOK_CONTROL (state->base.wbcg), state->base.sheet,
diff --git a/src/dialogs/dialog-analysis-tool-kaplan-meier.c b/src/dialogs/dialog-analysis-tool-kaplan-meier.c
index 243ae0f..d731a91 100644
--- a/src/dialogs/dialog-analysis-tool-kaplan-meier.c
+++ b/src/dialogs/dialog-analysis-tool-kaplan-meier.c
@@ -282,7 +282,7 @@ kaplan_meier_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
}
data->median = gtk_toggle_button_get_active (
- GTK_TOGGLE_BUTTON (gnm_xml_get_widget
+ GTK_TOGGLE_BUTTON (go_gtk_builder_get_widget
(state->base.gui,
"median-button")));
data->chart = gtk_toggle_button_get_active (
@@ -494,10 +494,10 @@ dialog_kaplan_meier_tool_setup_treeview (KaplanMeierToolState *state)
{
guint i;
GtkCellRenderer *renderer;
- GtkWidget *scrolled = gnm_xml_get_widget (state->base.gui, "groups-scrolled");
+ GtkWidget *scrolled = go_gtk_builder_get_widget (state->base.gui, "groups-scrolled");
GtkTreeSelection *selection;
- state->groups_treeview = GTK_TREE_VIEW (gnm_xml_get_widget
+ state->groups_treeview = GTK_TREE_VIEW (go_gtk_builder_get_widget
(state->base.gui,
"groups-tree"));
state->groups_list = gtk_list_store_new (GROUP_COLUMNS,
@@ -625,40 +625,40 @@ dialog_kaplan_meier_tool (WBCGtk *wbcg, Sheet *sheet)
- state->censorship_button = GTK_WIDGET (gnm_xml_get_widget
+ state->censorship_button = GTK_WIDGET (go_gtk_builder_get_widget
(state->base.gui,
"censor-button"));
- state->censor_spin_from = GTK_WIDGET (gnm_xml_get_widget
+ state->censor_spin_from = GTK_WIDGET (go_gtk_builder_get_widget
(state->base.gui,
"censored-spinbutton1"));
gtk_spin_button_set_range (GTK_SPIN_BUTTON (state->censor_spin_from), 0.,G_MAXSHORT);
- state->censor_spin_to = GTK_WIDGET (gnm_xml_get_widget
+ state->censor_spin_to = GTK_WIDGET (go_gtk_builder_get_widget
(state->base.gui,
"censored-spinbutton2"));
gtk_spin_button_set_range (GTK_SPIN_BUTTON (state->censor_spin_to), 0.,G_MAXSHORT);
- state->graph_button = GTK_WIDGET (gnm_xml_get_widget
+ state->graph_button = GTK_WIDGET (go_gtk_builder_get_widget
(state->base.gui,
"graph-button"));
- state->tick_button = GTK_WIDGET (gnm_xml_get_widget
+ state->tick_button = GTK_WIDGET (go_gtk_builder_get_widget
(state->base.gui,
"tick-button"));
- state->add_group_button = GTK_WIDGET (gnm_xml_get_widget
+ state->add_group_button = GTK_WIDGET (go_gtk_builder_get_widget
(state->base.gui,
"add-button"));
- state->remove_group_button = GTK_WIDGET (gnm_xml_get_widget
+ state->remove_group_button = GTK_WIDGET (go_gtk_builder_get_widget
(state->base.gui,
"remove-button"));
- state->std_error_button = GTK_WIDGET (gnm_xml_get_widget
+ state->std_error_button = GTK_WIDGET (go_gtk_builder_get_widget
(state->base.gui,
"std-error-button"));
- state->logrank_button = GTK_WIDGET (gnm_xml_get_widget
+ state->logrank_button = GTK_WIDGET (go_gtk_builder_get_widget
(state->base.gui,
"logrank-button"));
- state->groups_check = GTK_WIDGET (gnm_xml_get_widget
+ state->groups_check = GTK_WIDGET (go_gtk_builder_get_widget
(state->base.gui,
"groups-check"));
- state->groups_table = GTK_WIDGET (gnm_xml_get_widget
+ state->groups_table = GTK_WIDGET (go_gtk_builder_get_widget
(state->base.gui,
"groups-table"));
state->groups_input = gnm_expr_entry_new (state->base.wbcg, TRUE);
@@ -718,7 +718,7 @@ dialog_kaplan_meier_tool (WBCGtk *wbcg, Sheet *sheet)
gnumeric_editable_enters (GTK_WINDOW (state->base.dialog),
GTK_WIDGET (state->groups_input));
- widget = gnm_xml_get_widget (state->base.gui, "groups-label");
+ widget = go_gtk_builder_get_widget (state->base.gui, "groups-label");
gtk_label_set_mnemonic_widget (GTK_LABEL (widget),
GTK_WIDGET (state->groups_input));
go_atk_setup_label (widget, GTK_WIDGET (state->groups_input));
diff --git a/src/dialogs/dialog-analysis-tool-normality.c b/src/dialogs/dialog-analysis-tool-normality.c
index 8168e8c..fad1e47 100644
--- a/src/dialogs/dialog-analysis-tool-normality.c
+++ b/src/dialogs/dialog-analysis-tool-normality.c
@@ -151,14 +151,14 @@ normality_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
GNM_EXPR_ENTRY (state->base.input_entry), state->base.sheet);
data->base.group_by = gnm_gui_group_value (state->base.gui, grouped_by_group);
- w = gnm_xml_get_widget (state->base.gui, "labels_button");
+ w = go_gtk_builder_get_widget (state->base.gui, "labels_button");
data->base.labels = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w));
data->alpha = gtk_spin_button_get_value
(GTK_SPIN_BUTTON (state->alpha_entry));
data->type = gnm_gui_group_value (state->base.gui, test_group);
- w = gnm_xml_get_widget (state->base.gui, "normalprobabilityplot");
+ w = go_gtk_builder_get_widget (state->base.gui, "normalprobabilityplot");
data->graph = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w));
if (!cmd_analysis_tool (WORKBOOK_CONTROL (state->base.wbcg), state->base.sheet,
diff --git a/src/dialogs/dialog-analysis-tool-principal-components.c b/src/dialogs/dialog-analysis-tool-principal-components.c
index e237dac..f05b4ee 100644
--- a/src/dialogs/dialog-analysis-tool-principal-components.c
+++ b/src/dialogs/dialog-analysis-tool-principal-components.c
@@ -120,7 +120,7 @@ principal_components_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
GNM_EXPR_ENTRY (state->input_entry), state->sheet);
data->group_by = gnm_gui_group_value (state->gui, grouped_by_group);
- w = gnm_xml_get_widget (state->gui, "labels_button");
+ w = go_gtk_builder_get_widget (state->gui, "labels_button");
data->labels = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w));
if (cmd_analysis_tool (WORKBOOK_CONTROL (state->wbcg), state->sheet,
diff --git a/src/dialogs/dialog-analysis-tool-sign-test.c b/src/dialogs/dialog-analysis-tool-sign-test.c
index 0bf43aa..8c94aa7 100644
--- a/src/dialogs/dialog-analysis-tool-sign-test.c
+++ b/src/dialogs/dialog-analysis-tool-sign-test.c
@@ -205,7 +205,7 @@ sign_test_two_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
data->base.range_2 = gnm_expr_entry_parse_as_value
(GNM_EXPR_ENTRY (state->base.input_entry_2), state->base.sheet);
- w = gnm_xml_get_widget (state->base.gui, "labels_button");
+ w = go_gtk_builder_get_widget (state->base.gui, "labels_button");
data->base.labels = gtk_toggle_button_get_active
(GTK_TOGGLE_BUTTON (w));
@@ -215,7 +215,7 @@ sign_test_two_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
data->base.alpha = gtk_spin_button_get_value
(GTK_SPIN_BUTTON (state->alpha_entry));
- w = gnm_xml_get_widget (state->base.gui, "signtest");
+ w = go_gtk_builder_get_widget (state->base.gui, "signtest");
engine = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w))
? analysis_tool_sign_test_two_engine
: analysis_tool_signed_rank_test_two_engine;
@@ -277,7 +277,7 @@ dialog_sign_test_two_tool (WBCGtk *wbcg, Sheet *sheet, signtest_type type)
state);
int_to_entry (GTK_ENTRY (state->median_entry), 0);
- w = gnm_xml_get_widget (state->base.gui,
+ w = go_gtk_builder_get_widget (state->base.gui,
(type == SIGNTEST) ? "signtest"
: "signedranktest");
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (w), TRUE);
@@ -318,7 +318,7 @@ sign_test_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
GNM_EXPR_ENTRY (state->base.input_entry), state->base.sheet);
data->base.group_by = gnm_gui_group_value (state->base.gui, grouped_by_group);
- w = gnm_xml_get_widget (state->base.gui, "labels_button");
+ w = go_gtk_builder_get_widget (state->base.gui, "labels_button");
data->base.labels = gtk_toggle_button_get_active
(GTK_TOGGLE_BUTTON (w));
@@ -327,7 +327,7 @@ sign_test_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
data->alpha = gtk_spin_button_get_value
(GTK_SPIN_BUTTON (state->alpha_entry));
- w = gnm_xml_get_widget (state->base.gui, "signtest");
+ w = go_gtk_builder_get_widget (state->base.gui, "signtest");
engine = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w))
? analysis_tool_sign_test_engine
: analysis_tool_signed_rank_test_engine;
@@ -422,7 +422,7 @@ dialog_sign_test_tool (WBCGtk *wbcg, Sheet *sheet, signtest_type type)
int_to_entry (GTK_ENTRY (state->median_entry), 0);
float_to_entry (GTK_ENTRY (state->alpha_entry), 0.05);
- w = gnm_xml_get_widget (state->base.gui,
+ w = go_gtk_builder_get_widget (state->base.gui,
(type == SIGNTEST) ? "signtest"
: "signedranktest");
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (w), TRUE);
diff --git a/src/dialogs/dialog-analysis-tool-wilcoxon-mann-whitney.c b/src/dialogs/dialog-analysis-tool-wilcoxon-mann-whitney.c
index 25828d0..d81dd33 100644
--- a/src/dialogs/dialog-analysis-tool-wilcoxon-mann-whitney.c
+++ b/src/dialogs/dialog-analysis-tool-wilcoxon-mann-whitney.c
@@ -140,7 +140,7 @@ wilcoxon_mann_whitney_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
GNM_EXPR_ENTRY (state->input_entry), state->sheet);
data->group_by = gnm_gui_group_value (state->gui, grouped_by_group);
- w = gnm_xml_get_widget (state->gui, "labels_button");
+ w = go_gtk_builder_get_widget (state->gui, "labels_button");
data->labels = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w));
if (cmd_analysis_tool (WORKBOOK_CONTROL (state->wbcg), state->sheet,
@@ -198,7 +198,7 @@ dialog_wilcoxon_m_w_tool (WBCGtk *wbcg, Sheet *sheet)
return 0;
g_signal_connect_after
- (G_OBJECT (gnm_xml_get_widget
+ (G_OBJECT (go_gtk_builder_get_widget
(state->gui,
"grouped_by_row")), "toggled",
G_CALLBACK (wilcoxon_mann_whitney_tool_update_sensitivity_cb),
diff --git a/src/dialogs/dialog-analysis-tools.c b/src/dialogs/dialog-analysis-tools.c
index 9c4e207..f7d4b55 100644
--- a/src/dialogs/dialog-analysis-tools.c
+++ b/src/dialogs/dialog-analysis-tools.c
@@ -324,12 +324,12 @@ dialog_tool_init_buttons (GenericToolState *state,
GCallback ok_function,
GCallback close_function)
{
- state->ok_button = gnm_xml_get_widget (state->gui, "okbutton");
+ state->ok_button = go_gtk_builder_get_widget (state->gui, "okbutton");
g_signal_connect (G_OBJECT (state->ok_button),
"clicked",
G_CALLBACK (ok_function), state);
- state->cancel_button = gnm_xml_get_widget (state->gui,
+ state->cancel_button = go_gtk_builder_get_widget (state->gui,
"cancelbutton");
if (close_function == NULL)
g_signal_connect (G_OBJECT (state->cancel_button),
@@ -340,12 +340,12 @@ dialog_tool_init_buttons (GenericToolState *state,
"clicked",
G_CALLBACK (close_function), state);
- state->apply_button = gnm_xml_get_widget (state->gui, "applybutton");
+ state->apply_button = go_gtk_builder_get_widget (state->gui, "applybutton");
if (state->apply_button != NULL )
g_signal_connect (G_OBJECT (state->apply_button),
"clicked",
G_CALLBACK (ok_function), state);
- state->help_button = gnm_xml_get_widget (state->gui, "helpbutton");
+ state->help_button = go_gtk_builder_get_widget (state->gui, "helpbutton");
if (state->help_button != NULL )
gnumeric_init_help_button (state->help_button,
state->help_link);
@@ -399,14 +399,14 @@ dialog_tool_init (GenericToolState *state,
if (state->gui == NULL)
goto dialog_tool_init_error;
- state->dialog = gnm_xml_get_widget (state->gui, dialog_name);
+ state->dialog = go_gtk_builder_get_widget (state->gui, dialog_name);
if (state->dialog == NULL)
goto dialog_tool_init_error;
dialog_tool_init_buttons (state, ok_function, close_function);
- widget = gnm_xml_get_widget (state->gui, "var1-label");
+ widget = go_gtk_builder_get_widget (state->gui, "var1-label");
if (widget == NULL) {
state->input_entry = NULL;
} else {
@@ -443,7 +443,7 @@ dialog_tool_init (GenericToolState *state,
/* */
/* If there is a var2-label, we need a second input field */
/* */
- widget = gnm_xml_get_widget (state->gui, "var2-label");
+ widget = go_gtk_builder_get_widget (state->gui, "var2-label");
if (widget == NULL) {
state->input_entry_2 = NULL;
} else {
@@ -476,7 +476,7 @@ dialog_tool_init (GenericToolState *state,
gtk_widget_show (GTK_WIDGET (state->input_entry_2));
}
- state->warning = gnm_xml_get_widget (state->gui, "warnings");
+ state->warning = go_gtk_builder_get_widget (state->gui, "warnings");
wbc_gtk_attach_guru (state->wbcg, state->dialog);
g_object_set_data_full (G_OBJECT (state->dialog),
"state", state, (GDestroyNotify) cb_tool_destroy);
@@ -536,7 +536,7 @@ GtkWidget *
tool_setup_update (GenericToolState* state, char const *name, GCallback cb,
gpointer closure)
{
- GtkWidget *w = gnm_xml_get_widget (state->gui, name);
+ GtkWidget *w = go_gtk_builder_get_widget (state->gui, name);
if (GTK_IS_SPIN_BUTTON (w)) {
g_signal_connect_after (w, "value-changed", cb, closure);
gnumeric_editable_enters (GTK_WINDOW (state->dialog), w);
@@ -641,7 +641,7 @@ corr_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
GNM_EXPR_ENTRY (state->input_entry), state->sheet);
data->group_by = gnm_gui_group_value (state->gui, grouped_by_group);
- w = gnm_xml_get_widget (state->gui, "labels_button");
+ w = go_gtk_builder_get_widget (state->gui, "labels_button");
data->labels = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w));
if (cmd_analysis_tool (WORKBOOK_CONTROL (state->wbcg), state->sheet,
@@ -761,7 +761,7 @@ cov_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
GNM_EXPR_ENTRY (state->input_entry), state->sheet);
data->group_by = gnm_gui_group_value (state->gui, grouped_by_group);
- w = gnm_xml_get_widget (state->gui, "labels_button");
+ w = go_gtk_builder_get_widget (state->gui, "labels_button");
data->labels = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w));
if (cmd_analysis_tool (WORKBOOK_CONTROL (state->wbcg), state->sheet,
@@ -877,10 +877,10 @@ rank_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
GNM_EXPR_ENTRY (state->input_entry), state->sheet);
data->base.group_by = gnm_gui_group_value (state->gui, grouped_by_group);
- w = gnm_xml_get_widget (state->gui, "labels_button");
+ w = go_gtk_builder_get_widget (state->gui, "labels_button");
data->base.labels = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w));
- w = gnm_xml_get_widget (state->gui, "rank_button");
+ w = go_gtk_builder_get_widget (state->gui, "rank_button");
data->av_ties = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w));
@@ -970,10 +970,10 @@ fourier_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
GNM_EXPR_ENTRY (state->input_entry), state->sheet);
data->base.group_by = gnm_gui_group_value (state->gui, grouped_by_group);
- w = gnm_xml_get_widget (state->gui, "labels_button");
+ w = go_gtk_builder_get_widget (state->gui, "labels_button");
data->base.labels = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w));
- w = gnm_xml_get_widget (state->gui, "inverse_button");
+ w = go_gtk_builder_get_widget (state->gui, "inverse_button");
data->inverse = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w)) != 0;
if (!cmd_analysis_tool (WORKBOOK_CONTROL (state->wbcg), state->sheet,
@@ -1083,7 +1083,7 @@ cb_desc_stat_tool_ok_clicked (G_GNUC_UNUSED GtkWidget *button,
if (data->kth_smallest == 1)
err = entry_to_int (GTK_ENTRY (state->s_entry), &data->k_smallest, TRUE);
- w = gnm_xml_get_widget (state->base.gui, "labels_button");
+ w = go_gtk_builder_get_widget (state->base.gui, "labels_button");
data->base.labels = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w));
if (!cmd_analysis_tool (WORKBOOK_CONTROL (state->base.wbcg), state->base.sheet,
@@ -1235,21 +1235,21 @@ dialog_descriptive_stat_tool (WBCGtk *wbcg, Sheet *sheet)
0))
return 0;
- state->summary_stats_button = gnm_xml_get_widget
+ state->summary_stats_button = go_gtk_builder_get_widget
(state->base.gui, "summary_stats_button");
- state->ss_button = gnm_xml_get_widget
+ state->ss_button = go_gtk_builder_get_widget
(state->base.gui, "ss_button");
- state->mean_stats_button = gnm_xml_get_widget
+ state->mean_stats_button = go_gtk_builder_get_widget
(state->base.gui, "mean_stats_button");
- state->kth_largest_button = gnm_xml_get_widget
+ state->kth_largest_button = go_gtk_builder_get_widget
(state->base.gui, "kth_largest_button");
- state->kth_smallest_button = gnm_xml_get_widget
+ state->kth_smallest_button = go_gtk_builder_get_widget
(state->base.gui, "kth_smallest_button");
- state->c_entry = gnm_xml_get_widget (state->base.gui, "c_entry");
+ state->c_entry = go_gtk_builder_get_widget (state->base.gui, "c_entry");
gtk_spin_button_set_value (GTK_SPIN_BUTTON (state->c_entry), 0.95);
- state->l_entry = gnm_xml_get_widget (state->base.gui, "l_entry");
+ state->l_entry = go_gtk_builder_get_widget (state->base.gui, "l_entry");
int_to_entry (GTK_ENTRY (state->l_entry), 1);
- state->s_entry = gnm_xml_get_widget (state->base.gui, "s_entry");
+ state->s_entry = go_gtk_builder_get_widget (state->base.gui, "s_entry");
int_to_entry (GTK_ENTRY (state->s_entry), 1);
@@ -1331,7 +1331,7 @@ ttest_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
data->base.range_2 = gnm_expr_entry_parse_as_value
(GNM_EXPR_ENTRY (state->base.input_entry_2), state->base.sheet);
- w = gnm_xml_get_widget (state->base.gui, "labels_button");
+ w = go_gtk_builder_get_widget (state->base.gui, "labels_button");
data->base.labels = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w));
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (state->paired_button)) == 1) {
@@ -1609,23 +1609,23 @@ dialog_ttest_tool (WBCGtk *wbcg, Sheet *sheet, ttest_type test)
GNM_EE_SINGLE_RANGE))
return 0;
- state->paired_button = gnm_xml_get_widget (state->base.gui, "paired-button");
- state->unpaired_button = gnm_xml_get_widget (state->base.gui, "unpaired-button");
- state->variablespaired_label = gnm_xml_get_widget (state->base.gui, "variablespaired-label");
- state->known_button = gnm_xml_get_widget (state->base.gui, "known-button");
- state->unknown_button = gnm_xml_get_widget (state->base.gui, "unknown-button");
- state->varianceknown_label = gnm_xml_get_widget (state->base.gui, "varianceknown-label");
- state->equal_button = gnm_xml_get_widget (state->base.gui, "equal-button");
- state->unequal_button = gnm_xml_get_widget (state->base.gui, "unequal-button");
- state->varianceequal_label = gnm_xml_get_widget (state->base.gui, "varianceequal-label");
- state->options_table = gnm_xml_get_widget (state->base.gui, "options-table");
- state->var1_variance_label = gnm_xml_get_widget (state->base.gui, "var1_variance-label");
- state->var1_variance = gnm_xml_get_widget (state->base.gui, "var1-variance");
- state->var2_variance_label = gnm_xml_get_widget (state->base.gui, "var2_variance-label");
- state->var2_variance = gnm_xml_get_widget (state->base.gui, "var2-variance");
- state->mean_diff_entry = gnm_xml_get_widget (state->base.gui, "meandiff");
+ state->paired_button = go_gtk_builder_get_widget (state->base.gui, "paired-button");
+ state->unpaired_button = go_gtk_builder_get_widget (state->base.gui, "unpaired-button");
+ state->variablespaired_label = go_gtk_builder_get_widget (state->base.gui, "variablespaired-label");
+ state->known_button = go_gtk_builder_get_widget (state->base.gui, "known-button");
+ state->unknown_button = go_gtk_builder_get_widget (state->base.gui, "unknown-button");
+ state->varianceknown_label = go_gtk_builder_get_widget (state->base.gui, "varianceknown-label");
+ state->equal_button = go_gtk_builder_get_widget (state->base.gui, "equal-button");
+ state->unequal_button = go_gtk_builder_get_widget (state->base.gui, "unequal-button");
+ state->varianceequal_label = go_gtk_builder_get_widget (state->base.gui, "varianceequal-label");
+ state->options_table = go_gtk_builder_get_widget (state->base.gui, "options-table");
+ state->var1_variance_label = go_gtk_builder_get_widget (state->base.gui, "var1_variance-label");
+ state->var1_variance = go_gtk_builder_get_widget (state->base.gui, "var1-variance");
+ state->var2_variance_label = go_gtk_builder_get_widget (state->base.gui, "var2_variance-label");
+ state->var2_variance = go_gtk_builder_get_widget (state->base.gui, "var2-variance");
+ state->mean_diff_entry = go_gtk_builder_get_widget (state->base.gui, "meandiff");
float_to_entry (GTK_ENTRY (state->mean_diff_entry), 0);
- state->alpha_entry = gnm_xml_get_widget (state->base.gui, "one_alpha");
+ state->alpha_entry = go_gtk_builder_get_widget (state->base.gui, "one_alpha");
float_to_entry (GTK_ENTRY (state->alpha_entry), 0.05);
g_signal_connect_after (G_OBJECT (state->paired_button),
@@ -1708,7 +1708,7 @@ ftest_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
data->range_2 = gnm_expr_entry_parse_as_value
(GNM_EXPR_ENTRY (state->base.input_entry_2), state->base.sheet);
- w = gnm_xml_get_widget (state->base.gui, "labels_button");
+ w = go_gtk_builder_get_widget (state->base.gui, "labels_button");
data->labels = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w));
err = entry_to_float (GTK_ENTRY (state->alpha_entry), &data->alpha, TRUE);
@@ -1797,7 +1797,7 @@ dialog_ftest_tool (WBCGtk *wbcg, Sheet *sheet)
GNM_EE_SINGLE_RANGE))
return 0;
- state->alpha_entry = gnm_xml_get_widget (state->base.gui, "one_alpha");
+ state->alpha_entry = go_gtk_builder_get_widget (state->base.gui, "one_alpha");
float_to_entry (GTK_ENTRY (state->alpha_entry), 0.05);
gnumeric_editable_enters (GTK_WINDOW (state->base.dialog),
GTK_WIDGET (state->alpha_entry));
@@ -1926,7 +1926,7 @@ sampling_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
GNM_EXPR_ENTRY (state->base.input_entry), state->base.sheet);
data->base.group_by = gnm_gui_group_value (state->base.gui, grouped_by_group);
- w = gnm_xml_get_widget (state->base.gui, "labels_button");
+ w = go_gtk_builder_get_widget (state->base.gui, "labels_button");
data->base.labels = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w));
data->periodic = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (state->periodic_button));
@@ -2047,20 +2047,20 @@ dialog_sampling_tool (WBCGtk *wbcg, Sheet *sheet)
0))
return 0;
- state->periodic_button = gnm_xml_get_widget (state->base.gui, "periodic-button");
- state->random_button = gnm_xml_get_widget (state->base.gui, "random-button");
- state->method_label = gnm_xml_get_widget (state->base.gui, "method-label");
- state->options_table = gnm_xml_get_widget (state->base.gui, "options-table");
- state->period_label = gnm_xml_get_widget (state->base.gui, "period-label");
- state->random_label = gnm_xml_get_widget (state->base.gui, "random-label");
- state->period_entry = gnm_xml_get_widget (state->base.gui, "period-entry");
- state->random_entry = gnm_xml_get_widget (state->base.gui, "random-entry");
- state->number_entry = gnm_xml_get_widget (state->base.gui, "number-entry");
- state->offset_label = gnm_xml_get_widget (state->base.gui, "offset-label");
- state->offset_entry = gnm_xml_get_widget (state->base.gui, "offset-entry");
- state->major_label = gnm_xml_get_widget (state->base.gui, "pdir-label");
- state->row_major_button = gnm_xml_get_widget (state->base.gui, "row-major-button");
- state->col_major_button = gnm_xml_get_widget (state->base.gui, "col-major-button");
+ state->periodic_button = go_gtk_builder_get_widget (state->base.gui, "periodic-button");
+ state->random_button = go_gtk_builder_get_widget (state->base.gui, "random-button");
+ state->method_label = go_gtk_builder_get_widget (state->base.gui, "method-label");
+ state->options_table = go_gtk_builder_get_widget (state->base.gui, "options-table");
+ state->period_label = go_gtk_builder_get_widget (state->base.gui, "period-label");
+ state->random_label = go_gtk_builder_get_widget (state->base.gui, "random-label");
+ state->period_entry = go_gtk_builder_get_widget (state->base.gui, "period-entry");
+ state->random_entry = go_gtk_builder_get_widget (state->base.gui, "random-entry");
+ state->number_entry = go_gtk_builder_get_widget (state->base.gui, "number-entry");
+ state->offset_label = go_gtk_builder_get_widget (state->base.gui, "offset-label");
+ state->offset_entry = go_gtk_builder_get_widget (state->base.gui, "offset-entry");
+ state->major_label = go_gtk_builder_get_widget (state->base.gui, "pdir-label");
+ state->row_major_button = go_gtk_builder_get_widget (state->base.gui, "row-major-button");
+ state->col_major_button = go_gtk_builder_get_widget (state->base.gui, "col-major-button");
int_to_entry (GTK_ENTRY (state->number_entry), 1);
int_to_entry (GTK_ENTRY (state->offset_entry), 0);
@@ -2164,13 +2164,13 @@ regression_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
data->group_by = (y_h == 1) ? GROUPED_BY_ROW : GROUPED_BY_COL;
- w = gnm_xml_get_widget (state->base.gui, "labels_button");
+ w = go_gtk_builder_get_widget (state->base.gui, "labels_button");
data->base.labels = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w));
err = entry_to_float (GTK_ENTRY (state->confidence_entry), &confidence, TRUE);
data->base.alpha = 1 - confidence;
- w = gnm_xml_get_widget (state->base.gui, "intercept-button");
+ w = go_gtk_builder_get_widget (state->base.gui, "intercept-button");
data->intercept = 1 - gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w));
data->multiple_regression
@@ -2337,8 +2337,8 @@ regression_tool_regression_check_toggled_cb (G_GNUC_UNUSED
{
GtkWidget *w1, *w2;
- w1 = gnm_xml_get_widget (state->base.gui, "var1-label");
- w2 = gnm_xml_get_widget (state->base.gui, "var2-label");
+ w1 = go_gtk_builder_get_widget (state->base.gui, "var1-label");
+ w2 = go_gtk_builder_get_widget (state->base.gui, "var2-label");
if (gtk_toggle_button_get_active
(GTK_TOGGLE_BUTTON (state->switch_variables_check))) {
@@ -2399,7 +2399,7 @@ dialog_regression_tool (WBCGtk *wbcg, Sheet *sheet)
GNM_EE_SINGLE_RANGE))
return 0;
- state->confidence_entry = gnm_xml_get_widget (state->base.gui, "confidence-entry");
+ state->confidence_entry = go_gtk_builder_get_widget (state->base.gui, "confidence-entry");
float_to_entry (GTK_ENTRY (state->confidence_entry), 0.95);
g_signal_connect_after (G_OBJECT (state->confidence_entry),
"changed",
@@ -2408,10 +2408,10 @@ dialog_regression_tool (WBCGtk *wbcg, Sheet *sheet)
GTK_WIDGET (state->confidence_entry));
state->simple_linear_regression_radio
- = gnm_xml_get_widget
+ = go_gtk_builder_get_widget
(state->base.gui, "simple-regression-button");
state->switch_variables_check
- = gnm_xml_get_widget
+ = go_gtk_builder_get_widget
(state->base.gui, "multiple-independent-check");
gtk_toggle_button_set_active
(GTK_TOGGLE_BUTTON (state->simple_linear_regression_radio),
@@ -2471,7 +2471,7 @@ exp_smoothing_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
GNM_EXPR_ENTRY (state->base.input_entry), state->base.sheet);
data->base.group_by = gnm_gui_group_value (state->base.gui, grouped_by_group);
- w = gnm_xml_get_widget (state->base.gui, "labels_button");
+ w = go_gtk_builder_get_widget (state->base.gui, "labels_button");
data->base.labels = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w));
err = entry_to_float (GTK_ENTRY (state->damping_fact_entry), &data->damp_fact, TRUE);
@@ -2702,34 +2702,34 @@ dialog_exp_smoothing_tool (WBCGtk *wbcg, Sheet *sheet)
0))
return 0;
- state->damping_fact_entry = gnm_xml_get_widget (state->base.gui,
+ state->damping_fact_entry = go_gtk_builder_get_widget (state->base.gui,
"damping-fact-spin");
gtk_spin_button_set_value (GTK_SPIN_BUTTON (state->damping_fact_entry), 0.2);
float_to_entry (GTK_ENTRY (state->damping_fact_entry), 0.2);
- state->g_damping_fact_entry = gnm_xml_get_widget (state->base.gui,
+ state->g_damping_fact_entry = go_gtk_builder_get_widget (state->base.gui,
"g-damping-fact-spin");
gtk_spin_button_set_value (GTK_SPIN_BUTTON (state->g_damping_fact_entry), 0.25);
- state->s_damping_fact_entry = gnm_xml_get_widget (state->base.gui,
+ state->s_damping_fact_entry = go_gtk_builder_get_widget (state->base.gui,
"s-damping-fact-spin");
gtk_spin_button_set_value (GTK_SPIN_BUTTON (state->s_damping_fact_entry), 0.3);
- state->s_period_entry = gnm_xml_get_widget (state->base.gui,
+ state->s_period_entry = go_gtk_builder_get_widget (state->base.gui,
"s-period-spin");
gtk_spin_button_set_value (GTK_SPIN_BUTTON (state->s_period_entry), 12.);
- state->n_button = gnm_xml_get_widget (state->base.gui, "n-button");
- state->nm1_button = gnm_xml_get_widget (state->base.gui, "nm1-button");
- state->nm2_button = gnm_xml_get_widget (state->base.gui, "nm2-button");
- state->nm3_button = gnm_xml_get_widget (state->base.gui, "nm3-button");
+ state->n_button = go_gtk_builder_get_widget (state->base.gui, "n-button");
+ state->nm1_button = go_gtk_builder_get_widget (state->base.gui, "nm1-button");
+ state->nm2_button = go_gtk_builder_get_widget (state->base.gui, "nm2-button");
+ state->nm3_button = go_gtk_builder_get_widget (state->base.gui, "nm3-button");
- state->show_std_errors = gnm_xml_get_widget (state->base.gui, "std-errors-button");
- state->graph_button = gnm_xml_get_widget (state->base.gui, "graph-check");
+ state->show_std_errors = go_gtk_builder_get_widget (state->base.gui, "std-errors-button");
+ state->graph_button = go_gtk_builder_get_widget (state->base.gui, "graph-check");
- state->ses_h_button = gnm_xml_get_widget (state->base.gui, "ses-h-button");
- state->ses_r_button = gnm_xml_get_widget (state->base.gui, "ses-r-button");
- state->des_button = gnm_xml_get_widget (state->base.gui, "des-button");
- state->ates_button = gnm_xml_get_widget (state->base.gui, "ates-button");
- state->mtes_button = gnm_xml_get_widget (state->base.gui, "mtes-button");
+ state->ses_h_button = go_gtk_builder_get_widget (state->base.gui, "ses-h-button");
+ state->ses_r_button = go_gtk_builder_get_widget (state->base.gui, "ses-r-button");
+ state->des_button = go_gtk_builder_get_widget (state->base.gui, "des-button");
+ state->ates_button = go_gtk_builder_get_widget (state->base.gui, "ates-button");
+ state->mtes_button = go_gtk_builder_get_widget (state->base.gui, "mtes-button");
g_signal_connect_after (G_OBJECT (state->n_button),
"toggled",
@@ -2814,7 +2814,7 @@ average_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
GNM_EXPR_ENTRY (state->base.input_entry), state->base.sheet);
data->base.group_by = gnm_gui_group_value (state->base.gui, grouped_by_group);
- w = gnm_xml_get_widget (state->base.gui, "labels_button");
+ w = go_gtk_builder_get_widget (state->base.gui, "labels_button");
data->base.labels = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w));
err = entry_to_int (GTK_ENTRY (state->interval_entry), &data->interval, TRUE);
@@ -3069,21 +3069,21 @@ dialog_average_tool (WBCGtk *wbcg, Sheet *sheet)
0))
return 0;
- state->interval_entry = gnm_xml_get_widget (state->base.gui, "interval-entry");
+ state->interval_entry = go_gtk_builder_get_widget (state->base.gui, "interval-entry");
int_to_entry (GTK_ENTRY (state->interval_entry), 3);
- state->n_button = gnm_xml_get_widget (state->base.gui, "n-button");
- state->nm1_button = gnm_xml_get_widget (state->base.gui, "nm1-button");
- state->nm2_button = gnm_xml_get_widget (state->base.gui, "nm2-button");
- state->prior_button = gnm_xml_get_widget (state->base.gui, "prior-button");
- state->central_button = gnm_xml_get_widget (state->base.gui, "central-button");
- state->offset_button = gnm_xml_get_widget (state->base.gui, "offset-button");
- state->offset_spin = gnm_xml_get_widget (state->base.gui, "offset-spinbutton");
- state->show_std_errors = gnm_xml_get_widget (state->base.gui, "std-errors-button");
- state->graph_button = gnm_xml_get_widget (state->base.gui, "graph-check");
- state->sma_button = gnm_xml_get_widget (state->base.gui, "sma-button");
- state->cma_button = gnm_xml_get_widget (state->base.gui, "cma-button");
- state->wma_button = gnm_xml_get_widget (state->base.gui, "wma-button");
- state->spencer_button = gnm_xml_get_widget (state->base.gui, "spencer-ma-button");
+ state->n_button = go_gtk_builder_get_widget (state->base.gui, "n-button");
+ state->nm1_button = go_gtk_builder_get_widget (state->base.gui, "nm1-button");
+ state->nm2_button = go_gtk_builder_get_widget (state->base.gui, "nm2-button");
+ state->prior_button = go_gtk_builder_get_widget (state->base.gui, "prior-button");
+ state->central_button = go_gtk_builder_get_widget (state->base.gui, "central-button");
+ state->offset_button = go_gtk_builder_get_widget (state->base.gui, "offset-button");
+ state->offset_spin = go_gtk_builder_get_widget (state->base.gui, "offset-spinbutton");
+ state->show_std_errors = go_gtk_builder_get_widget (state->base.gui, "std-errors-button");
+ state->graph_button = go_gtk_builder_get_widget (state->base.gui, "graph-check");
+ state->sma_button = go_gtk_builder_get_widget (state->base.gui, "sma-button");
+ state->cma_button = go_gtk_builder_get_widget (state->base.gui, "cma-button");
+ state->wma_button = go_gtk_builder_get_widget (state->base.gui, "wma-button");
+ state->spencer_button = go_gtk_builder_get_widget (state->base.gui, "spencer-ma-button");
g_signal_connect_after (G_OBJECT (state->n_button),
@@ -3233,7 +3233,7 @@ histogram_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
data->predetermined = gtk_toggle_button_get_active (
GTK_TOGGLE_BUTTON (state->predetermined_button));
if (data->predetermined) {
- w = gnm_xml_get_widget (state->base.gui, "labels_2_button");
+ w = go_gtk_builder_get_widget (state->base.gui, "labels_2_button");
data->bin = gnm_expr_entry_parse_as_value
(GNM_EXPR_ENTRY (state->base.input_entry_2),
state->base.sheet);
@@ -3249,11 +3249,11 @@ histogram_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
data->bin_type = gnm_gui_group_value (state->base.gui, bin_type_group);
data->chart = gnm_gui_group_value (state->base.gui, chart_group);
- w = gnm_xml_get_widget (state->base.gui, "labels_button");
+ w = go_gtk_builder_get_widget (state->base.gui, "labels_button");
data->base.labels = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w));
- w = gnm_xml_get_widget (state->base.gui, "percentage-button");
+ w = go_gtk_builder_get_widget (state->base.gui, "percentage-button");
data->percentage = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w));
- w = gnm_xml_get_widget (state->base.gui, "cum-button");
+ w = go_gtk_builder_get_widget (state->base.gui, "cum-button");
data->cumulative = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w));
if (!cmd_analysis_tool (WORKBOOK_CONTROL (state->base.wbcg), state->base.sheet,
@@ -3334,17 +3334,17 @@ dialog_histogram_tool (WBCGtk *wbcg, Sheet *sheet)
0))
return 0;
- state->predetermined_button = GTK_WIDGET (gnm_xml_get_widget
+ state->predetermined_button = GTK_WIDGET (go_gtk_builder_get_widget
(state->base.gui,
"pre_determined_button"));
- state->calculated_button = GTK_WIDGET (gnm_xml_get_widget
+ state->calculated_button = GTK_WIDGET (go_gtk_builder_get_widget
(state->base.gui,
"calculated_button"));
- state->n_entry = GTK_ENTRY(gnm_xml_get_widget (state->base.gui,
+ state->n_entry = GTK_ENTRY(go_gtk_builder_get_widget (state->base.gui,
"n_entry"));
- state->max_entry = GTK_ENTRY(gnm_xml_get_widget (state->base.gui,
+ state->max_entry = GTK_ENTRY(go_gtk_builder_get_widget (state->base.gui,
"max_entry"));
- state->min_entry = GTK_ENTRY(gnm_xml_get_widget (state->base.gui,
+ state->min_entry = GTK_ENTRY(go_gtk_builder_get_widget (state->base.gui,
"min_entry"));
g_signal_connect_after (G_OBJECT (state->predetermined_button),
@@ -3411,7 +3411,7 @@ anova_single_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
GNM_EXPR_ENTRY (state->base.input_entry), state->base.sheet);
data->base.group_by = gnm_gui_group_value (state->base.gui, grouped_by_group);
- w = gnm_xml_get_widget (state->base.gui, "labels_button");
+ w = go_gtk_builder_get_widget (state->base.gui, "labels_button");
data->base.labels = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w));
data->alpha = gtk_spin_button_get_value
(GTK_SPIN_BUTTON (state->alpha_entry));
@@ -3513,7 +3513,7 @@ dialog_anova_single_factor_tool (WBCGtk *wbcg, Sheet *sheet)
0))
return 0;
- state->alpha_entry = gnm_xml_get_widget (state->base.gui,
+ state->alpha_entry = go_gtk_builder_get_widget (state->base.gui,
"alpha-entry");
float_to_entry (GTK_ENTRY (state->alpha_entry), 0.05);
g_signal_connect_after (G_OBJECT (state->alpha_entry),
@@ -3569,7 +3569,7 @@ anova_two_factor_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
data->err = analysis_tools_noerr;
data->wbc = WORKBOOK_CONTROL (state->base.wbcg);
- w = gnm_xml_get_widget (state->base.gui, "labels_button");
+ w = go_gtk_builder_get_widget (state->base.gui, "labels_button");
data->labels = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w));
data->alpha = gtk_spin_button_get_value
@@ -3743,10 +3743,10 @@ dialog_anova_two_factor_tool (WBCGtk *wbcg, Sheet *sheet)
GNM_EE_SINGLE_RANGE))
return 0;
- state->alpha_entry = gnm_xml_get_widget (state->base.gui,
+ state->alpha_entry = go_gtk_builder_get_widget (state->base.gui,
"alpha-entry");
float_to_entry (GTK_ENTRY(state->alpha_entry), 0.05);
- state->replication_entry = gnm_xml_get_widget (state->base.gui,
+ state->replication_entry = go_gtk_builder_get_widget (state->base.gui,
"replication-entry");
int_to_entry (GTK_ENTRY(state->replication_entry), 1);
diff --git a/src/dialogs/dialog-autofilter.c b/src/dialogs/dialog-autofilter.c
index 1451152..9dd0ee5 100644
--- a/src/dialogs/dialog-autofilter.c
+++ b/src/dialogs/dialog-autofilter.c
@@ -70,7 +70,7 @@ map_op (AutoFilterState *state, GnmFilterOp *op,
char const *op_widget, char const *val_widget)
{
int i;
- GtkWidget *w = gnm_xml_get_widget (state->gui, val_widget);
+ GtkWidget *w = go_gtk_builder_get_widget (state->gui, val_widget);
char const *txt = gtk_entry_get_text (GTK_ENTRY (w));
GnmValue *v = NULL;
@@ -78,7 +78,7 @@ map_op (AutoFilterState *state, GnmFilterOp *op,
if (txt == NULL || *txt == '\0')
return NULL;
- w = gnm_xml_get_widget (state->gui, op_widget);
+ w = go_gtk_builder_get_widget (state->gui, op_widget);
i = gtk_combo_box_get_active (GTK_COMBO_BOX (w));
switch (i) {
case 0: return NULL;
@@ -133,7 +133,7 @@ cb_autofilter_ok (G_GNUC_UNUSED GtkWidget *button,
GnmFilterOp op1;
GnmValue *v1 = map_op (state, &op1, "op1", "value1");
if (op1 != GNM_FILTER_UNUSED) {
- w = gnm_xml_get_widget (state->gui, "and_button");
+ w = go_gtk_builder_get_widget (state->gui, "and_button");
cond = gnm_filter_condition_new_double (op0, v0,
gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w)),
op1, v1);
@@ -143,13 +143,13 @@ cb_autofilter_ok (G_GNUC_UNUSED GtkWidget *button,
} else {
int bottom, percentage, count;
- w = gnm_xml_get_widget (state->gui, "top_vs_bottom_option_menu");
+ w = go_gtk_builder_get_widget (state->gui, "top_vs_bottom_option_menu");
bottom = gtk_combo_box_get_active (GTK_COMBO_BOX (w));
- w = gnm_xml_get_widget (state->gui, "item_vs_percentage_option_menu");
+ w = go_gtk_builder_get_widget (state->gui, "item_vs_percentage_option_menu");
percentage = gtk_combo_box_get_active (GTK_COMBO_BOX (w));
- w = gnm_xml_get_widget (state->gui, "item_count");
+ w = go_gtk_builder_get_widget (state->gui, "item_count");
count = gtk_spin_button_get_value (GTK_SPIN_BUTTON (w));
if (bottom >= 0 && percentage >= 0)
cond = gnm_filter_condition_new_bucket (
@@ -174,7 +174,7 @@ static void
cb_top10_type_changed (GtkComboBox *menu,
AutoFilterState *state)
{
- GtkWidget *spin = gnm_xml_get_widget (state->gui, "item_count");
+ GtkWidget *spin = go_gtk_builder_get_widget (state->gui, "item_count");
gtk_spin_button_set_range (GTK_SPIN_BUTTON (spin), 1.,
(gtk_combo_box_get_active (menu) > 0) ? 100. : 500.);
@@ -184,7 +184,7 @@ static void
init_operator (AutoFilterState *state, GnmFilterOp op, GnmValue const *v,
char const *op_widget, char const *val_widget)
{
- GtkWidget *w = gnm_xml_get_widget (state->gui, op_widget);
+ GtkWidget *w = go_gtk_builder_get_widget (state->gui, op_widget);
char const *str = v ? value_peek_string (v) : NULL;
char *content = NULL;
int i;
@@ -217,7 +217,7 @@ init_operator (AutoFilterState *state, GnmFilterOp op, GnmValue const *v,
}
gtk_combo_box_set_active (GTK_COMBO_BOX (w), i);
- w = gnm_xml_get_widget (state->gui, val_widget);
+ w = go_gtk_builder_get_widget (state->gui, val_widget);
gnumeric_editable_enters (GTK_WINDOW (state->dialog), w);
if (v != NULL)
gtk_entry_set_text (GTK_ENTRY (w), content ? content : str);
@@ -276,20 +276,20 @@ dialog_auto_filter (WBCGtk *wbcg,
if (is_expr) {
gtk_label_set_text
- (GTK_LABEL (gnm_xml_get_widget (state->gui, "col-label1")), label);
+ (GTK_LABEL (go_gtk_builder_get_widget (state->gui, "col-label1")), label);
gtk_label_set_text
- (GTK_LABEL (gnm_xml_get_widget (state->gui, "col-label2")), label);
+ (GTK_LABEL (go_gtk_builder_get_widget (state->gui, "col-label2")), label);
} else {
gtk_label_set_text
- (GTK_LABEL (gnm_xml_get_widget (state->gui, "col-label")), label);
- w = gnm_xml_get_widget (state->gui, "item_vs_percentage_option_menu");
+ (GTK_LABEL (go_gtk_builder_get_widget (state->gui, "col-label")), label);
+ w = go_gtk_builder_get_widget (state->gui, "item_vs_percentage_option_menu");
g_signal_connect (G_OBJECT (w),
"changed",
G_CALLBACK (cb_top10_type_changed), state);
}
g_free (label);
- state->dialog = gnm_xml_get_widget (state->gui, "dialog");
+ state->dialog = go_gtk_builder_get_widget (state->gui, "dialog");
if (cond != NULL) {
GnmFilterOp const op = cond->op[0];
if (is_expr && 0 == (op & GNM_FILTER_OP_TYPE_MASK)) {
@@ -298,46 +298,46 @@ dialog_auto_filter (WBCGtk *wbcg,
if (cond->op[1] != GNM_FILTER_UNUSED)
init_operator (state, cond->op[1],
cond->value[1], "op1", "value1");
- w = gnm_xml_get_widget (state->gui,
+ w = go_gtk_builder_get_widget (state->gui,
cond->is_and ? "and_button" : "or_button");
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (w), TRUE);
} else if (!is_expr &&
GNM_FILTER_OP_TOP_N == (op & GNM_FILTER_OP_TYPE_MASK)) {
- w = gnm_xml_get_widget (state->gui, "top_vs_bottom_option_menu");
+ w = go_gtk_builder_get_widget (state->gui, "top_vs_bottom_option_menu");
gtk_combo_box_set_active (GTK_COMBO_BOX (w), (op & 1) ? 1 : 0);
- w = gnm_xml_get_widget (state->gui, "item_vs_percentage_option_menu");
+ w = go_gtk_builder_get_widget (state->gui, "item_vs_percentage_option_menu");
gtk_combo_box_set_active (GTK_COMBO_BOX (w), (op & 2) ? 1 : 0);
- w = gnm_xml_get_widget (state->gui, "item_count");
+ w = go_gtk_builder_get_widget (state->gui, "item_count");
gtk_spin_button_set_value (GTK_SPIN_BUTTON (w),
cond->count);
}
} else {
/* initialize the combo boxes (not done by li.ui) */
if (is_expr) {
- w = gnm_xml_get_widget (state->gui, "op0");
+ w = go_gtk_builder_get_widget (state->gui, "op0");
gtk_combo_box_set_active (GTK_COMBO_BOX (w), 0);
- w = gnm_xml_get_widget (state->gui, "op1");
+ w = go_gtk_builder_get_widget (state->gui, "op1");
gtk_combo_box_set_active (GTK_COMBO_BOX (w), 0);
} else {
- w = gnm_xml_get_widget (state->gui, "top_vs_bottom_option_menu");
+ w = go_gtk_builder_get_widget (state->gui, "top_vs_bottom_option_menu");
gtk_combo_box_set_active (GTK_COMBO_BOX (w), 0);
- w = gnm_xml_get_widget (state->gui, "item_vs_percentage_option_menu");
+ w = go_gtk_builder_get_widget (state->gui, "item_vs_percentage_option_menu");
gtk_combo_box_set_active (GTK_COMBO_BOX (w), 0);
}
}
- w = gnm_xml_get_widget (state->gui, "ok_button");
+ w = go_gtk_builder_get_widget (state->gui, "ok_button");
g_signal_connect (G_OBJECT (w),
"clicked",
G_CALLBACK (cb_autofilter_ok), state);
- w = gnm_xml_get_widget (state->gui, "cancel_button");
+ w = go_gtk_builder_get_widget (state->gui, "cancel_button");
g_signal_connect (G_OBJECT (w),
"clicked",
G_CALLBACK (cb_autofilter_cancel), state);
/* a candidate for merging into attach guru */
gnumeric_init_help_button (
- gnm_xml_get_widget (state->gui, "help_button"),
+ go_gtk_builder_get_widget (state->gui, "help_button"),
is_expr ? GNUMERIC_HELP_LINK_AUTOFILTER_CUSTOM :
GNUMERIC_HELP_LINK_AUTOFILTER_TOP_TEN);
diff --git a/src/dialogs/dialog-autoformat.c b/src/dialogs/dialog-autoformat.c
index 34a3e79..1bcf5e4 100644
--- a/src/dialogs/dialog-autoformat.c
+++ b/src/dialogs/dialog-autoformat.c
@@ -594,18 +594,18 @@ dialog_autoformat (WBCGtk *wbcg)
state->more_down = FALSE;
state->selected_template = NULL;
- state->dialog = GTK_DIALOG (gnm_xml_get_widget (gui, "dialog"));
- state->category = GTK_COMBO_BOX (gnm_xml_get_widget (gui, "format_category"));
- state->scroll = GTK_VSCROLLBAR (gnm_xml_get_widget (gui, "format_scroll"));
- state->gridlines = GTK_CHECK_MENU_ITEM (gnm_xml_get_widget (gui, "format_gridlines"));
+ state->dialog = GTK_DIALOG (go_gtk_builder_get_widget (gui, "dialog"));
+ state->category = GTK_COMBO_BOX (go_gtk_builder_get_widget (gui, "format_category"));
+ state->scroll = GTK_VSCROLLBAR (go_gtk_builder_get_widget (gui, "format_scroll"));
+ state->gridlines = GTK_CHECK_MENU_ITEM (go_gtk_builder_get_widget (gui, "format_gridlines"));
- state->info_name = GTK_ENTRY (gnm_xml_get_widget (gui, "format_info_name"));
- state->info_author = GTK_ENTRY (gnm_xml_get_widget (gui, "format_info_author"));
- state->info_cat = GTK_ENTRY (gnm_xml_get_widget (gui, "format_info_cat"));
- state->info_descr = GTK_TEXT_VIEW (gnm_xml_get_widget (gui, "format_info_descr"));
+ state->info_name = GTK_ENTRY (go_gtk_builder_get_widget (gui, "format_info_name"));
+ state->info_author = GTK_ENTRY (go_gtk_builder_get_widget (gui, "format_info_author"));
+ state->info_cat = GTK_ENTRY (go_gtk_builder_get_widget (gui, "format_info_cat"));
+ state->info_descr = GTK_TEXT_VIEW (go_gtk_builder_get_widget (gui, "format_info_descr"));
- state->ok = GTK_BUTTON (gnm_xml_get_widget (gui, "format_ok"));
- state->cancel = GTK_BUTTON (gnm_xml_get_widget (gui, "format_cancel"));
+ state->ok = GTK_BUTTON (go_gtk_builder_get_widget (gui, "format_ok"));
+ state->cancel = GTK_BUTTON (go_gtk_builder_get_widget (gui, "format_cancel"));
action_group = gtk_action_group_new ("settings-actions");
gtk_action_group_set_translation_domain (action_group, GETTEXT_PACKAGE);
@@ -629,14 +629,14 @@ dialog_autoformat (WBCGtk *wbcg)
state->gridlines = GTK_CHECK_MENU_ITEM (gtk_ui_manager_get_widget (ui_manager, "/bar/settings/gridlines"));
- gtk_box_pack_start (GTK_BOX (gnm_xml_get_widget (gui, "category-box")),
+ gtk_box_pack_start (GTK_BOX (go_gtk_builder_get_widget (gui, "category-box")),
gtk_ui_manager_get_widget (ui_manager, "/bar"),
FALSE, TRUE, 0);
for (i = 0; i < NUM_PREVIEWS; i++) {
char *name;
name = g_strdup_printf ("format_frame%d", i+1);
- state->frame[i] = GTK_FRAME (gnm_xml_get_widget (gui, name));
+ state->frame[i] = GTK_FRAME (go_gtk_builder_get_widget (gui, name));
g_free (name);
state->canvas[i] = GOC_CANVAS (g_object_new (GOC_TYPE_CANVAS, NULL));
@@ -709,7 +709,7 @@ dialog_autoformat (WBCGtk *wbcg)
}
gnumeric_init_help_button (
- gnm_xml_get_widget (gui, "help_button"),
+ go_gtk_builder_get_widget (gui, "help_button"),
GNUMERIC_HELP_LINK_AUTOFORMAT);
gtk_dialog_set_default_response (state->dialog, GTK_RESPONSE_OK);
diff --git a/src/dialogs/dialog-autosave.c b/src/dialogs/dialog-autosave.c
index ab353ba..17eedd9 100644
--- a/src/dialogs/dialog-autosave.c
+++ b/src/dialogs/dialog-autosave.c
@@ -137,12 +137,12 @@ dialog_autosave (WBCGtk *wbcg)
state->wbcg = wbcg;
state->wb = wb_control_get_workbook (WORKBOOK_CONTROL (wbcg));
- state->dialog = gnm_xml_get_widget (gui, "AutoSave");
- state->minutes_entry = gnm_xml_get_widget (gui, "minutes");
- state->prompt_cb = gnm_xml_get_widget (gui, "prompt_on_off");
- state->autosave_on_off = gnm_xml_get_widget (gui, "autosave_on_off");
- state->ok_button = gnm_xml_get_widget (gui, "button1");
- state->cancel_button = gnm_xml_get_widget (gui, "button2");
+ state->dialog = go_gtk_builder_get_widget (gui, "AutoSave");
+ state->minutes_entry = go_gtk_builder_get_widget (gui, "minutes");
+ state->prompt_cb = go_gtk_builder_get_widget (gui, "prompt_on_off");
+ state->autosave_on_off = go_gtk_builder_get_widget (gui, "autosave_on_off");
+ state->ok_button = go_gtk_builder_get_widget (gui, "button1");
+ state->cancel_button = go_gtk_builder_get_widget (gui, "button2");
if (!state->dialog || !state->minutes_entry || !state->prompt_cb ||
!state->autosave_on_off) {
@@ -174,7 +174,7 @@ dialog_autosave (WBCGtk *wbcg)
g_object_set_data_full (G_OBJECT (state->dialog),
"state", state, (GDestroyNotify)g_free);
gnumeric_init_help_button (
- gnm_xml_get_widget (gui, "button3"),
+ go_gtk_builder_get_widget (gui, "button3"),
GNUMERIC_HELP_LINK_AUTOSAVE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (state->autosave_on_off),
diff --git a/src/dialogs/dialog-cell-comment.c b/src/dialogs/dialog-cell-comment.c
index e7a3f9f..2b7f866 100644
--- a/src/dialogs/dialog-cell-comment.c
+++ b/src/dialogs/dialog-cell-comment.c
@@ -70,7 +70,7 @@ cb_cell_comment_ok_clicked (G_GNUC_UNUSED GtkWidget *button,
char const *author;
author = gtk_entry_get_text
- (GTK_ENTRY (gnm_xml_get_widget
+ (GTK_ENTRY (go_gtk_builder_get_widget
(state->gui, "new-author-entry")));
g_object_get (G_OBJECT (state->gtv), "text", &text,
"attributes", &attr, NULL);
@@ -118,10 +118,10 @@ dialog_cell_comment (WBCGtk *wbcg, Sheet *sheet, GnmCellPos const *pos)
state->pos = pos;
state->gui = gui;
- state->dialog = gnm_xml_get_widget (state->gui, "comment_dialog");
+ state->dialog = go_gtk_builder_get_widget (state->gui, "comment_dialog");
g_return_if_fail (state->dialog != NULL);
- box = gnm_xml_get_widget (state->gui, "dialog-vbox");
+ box = go_gtk_builder_get_widget (state->gui, "dialog-vbox");
g_return_if_fail (box != NULL);
state->gtv = gnm_text_view_new ();
gtk_widget_show_all (GTK_WIDGET (state->gtv));
@@ -137,8 +137,8 @@ dialog_cell_comment (WBCGtk *wbcg, Sheet *sheet, GnmCellPos const *pos)
cellref_as_string (&out, &ref, FALSE);
cell_name = g_string_free (out.accum, FALSE);
- old_author = gnm_xml_get_widget (state->gui, "old-author-entry");
- new_author = gnm_xml_get_widget (state->gui, "new-author-entry");
+ old_author = go_gtk_builder_get_widget (state->gui, "old-author-entry");
+ new_author = go_gtk_builder_get_widget (state->gui, "new-author-entry");
real_user = g_get_real_name ();
if ((real_user != NULL) && g_utf8_validate (real_user, -1, NULL)) {
@@ -167,30 +167,30 @@ dialog_cell_comment (WBCGtk *wbcg, Sheet *sheet, GnmCellPos const *pos)
title = g_strdup_printf (_("New Cell Comment (%s)"),
cell_name);
gtk_widget_hide (old_author);
- gtk_widget_hide (gnm_xml_get_widget (state->gui,
+ gtk_widget_hide (go_gtk_builder_get_widget (state->gui,
"old-author-label"));
}
gtk_window_set_title (GTK_WINDOW (state->dialog), title);
g_free (title);
- state->ok_button = gnm_xml_get_widget (state->gui, "ok_button");
+ state->ok_button = go_gtk_builder_get_widget (state->gui, "ok_button");
g_signal_connect (G_OBJECT (state->ok_button),
"clicked",
G_CALLBACK (cb_cell_comment_ok_clicked), state);
- state->cancel_button = gnm_xml_get_widget (state->gui, "cancel_button");
+ state->cancel_button = go_gtk_builder_get_widget (state->gui, "cancel_button");
g_signal_connect (G_OBJECT (state->cancel_button),
"clicked",
G_CALLBACK (cb_cell_comment_cancel_clicked), state);
- check = gnm_xml_get_widget (state->gui, "wrap-check");
+ check = go_gtk_builder_get_widget (state->gui, "wrap-check");
g_signal_connect (G_OBJECT (check),
"toggled",
G_CALLBACK (cb_wrap_toggled), state->gtv);
cb_wrap_toggled (GTK_TOGGLE_BUTTON (check), G_OBJECT (state->gtv));
gnumeric_init_help_button (
- gnm_xml_get_widget (state->gui, "help_button"),
+ go_gtk_builder_get_widget (state->gui, "help_button"),
GNUMERIC_HELP_LINK_CELL_COMMENT);
wbc_gtk_attach_guru (state->wbcg, state->dialog);
diff --git a/src/dialogs/dialog-cell-format.c b/src/dialogs/dialog-cell-format.c
index 8271721..0b0c995 100644
--- a/src/dialogs/dialog-cell-format.c
+++ b/src/dialogs/dialog-cell-format.c
@@ -315,7 +315,7 @@ setup_pattern_button (GdkScreen *screen,
int const select_index,
unsigned size)
{
- GtkWidget *tmp = gnm_xml_get_widget (gui, name);
+ GtkWidget *tmp = go_gtk_builder_get_widget (gui, name);
if (tmp != NULL) {
GtkButton *button = GTK_BUTTON (tmp);
if (flag) {
@@ -411,11 +411,11 @@ setup_color_pickers (FormatState *state,
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_OUT);
gtk_container_add (GTK_CONTAINER (frame), combo);
- w = gnm_xml_get_widget (state->gui, container);
+ w = go_gtk_builder_get_widget (state->gui, container);
gtk_box_pack_start (GTK_BOX (w), frame, FALSE, FALSE, 0);
gtk_widget_show_all (frame);
- w = gnm_xml_get_widget (state->gui, label);
+ w = go_gtk_builder_get_widget (state->gui, label);
gtk_label_set_mnemonic_widget (GTK_LABEL (w), combo);
if (def_sc)
@@ -434,7 +434,7 @@ setup_color_pickers (FormatState *state,
static GtkWidget *
init_button_image (GtkBuilder *gui, char const *name)
{
- GtkWidget *tmp = gnm_xml_get_widget (gui, name);
+ GtkWidget *tmp = go_gtk_builder_get_widget (gui, name);
if (tmp != NULL) {
GdkScreen *screen = gtk_widget_get_screen (tmp);
GdkPixbuf *pixbuf = gtk_icon_theme_load_icon (
@@ -570,7 +570,7 @@ fmt_dialog_init_align_radio (char const *const name,
FormatState *state,
GCallback handler)
{
- GtkWidget *tmp = gnm_xml_get_widget (state->gui, name);
+ GtkWidget *tmp = go_gtk_builder_get_widget (state->gui, name);
if (tmp != NULL) {
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (tmp),
val == target);
@@ -648,7 +648,7 @@ fmt_dialog_init_align_page (FormatState *state)
if (0 == (state->conflicts & (1 << MSTYLE_WRAP_TEXT)))
wrap = gnm_style_get_wrap_text (state->style);
- w = gnm_xml_get_widget (state->gui, "align_wrap");
+ w = go_gtk_builder_get_widget (state->gui, "align_wrap");
state->align.wrap = GTK_CHECK_BUTTON (w);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (w), wrap);
g_signal_connect (G_OBJECT (w),
@@ -662,8 +662,8 @@ fmt_dialog_init_align_page (FormatState *state)
state->align.indent = gnm_style_get_indent (state->style);
state->align.indent_label =
- gnm_xml_get_widget (state->gui, "halign_indent_label");
- w = gnm_xml_get_widget (state->gui, "halign_indent");
+ go_gtk_builder_get_widget (state->gui, "halign_indent_label");
+ w = go_gtk_builder_get_widget (state->gui, "halign_indent");
state->align.indent_button = GTK_SPIN_BUTTON (w);
gtk_spin_button_set_value (state->align.indent_button, state->align.indent);
gtk_widget_set_sensitive (GTK_WIDGET (state->align.indent_button),
@@ -689,7 +689,7 @@ fmt_dialog_init_align_page (FormatState *state)
} else
r = 0;
state->align.rotation = (GORotationSel *) go_rotation_sel_new ();
- gtk_box_pack_start (GTK_BOX (gnm_xml_get_widget (state->gui, "alignment_box")),
+ gtk_box_pack_start (GTK_BOX (go_gtk_builder_get_widget (state->gui, "alignment_box")),
GTK_WIDGET (state->align.rotation), TRUE, TRUE, 0);
go_rotation_sel_set_rotation (state->align.rotation, r);
g_signal_connect (G_OBJECT (state->align.rotation), "rotation-changed",
@@ -811,10 +811,10 @@ fmt_dialog_init_font_page (FormatState *state)
{
GtkWidget *tmp = font_selector_new ();
FontSelector *font_widget = FONT_SELECTOR (tmp);
- GtkWidget *container = gnm_xml_get_widget (state->gui, "font_box");
+ GtkWidget *container = go_gtk_builder_get_widget (state->gui, "font_box");
GtkWidget *uline = go_combo_text_new_default ();
char const *uline_str;
- GtkWidget *strike = gnm_xml_get_widget (state->gui, "strikethrough_button");
+ GtkWidget *strike = go_gtk_builder_get_widget (state->gui, "strikethrough_button");
gboolean strikethrough = FALSE;
GOFontScript script = GO_FONT_SCRIPT_STANDARD;
int i;
@@ -861,10 +861,10 @@ fmt_dialog_init_font_page (FormatState *state)
"entry_changed",
G_CALLBACK (cb_font_underline_changed), state);
gtk_widget_show_all (uline);
- gtk_box_pack_start (GTK_BOX (gnm_xml_get_widget (state->gui, "underline-box")),
+ gtk_box_pack_start (GTK_BOX (go_gtk_builder_get_widget (state->gui, "underline-box")),
uline, TRUE, TRUE, 0);
- tmp = gnm_xml_get_widget (state->gui, "underline_label");
+ tmp = go_gtk_builder_get_widget (state->gui, "underline_label");
gtk_label_set_mnemonic_widget (GTK_LABEL (tmp), uline);
if (0 == (state->conflicts & (1 << MSTYLE_FONT_STRIKETHROUGH)))
@@ -878,14 +878,14 @@ fmt_dialog_init_font_page (FormatState *state)
if (0 == (state->conflicts & (1 << MSTYLE_FONT_SCRIPT)))
script = gnm_style_get_font_script (state->style);
font_selector_set_script (state->font.selector, script);
- if (NULL != (tmp = gnm_xml_get_widget (state->gui, "superscript_button"))) {
+ if (NULL != (tmp = go_gtk_builder_get_widget (state->gui, "superscript_button"))) {
state->font.superscript = GTK_TOGGLE_BUTTON (tmp);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (tmp),
script == GO_FONT_SCRIPT_SUPER);
g_signal_connect (G_OBJECT (tmp), "toggled",
G_CALLBACK (cb_font_script_toggle), state);
}
- if (NULL != (tmp = gnm_xml_get_widget (state->gui, "subscript_button"))) {
+ if (NULL != (tmp = go_gtk_builder_get_widget (state->gui, "subscript_button"))) {
state->font.subscript = GTK_TOGGLE_BUTTON (tmp);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (tmp),
script == GO_FONT_SCRIPT_SUB);
@@ -980,7 +980,7 @@ fmt_dialog_init_background_page (FormatState *state)
state->back.canvas = GOC_CANVAS (widget);
gtk_widget_set_size_request (widget, w, h);
- widget = gnm_xml_get_widget (state->gui, "back_sample_frame");
+ widget = go_gtk_builder_get_widget (state->gui, "back_sample_frame");
gtk_container_add (GTK_CONTAINER (widget),
GTK_WIDGET (state->back.canvas));
gtk_widget_show_all (widget);
@@ -1265,7 +1265,7 @@ draw_border_preview (FormatState *state)
gtk_widget_show (GTK_WIDGET (state->border.canvas));
gtk_widget_set_size_request (GTK_WIDGET (state->border.canvas),
150, 100);
- gtk_container_add (GTK_CONTAINER (gnm_xml_get_widget (state->gui, "border_sample_container")),
+ gtk_container_add (GTK_CONTAINER (go_gtk_builder_get_widget (state->gui, "border_sample_container")),
GTK_WIDGET (state->border.canvas));
group = GOC_GROUP (goc_canvas_get_root (state->border.canvas));
@@ -1517,7 +1517,7 @@ fmt_dialog_init_protection_page (FormatState *state)
flag = (state->conflicts & (1 << MSTYLE_CONTENTS_LOCKED))
? FALSE : gnm_style_get_contents_locked (state->style);
- w = gnm_xml_get_widget (state->gui, "protection_locked");
+ w = go_gtk_builder_get_widget (state->gui, "protection_locked");
state->protection.locked = GTK_CHECK_BUTTON (w);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (w), flag);
g_signal_connect (G_OBJECT (w),
@@ -1526,7 +1526,7 @@ fmt_dialog_init_protection_page (FormatState *state)
flag = (state->conflicts & (1 << MSTYLE_CONTENTS_HIDDEN))
? FALSE : gnm_style_get_contents_hidden (state->style);
- w = gnm_xml_get_widget (state->gui, "protection_hidden");
+ w = go_gtk_builder_get_widget (state->gui, "protection_hidden");
state->protection.hidden = GTK_CHECK_BUTTON (w);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (w), flag);
g_signal_connect (G_OBJECT (w),
@@ -1535,7 +1535,7 @@ fmt_dialog_init_protection_page (FormatState *state)
state->protection.sheet_protected_changed = FALSE;
flag = state->sheet->is_protected;
- w = gnm_xml_get_widget (state->gui, "protection_sheet_protected");
+ w = go_gtk_builder_get_widget (state->gui, "protection_sheet_protected");
state->protection.sheet_protected = GTK_CHECK_BUTTON (w);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (w), flag);
g_signal_connect (G_OBJECT (w),
@@ -1735,7 +1735,7 @@ static void
fmt_dialog_init_validation_expr_entry (FormatState *state, ExprEntry *entry,
char const *name, int i)
{
- entry->name = GTK_LABEL (gnm_xml_get_widget (state->gui, name));
+ entry->name = GTK_LABEL (go_gtk_builder_get_widget (state->gui, name));
entry->entry = gnm_expr_entry_new (state->wbcg, TRUE);
gtk_table_attach (state->validation.criteria_table,
GTK_WIDGET (entry->entry),
@@ -1824,23 +1824,23 @@ fmt_dialog_init_validation_page (FormatState *state)
/* Setup widgets */
state->validation.changed = FALSE;
state->validation.valid = 1;
- state->validation.criteria_table = GTK_TABLE (gnm_xml_get_widget (state->gui, "validation_criteria_table"));
- state->validation.constraint_type = GTK_COMBO_BOX (gnm_xml_get_widget (state->gui, "validation_constraint_type"));
+ state->validation.criteria_table = GTK_TABLE (go_gtk_builder_get_widget (state->gui, "validation_criteria_table"));
+ state->validation.constraint_type = GTK_COMBO_BOX (go_gtk_builder_get_widget (state->gui, "validation_constraint_type"));
gtk_combo_box_set_active (state->validation.constraint_type, 0);
- state->validation.operator_label = GTK_LABEL (gnm_xml_get_widget (state->gui, "validation_operator_label"));
- state->validation.op = GTK_COMBO_BOX (gnm_xml_get_widget (state->gui, "validation_operator"));
+ state->validation.operator_label = GTK_LABEL (go_gtk_builder_get_widget (state->gui, "validation_operator_label"));
+ state->validation.op = GTK_COMBO_BOX (go_gtk_builder_get_widget (state->gui, "validation_operator"));
gtk_combo_box_set_active (state->validation.op, 0);
- state->validation.allow_blank = GTK_TOGGLE_BUTTON(gnm_xml_get_widget (state->gui, "validation_ignore_blank"));
- state->validation.use_dropdown = GTK_TOGGLE_BUTTON(gnm_xml_get_widget (state->gui, "validation_in_dropdown"));
- state->validation.error.action_label = GTK_LABEL (gnm_xml_get_widget (state->gui, "validation_error_action_label"));
- state->validation.error.title_label = GTK_LABEL (gnm_xml_get_widget (state->gui, "validation_error_title_label"));
- state->validation.error.msg_label = GTK_LABEL (gnm_xml_get_widget (state->gui, "validation_error_msg_label"));
- state->validation.error.action = GTK_COMBO_BOX (gnm_xml_get_widget (state->gui, "validation_error_action"));
+ state->validation.allow_blank = GTK_TOGGLE_BUTTON(go_gtk_builder_get_widget (state->gui, "validation_ignore_blank"));
+ state->validation.use_dropdown = GTK_TOGGLE_BUTTON(go_gtk_builder_get_widget (state->gui, "validation_in_dropdown"));
+ state->validation.error.action_label = GTK_LABEL (go_gtk_builder_get_widget (state->gui, "validation_error_action_label"));
+ state->validation.error.title_label = GTK_LABEL (go_gtk_builder_get_widget (state->gui, "validation_error_title_label"));
+ state->validation.error.msg_label = GTK_LABEL (go_gtk_builder_get_widget (state->gui, "validation_error_msg_label"));
+ state->validation.error.action = GTK_COMBO_BOX (go_gtk_builder_get_widget (state->gui, "validation_error_action"));
build_validation_error_combo (state->validation.error.action);
gtk_combo_box_set_active (state->validation.error.action, 0);
- state->validation.error.title = GTK_ENTRY (gnm_xml_get_widget (state->gui, "validation_error_title"));
- state->validation.error.msg = GTK_TEXT_VIEW (gnm_xml_get_widget (state->gui, "validation_error_msg"));
- state->validation.error.image = GTK_IMAGE (gnm_xml_get_widget (state->gui, "validation_error_image"));
+ state->validation.error.title = GTK_ENTRY (go_gtk_builder_get_widget (state->gui, "validation_error_title"));
+ state->validation.error.msg = GTK_TEXT_VIEW (go_gtk_builder_get_widget (state->gui, "validation_error_msg"));
+ state->validation.error.image = GTK_IMAGE (go_gtk_builder_get_widget (state->gui, "validation_error_image"));
gnumeric_editable_enters (
GTK_WINDOW (state->dialog),
@@ -1931,11 +1931,11 @@ fmt_dialog_init_input_msg_page (FormatState *state)
#endif
/* Setup widgets */
- state->input_msg.flag = GTK_TOGGLE_BUTTON (gnm_xml_get_widget (state->gui, "input_msg_flag"));
- state->input_msg.title_label = GTK_LABEL (gnm_xml_get_widget (state->gui, "input_msg_title_label"));
- state->input_msg.msg_label = GTK_LABEL (gnm_xml_get_widget (state->gui, "input_msg_msg_label"));
- state->input_msg.title = GTK_ENTRY (gnm_xml_get_widget (state->gui, "input_msg_title"));
- state->input_msg.msg = GTK_TEXT_VIEW (gnm_xml_get_widget (state->gui, "input_msg_msg"));
+ state->input_msg.flag = GTK_TOGGLE_BUTTON (go_gtk_builder_get_widget (state->gui, "input_msg_flag"));
+ state->input_msg.title_label = GTK_LABEL (go_gtk_builder_get_widget (state->gui, "input_msg_title_label"));
+ state->input_msg.msg_label = GTK_LABEL (go_gtk_builder_get_widget (state->gui, "input_msg_msg_label"));
+ state->input_msg.title = GTK_ENTRY (go_gtk_builder_get_widget (state->gui, "input_msg_title"));
+ state->input_msg.msg = GTK_TEXT_VIEW (go_gtk_builder_get_widget (state->gui, "input_msg_msg"));
gnumeric_editable_enters (
GTK_WINDOW (state->dialog),
@@ -2189,26 +2189,26 @@ fmt_dialog_init_conditions_page (FormatState *state)
g_return_if_fail (state != NULL);
- state->conditions.add = GTK_BUTTON (gnm_xml_get_widget (state->gui,
+ state->conditions.add = GTK_BUTTON (go_gtk_builder_get_widget (state->gui,
"conditions_add"));
gtk_widget_set_sensitive (GTK_WIDGET (state->conditions.add), FALSE);
- state->conditions.remove = GTK_BUTTON (gnm_xml_get_widget (state->gui,
+ state->conditions.remove = GTK_BUTTON (go_gtk_builder_get_widget (state->gui,
"conditions_remove"));
gtk_widget_set_sensitive (GTK_WIDGET (state->conditions.remove), FALSE);
- state->conditions.clear = GTK_BUTTON (gnm_xml_get_widget (state->gui,
+ state->conditions.clear = GTK_BUTTON (go_gtk_builder_get_widget (state->gui,
"conditions_clear"));
gtk_widget_set_sensitive (GTK_WIDGET (state->conditions.clear), FALSE);
- state->conditions.expand = GTK_BUTTON (gnm_xml_get_widget (state->gui,
+ state->conditions.expand = GTK_BUTTON (go_gtk_builder_get_widget (state->gui,
"conditions_expand"));
gtk_widget_set_sensitive (GTK_WIDGET (state->conditions.expand), FALSE);
- state->conditions.edit = GTK_BUTTON (gnm_xml_get_widget (state->gui,
+ state->conditions.edit = GTK_BUTTON (go_gtk_builder_get_widget (state->gui,
"conditions_edit"));
gtk_widget_set_sensitive (GTK_WIDGET (state->conditions.edit), FALSE);
state->conditions.model = gtk_tree_store_new (CONDITIONS_NUM_COLUMNS,
G_TYPE_STRING,
G_TYPE_STRING);
- treeview = GTK_TREE_VIEW (gnm_xml_get_widget (state->gui, "conditions_treeview"));
+ treeview = GTK_TREE_VIEW (go_gtk_builder_get_widget (state->gui, "conditions_treeview"));
gtk_tree_view_set_fixed_height_mode (treeview, FALSE);
gtk_tree_view_set_model (treeview, GTK_TREE_MODEL (state->conditions.model));
renderer = gtk_cell_renderer_text_new ();
@@ -2221,7 +2221,7 @@ fmt_dialog_init_conditions_page (FormatState *state)
gtk_tree_view_insert_column (treeview, column, -1);
gtk_tree_view_set_expander_column (treeview, column);
- state->conditions.label = GTK_LABEL (gnm_xml_get_widget (state->gui,
+ state->conditions.label = GTK_LABEL (go_gtk_builder_get_widget (state->gui,
"conditions_label"));
if (state->conflicts & (1 << MSTYLE_CONDITIONS)) {
gtk_label_set_markup (state->conditions.label,
@@ -2363,13 +2363,13 @@ set_initial_focus (FormatState *s)
go_format_sel_set_focus (GO_FORMAT_SEL (s->format_sel));
return;
} else if (strcmp (name, "alignment_box") == 0)
- focus_widget = gnm_xml_get_widget (s->gui, "halign_left");
+ focus_widget = go_gtk_builder_get_widget (s->gui, "halign_left");
else if (strcmp (name, "font_box") == 0)
focus_widget = GTK_WIDGET (s->font.selector);
else if (strcmp (name, "border_box") == 0)
- focus_widget = gnm_xml_get_widget (s->gui, "outline_border");
+ focus_widget = go_gtk_builder_get_widget (s->gui, "outline_border");
else if (strcmp (name, "background_box") == 0)
- focus_widget = gnm_xml_get_widget (s->gui, "back_color_auto");
+ focus_widget = go_gtk_builder_get_widget (s->gui, "back_color_auto");
else if (strcmp (name, "protection_box") == 0)
focus_widget = GTK_WIDGET (s->protection.locked);
else
@@ -2469,14 +2469,14 @@ fmt_dialog_impl (FormatState *state, FormatDialogPosition_t pageno)
GOColor default_border_color;
int default_border_style = GNM_STYLE_BORDER_THIN;
- GtkWidget *tmp, *dialog = gnm_xml_get_widget (state->gui, "CellFormat");
+ GtkWidget *tmp, *dialog = go_gtk_builder_get_widget (state->gui, "CellFormat");
g_return_if_fail (dialog != NULL);
gtk_window_set_title (GTK_WINDOW (dialog), _("Format Cells"));
/* Initialize */
state->dialog = GTK_DIALOG (dialog);
- state->notebook = GTK_NOTEBOOK (gnm_xml_get_widget (state->gui, "notebook"));
+ state->notebook = GTK_NOTEBOOK (go_gtk_builder_get_widget (state->gui, "notebook"));
state->enable_edit = FALSE; /* Enable below */
@@ -2607,19 +2607,19 @@ fmt_dialog_impl (FormatState *state, FormatDialogPosition_t pageno)
draw_border_preview (state);
gnumeric_init_help_button (
- gnm_xml_get_widget (state->gui, "helpbutton"),
+ go_gtk_builder_get_widget (state->gui, "helpbutton"),
GNUMERIC_HELP_LINK_CELL_FORMAT);
- state->ok_button = gnm_xml_get_widget (state->gui, "okbutton");
+ state->ok_button = go_gtk_builder_get_widget (state->gui, "okbutton");
g_signal_connect (G_OBJECT (state->ok_button),
"clicked",
G_CALLBACK (cb_fmt_dialog_dialog_buttons), state);
- state->apply_button = gnm_xml_get_widget (state->gui, "applybutton");
+ state->apply_button = go_gtk_builder_get_widget (state->gui, "applybutton");
gtk_widget_set_sensitive (state->apply_button, FALSE);
g_signal_connect (G_OBJECT (state->apply_button),
"clicked",
G_CALLBACK (cb_fmt_dialog_dialog_buttons), state);
- tmp = gnm_xml_get_widget (state->gui, "cancelbutton");
+ tmp = go_gtk_builder_get_widget (state->gui, "cancelbutton");
g_signal_connect (G_OBJECT (tmp),
"clicked",
G_CALLBACK (cb_fmt_dialog_dialog_buttons), state);
diff --git a/src/dialogs/dialog-cell-sort.c b/src/dialogs/dialog-cell-sort.c
index 77ad555..b41f58b 100644
--- a/src/dialogs/dialog-cell-sort.c
+++ b/src/dialogs/dialog-cell-sort.c
@@ -957,7 +957,7 @@ dialog_init (SortFlowState *state)
gboolean col_rb;
GnmRange const *range;
- table = GTK_TABLE (gnm_xml_get_widget (state->gui, "cell_sort_options_table"));
+ table = GTK_TABLE (go_gtk_builder_get_widget (state->gui, "cell_sort_options_table"));
/* setup range entry */
state->range_entry = gnm_expr_entry_new (state->wbcg, TRUE);
gnm_expr_entry_set_flags (state->range_entry,
@@ -982,7 +982,7 @@ dialog_init (SortFlowState *state)
GTK_EXPAND | GTK_FILL, 0,
0, 0);
- table = GTK_TABLE (gnm_xml_get_widget (state->gui, "cell_sort_spec_table"));
+ table = GTK_TABLE (go_gtk_builder_get_widget (state->gui, "cell_sort_spec_table"));
/* setup add entry */
state->add_entry = gnm_expr_entry_new (state->wbcg, TRUE);
gnm_expr_entry_set_flags (state->add_entry,
@@ -997,7 +997,7 @@ dialog_init (SortFlowState *state)
gtk_widget_show (GTK_WIDGET (state->add_entry));
/* Set-up tree view */
- scrolled = gnm_xml_get_widget (state->gui, "scrolled_cell_sort_list");
+ scrolled = go_gtk_builder_get_widget (state->gui, "scrolled_cell_sort_list");
state->model = gtk_list_store_new (NUM_COLMNS, G_TYPE_STRING,
G_TYPE_STRING, G_TYPE_BOOLEAN,
GDK_TYPE_PIXBUF, G_TYPE_BOOLEAN,
@@ -1068,45 +1068,45 @@ dialog_init (SortFlowState *state)
gtk_widget_show (GTK_WIDGET (state->treeview));
/* Set-up other widgets */
- state->cell_sort_row_rb = gnm_xml_get_widget (state->gui, "cell_sort_row_rb");
- state->cell_sort_col_rb = gnm_xml_get_widget (state->gui, "cell_sort_col_rb");
+ state->cell_sort_row_rb = go_gtk_builder_get_widget (state->gui, "cell_sort_row_rb");
+ state->cell_sort_col_rb = go_gtk_builder_get_widget (state->gui, "cell_sort_col_rb");
g_signal_connect_swapped (G_OBJECT (state->cell_sort_row_rb),
"toggled",
G_CALLBACK (cb_update_to_new_range), state);
- state->cell_sort_header_check = gnm_xml_get_widget (state->gui,
+ state->cell_sort_header_check = go_gtk_builder_get_widget (state->gui,
"cell_sort_header_check");
g_signal_connect_swapped (G_OBJECT (state->cell_sort_header_check),
"toggled",
G_CALLBACK (cb_sort_header_check), state);
- state->retain_format_check = gnm_xml_get_widget (state->gui,
+ state->retain_format_check = go_gtk_builder_get_widget (state->gui,
"retain_format_button");
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (state->retain_format_check),
gnm_conf_get_core_sort_default_retain_formats ());
/* Set-up buttons */
- state->up_button = gnm_xml_get_widget (state->gui, "up_button");
+ state->up_button = go_gtk_builder_get_widget (state->gui, "up_button");
g_signal_connect_swapped (G_OBJECT (state->up_button),
"clicked",
G_CALLBACK (cb_up), state);
- state->down_button = gnm_xml_get_widget (state->gui, "down_button");
+ state->down_button = go_gtk_builder_get_widget (state->gui, "down_button");
g_signal_connect_swapped (G_OBJECT (state->down_button),
"clicked",
G_CALLBACK (cb_down), state);
- state->add_button = gnm_xml_get_widget (state->gui, "add_button");
+ state->add_button = go_gtk_builder_get_widget (state->gui, "add_button");
g_signal_connect_swapped (G_OBJECT (state->add_button),
"clicked",
G_CALLBACK (cb_add_clicked), state);
gtk_widget_set_sensitive (state->add_button, TRUE);
- state->delete_button = gnm_xml_get_widget (state->gui, "delete_button");
+ state->delete_button = go_gtk_builder_get_widget (state->gui, "delete_button");
g_signal_connect (G_OBJECT (state->delete_button),
"clicked",
G_CALLBACK (cb_delete_clicked), state);
gtk_widget_set_sensitive (state->delete_button, FALSE);
- state->clear_button = gnm_xml_get_widget (state->gui, "clear_button");
+ state->clear_button = go_gtk_builder_get_widget (state->gui, "clear_button");
g_signal_connect_swapped (G_OBJECT (state->clear_button),
"clicked",
G_CALLBACK (cb_clear_clicked), state);
@@ -1118,14 +1118,14 @@ dialog_init (SortFlowState *state)
gtk_button_set_alignment (GTK_BUTTON (state->delete_button), 0., .5);
gtk_button_set_alignment (GTK_BUTTON (state->clear_button), 0., .5);
gnumeric_init_help_button (
- gnm_xml_get_widget (state->gui, "help_button"),
+ go_gtk_builder_get_widget (state->gui, "help_button"),
GNUMERIC_HELP_LINK_CELL_SORT);
- state->ok_button = gnm_xml_get_widget (state->gui, "ok_button");
+ state->ok_button = go_gtk_builder_get_widget (state->gui, "ok_button");
g_signal_connect_swapped (G_OBJECT (state->ok_button),
"clicked",
G_CALLBACK (cb_dialog_ok_clicked), state);
- state->cancel_button = gnm_xml_get_widget (state->gui, "cancel_button");
+ state->cancel_button = go_gtk_builder_get_widget (state->gui, "cancel_button");
g_signal_connect (G_OBJECT (state->cancel_button),
"clicked",
G_CALLBACK (cb_dialog_cancel_clicked), state);
@@ -1172,7 +1172,7 @@ dialog_cell_sort (WBCGtk *wbcg)
state->sel = NULL;
state->sort_items = 0;
state->gui = gui;
- state->dialog = gnm_xml_get_widget (state->gui, "CellSort");
+ state->dialog = go_gtk_builder_get_widget (state->gui, "CellSort");
state->image_ascending =
gtk_widget_render_icon (state->dialog,
diff --git a/src/dialogs/dialog-col-row.c b/src/dialogs/dialog-col-row.c
index 14d672e..078fa32 100644
--- a/src/dialogs/dialog-col-row.c
+++ b/src/dialogs/dialog-col-row.c
@@ -69,7 +69,7 @@ cb_dialog_col_row_ok_clicked (G_GNUC_UNUSED GtkWidget *button,
{
state->callback (state->wbcg,
gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON
- (gnm_xml_get_widget (state->gui,
+ (go_gtk_builder_get_widget (state->gui,
"cols"))),
state->data);
gtk_widget_destroy (state->dialog);
@@ -97,20 +97,20 @@ dialog_col_row (WBCGtk *wbcg, char const *operation,
state->data = data;
state->gui = gui;
- state->dialog = gnm_xml_get_widget (state->gui, "dialog");
+ state->dialog = go_gtk_builder_get_widget (state->gui, "dialog");
- state->ok_button = gnm_xml_get_widget (state->gui, "ok_button");
+ state->ok_button = go_gtk_builder_get_widget (state->gui, "ok_button");
g_signal_connect (G_OBJECT (state->ok_button),
"clicked",
G_CALLBACK (cb_dialog_col_row_ok_clicked), state);
- state->cancel_button = gnm_xml_get_widget (state->gui, "cancel_button");
+ state->cancel_button = go_gtk_builder_get_widget (state->gui, "cancel_button");
g_signal_connect (G_OBJECT (state->cancel_button),
"clicked",
G_CALLBACK (cb_dialog_col_row_cancel_clicked), state);
gnumeric_init_help_button (
- gnm_xml_get_widget (state->gui, "help_button"),
+ go_gtk_builder_get_widget (state->gui, "help_button"),
GNUMERIC_HELP_LINK_GROUP_UNGROUP);
gtk_window_set_title (GTK_WINDOW (state->dialog), operation);
diff --git a/src/dialogs/dialog-col-width.c b/src/dialogs/dialog-col-width.c
index f49fc47..52bd60a 100644
--- a/src/dialogs/dialog-col-width.c
+++ b/src/dialogs/dialog-col-width.c
@@ -255,39 +255,39 @@ dialog_col_width (WBCGtk *wbcg, gboolean use_default)
state->sv = wb_control_cur_sheet_view (WORKBOOK_CONTROL (wbcg));
state->sheet = sv_sheet (state->sv);
state->adjusting = FALSE;
- state->dialog = gnm_xml_get_widget (gui, "dialog");
+ state->dialog = go_gtk_builder_get_widget (gui, "dialog");
- state->description = GTK_WIDGET (gnm_xml_get_widget (gui, "description"));
- state->points = GTK_WIDGET (gnm_xml_get_widget (gui, "pts-label"));
+ state->description = GTK_WIDGET (go_gtk_builder_get_widget (gui, "description"));
+ state->points = GTK_WIDGET (go_gtk_builder_get_widget (gui, "pts-label"));
- state->spin = GTK_SPIN_BUTTON (gnm_xml_get_widget (gui, "spin"));
+ state->spin = GTK_SPIN_BUTTON (go_gtk_builder_get_widget (gui, "spin"));
gtk_spin_button_get_adjustment (state->spin)->lower =
GNM_COL_MARGIN + GNM_COL_MARGIN;
g_signal_connect (G_OBJECT (state->spin),
"value-changed",
G_CALLBACK (cb_dialog_col_width_value_changed), state);
- state->default_check = GTK_WIDGET (gnm_xml_get_widget (gui, "default_check"));
+ state->default_check = GTK_WIDGET (go_gtk_builder_get_widget (gui, "default_check"));
g_signal_connect (G_OBJECT (state->default_check),
"clicked",
G_CALLBACK (cb_dialog_col_width_default_check_toggled), state);
- state->ok_button = gnm_xml_get_widget (gui, "ok_button");
+ state->ok_button = go_gtk_builder_get_widget (gui, "ok_button");
g_signal_connect (G_OBJECT (state->ok_button),
"clicked",
G_CALLBACK (cb_dialog_col_width_ok_clicked), state);
- state->apply_button = gnm_xml_get_widget (gui, "apply_button");
+ state->apply_button = go_gtk_builder_get_widget (gui, "apply_button");
g_signal_connect (G_OBJECT (state->apply_button),
"clicked",
G_CALLBACK (cb_dialog_col_width_apply_clicked), state);
- state->cancel_button = gnm_xml_get_widget (gui, "cancel_button");
+ state->cancel_button = go_gtk_builder_get_widget (gui, "cancel_button");
g_signal_connect (G_OBJECT (state->cancel_button),
"clicked",
G_CALLBACK (cb_dialog_col_width_cancel_clicked), state);
gnumeric_init_help_button (
- gnm_xml_get_widget (gui, "help_button"),
+ go_gtk_builder_get_widget (gui, "help_button"),
GNUMERIC_HELP_LINK_COL_WIDTH);
gnm_dialog_setup_destroy_handlers (GTK_DIALOG (state->dialog),
diff --git a/src/dialogs/dialog-consolidate.c b/src/dialogs/dialog-consolidate.c
index 9628670..191d5af 100644
--- a/src/dialogs/dialog-consolidate.c
+++ b/src/dialogs/dialog-consolidate.c
@@ -409,7 +409,7 @@ setup_widgets (ConsolidateState *state, GtkBuilder *gui)
gtk_combo_box_set_active (state->function, 0);
/* Begin: Source Areas View*/
- state->source_view = GTK_TREE_VIEW (gnm_xml_get_widget
+ state->source_view = GTK_TREE_VIEW (go_gtk_builder_get_widget
(gui,
"source_treeview"));
state->source_areas = GTK_TREE_MODEL(gtk_list_store_new
@@ -442,12 +442,12 @@ setup_widgets (ConsolidateState *state, GtkBuilder *gui)
gtk_tree_view_append_column (state->source_view, column);
/* End: Source Areas View*/
- state->clear = GTK_BUTTON (gnm_xml_get_widget (gui, "clear"));
- state->delete = GTK_BUTTON (gnm_xml_get_widget (gui, "delete"));
+ state->clear = GTK_BUTTON (go_gtk_builder_get_widget (gui, "clear"));
+ state->delete = GTK_BUTTON (go_gtk_builder_get_widget (gui, "delete"));
- state->labels_row = GTK_CHECK_BUTTON (gnm_xml_get_widget (gui, "labels_row"));
- state->labels_col = GTK_CHECK_BUTTON (gnm_xml_get_widget (gui, "labels_col"));
- state->labels_copy = GTK_CHECK_BUTTON (gnm_xml_get_widget (gui, "labels_copy"));
+ state->labels_row = GTK_CHECK_BUTTON (go_gtk_builder_get_widget (gui, "labels_row"));
+ state->labels_col = GTK_CHECK_BUTTON (go_gtk_builder_get_widget (gui, "labels_col"));
+ state->labels_copy = GTK_CHECK_BUTTON (go_gtk_builder_get_widget (gui, "labels_copy"));
cb_selection_changed (NULL, state);
g_signal_connect (selection,
diff --git a/src/dialogs/dialog-data-slicer.c b/src/dialogs/dialog-data-slicer.c
index 5daec19..c478ff8 100644
--- a/src/dialogs/dialog-data-slicer.c
+++ b/src/dialogs/dialog-data-slicer.c
@@ -259,8 +259,8 @@ dialog_data_slicer (WBCGtk *wbcg, gboolean create)
state->wbcg = wbcg;
state->sv = wb_control_cur_sheet_view (WORKBOOK_CONTROL (wbcg));
- state->dialog = gnm_xml_get_widget (gui, "dialog_data_slicer");
- state->notebook = gnm_xml_get_widget (gui, "notebook");
+ state->dialog = go_gtk_builder_get_widget (gui, "dialog_data_slicer");
+ state->notebook = go_gtk_builder_get_widget (gui, "notebook");
state->slicer = create ? NULL : sv_editpos_in_slicer (state->sv);
state->cache = NULL;
state->source = NULL;
@@ -280,18 +280,18 @@ dialog_data_slicer (WBCGtk *wbcg, gboolean create)
GNM_EE_SINGLE_RANGE, GNM_EE_MASK);
g_signal_connect_swapped (G_OBJECT (state->source_expr),
"changed", G_CALLBACK (cb_source_expr_changed), state);
- w = gnm_xml_get_widget (gui, "source_vbox");
+ w = go_gtk_builder_get_widget (gui, "source_vbox");
gtk_box_pack_start (GTK_BOX (w), GTK_WIDGET (state->source_expr), FALSE, FALSE, 0);
gtk_widget_show (GTK_WIDGET (state->source_expr));
- w = gnm_xml_get_widget (gui, "ok_button");
+ w = go_gtk_builder_get_widget (gui, "ok_button");
g_signal_connect (G_OBJECT (w), "clicked",
G_CALLBACK (cb_dialog_data_slicer_ok), state);
- w = gnm_xml_get_widget (gui, "cancel_button");
+ w = go_gtk_builder_get_widget (gui, "cancel_button");
g_signal_connect (G_OBJECT (w), "clicked",
G_CALLBACK (cb_dialog_data_slicer_cancel), state);
- state->treeview = GTK_TREE_VIEW (gnm_xml_get_widget (gui, "field_tree"));
+ state->treeview = GTK_TREE_VIEW (go_gtk_builder_get_widget (gui, "field_tree"));
gtk_tree_view_enable_model_drag_source (GTK_TREE_VIEW (state->treeview), GDK_BUTTON1_MASK,
row_targets, G_N_ELEMENTS (row_targets), GDK_ACTION_MOVE);
gtk_tree_view_enable_model_drag_dest (GTK_TREE_VIEW (state->treeview),
@@ -318,12 +318,12 @@ dialog_data_slicer (WBCGtk *wbcg, gboolean create)
gtk_ui_manager_insert_action_group (ui_manager, action_group, 0);
g_object_unref (action_group);
gtk_ui_manager_add_ui_from_string (ui_manager, ui_description, -1, NULL);
- gtk_box_pack_start (GTK_BOX (gnm_xml_get_widget (gui, "format-box")),
+ gtk_box_pack_start (GTK_BOX (go_gtk_builder_get_widget (gui, "format-box")),
gtk_ui_manager_get_widget (ui_manager, "/bar"),
FALSE, TRUE, 0);
/* a candidate for merging into attach guru */
- gnumeric_init_help_button (gnm_xml_get_widget (gui, "help_button"),
+ gnumeric_init_help_button (go_gtk_builder_get_widget (gui, "help_button"),
GNUMERIC_HELP_LINK_DATA_SLICER);
g_object_set_data_full (G_OBJECT (state->dialog),
"state", state, (GDestroyNotify)cb_dialog_data_slicer_destroy);
diff --git a/src/dialogs/dialog-data-table.c b/src/dialogs/dialog-data-table.c
index 165ad14..b6f13dd 100644
--- a/src/dialogs/dialog-data-table.c
+++ b/src/dialogs/dialog-data-table.c
@@ -63,7 +63,7 @@ static GnmExprEntry *
init_entry (GnmDialogDataTable *state, int row)
{
GnmExprEntry *gee = gnm_expr_entry_new (state->wbcg, TRUE);
- GtkWidget *table = gnm_xml_get_widget (state->gui, "table");
+ GtkWidget *table = go_gtk_builder_get_widget (state->gui, "table");
g_return_val_if_fail (table != NULL, NULL);
@@ -98,8 +98,8 @@ data_table_init (GnmDialogDataTable *state, WBCGtk *wbcg)
if (state->gui == NULL)
return TRUE;
- state->dialog = gnm_xml_get_widget (state->gui, "DataTable");
- table = GTK_TABLE (gnm_xml_get_widget (state->gui, "table"));
+ 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);
@@ -107,7 +107,7 @@ data_table_init (GnmDialogDataTable *state, WBCGtk *wbcg)
g_signal_connect (G_OBJECT (state->dialog), "response",
G_CALLBACK (cb_data_table_response), state);
gnumeric_init_help_button (
- gnm_xml_get_widget (state->gui, "help"),
+ go_gtk_builder_get_widget (state->gui, "help"),
GNUMERIC_HELP_LINK_DATA_TABLE);
/* a candidate for merging into attach guru */
diff --git a/src/dialogs/dialog-define-names.c b/src/dialogs/dialog-define-names.c
index 8142613..95d6b48 100644
--- a/src/dialogs/dialog-define-names.c
+++ b/src/dialogs/dialog-define-names.c
@@ -537,7 +537,7 @@ cb_name_guru_clicked (GtkWidget *button, NameGuruState *state)
static GtkWidget *
name_guru_init_button (NameGuruState *state, char const *name)
{
- GtkWidget *tmp = gnm_xml_get_widget (state->gui, name);
+ GtkWidget *tmp = go_gtk_builder_get_widget (state->gui, name);
g_return_val_if_fail (tmp != NULL, NULL);
@@ -1076,7 +1076,7 @@ name_guru_init (NameGuruState *state, WBCGtk *wbcg, gboolean is_paste_dialog)
state->sheet = sv_sheet (state->sv);
parse_pos_init_editpos (&state->pp, state->sv);
- state->dialog = gnm_xml_get_widget (state->gui, "NameGuru");
+ state->dialog = go_gtk_builder_get_widget (state->gui, "NameGuru");
state->model = gtk_tree_store_new
(NUM_COLMNS,
@@ -1086,7 +1086,7 @@ name_guru_init (NameGuruState *state, WBCGtk *wbcg, gboolean is_paste_dialog)
G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN,
GDK_TYPE_PIXBUF, G_TYPE_BOOLEAN);
- state->treeview = gnm_xml_get_widget (state->gui, "name_list");
+ state->treeview = go_gtk_builder_get_widget (state->gui, "name_list");
state->model_f = gtk_tree_model_filter_new
(GTK_TREE_MODEL (state->model), NULL);
@@ -1221,7 +1221,7 @@ name_guru_init (NameGuruState *state, WBCGtk *wbcg, gboolean is_paste_dialog)
"Gnumeric-Define-Names-Dialog");
}
- state->search_entry = gnm_xml_get_widget (state->gui,
+ state->search_entry = go_gtk_builder_get_widget (state->gui,
"search_entry");
#ifdef HAVE_GTK_ENTRY_SET_ICON_FROM_STOCK
@@ -1253,7 +1253,7 @@ name_guru_init (NameGuruState *state, WBCGtk *wbcg, gboolean is_paste_dialog)
name_guru_update_sensitivity (selection, state);
gnumeric_init_help_button (
- gnm_xml_get_widget (state->gui, "help_button"),
+ go_gtk_builder_get_widget (state->gui, "help_button"),
is_paste_dialog ? GNUMERIC_HELP_LINK_PASTE_NAMES
: GNUMERIC_HELP_LINK_DEFINE_NAMES);
diff --git a/src/dialogs/dialog-delete-cells.c b/src/dialogs/dialog-delete-cells.c
index e38793e..1195f73 100644
--- a/src/dialogs/dialog-delete-cells.c
+++ b/src/dialogs/dialog-delete-cells.c
@@ -66,7 +66,7 @@ cb_delete_cell_ok_clicked (DeleteCellState *state)
int cols, rows;
int i;
- radio_0 = gnm_xml_get_widget (state->gui, "radio_0");
+ radio_0 = go_gtk_builder_get_widget (state->gui, "radio_0");
g_return_if_fail (radio_0 != NULL);
i = gtk_radio_group_get_selected
@@ -147,7 +147,7 @@ dialog_delete_cells (WBCGtk *wbcg)
state->gui = gui;
state->sheet = sv_sheet (sv);
- state->dialog = gnm_xml_get_widget (state->gui, "Delete_cells");
+ state->dialog = go_gtk_builder_get_widget (state->gui, "Delete_cells");
if (state->dialog == NULL) {
go_gtk_notice_dialog (wbcg_toplevel (wbcg), GTK_MESSAGE_ERROR,
_("Could not create the Delete Cell dialog."));
@@ -155,10 +155,10 @@ dialog_delete_cells (WBCGtk *wbcg)
return ;
}
- w = gnm_xml_get_widget (state->gui, "okbutton");
+ w = go_gtk_builder_get_widget (state->gui, "okbutton");
g_signal_connect_swapped (G_OBJECT (w), "clicked",
G_CALLBACK (cb_delete_cell_ok_clicked), state);
- w = gnm_xml_get_widget (state->gui, "cancelbutton");
+ w = go_gtk_builder_get_widget (state->gui, "cancelbutton");
g_signal_connect (G_OBJECT (w), "clicked",
G_CALLBACK (cb_delete_cell_cancel_clicked), state);
@@ -167,11 +167,11 @@ dialog_delete_cells (WBCGtk *wbcg)
GNM_DIALOG_DESTROY_CURRENT_SHEET_REMOVED);
gnumeric_init_help_button (
- gnm_xml_get_widget (state->gui, "helpbutton"),
+ go_gtk_builder_get_widget (state->gui, "helpbutton"),
GNUMERIC_HELP_LINK_DELETE_CELLS);
gtk_toggle_button_set_active
- (GTK_TOGGLE_BUTTON (gnm_xml_get_widget
+ (GTK_TOGGLE_BUTTON (go_gtk_builder_get_widget
(state->gui, cols < rows
? "radio_0" : "radio_1")),
TRUE);
diff --git a/src/dialogs/dialog-doc-metadata.c b/src/dialogs/dialog-doc-metadata.c
index b3dd70b..690f9f6 100644
--- a/src/dialogs/dialog-doc-metadata.c
+++ b/src/dialogs/dialog-doc-metadata.c
@@ -1496,64 +1496,64 @@ dialog_doc_metadata_free (DialogDocMetaData *state)
static void
dialog_doc_metadata_init_widgets (DialogDocMetaData *state)
{
- state->dialog = gnm_xml_get_widget (state->gui, "GOMetadataDialog");
+ state->dialog = go_gtk_builder_get_widget (state->gui, "GOMetadataDialog");
- state->notebook = GTK_NOTEBOOK (gnm_xml_get_widget (state->gui, "notebook"));
- state->help_button = GTK_BUTTON (gnm_xml_get_widget (state->gui, "help_button"));
- state->close_button = GTK_BUTTON (gnm_xml_get_widget (state->gui, "close_button"));
+ state->notebook = GTK_NOTEBOOK (go_gtk_builder_get_widget (state->gui, "notebook"));
+ state->help_button = GTK_BUTTON (go_gtk_builder_get_widget (state->gui, "help_button"));
+ state->close_button = GTK_BUTTON (go_gtk_builder_get_widget (state->gui, "close_button"));
/* File Information Page */
- state->file_name = GTK_LABEL (gnm_xml_get_widget (state->gui, "file_name"));
- state->location = GTK_LABEL (gnm_xml_get_widget (state->gui, "location"));
- state->created = GTK_LABEL (gnm_xml_get_widget (state->gui, "created"));
- state->modified = GTK_LABEL (gnm_xml_get_widget (state->gui, "modified"));
- state->accessed = GTK_LABEL (gnm_xml_get_widget (state->gui, "accessed"));
- state->owner = GTK_LABEL (gnm_xml_get_widget (state->gui, "owner"));
- state->group = GTK_LABEL (gnm_xml_get_widget (state->gui, "group"));
+ state->file_name = GTK_LABEL (go_gtk_builder_get_widget (state->gui, "file_name"));
+ state->location = GTK_LABEL (go_gtk_builder_get_widget (state->gui, "location"));
+ state->created = GTK_LABEL (go_gtk_builder_get_widget (state->gui, "created"));
+ state->modified = GTK_LABEL (go_gtk_builder_get_widget (state->gui, "modified"));
+ state->accessed = GTK_LABEL (go_gtk_builder_get_widget (state->gui, "accessed"));
+ state->owner = GTK_LABEL (go_gtk_builder_get_widget (state->gui, "owner"));
+ state->group = GTK_LABEL (go_gtk_builder_get_widget (state->gui, "group"));
- state->owner_read = GTK_CHECK_BUTTON (gnm_xml_get_widget (state->gui, "owner_read"));
- state->owner_write = GTK_CHECK_BUTTON (gnm_xml_get_widget (state->gui, "owner_write"));
+ state->owner_read = GTK_CHECK_BUTTON (go_gtk_builder_get_widget (state->gui, "owner_read"));
+ state->owner_write = GTK_CHECK_BUTTON (go_gtk_builder_get_widget (state->gui, "owner_write"));
- state->group_read = GTK_CHECK_BUTTON (gnm_xml_get_widget (state->gui, "group_read"));
- state->group_write = GTK_CHECK_BUTTON (gnm_xml_get_widget (state->gui, "group_write"));
+ state->group_read = GTK_CHECK_BUTTON (go_gtk_builder_get_widget (state->gui, "group_read"));
+ state->group_write = GTK_CHECK_BUTTON (go_gtk_builder_get_widget (state->gui, "group_write"));
- state->others_read = GTK_CHECK_BUTTON (gnm_xml_get_widget (state->gui, "others_read"));
- state->others_write = GTK_CHECK_BUTTON (gnm_xml_get_widget (state->gui, "others_write"));
+ state->others_read = GTK_CHECK_BUTTON (go_gtk_builder_get_widget (state->gui, "others_read"));
+ state->others_write = GTK_CHECK_BUTTON (go_gtk_builder_get_widget (state->gui, "others_write"));
/* Description Page */
- state->title = GTK_ENTRY (gnm_xml_get_widget (state->gui, "title"));
- state->subject = GTK_ENTRY (gnm_xml_get_widget (state->gui, "subject"));
- state->author = GTK_ENTRY (gnm_xml_get_widget (state->gui, "author"));
- state->manager = GTK_ENTRY (gnm_xml_get_widget (state->gui, "manager"));
- state->company = GTK_ENTRY (gnm_xml_get_widget (state->gui, "company"));
- state->category = GTK_ENTRY (gnm_xml_get_widget (state->gui, "category"));
- state->keywords = GTK_ENTRY (gnm_xml_get_widget (state->gui, "keywords"));
+ state->title = GTK_ENTRY (go_gtk_builder_get_widget (state->gui, "title"));
+ state->subject = GTK_ENTRY (go_gtk_builder_get_widget (state->gui, "subject"));
+ state->author = GTK_ENTRY (go_gtk_builder_get_widget (state->gui, "author"));
+ state->manager = GTK_ENTRY (go_gtk_builder_get_widget (state->gui, "manager"));
+ state->company = GTK_ENTRY (go_gtk_builder_get_widget (state->gui, "company"));
+ state->category = GTK_ENTRY (go_gtk_builder_get_widget (state->gui, "category"));
+ state->keywords = GTK_ENTRY (go_gtk_builder_get_widget (state->gui, "keywords"));
- state->comments = GTK_TEXT_VIEW (gnm_xml_get_widget (state->gui, "comments"));
+ state->comments = GTK_TEXT_VIEW (go_gtk_builder_get_widget (state->gui, "comments"));
/* Properties Page */
- state->properties = GTK_TREE_VIEW (gnm_xml_get_widget (state->gui, "properties"));
+ state->properties = GTK_TREE_VIEW (go_gtk_builder_get_widget (state->gui, "properties"));
- state->ppt_name = GTK_COMBO_BOX_ENTRY (gnm_xml_get_widget (state->gui, "ppt_name"));
- state->ppt_value = GTK_ENTRY (gnm_xml_get_widget (state->gui, "ppt_value"));
- state->ppt_link = GTK_ENTRY (gnm_xml_get_widget (state->gui, "ppt_link"));
+ state->ppt_name = GTK_COMBO_BOX_ENTRY (go_gtk_builder_get_widget (state->gui, "ppt_name"));
+ state->ppt_value = GTK_ENTRY (go_gtk_builder_get_widget (state->gui, "ppt_value"));
+ state->ppt_link = GTK_ENTRY (go_gtk_builder_get_widget (state->gui, "ppt_link"));
- state->add_button = GTK_BUTTON (gnm_xml_get_widget (state->gui, "add_button"));
- state->remove_button = GTK_BUTTON (gnm_xml_get_widget (state->gui, "remove_button"));
- state->apply_button = GTK_BUTTON (gnm_xml_get_widget (state->gui, "apply_button"));
+ state->add_button = GTK_BUTTON (go_gtk_builder_get_widget (state->gui, "add_button"));
+ state->remove_button = GTK_BUTTON (go_gtk_builder_get_widget (state->gui, "remove_button"));
+ state->apply_button = GTK_BUTTON (go_gtk_builder_get_widget (state->gui, "apply_button"));
/* Statistics Page */
- state->sheets = GTK_LABEL (gnm_xml_get_widget (state->gui, "sheets"));
- state->cells = GTK_LABEL (gnm_xml_get_widget (state->gui, "cells"));
- state->pages = GTK_LABEL (gnm_xml_get_widget (state->gui, "pages"));
+ state->sheets = GTK_LABEL (go_gtk_builder_get_widget (state->gui, "sheets"));
+ state->cells = GTK_LABEL (go_gtk_builder_get_widget (state->gui, "cells"));
+ state->pages = GTK_LABEL (go_gtk_builder_get_widget (state->gui, "pages"));
/* Calculations Page */
- state->recalc_auto = GTK_CHECK_BUTTON (gnm_xml_get_widget (state->gui, "recalc_auto"));
- state->recalc_manual = GTK_CHECK_BUTTON (gnm_xml_get_widget (state->gui, "recalc_manual"));
- state->recalc_iteration = GTK_CHECK_BUTTON (gnm_xml_get_widget (state->gui, "iteration_enabled"));
- state->recalc_max = GTK_ENTRY (gnm_xml_get_widget (state->gui, "max_iterations"));
- state->recalc_tolerance = GTK_ENTRY (gnm_xml_get_widget (state->gui, "iteration_tolerance"));
- state->recalc_iteration_table = gnm_xml_get_widget (state->gui, "iteration_table");
+ state->recalc_auto = GTK_CHECK_BUTTON (go_gtk_builder_get_widget (state->gui, "recalc_auto"));
+ state->recalc_manual = GTK_CHECK_BUTTON (go_gtk_builder_get_widget (state->gui, "recalc_manual"));
+ state->recalc_iteration = GTK_CHECK_BUTTON (go_gtk_builder_get_widget (state->gui, "iteration_enabled"));
+ state->recalc_max = GTK_ENTRY (go_gtk_builder_get_widget (state->gui, "max_iterations"));
+ state->recalc_tolerance = GTK_ENTRY (go_gtk_builder_get_widget (state->gui, "iteration_tolerance"));
+ state->recalc_iteration_table = go_gtk_builder_get_widget (state->gui, "iteration_table");
}
static void
@@ -1681,7 +1681,7 @@ dialog_doc_metadata_init (DialogDocMetaData *state,
dialog_doc_metadata_init_widgets (state);
- state->view = GTK_TREE_VIEW(gnm_xml_get_widget (state->gui, "itemlist"));
+ state->view = GTK_TREE_VIEW(go_gtk_builder_get_widget (state->gui, "itemlist"));
state->store = gtk_tree_store_new (NUM_COLUMNS,
GDK_TYPE_PIXBUF,
G_TYPE_STRING,
diff --git a/src/dialogs/dialog-fill-series.c b/src/dialogs/dialog-fill-series.c
index cb81746..52e1cd4 100644
--- a/src/dialogs/dialog-fill-series.c
+++ b/src/dialogs/dialog-fill-series.c
@@ -96,17 +96,17 @@ cb_fill_series_ok_clicked (G_GNUC_UNUSED GtkWidget *button,
dao = parse_output ((GenericToolState *)state, NULL);
/* Read the `Series in' radio buttons. */
- radio = gnm_xml_get_widget (state->base.gui, "series_in_rows");
+ radio = go_gtk_builder_get_widget (state->base.gui, "series_in_rows");
fs->series_in_rows = ! gtk_radio_group_get_selected
(GTK_RADIO_BUTTON (radio)->group);
/* Read the `Type' radio buttons. */
- radio = gnm_xml_get_widget (state->base.gui, "type_linear");
+ radio = go_gtk_builder_get_widget (state->base.gui, "type_linear");
fs->type = gtk_radio_group_get_selected
(GTK_RADIO_BUTTON (radio)->group);
/* Read the `Date unit' radio buttons. */
- radio = gnm_xml_get_widget (state->base.gui, "unit_day");
+ radio = go_gtk_builder_get_widget (state->base.gui, "unit_day");
fs->date_unit = gtk_radio_group_get_selected
(GTK_RADIO_BUTTON (radio)->group);
@@ -132,7 +132,7 @@ cb_type_button_clicked (G_GNUC_UNUSED GtkWidget *button,
/* Read the `Type' radio buttons. */
- radio = gnm_xml_get_widget (state->base.gui, "type_linear");
+ radio = go_gtk_builder_get_widget (state->base.gui, "type_linear");
type = gtk_radio_group_get_selected (GTK_RADIO_BUTTON (radio)->group);
if (type == FillSeriesTypeDate)
@@ -159,26 +159,26 @@ dialog_fill_series_tool_init (FillSeriesState *state)
sel = selection_first_range (state->base.sv, NULL, NULL);
/* Set the sensitivity of Unit day. */
- radio = gnm_xml_get_widget (state->base.gui,
+ radio = go_gtk_builder_get_widget (state->base.gui,
"type_date");
g_signal_connect (G_OBJECT (radio), "clicked",
G_CALLBACK (cb_type_button_clicked), state);
- state->stop_entry = gnm_xml_get_widget (state->base.gui, "stop_entry");
+ state->stop_entry = go_gtk_builder_get_widget (state->base.gui, "stop_entry");
g_signal_connect_after (G_OBJECT (state->stop_entry),
"changed",
G_CALLBACK (cb_fill_series_update_sensitivity), state);
- state->step_entry = gnm_xml_get_widget (state->base.gui, "step_entry");
+ state->step_entry = go_gtk_builder_get_widget (state->base.gui, "step_entry");
g_signal_connect_after (G_OBJECT (state->step_entry),
"changed",
G_CALLBACK (cb_fill_series_update_sensitivity), state);
- state->start_entry = gnm_xml_get_widget (state->base.gui, "start_entry");
+ state->start_entry = go_gtk_builder_get_widget (state->base.gui, "start_entry");
g_signal_connect_after (G_OBJECT (state->start_entry),
"changed",
G_CALLBACK (cb_fill_series_update_sensitivity), state);
- state->date_steps_type = gnm_xml_get_widget (state->base.gui,
+ state->date_steps_type = go_gtk_builder_get_widget (state->base.gui,
"table_date_unit");
gtk_widget_set_sensitive (state->date_steps_type, FALSE);
@@ -187,7 +187,7 @@ dialog_fill_series_tool_init (FillSeriesState *state)
(range_width (sel) >= range_height (sel))))
? "series_in_rows"
: "series_in_cols";
- radio = gnm_xml_get_widget (state->base.gui, button);
+ radio = go_gtk_builder_get_widget (state->base.gui, button);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radio), TRUE);
if (sel != NULL) {
diff --git a/src/dialogs/dialog-formula-guru.c b/src/dialogs/dialog-formula-guru.c
index 823b005..6b3ea4e 100644
--- a/src/dialogs/dialog-formula-guru.c
+++ b/src/dialogs/dialog-formula-guru.c
@@ -881,7 +881,7 @@ dialog_formula_guru_init (FormulaGuruState *state)
state->tooltip_widget = NULL;
/* Set-up treeview */
- scrolled = gnm_xml_get_widget (state->gui, "scrolled");
+ scrolled = go_gtk_builder_get_widget (state->gui, "scrolled");
state->model = gtk_tree_store_new (NUM_COLMNS, G_TYPE_STRING, G_TYPE_BOOLEAN,
G_TYPE_STRING, G_TYPE_STRING,
G_TYPE_INT, G_TYPE_INT, G_TYPE_POINTER,
@@ -933,44 +933,44 @@ dialog_formula_guru_init (FormulaGuruState *state)
G_CALLBACK (start_editing_cb), state);
/* Finished set-up of treeview */
- state->quote_button = gnm_xml_get_widget (state->gui,
+ state->quote_button = go_gtk_builder_get_widget (state->gui,
"quote-button");
- state->array_button = gnm_xml_get_widget (state->gui,
+ state->array_button = go_gtk_builder_get_widget (state->gui,
"array_button");
gtk_widget_set_sensitive (state->array_button, TRUE);
- state->ok_button = gnm_xml_get_widget (state->gui, "ok_button");
+ state->ok_button = go_gtk_builder_get_widget (state->gui, "ok_button");
gtk_widget_set_sensitive (state->ok_button, TRUE);
g_signal_connect (G_OBJECT (state->ok_button),
"clicked",
G_CALLBACK (cb_dialog_formula_guru_ok_clicked), state);
- state->selector_button = gnm_xml_get_widget (state->gui, "select_func");
+ state->selector_button = go_gtk_builder_get_widget (state->gui, "select_func");
gtk_widget_set_sensitive (state->selector_button, FALSE);
g_signal_connect (G_OBJECT (state->selector_button),
"clicked",
G_CALLBACK (cb_dialog_formula_guru_selector_clicked), state);
- state->clear_button = gnm_xml_get_widget (state->gui, "trash");
+ state->clear_button = go_gtk_builder_get_widget (state->gui, "trash");
gtk_widget_set_sensitive (state->clear_button, FALSE);
g_signal_connect (G_OBJECT (state->clear_button),
"clicked",
G_CALLBACK (cb_dialog_formula_guru_clear_clicked), state);
- state->zoom_button = gnm_xml_get_widget (state->gui, "zoom");
+ state->zoom_button = go_gtk_builder_get_widget (state->gui, "zoom");
gtk_widget_set_sensitive (state->zoom_button, TRUE);
g_signal_connect (G_OBJECT (state->zoom_button),
"toggled",
G_CALLBACK (cb_dialog_formula_guru_zoom_toggled), state);
- state->main_button_area = gnm_xml_get_widget (state->gui, "dialog-action_area2");
+ state->main_button_area = go_gtk_builder_get_widget (state->gui, "dialog-action_area2");
- g_signal_connect_swapped (G_OBJECT (gnm_xml_get_widget (state->gui, "cancel_button")),
+ g_signal_connect_swapped (G_OBJECT (go_gtk_builder_get_widget (state->gui, "cancel_button")),
"clicked",
G_CALLBACK (cb_dialog_formula_guru_cancel_clicked), state);
gnumeric_init_help_button (
- gnm_xml_get_widget (state->gui, "help_button"),
+ go_gtk_builder_get_widget (state->gui, "help_button"),
GNUMERIC_HELP_LINK_FORMULA_GURU);
wbc_gtk_attach_guru (state->wbcg, state->dialog);
@@ -1088,7 +1088,7 @@ dialog_formula_guru (WBCGtk *wbcg, GnmFunc *fd)
g_free (func_str);
}
- state->dialog = gnm_xml_get_widget (state->gui, "formula_guru");
+ state->dialog = go_gtk_builder_get_widget (state->gui, "formula_guru");
if (dialog_formula_guru_init (state)) {
go_gtk_notice_dialog (wbcg_toplevel (wbcg), GTK_MESSAGE_ERROR,
diff --git a/src/dialogs/dialog-function-select.c b/src/dialogs/dialog-function-select.c
index b62a7a0..cf23388 100644
--- a/src/dialogs/dialog-function-select.c
+++ b/src/dialogs/dialog-function-select.c
@@ -1151,7 +1151,7 @@ dialog_function_select_init (FunctionSelectState *state)
/* Set-up combo box */
state->cb = GTK_COMBO_BOX
- (gnm_xml_get_widget (state->gui, "category-box"));
+ (go_gtk_builder_get_widget (state->gui, "category-box"));
state->model = gtk_list_store_new
(NUM_COLMNS, G_TYPE_STRING, G_TYPE_POINTER, G_TYPE_BOOLEAN);
@@ -1192,7 +1192,7 @@ dialog_function_select_init (FunctionSelectState *state)
(GTK_TREE_MODEL_FILTER (state->model_filter), FUNCTION_VISIBLE);
state->treeview= GTK_TREE_VIEW
- (gnm_xml_get_widget (state->gui, "function-list"));
+ (go_gtk_builder_get_widget (state->gui, "function-list"));
gtk_tree_view_set_model (state->treeview,
state->model_filter);
@@ -1221,7 +1221,7 @@ dialog_function_select_init (FunctionSelectState *state)
dialog_function_select_load_tree (state);
dialog_function_load_recent_funcs (state);
- state->search_entry = gnm_xml_get_widget (state->gui,
+ state->search_entry = go_gtk_builder_get_widget (state->gui,
"search-entry");
if (state->paste.prefix != NULL)
gtk_entry_set_text (GTK_ENTRY (state->search_entry),
@@ -1259,10 +1259,10 @@ dialog_function_select_init (FunctionSelectState *state)
G_CALLBACK (cb_dialog_function_row_activated),
state);
- gtk_paned_set_position (GTK_PANED (gnm_xml_get_widget
+ gtk_paned_set_position (GTK_PANED (go_gtk_builder_get_widget
(state->gui, "vpaned1")), 300);
- state->description_view = GTK_TEXT_VIEW (gnm_xml_get_widget
+ state->description_view = GTK_TEXT_VIEW (go_gtk_builder_get_widget
(state->gui, "description"));
description = gtk_text_view_get_buffer (state->description_view);
gtk_text_buffer_get_start_iter (description, &where);
@@ -1272,20 +1272,20 @@ dialog_function_select_init (FunctionSelectState *state)
"mark-set",
G_CALLBACK (cb_description_clicked), state);
- state->ok_button = gnm_xml_get_widget (state->gui, "ok_button");
+ state->ok_button = go_gtk_builder_get_widget (state->gui, "ok_button");
gtk_widget_set_sensitive (state->ok_button, FALSE);
g_signal_connect (G_OBJECT (state->ok_button),
"clicked",
G_CALLBACK (cb_dialog_function_select_ok_clicked), state);
- state->paste_button = gnm_xml_get_widget (state->gui, "paste_button");
+ state->paste_button = go_gtk_builder_get_widget (state->gui, "paste_button");
gtk_widget_set_sensitive (state->paste_button, FALSE);
g_signal_connect (G_OBJECT (state->paste_button),
"clicked",
G_CALLBACK (cb_dialog_function_select_paste_clicked), state);
- cancel_button = gnm_xml_get_widget (state->gui, "cancel_button");
+ cancel_button = go_gtk_builder_get_widget (state->gui, "cancel_button");
g_signal_connect (G_OBJECT (cancel_button), "clicked",
G_CALLBACK (cb_dialog_function_select_cancel_clicked), state);
- close_button = gnm_xml_get_widget (state->gui, "close_button");
+ close_button = go_gtk_builder_get_widget (state->gui, "close_button");
g_signal_connect (G_OBJECT (close_button), "clicked",
G_CALLBACK (cb_dialog_function_select_cancel_clicked), state);
@@ -1295,7 +1295,7 @@ dialog_function_select_init (FunctionSelectState *state)
GNM_DIALOG_DESTROY_CURRENT_SHEET_REMOVED);
gnumeric_init_help_button (
- gnm_xml_get_widget (state->gui, "help_button"),
+ go_gtk_builder_get_widget (state->gui, "help_button"),
GNUMERIC_HELP_LINK_FUNCTION_SELECT);
g_object_set_data_full
(G_OBJECT (state->dialog),
@@ -1307,13 +1307,13 @@ dialog_function_select_init (FunctionSelectState *state)
(GTK_ENTRY (state->search_entry), state);
gtk_widget_set_visible (close_button, state->mode != GURU_MODE);
- gtk_widget_set_visible (gnm_xml_get_widget
+ gtk_widget_set_visible (go_gtk_builder_get_widget
(state->gui, "help_button"),
state->mode == GURU_MODE);
gtk_widget_set_visible (cancel_button, state->mode == GURU_MODE);
gtk_widget_set_visible (state->ok_button, state->mode == GURU_MODE);
gtk_widget_set_visible (state->paste_button, state->mode == PASTE_MODE);
- gtk_widget_set_visible (gnm_xml_get_widget
+ gtk_widget_set_visible (go_gtk_builder_get_widget
(state->gui, "title_label"),
state->mode == GURU_MODE);
gtk_combo_box_set_active (state->cb, state->mode == HELP_MODE ? 2 : 0);
@@ -1351,7 +1351,7 @@ dialog_function_select_full (WBCGtk *wbcg, char const *guru_key,
state->sheet = wb_control_cur_sheet (WORKBOOK_CONTROL (wbcg));
state->wb = state->sheet->workbook;
state->gui = gui;
- state->dialog = gnm_xml_get_widget (state->gui, "selection_dialog");
+ state->dialog = go_gtk_builder_get_widget (state->gui, "selection_dialog");
state->formula_guru_key = guru_key;
state->recent_funcs = NULL;
state->mode = mode;
diff --git a/src/dialogs/dialog-goal-seek.c b/src/dialogs/dialog-goal-seek.c
index 5467bfc..a6620a8 100644
--- a/src/dialogs/dialog-goal-seek.c
+++ b/src/dialogs/dialog-goal-seek.c
@@ -503,42 +503,42 @@ dialog_init (GoalSeekState *state)
{
GtkTable *table;
- state->dialog = gnm_xml_get_widget (state->gui, "GoalSeek");
+ state->dialog = go_gtk_builder_get_widget (state->gui, "GoalSeek");
if (state->dialog == NULL)
return TRUE;
- state->close_button = gnm_xml_get_widget (state->gui, "closebutton");
+ state->close_button = go_gtk_builder_get_widget (state->gui, "closebutton");
g_signal_connect (G_OBJECT (state->close_button),
"clicked",
G_CALLBACK (cb_dialog_close_clicked), state);
- state->cancel_button = gnm_xml_get_widget (state->gui, "cancelbutton");
+ state->cancel_button = go_gtk_builder_get_widget (state->gui, "cancelbutton");
g_signal_connect (G_OBJECT (state->cancel_button),
"clicked",
G_CALLBACK (cb_dialog_cancel_clicked), state);
- state->apply_button = gnm_xml_get_widget (state->gui, "applybutton");
+ state->apply_button = go_gtk_builder_get_widget (state->gui, "applybutton");
g_signal_connect (G_OBJECT (state->apply_button),
"clicked",
G_CALLBACK (cb_dialog_apply_clicked), state);
gnumeric_init_help_button (
- gnm_xml_get_widget (state->gui, "helpbutton"),
+ go_gtk_builder_get_widget (state->gui, "helpbutton"),
GNUMERIC_HELP_LINK_GOAL_SEEK);
- state->to_value_entry = gnm_xml_get_widget (state->gui, "to_value_entry");
- state->at_least_entry = gnm_xml_get_widget (state->gui, "at_least-entry");
- state->at_most_entry = gnm_xml_get_widget (state->gui, "at_most-entry");
- state->target_value_label = gnm_xml_get_widget (state->gui, "target-value");
+ state->to_value_entry = go_gtk_builder_get_widget (state->gui, "to_value_entry");
+ state->at_least_entry = go_gtk_builder_get_widget (state->gui, "at_least-entry");
+ state->at_most_entry = go_gtk_builder_get_widget (state->gui, "at_most-entry");
+ state->target_value_label = go_gtk_builder_get_widget (state->gui, "target-value");
gtk_label_set_justify (GTK_LABEL (state->target_value_label), GTK_JUSTIFY_RIGHT);
- state->current_value_label = gnm_xml_get_widget (state->gui, "current-value");
+ state->current_value_label = go_gtk_builder_get_widget (state->gui, "current-value");
gtk_label_set_justify (GTK_LABEL (state->current_value_label), GTK_JUSTIFY_RIGHT);
- state->solution_label = gnm_xml_get_widget (state->gui, "solution");
+ state->solution_label = go_gtk_builder_get_widget (state->gui, "solution");
gtk_label_set_justify (GTK_LABEL (state->solution_label), GTK_JUSTIFY_RIGHT);
- state->result_label = gnm_xml_get_widget (state->gui, "result-label");
- state->result_table = gnm_xml_get_widget (state->gui, "result-table");
+ state->result_label = go_gtk_builder_get_widget (state->gui, "result-label");
+ state->result_table = go_gtk_builder_get_widget (state->gui, "result-table");
- table = GTK_TABLE (gnm_xml_get_widget (state->gui, "goal-table"));
+ table = GTK_TABLE (go_gtk_builder_get_widget (state->gui, "goal-table"));
state->set_cell_entry = gnm_expr_entry_new (state->wbcg, TRUE);
gnm_expr_entry_set_flags (state->set_cell_entry,
GNM_EE_SINGLE_RANGE |
diff --git a/src/dialogs/dialog-goto-cell.c b/src/dialogs/dialog-goto-cell.c
index 0e5af38..9550ea9 100644
--- a/src/dialogs/dialog-goto-cell.c
+++ b/src/dialogs/dialog-goto-cell.c
@@ -257,7 +257,7 @@ dialog_goto_init (GotoState *state)
GtkWidget *scrolled;
GtkTreeViewColumn *column;
- table = GTK_TABLE (gnm_xml_get_widget (state->gui, "names"));
+ table = GTK_TABLE (go_gtk_builder_get_widget (state->gui, "names"));
state->goto_text = GTK_ENTRY (gtk_entry_new ());
gtk_table_attach (table, GTK_WIDGET (state->goto_text),
0, 1, 2, 3,
@@ -268,7 +268,7 @@ dialog_goto_init (GotoState *state)
G_CALLBACK (cb_dialog_goto_update_sensitivity), state);
/* Set-up treeview */
- scrolled = gnm_xml_get_widget (state->gui, "scrolled");
+ scrolled = go_gtk_builder_get_widget (state->gui, "scrolled");
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled),
GTK_SHADOW_ETCHED_IN);
@@ -310,19 +310,19 @@ dialog_goto_init (GotoState *state)
"sheet_deleted", G_CALLBACK (cb_sheet_deleted),
state);
- state->close_button = gnm_xml_get_widget (state->gui, "close_button");
+ state->close_button = go_gtk_builder_get_widget (state->gui, "close_button");
g_signal_connect (G_OBJECT (state->close_button),
"clicked",
G_CALLBACK (cb_dialog_goto_close_clicked), state);
- state->go_button = gnm_xml_get_widget (state->gui, "go_button");
+ state->go_button = go_gtk_builder_get_widget (state->gui, "go_button");
g_signal_connect (G_OBJECT (state->go_button),
"clicked",
G_CALLBACK (cb_dialog_goto_go_clicked), state);
gtk_window_set_default (GTK_WINDOW (state->dialog), state->go_button);
gnumeric_init_help_button (
- gnm_xml_get_widget (state->gui, "help_button"),
+ go_gtk_builder_get_widget (state->gui, "help_button"),
GNUMERIC_HELP_LINK_GOTO_CELL);
cb_dialog_goto_update_sensitivity (NULL, state);
@@ -353,7 +353,7 @@ dialog_goto_cell (WBCGtk *wbcg)
state->wbcg = wbcg;
state->wb = wb_control_get_workbook (WORKBOOK_CONTROL (wbcg));
state->gui = gui;
- state->dialog = gnm_xml_get_widget (state->gui, "goto_dialog");
+ state->dialog = go_gtk_builder_get_widget (state->gui, "goto_dialog");
if (dialog_goto_init (state)) {
go_gtk_notice_dialog (wbcg_toplevel (wbcg), GTK_MESSAGE_ERROR,
diff --git a/src/dialogs/dialog-hyperlink.c b/src/dialogs/dialog-hyperlink.c
index f2ec281..9f2ddc5 100644
--- a/src/dialogs/dialog-hyperlink.c
+++ b/src/dialogs/dialog-hyperlink.c
@@ -92,7 +92,7 @@ dhl_set_tip (HyperlinkState* state)
GtkWidget *w;
if (state->is_new) {
- w = gnm_xml_get_widget (state->gui, "use-default-tip");
+ w = go_gtk_builder_get_widget (state->gui, "use-default-tip");
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (w), TRUE);
return;
}
@@ -102,18 +102,18 @@ dhl_set_tip (HyperlinkState* state)
char *default_tip = dhl_get_default_tip (target);
if (strcmp (tip, default_tip) == 0) {
- w = gnm_xml_get_widget (state->gui, "use-default-tip");
+ w = go_gtk_builder_get_widget (state->gui, "use-default-tip");
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (w), TRUE);
g_free (default_tip);
return;
} else
g_free (default_tip);
}
- w = gnm_xml_get_widget (state->gui, "use-this-tip");
+ w = go_gtk_builder_get_widget (state->gui, "use-this-tip");
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (w), TRUE);
tb = gtk_text_view_get_buffer
- (GTK_TEXT_VIEW (gnm_xml_get_widget (state->gui, "tip-entry")));
+ (GTK_TEXT_VIEW (go_gtk_builder_get_widget (state->gui, "tip-entry")));
gtk_text_buffer_set_text (tb, (tip == NULL) ? "" : tip, -1);
}
@@ -121,14 +121,14 @@ dhl_set_tip (HyperlinkState* state)
static char *
dhl_get_tip (HyperlinkState *state, char const *target)
{
- GtkWidget *w = gnm_xml_get_widget (state->gui, "use-default-tip");
+ GtkWidget *w = go_gtk_builder_get_widget (state->gui, "use-default-tip");
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w)))
return dhl_get_default_tip (target);
else {
char *tip;
GtkTextBuffer *tb = gtk_text_view_get_buffer
- (GTK_TEXT_VIEW (gnm_xml_get_widget (state->gui, "tip-entry")));
+ (GTK_TEXT_VIEW (go_gtk_builder_get_widget (state->gui, "tip-entry")));
GtkTextIter start_iter, end_iter;
gtk_text_buffer_get_start_iter (tb, &start_iter);
@@ -192,7 +192,7 @@ dhl_get_target_cur_wb (HyperlinkState *state, gboolean *success)
static void
dhl_set_target_external (HyperlinkState *state, const char* const target)
{
- GtkWidget *w = gnm_xml_get_widget (state->gui, "external-link");
+ GtkWidget *w = go_gtk_builder_get_widget (state->gui, "external-link");
gtk_entry_set_text (GTK_ENTRY (w), target);
}
@@ -200,7 +200,7 @@ dhl_set_target_external (HyperlinkState *state, const char* const target)
static char *
dhl_get_target_external (HyperlinkState *state, gboolean *success)
{
- GtkWidget *w = gnm_xml_get_widget (state->gui, "external-link");
+ GtkWidget *w = go_gtk_builder_get_widget (state->gui, "external-link");
const char *target = gtk_entry_get_text (GTK_ENTRY (w));
*success = TRUE;
@@ -210,8 +210,8 @@ dhl_get_target_external (HyperlinkState *state, gboolean *success)
static void
dhl_set_target_email (HyperlinkState *state, const char* const target)
{
- GtkWidget *w = gnm_xml_get_widget (state->gui, "email-address");
- GtkWidget *w2 = gnm_xml_get_widget (state->gui, "email-subject");
+ GtkWidget *w = go_gtk_builder_get_widget (state->gui, "email-address");
+ GtkWidget *w2 = go_gtk_builder_get_widget (state->gui, "email-subject");
gchar* cursor;
gchar* subject;
gchar* guitext;
@@ -243,8 +243,8 @@ dhl_set_target_email (HyperlinkState *state, const char* const target)
static char*
dhl_get_target_email (HyperlinkState *state, gboolean *success)
{
- GtkWidget *w = gnm_xml_get_widget (state->gui, "email-address");
- GtkWidget *w2 = gnm_xml_get_widget (state->gui, "email-subject");
+ GtkWidget *w = go_gtk_builder_get_widget (state->gui, "email-address");
+ GtkWidget *w2 = go_gtk_builder_get_widget (state->gui, "email-subject");
const char *address = gtk_entry_get_text (GTK_ENTRY (w));
const char *subject = gtk_entry_get_text (GTK_ENTRY (w2));
gchar* enc_subj, *enc_addr;
@@ -274,7 +274,7 @@ dhl_get_target_email (HyperlinkState *state, gboolean *success)
static void
dhl_set_target_url (HyperlinkState *state, const char* const target)
{
- GtkWidget *w = gnm_xml_get_widget (state->gui, "url");
+ GtkWidget *w = go_gtk_builder_get_widget (state->gui, "url");
gtk_entry_set_text (GTK_ENTRY (w), target);
}
@@ -282,7 +282,7 @@ dhl_set_target_url (HyperlinkState *state, const char* const target)
static char *
dhl_get_target_url (HyperlinkState *state, gboolean *success)
{
- GtkWidget *w = gnm_xml_get_widget (state->gui, "url");
+ GtkWidget *w = go_gtk_builder_get_widget (state->gui, "url");
const char *target = gtk_entry_get_text (GTK_ENTRY (w));
*success = TRUE;
@@ -418,7 +418,7 @@ dhl_setup_type (HyperlinkState *state)
unsigned i;
for (i = 0 ; i < G_N_ELEMENTS (type); i++) {
- w = gnm_xml_get_widget (state->gui, type[i].widget_name);
+ w = go_gtk_builder_get_widget (state->gui, type[i].widget_name);
if (!strcmp (name, type[i].name)) {
gtk_widget_show_all (w);
@@ -475,42 +475,42 @@ dhl_init (HyperlinkState *state)
GtkCellRenderer *renderer;
#ifdef GNM_NO_MAILTO
- gtk_widget_hide (gnm_xml_get_widget (state->gui, "email-box"));
+ gtk_widget_hide (go_gtk_builder_get_widget (state->gui, "email-box"));
#endif
size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
for (i = 0 ; i < G_N_ELEMENTS (label); i++)
gtk_size_group_add_widget (size_group,
- gnm_xml_get_widget (state->gui, label[i]));
+ go_gtk_builder_get_widget (state->gui, label[i]));
- w = gnm_xml_get_widget (state->gui, "link-type-image");
+ w = go_gtk_builder_get_widget (state->gui, "link-type-image");
state->type_image = GTK_IMAGE (w);
- w = gnm_xml_get_widget (state->gui, "link-type-descriptor");
+ w = go_gtk_builder_get_widget (state->gui, "link-type-descriptor");
state->type_descriptor = GTK_LABEL (w);
- w = gnm_xml_get_widget (state->gui, "internal-link-box");
+ w = go_gtk_builder_get_widget (state->gui, "internal-link-box");
expr_entry = gnm_expr_entry_new (state->wbcg, TRUE);
gtk_box_pack_end (GTK_BOX (w), GTK_WIDGET (expr_entry), TRUE, TRUE, 0);
gtk_entry_set_activates_default
(gnm_expr_entry_get_entry (expr_entry), TRUE);
state->internal_link_ee = expr_entry;
- w = gnm_xml_get_widget (state->gui, "cancel_button");
+ w = go_gtk_builder_get_widget (state->gui, "cancel_button");
g_signal_connect (G_OBJECT (w),
"clicked",
G_CALLBACK (dhl_cb_cancel), state);
- w = gnm_xml_get_widget (state->gui, "ok_button");
+ w = go_gtk_builder_get_widget (state->gui, "ok_button");
g_signal_connect (G_OBJECT (w),
"clicked",
G_CALLBACK (dhl_cb_ok), state);
gtk_window_set_default (GTK_WINDOW (state->dialog), w);
gnumeric_init_help_button (
- gnm_xml_get_widget (state->gui, "help_button"),
+ go_gtk_builder_get_widget (state->gui, "help_button"),
GNUMERIC_HELP_LINK_HYPERLINK);
store = gtk_list_store_new (2, GDK_TYPE_PIXBUF, G_TYPE_STRING);
- w = gnm_xml_get_widget (state->gui, "link-type-menu");
+ w = go_gtk_builder_get_widget (state->gui, "link-type-menu");
gtk_combo_box_set_model (GTK_COMBO_BOX (w), GTK_TREE_MODEL (store));
for (i = 0 ; i < G_N_ELEMENTS (type); i++) {
@@ -548,8 +548,8 @@ dhl_init (HyperlinkState *state)
G_CALLBACK (dhl_cb_menu_changed),
state);
- gnm_link_button_and_entry (gnm_xml_get_widget (state->gui, "use-this-tip"),
- gnm_xml_get_widget (state->gui, "tip-entry"));
+ gnm_link_button_and_entry (go_gtk_builder_get_widget (state->gui, "use-this-tip"),
+ go_gtk_builder_get_widget (state->gui, "tip-entry"));
gnm_dialog_setup_destroy_handlers (GTK_DIALOG (state->dialog),
state->wbcg,
@@ -582,7 +582,7 @@ dialog_hyperlink (WBCGtk *wbcg, SheetControl *sc)
state->wb = wb_control_get_workbook (WORKBOOK_CONTROL (wbcg));
state->sc = sc;
state->gui = gui;
- state->dialog = gnm_xml_get_widget (state->gui, "hyperlink-dialog");
+ state->dialog = go_gtk_builder_get_widget (state->gui, "hyperlink-dialog");
sheet = sc_sheet (sc);
for (ptr = sc_view (sc)->selections; ptr != NULL; ptr = ptr->next)
diff --git a/src/dialogs/dialog-insert-cells.c b/src/dialogs/dialog-insert-cells.c
index 798b5d2..967fd0a 100644
--- a/src/dialogs/dialog-insert-cells.c
+++ b/src/dialogs/dialog-insert-cells.c
@@ -67,7 +67,7 @@ cb_insert_cell_ok_clicked (G_GNUC_UNUSED GtkWidget *button,
int cols, rows;
int i;
- radio_0 = gnm_xml_get_widget (state->gui, "radio_0");
+ radio_0 = go_gtk_builder_get_widget (state->gui, "radio_0");
g_return_if_fail (radio_0 != NULL);
i = gtk_radio_group_get_selected
@@ -148,7 +148,7 @@ dialog_insert_cells (WBCGtk *wbcg)
state->sel = sel;
state->sheet = sv_sheet (sv);
state->gui = gui;
- state->dialog = gnm_xml_get_widget (state->gui, "Insert_cells");
+ state->dialog = go_gtk_builder_get_widget (state->gui, "Insert_cells");
if (state->dialog == NULL) {
go_gtk_notice_dialog (wbcg_toplevel (wbcg), GTK_MESSAGE_ERROR,
_("Could not create the Insert Cell dialog."));
@@ -156,21 +156,21 @@ dialog_insert_cells (WBCGtk *wbcg)
return ;
}
- state->ok_button = gnm_xml_get_widget (state->gui, "okbutton");
+ state->ok_button = go_gtk_builder_get_widget (state->gui, "okbutton");
g_signal_connect (G_OBJECT (state->ok_button),
"clicked",
G_CALLBACK (cb_insert_cell_ok_clicked), state);
- state->cancel_button = gnm_xml_get_widget (state->gui, "cancelbutton");
+ state->cancel_button = go_gtk_builder_get_widget (state->gui, "cancelbutton");
g_signal_connect (G_OBJECT (state->cancel_button),
"clicked",
G_CALLBACK (cb_insert_cell_cancel_clicked), state);
gnumeric_init_help_button (
- gnm_xml_get_widget (state->gui, "helpbutton"),
+ go_gtk_builder_get_widget (state->gui, "helpbutton"),
GNUMERIC_HELP_LINK_INSERT_CELS);
gtk_toggle_button_set_active
- (GTK_TOGGLE_BUTTON (gnm_xml_get_widget
+ (GTK_TOGGLE_BUTTON (go_gtk_builder_get_widget
(state->gui, cols < rows
? "radio_0" : "radio_1")),
TRUE);
diff --git a/src/dialogs/dialog-merge.c b/src/dialogs/dialog-merge.c
index ad43aa5..22c25ac 100644
--- a/src/dialogs/dialog-merge.c
+++ b/src/dialogs/dialog-merge.c
@@ -330,26 +330,26 @@ dialog_merge (WBCGtk *wbcg)
state->gui = gui;
state->wbcg = wbcg;
state->sheet = wb_control_cur_sheet (WORKBOOK_CONTROL (state->wbcg));
- state->dialog = gnm_xml_get_widget (gui, "Merge");
+ state->dialog = go_gtk_builder_get_widget (gui, "Merge");
state->warning_dialog = NULL;
- state->add_btn = gnm_xml_get_widget (gui, "add_button");
- state->delete_btn = gnm_xml_get_widget (gui, "remove_button");
- state->merge_btn = gnm_xml_get_widget (gui, "merge_button");
- state->change_btn = gnm_xml_get_widget (gui, "change_button");
- state->cancel_btn = gnm_xml_get_widget (gui, "cancel_button");
+ state->add_btn = go_gtk_builder_get_widget (gui, "add_button");
+ state->delete_btn = go_gtk_builder_get_widget (gui, "remove_button");
+ state->merge_btn = go_gtk_builder_get_widget (gui, "merge_button");
+ state->change_btn = go_gtk_builder_get_widget (gui, "change_button");
+ state->cancel_btn = go_gtk_builder_get_widget (gui, "cancel_button");
gtk_widget_set_size_request (state->delete_btn, 100, -1);
gtk_button_set_alignment (GTK_BUTTON (state->add_btn), 0., .5);
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 (gnm_xml_get_widget (gui, "main_table"));
+ table = GTK_TABLE (go_gtk_builder_get_widget (gui, "main_table"));
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 (gnm_xml_get_widget (gui, "var1-label")),
+ 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,
@@ -375,7 +375,7 @@ dialog_merge (WBCGtk *wbcg)
GTK_EXPAND | GTK_FILL, 0,
0, 0);
- scrolled = gnm_xml_get_widget (state->gui, "scrolled");
+ scrolled = go_gtk_builder_get_widget (state->gui, "scrolled");
state->model = gtk_list_store_new (NUM_COLMNS, G_TYPE_STRING, G_TYPE_STRING);
state->list = GTK_TREE_VIEW (gtk_tree_view_new_with_model
(GTK_TREE_MODEL (state->model)));
@@ -436,7 +436,7 @@ dialog_merge (WBCGtk *wbcg)
GNM_DIALOG_DESTROY_CURRENT_SHEET_REMOVED);
gnumeric_init_help_button (
- gnm_xml_get_widget (state->gui, "help_button"),
+ go_gtk_builder_get_widget (state->gui, "help_button"),
GNUMERIC_HELP_LINK_DATA_MERGE);
gnumeric_keyed_dialog (state->wbcg, GTK_WINDOW (state->dialog),
diff --git a/src/dialogs/dialog-paste-special.c b/src/dialogs/dialog-paste-special.c
index f8f5a16..c2f50f8 100644
--- a/src/dialogs/dialog-paste-special.c
+++ b/src/dialogs/dialog-paste-special.c
@@ -110,7 +110,7 @@ paste_link_set_sensitive (PasteSpecialState *state)
{
gboolean sensitive =
(!gtk_toggle_button_get_active
- (GTK_TOGGLE_BUTTON (gnm_xml_get_widget (state->gui,"skip-blanks")))
+ (GTK_TOGGLE_BUTTON (go_gtk_builder_get_widget (state->gui,"skip-blanks")))
&& 0 == gnm_gui_group_value (state->gui, paste_type_group)
&& 0 == gnm_gui_group_value (state->gui, cell_operation_group)
&& 0 == gnm_gui_group_value (state->gui, region_operation_group));
@@ -120,7 +120,7 @@ paste_link_set_sensitive (PasteSpecialState *state)
static void
skip_blanks_set_sensitive (PasteSpecialState *state)
{
- GtkWidget *button = gnm_xml_get_widget (state->gui,"skip-blanks");
+ GtkWidget *button = go_gtk_builder_get_widget (state->gui,"skip-blanks");
gboolean sensitive =
(3 > gnm_gui_group_value (state->gui, paste_type_group)
&& 0 == gnm_gui_group_value (state->gui, cell_operation_group));
@@ -130,7 +130,7 @@ skip_blanks_set_sensitive (PasteSpecialState *state)
static void
dont_change_formulae_set_sensitive (PasteSpecialState *state)
{
- GtkWidget *button = gnm_xml_get_widget (state->gui,"dont-change-formulae");
+ GtkWidget *button = go_gtk_builder_get_widget (state->gui,"dont-change-formulae");
gboolean sensitive =
(2 > gnm_gui_group_value (state->gui, paste_type_group)
&& 0 == gnm_gui_group_value (state->gui, cell_operation_group));
@@ -155,7 +155,7 @@ dialog_paste_special_type_toggled_cb (GtkWidget *button, PasteSpecialState *stat
gboolean permit_cell_ops = paste_type_group_props[i].permit_cell_ops;
for (group = cell_operation_group; *group != NULL; group++)
- gtk_widget_set_sensitive (gnm_xml_get_widget (state->gui,*group),
+ gtk_widget_set_sensitive (go_gtk_builder_get_widget (state->gui,*group),
permit_cell_ops);
paste_link_set_sensitive (state);
skip_blanks_set_sensitive (state);
@@ -211,10 +211,10 @@ cb_tool_ok_clicked (G_GNUC_UNUSED GtkWidget *button,
}
if (gtk_toggle_button_get_active
- (GTK_TOGGLE_BUTTON (gnm_xml_get_widget (state->gui,"skip-blanks"))))
+ (GTK_TOGGLE_BUTTON (go_gtk_builder_get_widget (state->gui,"skip-blanks"))))
result |= PASTE_SKIP_BLANKS;
if (gtk_toggle_button_get_active
- (GTK_TOGGLE_BUTTON (gnm_xml_get_widget (state->gui,"dont-change-formulae"))))
+ (GTK_TOGGLE_BUTTON (go_gtk_builder_get_widget (state->gui,"dont-change-formulae"))))
result |= PASTE_EXPR_LOCAL_RELOCATE;
cmd_paste_to_selection (WORKBOOK_CONTROL (state->wbcg), state->sv, result);
@@ -247,41 +247,41 @@ dialog_paste_special (WBCGtk *wbcg)
state = g_new0 (PasteSpecialState, 1);
state->wbcg = wbcg;
state->gui = gui;
- state->dialog = gnm_xml_get_widget (state->gui, "paste-special");
+ state->dialog = go_gtk_builder_get_widget (state->gui, "paste-special");
state->sheet = wbcg_cur_sheet (wbcg);
state->sv = wb_control_cur_sheet_view (WORKBOOK_CONTROL (wbcg));
g_return_if_fail (state->dialog != NULL);
- state->link_button = gnm_xml_get_widget (state->gui,"paste-link_button");
+ state->link_button = go_gtk_builder_get_widget (state->gui,"paste-link_button");
g_signal_connect (G_OBJECT (state->link_button),
"clicked",
G_CALLBACK (cb_tool_paste_link_clicked), state);
- state->help_button = gnm_xml_get_widget (state->gui, "help_button");
+ state->help_button = go_gtk_builder_get_widget (state->gui, "help_button");
gnumeric_init_help_button (state->help_button, GNUMERIC_HELP_LINK_PASTE_SPECIAL);
- state->cancel_button = gnm_xml_get_widget (state->gui, "cancel_button");
+ state->cancel_button = go_gtk_builder_get_widget (state->gui, "cancel_button");
g_signal_connect (G_OBJECT (state->cancel_button),
"clicked",
G_CALLBACK (cb_tool_cancel_clicked), state);
- state->ok_button = gnm_xml_get_widget (state->gui, "ok_button");
+ state->ok_button = go_gtk_builder_get_widget (state->gui, "ok_button");
g_signal_connect (G_OBJECT (state->ok_button),
"clicked",
G_CALLBACK (cb_tool_ok_clicked), state);
for (group = paste_type_group; *group != NULL; group++)
- g_signal_connect_after (gnm_xml_get_widget (state->gui,*group),
+ g_signal_connect_after (go_gtk_builder_get_widget (state->gui,*group),
"toggled",
G_CALLBACK (dialog_paste_special_type_toggled_cb), state);
for (group = cell_operation_group; *group != NULL; group++)
- g_signal_connect_after (gnm_xml_get_widget (state->gui,*group),
+ g_signal_connect_after (go_gtk_builder_get_widget (state->gui,*group),
"toggled",
G_CALLBACK (dialog_paste_special_cell_op_toggled_cb), state);
for (group = region_operation_group; *group != NULL; group++)
- g_signal_connect_after (gnm_xml_get_widget (state->gui,*group),
+ g_signal_connect_after (go_gtk_builder_get_widget (state->gui,*group),
"toggled",
G_CALLBACK (dialog_paste_special_region_op_toggled_cb), state);
- g_signal_connect_after (gnm_xml_get_widget (state->gui, "skip-blanks"),
+ g_signal_connect_after (go_gtk_builder_get_widget (state->gui, "skip-blanks"),
"toggled",
G_CALLBACK (dialog_paste_special_skip_blanks_toggled_cb), state);
paste_link_set_sensitive (state);
diff --git a/src/dialogs/dialog-plugin-manager.c b/src/dialogs/dialog-plugin-manager.c
index 9d63a61..cf8617f 100644
--- a/src/dialogs/dialog-plugin-manager.c
+++ b/src/dialogs/dialog-plugin-manager.c
@@ -663,21 +663,21 @@ dialog_plugin_manager (WBCGtk *wbcg)
pm_gui->cc = GO_CMD_CONTEXT (wbcg);
pm_gui->parent_window = wbcg_toplevel (wbcg);
pm_gui->gui = gui;
- pm_gui->dialog_pm = GTK_DIALOG (gnm_xml_get_widget (gui, "dialog_plugin_manager"));
+ pm_gui->dialog_pm = GTK_DIALOG (go_gtk_builder_get_widget (gui, "dialog_plugin_manager"));
/* Set-up plugin list page */
pm_gui->button_activate_all =
- GTK_BUTTON (gnm_xml_get_widget (gui, "button_activate_all"));
+ GTK_BUTTON (go_gtk_builder_get_widget (gui, "button_activate_all"));
/* If we add the following image in.ui it does */
/* not obey gtk-button-images = 0 */
image = g_object_ref (gtk_image_new_from_stock (GTK_STOCK_EXECUTE,
GTK_ICON_SIZE_BUTTON));
gtk_button_set_image (pm_gui->button_activate_all, image);
- pm_gui->button_rescan_directories = GTK_BUTTON (gnm_xml_get_widget
+ pm_gui->button_rescan_directories = GTK_BUTTON (go_gtk_builder_get_widget
(gui, "button_rescan_directories"));
- pm_gui->checkbutton_install_new = GTK_CHECK_BUTTON (gnm_xml_get_widget
+ pm_gui->checkbutton_install_new = GTK_CHECK_BUTTON (go_gtk_builder_get_widget
(gui, "checkbutton_install_new"));
pm_gui->model_plugins = gtk_list_store_new (
@@ -704,14 +704,14 @@ dialog_plugin_manager (WBCGtk *wbcg)
"text", PLUGIN_NAME, NULL);
gtk_tree_view_column_set_sort_column_id (column, PLUGIN_NAME);
gtk_tree_view_append_column (pm_gui->list_plugins, column);
- scrolled = gnm_xml_get_widget (gui, "scrolled_plugin_list");
+ scrolled = go_gtk_builder_get_widget (gui, "scrolled_plugin_list");
gtk_container_add (GTK_CONTAINER (scrolled), GTK_WIDGET (pm_gui->list_plugins));
/* Set-up plugin details page */
pm_gui->text_description = gtk_text_view_get_buffer (GTK_TEXT_VIEW (
- gnm_xml_get_widget (gui, "textview_plugin_description")));
- pm_gui->entry_directory = GTK_ENTRY (gnm_xml_get_widget (gui, "entry_directory"));
+ go_gtk_builder_get_widget (gui, "textview_plugin_description")));
+ pm_gui->entry_directory = GTK_ENTRY (go_gtk_builder_get_widget (gui, "entry_directory"));
pm_gui->model_details = gtk_tree_store_new (
DETAILS_NUM_COLMNS, G_TYPE_STRING, G_TYPE_STRING);
@@ -725,17 +725,17 @@ dialog_plugin_manager (WBCGtk *wbcg)
_("ID"), gtk_cell_renderer_text_new (),
"text", DETAILS_ID, NULL);
gtk_tree_view_append_column (pm_gui->view_details, column);
- scrolled = gnm_xml_get_widget (gui, "scrolled_plugin_details");
+ scrolled = go_gtk_builder_get_widget (gui, "scrolled_plugin_details");
gtk_container_add (GTK_CONTAINER (scrolled), GTK_WIDGET (pm_gui->view_details));
pm_gui->frame_mark_for_deactivation =
- gnm_xml_get_widget (gui, "frame_mark_for_deactivation");
+ go_gtk_builder_get_widget (gui, "frame_mark_for_deactivation");
pm_gui->checkbutton_mark_for_deactivation =
- gnm_xml_get_widget (gui, "checkbutton_mark_for_deactivation");
+ go_gtk_builder_get_widget (gui, "checkbutton_mark_for_deactivation");
/* Set-up directories page */
- hbox = gnm_xml_get_widget (gui, "directory-box");
+ hbox = go_gtk_builder_get_widget (gui, "directory-box");
pm_gui->model_directories = gtk_list_store_new (DIR_NUM_COLMNS, G_TYPE_STRING,
G_TYPE_BOOLEAN);
pm_gui->list_directories = GTK_TREE_VIEW (
@@ -748,14 +748,14 @@ dialog_plugin_manager (WBCGtk *wbcg)
NULL);
gtk_tree_view_column_set_sort_column_id (column, DIR_NAME);
gtk_tree_view_append_column (pm_gui->list_directories, column);
- scrolled_directories = gnm_xml_get_widget (gui, "scrolled_directories");
+ scrolled_directories = go_gtk_builder_get_widget (gui, "scrolled_directories");
gtk_container_add (GTK_CONTAINER (scrolled_directories),
GTK_WIDGET (pm_gui->list_directories));
- pm_gui->button_directory_add = GTK_BUTTON (gnm_xml_get_widget
+ pm_gui->button_directory_add = GTK_BUTTON (go_gtk_builder_get_widget
(gui, "button_directory_add"));
gtk_button_set_alignment (GTK_BUTTON (pm_gui->button_directory_add), 0., .5);
- pm_gui->button_directory_delete = GTK_BUTTON (gnm_xml_get_widget
+ pm_gui->button_directory_delete = GTK_BUTTON (go_gtk_builder_get_widget
(gui, "button_directory_delete"));
gtk_button_set_alignment (GTK_BUTTON (pm_gui->button_directory_delete), 0., .5);
@@ -766,16 +766,16 @@ dialog_plugin_manager (WBCGtk *wbcg)
/* Done setting up pages */
- pm_gui->gnotebook = GTK_NOTEBOOK (gnm_xml_get_widget (gui, "notebook1"));
+ pm_gui->gnotebook = GTK_NOTEBOOK (go_gtk_builder_get_widget (gui, "notebook1"));
gtk_widget_show_all (GTK_WIDGET (pm_gui->gnotebook));
pm_gui_load_directory_page (pm_gui);
pm_dialog_init (pm_gui);
gnumeric_init_help_button (
- gnm_xml_get_widget (gui, "help_button"),
+ go_gtk_builder_get_widget (gui, "help_button"),
GNUMERIC_HELP_LINK_PLUGIN_MANAGER);
- g_signal_connect_swapped (gnm_xml_get_widget (gui, "button_close_manager"),
+ g_signal_connect_swapped (go_gtk_builder_get_widget (gui, "button_close_manager"),
"clicked",
G_CALLBACK (cb_pm_close_clicked), pm_gui);
diff --git a/src/dialogs/dialog-preferences.c b/src/dialogs/dialog-preferences.c
index 4eeb601..10af1bd 100644
--- a/src/dialogs/dialog-preferences.c
+++ b/src/dialogs/dialog-preferences.c
@@ -1296,10 +1296,10 @@ dialog_preferences (WBCGtk *wbcg, gint page)
state = g_new0 (PrefState, 1);
state->root = gnm_conf_get_root ();
state->gui = gui;
- state->dialog = gnm_xml_get_widget (gui, "preferences");
- state->notebook = (GtkNotebook*)gnm_xml_get_widget (gui, "notebook");
+ state->dialog = go_gtk_builder_get_widget (gui, "preferences");
+ state->notebook = (GtkNotebook*)go_gtk_builder_get_widget (gui, "notebook");
- state->view = GTK_TREE_VIEW(gnm_xml_get_widget (gui, "itemlist"));
+ state->view = GTK_TREE_VIEW(go_gtk_builder_get_widget (gui, "itemlist"));
state->store = gtk_tree_store_new (NUM_COLUMNS,
GDK_TYPE_PIXBUF,
G_TYPE_STRING,
@@ -1323,12 +1323,12 @@ dialog_preferences (WBCGtk *wbcg, gint page)
"changed",
G_CALLBACK (cb_dialog_pref_selection_changed), state);
- g_signal_connect_swapped (G_OBJECT (gnm_xml_get_widget (gui, "close_button")),
+ g_signal_connect_swapped (G_OBJECT (go_gtk_builder_get_widget (gui, "close_button")),
"clicked",
G_CALLBACK (cb_close_clicked), state);
gnumeric_init_help_button (
- gnm_xml_get_widget (state->gui, "help_button"),
+ go_gtk_builder_get_widget (state->gui, "help_button"),
GNUMERIC_HELP_LINK_PREFERENCES);
g_signal_connect_swapped (G_OBJECT (state->dialog),
"destroy",
diff --git a/src/dialogs/dialog-printer-setup.c b/src/dialogs/dialog-printer-setup.c
index 5901641..5a208b4 100644
--- a/src/dialogs/dialog-printer-setup.c
+++ b/src/dialogs/dialog-printer-setup.c
@@ -411,12 +411,12 @@ margin_preview_page_available_size(PrinterSetupState *state,
available_size->width = 0;
available_size->height = 0;
- table = GTK_TABLE (gnm_xml_get_widget (state->gui, "table-paper-selector"));
+ table = GTK_TABLE (go_gtk_builder_get_widget (state->gui, "table-paper-selector"));
widths = g_new0(guint, table->ncols);
heights = g_new0(guint, table->nrows);
- container = GTK_BOX (gnm_xml_get_widget (state->gui,
+ container = GTK_BOX (go_gtk_builder_get_widget (state->gui,
"container-paper-sample"));
align = GTK_ALIGNMENT (gtk_widget_get_parent(GTK_WIDGET(container)));
@@ -711,7 +711,7 @@ margin_spin_configure (UnitInfo *target, PrinterSetupState *state,
{
target->value = 0.;
target->pi = &state->preview;
- target->spin = GTK_SPIN_BUTTON (gnm_xml_get_widget (state->gui, spin_name));
+ target->spin = GTK_SPIN_BUTTON (go_gtk_builder_get_widget (state->gui, spin_name));
target->state = state;
gtk_spin_button_set_update_policy (target->spin, GTK_UPDATE_IF_VALID);
g_signal_connect_swapped (G_OBJECT (target->spin),
@@ -822,7 +822,7 @@ do_setup_margin (PrinterSetupState *state)
gtk_combo_box_set_active_iter (GTK_COMBO_BOX (state->unit_selector), ¤t);
}
- table = gnm_xml_get_widget (state->gui, "table-paper-selector");
+ table = go_gtk_builder_get_widget (state->gui, "table-paper-selector");
gtk_table_attach (GTK_TABLE (table), state->unit_selector, 3, 4, 8, 9,
GTK_FILL | GTK_EXPAND, 0, 0, 0);
@@ -843,9 +843,9 @@ do_setup_margin (PrinterSetupState *state)
margin_spin_configure (&state->margins.right, state, "spin-right",
value_changed_right_cb);
- state->check_center_h = gnm_xml_get_widget (state->gui,
+ state->check_center_h = go_gtk_builder_get_widget (state->gui,
"check_center_h");
- state->check_center_v = gnm_xml_get_widget (state->gui,
+ state->check_center_v = go_gtk_builder_get_widget (state->gui,
"check_center_v");
gtk_toggle_button_set_active (
GTK_TOGGLE_BUTTON (state->check_center_v),
@@ -854,7 +854,7 @@ do_setup_margin (PrinterSetupState *state)
GTK_TOGGLE_BUTTON (state->check_center_h),
state->pi->center_horizontally == 1);
- container = GTK_BOX (gnm_xml_get_widget (state->gui,
+ container = GTK_BOX (go_gtk_builder_get_widget (state->gui,
"container-paper-sample"));
gtk_box_pack_start (container, state->preview.canvas, TRUE, TRUE, 0);
@@ -1044,8 +1044,8 @@ do_setup_hf_menus (PrinterSetupState *state)
g_return_if_fail (state != NULL);
- header = GTK_COMBO_BOX (gnm_xml_get_widget (state->gui, "option-menu-header"));
- footer = GTK_COMBO_BOX (gnm_xml_get_widget (state->gui, "option-menu-footer"));
+ header = GTK_COMBO_BOX (go_gtk_builder_get_widget (state->gui, "option-menu-header"));
+ footer = GTK_COMBO_BOX (go_gtk_builder_get_widget (state->gui, "option-menu-footer"));
if (state->header)
print_hf_register (state->header);
@@ -1401,8 +1401,8 @@ hf_customize_apply (HFCustomizeState *hf_state)
gtk_text_buffer_set_modified (hf_state->middle_buffer, FALSE);
gtk_text_buffer_set_modified (hf_state->right_buffer, FALSE);
- gtk_widget_set_sensitive (gnm_xml_get_widget (hf_state->gui, "apply_button"), FALSE);
- gtk_widget_set_sensitive (gnm_xml_get_widget (hf_state->gui, "ok_button"), FALSE);
+ gtk_widget_set_sensitive (go_gtk_builder_get_widget (hf_state->gui, "apply_button"), FALSE);
+ gtk_widget_set_sensitive (go_gtk_builder_get_widget (hf_state->gui, "ok_button"), FALSE);
}
@@ -1416,8 +1416,8 @@ hf_customize_ok (HFCustomizeState *hf_state)
static gboolean
cb_hf_changed (GtkBuilder *gui)
{
- gtk_widget_set_sensitive (gnm_xml_get_widget (gui, "apply_button"), TRUE);
- gtk_widget_set_sensitive (gnm_xml_get_widget (gui, "ok_button"), TRUE);
+ gtk_widget_set_sensitive (go_gtk_builder_get_widget (gui, "apply_button"), TRUE);
+ gtk_widget_set_sensitive (go_gtk_builder_get_widget (gui, "ok_button"), TRUE);
return FALSE;
}
@@ -1700,11 +1700,11 @@ do_hf_customize (gboolean header, PrinterSetupState *state)
hf_state->printer_setup_state = state;
hf_state->is_header = header;
- left = GTK_TEXT_VIEW (gnm_xml_get_widget (gui, "left-format"));
- middle = GTK_TEXT_VIEW (gnm_xml_get_widget (gui, "middle-format"));
- right = GTK_TEXT_VIEW (gnm_xml_get_widget (gui, "right-format"));
+ left = GTK_TEXT_VIEW (go_gtk_builder_get_widget (gui, "left-format"));
+ middle = GTK_TEXT_VIEW (go_gtk_builder_get_widget (gui, "middle-format"));
+ right = GTK_TEXT_VIEW (go_gtk_builder_get_widget (gui, "right-format"));
- dialog = gnm_xml_get_widget (gui, "hf-config");
+ dialog = go_gtk_builder_get_widget (gui, "hf-config");
hf_state->dialog = dialog;
if (header) {
@@ -1737,15 +1737,15 @@ do_hf_customize (gboolean header, PrinterSetupState *state)
g_signal_connect (G_OBJECT (right_buffer), "delete-range",
G_CALLBACK (buffer_delete_range_cb), hf_state);
- g_signal_connect_swapped (G_OBJECT (gnm_xml_get_widget (gui, "apply_button")),
+ g_signal_connect_swapped (G_OBJECT (go_gtk_builder_get_widget (gui, "apply_button")),
"clicked", G_CALLBACK (hf_customize_apply), hf_state);
- g_signal_connect_swapped (G_OBJECT (gnm_xml_get_widget (gui, "ok_button")),
+ g_signal_connect_swapped (G_OBJECT (go_gtk_builder_get_widget (gui, "ok_button")),
"clicked", G_CALLBACK (hf_customize_ok), hf_state);
g_signal_connect_swapped
- (G_OBJECT (gnm_xml_get_widget (gui, "cancel_button")),
+ (G_OBJECT (go_gtk_builder_get_widget (gui, "cancel_button")),
"clicked", G_CALLBACK (gtk_widget_destroy), dialog);
- gtk_widget_set_sensitive (gnm_xml_get_widget (gui, "apply_button"), FALSE);
- gtk_widget_set_sensitive (gnm_xml_get_widget (gui, "ok_button"), FALSE);
+ gtk_widget_set_sensitive (go_gtk_builder_get_widget (gui, "apply_button"), FALSE);
+ gtk_widget_set_sensitive (go_gtk_builder_get_widget (gui, "ok_button"), FALSE);
if (header)
g_signal_connect (G_OBJECT (dialog), "destroy",
@@ -1768,49 +1768,49 @@ do_hf_customize (gboolean header, PrinterSetupState *state)
g_signal_connect_swapped (G_OBJECT (right_buffer),
"modified-changed", G_CALLBACK (cb_hf_changed), gui);
- gnumeric_init_help_button (gnm_xml_get_widget (gui, "help_button"),
+ gnumeric_init_help_button (go_gtk_builder_get_widget (gui, "help_button"),
header ? GNUMERIC_HELP_LINK_PRINTER_SETUP_HEADER_CUSTOMIZATION
: GNUMERIC_HELP_LINK_PRINTER_SETUP_FOOTER_CUSTOMIZATION);
g_signal_connect_swapped
- (G_OBJECT (gnm_xml_get_widget (gui, "delete-button")),
+ (G_OBJECT (go_gtk_builder_get_widget (gui, "delete-button")),
"clicked", G_CALLBACK (hf_delete_tag_cb), hf_state);
- button = GTK_TOOL_BUTTON (gnm_xml_get_widget (gui, "insert-date-button"));
+ button = GTK_TOOL_BUTTON (go_gtk_builder_get_widget (gui, "insert-date-button"));
gtk_tool_button_set_stock_id (button, "Gnumeric_Pagesetup_HF_Date");
hf_attach_insert_date_menu (GTK_MENU_TOOL_BUTTON (button), hf_state);
- button = GTK_TOOL_BUTTON (gnm_xml_get_widget (gui, "insert-page-button"));
+ button = GTK_TOOL_BUTTON (go_gtk_builder_get_widget (gui, "insert-page-button"));
gtk_tool_button_set_stock_id (button, "Gnumeric_Pagesetup_HF_Page");
g_signal_connect_swapped
(G_OBJECT (button),
"clicked", G_CALLBACK (hf_insert_page_cb), hf_state);
- button = GTK_TOOL_BUTTON (gnm_xml_get_widget (gui, "insert-pages-button"));
+ button = GTK_TOOL_BUTTON (go_gtk_builder_get_widget (gui, "insert-pages-button"));
gtk_tool_button_set_stock_id (button, "Gnumeric_Pagesetup_HF_Pages");
g_signal_connect_swapped
(G_OBJECT (button),
"clicked", G_CALLBACK (hf_insert_pages_cb), hf_state);
- button = GTK_TOOL_BUTTON (gnm_xml_get_widget (gui, "insert-sheet-button"));
+ button = GTK_TOOL_BUTTON (go_gtk_builder_get_widget (gui, "insert-sheet-button"));
gtk_tool_button_set_stock_id (button, "Gnumeric_Pagesetup_HF_Sheet");
g_signal_connect_swapped
(G_OBJECT (button),
"clicked", G_CALLBACK (hf_insert_sheet_cb), hf_state);
- button = GTK_TOOL_BUTTON (gnm_xml_get_widget (gui, "insert-time-button"));
+ button = GTK_TOOL_BUTTON (go_gtk_builder_get_widget (gui, "insert-time-button"));
gtk_tool_button_set_stock_id (button, "Gnumeric_Pagesetup_HF_Time");
hf_attach_insert_time_menu (GTK_MENU_TOOL_BUTTON (button), hf_state);
g_signal_connect_swapped
- (G_OBJECT (gnm_xml_get_widget (gui, "insert-file-button")),
+ (G_OBJECT (go_gtk_builder_get_widget (gui, "insert-file-button")),
"clicked", G_CALLBACK (hf_insert_file_cb), hf_state);
g_signal_connect_swapped
- (G_OBJECT (gnm_xml_get_widget (gui, "insert-path-button")),
+ (G_OBJECT (go_gtk_builder_get_widget (gui, "insert-path-button")),
"clicked", G_CALLBACK (hf_insert_path_cb), hf_state);
- button = GTK_TOOL_BUTTON (gnm_xml_get_widget (gui, "insert-cell-button"));
+ button = GTK_TOOL_BUTTON (go_gtk_builder_get_widget (gui, "insert-cell-button"));
gtk_tool_button_set_stock_id (button, "Gnumeric_Pagesetup_HF_Cell");
hf_attach_insert_cell_menu (GTK_MENU_TOOL_BUTTON (button), hf_state);
@@ -1861,7 +1861,7 @@ do_hf_dt_format_customize (gboolean date, HFCustomizeState *hf_state)
hf_dt_state->hf_state = hf_state;
hf_dt_state->format_string = NULL;
- dialog = gnm_xml_get_widget (gui, "hf-dt-format");
+ dialog = go_gtk_builder_get_widget (gui, "hf-dt-format");
hf_dt_state->dialog = dialog;
if (date) {
@@ -1870,16 +1870,16 @@ do_hf_dt_format_customize (gboolean date, HFCustomizeState *hf_state)
gtk_window_set_title (GTK_WINDOW (dialog), _("Time format selection"));
}
- g_signal_connect_swapped (G_OBJECT (gnm_xml_get_widget (gui, "ok_button")),
+ g_signal_connect_swapped (G_OBJECT (go_gtk_builder_get_widget (gui, "ok_button")),
"clicked", G_CALLBACK (hf_dt_customize_ok), hf_dt_state);
g_object_set_data_full (G_OBJECT (dialog),
"hfdtstate", hf_dt_state, (GDestroyNotify) g_free);
- gnumeric_init_help_button (gnm_xml_get_widget (gui, "help_button"),
+ gnumeric_init_help_button (go_gtk_builder_get_widget (gui, "help_button"),
GNUMERIC_HELP_LINK_PRINTER_SETUP_GENERAL);
- table = gnm_xml_get_widget (gui, "layout-table");
+ table = go_gtk_builder_get_widget (gui, "layout-table");
if (table == NULL) {
gtk_widget_destroy (dialog);
return NULL;
@@ -2046,12 +2046,12 @@ create_hf_preview_canvas (PrinterSetupState *state, gboolean header)
g_signal_connect (G_OBJECT (pi->canvas),
"event",
G_CALLBACK (header_preview_event), state);
- wid = gnm_xml_get_widget (state->gui, "container-header-sample");
+ wid = go_gtk_builder_get_widget (state->gui, "container-header-sample");
} else {
g_signal_connect (G_OBJECT (pi->canvas),
"event",
G_CALLBACK (footer_preview_event), state);
- wid = gnm_xml_get_widget (state->gui, "container-footer-sample");
+ wid = go_gtk_builder_get_widget (state->gui, "container-footer-sample");
}
gtk_widget_set_size_request (wid, width, height);
@@ -2074,13 +2074,13 @@ do_setup_hf (PrinterSetupState *state)
g_return_if_fail (state != NULL);
- header = GTK_COMBO_BOX (gnm_xml_get_widget (state->gui, "option-menu-header"));
+ header = GTK_COMBO_BOX (go_gtk_builder_get_widget (state->gui, "option-menu-header"));
renderer = (GtkCellRenderer*) gtk_cell_renderer_text_new();
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (header), renderer, TRUE);
gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (header), renderer,
"text", 0,
NULL);
- footer = GTK_COMBO_BOX (gnm_xml_get_widget (state->gui, "option-menu-footer"));
+ footer = GTK_COMBO_BOX (go_gtk_builder_get_widget (state->gui, "option-menu-footer"));
renderer = (GtkCellRenderer*) gtk_cell_renderer_text_new();
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (footer), renderer, TRUE);
gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (footer), renderer,
@@ -2094,11 +2094,11 @@ do_setup_hf (PrinterSetupState *state)
do_setup_hf_menus (state);
- w = gnm_xml_get_widget (state->gui, "configure-header-button");
+ w = go_gtk_builder_get_widget (state->gui, "configure-header-button");
g_signal_connect_swapped (G_OBJECT (w),
"clicked",
G_CALLBACK (do_header_customize), state);
- w = gnm_xml_get_widget (state->gui, "configure-footer-button");
+ w = go_gtk_builder_get_widget (state->gui, "configure-footer-button");
g_signal_connect_swapped (G_OBJECT (w),
"clicked",
G_CALLBACK (do_footer_customize), state);
@@ -2151,18 +2151,18 @@ load_print_area (PrinterSetupState *state)
static void
do_setup_page_info (PrinterSetupState *state)
{
- GtkWidget *pa_hbox = gnm_xml_get_widget (state->gui,
+ GtkWidget *pa_hbox = go_gtk_builder_get_widget (state->gui,
"print-area-hbox");
- GtkWidget *repeat_table = gnm_xml_get_widget (state->gui,
+ GtkWidget *repeat_table = go_gtk_builder_get_widget (state->gui,
"repeat-table");
- GtkWidget *gridlines = gnm_xml_get_widget (state->gui, "check-grid-lines");
- GtkWidget *onlystyles= gnm_xml_get_widget (state->gui, "check-only-styles");
- GtkWidget *bw = gnm_xml_get_widget (state->gui, "check-black-white");
- GtkWidget *titles = gnm_xml_get_widget (state->gui, "check-print-titles");
- GtkWidget *do_not_print = gnm_xml_get_widget (state->gui, "check-do-not-print");
- GtkWidget *order_rd = gnm_xml_get_widget (state->gui, "radio-order-right");
- GtkWidget *order_dr = gnm_xml_get_widget (state->gui, "radio-order-down");
- GtkWidget *order_table = gnm_xml_get_widget (state->gui, "page-order-table");
+ GtkWidget *gridlines = go_gtk_builder_get_widget (state->gui, "check-grid-lines");
+ GtkWidget *onlystyles= go_gtk_builder_get_widget (state->gui, "check-only-styles");
+ GtkWidget *bw = go_gtk_builder_get_widget (state->gui, "check-black-white");
+ GtkWidget *titles = go_gtk_builder_get_widget (state->gui, "check-print-titles");
+ GtkWidget *do_not_print = go_gtk_builder_get_widget (state->gui, "check-do-not-print");
+ GtkWidget *order_rd = go_gtk_builder_get_widget (state->gui, "radio-order-right");
+ GtkWidget *order_dr = go_gtk_builder_get_widget (state->gui, "radio-order-down");
+ GtkWidget *order_table = go_gtk_builder_get_widget (state->gui, "page-order-table");
GtkWidget *order;
state->area_entry = gnm_expr_entry_new (state->wbcg, TRUE);
@@ -2230,7 +2230,7 @@ do_setup_page_info (PrinterSetupState *state)
gnumeric_editable_enters (GTK_WINDOW (state->dialog),
GTK_WIDGET (gnm_expr_entry_get_entry (state->left_entry)));
/* gnumeric_editable_enters (GTK_WINDOW (state->dialog), */
-/* gtk_bin_get_child (GTK_BIN (gnm_xml_get_widget (state->gui, "comments-combo")))); */
+/* gtk_bin_get_child (GTK_BIN (go_gtk_builder_get_widget (state->gui, "comments-combo")))); */
gnm_expr_entry_load_from_text (state->top_entry,
state->pi->repeat_top);
@@ -2279,7 +2279,7 @@ do_update_page (PrinterSetupState *state)
gui = state->gui;
- gtk_label_set_text (GTK_LABEL (gnm_xml_get_widget (gui,
+ gtk_label_set_text (GTK_LABEL (go_gtk_builder_get_widget (gui,
"paper-type-label")),
print_info_get_paper_display_name (pi));
state->height = print_info_get_paper_height (pi,state->display_unit);
@@ -2302,7 +2302,7 @@ do_update_page (PrinterSetupState *state)
break;
}
text = g_strdup_printf (format, state->width, state->height);
- gtk_label_set_text (GTK_LABEL (gnm_xml_get_widget (gui,
+ gtk_label_set_text (GTK_LABEL (go_gtk_builder_get_widget (gui,
"paper-size-label")),
text);
g_free (text);
@@ -2378,14 +2378,14 @@ do_setup_page (PrinterSetupState *state)
gui = state->gui;
- g_signal_connect_swapped (G_OBJECT (gnm_xml_get_widget (gui, "paper-button")),
+ g_signal_connect_swapped (G_OBJECT (go_gtk_builder_get_widget (gui, "paper-button")),
"clicked",
G_CALLBACK (dialog_gtk_printer_setup_cb), state);
- state->portrait_radio = gnm_xml_get_widget (gui, "portrait-button");
- state->landscape_radio = gnm_xml_get_widget (gui, "landscape-button");
- state->rev_portrait_radio = gnm_xml_get_widget (gui, "r-portrait-button");
- state->rev_landscape_radio = gnm_xml_get_widget (gui, "r-landscape-button");
+ state->portrait_radio = go_gtk_builder_get_widget (gui, "portrait-button");
+ state->landscape_radio = go_gtk_builder_get_widget (gui, "landscape-button");
+ state->rev_portrait_radio = go_gtk_builder_get_widget (gui, "r-portrait-button");
+ state->rev_landscape_radio = go_gtk_builder_get_widget (gui, "r-landscape-button");
g_signal_connect_swapped (G_OBJECT (state->portrait_radio), "toggled",
G_CALLBACK (orientation_changed_cb), state);
@@ -2406,8 +2406,8 @@ scaling_percent_changed (GtkToggleButton *toggle, PrinterSetupState *state)
{
gboolean scale_percent = gtk_toggle_button_get_active (toggle);
- gtk_widget_set_sensitive (GTK_WIDGET (gnm_xml_get_widget (state->gui, "scale-percent-spin")), scale_percent);
- gtk_widget_set_sensitive (GTK_WIDGET (gnm_xml_get_widget (state->gui, "scale-percent-label")), scale_percent);
+ gtk_widget_set_sensitive (GTK_WIDGET (go_gtk_builder_get_widget (state->gui, "scale-percent-spin")), scale_percent);
+ gtk_widget_set_sensitive (GTK_WIDGET (go_gtk_builder_get_widget (state->gui, "scale-percent-label")), scale_percent);
}
static void
@@ -2415,10 +2415,10 @@ scaling_fit_to_h_changed (GtkToggleButton *toggle, PrinterSetupState *state)
{
gboolean scale_fit_to_h = gtk_toggle_button_get_active (toggle);
gtk_widget_set_sensitive
- (GTK_WIDGET (gnm_xml_get_widget (state->gui, "scale-h-spin")),
+ (GTK_WIDGET (go_gtk_builder_get_widget (state->gui, "scale-h-spin")),
scale_fit_to_h);
gtk_widget_set_sensitive
- (GTK_WIDGET (gnm_xml_get_widget (state->gui, "fit-h-check-label")),
+ (GTK_WIDGET (go_gtk_builder_get_widget (state->gui, "fit-h-check-label")),
scale_fit_to_h);
}
@@ -2427,10 +2427,10 @@ scaling_fit_to_v_changed (GtkToggleButton *toggle, PrinterSetupState *state)
{
gboolean scale_fit_to_v = gtk_toggle_button_get_active (toggle);
gtk_widget_set_sensitive
- (GTK_WIDGET (gnm_xml_get_widget (state->gui, "scale-v-spin")),
+ (GTK_WIDGET (go_gtk_builder_get_widget (state->gui, "scale-v-spin")),
scale_fit_to_v);
gtk_widget_set_sensitive
- (GTK_WIDGET (gnm_xml_get_widget (state->gui, "fit-v-check-label")),
+ (GTK_WIDGET (go_gtk_builder_get_widget (state->gui, "fit-v-check-label")),
scale_fit_to_v);
}
@@ -2441,23 +2441,23 @@ scaling_fit_to_changed (GtkToggleButton *toggle, PrinterSetupState *state)
if (scale_fit_to) {
scaling_fit_to_h_changed (GTK_TOGGLE_BUTTON
- (gnm_xml_get_widget (state->gui, "fit-h-check")), state);
+ (go_gtk_builder_get_widget (state->gui, "fit-h-check")), state);
scaling_fit_to_v_changed (GTK_TOGGLE_BUTTON
- (gnm_xml_get_widget (state->gui, "fit-v-check")), state);
+ (go_gtk_builder_get_widget (state->gui, "fit-v-check")), state);
} else {
gtk_widget_set_sensitive
- (GTK_WIDGET (gnm_xml_get_widget (state->gui, "scale-v-spin")), FALSE);
+ (GTK_WIDGET (go_gtk_builder_get_widget (state->gui, "scale-v-spin")), FALSE);
gtk_widget_set_sensitive
- (GTK_WIDGET (gnm_xml_get_widget (state->gui, "fit-v-check-label")), FALSE);
+ (GTK_WIDGET (go_gtk_builder_get_widget (state->gui, "fit-v-check-label")), FALSE);
gtk_widget_set_sensitive
- (GTK_WIDGET (gnm_xml_get_widget (state->gui, "scale-h-spin")), FALSE);
+ (GTK_WIDGET (go_gtk_builder_get_widget (state->gui, "scale-h-spin")), FALSE);
gtk_widget_set_sensitive
- (GTK_WIDGET (gnm_xml_get_widget (state->gui, "fit-h-check-label")), FALSE);
+ (GTK_WIDGET (go_gtk_builder_get_widget (state->gui, "fit-h-check-label")), FALSE);
}
gtk_widget_set_sensitive
- (GTK_WIDGET (gnm_xml_get_widget (state->gui, "fit-h-check")), scale_fit_to);
+ (GTK_WIDGET (go_gtk_builder_get_widget (state->gui, "fit-h-check")), scale_fit_to);
gtk_widget_set_sensitive
- (GTK_WIDGET (gnm_xml_get_widget (state->gui, "fit-v-check")), scale_fit_to);
+ (GTK_WIDGET (go_gtk_builder_get_widget (state->gui, "fit-v-check")), scale_fit_to);
}
static void
@@ -2469,17 +2469,17 @@ do_setup_scale (PrinterSetupState *state)
gui = state->gui;
- state->scale_percent_radio = gnm_xml_get_widget (gui, "scale-percent-radio");
- state->scale_fit_to_radio = gnm_xml_get_widget (gui, "scale-fit-to-radio");
- state->scale_no_radio = gnm_xml_get_widget (gui, "scale-no-radio");
+ state->scale_percent_radio = go_gtk_builder_get_widget (gui, "scale-percent-radio");
+ state->scale_fit_to_radio = go_gtk_builder_get_widget (gui, "scale-fit-to-radio");
+ state->scale_no_radio = go_gtk_builder_get_widget (gui, "scale-no-radio");
g_signal_connect (G_OBJECT (state->scale_percent_radio), "toggled",
G_CALLBACK (scaling_percent_changed), state);
g_signal_connect (G_OBJECT (state->scale_fit_to_radio), "toggled",
G_CALLBACK (scaling_fit_to_changed), state);
- g_signal_connect (G_OBJECT (gnm_xml_get_widget (state->gui, "fit-h-check")),
+ g_signal_connect (G_OBJECT (go_gtk_builder_get_widget (state->gui, "fit-h-check")),
"toggled", G_CALLBACK (scaling_fit_to_h_changed), state);
- g_signal_connect (G_OBJECT (gnm_xml_get_widget (state->gui, "fit-v-check")),
+ g_signal_connect (G_OBJECT (go_gtk_builder_get_widget (state->gui, "fit-v-check")),
"toggled", G_CALLBACK (scaling_fit_to_v_changed), state);
scaling_percent_changed (GTK_TOGGLE_BUTTON (state->scale_percent_radio), state);
@@ -2498,26 +2498,26 @@ do_setup_scale (PrinterSetupState *state)
(GTK_TOGGLE_BUTTON (state->scale_fit_to_radio), TRUE);
}
- scale_percent_spin = gnm_xml_get_widget (gui, "scale-percent-spin");
+ scale_percent_spin = go_gtk_builder_get_widget (gui, "scale-percent-spin");
gtk_spin_button_set_value (
GTK_SPIN_BUTTON (scale_percent_spin), pi->scaling.percentage.x);
gnumeric_editable_enters (GTK_WINDOW (state->dialog),
GTK_WIDGET (scale_percent_spin));
- scale_width_spin = gnm_xml_get_widget (gui, "scale-h-spin");
+ scale_width_spin = go_gtk_builder_get_widget (gui, "scale-h-spin");
gtk_spin_button_set_value (
GTK_SPIN_BUTTON (scale_width_spin), pi->scaling.dim.cols);
gtk_toggle_button_set_active
- (GTK_TOGGLE_BUTTON (gnm_xml_get_widget (state->gui, "fit-h-check")),
+ (GTK_TOGGLE_BUTTON (go_gtk_builder_get_widget (state->gui, "fit-h-check")),
pi->scaling.dim.cols > 0);
gnumeric_editable_enters (GTK_WINDOW (state->dialog),
GTK_WIDGET (scale_width_spin));
- scale_height_spin = gnm_xml_get_widget (gui, "scale-v-spin");
+ scale_height_spin = go_gtk_builder_get_widget (gui, "scale-v-spin");
gtk_spin_button_set_value (
GTK_SPIN_BUTTON (scale_height_spin), pi->scaling.dim.rows);
gtk_toggle_button_set_active
- (GTK_TOGGLE_BUTTON (gnm_xml_get_widget (state->gui, "fit-v-check")),
+ (GTK_TOGGLE_BUTTON (go_gtk_builder_get_widget (state->gui, "fit-v-check")),
pi->scaling.dim.rows > 0);
gnumeric_editable_enters (GTK_WINDOW (state->dialog),
GTK_WIDGET (scale_height_spin));
@@ -2527,7 +2527,7 @@ do_setup_scale (PrinterSetupState *state)
static Sheet *
print_setup_get_sheet (PrinterSetupState *state)
{
- GtkWidget *w = gnm_xml_get_widget (state->gui, "apply-to-all");
+ GtkWidget *w = go_gtk_builder_get_widget (state->gui, "apply-to-all");
gboolean apply_all_sheets = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w));
gnm_conf_set_printsetup_all_sheets (apply_all_sheets);
@@ -2581,7 +2581,7 @@ cb_do_print_ok (PrinterSetupState *state)
fetch_settings (state);
if (gtk_toggle_button_get_active (
GTK_TOGGLE_BUTTON (
- gnm_xml_get_widget (state->gui,
+ go_gtk_builder_get_widget (state->gui,
"is_default_check")))) {
print_info_save (state->pi);
}
@@ -2638,7 +2638,7 @@ do_setup_sheet_selector (PrinterSetupState *state)
g_return_if_fail (state != NULL);
g_return_if_fail (state->sheet != NULL);
- table = gnm_xml_get_widget (state->gui, "table-sheet");
+ table = go_gtk_builder_get_widget (state->gui, "table-sheet");
state->sheet_selector = gtk_combo_box_new_text ();
n = workbook_sheet_count (state->sheet->workbook);
for (i = 0 ; i < n ; i++) {
@@ -2653,14 +2653,14 @@ do_setup_sheet_selector (PrinterSetupState *state)
1, 2, 1, 2,
GTK_EXPAND | GTK_FILL, 0,
0, 0);
- w = gnm_xml_get_widget (state->gui, "apply-to-all");
+ w = go_gtk_builder_get_widget (state->gui, "apply-to-all");
g_signal_connect (G_OBJECT (w),
"toggled",
G_CALLBACK (cb_do_sheet_selector_toggled), state);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (w),
gnm_conf_get_printsetup_all_sheets ());
cb_do_sheet_selector_toggled (GTK_TOGGLE_BUTTON (w), state);
- w = gnm_xml_get_widget (state->gui, "apply-to-selected");
+ w = go_gtk_builder_get_widget (state->gui, "apply-to-selected");
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (w),
!gnm_conf_get_printsetup_all_sheets ());
gtk_widget_show_all (table);
@@ -2675,26 +2675,26 @@ do_setup_main_dialog (PrinterSetupState *state)
g_return_if_fail (state->sheet != NULL);
g_return_if_fail (state->wbcg != NULL);
- state->dialog = gnm_xml_get_widget (state->gui, "print-setup");
+ state->dialog = go_gtk_builder_get_widget (state->gui, "print-setup");
- w = gnm_xml_get_widget (state->gui, "ok");
+ w = go_gtk_builder_get_widget (state->gui, "ok");
g_signal_connect_swapped (G_OBJECT (w),
"clicked",
G_CALLBACK (cb_do_print_ok), state);
- w = gnm_xml_get_widget (state->gui, "print");
+ w = go_gtk_builder_get_widget (state->gui, "print");
g_signal_connect_swapped (G_OBJECT (w),
"clicked",
G_CALLBACK (cb_do_print), state);
- w = gnm_xml_get_widget (state->gui, "preview");
+ w = go_gtk_builder_get_widget (state->gui, "preview");
g_signal_connect_swapped (G_OBJECT (w),
"clicked",
G_CALLBACK (cb_do_print_preview), state);
- w = gnm_xml_get_widget (state->gui, "cancel");
+ w = go_gtk_builder_get_widget (state->gui, "cancel");
g_signal_connect_swapped (G_OBJECT (w),
"clicked",
G_CALLBACK (cb_do_print_cancel), state);
- w = gnm_xml_get_widget (state->gui, "print-setup-notebook");
+ w = go_gtk_builder_get_widget (state->gui, "print-setup-notebook");
gtk_notebook_set_current_page (GTK_NOTEBOOK (w), 0);
g_object_set_data_full (G_OBJECT (state->dialog),
@@ -2763,7 +2763,7 @@ do_fetch_scale (PrinterSetupState *state)
state->pi->scaling.percentage.x = state->pi->scaling.percentage.y = 100.;
state->pi->scaling.type = PRINT_SCALE_PERCENTAGE;
} else {
- w = gnm_xml_get_widget (gui, "scale-percent-spin");
+ w = go_gtk_builder_get_widget (gui, "scale-percent-spin");
state->pi->scaling.percentage.x = state->pi->scaling.percentage.y
= gtk_spin_button_get_value (GTK_SPIN_BUTTON (w));
state->pi->scaling.type =
@@ -2771,20 +2771,20 @@ do_fetch_scale (PrinterSetupState *state)
(GTK_TOGGLE_BUTTON (state->scale_percent_radio))) ?
PRINT_SCALE_PERCENTAGE : PRINT_SCALE_FIT_PAGES);
}
- w = gnm_xml_get_widget (gui, "fit-h-check");
+ w = go_gtk_builder_get_widget (gui, "fit-h-check");
if (!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w)))
state->pi->scaling.dim.cols = 0;
else {
- w = gnm_xml_get_widget (gui, "scale-h-spin");
+ w = go_gtk_builder_get_widget (gui, "scale-h-spin");
state->pi->scaling.dim.cols =
gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (w));
}
- w = gnm_xml_get_widget (gui, "fit-v-check");
+ w = go_gtk_builder_get_widget (gui, "fit-v-check");
if (!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w)))
state->pi->scaling.dim.rows = 0;
else {
- w = gnm_xml_get_widget (gui, "scale-v-spin");
+ w = go_gtk_builder_get_widget (gui, "scale-v-spin");
state->pi->scaling.dim.rows =
gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (w));
}
@@ -2839,17 +2839,17 @@ do_fetch_page_info (PrinterSetupState *state)
PrintInformation *pi = state->pi;
pi->print_grid_lines = gtk_toggle_button_get_active
- (GTK_TOGGLE_BUTTON (gnm_xml_get_widget (state->gui, "check-grid-lines")));
+ (GTK_TOGGLE_BUTTON (go_gtk_builder_get_widget (state->gui, "check-grid-lines")));
pi->print_even_if_only_styles = gtk_toggle_button_get_active
- (GTK_TOGGLE_BUTTON (gnm_xml_get_widget (state->gui, "check-only-styles")));
+ (GTK_TOGGLE_BUTTON (go_gtk_builder_get_widget (state->gui, "check-only-styles")));
pi->print_black_and_white = gtk_toggle_button_get_active
- (GTK_TOGGLE_BUTTON (gnm_xml_get_widget (state->gui, "check-black-white")));
+ (GTK_TOGGLE_BUTTON (go_gtk_builder_get_widget (state->gui, "check-black-white")));
pi->print_titles = gtk_toggle_button_get_active
- (GTK_TOGGLE_BUTTON (gnm_xml_get_widget (state->gui, "check-print-titles")));
+ (GTK_TOGGLE_BUTTON (go_gtk_builder_get_widget (state->gui, "check-print-titles")));
pi->print_across_then_down = gtk_toggle_button_get_active
- (GTK_TOGGLE_BUTTON (gnm_xml_get_widget (state->gui, "radio-order-right")));
+ (GTK_TOGGLE_BUTTON (go_gtk_builder_get_widget (state->gui, "radio-order-right")));
pi->do_not_print = gtk_toggle_button_get_active
- (GTK_TOGGLE_BUTTON (gnm_xml_get_widget (state->gui, "check-do-not-print")));
+ (GTK_TOGGLE_BUTTON (go_gtk_builder_get_widget (state->gui, "check-do-not-print")));
g_free (pi->repeat_top);
pi->repeat_top = g_strdup (gnm_expr_entry_get_text (state->top_entry));
@@ -2922,7 +2922,7 @@ dialog_printer_setup (WBCGtk *wbcg, Sheet *sheet)
GNM_DIALOG_DESTROY_CURRENT_SHEET_REMOVED);
gnumeric_init_help_button (
- gnm_xml_get_widget (state->gui, "help_button"),
+ go_gtk_builder_get_widget (state->gui, "help_button"),
GNUMERIC_HELP_LINK_PRINTER_SETUP_GENERAL);
gnumeric_keyed_dialog (
wbcg, GTK_WINDOW (state->dialog), PRINTER_SETUP_KEY);
diff --git a/src/dialogs/dialog-random-generator-cor.c b/src/dialogs/dialog-random-generator-cor.c
index acc1c54..3fa5e9a 100644
--- a/src/dialogs/dialog-random-generator-cor.c
+++ b/src/dialogs/dialog-random-generator-cor.c
@@ -180,7 +180,7 @@ random_cor_tool_ok_clicked_cb (GtkWidget *button, RandomCorToolState *state)
static void
dialog_random_cor_tool_init (RandomCorToolState *state)
{
- state->count_entry = gnm_xml_get_widget (state->base.gui, "count_entry");
+ state->count_entry = go_gtk_builder_get_widget (state->base.gui, "count_entry");
int_to_entry (GTK_ENTRY (state->count_entry), 2);
gnumeric_editable_enters (GTK_WINDOW (state->base.dialog),
GTK_WIDGET (state->count_entry));
diff --git a/src/dialogs/dialog-random-generator.c b/src/dialogs/dialog-random-generator.c
index a056c4e..2385358 100644
--- a/src/dialogs/dialog-random-generator.c
+++ b/src/dialogs/dialog-random-generator.c
@@ -718,16 +718,16 @@ dialog_random_tool_init (RandomToolState *state)
state->distribution = UniformDistribution;
- state->distribution_table = gnm_xml_get_widget (state->base.gui,
+ state->distribution_table = go_gtk_builder_get_widget (state->base.gui,
"distribution_table");
- state->distribution_combo = gnm_xml_get_widget (state->base.gui,
+ state->distribution_combo = go_gtk_builder_get_widget (state->base.gui,
"distribution_combo");
- state->par1_entry = gnm_xml_get_widget (state->base.gui, "par1_entry");
- state->par1_label = gnm_xml_get_widget (state->base.gui, "par1_label");
- state->par2_label = gnm_xml_get_widget (state->base.gui, "par2_label");
- state->par2_entry = gnm_xml_get_widget (state->base.gui, "par2_entry");
- state->vars_entry = gnm_xml_get_widget (state->base.gui, "vars_entry");
- state->count_entry = gnm_xml_get_widget (state->base.gui, "count_entry");
+ state->par1_entry = go_gtk_builder_get_widget (state->base.gui, "par1_entry");
+ state->par1_label = go_gtk_builder_get_widget (state->base.gui, "par1_label");
+ state->par2_label = go_gtk_builder_get_widget (state->base.gui, "par2_label");
+ state->par2_entry = go_gtk_builder_get_widget (state->base.gui, "par2_entry");
+ state->vars_entry = go_gtk_builder_get_widget (state->base.gui, "vars_entry");
+ state->count_entry = go_gtk_builder_get_widget (state->base.gui, "count_entry");
int_to_entry (GTK_ENTRY (state->count_entry), 1);
renderer = (GtkCellRenderer*) gtk_cell_renderer_text_new();
@@ -760,7 +760,7 @@ dialog_random_tool_init (RandomToolState *state)
"changed",
G_CALLBACK (random_tool_update_sensitivity_cb), state);
- table = GTK_TABLE (gnm_xml_get_widget (state->base.gui, "distribution_table"));
+ table = GTK_TABLE (go_gtk_builder_get_widget (state->base.gui, "distribution_table"));
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);
diff --git a/src/dialogs/dialog-row-height.c b/src/dialogs/dialog-row-height.c
index 286ad4e..a864364 100644
--- a/src/dialogs/dialog-row-height.c
+++ b/src/dialogs/dialog-row-height.c
@@ -258,39 +258,39 @@ dialog_row_height (WBCGtk *wbcg, gboolean use_default)
state->gui = gnm_gtk_builder_new ("row-height.ui", NULL, GO_CMD_CONTEXT (wbcg));
g_return_if_fail (state->gui != NULL);
- state->dialog = gnm_xml_get_widget (state->gui, "dialog");
+ state->dialog = go_gtk_builder_get_widget (state->gui, "dialog");
- state->description = GTK_WIDGET (gnm_xml_get_widget (state->gui, "description"));
- state->points = GTK_WIDGET (gnm_xml_get_widget (state->gui, "pts-label"));
+ state->description = GTK_WIDGET (go_gtk_builder_get_widget (state->gui, "description"));
+ state->points = GTK_WIDGET (go_gtk_builder_get_widget (state->gui, "pts-label"));
- state->spin = GTK_SPIN_BUTTON (gnm_xml_get_widget (state->gui, "spin"));
+ state->spin = GTK_SPIN_BUTTON (go_gtk_builder_get_widget (state->gui, "spin"));
gtk_spin_button_get_adjustment (state->spin)->lower =
GNM_ROW_MARGIN + GNM_ROW_MARGIN + 1;
g_signal_connect (G_OBJECT (state->spin),
"value-changed",
G_CALLBACK (cb_dialog_row_height_value_changed), state);
- state->default_check = GTK_WIDGET (gnm_xml_get_widget (state->gui, "default_check"));
+ state->default_check = GTK_WIDGET (go_gtk_builder_get_widget (state->gui, "default_check"));
g_signal_connect (G_OBJECT (state->default_check),
"clicked",
G_CALLBACK (cb_dialog_row_height_default_check_toggled), state);
- state->ok_button = gnm_xml_get_widget (state->gui, "ok_button");
+ state->ok_button = go_gtk_builder_get_widget (state->gui, "ok_button");
g_signal_connect (G_OBJECT (state->ok_button),
"clicked",
G_CALLBACK (cb_dialog_row_height_ok_clicked), state);
- state->apply_button = gnm_xml_get_widget (state->gui, "apply_button");
+ state->apply_button = go_gtk_builder_get_widget (state->gui, "apply_button");
g_signal_connect (G_OBJECT (state->apply_button),
"clicked",
G_CALLBACK (cb_dialog_row_height_apply_clicked), state);
- state->cancel_button = gnm_xml_get_widget (state->gui, "cancel_button");
+ state->cancel_button = go_gtk_builder_get_widget (state->gui, "cancel_button");
g_signal_connect (G_OBJECT (state->cancel_button),
"clicked",
G_CALLBACK (cb_dialog_row_height_cancel_clicked), state);
gnumeric_init_help_button (
- gnm_xml_get_widget (state->gui, "help_button"),
+ go_gtk_builder_get_widget (state->gui, "help_button"),
GNUMERIC_HELP_LINK_ROW_HEIGHT);
g_object_set_data_full (G_OBJECT (state->dialog),
"state", state, (GDestroyNotify) cb_dialog_row_height_destroy);
diff --git a/src/dialogs/dialog-scenarios.c b/src/dialogs/dialog-scenarios.c
index 228cda5..a3c7ad6 100644
--- a/src/dialogs/dialog-scenarios.c
+++ b/src/dialogs/dialog-scenarios.c
@@ -310,7 +310,7 @@ scenario_add_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
gnm_expr_entry_grab_focus (state->base.input_entry, TRUE);
goto out;
}
- entry = gnm_xml_get_widget (state->base.gui, "name_entry");
+ entry = go_gtk_builder_get_widget (state->base.gui, "name_entry");
name = g_strdup (gtk_entry_get_text (GTK_ENTRY (entry)));
if (scenario_name_used (state->base.sheet->scenarios, name)) {
@@ -327,7 +327,7 @@ scenario_add_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
goto out;
}
- comment_view = gnm_xml_get_widget (state->base.gui, "comment_view");
+ comment_view = go_gtk_builder_get_widget (state->base.gui, "comment_view");
buf = gtk_text_view_get_buffer (GTK_TEXT_VIEW (comment_view));
gtk_text_buffer_get_start_iter (buf, &start);
gtk_text_buffer_get_end_iter (buf, &end);
@@ -398,11 +398,11 @@ dialog_scenario_add (WBCGtk *wbcg)
GNM_EE_SHEET_OPTIONAL))
return;
- state->name_entry = gnm_xml_get_widget (state->base.gui, "name_entry");
+ state->name_entry = go_gtk_builder_get_widget (state->base.gui, "name_entry");
if (state->name_entry == NULL)
return;
- comment_view = gnm_xml_get_widget (state->base.gui, "comment_view");
+ comment_view = go_gtk_builder_get_widget (state->base.gui, "comment_view");
if (comment_view == NULL)
return;
buf = g_string_new (NULL);
@@ -436,11 +436,11 @@ update_comment (ScenariosState *state, const gchar *cells,
GtkTextBuffer *buf;
/* Update changing cells box */
- w = gnm_xml_get_widget (state->base.gui, "changing_cells_entry");
+ w = go_gtk_builder_get_widget (state->base.gui, "changing_cells_entry");
gtk_entry_set_text (GTK_ENTRY (w), cells);
/* Update comment text view */
- w = gnm_xml_get_widget (state->base.gui, "comment_view");
+ w = go_gtk_builder_get_widget (state->base.gui, "comment_view");
buf = gtk_text_view_get_buffer (GTK_TEXT_VIEW (w));
gtk_text_buffer_set_text (buf, comment, strlen (comment));
@@ -735,7 +735,7 @@ init_scenario_buttons (ScenariosState *state)
{
/* Show button */
state->show_button =
- gnm_xml_get_widget (state->base.gui, "show_button");
+ go_gtk_builder_get_widget (state->base.gui, "show_button");
if (state->show_button == NULL)
return TRUE;
g_signal_connect (G_OBJECT (state->show_button),
@@ -744,7 +744,7 @@ init_scenario_buttons (ScenariosState *state)
/* Delete button */
state->delete_button =
- gnm_xml_get_widget (state->base.gui, "delete_button");
+ go_gtk_builder_get_widget (state->base.gui, "delete_button");
if (state->delete_button == NULL)
return TRUE;
g_signal_connect (G_OBJECT (state->delete_button),
@@ -753,7 +753,7 @@ init_scenario_buttons (ScenariosState *state)
/* Summary button */
state->summary_button =
- gnm_xml_get_widget (state->base.gui, "summary_button");
+ go_gtk_builder_get_widget (state->base.gui, "summary_button");
if (state->summary_button == NULL)
return TRUE;
g_signal_connect (G_OBJECT (state->summary_button),
@@ -800,16 +800,16 @@ dialog_scenarios (WBCGtk *wbcg)
if (init_scenario_buttons (state))
goto error_out;
- state->scenarios_treeview = gnm_xml_get_widget
+ state->scenarios_treeview = go_gtk_builder_get_widget
(state->base.gui, "scenarios_treeview");
if (state->scenarios_treeview == NULL)
goto error_out;
- w = gnm_xml_get_widget (state->base.gui, "changing_cells_entry");
+ w = go_gtk_builder_get_widget (state->base.gui, "changing_cells_entry");
if (w == NULL)
goto error_out;
gtk_widget_set_sensitive (w, FALSE);
- w = gnm_xml_get_widget (state->base.gui, "comment_view");
+ w = go_gtk_builder_get_widget (state->base.gui, "comment_view");
if (w == NULL)
goto error_out;
diff --git a/src/dialogs/dialog-search-replace.c b/src/dialogs/dialog-search-replace.c
index c9fd66a..cb2f3e7 100644
--- a/src/dialogs/dialog-search-replace.c
+++ b/src/dialogs/dialog-search-replace.c
@@ -82,14 +82,14 @@ static const char * const direction_group[] = {
static gboolean
is_checked (GtkBuilder *gui, const char *name)
{
- GtkWidget *w = gnm_xml_get_widget (gui, name);
+ GtkWidget *w = go_gtk_builder_get_widget (gui, name);
return gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w));
}
static void
set_checked (GtkBuilder *gui, const char *name, gboolean checked)
{
- GtkWidget *w = gnm_xml_get_widget (gui, name);
+ GtkWidget *w = go_gtk_builder_get_widget (gui, name);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (w), checked);
}
@@ -221,7 +221,7 @@ range_focused (G_GNUC_UNUSED GtkWidget *widget,
G_GNUC_UNUSED GdkEventFocus *event,
DialogState *dd)
{
- GtkWidget *scope_range = gnm_xml_get_widget (dd->gui, "scope_range");
+ GtkWidget *scope_range = go_gtk_builder_get_widget (dd->gui, "scope_range");
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (scope_range), TRUE);
return FALSE;
}
@@ -260,7 +260,7 @@ dialog_search_replace (WBCGtk *wbcg,
if (gui == NULL)
return;
- dialog = GTK_DIALOG (gnm_xml_get_widget (gui, "search_replace_dialog"));
+ dialog = GTK_DIALOG (go_gtk_builder_get_widget (gui, "search_replace_dialog"));
dd = g_new (DialogState, 1);
dd->wbcg = wbcg;
@@ -268,7 +268,7 @@ dialog_search_replace (WBCGtk *wbcg,
dd->cb = cb;
dd->dialog = dialog;
- table = GTK_TABLE (gnm_xml_get_widget (gui, "search_table"));
+ table = GTK_TABLE (go_gtk_builder_get_widget (gui, "search_table"));
dd->search_text = GTK_ENTRY (gtk_entry_new ());
gtk_table_attach (table, GTK_WIDGET (dd->search_text),
1, 4, 0, 1,
@@ -285,7 +285,7 @@ dialog_search_replace (WBCGtk *wbcg,
gnumeric_editable_enters (GTK_WINDOW (dialog),
GTK_WIDGET (dd->replace_text));
- table = GTK_TABLE (gnm_xml_get_widget (gui, "scope_table"));
+ table = GTK_TABLE (go_gtk_builder_get_widget (gui, "scope_table"));
dd->rangetext = gnm_expr_entry_new (wbcg, TRUE);
gnm_expr_entry_set_flags (dd->rangetext, 0, GNM_EE_MASK);
gtk_table_attach (table, GTK_WIDGET (dd->rangetext),
@@ -299,7 +299,7 @@ dialog_search_replace (WBCGtk *wbcg,
g_free (selection_text);
gtk_widget_show (GTK_WIDGET (dd->rangetext));
-#define SETW(w,f) gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (gnm_xml_get_widget (gui, w)), f())
+#define SETW(w,f) gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (go_gtk_builder_get_widget (gui, w)), f())
SETW("search_expr", gnm_conf_get_searchreplace_change_cell_expressions);
SETW("search_other", gnm_conf_get_searchreplace_change_cell_other);
SETW("search_string", gnm_conf_get_searchreplace_change_cell_strings);
@@ -313,33 +313,33 @@ dialog_search_replace (WBCGtk *wbcg,
gtk_toggle_button_set_active
(GTK_TOGGLE_BUTTON
- (gnm_xml_get_widget
+ (go_gtk_builder_get_widget
(gui,
search_type_group[gnm_conf_get_searchreplace_regex () ? 1 : 0])), TRUE);
gtk_toggle_button_set_active
(GTK_TOGGLE_BUTTON
- (gnm_xml_get_widget
+ (go_gtk_builder_get_widget
(gui,
direction_group[gnm_conf_get_searchreplace_columnmajor () ? 1 : 0])), TRUE);
gtk_toggle_button_set_active
(GTK_TOGGLE_BUTTON
- (gnm_xml_get_widget
+ (go_gtk_builder_get_widget
(gui,
error_group[gnm_conf_get_searchreplace_error_behaviour ()])), TRUE);
gtk_toggle_button_set_active
(GTK_TOGGLE_BUTTON
- (gnm_xml_get_widget
+ (go_gtk_builder_get_widget
(gui,
scope_group[gnm_conf_get_searchreplace_scope ()])), TRUE);
- g_signal_connect (G_OBJECT (gnm_xml_get_widget (gui, "ok_button")),
+ g_signal_connect (G_OBJECT (go_gtk_builder_get_widget (gui, "ok_button")),
"clicked",
G_CALLBACK (ok_clicked), dd);
- g_signal_connect (G_OBJECT (gnm_xml_get_widget (gui, "apply_button")),
+ g_signal_connect (G_OBJECT (go_gtk_builder_get_widget (gui, "apply_button")),
"clicked",
G_CALLBACK (apply_clicked), dd);
- g_signal_connect (G_OBJECT (gnm_xml_get_widget (gui, "cancel_button")),
+ g_signal_connect (G_OBJECT (go_gtk_builder_get_widget (gui, "cancel_button")),
"clicked",
G_CALLBACK (cancel_clicked), dd);
g_signal_connect (GTK_OBJECT (gnm_expr_entry_get_entry (dd->rangetext)),
@@ -347,7 +347,7 @@ dialog_search_replace (WBCGtk *wbcg,
G_CALLBACK (range_focused), dd);
gnumeric_init_help_button (
- gnm_xml_get_widget (gui, "help_button"),
+ go_gtk_builder_get_widget (gui, "help_button"),
GNUMERIC_HELP_LINK_SEARCH_REPLACE);
g_object_set_data_full (G_OBJECT (dialog),
"state", dd, (GDestroyNotify) cb_dialog_destroy);
@@ -379,13 +379,13 @@ dialog_search_replace_query (WBCGtk *wbcg,
if (gui == NULL)
return 0;
- dialog = GTK_DIALOG (gnm_xml_get_widget (gui, "query_dialog"));
+ dialog = GTK_DIALOG (go_gtk_builder_get_widget (gui, "query_dialog"));
- gtk_entry_set_text (GTK_ENTRY (gnm_xml_get_widget (gui, "qd_location")),
+ gtk_entry_set_text (GTK_ENTRY (go_gtk_builder_get_widget (gui, "qd_location")),
location);
- gtk_entry_set_text (GTK_ENTRY (gnm_xml_get_widget (gui, "qd_old_text")),
+ gtk_entry_set_text (GTK_ENTRY (go_gtk_builder_get_widget (gui, "qd_old_text")),
old_text);
- gtk_entry_set_text (GTK_ENTRY (gnm_xml_get_widget (gui, "qd_new_text")),
+ gtk_entry_set_text (GTK_ENTRY (go_gtk_builder_get_widget (gui, "qd_new_text")),
new_text);
set_checked (gui, "qd_query", sr->query);
diff --git a/src/dialogs/dialog-sheet-order.c b/src/dialogs/dialog-sheet-order.c
index bcbe1c3..4bae4ab 100644
--- a/src/dialogs/dialog-sheet-order.c
+++ b/src/dialogs/dialog-sheet-order.c
@@ -673,7 +673,7 @@ create_sheet_list (SheetManager *state)
{
GtkTreeViewColumn *column;
GtkTreeSelection *selection;
- GtkWidget *scrolled = gnm_xml_get_widget (state->gui, "scrolled");
+ GtkWidget *scrolled = go_gtk_builder_get_widget (state->gui, "scrolled");
GtkCellRenderer *renderer;
state->model = gtk_list_store_new (NUM_COLUMNS,
@@ -1444,21 +1444,21 @@ dialog_sheet_order (WBCGtk *wbcg)
state = g_new0 (SheetManager, 1);
state->gui = gui;
state->wbcg = wbcg;
- state->dialog = gnm_xml_get_widget (gui, "sheet-order-dialog");
- state->warning = gnm_xml_get_widget (gui, "warning");
- state->up_btn = gnm_xml_get_widget (gui, "up_button");
- state->down_btn = gnm_xml_get_widget (gui, "down_button");
- state->add_btn = gnm_xml_get_widget (gui, "add_button");
- state->append_btn = gnm_xml_get_widget (gui, "append_button");
- state->duplicate_btn = gnm_xml_get_widget (gui, "duplicate_button");
- state->delete_btn = gnm_xml_get_widget (gui, "delete_button");
-
- state->apply_names_btn = gnm_xml_get_widget (gui, "ok_button");
- state->sort_asc_btn = gnm_xml_get_widget (gui, "sort-asc-button");
- state->sort_desc_btn = gnm_xml_get_widget (gui, "sort-desc-button");
- state->undo_btn = gnm_xml_get_widget (gui, "undo-button");
- state->cancel_btn = gnm_xml_get_widget (gui, "cancel_button");
- state->advanced_check = gnm_xml_get_widget (gui, "advanced-check");
+ state->dialog = go_gtk_builder_get_widget (gui, "sheet-order-dialog");
+ state->warning = go_gtk_builder_get_widget (gui, "warning");
+ state->up_btn = go_gtk_builder_get_widget (gui, "up_button");
+ state->down_btn = go_gtk_builder_get_widget (gui, "down_button");
+ state->add_btn = go_gtk_builder_get_widget (gui, "add_button");
+ state->append_btn = go_gtk_builder_get_widget (gui, "append_button");
+ state->duplicate_btn = go_gtk_builder_get_widget (gui, "duplicate_button");
+ state->delete_btn = go_gtk_builder_get_widget (gui, "delete_button");
+
+ state->apply_names_btn = go_gtk_builder_get_widget (gui, "ok_button");
+ state->sort_asc_btn = go_gtk_builder_get_widget (gui, "sort-asc-button");
+ state->sort_desc_btn = go_gtk_builder_get_widget (gui, "sort-desc-button");
+ state->undo_btn = go_gtk_builder_get_widget (gui, "undo-button");
+ state->cancel_btn = go_gtk_builder_get_widget (gui, "cancel_button");
+ state->advanced_check = go_gtk_builder_get_widget (gui, "advanced-check");
state->initial_colors_set = FALSE;
state->image_padlock = gtk_widget_render_icon (state->dialog,
"Gnumeric_Protection_Yes",
@@ -1491,7 +1491,7 @@ dialog_sheet_order (WBCGtk *wbcg)
"sheet_deleted", G_CALLBACK (cb_sheet_deleted),
state);
- table = GTK_TABLE (gnm_xml_get_widget (gui,"sheet_order_buttons_table"));
+ table = GTK_TABLE (go_gtk_builder_get_widget (gui,"sheet_order_buttons_table"));
cg = go_color_group_fetch ("back_color_group",
wb_control_view (WORKBOOK_CONTROL (wbcg)));
state->ccombo_back = go_combo_color_new (
@@ -1538,7 +1538,7 @@ dialog_sheet_order (WBCGtk *wbcg)
cb_adv_check_toggled (NULL, state);
gnumeric_init_help_button (
- gnm_xml_get_widget (state->gui, "help_button"),
+ go_gtk_builder_get_widget (state->gui, "help_button"),
GNUMERIC_HELP_LINK_SHEET_MANAGER);
gtk_widget_set_sensitive (state->undo_btn, wb->undo_commands != NULL);
diff --git a/src/dialogs/dialog-sheetobject-size.c b/src/dialogs/dialog-sheetobject-size.c
index 62a2c8a..84a4c30 100644
--- a/src/dialogs/dialog-sheetobject-size.c
+++ b/src/dialogs/dialog-sheetobject-size.c
@@ -324,12 +324,12 @@ dialog_so_size (WBCGtk *wbcg, GObject *so)
state->sheet = sv_sheet (state->sv);
state->scg = wbcg_get_nth_scg (wbcg, state->sheet->index_in_wb);
state->gui = gui;
- state->dialog = gnm_xml_get_widget (state->gui, "object-size");
+ state->dialog = go_gtk_builder_get_widget (state->gui, "object-size");
state->so = SHEET_OBJECT (so);
g_object_ref (so);
- state->nameentry = GTK_ENTRY (gnm_xml_get_widget (state->gui, "name-entry"));
+ state->nameentry = GTK_ENTRY (go_gtk_builder_get_widget (state->gui, "name-entry"));
state->old_anchor = NULL;
state->old_name = NULL;
g_object_get (so, "name", &state->old_name, NULL);
@@ -343,15 +343,15 @@ dialog_so_size (WBCGtk *wbcg, GObject *so)
state);
state->so_print_check_changed = FALSE;
- state->wpoints = GTK_WIDGET (gnm_xml_get_widget (state->gui, "w-pts-label"));
- state->wspin = GTK_SPIN_BUTTON (gnm_xml_get_widget (state->gui, "w-spin"));
- state->hpoints = GTK_WIDGET (gnm_xml_get_widget (state->gui, "h-pts-label"));
- state->hspin = GTK_SPIN_BUTTON (gnm_xml_get_widget (state->gui, "h-spin"));
- state->xpoints = GTK_WIDGET (gnm_xml_get_widget (state->gui, "x-pts-label"));
- state->xspin = GTK_SPIN_BUTTON (gnm_xml_get_widget (state->gui, "x-spin"));
- state->ypoints = GTK_WIDGET (gnm_xml_get_widget (state->gui, "y-pts-label"));
- state->yspin = GTK_SPIN_BUTTON (gnm_xml_get_widget (state->gui, "y-spin"));
- state->print_check = GTK_WIDGET (gnm_xml_get_widget (state->gui,
+ state->wpoints = GTK_WIDGET (go_gtk_builder_get_widget (state->gui, "w-pts-label"));
+ state->wspin = GTK_SPIN_BUTTON (go_gtk_builder_get_widget (state->gui, "w-spin"));
+ state->hpoints = GTK_WIDGET (go_gtk_builder_get_widget (state->gui, "h-pts-label"));
+ state->hspin = GTK_SPIN_BUTTON (go_gtk_builder_get_widget (state->gui, "h-spin"));
+ state->xpoints = GTK_WIDGET (go_gtk_builder_get_widget (state->gui, "x-pts-label"));
+ state->xspin = GTK_SPIN_BUTTON (go_gtk_builder_get_widget (state->gui, "x-spin"));
+ state->ypoints = GTK_WIDGET (go_gtk_builder_get_widget (state->gui, "y-pts-label"));
+ state->yspin = GTK_SPIN_BUTTON (go_gtk_builder_get_widget (state->gui, "y-spin"));
+ state->print_check = GTK_WIDGET (go_gtk_builder_get_widget (state->gui,
"print-check"));
dialog_so_size_load (state);
state->active_anchor = sheet_object_anchor_dup (sheet_object_get_anchor
@@ -405,22 +405,22 @@ dialog_so_size (WBCGtk *wbcg, GObject *so)
"value-changed",
G_CALLBACK (cb_dialog_so_size_value_changed), state);
- state->ok_button = gnm_xml_get_widget (state->gui, "ok_button");
+ state->ok_button = go_gtk_builder_get_widget (state->gui, "ok_button");
g_signal_connect (G_OBJECT (state->ok_button),
"clicked",
G_CALLBACK (cb_dialog_so_size_ok_clicked), state);
- state->apply_button = gnm_xml_get_widget (state->gui, "apply_button");
+ state->apply_button = go_gtk_builder_get_widget (state->gui, "apply_button");
g_signal_connect (G_OBJECT (state->apply_button),
"clicked",
G_CALLBACK (cb_dialog_so_size_apply_clicked), state);
- state->cancel_button = gnm_xml_get_widget (state->gui, "cancel_button");
+ state->cancel_button = go_gtk_builder_get_widget (state->gui, "cancel_button");
g_signal_connect (G_OBJECT (state->cancel_button),
"clicked",
G_CALLBACK (cb_dialog_so_size_cancel_clicked), state);
gnumeric_init_help_button (
- gnm_xml_get_widget (state->gui, "help_button"),
+ go_gtk_builder_get_widget (state->gui, "help_button"),
GNUMERIC_HELP_LINK_SO_SIZE);
gnm_dialog_setup_destroy_handlers (GTK_DIALOG (state->dialog),
diff --git a/src/dialogs/dialog-shuffle.c b/src/dialogs/dialog-shuffle.c
index d7a8c9f..be089da 100644
--- a/src/dialogs/dialog-shuffle.c
+++ b/src/dialogs/dialog-shuffle.c
@@ -164,7 +164,7 @@ dialog_shuffle (WBCGtk *wbcg)
type = "shuffle_rows";
else
type = "shuffle_area";
- w = gnm_xml_get_widget (state->gui, type);
+ w = go_gtk_builder_get_widget (state->gui, type);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (w), TRUE);
gtk_widget_show (state->dialog);
diff --git a/src/dialogs/dialog-simulation.c b/src/dialogs/dialog-simulation.c
index 76706b3..68b6434 100644
--- a/src/dialogs/dialog-simulation.c
+++ b/src/dialogs/dialog-simulation.c
@@ -160,7 +160,7 @@ update_log (SimulationState *state, simulation_t *sim)
GString *buf;
int i;
- view = gnm_xml_get_widget (state->gui, "last-run-view");
+ view = go_gtk_builder_get_widget (state->gui, "last-run-view");
store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING);
@@ -256,11 +256,11 @@ prev_button_cb (G_GNUC_UNUSED GtkWidget *button,
--results_sim_index;
if (results_sim_index == current_sim->first_round) {
- w = gnm_xml_get_widget (state->gui, "prev-button");
+ w = go_gtk_builder_get_widget (state->gui, "prev-button");
gtk_widget_set_sensitive (w, FALSE);
}
- w = gnm_xml_get_widget (state->gui, "next-button");
+ w = go_gtk_builder_get_widget (state->gui, "next-button");
gtk_widget_set_sensitive (w, TRUE);
update_results_view (current_sim);
}
@@ -275,11 +275,11 @@ next_button_cb (G_GNUC_UNUSED GtkWidget *button,
++results_sim_index;
if (results_sim_index == current_sim->last_round) {
- w = gnm_xml_get_widget (state->gui, "next-button");
+ w = go_gtk_builder_get_widget (state->gui, "next-button");
gtk_widget_set_sensitive (w, FALSE);
}
- w = gnm_xml_get_widget (state->gui, "prev-button");
+ w = go_gtk_builder_get_widget (state->gui, "prev-button");
gtk_widget_set_sensitive (w, TRUE);
update_results_view (current_sim);
}
@@ -317,13 +317,13 @@ simulation_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
goto out;
}
- w = gnm_xml_get_widget (state->gui, "iterations");
+ w = go_gtk_builder_get_widget (state->gui, "iterations");
sim.n_iterations = gtk_spin_button_get_value (GTK_SPIN_BUTTON (w));
- w = gnm_xml_get_widget (state->gui, "first_round");
+ w = go_gtk_builder_get_widget (state->gui, "first_round");
sim.first_round = gtk_spin_button_get_value (GTK_SPIN_BUTTON (w)) - 1;
- w = gnm_xml_get_widget (state->gui, "last_round");
+ w = go_gtk_builder_get_widget (state->gui, "last_round");
sim.last_round = gtk_spin_button_get_value (GTK_SPIN_BUTTON (w)) - 1;
if (sim.first_round > sim.last_round) {
@@ -335,7 +335,7 @@ simulation_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
current_sim = ∼
- w = gnm_xml_get_widget (state->gui, "max-time");
+ w = go_gtk_builder_get_widget (state->gui, "max-time");
sim.max_time = gtk_spin_button_get_value (GTK_SPIN_BUTTON (w)) - 1;
g_get_current_time (&sim.start);
@@ -349,7 +349,7 @@ simulation_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
update_results_view (&sim);
if (sim.last_round > results_sim_index) {
- w = gnm_xml_get_widget (state->gui, "next-button");
+ w = go_gtk_builder_get_widget (state->gui, "next-button");
gtk_widget_set_sensitive (w, TRUE);
}
}
@@ -387,7 +387,7 @@ init_results_view (SimulationState *state)
tag_table = gtk_text_tag_table_new ();
results_buffer = gtk_text_buffer_new (tag_table);
- view = GTK_TEXT_VIEW (gnm_xml_get_widget (state->gui,
+ view = GTK_TEXT_VIEW (go_gtk_builder_get_widget (state->gui,
"results-view"));
gtk_text_view_set_buffer (view, results_buffer);
}
@@ -430,18 +430,18 @@ dialog_simulation (WBCGtk *wbcg, G_GNUC_UNUSED Sheet *sheet)
init_results_view (state);
current_sim = NULL;
- w = gnm_xml_get_widget (state->gui, "prev-button");
+ w = go_gtk_builder_get_widget (state->gui, "prev-button");
gtk_widget_set_sensitive (w, FALSE);
g_signal_connect_after (G_OBJECT (w), "clicked",
G_CALLBACK (prev_button_cb), state);
- w = gnm_xml_get_widget (state->gui, "next-button");
+ w = go_gtk_builder_get_widget (state->gui, "next-button");
g_signal_connect_after (G_OBJECT (w), "clicked",
G_CALLBACK (next_button_cb), state);
gtk_widget_set_sensitive (w, FALSE);
- w = gnm_xml_get_widget (state->gui, "min-button");
+ w = go_gtk_builder_get_widget (state->gui, "min-button");
gtk_widget_set_sensitive (w, FALSE);
gtk_widget_hide (w);
- w = gnm_xml_get_widget (state->gui, "max-button");
+ w = go_gtk_builder_get_widget (state->gui, "max-button");
gtk_widget_set_sensitive (w, FALSE);
gtk_widget_hide (w);
diff --git a/src/dialogs/dialog-solver.c b/src/dialogs/dialog-solver.c
index db81ed6..1c39795 100644
--- a/src/dialogs/dialog-solver.c
+++ b/src/dialogs/dialog-solver.c
@@ -372,7 +372,7 @@ set_params (Sheet *sheet, GnmSolverParameters *params)
#define GET_BOOL_ENTRY(name_, field_) \
do { \
- GtkWidget *w_ = gnm_xml_get_widget (state->gui, (name_)); \
+ GtkWidget *w_ = go_gtk_builder_get_widget (state->gui, (name_)); \
param->field_ = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w_)); \
} while (0)
@@ -883,7 +883,7 @@ cb_dialog_solve_clicked (G_GNUC_UNUSED GtkWidget *button,
#define INIT_BOOL_ENTRY(name_, field_) \
do { \
- GtkWidget *w_ = gnm_xml_get_widget (state->gui, (name_)); \
+ GtkWidget *w_ = go_gtk_builder_get_widget (state->gui, (name_)); \
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (w_), \
param->field_); \
} while (0)
@@ -915,41 +915,41 @@ dialog_init (SolverState *state)
if (state->gui == NULL)
return TRUE;
- state->dialog = gnm_xml_get_widget (state->gui, "Solver");
+ state->dialog = go_gtk_builder_get_widget (state->gui, "Solver");
if (state->dialog == NULL)
return TRUE;
/* buttons */
- state->solve_button = gnm_xml_get_widget (state->gui, "solvebutton");
+ state->solve_button = go_gtk_builder_get_widget (state->gui, "solvebutton");
g_signal_connect (G_OBJECT (state->solve_button), "clicked",
G_CALLBACK (cb_dialog_solve_clicked), state);
- state->close_button = gnm_xml_get_widget (state->gui, "closebutton");
+ state->close_button = go_gtk_builder_get_widget (state->gui, "closebutton");
g_signal_connect (G_OBJECT (state->close_button), "clicked",
G_CALLBACK (cb_dialog_close_clicked), state);
- gnumeric_init_help_button (gnm_xml_get_widget (state->gui,
+ gnumeric_init_help_button (go_gtk_builder_get_widget (state->gui,
"helpbutton"),
GNUMERIC_HELP_LINK_SOLVER);
- state->add_button = gnm_xml_get_widget (state->gui, "addbutton");
+ state->add_button = go_gtk_builder_get_widget (state->gui, "addbutton");
gtk_button_set_alignment (GTK_BUTTON (state->add_button), 0.5, .5);
g_signal_connect_swapped (G_OBJECT (state->add_button), "clicked",
G_CALLBACK (cb_dialog_add_clicked), state);
- state->change_button = gnm_xml_get_widget (state->gui,
+ state->change_button = go_gtk_builder_get_widget (state->gui,
"changebutton");
g_signal_connect (G_OBJECT (state->change_button), "clicked",
G_CALLBACK (cb_dialog_change_clicked), state);
- state->delete_button = gnm_xml_get_widget (state->gui,
+ state->delete_button = go_gtk_builder_get_widget (state->gui,
"deletebutton");
gtk_button_set_alignment (GTK_BUTTON (state->delete_button), 0.5, .5);
g_signal_connect (G_OBJECT (state->delete_button), "clicked",
G_CALLBACK (cb_dialog_delete_clicked), state);
/* target_entry */
- table = GTK_TABLE (gnm_xml_get_widget (state->gui,
+ table = GTK_TABLE (go_gtk_builder_get_widget (state->gui,
"parameter_table"));
state->target_entry = gnm_expr_entry_new (state->wbcg, TRUE);
gnm_expr_entry_set_flags (state->target_entry,
@@ -967,7 +967,7 @@ dialog_init (SolverState *state)
state);
/* change_cell_entry */
- table = GTK_TABLE (gnm_xml_get_widget (state->gui,
+ table = GTK_TABLE (go_gtk_builder_get_widget (state->gui,
"parameter_table"));
state->change_cell_entry = gnm_expr_entry_new (state->wbcg, TRUE);
gnm_expr_entry_set_flags (state->change_cell_entry,
@@ -985,7 +985,7 @@ dialog_init (SolverState *state)
/* Algorithm */
state->algorithm_combo = GTK_COMBO_BOX
- (gnm_xml_get_widget (state->gui, "algorithm_combo"));
+ (go_gtk_builder_get_widget (state->gui, "algorithm_combo"));
renderer = (GtkCellRenderer*) gtk_cell_renderer_text_new();
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (state->algorithm_combo), renderer, TRUE);
gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (state->algorithm_combo), renderer,
@@ -995,7 +995,7 @@ dialog_init (SolverState *state)
for (i = 0; model_type_group[i]; i++) {
const char *bname = model_type_group[i];
- GtkWidget *w = gnm_xml_get_widget(state->gui, bname);
+ GtkWidget *w = go_gtk_builder_get_widget(state->gui, bname);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (w),
param->options.model_type ==
(GnmSolverModelType)i);
@@ -1004,18 +1004,18 @@ dialog_init (SolverState *state)
}
/* Options */
- state->max_iter_entry = gnm_xml_get_widget (state->gui,
+ state->max_iter_entry = go_gtk_builder_get_widget (state->gui,
"max_iter_entry");
gtk_spin_button_set_value (GTK_SPIN_BUTTON (state->max_iter_entry),
param->options.max_iter);
- state->max_time_entry = gnm_xml_get_widget (state->gui,
+ state->max_time_entry = go_gtk_builder_get_widget (state->gui,
"max_time_entry");
gtk_spin_button_set_value (GTK_SPIN_BUTTON (state->max_time_entry),
param->options.max_time_sec);
/* lhs_entry */
- table = GTK_TABLE (gnm_xml_get_widget (state->gui, "edit-table"));
+ table = GTK_TABLE (go_gtk_builder_get_widget (state->gui, "edit-table"));
state->lhs.entry = gnm_expr_entry_new (state->wbcg, TRUE);
gnm_expr_entry_set_flags (state->lhs.entry,
GNM_EE_SINGLE_RANGE |
@@ -1025,7 +1025,7 @@ dialog_init (SolverState *state)
0, 1, 1, 2,
GTK_EXPAND | GTK_FILL, 0,
0, 0);
- state->lhs.label = gnm_xml_get_widget (state->gui, "lhs_label");
+ state->lhs.label = go_gtk_builder_get_widget (state->gui, "lhs_label");
gtk_label_set_mnemonic_widget (GTK_LABEL (state->lhs.label),
GTK_WIDGET (state->lhs.entry));
gtk_widget_show (GTK_WIDGET (state->lhs.entry));
@@ -1037,7 +1037,7 @@ dialog_init (SolverState *state)
"activate", G_CALLBACK (cb_dialog_add_clicked), state);
/* rhs_entry */
- table = GTK_TABLE (gnm_xml_get_widget (state->gui, "edit-table"));
+ table = GTK_TABLE (go_gtk_builder_get_widget (state->gui, "edit-table"));
state->rhs.entry = gnm_expr_entry_new (state->wbcg, TRUE);
gnm_expr_entry_set_flags (state->rhs.entry,
GNM_EE_SINGLE_RANGE |
@@ -1049,7 +1049,7 @@ dialog_init (SolverState *state)
2, 3, 1, 2,
GTK_EXPAND | GTK_FILL, 0, 0, 0);
gtk_widget_show (GTK_WIDGET (state->rhs.entry));
- state->rhs.label = gnm_xml_get_widget (state->gui, "rhs_label");
+ state->rhs.label = go_gtk_builder_get_widget (state->gui, "rhs_label");
gtk_label_set_mnemonic_widget (
GTK_LABEL (state->rhs.label), GTK_WIDGET (state->rhs.entry));
g_signal_connect_after (G_OBJECT (state->rhs.entry),
@@ -1061,14 +1061,14 @@ dialog_init (SolverState *state)
/* type_menu */
state->type_combo = GTK_COMBO_BOX
- (gnm_xml_get_widget (state->gui, "type_menu"));
+ (go_gtk_builder_get_widget (state->gui, "type_menu"));
gtk_combo_box_set_active (state->type_combo, 0);
g_signal_connect (state->type_combo, "changed",
G_CALLBACK (dialog_set_sec_button_sensitivity),
state);
/* constraint_list */
- state->constraint_list = GTK_TREE_VIEW (gnm_xml_get_widget
+ state->constraint_list = GTK_TREE_VIEW (go_gtk_builder_get_widget
(state->gui, "constraint_list"));
state->constr = NULL;
@@ -1138,19 +1138,19 @@ dialog_init (SolverState *state)
}
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (
- gnm_xml_get_widget(state->gui, "max_button")),
+ go_gtk_builder_get_widget(state->gui, "max_button")),
param->problem_type == GNM_SOLVER_MAXIMIZE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (
- gnm_xml_get_widget(state->gui, "min_button")),
+ go_gtk_builder_get_widget(state->gui, "min_button")),
param->problem_type == GNM_SOLVER_MINIMIZE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (
- gnm_xml_get_widget(state->gui, "no_scenario")),
+ go_gtk_builder_get_widget(state->gui, "no_scenario")),
! param->options.add_scenario);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (
- gnm_xml_get_widget(state->gui, "optimal_scenario")),
+ go_gtk_builder_get_widget(state->gui, "optimal_scenario")),
param->options.add_scenario);
- state->scenario_name_entry = gnm_xml_get_widget
+ state->scenario_name_entry = go_gtk_builder_get_widget
(state->gui, "scenario_name_entry");
gtk_entry_set_text (GTK_ENTRY (state->scenario_name_entry),
param->options.scenario_name);
diff --git a/src/dialogs/dialog-stf-csv-page.c b/src/dialogs/dialog-stf-csv-page.c
index b678e78..060141a 100644
--- a/src/dialogs/dialog-stf-csv-page.c
+++ b/src/dialogs/dialog-stf-csv-page.c
@@ -227,21 +227,21 @@ stf_dialog_csv_page_init (GtkBuilder *gui, StfDialogData *pagedata)
g_return_if_fail (pagedata != NULL);
/* Create/get object and fill information struct */
- pagedata->csv.csv_tab = GTK_CHECK_BUTTON (gnm_xml_get_widget (gui, "csv_tab"));
- pagedata->csv.csv_colon = GTK_CHECK_BUTTON (gnm_xml_get_widget (gui, "csv_colon"));
- pagedata->csv.csv_comma = GTK_CHECK_BUTTON (gnm_xml_get_widget (gui, "csv_comma"));
- pagedata->csv.csv_space = GTK_CHECK_BUTTON (gnm_xml_get_widget (gui, "csv_space"));
- pagedata->csv.csv_semicolon = GTK_CHECK_BUTTON (gnm_xml_get_widget (gui, "csv_semicolon"));
- pagedata->csv.csv_hyphen = GTK_CHECK_BUTTON (gnm_xml_get_widget (gui, "csv_hyphen"));
- pagedata->csv.csv_custom = GTK_CHECK_BUTTON (gnm_xml_get_widget (gui, "csv_custom"));
- pagedata->csv.csv_customseparator = GTK_ENTRY (gnm_xml_get_widget (gui, "csv_customseparator"));
- pagedata->csv.csv_2x_indicator = GTK_CHECK_BUTTON (gnm_xml_get_widget (gui, "csv_2x_indicator"));
- pagedata->csv.csv_textindicator = gnm_xml_get_widget (gui, "csv_textindicator");
- pagedata->csv.csv_textfield = GTK_ENTRY (gnm_xml_get_widget (gui, "csv_textfield"));
+ pagedata->csv.csv_tab = GTK_CHECK_BUTTON (go_gtk_builder_get_widget (gui, "csv_tab"));
+ pagedata->csv.csv_colon = GTK_CHECK_BUTTON (go_gtk_builder_get_widget (gui, "csv_colon"));
+ pagedata->csv.csv_comma = GTK_CHECK_BUTTON (go_gtk_builder_get_widget (gui, "csv_comma"));
+ pagedata->csv.csv_space = GTK_CHECK_BUTTON (go_gtk_builder_get_widget (gui, "csv_space"));
+ pagedata->csv.csv_semicolon = GTK_CHECK_BUTTON (go_gtk_builder_get_widget (gui, "csv_semicolon"));
+ pagedata->csv.csv_hyphen = GTK_CHECK_BUTTON (go_gtk_builder_get_widget (gui, "csv_hyphen"));
+ pagedata->csv.csv_custom = GTK_CHECK_BUTTON (go_gtk_builder_get_widget (gui, "csv_custom"));
+ pagedata->csv.csv_customseparator = GTK_ENTRY (go_gtk_builder_get_widget (gui, "csv_customseparator"));
+ pagedata->csv.csv_2x_indicator = GTK_CHECK_BUTTON (go_gtk_builder_get_widget (gui, "csv_2x_indicator"));
+ pagedata->csv.csv_textindicator = go_gtk_builder_get_widget (gui, "csv_textindicator");
+ pagedata->csv.csv_textfield = GTK_ENTRY (go_gtk_builder_get_widget (gui, "csv_textfield"));
- pagedata->csv.csv_duplicates = GTK_CHECK_BUTTON (gnm_xml_get_widget (gui, "csv_duplicates"));
- pagedata->csv.csv_trim_seps = GTK_CHECK_BUTTON (gnm_xml_get_widget (gui, "csv_trim_seps"));
- pagedata->csv.csv_data_container = gnm_xml_get_widget (gui, "csv_data_container");
+ pagedata->csv.csv_duplicates = GTK_CHECK_BUTTON (go_gtk_builder_get_widget (gui, "csv_duplicates"));
+ pagedata->csv.csv_trim_seps = GTK_CHECK_BUTTON (go_gtk_builder_get_widget (gui, "csv_trim_seps"));
+ pagedata->csv.csv_data_container = go_gtk_builder_get_widget (gui, "csv_data_container");
/* Set properties */
pagedata->csv.renderdata =
diff --git a/src/dialogs/dialog-stf-export.c b/src/dialogs/dialog-stf-export.c
index 02b9b04..3077b97 100644
--- a/src/dialogs/dialog-stf-export.c
+++ b/src/dialogs/dialog-stf-export.c
@@ -126,7 +126,7 @@ stf_export_dialog_format_page_init (TextExportState *state)
char *eol;
int i;
- state->format.termination = GTK_COMBO_BOX (gnm_xml_get_widget (state->gui, "format_termination"));
+ state->format.termination = GTK_COMBO_BOX (go_gtk_builder_get_widget (state->gui, "format_termination"));
g_object_get (sobj, "eol", &eol, NULL);
if (strcmp (eol, "\r") == 0)
i = 1;
@@ -143,8 +143,8 @@ stf_export_dialog_format_page_init (TextExportState *state)
unsigned ui;
gint pos = 0;
- state->format.separator = GTK_COMBO_BOX (gnm_xml_get_widget (state->gui, "format_separator"));
- state->format.custom = gnm_xml_get_widget (state->gui, "format_custom");
+ state->format.separator = GTK_COMBO_BOX (go_gtk_builder_get_widget (state->gui, "format_separator"));
+ state->format.custom = go_gtk_builder_get_widget (state->gui, "format_custom");
g_object_get (sobj, "separator", &s, NULL);
for (ui = 0; ui < G_N_ELEMENTS (format_seps) - 1; ui++)
if (strcmp (s, format_seps[ui]) == 0)
@@ -166,7 +166,7 @@ stf_export_dialog_format_page_init (TextExportState *state)
GsfOutputCsvQuotingMode quotingmode;
int i;
- state->format.quote = GTK_COMBO_BOX (gnm_xml_get_widget (state->gui, "format_quote"));
+ state->format.quote = GTK_COMBO_BOX (go_gtk_builder_get_widget (state->gui, "format_quote"));
g_object_get (sobj, "quoting-mode", "ingmode, NULL);
switch (quotingmode) {
default:
@@ -181,7 +181,7 @@ stf_export_dialog_format_page_init (TextExportState *state)
char *s;
gint pos;
- state->format.quotechar = GTK_COMBO_BOX_ENTRY (gnm_xml_get_widget (state->gui, "format_quotechar"));
+ state->format.quotechar = GTK_COMBO_BOX_ENTRY (go_gtk_builder_get_widget (state->gui, "format_quotechar"));
g_object_get (sobj, "quote", &s, NULL);
#ifdef HAVE_GTK_ENTRY_GET_BUFFER
@@ -198,7 +198,7 @@ stf_export_dialog_format_page_init (TextExportState *state)
GnmStfFormatMode format;
int i;
- state->format.format = GTK_COMBO_BOX (gnm_xml_get_widget (state->gui, "format"));
+ state->format.format = GTK_COMBO_BOX (go_gtk_builder_get_widget (state->gui, "format"));
g_object_get (sobj, "format", &format, NULL);
switch (format) {
default:
@@ -235,7 +235,7 @@ stf_export_dialog_format_page_init (TextExportState *state)
GnmStfTransliterateMode mode;
int i;
- state->format.transliterate = GTK_COMBO_BOX (gnm_xml_get_widget (state->gui, "format_transliterate"));
+ state->format.transliterate = GTK_COMBO_BOX (go_gtk_builder_get_widget (state->gui, "format_transliterate"));
g_object_get (sobj, "transliterate-mode", &mode, NULL);
if (!gnm_stf_export_can_transliterate ()) {
if (mode == GNM_STF_TRANSLITERATE_MODE_TRANS)
@@ -261,7 +261,7 @@ stf_export_dialog_format_page_init (TextExportState *state)
gnumeric_editable_enters (state->window,
gtk_bin_get_child (GTK_BIN (state->format.quotechar)));
- table = gnm_xml_get_widget (state->gui, "format_table");
+ table = go_gtk_builder_get_widget (state->gui, "format_table");
gtk_table_attach_defaults (GTK_TABLE (table), state->format.charset,
1, 2, 5, 6);
gtk_table_attach_defaults (GTK_TABLE (table), state->format.locale,
@@ -368,7 +368,7 @@ stf_export_dialog_finish (TextExportState *state)
NULL);
if (gtk_toggle_button_get_active
- (GTK_TOGGLE_BUTTON (gnm_xml_get_widget (state->gui,
+ (GTK_TOGGLE_BUTTON (go_gtk_builder_get_widget (state->gui,
"save-as-default-check")))) {
gnm_conf_set_stf_export_separator (separator);
gnm_conf_set_stf_export_stringindicator (quote);
@@ -570,12 +570,12 @@ stf_export_dialog_sheet_page_init (TextExportState *state)
GtkCellRenderer *renderer;
GSList *sheet_list;
- state->sheets.select_all = gnm_xml_get_widget (state->gui, "sheet_select_all");
- state->sheets.select_none = gnm_xml_get_widget (state->gui, "sheet_select_none");
- state->sheets.up = gnm_xml_get_widget (state->gui, "sheet_up");
- state->sheets.down = gnm_xml_get_widget (state->gui, "sheet_down");
- state->sheets.top = gnm_xml_get_widget (state->gui, "sheet_top");
- state->sheets.bottom = gnm_xml_get_widget (state->gui, "sheet_bottom");
+ state->sheets.select_all = go_gtk_builder_get_widget (state->gui, "sheet_select_all");
+ state->sheets.select_none = go_gtk_builder_get_widget (state->gui, "sheet_select_none");
+ state->sheets.up = go_gtk_builder_get_widget (state->gui, "sheet_up");
+ state->sheets.down = go_gtk_builder_get_widget (state->gui, "sheet_down");
+ state->sheets.top = go_gtk_builder_get_widget (state->gui, "sheet_top");
+ state->sheets.bottom = go_gtk_builder_get_widget (state->gui, "sheet_bottom");
gtk_button_set_alignment (GTK_BUTTON (state->sheets.up), 0., .5);
gtk_button_set_alignment (GTK_BUTTON (state->sheets.down), 0., .5);
gtk_button_set_alignment (GTK_BUTTON (state->sheets.top), 0., .5);
@@ -584,7 +584,7 @@ stf_export_dialog_sheet_page_init (TextExportState *state)
state->sheets.model = gtk_list_store_new (STF_EXPORT_COL_MAX,
G_TYPE_BOOLEAN, G_TYPE_STRING, G_TYPE_OBJECT, G_TYPE_BOOLEAN);
state->sheets.view = GTK_TREE_VIEW (
- gnm_xml_get_widget (state->gui, "sheet_list"));
+ go_gtk_builder_get_widget (state->gui, "sheet_list"));
gtk_tree_view_set_model (state->sheets.view, GTK_TREE_MODEL (state->sheets.model));
renderer = gtk_cell_renderer_toggle_new ();
@@ -724,11 +724,11 @@ stf_export_dialog (WBCGtk *wbcg, GnmStfExport *stfe, Workbook *wb)
state.wb = wb;
state.wbcg = wbcg;
- state.window = GTK_WINDOW (gnm_xml_get_widget (state.gui, "text-export"));
- state.notebook = gnm_xml_get_widget (state.gui, "text-export-notebook");
- state.back_button = gnm_xml_get_widget (state.gui, "button-back");
- state.next_button = gnm_xml_get_widget (state.gui, "button-next");
- state.finish_button = gnm_xml_get_widget (state.gui, "button-finish");
+ state.window = GTK_WINDOW (go_gtk_builder_get_widget (state.gui, "text-export"));
+ state.notebook = go_gtk_builder_get_widget (state.gui, "text-export-notebook");
+ state.back_button = go_gtk_builder_get_widget (state.gui, "button-back");
+ state.next_button = go_gtk_builder_get_widget (state.gui, "button-next");
+ state.finish_button = go_gtk_builder_get_widget (state.gui, "button-finish");
state.cancelled = TRUE;
state.stfe = stfe;
stf_export_dialog_sheet_page_init (&state);
diff --git a/src/dialogs/dialog-stf-fixed-page.c b/src/dialogs/dialog-stf-fixed-page.c
index 4894533..033fe1a 100644
--- a/src/dialogs/dialog-stf-fixed-page.c
+++ b/src/dialogs/dialog-stf-fixed-page.c
@@ -574,9 +574,9 @@ stf_dialog_fixed_page_init (GtkBuilder *gui, StfDialogData *pagedata)
g_return_if_fail (pagedata != NULL);
/* Create/get object and fill information struct */
- pagedata->fixed.fixed_clear = GTK_BUTTON (gnm_xml_get_widget (gui, "fixed_clear"));
- pagedata->fixed.fixed_auto = GTK_BUTTON (gnm_xml_get_widget (gui, "fixed_auto"));
- pagedata->fixed.fixed_data_container = (gnm_xml_get_widget (gui, "fixed_data_container"));
+ pagedata->fixed.fixed_clear = GTK_BUTTON (go_gtk_builder_get_widget (gui, "fixed_clear"));
+ pagedata->fixed.fixed_auto = GTK_BUTTON (go_gtk_builder_get_widget (gui, "fixed_auto"));
+ pagedata->fixed.fixed_data_container = (go_gtk_builder_get_widget (gui, "fixed_data_container"));
/* Set properties */
renderdata = pagedata->fixed.renderdata =
diff --git a/src/dialogs/dialog-stf-format-page.c b/src/dialogs/dialog-stf-format-page.c
index 2db6edf..7396f70 100644
--- a/src/dialogs/dialog-stf-format-page.c
+++ b/src/dialogs/dialog-stf-format-page.c
@@ -747,9 +747,9 @@ stf_dialog_format_page_init (GtkBuilder *gui, StfDialogData *pagedata)
pagedata->format.col_import_count = 0;
pagedata->format.col_header = _("Column %d");
- pagedata->format.format_data_container = gnm_xml_get_widget (gui, "format_data_container");
- pagedata->format.format_trim = gnm_xml_get_widget (gui, "format_trim");
- pagedata->format.column_selection_label = gnm_xml_get_widget (gui, "column_selection_label");
+ pagedata->format.format_data_container = go_gtk_builder_get_widget (gui, "format_data_container");
+ pagedata->format.format_trim = go_gtk_builder_get_widget (gui, "format_trim");
+ pagedata->format.column_selection_label = go_gtk_builder_get_widget (gui, "column_selection_label");
pagedata->format.locale_selector =
GO_LOCALE_SEL (go_locale_sel_new ());
@@ -758,7 +758,7 @@ stf_dialog_format_page_init (GtkBuilder *gui, StfDialogData *pagedata)
pagedata->locale = go_locale_sel_get_locale (pagedata->format.locale_selector);
}
gtk_table_attach (
- GTK_TABLE (gnm_xml_get_widget (gui, "locale_table")),
+ GTK_TABLE (go_gtk_builder_get_widget (gui, "locale_table")),
GTK_WIDGET (pagedata->format.locale_selector),
3, 4, 0, 1, GTK_EXPAND | GTK_FILL, 0, 0, 0);
gtk_widget_show_all (GTK_WIDGET (pagedata->format.locale_selector));
diff --git a/src/dialogs/dialog-stf-main-page.c b/src/dialogs/dialog-stf-main-page.c
index 916a573..1bcac5b 100644
--- a/src/dialogs/dialog-stf-main-page.c
+++ b/src/dialogs/dialog-stf-main-page.c
@@ -349,15 +349,15 @@ stf_dialog_main_page_init (GtkBuilder *gui, StfDialogData *pagedata)
"ASCII",
NULL);
- pagedata->main.main_separated = GTK_RADIO_BUTTON (gnm_xml_get_widget (gui, "main_separated"));
- pagedata->main.main_fixed = GTK_RADIO_BUTTON (gnm_xml_get_widget (gui, "main_fixed"));
- pagedata->main.main_startrow = GTK_SPIN_BUTTON (gnm_xml_get_widget (gui, "main_startrow"));
- pagedata->main.main_stoprow = GTK_SPIN_BUTTON (gnm_xml_get_widget (gui, "main_stoprow"));
- pagedata->main.main_lines = GTK_LABEL (gnm_xml_get_widget (gui, "main_lines"));
- pagedata->main.main_data_container = gnm_xml_get_widget (gui, "main_data_container");
- pagedata->main.line_break_unix = GTK_CHECK_BUTTON (gnm_xml_get_widget (gui, "line_break_unix"));
- pagedata->main.line_break_windows = GTK_CHECK_BUTTON (gnm_xml_get_widget (gui, "line_break_windows"));
- pagedata->main.line_break_mac = GTK_CHECK_BUTTON (gnm_xml_get_widget (gui, "line_break_mac"));
+ pagedata->main.main_separated = GTK_RADIO_BUTTON (go_gtk_builder_get_widget (gui, "main_separated"));
+ pagedata->main.main_fixed = GTK_RADIO_BUTTON (go_gtk_builder_get_widget (gui, "main_fixed"));
+ pagedata->main.main_startrow = GTK_SPIN_BUTTON (go_gtk_builder_get_widget (gui, "main_startrow"));
+ pagedata->main.main_stoprow = GTK_SPIN_BUTTON (go_gtk_builder_get_widget (gui, "main_stoprow"));
+ pagedata->main.main_lines = GTK_LABEL (go_gtk_builder_get_widget (gui, "main_lines"));
+ pagedata->main.main_data_container = go_gtk_builder_get_widget (gui, "main_data_container");
+ pagedata->main.line_break_unix = GTK_CHECK_BUTTON (go_gtk_builder_get_widget (gui, "line_break_unix"));
+ pagedata->main.line_break_windows = GTK_CHECK_BUTTON (go_gtk_builder_get_widget (gui, "line_break_windows"));
+ pagedata->main.line_break_mac = GTK_CHECK_BUTTON (go_gtk_builder_get_widget (gui, "line_break_mac"));
pagedata->main.charmap_selector = GO_CHARMAP_SEL (go_charmap_sel_new (GO_CHARMAP_SEL_TO_UTF8));
if (!main_page_set_encoding (pagedata, pagedata->encoding) &&
@@ -366,7 +366,7 @@ stf_dialog_main_page_init (GtkBuilder *gui, StfDialogData *pagedata)
pagedata->raw_data_len = 0;
main_page_set_encoding (pagedata, "ASCII");
}
- gtk_container_add (GTK_CONTAINER (gnm_xml_get_widget (gui, "encoding_hbox")),
+ gtk_container_add (GTK_CONTAINER (go_gtk_builder_get_widget (gui, "encoding_hbox")),
GTK_WIDGET (pagedata->main.charmap_selector));
gtk_widget_show_all (GTK_WIDGET (pagedata->main.charmap_selector));
gtk_widget_set_sensitive (GTK_WIDGET (pagedata->main.charmap_selector),
@@ -410,7 +410,7 @@ stf_dialog_main_page_init (GtkBuilder *gui, StfDialogData *pagedata)
gtk_spin_button_set_value (pagedata->main.main_stoprow, renderdata->lines->len);
{
- GtkFrame *main_frame = GTK_FRAME (gnm_xml_get_widget (gui, "main_frame"));
+ GtkFrame *main_frame = GTK_FRAME (go_gtk_builder_get_widget (gui, "main_frame"));
char *label = g_strdup_printf (_("Data (from %s)"), pagedata->source);
gtk_frame_set_label (main_frame, label);
g_free (label);
diff --git a/src/dialogs/dialog-stf.c b/src/dialogs/dialog-stf.c
index a196ad0..3ffb5d4 100644
--- a/src/dialogs/dialog-stf.c
+++ b/src/dialogs/dialog-stf.c
@@ -280,13 +280,13 @@ stf_dialog (WBCGtk *wbcg,
pagedata.utf8_data = NULL;
pagedata.cur = NULL;
- pagedata.dialog = GTK_DIALOG (gnm_xml_get_widget (gui, "stf_dialog"));
- pagedata.notebook = GTK_NOTEBOOK (gnm_xml_get_widget (gui, "stf_notebook"));
- pagedata.next_button = gnm_xml_get_widget (gui, "forward_button");
- pagedata.back_button = gnm_xml_get_widget (gui, "back_button");
- pagedata.cancel_button = gnm_xml_get_widget (gui, "cancel_button");
- pagedata.help_button = gnm_xml_get_widget (gui, "help_button");
- pagedata.finish_button = gnm_xml_get_widget (gui, "finish_button");
+ pagedata.dialog = GTK_DIALOG (go_gtk_builder_get_widget (gui, "stf_dialog"));
+ pagedata.notebook = GTK_NOTEBOOK (go_gtk_builder_get_widget (gui, "stf_notebook"));
+ pagedata.next_button = go_gtk_builder_get_widget (gui, "forward_button");
+ pagedata.back_button = go_gtk_builder_get_widget (gui, "back_button");
+ pagedata.cancel_button = go_gtk_builder_get_widget (gui, "cancel_button");
+ pagedata.help_button = go_gtk_builder_get_widget (gui, "help_button");
+ pagedata.finish_button = go_gtk_builder_get_widget (gui, "finish_button");
pagedata.parseoptions = NULL;
stf_dialog_main_page_init (gui, &pagedata);
diff --git a/src/dialogs/dialog-tabulate.c b/src/dialogs/dialog-tabulate.c
index 809f02a..3d928e2 100644
--- a/src/dialogs/dialog-tabulate.c
+++ b/src/dialogs/dialog-tabulate.c
@@ -324,7 +324,7 @@ dialog_tabulate (WBCGtk *wbcg, Sheet *sheet)
if (gui == NULL)
return;
- dialog = GTK_DIALOG (gnm_xml_get_widget (gui, "tabulate_dialog"));
+ dialog = GTK_DIALOG (go_gtk_builder_get_widget (gui, "tabulate_dialog"));
dd = g_new (DialogState, 1);
dd->wbcg = wbcg;
@@ -337,7 +337,7 @@ dialog_tabulate (WBCGtk *wbcg, Sheet *sheet)
"allow-grow", TRUE,
NULL);
- dd->source_table = GTK_TABLE (gnm_xml_get_widget (gui, "source_table"));
+ dd->source_table = GTK_TABLE (go_gtk_builder_get_widget (gui, "source_table"));
for (i = 1; i < dd->source_table->nrows; i++) {
GnmExprEntry *ge = gnm_expr_entry_new (wbcg, TRUE);
gnm_expr_entry_set_flags (ge,
@@ -357,21 +357,21 @@ dialog_tabulate (WBCGtk *wbcg, Sheet *sheet)
gnm_expr_entry_set_flags (dd->resultrangetext,
GNM_EE_SINGLE_RANGE | GNM_EE_SHEET_OPTIONAL,
GNM_EE_MASK);
- gtk_box_pack_start (GTK_BOX (gnm_xml_get_widget (gui, "result_hbox")),
+ gtk_box_pack_start (GTK_BOX (go_gtk_builder_get_widget (gui, "result_hbox")),
GTK_WIDGET (dd->resultrangetext),
TRUE, TRUE, 0);
gtk_widget_show (GTK_WIDGET (dd->resultrangetext));
- g_signal_connect (G_OBJECT (gnm_xml_get_widget (gui, "ok_button")),
+ g_signal_connect (G_OBJECT (go_gtk_builder_get_widget (gui, "ok_button")),
"clicked",
G_CALLBACK (tabulate_ok_clicked), dd);
- g_signal_connect (G_OBJECT (gnm_xml_get_widget (gui, "cancel_button")),
+ g_signal_connect (G_OBJECT (go_gtk_builder_get_widget (gui, "cancel_button")),
"clicked",
G_CALLBACK (cancel_clicked), dd);
/* FIXME: Add correct helpfile address */
gnumeric_init_help_button (
- gnm_xml_get_widget (gui, "help_button"),
+ go_gtk_builder_get_widget (gui, "help_button"),
GNUMERIC_HELP_LINK_TABULATE);
g_object_set_data_full (G_OBJECT (dialog),
"state", dd, (GDestroyNotify) cb_dialog_destroy);
diff --git a/src/dialogs/dialog-view.c b/src/dialogs/dialog-view.c
index 8dd4281..c400ddc 100644
--- a/src/dialogs/dialog-view.c
+++ b/src/dialogs/dialog-view.c
@@ -58,7 +58,7 @@ cb_view_ok_clicked (G_GNUC_UNUSED GtkWidget *button,
GdkScreen *screen;
GSList *buttons = gtk_radio_button_get_group (state->location_elsewhere);
- shared = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (gnm_xml_get_widget (state->gui, "view_shared")));
+ shared = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (go_gtk_builder_get_widget (state->gui, "view_shared")));
while (buttons)
if (gtk_toggle_button_get_active (buttons->data))
@@ -136,16 +136,16 @@ dialog_new_view (WBCGtk *wbcg)
state = g_new (ViewState, 1);
state->wbcg = wbcg;
state->gui = gui;
- state->dialog = gnm_xml_get_widget (gui, "View");
- state->location_elsewhere = GTK_RADIO_BUTTON (gnm_xml_get_widget (gui, "location_elsewhere"));
- state->location_display_name = GTK_ENTRY (gnm_xml_get_widget (gui, "location_display_name"));
+ state->dialog = go_gtk_builder_get_widget (gui, "View");
+ state->location_elsewhere = GTK_RADIO_BUTTON (go_gtk_builder_get_widget (gui, "location_elsewhere"));
+ state->location_display_name = GTK_ENTRY (go_gtk_builder_get_widget (gui, "location_display_name"));
g_return_if_fail (state->dialog != NULL);
{
GdkScreen *this_screen = gtk_window_get_screen (wbcg_toplevel (wbcg));
GdkDisplay *this_display = gdk_screen_get_display (this_screen);
int n_screens = gdk_display_get_n_screens (this_display);
- GtkBox *box = GTK_BOX (gnm_xml_get_widget (gui, "location_screens_vbox"));
+ GtkBox *box = GTK_BOX (go_gtk_builder_get_widget (gui, "location_screens_vbox"));
int i;
for (i = 0; i < n_screens; i++) {
@@ -173,10 +173,10 @@ dialog_new_view (WBCGtk *wbcg)
}
}
- g_signal_connect (G_OBJECT (gnm_xml_get_widget (gui, "ok_button")),
+ g_signal_connect (G_OBJECT (go_gtk_builder_get_widget (gui, "ok_button")),
"clicked",
G_CALLBACK (cb_view_ok_clicked), state);
- g_signal_connect (G_OBJECT (gnm_xml_get_widget (gui, "cancel_button")),
+ g_signal_connect (G_OBJECT (go_gtk_builder_get_widget (gui, "cancel_button")),
"clicked",
G_CALLBACK (cb_view_cancel_clicked), state);
@@ -187,7 +187,7 @@ dialog_new_view (WBCGtk *wbcg)
GTK_WIDGET (state->location_display_name));
gnumeric_init_help_button (
- gnm_xml_get_widget (gui, "help_button"),
+ go_gtk_builder_get_widget (gui, "help_button"),
GNUMERIC_HELP_LINK_VIEW);
gnumeric_keyed_dialog (wbcg, GTK_WINDOW (state->dialog),
VIEW_DIALOG_KEY);
diff --git a/src/dialogs/dialog-workbook-attr.c b/src/dialogs/dialog-workbook-attr.c
index 1a63d75..c6e0735 100644
--- a/src/dialogs/dialog-workbook-attr.c
+++ b/src/dialogs/dialog-workbook-attr.c
@@ -102,7 +102,7 @@ cb_attr_dialog_dialog_destroy (AttrState *state)
static void
attr_dialog_init_toggle (AttrState *state, char const *name, char const *key)
{
- GtkWidget *w = gnm_xml_get_widget (state->gui, name);
+ GtkWidget *w = go_gtk_builder_get_widget (state->gui, name);
gboolean val = FALSE;
g_object_get (G_OBJECT (state->wbv), key, &val, NULL);
@@ -258,7 +258,7 @@ cb_attr_dialog_selection_changed (GtkTreeSelection *selection,
static void
attr_dialog_impl (AttrState *state)
{
- GtkWidget *dialog = gnm_xml_get_widget (state->gui, "WorkbookAttr");
+ GtkWidget *dialog = go_gtk_builder_get_widget (state->gui, "WorkbookAttr");
GtkTreeViewColumn *column;
GtkTreeSelection *selection;
int i;
@@ -267,10 +267,10 @@ attr_dialog_impl (AttrState *state)
/* Initialize */
state->dialog = dialog;
- state->notebook = gnm_xml_get_widget (state->gui, "notebook");
+ state->notebook = go_gtk_builder_get_widget (state->gui, "notebook");
state->destroying = FALSE;
- state->tview = GTK_TREE_VIEW(gnm_xml_get_widget (state->gui, "itemlist"));
+ state->tview = GTK_TREE_VIEW(go_gtk_builder_get_widget (state->gui, "itemlist"));
state->store = gtk_tree_store_new (NUM_COLUMNS,
GDK_TYPE_PIXBUF,
G_TYPE_STRING,
@@ -303,12 +303,12 @@ attr_dialog_impl (AttrState *state)
gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (state->store), ITEM_NAME, GTK_SORT_ASCENDING);
- g_signal_connect (G_OBJECT (gnm_xml_get_widget (state->gui, "close_button")),
+ g_signal_connect (G_OBJECT (go_gtk_builder_get_widget (state->gui, "close_button")),
"clicked",
G_CALLBACK (cb_attr_dialog_dialog_close), state);
gnumeric_init_help_button (
- gnm_xml_get_widget (state->gui, "help_button"),
+ go_gtk_builder_get_widget (state->gui, "help_button"),
GNUMERIC_HELP_LINK_WORKBOOK_ATTRIBUTE);
/* a candidate for merging into attach guru */
diff --git a/src/dialogs/dialog-zoom.c b/src/dialogs/dialog-zoom.c
index 09f7e85..e119f84 100644
--- a/src/dialogs/dialog-zoom.c
+++ b/src/dialogs/dialog-zoom.c
@@ -175,12 +175,12 @@ dialog_zoom (WBCGtk *wbcg, Sheet *sheet)
state = g_new (ZoomState, 1);
state->wbcg = wbcg;
state->gui = gui;
- state->dialog = gnm_xml_get_widget (state->gui, "Zoom");
+ state->dialog = go_gtk_builder_get_widget (state->gui, "Zoom");
g_return_if_fail (state->dialog != NULL);
/* Get the list of sheets */
state->sheet_list_model = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_POINTER);
- state->sheet_list = GTK_TREE_VIEW (gnm_xml_get_widget (state->gui, "sheet_list"));
+ state->sheet_list = GTK_TREE_VIEW (go_gtk_builder_get_widget (state->gui, "sheet_list"));
gtk_tree_view_set_headers_visible (state->sheet_list, FALSE);
gtk_tree_view_set_model (state->sheet_list, GTK_TREE_MODEL (state->sheet_list_model));
state->sheet_list_selection = gtk_tree_view_get_selection (state->sheet_list);
@@ -218,9 +218,9 @@ dialog_zoom (WBCGtk *wbcg, Sheet *sheet)
gtk_tree_path_free (path);
}
- state->zoom = GTK_SPIN_BUTTON (gnm_xml_get_widget (state->gui, "zoom"));
+ state->zoom = GTK_SPIN_BUTTON (go_gtk_builder_get_widget (state->gui, "zoom"));
g_return_if_fail (state->zoom != NULL);
- state->custom = GTK_RADIO_BUTTON (gnm_xml_get_widget (state->gui, "radio_custom"));
+ state->custom = GTK_RADIO_BUTTON (go_gtk_builder_get_widget (state->gui, "radio_custom"));
g_return_if_fail (state->custom != NULL);
focus_target = GTK_WIDGET (state->custom);
g_signal_connect (G_OBJECT (state->custom),
@@ -231,7 +231,7 @@ dialog_zoom (WBCGtk *wbcg, Sheet *sheet)
G_CALLBACK (custom_selected), state);
for (i = 0; buttons[i].name != NULL; i++) {
- radio = GTK_RADIO_BUTTON (gnm_xml_get_widget (state->gui, buttons[i].name));
+ radio = GTK_RADIO_BUTTON (go_gtk_builder_get_widget (state->gui, buttons[i].name));
g_return_if_fail (radio != NULL);
g_object_set_data (G_OBJECT (radio), ZOOM_DIALOG_FACTOR_KEY,
@@ -253,12 +253,12 @@ dialog_zoom (WBCGtk *wbcg, Sheet *sheet)
gtk_spin_button_set_value (state->zoom,
(int)(sheet->last_zoom_factor_used * 100. + .5));
}
- state->ok_button = gnm_xml_get_widget (state->gui, "ok_button");
+ state->ok_button = go_gtk_builder_get_widget (state->gui, "ok_button");
g_signal_connect (G_OBJECT (state->ok_button),
"clicked",
G_CALLBACK (cb_zoom_ok_clicked), state);
- state->cancel_button = gnm_xml_get_widget (state->gui, "cancel_button");
+ state->cancel_button = go_gtk_builder_get_widget (state->gui, "cancel_button");
g_signal_connect (G_OBJECT (state->cancel_button),
"clicked",
G_CALLBACK (cb_zoom_cancel_clicked), state);
@@ -267,7 +267,7 @@ dialog_zoom (WBCGtk *wbcg, Sheet *sheet)
GTK_WIDGET (&state->zoom->entry));
gnumeric_init_help_button (
- gnm_xml_get_widget (state->gui, "help_button"),
+ go_gtk_builder_get_widget (state->gui, "help_button"),
GNUMERIC_HELP_LINK_ZOOM);
gnm_dialog_setup_destroy_handlers (GTK_DIALOG (state->dialog), wbcg,
diff --git a/src/gui-util.c b/src/gui-util.c
index 1692e98..c7784c0 100644
--- a/src/gui-util.c
+++ b/src/gui-util.c
@@ -416,7 +416,7 @@ gnm_gui_group_value (gpointer gui, char const * const group[])
{
int i;
for (i = 0; group[i]; i++) {
- GtkWidget *w = gnm_xml_get_widget (gui, group[i]);
+ GtkWidget *w = go_gtk_builder_get_widget (gui, group[i]);
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w)))
return i;
}
@@ -573,14 +573,6 @@ gnm_gtk_builder_new (char const *uifile, char const *domain, GOCmdContext *cc)
return gui;
}
-GtkWidget *
-gnm_xml_get_widget (gpointer gui, char const *widget_name)
-{
- if (GTK_IS_BUILDER (gui))
- return go_gtk_builder_get_widget (gui, widget_name);
- abort ();
-}
-
static void
popup_item_activate (GtkWidget *item, gpointer *user_data)
diff --git a/src/gui-util.h b/src/gui-util.h
index 50a55df..a7ef21c 100644
--- a/src/gui-util.h
+++ b/src/gui-util.h
@@ -50,8 +50,6 @@ GtkWidget *gnumeric_create_tooltip (GtkWidget *ref_widget);
GtkBuilder *gnm_gtk_builder_new (char const *uifile, char const *domain,
GOCmdContext *cc);
-GtkWidget *gnm_xml_get_widget (gpointer gui, char const *widget_name);
-
typedef struct {
char const *name;
char const *pixmap;
diff --git a/src/widgets/gnm-dao.c b/src/widgets/gnm-dao.c
index 85c0c58..4075566 100644
--- a/src/widgets/gnm-dao.c
+++ b/src/widgets/gnm-dao.c
@@ -75,23 +75,23 @@ gnm_dao_init (GnmDao *gdao)
if (gdao->gui == NULL)
return;
- toplevel = gnm_xml_get_widget (gdao->gui, "dao_box");
+ toplevel = go_gtk_builder_get_widget (gdao->gui, "dao_box");
- gdao->new_sheet = gnm_xml_get_widget (gdao->gui,
+ gdao->new_sheet = go_gtk_builder_get_widget (gdao->gui,
"newsheet-button");
- gdao->new_workbook = gnm_xml_get_widget (gdao->gui,
+ gdao->new_workbook = go_gtk_builder_get_widget (gdao->gui,
"newworkbook-button");
- gdao->output_range = gnm_xml_get_widget (gdao->gui,
+ gdao->output_range = go_gtk_builder_get_widget (gdao->gui,
"outputrange-button");
- gdao->in_place = gnm_xml_get_widget (gdao->gui,
+ gdao->in_place = go_gtk_builder_get_widget (gdao->gui,
"inplace-button");
- gdao->clear_outputrange_button = gnm_xml_get_widget
+ gdao->clear_outputrange_button = go_gtk_builder_get_widget
(gdao->gui, "clear_outputrange_button");
- gdao->retain_format_button = gnm_xml_get_widget
+ gdao->retain_format_button = go_gtk_builder_get_widget
(gdao->gui, "retain_format_button");
- gdao->retain_comments_button = gnm_xml_get_widget
+ gdao->retain_comments_button = go_gtk_builder_get_widget
(gdao->gui, "retain_comments_button");
- gdao->put_menu = gnm_xml_get_widget
+ gdao->put_menu = go_gtk_builder_get_widget
(gdao->gui, "put_menu");
gtk_combo_box_set_active
(GTK_COMBO_BOX (gdao->put_menu), 1);
@@ -238,7 +238,7 @@ gnm_dao_new (WBCGtk *wbcg, gchar *inplace_str)
gdao->wbcg = wbcg;
/* Create the output range expression entry */
- table = GTK_TABLE (gnm_xml_get_widget (gdao->gui, "output-table"));
+ table = GTK_TABLE (go_gtk_builder_get_widget (gdao->gui, "output-table"));
gdao->output_entry = gnm_expr_entry_new (wbcg, TRUE);
gnm_expr_entry_set_flags (gdao->output_entry,
GNM_EE_SINGLE_RANGE, GNM_EE_MASK);
@@ -315,7 +315,7 @@ gnm_dao_get_data (GnmDao *gdao, data_analysis_output_t **dao)
break;
}
- button = gnm_xml_get_widget (gdao->gui, "autofit_button");
+ button = go_gtk_builder_get_widget (gdao->gui, "autofit_button");
(*dao)->autofit_flag = gtk_toggle_button_get_active (
GTK_TOGGLE_BUTTON (button));
diff --git a/src/widgets/widget-font-selector.c b/src/widgets/widget-font-selector.c
index 83f53fd..80a135f 100644
--- a/src/widgets/widget-font-selector.c
+++ b/src/widgets/widget-font-selector.c
@@ -376,20 +376,20 @@ fs_init (FontSelector *fs)
gnm_style_set_font_size (fs->mstyle, 10);
gtk_box_pack_start (GTK_BOX (fs),
- gnm_xml_get_widget (fs->gui, "toplevel-table"), TRUE, TRUE, 0);
+ go_gtk_builder_get_widget (fs->gui, "toplevel-table"), TRUE, TRUE, 0);
- fs->font_name_entry = gnm_xml_get_widget (fs->gui, "font-name-entry");
- fs->font_style_entry = gnm_xml_get_widget (fs->gui, "font-style-entry");
- fs->font_size_entry = gnm_xml_get_widget (fs->gui, "font-size-entry");
- fs->font_name_list = GTK_TREE_VIEW (gnm_xml_get_widget (fs->gui, "font-name-list"));
- fs->font_style_list = GTK_TREE_VIEW (gnm_xml_get_widget (fs->gui, "font-style-list"));
- fs->font_size_list = GTK_TREE_VIEW (gnm_xml_get_widget (fs->gui, "font-size-list"));
+ fs->font_name_entry = go_gtk_builder_get_widget (fs->gui, "font-name-entry");
+ fs->font_style_entry = go_gtk_builder_get_widget (fs->gui, "font-style-entry");
+ fs->font_size_entry = go_gtk_builder_get_widget (fs->gui, "font-size-entry");
+ fs->font_name_list = GTK_TREE_VIEW (go_gtk_builder_get_widget (fs->gui, "font-name-list"));
+ fs->font_style_list = GTK_TREE_VIEW (go_gtk_builder_get_widget (fs->gui, "font-style-list"));
+ fs->font_size_list = GTK_TREE_VIEW (go_gtk_builder_get_widget (fs->gui, "font-size-list"));
w = g_object_new (GOC_TYPE_CANVAS, NULL);
fs->font_preview_canvas = GOC_CANVAS (w);
goc_canvas_scroll_to (fs->font_preview_canvas, 0, 0);
gtk_widget_show_all (w);
- w = gnm_xml_get_widget (fs->gui, "font-preview-frame");
+ w = go_gtk_builder_get_widget (fs->gui, "font-preview-frame");
gtk_container_add (GTK_CONTAINER (w), GTK_WIDGET (fs->font_preview_canvas));
fs->font_preview_grid = GOC_ITEM (goc_item_new (
goc_canvas_get_root (fs->font_preview_canvas),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]