GtkWidget * gnm_dao_new (WBCGtk *wbcg, gchar *inplace_str) { GnmDao *gdao = GNM_DAO (g_object_new (GNM_DAO_TYPE, NULL)); GtkGrid *grid; g_return_val_if_fail (wbcg != NULL, NULL); gdao->wbcg = wbcg; /* Create the output range expression entry */ grid = GTK_GRID (go_gtk_builder_get_widget (gdao->gui, "output-grid")); gdao->output_entry = gnm_expr_entry_new (wbcg, TRUE); gnm_expr_entry_set_flags (gdao->output_entry, GNM_EE_SINGLE_RANGE, GNM_EE_MASK); gtk_widget_set_hexpand (GTK_WIDGET (gdao->output_entry), TRUE); gtk_grid_attach (grid, GTK_WIDGET (gdao->output_entry), 1, 3, 1, 1); go_atk_setup_label (gdao->output_range, GTK_WIDGET (gdao->output_entry)); gtk_widget_show (GTK_WIDGET (gdao->output_entry)); /* Finished creating the output range expression entry */ gnm_dao_set_inplace (gdao, inplace_str); gnm_dao_setup_signals (gdao); cb_set_sensitivity (NULL, gdao); return GTK_WIDGET (gdao); }
GtkWidget * gnm_dao_new (WBCGtk *wbcg, gchar *inplace_str) { GnmDao *gdao = GNM_DAO (g_object_new (GNM_DAO_TYPE, NULL)); GtkTable *table; g_return_val_if_fail (wbcg != NULL, NULL); gdao->wbcg = wbcg; /* Create the output range expression entry */ table = GTK_TABLE (glade_xml_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); gtk_table_attach (table, GTK_WIDGET (gdao->output_entry), 2, 3, 3, 4, GTK_EXPAND | GTK_FILL, 0, 0, 0); go_atk_setup_label (gdao->output_range, GTK_WIDGET (gdao->output_entry)); gtk_widget_show (GTK_WIDGET (gdao->output_entry)); /* Finished creating the output range expression entry */ gnm_dao_set_inplace (gdao, inplace_str); gnm_dao_setup_signals (gdao); cb_set_sensitivity (NULL, gdao); return GTK_WIDGET (gdao); }