Commit 1f774019 authored by Jody Goldberg's avatar Jody Goldberg Committed by Jody Goldberg

remove gobject loader capabilities and just sponge off of gobject


2003-04-02  Jody Goldberg <jody@gnome.org>

	* src/plugin-loader-module.c : remove gobject loader capabilities and
	  just sponge off of gobject directly.
parent 8465be9e
......@@ -21,6 +21,8 @@ Pending Patches
1) graphs {Jody}
1.1) Split plot xml file engine, type, and family plugins (DONE)
1.2) Use the registered engines to create plots (DONE)
1.3) xml -> GValue parsing for type args
2) stf {Andreas}
2.1) UTF-8 cleanliness
......@@ -113,7 +115,12 @@ Pending Patches
22) Add dirty flags to workbook too, adding a sheet should
make workbook dirty not the new sheet.
23) Check errors from gconf.
23) gconf.
23.1) Check for errors
23.2) double check that we update on remote changes
24) Plugins
24.1) enhance gobject service to do delayed load (DONE)
Functions
ODDFPRICE (test fails)
......
2003-04-02 Jody Goldberg <jody@gnome.org>
* src/plugin-loader-module.c : remove gobject loader capabilities and
just sponge off of gobject directly.
2003-04-03 Jukka Pekka <jiivonen@hutcs.cs.hut.fi>
* src/workbook-control-gui.c, src/GNOME_Gnumeric.xml: Added a new
......@@ -14,6 +19,9 @@
2003-03-27 Jody Goldberg <jody@gnome.org>
* src/xml-io.h : add missing decls for
xml_node_get_bool, xml_node_set_bool.
* src/style.c (style_font_new_simple) : doh! Thanks Morten.
2003-03-26 Morten Welinder <terra@diku.dk>
......
2003-04-02 Jody Goldberg <jody@gnome.org>
* src/plugin-loader-module.c : remove gobject loader capabilities and
just sponge off of gobject directly.
2003-04-03 Jukka Pekka <jiivonen@hutcs.cs.hut.fi>
* src/workbook-control-gui.c, src/GNOME_Gnumeric.xml: Added a new
......@@ -14,6 +19,9 @@
2003-03-27 Jody Goldberg <jody@gnome.org>
* src/xml-io.h : add missing decls for
xml_node_get_bool, xml_node_set_bool.
* src/style.c (style_font_new_simple) : doh! Thanks Morten.
2003-03-26 Morten Welinder <terra@diku.dk>
......
2003-04-02 Jody Goldberg <jody@gnome.org>
* src/plugin-loader-module.c : remove gobject loader capabilities and
just sponge off of gobject directly.
2003-04-03 Jukka Pekka <jiivonen@hutcs.cs.hut.fi>
* src/workbook-control-gui.c, src/GNOME_Gnumeric.xml: Added a new
......@@ -14,6 +19,9 @@
2003-03-27 Jody Goldberg <jody@gnome.org>
* src/xml-io.h : add missing decls for
xml_node_get_bool, xml_node_set_bool.
* src/style.c (style_font_new_simple) : doh! Thanks Morten.
2003-03-26 Morten Welinder <terra@diku.dk>
......
......@@ -10,8 +10,6 @@ AM_CONFIG_HEADER(gnumeric-config.h)
AM_MAINTAINER_MODE
GNOME_PLATFORM_GNOME_2(yes, force)
# Make --disable-static the default
AC_DISABLE_STATIC
......
......@@ -340,7 +340,7 @@ excel_write_SETUP (BiffPut *bp, ExcelWriteSheet *esheet)
}
static void
excel_write_externsheets_v7 (ExcelWriteState *ewb, ExcelWriteSheet *container)
excel_write_externsheets_v7 (ExcelWriteState *ewb)
{
/* 2 byte expression #REF! */
static guint8 const expr_ref [] = { 0x02, 0, 0x1c, 0x17 };
......@@ -352,7 +352,7 @@ excel_write_externsheets_v7 (ExcelWriteState *ewb, ExcelWriteSheet *container)
GnmFunc *func;
data = ms_biff_put_len_next (ewb->bp, BIFF_EXTERNCOUNT, 2);
GSF_LE_SET_GUINT16 (data, num_sheets + ((container == NULL) ? 2 : 1));
GSF_LE_SET_GUINT16 (data, num_sheets + 2);
ms_biff_put_commit (ewb->bp);
for (i = 0; i < num_sheets; i++) {
......@@ -390,11 +390,9 @@ excel_write_externsheets_v7 (ExcelWriteState *ewb, ExcelWriteSheet *container)
ms_biff_put_var_write (ewb->bp, expr_ref, sizeof (expr_ref));
ms_biff_put_commit (ewb->bp);
}
if (container == NULL) {
ms_biff_put_var_next (ewb->bp, BIFF_EXTERNSHEET);
ms_biff_put_var_write (ewb->bp, magic_self, sizeof magic_self);
ms_biff_put_commit (ewb->bp);
}
}
static void
......@@ -3326,8 +3324,6 @@ write_sheet_head (BiffPut *bp, ExcelWriteSheet *esheet)
excel_write_margin (bp, BIFF_BOTTOM_MARGIN, pi->margins.bottom.points);
excel_write_SETUP (bp, esheet);
if (bp->version < MS_BIFF_V8)
excel_write_externsheets_v7 (esheet->ewb, esheet);
excel_write_DEFCOLWIDTH (bp, esheet);
excel_write_colinfos (bp, esheet);
excel_write_AUTOFILTERINFO (bp, esheet);
......@@ -3936,7 +3932,7 @@ write_workbook (ExcelWriteState *ewb)
if (bp->version < MS_BIFF_V8) {
/* write externsheets for every sheet in the workbook
* to make our lives easier */
excel_write_externsheets_v7 (ewb, NULL);
excel_write_externsheets_v7 (ewb);
/* assign indicies to the names before we export */
ewb->tmp_counter = ewb->externnames->len;
......
......@@ -206,6 +206,14 @@ push_guint16 (PolishData *pd, guint16 b)
ms_biff_put_var_write (pd->ewb->bp, data, sizeof(data));
}
static void
push_gint16 (PolishData *pd, gint16 b)
{
guint8 data[2];
GSF_LE_SET_GINT16 (data, b);
ms_biff_put_var_write (pd->ewb->bp, data, sizeof(data));
}
static void
push_guint32 (PolishData *pd, guint32 b)
{
......@@ -400,11 +408,10 @@ write_funcall (PolishData *pd, GnmExpr const *expr, gboolean shared)
if (ef->fd == NULL) {
push_guint8 (pd, FORMULA_PTG_NAME_X);
if (pd->ewb->bp->version <= MS_BIFF_V7) {
/* I write the Addin Magic entry after all the other sheets
* in the workbook, and this is a 1 based ordinal.
* All of the externnames are written for each sheet
* because I'm lazy */
push_guint16 (pd, pd->ewb->sheets->len + 1);
/* The Magic Addin entry is after the real sheets
* at the workbook level.
*/
push_gint16 (pd, -(pd->ewb->sheets->len + 1));
push_guint32 (pd, 0); /* reserved */
push_guint32 (pd, 0); /* reserved */
push_guint16 (pd, ef->idx);
......
......@@ -2,142 +2,6 @@
<GraphTypes xmlns:graph="http://www.gnumeric.org/graph_v1.dtd">
<MajorMinor>
<Major>
<_name>Bar</_name>
<sample_image_file>bar.xpm</sample_image_file>
<Minor>
<_name>Adjacent Bars</_name>
<_description>Adjacent horizontal bars grouped by major and minor categories.</_description>
<sample_image_file>chart_bar_1_1.png</sample_image_file>
<position row="1" col="1" />
<graph:Type name="Bar">
<horizontal>true</horizontal>
</graph:Type>
</Minor>
<Minor>
<_name>Stacked Bars</_name>
<_description>Minor categories stacked in horizontal bars grouped by major category.</_description>
<sample_image_file>chart_bar_1_2.png</sample_image_file>
<position row="1" col="2" />
<graph:Type name="Bar">
<horizontal>true</horizontal>
<stacked>true</stacked>
</graph:Type>
</Minor>
<Minor>
<_name>Percentage Bars</_name>
<_description>Minor categories stacked as percentages of the minor total, in horizontal bars, grouped by major category.</_description>
<sample_image_file>chart_bar_1_3.png</sample_image_file>
<position row="1" col="3" />
<graph:Type name="Bar">
<horizontal>true</horizontal>
<as_percentage>true</as_percentage>
</graph:Type>
</Minor>
<!-- No 3d yet
<Minor>
<_name>3D Adjacent Bars</_name>
<_description>Adjacent horizontal 3D bars grouped by major and minor categories.</_description>
<sample_image_file>chart_bar_2_1.png</sample_image_file>
<position row="2" col="1" />
<graph:Type name="Bar">
<horizontal>true</horizontal>
<in_3d>true</in_3d>
</graph:Type>
</Minor>
<Minor>
<_name>3D Stacked Bars</_name>
<_description>Minor categories stacked in horizontal 3D bars, grouped by major category.</_description>
<sample_image_file>chart_bar_2_2.png</sample_image_file>
<position row="2" col="2" />
<graph:Type name="Bar">
<horizontal>true</horizontal>
<stacked>true</stacked>
<in_3d>true</in_3d>
</graph:Type>
</Minor>
<Minor>
<_name>3D Percentage Bars</_name>
<_description>Minor categories stacked as percentages of the minor total, in 3D horizontal bars, grouped by major category.</_description>
<sample_image_file>chart_bar_2_3.png</sample_image_file>
<position row="2" col="3" />
<graph:Type name="Bar">
<horizontal>true</horizontal>
<as_percentage>true</as_percentage>
<in_3d>true</in_3d>
</graph:Type>
</Minor>
-->
</Major>
<Major>
<_name>Column</_name>
<sample_image_file>column.xpm</sample_image_file>
<Minor>
<_name>Adjacent Columns</_name>
<_description>Adjacent vertical columns grouped by major and minor categories.</_description>
<sample_image_file>chart_column_1_1.png</sample_image_file>
<position row="1" col="1" />
<graph:Type name="Bar">
<horizontal>false</horizontal>
</graph:Type>
</Minor>
<Minor>
<_name>Stacked Columns</_name>
<_description>Minor categories stacked in vertical columns grouped by major category.</_description>
<sample_image_file>chart_column_1_2.png</sample_image_file>
<position row="1" col="2" />
<graph:Type name="Bar">
<horizontal>false</horizontal>
<stacked>true</stacked>
</graph:Type>
</Minor>
<Minor>
<_name>Percentage Columns</_name>
<_description>Minor categories stacked as percentages of the minor total, in vertical columns, grouped by major category.</_description>
<sample_image_file>chart_column_1_3.png</sample_image_file>
<position row="1" col="3" />
<graph:Type name="Bar">
<horizontal>false</horizontal>
<as_percentage>true</as_percentage>
</graph:Type>
</Minor>
<!-- No 3d yet
<Minor>
<_name>3D Adjacent Columns</_name>
<_description>Adjacent vertical 3D columns grouped by major and minor categories.</_description>
<sample_image_file>chart_column_2_1.png</sample_image_file>
<position row="2" col="1" />
<graph:Type name="Bar">
<horizontal>false</horizontal>
<in_3d>true</in_3d>
</graph:Type>
</Minor>
<Minor>
<_name>3D Stacked Columns</_name>
<_description>Minor categories stacked in vertical 3D columns, grouped by major category.</_description>
<sample_image_file>chart_column_2_2.png</sample_image_file>
<position row="2" col="2" />
<graph:Type name="Bar">
<horizontal>false</horizontal>
<stacked>true</stacked>
<in_3d>true</in_3d>
</graph:Type>
</Minor>
<Minor>
<_name>3D Percentage Columns</_name>
<_description>Minor categories stacked as percentages of the minor total, in 3D vertical bars, grouped by major category.</_description>
<sample_image_file>chart_column_2_3.png</sample_image_file>
<position row="2" col="3" />
<graph:Type name="Bar">
<horizontal>false</horizontal>
<as_percentage>true</as_percentage>
<in_3d>true</in_3d>
</graph:Type>
</Minor>
-->
</Major>
<Major>
<_name>Line</_name>
<sample_image_file>linegraph.xpm</sample_image_file>
......@@ -211,185 +75,6 @@
-->
</Major>
<Major>
<_name>Pie</_name>
<sample_image_file>pie.xpm</sample_image_file>
<Minor>
<_name>Pie</_name>
<_description>Percentage of each contributor.</_description>
<sample_image_file>chart_pie_1_1.png</sample_image_file>
<position row="1" col="1" />
<graph:Type name="Pie">
</graph:Type>
</Minor>
<!--
<Minor>
<_name>3D Pie</_name>
<_description>Percentage of each contributor in 3D pie.</_description>
<sample_image_file>chart_pie_1_2.png</sample_image_file>
<position row="1" col="2" />
<graph:Type name="Pie">
<in_3d>true</in_3d>
</graph:Type>
</Minor>
<Minor>
<_name>Multi-pie</_name>
<_description>Major totals as percentages with each wedge subdivided into secondary pies.</_description>
<sample_image_file>chart_pie_1_3.png</sample_image_file>
<position row="1" col="3" />
<graph:Type name="MultiPie">
</graph:Type>
</Minor>
-->
<Minor>
<_name>Split Pie</_name>
<_description>Percentage of each contributor with wedges split apart.</_description>
<sample_image_file>chart_pie_2_1.png</sample_image_file>
<position row="2" col="1" />
<graph:Type name="Pie">
<separation_percent_of_radius>20</separation_percent_of_radius>
</graph:Type>
</Minor>
<!--
<Minor>
<_name>3D Split Pie</_name>
<_description>Percentage of each contributor with 3D wedges split apart.</_description>
<sample_image_file>chart_pie_2_2.png</sample_image_file>
<position row="2" col="2" />
<graph:Type name="Pie">
<in_3d>true</in_3d>
<separation_percent_of_radius>20</separation_percent_of_radius>
</graph:Type>
</Minor>
<Minor>
<_name>Multi-pie-bars</_name>
<_description>Major totals as percentages with each wedge subdivided into secondary stacked bars.</_description>
<sample_image_file>chart_pie_2_3.png</sample_image_file>
<position row="2" col="3" />
<graph:Type name="PieBar">
<in_3d>true</in_3d>
<separation_percent_of_radius>20</separation_percent_of_radius>
</graph:Type>
</Minor>
-->
</Major>
<Major>
<_name>Scatter</_name>
<sample_image_file>scatter.xpm</sample_image_file>
<Minor>
<_name>Points</_name>
<_description>Plot one series per axis.</_description>
<sample_image_file>chart_scatter_1_1.png</sample_image_file>
<position row="1" col="1" />
<graph:Type name="Scatter">
<with_marker>true</with_marker>
</graph:Type>
</Minor>
<!-- No lines for scatters yet
<Minor>
<_name>Marked interpolated points</_name>
<_description>Interpolate between multi-dimensional points, with markers at each point.</_description>
<sample_image_file>chart_scatter_2_1.png</sample_image_file>
<position row="2" col="1" />
<graph:Type name="Scatter">
<with_marker>true</with_marker>
<with_line>
<Cubic/>
</with_line>
</graph:Type>
</Minor>
<Minor>
<_name>Interpolated points</_name>
<_description>Interpolate between multi-dimensional points.</_description>
<sample_image_file>chart_scatter_2_2.png</sample_image_file>
<position row="2" col="2" />
<graph:Type name="Scatter">
<with_marker>false</with_marker>
<with_line>
<Cubic/>
</with_line>
</graph:Type>
</Minor>
<Minor>
<_name>Marked linearly interpolated points</_name>
<_description>Linearly interpolate between multi-dimensional points, with markers at each point.</_description>
<sample_image_file>chart_scatter_3_1.png</sample_image_file>
<position row="3" col="1" />
<graph:Type name="Scatter">
<with_marker>true</with_marker>
<with_line>
<Linear/>
</with_line>
</graph:Type>
</Minor>
<Minor>
<_name>Linearly interpolated points</_name>
<_description>Linearly interpolate between multi-dimensional points.</_description>
<sample_image_file>chart_scatter_3_2.png</sample_image_file>
<position row="3" col="2" />
<graph:Type name="Scatter">
<with_marker>false</with_marker>
<with_line>
<Linear/>
</with_line>
</graph:Type>
</Minor>
-->
</Major>
<Major>
<_name>Bubble</_name>
<sample_image_file>bubble.xpm</sample_image_file>
<Minor>
<_name>Bubble</_name>
<_description>Plot X, Y and bubble size.</_description>
<sample_image_file>chart_bubble_1_1.png</sample_image_file>
<position row="1" col="1" />
<graph:Type name="Scatter">
<with_marker>true</with_marker>
<auto_allocate_bubble_size>true</auto_allocate_bubble_size>
</graph:Type>
</Minor>
</Major>
<!--
<Major>
<_name>Stock</_name>
<sample_image_file>stock.xpm</sample_image_file>
<Minor>
<_name>3 series</_name>
<_description>High, Low, Close.</_description>
<sample_image_file>chart_stock_1_1.png</sample_image_file>
<position row="1" col="1" />
<graph:Type name="??">
</graph:Type>
</Minor>
<Minor>
<_name>4 series</_name>
<_description>open, High, Low, Close.</_description>
<sample_image_file>chart_stock_1_2.png</sample_image_file>
<position row="1" col="2" />
<graph:Type name="??">
</graph:Type>
</Minor>
<Minor>
<_name>4 series (2)</_name>
<_description>Volume, High, Low, Close.</_description>
<sample_image_file>chart_stock_2_1.png</sample_image_file>
<position row="2" col="1" />
<graph:Type name="??">
</graph:Type>
</Minor>
<Minor>
<_name>5 series</_name>
<_description>Volume, Open, High, Low, Close.</_description>
<sample_image_file>chart_stock_2_2.png</sample_image_file>
<position row="2" col="2" />
<graph:Type name="??">
</graph:Type>
</Minor>
</Major>
-->
</MajorMinor>
<Custom>
</Custom>
......
......@@ -328,10 +328,9 @@ gnumeric_app_libs = \
tools/solver/libsolver.a \
tools/solver/glpk/source/libglpk.a \
tools/solver/lp_solve/liblp_solve.a \
cut-n-paste-code/goffice-graph/libgoffice-graph.a \
cut-n-paste-code/foocanvas/libfoocanvas/libfoocanvas.a
# cut-n-paste-code/goffice-graph/libgoffice-graph.a
if WITH_BONOBO
gnumeric_component_SOURCES = \
$(GNUMERIC_BASE) \
......
......@@ -42,7 +42,6 @@ base_files = \
dialog-formula-guru.c \
dialog-goal-seek.c \
dialog-goto-cell.c \
dialog-graph-guru.c \
dialog-hyperlink.c \
dialog-insert-cells.c \
dialog-define-names.c \
......@@ -111,7 +110,6 @@ glade_DATA = \
formula-guru.glade \
fourier-analysis.glade \
function-select.glade \
graph-guru.glade \
goalseek.glade \
goto.glade \
hf-config.glade \
......
......@@ -337,7 +337,8 @@ dialog_tool_init (GenericToolState *state,
_("_Input Range:") : input_var1_str;
state->input_var2_str = input_var2_str;
state->gui = gnumeric_glade_xml_new (state->wbcg, gui_name);
state->gui = gnm_glade_xml_new (COMMAND_CONTEXT (state->wbcg),
gui_name, NULL, NULL);
if (state->gui == NULL)
goto dialog_tool_init_error;
......
......@@ -52,7 +52,7 @@ typedef struct {
} AutoCorrectExceptionState;
typedef struct {
GladeXML *glade;
GladeXML *gui;
GtkWidget *dialog;
Workbook *wb;
WorkbookControlGUI *wbcg;
......@@ -123,9 +123,9 @@ autocorrect_init_exception_list (AutoCorrectState *state,
exception->changed = FALSE;
exception->exceptions = exceptions;
exception->entry = glade_xml_get_widget (state->glade, entry_name);
exception->entry = glade_xml_get_widget (state->gui, entry_name);
exception->model = gtk_list_store_new (1, G_TYPE_STRING);
exception->list = glade_xml_get_widget (state->glade, list_name);
exception->list = glade_xml_get_widget (state->gui, list_name);
gtk_tree_view_set_model (GTK_TREE_VIEW (exception->list),
GTK_TREE_MODEL (exception->model));
gtk_tree_view_append_column (GTK_TREE_VIEW (exception->list),
......@@ -144,11 +144,11 @@ autocorrect_init_exception_list (AutoCorrectState *state,
-1);
}
w = glade_xml_get_widget (state->glade, add_name);
w = glade_xml_get_widget (state->gui, add_name);
g_signal_connect (G_OBJECT (w),
"clicked",
G_CALLBACK (cb_add_clicked), exception);
w = glade_xml_get_widget (state->glade, remove_name);
w = glade_xml_get_widget (state->gui, remove_name);
g_signal_connect (G_OBJECT (w),
"clicked",
G_CALLBACK (cb_remove_clicked), exception);
......@@ -168,7 +168,7 @@ static void
ac_dialog_toggle_init (AutoCorrectState *state, char const *name,
AutoCorrectFeature f)
{
GtkWidget *w = glade_xml_get_widget (state->glade, name);
GtkWidget *w = glade_xml_get_widget (state->gui, name);
g_return_if_fail (w != NULL);
......@@ -192,9 +192,9 @@ cb_autocorrect_destroy (G_GNUC_UNUSED GtkObject *w,
g_slist_free (state->first_letter.exceptions);
state->first_letter.exceptions = NULL;
if (state->glade != NULL) {
g_object_unref (G_OBJECT (state->glade));
state->glade = NULL;
if (state->gui != NULL) {
g_object_unref (G_OBJECT (state->gui));
state->gui = NULL;
}
state->dialog = NULL;
......@@ -240,10 +240,7 @@ dialog_init (AutoCorrectState *state)
GtkWidget *entry;
GtkWidget *button;
state->glade = gnumeric_glade_xml_new (state->wbcg, "autocorrect.glade");
if (state->glade == NULL)
return TRUE;
state->dialog = glade_xml_get_widget (state->glade, "AutoCorrect");
state->dialog = glade_xml_get_widget (state->gui, "AutoCorrect");
if (state->dialog == NULL) {
g_warning ("Corrupt file autocorrect.glade");
return TRUE;
......@@ -255,28 +252,28 @@ dialog_init (AutoCorrectState *state)
ac_dialog_toggle_init (state, "names_of_days", AC_NAMES_OF_DAYS);
ac_dialog_toggle_init (state, "replace_text", AC_REPLACE);
button = glade_xml_get_widget (state->glade, "help_button");
button = glade_xml_get_widget (state->gui, "help_button");
gnumeric_init_help_button (button, "autocorrect-tool.html");
button = glade_xml_get_widget (state->glade, "ok_button");
button = glade_xml_get_widget (state->gui, "ok_button");
g_signal_connect (GTK_OBJECT (button),
"clicked",
G_CALLBACK (cb_ok_button_clicked), state);
button = glade_xml_get_widget (state->glade, "apply_button");
button = glade_xml_get_widget (state->gui, "apply_button");
g_signal_connect (GTK_OBJECT (button),
"clicked",
G_CALLBACK (cb_apply_button_clicked), state);
button = glade_xml_get_widget (state->glade, "cancel_button");
button = glade_xml_get_widget (state->gui, "cancel_button");
g_signal_connect (GTK_OBJECT (button),
"clicked",
G_CALLBACK (cb_cancel_button_clicked), state);
/* Make <Ret> in entry fields invoke default */
entry = glade_xml_get_widget (state->glade, "entry1");
entry = glade_xml_get_widget (state->gui, "entry1");
gtk_widget_set_sensitive (entry, FALSE);
gnumeric_editable_enters (GTK_WINDOW (state->dialog),
GTK_WIDGET (entry));
entry = glade_xml_get_widget (state->glade, "entry2");
entry = glade_xml_get_widget (state->gui, "entry2");
gnumeric_editable_enters (GTK_WINDOW (state->dialog),
GTK_WIDGET (entry));
gtk_widget_set_sensitive (entry, FALSE);
......@@ -303,15 +300,20 @@ void
dialog_autocorrect (WorkbookControlGUI *wbcg)
{
AutoCorrectState *state;
GladeXML *gui;
g_return_if_fail (IS_WORKBOOK_CONTROL_GUI (wbcg));
if (gnumeric_dialog_raise_if_exists (wbcg, AUTO_CORRECT_KEY))
return;
gui = gnm_glade_xml_new (COMMAND_CONTEXT (wbcg),
"autocorrect.glade", NULL, NULL);
if (gui == NULL)
return;
state = g_new (AutoCorrectState, 1);
state->wbcg = wbcg;
state->glade = NULL;
state->gui = gui;
state->init_caps.exceptions = NULL;
state->first_letter.exceptions = NULL;
......
......@@ -221,20 +221,24 @@ dialog_auto_filter (WorkbookControlGUI *wbcg,
{
AutoFilterState *state;
GtkWidget *w;
GladeXML *gui;
g_return_if_fail (wbcg != NULL);
if (gnumeric_dialog_raise_if_exists (wbcg, DIALOG_KEY))
return;
gui = gnm_glade_xml_new (COMMAND_CONTEXT (wbcg),
(is_expr ? "autofilter-expression.glade" : "autofilter-top10.glade"),
NULL, NULL);
if (gui == NULL)
return;
state = g_new (AutoFilterState, 1);
state->wbcg = wbcg;
state->filter = filter;
state->field = field;
state->is_expr = is_expr;
state->gui = gnumeric_glade_xml_new (wbcg,
is_expr ? "autofilter-expression.glade" : "autofilter-top10.glade");
state->gui = gui;
g_return_if_fail (state->gui != NULL);
......
......@@ -556,8 +556,10 @@ dialog_autoformat (WorkbookControlGUI *wbcg)
AutoFormatState *state;
int i;
gui = gnumeric_glade_xml_new (NULL, "autoformat.glade");
g_return_if_fail (gui != NULL);
gui = gnm_glade_xml_new (COMMAND_CONTEXT (wbcg),
"autoformat.glade", NULL, NULL);
if (gui == NULL)
return;
state = g_new0 (AutoFormatState, 1);
......@@ -691,7 +693,8 @@ dialog_autoformat (WorkbookControlGUI *wbcg)
/* a candidate for merging into attach guru */
g_object_set_data_full (G_OBJECT (state->dialog),
"state", state, (GDestroyNotify)cb_autoformat_destroy);
gnumeric_non_modal_dialog (state->wbcg, GTK_WINDOW (state->dialog));
gnumeric_non_modal_dialog (wbcg_toplevel (state->wbcg),
GTK_WINDOW (state->dialog));
wbcg_edit_attach_guru (state->wbcg, GTK_WIDGET (state->dialog));
gtk_widget_show_all (GTK_WIDGET (state->dialog));
}
......@@ -164,22 +164,23 @@ cb_autosave_ok (G_GNUC_UNUSED GtkWidget *button, autosave_t *state)
void
dialog_autosave (WorkbookControlGUI *wbcg)
{
GladeXML *gui;
autosave_t *state;