gnumeric r16908 - in trunk: . src/dialogs
- From: guelzow svn gnome org
- To: svn-commits-list gnome org
- Subject: gnumeric r16908 - in trunk: . src/dialogs
- Date: Mon, 20 Oct 2008 21:17:35 +0000 (UTC)
Author: guelzow
Date: Mon Oct 20 21:17:35 2008
New Revision: 16908
URL: http://svn.gnome.org/viewvc/gnumeric?rev=16908&view=rev
Log:
2008-10-20 Andreas J. Guelzow <aguelzow pyrshep ca>
* dialog-sheet-order.c (cb_delete_clicked): make sure at
least one sheet is still visible
Modified:
trunk/NEWS
trunk/src/dialogs/ChangeLog
trunk/src/dialogs/dialog-sheet-order.c
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Mon Oct 20 21:17:35 2008
@@ -4,6 +4,7 @@
* Change sheet manage dialog into an instant-apply dialog
* Implemented sheet duplication in manage sheet dialog [#128160]
* Do not allow the last sheet to be deleted [#557083]
+ * Do not allow the last visible sheet to be deleted [#557145]
Jody:
* Display top-left when selecting a rel ref to a merged region.
Modified: trunk/src/dialogs/dialog-sheet-order.c
==============================================================================
--- trunk/src/dialogs/dialog-sheet-order.c (original)
+++ trunk/src/dialogs/dialog-sheet-order.c Mon Oct 20 21:17:35 2008
@@ -788,11 +788,19 @@
WorkbookSheetState *old_state;
WorkbookControl *wbc = WORKBOOK_CONTROL (state->wbcg);
Workbook *wb = wb_control_get_workbook (wbc);
+ gboolean is_visible;
if (gtk_tree_selection_get_selected (selection, NULL, &sel_iter)) {
gtk_tree_model_get (GTK_TREE_MODEL (state->model), &sel_iter,
SHEET_POINTER, &sheet,
+ SHEET_VISIBLE, &is_visible,
-1);
+ if (is_visible && sheet_order_cnt_visible (state) <= 1) {
+ go_gtk_notice_dialog (GTK_WINDOW (state->dialog), GTK_MESSAGE_ERROR,
+ _("At least one sheet must remain visible!"));
+ return;
+ }
+
gtk_list_store_remove (state->model, &sel_iter);
g_signal_handler_block (G_OBJECT (wb),
state->sheet_order_changed_listener);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]