gnumeric r17187 - in trunk: . src/dialogs
- From: guelzow svn gnome org
- To: svn-commits-list gnome org
- Subject: gnumeric r17187 - in trunk: . src/dialogs
- Date: Thu, 12 Mar 2009 05:12:22 +0000 (UTC)
Author: guelzow
Date: Thu Mar 12 05:12:22 2009
New Revision: 17187
URL: http://svn.gnome.org/viewvc/gnumeric?rev=17187&view=rev
Log:
2008-03-11 Andreas J. Guelzow <aguelzow pyrshep ca>
* dialog-goto-cell.c (GotoState): fields added
(cb_dialog_goto_free): disconnect handlers
(cb_sheet_order_changed): new
(cb_sheet_deleted): new
(cb_sheet_added): new
(dialog_goto_init): connect handlers
Modified:
trunk/NEWS
trunk/src/dialogs/ChangeLog
trunk/src/dialogs/dialog-goto-cell.c
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Thu Mar 12 05:12:22 2009
@@ -8,6 +8,8 @@
* Don't switch sheets when widgets are adjusted. [#574734]
* Fix printing of rotated text (negative angles or non-default
alignment). [#574813]
+ * Remove crash potential under goto dialog with multiple views.
+ Part of [#364291]
Morten:
* Fix multihead issues with cell comments.
Modified: trunk/src/dialogs/dialog-goto-cell.c
==============================================================================
--- trunk/src/dialogs/dialog-goto-cell.c (original)
+++ trunk/src/dialogs/dialog-goto-cell.c Thu Mar 12 05:12:22 2009
@@ -55,6 +55,10 @@
GtkTreeStore *model;
GtkTreeView *treeview;
GtkTreeSelection *selection;
+
+ gulong sheet_order_changed_listener;
+ gulong sheet_added_listener;
+ gulong sheet_deleted_listener;
} GotoState;
enum {
@@ -68,6 +72,16 @@
static void
cb_dialog_goto_free (GotoState *state)
{
+ if (state->sheet_order_changed_listener)
+ g_signal_handler_disconnect (G_OBJECT (state->wb),
+ state->sheet_order_changed_listener);
+ if (state->sheet_added_listener)
+ g_signal_handler_disconnect (G_OBJECT (state->wb),
+ state->sheet_added_listener);
+ if (state->sheet_deleted_listener)
+ g_signal_handler_disconnect (G_OBJECT (state->wb),
+ state->sheet_deleted_listener);
+
if (state->gui != NULL)
g_object_unref (G_OBJECT (state->gui));
if (state->model != NULL)
@@ -211,6 +225,27 @@
}
+static void
+cb_sheet_order_changed (Workbook *wb, GotoState *state)
+{
+ dialog_goto_load_names (state);
+}
+
+static void
+cb_sheet_deleted (Workbook *wb, GotoState *state)
+{
+ dialog_goto_load_names (state);
+ cb_dialog_goto_update_sensitivity (NULL, state);
+}
+
+static void
+cb_sheet_added (Workbook *wb, GotoState *state)
+{
+ dialog_goto_load_names (state);
+ cb_dialog_goto_update_sensitivity (NULL, state);
+}
+
+
/**
* dialog_init:
* @state:
@@ -266,6 +301,17 @@
dialog_goto_load_names (state);
/* Finished set-up of treeview */
+ /* Listen for sheet changes */
+ state->sheet_order_changed_listener = g_signal_connect (G_OBJECT (state->wb),
+ "sheet_order_changed", G_CALLBACK (cb_sheet_order_changed),
+ state);
+ state->sheet_added_listener = g_signal_connect (G_OBJECT (state->wb),
+ "sheet_added", G_CALLBACK (cb_sheet_added),
+ state);
+ state->sheet_deleted_listener = g_signal_connect (G_OBJECT (state->wb),
+ "sheet_deleted", G_CALLBACK (cb_sheet_deleted),
+ state);
+
state->close_button = glade_xml_get_widget (state->gui, "close_button");
g_signal_connect (G_OBJECT (state->close_button),
"clicked",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]