Commit 7cdbd2d7 authored by Morten Welinder's avatar Morten Welinder Committed by Morten Welinder

Fix type screwup causing crashes when changing colours.

2005-08-23  Morten Welinder  <terra@gnome.org>

	* dialog-sheet-order.c (cb_ok_clicked): Fix type screwup causing
	crashes when changing colours.
parent 6faf9bd1
......@@ -11,6 +11,7 @@ Morten:
Update to lp_solve 5.5 in the process.
* Fix dependency crash. [Part of #314207]
* Fix theming bug. [#307783]
* Fix crash related to changing colours of sheet tabs.
--------------------------------------------------------------------------
Gnumeric 1.5.3
......
2005-08-23 Morten Welinder <terra@gnome.org>
* dialog-sheet-order.c (cb_ok_clicked): Fix type screwup causing
crashes when changing colours.
* dialog-solver.c (dialog_init): Handle button alignment here, not
in the .glade file. Fixes #307783.
......
......@@ -720,6 +720,11 @@ cb_ok_clicked (G_GNUC_UNUSED GtkWidget *ignore, SheetManager *state)
if (is_deleted)
workbook_sheet_delete (this_sheet);
else {
GnmColor *gnmfore =
fore ? style_color_new_gdk (fore) : NULL;
GnmColor *gnmback =
back ? style_color_new_gdk (back) : NULL;
if (!this_sheet)
this_sheet = workbook_sheet_add (wb, i, FALSE);
......@@ -727,11 +732,14 @@ cb_ok_clicked (G_GNUC_UNUSED GtkWidget *ignore, SheetManager *state)
"protected", is_locked,
"visibility", is_visible ? GNM_SHEET_VISIBILITY_VISIBLE : GNM_SHEET_VISIBILITY_HIDDEN,
"name", *new_name ? new_name : old_name,
"tab-foreground", fore,
"tab-background", back,
"tab-foreground", gnmfore,
"tab-background", gnmback,
"text-is-rtl", is_rtl,
NULL);
style_color_unref (gnmfore);
style_color_unref (gnmback);
if (this_sheet->index_in_wb != i)
workbook_sheet_move (this_sheet, i - this_sheet->index_in_wb);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment