Commit a8a9b912 authored by Jody Goldberg's avatar Jody Goldberg

Add missed patch.

parent fb750b50
...@@ -2109,6 +2109,8 @@ gboolean ...@@ -2109,6 +2109,8 @@ gboolean
workbook_rename_sheet (Workbook *wb, const char *old_name, const char *new_name) workbook_rename_sheet (Workbook *wb, const char *old_name, const char *new_name)
{ {
Sheet *sheet; Sheet *sheet;
GtkNotebook *notebook;
int sheets, i;
g_return_val_if_fail (wb != NULL, FALSE); g_return_val_if_fail (wb != NULL, FALSE);
g_return_val_if_fail (old_name != NULL, FALSE); g_return_val_if_fail (old_name != NULL, FALSE);
...@@ -2127,6 +2129,25 @@ workbook_rename_sheet (Workbook *wb, const char *old_name, const char *new_name) ...@@ -2127,6 +2129,25 @@ workbook_rename_sheet (Workbook *wb, const char *old_name, const char *new_name)
g_hash_table_insert (wb->sheets, sheet->name, sheet); g_hash_table_insert (wb->sheets, sheet->name, sheet);
sheet_set_dirty (sheet, TRUE); sheet_set_dirty (sheet, TRUE);
/* Update the notebook label */
notebook = GTK_NOTEBOOK (wb->notebook);
sheets = workbook_sheet_count (wb);
for (i = 0; i < sheets; i++) {
Sheet *this_sheet;
GtkWidget *w;
w = gtk_notebook_get_nth_page (notebook, i);
this_sheet = gtk_object_get_data (GTK_OBJECT (w), "sheet");
if (this_sheet == sheet) {
gtk_notebook_set_tab_label_text
(notebook, w, new_name);
}
}
return TRUE; return TRUE;
} }
......
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