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

Process the return value from gnome_dialog_run correctly as well. (ie we

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

	* src/dialog-cell-comment.c (dialog_cell_comment): Process the
	return value from gnome_dialog_run correctly as well.  (ie we
	should catch the return value -1 as the "user closed dialog box"
 	message and avoid destroying the dialog box ourselves).

	* src/item-grid.c (context_paste_special_cmd): Handle a cancel
	operation from the dialog_paste_special dialog box.

	* 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
	canvas fill_stipple feature instead of using the hack of creating
	the bitmap and setting the stipple on the realize handler.

1999-06-01  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* po/hr.po: Added croat translation from Vladimir Vuksan
	<vuksan@cs.unm.edu>.
parent 2b85fde0
1999-06-12 Miguel de Icaza <miguel@gnu.org>
* src/dialog-cell-comment.c (dialog_cell_comment): Process the
return value from gnome_dialog_run correctly as well. (ie we
should catch the return value -1 as the "user closed dialog box"
message and avoid destroying the dialog box ourselves).
* src/item-grid.c (context_paste_special_cmd): Handle a cancel
operation from the dialog_paste_special dialog box.
* 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
canvas fill_stipple feature instead of using the hack of creating
the bitmap and setting the stipple on the realize handler.
1999-06-01 Miguel de Icaza <miguel@nuclecu.unam.mx>
* po/hr.po: Added croat translation from Vladimir Vuksan
<vuksan@cs.unm.edu>.
1999-06-13 Jukka-Pekka Iivonen <iivonen@iki.fi>
* samples/mathfuns.xls: New test file for math functions.
......
1999-06-12 Miguel de Icaza <miguel@gnu.org>
* src/dialog-cell-comment.c (dialog_cell_comment): Process the
return value from gnome_dialog_run correctly as well. (ie we
should catch the return value -1 as the "user closed dialog box"
message and avoid destroying the dialog box ourselves).
* src/item-grid.c (context_paste_special_cmd): Handle a cancel
operation from the dialog_paste_special dialog box.
* 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
canvas fill_stipple feature instead of using the hack of creating
the bitmap and setting the stipple on the realize handler.
1999-06-01 Miguel de Icaza <miguel@nuclecu.unam.mx>
* po/hr.po: Added croat translation from Vladimir Vuksan
<vuksan@cs.unm.edu>.
1999-06-13 Jukka-Pekka Iivonen <iivonen@iki.fi>
* samples/mathfuns.xls: New test file for math functions.
......
1999-06-12 Miguel de Icaza <miguel@gnu.org>
* src/dialog-cell-comment.c (dialog_cell_comment): Process the
return value from gnome_dialog_run correctly as well. (ie we
should catch the return value -1 as the "user closed dialog box"
message and avoid destroying the dialog box ourselves).
* src/item-grid.c (context_paste_special_cmd): Handle a cancel
operation from the dialog_paste_special dialog box.
* 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
canvas fill_stipple feature instead of using the hack of creating
the bitmap and setting the stipple on the realize handler.
1999-06-01 Miguel de Icaza <miguel@nuclecu.unam.mx>
* po/hr.po: Added croat translation from Vladimir Vuksan
<vuksan@cs.unm.edu>.
1999-06-13 Jukka-Pekka Iivonen <iivonen@iki.fi>
* samples/mathfuns.xls: New test file for math functions.
......
1999-06-12 Miguel de Icaza <miguel@gnu.org>
* src/dialog-cell-comment.c (dialog_cell_comment): Process the
return value from gnome_dialog_run correctly as well. (ie we
should catch the return value -1 as the "user closed dialog box"
message and avoid destroying the dialog box ourselves).
* src/item-grid.c (context_paste_special_cmd): Handle a cancel
operation from the dialog_paste_special dialog box.
* 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
canvas fill_stipple feature instead of using the hack of creating
the bitmap and setting the stipple on the realize handler.
1999-06-01 Miguel de Icaza <miguel@nuclecu.unam.mx>
* po/hr.po: Added croat translation from Vladimir Vuksan
<vuksan@cs.unm.edu>.
1999-06-13 Jukka-Pekka Iivonen <iivonen@iki.fi>
* samples/mathfuns.xls: New test file for math functions.
......
......@@ -38,6 +38,10 @@ GNOME Spread Sheet task list
* Auditing
Write the sheet auditing code.
* Searching
Searching text on the spreadhseet.
* EDITION
** Object Clipboard
......
......@@ -38,7 +38,8 @@ dnl
dnl Check doc/translating.sgml for a description of how to translate
dnl and why we have so many translations.
dnl
ALL_LINGUAS="cs de en_GB es es_DO es_GT es_HN es_MX es_PA es_PE es_SV fr hu it ja ko no pt ru pl sk zh_TW.Big5"
ALL_LINGUAS="cs de en_GB es es_DO es_GT es_HN es_MX es_PA es_PE es_SV fr hu hr it ja ko no pt ru pl sk"
ALL_LINGUAS="cs de en_GB es es_DO es_GT es_HN es_MX es_PA es_PE es_SV fr hu hr it ja ko no pt ru pl sk zh_TW.Big5"
AM_GNU_GETTEXT
AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
......
This diff is collapsed.
......@@ -201,10 +201,10 @@ cell_comment_destroy (Cell *cell)
gtk_timeout_remove (comment->timer_tag);
if (comment->window)
gtk_object_destroy (GTK_OBJECT (comment->window));
gtk_object_unref (GTK_OBJECT (comment->window));
for (l = comment->realized_list; l; l = l->next)
gtk_object_destroy (l->data);
gtk_object_unref (l->data);
g_free (comment);
}
......@@ -279,7 +279,7 @@ cell_comment_clicked (GnomeCanvasItem *item, GdkEvent *event, Cell *cell)
case GDK_LEAVE_NOTIFY:
cell_comment_cancel_timer (cell);
if (cell->comment->window){
gtk_object_destroy (GTK_OBJECT (cell->comment->window));
gtk_object_unref (GTK_OBJECT (cell->comment->window));
cell->comment->window = NULL;
}
break;
......@@ -325,7 +325,7 @@ cell_comment_unrealize (Cell *cell)
for (l = cell->comment->realized_list; l; l = l->next){
GnomeCanvasItem *o = l->data;
gtk_object_destroy (GTK_OBJECT (o));
gtk_object_unref (GTK_OBJECT (o));
}
g_list_free (cell->comment->realized_list);
cell->comment->realized_list = NULL;
......
......@@ -16,6 +16,7 @@ dialog_cell_comment (Workbook *wb, Cell *cell)
{
GtkWidget *dialog;
GtkWidget *text;
int v;
g_return_if_fail (wb != NULL);
g_return_if_fail (cell != NULL);
......@@ -43,7 +44,11 @@ dialog_cell_comment (Workbook *wb, Cell *cell)
gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
gtk_widget_grab_focus (text);
if (gnome_dialog_run (GNOME_DIALOG (dialog)) == 0){
v = gnome_dialog_run (GNOME_DIALOG (dialog));
if (v == -1)
return;
if (v == 0){
char *comment;
comment = gtk_editable_get_chars (GTK_EDITABLE (text), 0, -1);
......@@ -54,5 +59,5 @@ dialog_cell_comment (Workbook *wb, Cell *cell)
}
}
gtk_object_destroy (GTK_OBJECT (dialog));
gtk_object_unref (GTK_OBJECT (dialog));
}
......@@ -398,8 +398,8 @@ void dialog_cell_sort(Workbook * inwb, Sheet * sheet)
while (sort_flow.retry || sort_flow.force_redisplay);
if (sort_flow.dialog)
gtk_object_destroy(GTK_OBJECT(sort_flow.dialog));
gtk_object_unref (GTK_OBJECT(sort_flow.dialog));
for (lp = 0; lp < sort_flow.num_clause; lp++)
order_box_destroy(sort_flow.clauses[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_destroy (GTK_OBJECT (dialog));
gtk_object_unref (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_destroy (GTK_OBJECT (dialog));
gtk_object_unref (GTK_OBJECT (dialog));
tokenized_help_destroy (state.tok);
return ans;
}
......@@ -52,6 +52,7 @@ dialog_paste_special (Workbook *wb)
GtkWidget *f1, *f1v, *f2, *f2v;
GSList *group_type, *group_ops;
int result, i;
int v;
dialog = gnome_dialog_new (_("Paste special"),
GNOME_STOCK_BUTTON_OK,
......@@ -103,54 +104,58 @@ dialog_paste_special (Workbook *wb)
/* Run the dialog */
gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
gnome_dialog_run (GNOME_DIALOG (dialog));
v = gnome_dialog_run (GNOME_DIALOG (dialog));
/* Fetch the results */
result = 0;
i = gtk_radio_group_get_selected (group_type);
switch (i){
case 0: /* all */
result = PASTE_ALL_TYPES;
break;
case 1: /* formulas */
result = PASTE_FORMULAS;
break;
/* If closed with the window manager, cancel */
if (v == -1)
return 0;
case 2: /* values */
result = PASTE_VALUES;
break;
/* Fetch the results */
if (v == 0){
result = 0;
i = gtk_radio_group_get_selected (group_type);
case 3: /* formats */
result = PASTE_FORMATS;
break;
}
/* If it was not just formats, check operation */
if (i != 3){
i = gtk_radio_group_get_selected (group_ops);
switch (i){
case 1: /* Add */
result |= PASTE_OPER_ADD;
case 0: /* all */
result = PASTE_ALL_TYPES;
break;
case 2:
result |= PASTE_OPER_SUB;
case 1: /* formulas */
result = PASTE_FORMULAS;
break;
case 3:
result |= PASTE_OPER_MULT;
case 2: /* values */
result = PASTE_VALUES;
break;
case 4:
result |= PASTE_OPER_DIV;
case 3: /* formats */
result = PASTE_FORMATS;
break;
}
}
gtk_object_destroy (GTK_OBJECT (dialog));
/* If it was not just formats, check operation */
if (i != 3){
i = gtk_radio_group_get_selected (group_ops);
switch (i){
case 1: /* Add */
result |= PASTE_OPER_ADD;
break;
case 2:
result |= PASTE_OPER_SUB;
break;
case 3:
result |= PASTE_OPER_MULT;
break;
case 4:
result |= PASTE_OPER_DIV;
break;
}
}
}
gtk_object_unref (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_destroy (GTK_OBJECT (dialog));
gtk_object_unref (GTK_OBJECT (dialog));
}
......@@ -247,7 +247,7 @@ add_dialog:
selection = gnome_dialog_run (GNOME_DIALOG (dialog));
if (selection == 1) {
gtk_object_destroy (GTK_OBJECT (dialog));
gtk_object_unref (GTK_OBJECT (dialog));
return;
}
......@@ -300,7 +300,7 @@ add_dialog:
if (selection == 2)
goto add_dialog;
gtk_object_destroy (GTK_OBJECT (dialog));
gtk_object_unref (GTK_OBJECT (dialog));
}
......
......@@ -16,6 +16,7 @@ dialog_cell_comment (Workbook *wb, Cell *cell)
{
GtkWidget *dialog;
GtkWidget *text;
int v;
g_return_if_fail (wb != NULL);
g_return_if_fail (cell != NULL);
......@@ -43,7 +44,11 @@ dialog_cell_comment (Workbook *wb, Cell *cell)
gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
gtk_widget_grab_focus (text);
if (gnome_dialog_run (GNOME_DIALOG (dialog)) == 0){
v = gnome_dialog_run (GNOME_DIALOG (dialog));
if (v == -1)
return;
if (v == 0){
char *comment;
comment = gtk_editable_get_chars (GTK_EDITABLE (text), 0, -1);
......@@ -54,5 +59,5 @@ dialog_cell_comment (Workbook *wb, Cell *cell)
}
}
gtk_object_destroy (GTK_OBJECT (dialog));
gtk_object_unref (GTK_OBJECT (dialog));
}
......@@ -398,8 +398,8 @@ void dialog_cell_sort(Workbook * inwb, Sheet * sheet)
while (sort_flow.retry || sort_flow.force_redisplay);
if (sort_flow.dialog)
gtk_object_destroy(GTK_OBJECT(sort_flow.dialog));
gtk_object_unref (GTK_OBJECT(sort_flow.dialog));
for (lp = 0; lp < sort_flow.num_clause; lp++)
order_box_destroy(sort_flow.clauses[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_destroy (GTK_OBJECT (dialog));
gtk_object_unref (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_destroy (GTK_OBJECT (dialog));
gtk_object_unref (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_destroy (GTK_OBJECT (dialog));
gtk_object_unref (GTK_OBJECT (dialog));
tokenized_help_destroy (state.tok);
return ans;
}
......@@ -52,6 +52,7 @@ dialog_paste_special (Workbook *wb)
GtkWidget *f1, *f1v, *f2, *f2v;
GSList *group_type, *group_ops;
int result, i;
int v;
dialog = gnome_dialog_new (_("Paste special"),
GNOME_STOCK_BUTTON_OK,
......@@ -103,54 +104,58 @@ dialog_paste_special (Workbook *wb)
/* Run the dialog */
gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
gnome_dialog_run (GNOME_DIALOG (dialog));
v = gnome_dialog_run (GNOME_DIALOG (dialog));
/* Fetch the results */
result = 0;
i = gtk_radio_group_get_selected (group_type);
switch (i){
case 0: /* all */
result = PASTE_ALL_TYPES;
break;
case 1: /* formulas */
result = PASTE_FORMULAS;
break;
/* If closed with the window manager, cancel */
if (v == -1)
return 0;
case 2: /* values */
result = PASTE_VALUES;
break;
/* Fetch the results */
if (v == 0){
result = 0;
i = gtk_radio_group_get_selected (group_type);
case 3: /* formats */
result = PASTE_FORMATS;
break;
}
/* If it was not just formats, check operation */
if (i != 3){
i = gtk_radio_group_get_selected (group_ops);
switch (i){
case 1: /* Add */
result |= PASTE_OPER_ADD;
case 0: /* all */
result = PASTE_ALL_TYPES;
break;
case 2:
result |= PASTE_OPER_SUB;
case 1: /* formulas */
result = PASTE_FORMULAS;
break;
case 3:
result |= PASTE_OPER_MULT;
case 2: /* values */
result = PASTE_VALUES;
break;
case 4:
result |= PASTE_OPER_DIV;
case 3: /* formats */
result = PASTE_FORMATS;
break;
}
}
gtk_object_destroy (GTK_OBJECT (dialog));
/* If it was not just formats, check operation */
if (i != 3){
i = gtk_radio_group_get_selected (group_ops);
switch (i){
case 1: /* Add */
result |= PASTE_OPER_ADD;
break;
case 2:
result |= PASTE_OPER_SUB;
break;
case 3:
result |= PASTE_OPER_MULT;
break;
case 4:
result |= PASTE_OPER_DIV;
break;
}
}
}
gtk_object_unref (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_destroy (GTK_OBJECT (dialog));
gtk_object_unref (GTK_OBJECT (dialog));
}
......@@ -247,7 +247,7 @@ add_dialog:
selection = gnome_dialog_run (GNOME_DIALOG (dialog));
if (selection == 1) {
gtk_object_destroy (GTK_OBJECT (dialog));
gtk_object_unref (GTK_OBJECT (dialog));
return;
}
......@@ -300,7 +300,7 @@ add_dialog:
if (selection == 2)
goto add_dialog;
gtk_object_destroy (GTK_OBJECT (dialog));
gtk_object_unref (GTK_OBJECT (dialog));
}
......
......@@ -337,7 +337,7 @@ gnumeric_sheet_stop_cell_selection (GnumericSheet *gsheet)
return;
gsheet->selecting_cell = FALSE;
gtk_object_destroy (GTK_OBJECT (gsheet->selection));
gtk_object_unref (GTK_OBJECT (gsheet->selection));
gsheet->selection = NULL;
}
......@@ -370,7 +370,7 @@ destroy_item_editor (GnumericSheet *gsheet)
{
g_return_if_fail (gsheet->item_editor);
gtk_object_destroy (GTK_OBJECT (gsheet->item_editor));
gtk_object_unref (GTK_OBJECT (gsheet->item_editor));
gsheet->item_editor = NULL;
}
......@@ -810,7 +810,8 @@ gnumeric_sheet_key_mode_object (GnumericSheet *gsheet, GdkEventKey *event)
case GDK_BackSpace:
case GDK_Delete:
gtk_object_destroy (GTK_OBJECT (sheet->current_object));
gtk_object_unref (GTK_OBJECT (sheet->current_object));
sheet->current_object = NULL;
sheet_set_mode_type (sheet, SHEET_MODE_SHEET);
break;
......
......@@ -337,7 +337,7 @@ gnumeric_sheet_stop_cell_selection (GnumericSheet *gsheet)
return;
gsheet->selecting_cell = FALSE;
gtk_object_destroy (GTK_OBJECT (gsheet->selection));
gtk_object_unref (GTK_OBJECT (gsheet->selection));
gsheet->selection = NULL;
}
......@@ -370,7 +370,7 @@ destroy_item_editor (GnumericSheet *gsheet)
{
g_return_if_fail (gsheet->item_editor);
gtk_object_destroy (GTK_OBJECT (gsheet->item_editor));
gtk_object_unref (GTK_OBJECT (gsheet->item_editor));
gsheet->item_editor = NULL;
}
......@@ -810,7 +810,8 @@ gnumeric_sheet_key_mode_object (GnumericSheet *gsheet, GdkEventKey *event)
case GDK_BackSpace:
case GDK_Delete:
gtk_object_destroy (GTK_OBJECT (sheet->current_object));
gtk_object_unref (GTK_OBJECT (sheet->current_object));
sheet->current_object = NULL;
sheet_set_mode_type (sheet, SHEET_MODE_SHEET);
break;
......
......@@ -507,7 +507,7 @@ item_bar_event (GnomeCanvasItem *item, GdkEvent *e)
item_bar->resize_pos,
item_bar->resize_width);
item_bar->resize_pos = -1;
gtk_object_destroy (item_bar->resize_guide);
gtk_object_unref (item_bar->resize_guide);
}
gnome_canvas_item_ungrab (item, e->button.time);
item_bar->start_selection = -1;
......
......@@ -658,7 +658,7 @@ item_cursor_drag_event (GnomeCanvasItem *item, GdkEvent *event)
case GDK_BUTTON_RELEASE:
gnome_canvas_item_ungrab (item, event->button.time);
item_cursor_do_drop (item_cursor, (GdkEventButton *) event);
gtk_object_destroy (GTK_OBJECT (item));
gtk_object_unref (GTK_OBJECT (item));
return TRUE;
case GDK_BUTTON_PRESS:
......@@ -729,7 +729,7 @@ item_cursor_autofill_event (GnomeCanvasItem *item, GdkEvent *event)
sheet_selection_append (sheet, item_cursor->base_col, item_cursor->base_row);
sheet_selection_extend_to (sheet, item_cursor->end_col, item_cursor->end_row);
gtk_object_destroy (GTK_OBJECT (item));
gtk_object_unref (GTK_OBJECT (item));
return TRUE;
}
......
......@@ -478,11 +478,12 @@ context_paste_special_cmd (GtkWidget *widget, ItemGrid *item_grid)