Commit fbd3597b authored by Miguel de Icaza's avatar Miguel de Icaza Committed by Arturo Espinosa

Do not pre-initialize them. If they need to be pre-initialized something

1999-06-21  Miguel de Icaza  <miguel@gnu.org>

	* src/func.c: Do not pre-initialize them.  If they need to be
	pre-initialized something is wrong in some other place.  Fix that
	instead.

	* src/clipboard.c (do_clipboard_paste_cell_region): Implement
	transpose-on-paste command.  Change the increment steps for
	transpose and compute a different target column as well.

	(sheet_paste_selection): Swap the paste dimesions here if we are
	pasting/transpose.

1999-06-18  Miguel de Icaza  <miguel@gnu.org>

	* src/func.c: Remove static initialization of the error messages.

1999-06-14  Miguel de Icaza  <miguel@gnu.org>

	* src/clipboard.h: Define PASTE_TRANSPOSE.

	* src/dialog-paste-special.c (dialog_paste_special): Add new
parent e7b3aa33
1999-06-21 Miguel de Icaza <miguel@gnu.org>
* src/func.c: Do not pre-initialize them. If they need to be
pre-initialized something is wrong in some other place. Fix that
instead.
* src/clipboard.c (do_clipboard_paste_cell_region): Implement
transpose-on-paste command. Change the increment steps for
transpose and compute a different target column as well.
(sheet_paste_selection): Swap the paste dimesions here if we are
pasting/transpose.
1999-06-18 Miguel de Icaza <miguel@gnu.org>
* src/func.c: Remove static initialization of the error messages.
1999-06-14 Miguel de Icaza <miguel@gnu.org>
* src/clipboard.h: Define PASTE_TRANSPOSE.
* src/dialog-paste-special.c (dialog_paste_special): Add new
checkbutton for transpose-on-paste operation.
1999-06-21 Michael Meeks <michael@edenproject.org>
* src/func.c (iterate_cellrange_callback): Add case
......@@ -320,32 +344,6 @@
* src/dialog-paste-special.c (dialog_paste_special): Hanlde the
case in which the window manager closed the dialog box.
* src/cell.c (cell_comment_destroy): Changed invocation from
gtk_object_destroy to gtk_object_unref.
(cell_comment_unrealize): ditto.
(cell_comment_clicked): ditto.
* src/dialog-cell-sort.c (dialog_cell_sort): ditto.
* src/dialog-function-select.c (dialog_function_select): ditto
* src/dialog-function-wizard.c (dialog_function_wizard): ditto
* src/dialog-paste-special.c (dialog_paste_special): ditto
* src/dialog-solver.c (constr_add_click): ditto.
(constr_add_click): ditto
(dialog_solver_options): ditto
* src/gnumeric-sheet.c (gnumeric_sheet_stop_cell_selection): ditto
(destroy_item_editor): ditto.
(gnumeric_sheet_key_mode_object): ditto, and clear the pointer to
the current_object.
* src/sheet-object-container.c (sheet_object_container_destroy): ditto.
* src/item-cursor.c (item_cursor_drag_event): ditto.
(item_cursor_autofill_event): ditto
* src/item-bar.c (item_bar_event): ditto
* src/workbook.c (workbook_setup_auto_calc): ditto.
* src/widget-editable-label.c (el_stop_editing): ditto
* src/sheet-object.c (sheet_object_destroy): ditto
(sheet_view_object_unrealize): ditto
(sheet_object_destroy_control_points): ditto
* src/sheet-view.c (sheet_view_destroy): ditto
1999-06-10 Miguel de Icaza <miguel@gnu.org>
* src/pattern-selector.c (pattern_selector_init): Use the GNOME
......
1999-06-21 Miguel de Icaza <miguel@gnu.org>
* src/func.c: Do not pre-initialize them. If they need to be
pre-initialized something is wrong in some other place. Fix that
instead.
* src/clipboard.c (do_clipboard_paste_cell_region): Implement
transpose-on-paste command. Change the increment steps for
transpose and compute a different target column as well.
(sheet_paste_selection): Swap the paste dimesions here if we are
pasting/transpose.
1999-06-18 Miguel de Icaza <miguel@gnu.org>
* src/func.c: Remove static initialization of the error messages.
1999-06-14 Miguel de Icaza <miguel@gnu.org>
* src/clipboard.h: Define PASTE_TRANSPOSE.
* src/dialog-paste-special.c (dialog_paste_special): Add new
checkbutton for transpose-on-paste operation.
1999-06-21 Michael Meeks <michael@edenproject.org>
* src/func.c (iterate_cellrange_callback): Add case
......@@ -320,32 +344,6 @@
* src/dialog-paste-special.c (dialog_paste_special): Hanlde the
case in which the window manager closed the dialog box.
* src/cell.c (cell_comment_destroy): Changed invocation from
gtk_object_destroy to gtk_object_unref.
(cell_comment_unrealize): ditto.
(cell_comment_clicked): ditto.
* src/dialog-cell-sort.c (dialog_cell_sort): ditto.
* src/dialog-function-select.c (dialog_function_select): ditto
* src/dialog-function-wizard.c (dialog_function_wizard): ditto
* src/dialog-paste-special.c (dialog_paste_special): ditto
* src/dialog-solver.c (constr_add_click): ditto.
(constr_add_click): ditto
(dialog_solver_options): ditto
* src/gnumeric-sheet.c (gnumeric_sheet_stop_cell_selection): ditto
(destroy_item_editor): ditto.
(gnumeric_sheet_key_mode_object): ditto, and clear the pointer to
the current_object.
* src/sheet-object-container.c (sheet_object_container_destroy): ditto.
* src/item-cursor.c (item_cursor_drag_event): ditto.
(item_cursor_autofill_event): ditto
* src/item-bar.c (item_bar_event): ditto
* src/workbook.c (workbook_setup_auto_calc): ditto.
* src/widget-editable-label.c (el_stop_editing): ditto
* src/sheet-object.c (sheet_object_destroy): ditto
(sheet_view_object_unrealize): ditto
(sheet_object_destroy_control_points): ditto
* src/sheet-view.c (sheet_view_destroy): ditto
1999-06-10 Miguel de Icaza <miguel@gnu.org>
* src/pattern-selector.c (pattern_selector_init): Use the GNOME
......
1999-06-21 Miguel de Icaza <miguel@gnu.org>
* src/func.c: Do not pre-initialize them. If they need to be
pre-initialized something is wrong in some other place. Fix that
instead.
* src/clipboard.c (do_clipboard_paste_cell_region): Implement
transpose-on-paste command. Change the increment steps for
transpose and compute a different target column as well.
(sheet_paste_selection): Swap the paste dimesions here if we are
pasting/transpose.
1999-06-18 Miguel de Icaza <miguel@gnu.org>
* src/func.c: Remove static initialization of the error messages.
1999-06-14 Miguel de Icaza <miguel@gnu.org>
* src/clipboard.h: Define PASTE_TRANSPOSE.
* src/dialog-paste-special.c (dialog_paste_special): Add new
checkbutton for transpose-on-paste operation.
1999-06-21 Michael Meeks <michael@edenproject.org>
* src/func.c (iterate_cellrange_callback): Add case
......@@ -320,32 +344,6 @@
* src/dialog-paste-special.c (dialog_paste_special): Hanlde the
case in which the window manager closed the dialog box.
* src/cell.c (cell_comment_destroy): Changed invocation from
gtk_object_destroy to gtk_object_unref.
(cell_comment_unrealize): ditto.
(cell_comment_clicked): ditto.
* src/dialog-cell-sort.c (dialog_cell_sort): ditto.
* src/dialog-function-select.c (dialog_function_select): ditto
* src/dialog-function-wizard.c (dialog_function_wizard): ditto
* src/dialog-paste-special.c (dialog_paste_special): ditto
* src/dialog-solver.c (constr_add_click): ditto.
(constr_add_click): ditto
(dialog_solver_options): ditto
* src/gnumeric-sheet.c (gnumeric_sheet_stop_cell_selection): ditto
(destroy_item_editor): ditto.
(gnumeric_sheet_key_mode_object): ditto, and clear the pointer to
the current_object.
* src/sheet-object-container.c (sheet_object_container_destroy): ditto.
* src/item-cursor.c (item_cursor_drag_event): ditto.
(item_cursor_autofill_event): ditto
* src/item-bar.c (item_bar_event): ditto
* src/workbook.c (workbook_setup_auto_calc): ditto.
* src/widget-editable-label.c (el_stop_editing): ditto
* src/sheet-object.c (sheet_object_destroy): ditto
(sheet_view_object_unrealize): ditto
(sheet_object_destroy_control_points): ditto
* src/sheet-view.c (sheet_view_destroy): ditto
1999-06-10 Miguel de Icaza <miguel@gnu.org>
* src/pattern-selector.c (pattern_selector_init): Use the GNOME
......
1999-06-21 Miguel de Icaza <miguel@gnu.org>
* src/func.c: Do not pre-initialize them. If they need to be
pre-initialized something is wrong in some other place. Fix that
instead.
* src/clipboard.c (do_clipboard_paste_cell_region): Implement
transpose-on-paste command. Change the increment steps for
transpose and compute a different target column as well.
(sheet_paste_selection): Swap the paste dimesions here if we are
pasting/transpose.
1999-06-18 Miguel de Icaza <miguel@gnu.org>
* src/func.c: Remove static initialization of the error messages.
1999-06-14 Miguel de Icaza <miguel@gnu.org>
* src/clipboard.h: Define PASTE_TRANSPOSE.
* src/dialog-paste-special.c (dialog_paste_special): Add new
checkbutton for transpose-on-paste operation.
1999-06-21 Michael Meeks <michael@edenproject.org>
* src/func.c (iterate_cellrange_callback): Add case
......@@ -320,32 +344,6 @@
* src/dialog-paste-special.c (dialog_paste_special): Hanlde the
case in which the window manager closed the dialog box.
* src/cell.c (cell_comment_destroy): Changed invocation from
gtk_object_destroy to gtk_object_unref.
(cell_comment_unrealize): ditto.
(cell_comment_clicked): ditto.
* src/dialog-cell-sort.c (dialog_cell_sort): ditto.
* src/dialog-function-select.c (dialog_function_select): ditto
* src/dialog-function-wizard.c (dialog_function_wizard): ditto
* src/dialog-paste-special.c (dialog_paste_special): ditto
* src/dialog-solver.c (constr_add_click): ditto.
(constr_add_click): ditto
(dialog_solver_options): ditto
* src/gnumeric-sheet.c (gnumeric_sheet_stop_cell_selection): ditto
(destroy_item_editor): ditto.
(gnumeric_sheet_key_mode_object): ditto, and clear the pointer to
the current_object.
* src/sheet-object-container.c (sheet_object_container_destroy): ditto.
* src/item-cursor.c (item_cursor_drag_event): ditto.
(item_cursor_autofill_event): ditto
* src/item-bar.c (item_bar_event): ditto
* src/workbook.c (workbook_setup_auto_calc): ditto.
* src/widget-editable-label.c (el_stop_editing): ditto
* src/sheet-object.c (sheet_object_destroy): ditto
(sheet_view_object_unrealize): ditto
(sheet_object_destroy_control_points): ditto
* src/sheet-view.c (sheet_view_destroy): ditto
1999-06-10 Miguel de Icaza <miguel@gnu.org>
* src/pattern-selector.c (pattern_selector_init): Use the GNOME
......
......@@ -1302,7 +1302,7 @@ callback_function_sum (Sheet *sheet, Value *value,
break;
default:
g_warning ("Unimplemented value->type in callback_function_sum : %s (%d)",
g_warning ("Unimplemented value->type in callback_function_sum: %s (%d)",
(value->type == VALUE_CELLRANGE) ? "CELLRANGE" :
(value->type == VALUE_ARRAY) ? "ARRAY" :
"UNKOWN!", value->type);
......
......@@ -497,7 +497,7 @@ gnumeric_fixed (struct FunctionDefinition *i,
*error_string = _("Invalid thousands separator");
return NULL;
*/
} else if (dec <= 0) { /* no decimal point : just round and pad 0's */
} else if (dec <= 0) { /* no decimal point: just round and pad 0's */
dec *= -1;
num /= pow(10, dec);
if (num < 1 && num > -1) {
......
......@@ -202,7 +202,7 @@ cell_comment_destroy (Cell *cell)
gtk_timeout_remove (comment->timer_tag);
if (comment->window)
gtk_object_unref (GTK_OBJECT (comment->window));
gtk_object_destroy (GTK_OBJECT (comment->window));
for (l = comment->realized_list; l; l = l->next)
gtk_object_unref (l->data);
......@@ -327,7 +327,7 @@ cell_comment_unrealize (Cell *cell)
for (l = cell->comment->realized_list; l; l = l->next){
GnomeCanvasItem *o = l->data;
gtk_object_unref (GTK_OBJECT (o));
gtk_object_destroy (GTK_OBJECT (o));
}
g_list_free (cell->comment->realized_list);
cell->comment->realized_list = NULL;
......
......@@ -5,8 +5,8 @@
* Miguel de Icaza (miguel@gnu.org)
*
* FIXME:
* When the new GTK+ and gnome-libs is released remove all of the
* compatibility code
* I would like to have a global selection instead of the per-sheet/workbook
* clipboard, it would clean up a few code spots.
*/
#include <config.h>
#include <gnome.h>
......@@ -121,7 +121,7 @@ do_clipboard_paste_cell_region (CellRegion *region, Sheet *dest_sheet,
CellCopyList *l;
GList *deps;
int formulas = 0;
int col, row;
int col, row, col_inc, row_inc;
/* clear the region where we will paste */
if (paste_flags & (PASTE_VALUES | PASTE_FORMULAS))
......@@ -138,15 +138,28 @@ do_clipboard_paste_cell_region (CellRegion *region, Sheet *dest_sheet,
dest_row + paste_height - 1);
/* Paste each element */
for (col = 0; col < paste_width; col += region->cols){
for (row = 0; row < paste_height; row += region->rows){
if (paste_flags & PASTE_TRANSPOSE){
col_inc = region->rows;
row_inc = region->cols;
} else {
col_inc = region->cols;
row_inc = region->rows;
}
for (col = 0; col < paste_width; col += col_inc){
for (row = 0; row < paste_height; row += row_inc){
for (l = region->list; l; l = l->next){
CellCopy *c_copy = l->data;
int target_col, target_row;
target_col = col + dest_col + c_copy->col_offset;
target_row = row + dest_row + c_copy->row_offset;
if (paste_flags & PASTE_TRANSPOSE){
target_col = col + dest_col + c_copy->row_offset;
target_row = row + dest_row + c_copy->col_offset;
} else {
target_col = col + dest_col + c_copy->col_offset;
target_row = row + dest_row + c_copy->row_offset;
}
if (target_col > dest_col + paste_width - 1)
continue;
......@@ -274,9 +287,21 @@ sheet_paste_selection (Sheet *sheet, CellRegion *content, SheetSelection *ss, cl
else
paste_height = content->rows;
end_col = pc->dest_col + paste_width - 1;
end_row = pc->dest_row + paste_height - 1;
if (pc->paste_flags & PASTE_TRANSPOSE){
int t;
end_col = pc->dest_col + paste_height - 1;
end_row = pc->dest_row + paste_width - 1;
/* Swap the paste dimensions for transposing */
t = paste_height;
paste_height = paste_width;
paste_width = t;
} else {
end_col = pc->dest_col + paste_width - 1;
end_row = pc->dest_row + paste_height - 1;
}
/* Do the actual paste operation */
do_clipboard_paste_cell_region (
content, sheet,
......
......@@ -10,12 +10,15 @@ enum {
PASTE_OPER_ADD = 1 << 3,
PASTE_OPER_SUB = 1 << 4,
PASTE_OPER_MULT = 1 << 5,
PASTE_OPER_DIV = 1 << 6
PASTE_OPER_DIV = 1 << 6,
/* Whether the paste transposes or not */
PASTE_TRANSPOSE = 1 << 7
};
#define PASTE_ALL_TYPES (PASTE_FORMULAS | PASTE_VALUES | PASTE_FORMATS)
#define PASTE_DEFAULT PASTE_ALL_TYPES
#define PASTE_OPER_MASK (PASTE_OPER_ADD | PASTE_OPER_SUB | PASTE_OPER_MULT | PASTE_OPER_DIV)
#define PASTE_OPER_MASK (PASTE_OPER_ADD | PASTE_OPER_SUB | PASTE_OPER_MULT | PASTE_OPER_DIV)
CellRegion *clipboard_copy_cell_range (Sheet *sheet,
int start_col, int start_row,
......
......@@ -12,8 +12,6 @@
#define GNUMERIC_COMPLEX_IMPLEMENTATION
#include "complex.h"
/* ------------------------------------------------------------------------- */
char *
complex_to_string (const complex_t *src, const char *reformat,
const char *imformat, char imunit)
......@@ -59,8 +57,6 @@ complex_to_string (const complex_t *src, const char *reformat,
return res;
}
/* ------------------------------------------------------------------------- */
static int
is_unit_imaginary (const char *src, float_t *im, char *imunit)
{
......@@ -131,4 +127,3 @@ complex_from_string (complex_t *dst, const char *src, char *imunit)
return -1;
}
/* ------------------------------------------------------------------------- */
......@@ -398,7 +398,7 @@ void dialog_cell_sort(Workbook * inwb, Sheet * sheet)
while (sort_flow.retry || sort_flow.force_redisplay);
if (sort_flow.dialog)
gtk_object_unref (GTK_OBJECT(sort_flow.dialog));
gtk_object_destroy (GTK_OBJECT(sort_flow.dialog));
for (lp = 0; lp < sort_flow.num_clause; lp++)
order_box_destroy (sort_flow.clauses[lp]);
......
......@@ -201,6 +201,6 @@ dialog_function_select (Workbook *wb)
ans = &cat->functions[selector_state.selected_func];
}
gtk_object_unref (GTK_OBJECT (dialog));
gtk_object_destroy (GTK_OBJECT (dialog));
return ans;
}
......@@ -352,7 +352,7 @@ dialog_function_wizard (Workbook *wb, FunctionDefinition *fd)
if (gnome_dialog_run (GNOME_DIALOG(dialog)) == 0)
ans = get_text_value (&state);
gtk_object_unref (GTK_OBJECT (dialog));
gtk_object_destroy (GTK_OBJECT (dialog));
tokenized_help_destroy (state.tok);
return ans;
}
......@@ -45,14 +45,21 @@ enable_op_group (GtkWidget *widget, GtkWidget *group)
gtk_widget_set_sensitive (group, TRUE);
}
static void
transpose_cb (GtkToggleButton *widget, gboolean *transpose_b)
{
*transpose_b = widget->active;
}
int
dialog_paste_special (Workbook *wb)
{
GtkWidget *dialog, *hbox;
GtkWidget *f1, *f1v, *f2, *f2v;
GtkWidget *f1, *f1v, *f2, *f2v, *cb;
GSList *group_type, *group_ops;
int result, i;
int v;
gboolean do_transpose = FALSE;
dialog = gnome_dialog_new (_("Paste special"),
GNOME_STOCK_BUTTON_OK,
......@@ -93,11 +100,16 @@ dialog_paste_special (Workbook *wb)
group_ops = GTK_RADIO_BUTTON (r)->group;
gtk_box_pack_start_defaults (GTK_BOX (f2v), r);
}
cb = gtk_check_button_new_with_label (_("Transpose"));
gtk_signal_connect (
GTK_OBJECT (cb), "toggled",
GTK_SIGNAL_FUNC (transpose_cb), &do_transpose);
hbox = gtk_hbox_new (TRUE, 0);
gtk_box_pack_start_defaults (GTK_BOX (hbox), f1);
gtk_box_pack_start_defaults (GTK_BOX (hbox), f2);
gtk_box_pack_start_defaults (GTK_BOX (hbox), cb);
gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dialog)->vbox), hbox, TRUE, TRUE, 0);
gtk_widget_show_all (hbox);
......@@ -109,7 +121,8 @@ dialog_paste_special (Workbook *wb)
/* If closed with the window manager, cancel */
if (v == -1)
return 0;
result = 0;
/* Fetch the results */
if (v == 0){
result = 0;
......@@ -154,8 +167,10 @@ dialog_paste_special (Workbook *wb)
break;
}
}
if (do_transpose)
result |= PASTE_TRANSPOSE;
}
gtk_object_unref (GTK_OBJECT (dialog));
gtk_object_destroy (GTK_OBJECT (dialog));
return result;
}
......@@ -183,7 +183,7 @@ dialog_solver_options (Workbook *wb, Sheet *sheet)
sheet->solver_parameters.options.automatic_scaling = 0;
sheet->solver_parameters.options.show_iteration_results = 0;
gtk_object_unref (GTK_OBJECT (dialog));
gtk_object_destroy (GTK_OBJECT (dialog));
}
......@@ -247,7 +247,7 @@ add_dialog:
selection = gnome_dialog_run (GNOME_DIALOG (dialog));
if (selection == 1) {
gtk_object_unref (GTK_OBJECT (dialog));
gtk_object_destroy (GTK_OBJECT (dialog));
return;
}
......@@ -300,7 +300,7 @@ add_dialog:
if (selection == 2)
goto add_dialog;
gtk_object_unref (GTK_OBJECT (dialog));
gtk_object_destroy (GTK_OBJECT (dialog));
}
......
......@@ -398,7 +398,7 @@ void dialog_cell_sort(Workbook * inwb, Sheet * sheet)
while (sort_flow.retry || sort_flow.force_redisplay);
if (sort_flow.dialog)
gtk_object_unref (GTK_OBJECT(sort_flow.dialog));
gtk_object_destroy (GTK_OBJECT(sort_flow.dialog));
for (lp = 0; lp < sort_flow.num_clause; lp++)
order_box_destroy (sort_flow.clauses[lp]);
......
......@@ -352,7 +352,7 @@ dialog_function_wizard (Workbook *wb, FunctionDefinition *fd)
if (gnome_dialog_run (GNOME_DIALOG(dialog)) == 0)
ans = get_text_value (&state);
gtk_object_unref (GTK_OBJECT (dialog));
gtk_object_destroy (GTK_OBJECT (dialog));
tokenized_help_destroy (state.tok);
return ans;
}
......@@ -201,6 +201,6 @@ dialog_function_select (Workbook *wb)
ans = &cat->functions[selector_state.selected_func];
}
gtk_object_unref (GTK_OBJECT (dialog));
gtk_object_destroy (GTK_OBJECT (dialog));
return ans;
}
......@@ -352,7 +352,7 @@ dialog_function_wizard (Workbook *wb, FunctionDefinition *fd)
if (gnome_dialog_run (GNOME_DIALOG(dialog)) == 0)
ans = get_text_value (&state);
gtk_object_unref (GTK_OBJECT (dialog));
gtk_object_destroy (GTK_OBJECT (dialog));
tokenized_help_destroy (state.tok);
return ans;
}
......@@ -45,14 +45,21 @@ enable_op_group (GtkWidget *widget, GtkWidget *group)
gtk_widget_set_sensitive (group, TRUE);
}
static void
transpose_cb (GtkToggleButton *widget, gboolean *transpose_b)
{
*transpose_b = widget->active;
}
int
dialog_paste_special (Workbook *wb)
{
GtkWidget *dialog, *hbox;
GtkWidget *f1, *f1v, *f2, *f2v;
GtkWidget *f1, *f1v, *f2, *f2v, *cb;
GSList *group_type, *group_ops;
int result, i;
int v;
gboolean do_transpose = FALSE;
dialog = gnome_dialog_new (_("Paste special"),
GNOME_STOCK_BUTTON_OK,
......@@ -93,11 +100,16 @@ dialog_paste_special (Workbook *wb)
group_ops = GTK_RADIO_BUTTON (r)->group;
gtk_box_pack_start_defaults (GTK_BOX (f2v), r);
}
cb = gtk_check_button_new_with_label (_("Transpose"));
gtk_signal_connect (
GTK_OBJECT (cb), "toggled",
GTK_SIGNAL_FUNC (transpose_cb), &do_transpose);
hbox = gtk_hbox_new (TRUE, 0);
gtk_box_pack_start_defaults (GTK_BOX (hbox), f1);
gtk_box_pack_start_defaults (GTK_BOX (hbox), f2);
gtk_box_pack_start_defaults (GTK_BOX (hbox), cb);
gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dialog)->vbox), hbox, TRUE, TRUE, 0);
gtk_widget_show_all (hbox);
......@@ -109,7 +121,8 @@ dialog_paste_special (Workbook *wb)
/* If closed with the window manager, cancel */
if (v == -1)
return 0;
result = 0;
/* Fetch the results */
if (v == 0){
result = 0;
......@@ -154,8 +167,10 @@ dialog_paste_special (Workbook *wb)
break;
}
}
if (do_transpose)
result |= PASTE_TRANSPOSE;
}
gtk_object_unref (GTK_OBJECT (dialog));
gtk_object_destroy (GTK_OBJECT (dialog));
return result;
}
......@@ -183,7 +183,7 @@ dialog_solver_options (Workbook *wb, Sheet *sheet)
sheet->solver_parameters.options.automatic_scaling = 0;
sheet->solver_parameters.options.show_iteration_results = 0;
gtk_object_unref (GTK_OBJECT (dialog));
gtk_object_destroy (GTK_OBJECT (dialog));
}
......@@ -247,7 +247,7 @@ add_dialog:
selection = gnome_dialog_run (GNOME_DIALOG (dialog));
if (selection == 1) {
gtk_object_unref (GTK_OBJECT (dialog));
gtk_object_destroy (GTK_OBJECT (dialog));
return;
}
......@@ -300,7 +300,7 @@ add_dialog:
if (selection == 2)
goto add_dialog;
gtk_object_unref (GTK_OBJECT (dialog));
gtk_object_destroy (GTK_OBJECT (dialog));
}
......
......@@ -13,13 +13,13 @@ typedef struct _CellRef CellRef;
/* Some utility constants to make sure we all spell correctly */
/* TODO : These should really be const, but can't until error_string changes */
extern char * gnumeric_err_NULL;
extern char * gnumeric_err_DIV0;
extern char * gnumeric_err_VALUE;
extern char * gnumeric_err_REF;
extern char * gnumeric_err_NAME;
extern char * gnumeric_err_NUM;
extern char * gnumeric_err_NA;
extern char *gnumeric_err_NULL;
extern char *gnumeric_err_DIV0;
extern char *gnumeric_err_VALUE;
extern char *gnumeric_err_REF;
extern char *gnumeric_err_NAME;
extern char *gnumeric_err_NUM;
extern char *gnumeric_err_NA;
typedef enum {
OPER_EQUAL, /* Compare value equal */
......
......@@ -1302,7 +1302,7 @@ callback_function_sum (Sheet *sheet, Value *value,
break;
default:
g_warning ("Unimplemented value->type in callback_function_sum : %s (%d)",
g_warning ("Unimplemented value->type in callback_function_sum: %s (%d)",
(value->type == VALUE_CELLRANGE) ? "CELLRANGE" :
(value->type == VALUE_ARRAY) ? "ARRAY" :
"UNKOWN!", value->type);
......
......@@ -497,7 +497,7 @@ gnumeric_fixed (struct FunctionDefinition *i,
*error_string = _("Invalid thousands separator");
return NULL;
*/
} else if (dec <= 0) { /* no decimal point : just round and pad 0's */
} else if (dec <= 0) { /* no decimal point: just round and pad 0's */
dec *= -1;
num /= pow(10, dec);
if (num < 1 && num > -1) {
......
......@@ -14,11 +14,20 @@
#include "func.h"
#include "eval.h"
/*
* Error constants used to display error messages.
*/
char *gnumeric_err_NULL;
char *gnumeric_err_DIV0;
char *gnumeric_err_VALUE;
char *gnumeric_err_REF;
char *gnumeric_err_NAME;
char *gnumeric_err_NUM;
char *gnumeric_err_NA;
/* The list of categories */
static GPtrArray *categories = NULL;
/* ------------------------------------------------------------------------- */
typedef struct {
FunctionIterateCallback callback;
void *closure;
......@@ -163,9 +172,6 @@ function_iterate_argument_values (Sheet *sheet,
return result;
}
/* ------------------------------------------------------------------------- */
GPtrArray *
function_categories_get (void)
{
......@@ -289,17 +295,6 @@ functions_init (void)
install_symbols (information_functions, _("Information"));
}
/* Initialize temporarily with statics. The real versions from the locale
* will be setup in constants_init
*/
char * gnumeric_err_NULL = "#NULL!";
char * gnumeric_err_DIV0 = "#DIV/0!";
char * gnumeric_err_VALUE = "#VALUE!";
char * gnumeric_err_REF = "#REF!";
char * gnumeric_err_NAME = "#NAME?";
char * gnumeric_err_NUM = "#NUM!";
char * gnumeric_err_NA = "#N/A";
void
constants_init (void)
{
......
......@@ -1302,7 +1302,7 @@ callback_function_sum (Sheet *sheet, Value *value,
break;
default:
g_warning ("Unimplemented value->type in callback_function_sum : %s (%d)",
g_warning ("Unimplemented value->type in callback_function_sum: %s (%d)",
(value->type == VALUE_CELLRANGE) ? "CELLRANGE" :
(value->type == VALUE_ARRAY) ? "ARRAY" :
"UNKOWN!", value->type);
......
......@@ -497,7 +497,7 @@ gnumeric_fixed (struct F