aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Kestner <mkestner@ximian.com>2003-05-17 05:58:33 +0800
committerMike Kestner <mkestner@src.gnome.org>2003-05-17 05:58:33 +0800
commitd09737dec4c5833000afca64595e0966d88ea03b (patch)
tree88d22dec4a819d61e53133607b7c3d594b31bdf2
parent2d6fce05747fd04985f9d842491c004b54bc039b (diff)
downloadgsoc2013-evolution-d09737dec4c5833000afca64595e0966d88ea03b.tar.gz
gsoc2013-evolution-d09737dec4c5833000afca64595e0966d88ea03b.tar.zst
gsoc2013-evolution-d09737dec4c5833000afca64595e0966d88ea03b.zip
block the signal that got us here until we're done to stop an infinite
2003-05-16 Mike Kestner <mkestner@ximian.com> * gal-view-collection.c (view_changed): block the signal that got us here until we're done to stop an infinite recursion. Fixes 43153. 2003-05-16 Mike Kestner <mkestner@ximian.com> * e-cell-text.c (invisible_finalize): kill (ect_stop_editing): destroy the invisible, not weak_unref (e_cell_text_view_get_invisible): don't weak_ref the invisible since we own its ref. 2003-05-16 Mike Kestner <mkestner@ximian.com> * e-table-item.c (eti_event): fix a couple timer checks * e-tree-table-adapter.c (update_node): Traverse POST order so that the parent nodes are at the head of the prepended list. Don't restore expanded state to nodes that aren't in the tree any longer. Hopefully fixes #42856. svn path=/trunk/; revision=21229
-rw-r--r--widgets/menus/gal-view-collection.c2
-rw-r--r--widgets/table/e-cell-text.c15
-rw-r--r--widgets/table/e-table-item.c4
-rw-r--r--widgets/table/e-tree-table-adapter.c5
4 files changed, 9 insertions, 17 deletions
diff --git a/widgets/menus/gal-view-collection.c b/widgets/menus/gal-view-collection.c
index 4ac0ae68dd..5e97419270 100644
--- a/widgets/menus/gal-view-collection.c
+++ b/widgets/menus/gal-view-collection.c
@@ -314,7 +314,9 @@ view_changed (GalView *view,
item->changed = TRUE;
item->ever_changed = TRUE;
+ g_signal_handler_block(G_OBJECT(item->view), item->view_changed_id);
gal_view_collection_changed(item->collection);
+ g_signal_handler_unblock(G_OBJECT(item->view), item->view_changed_id);
}
/* Use factory list to load a GalView file. */
diff --git a/widgets/table/e-cell-text.c b/widgets/table/e-cell-text.c
index 12cd9af482..90d8f7805e 100644
--- a/widgets/table/e-cell-text.c
+++ b/widgets/table/e-cell-text.c
@@ -250,14 +250,6 @@ ect_queue_redraw (ECellTextView *text_view, int view_col, int view_row)
view_col, view_row, view_col, view_row);
}
-static void
-invisible_finalize (gpointer data,
- GObject *invisible)
-{
- CellEdit *edit = data;
- edit->invisible = NULL;
-}
-
/*
* Shuts down the editing process
*/
@@ -277,9 +269,8 @@ ect_stop_editing (ECellTextView *text_view, gboolean commit)
old_text = edit->old_text;
text = edit->text;
- if (edit->invisible) {
- g_object_weak_unref (G_OBJECT (edit->invisible), invisible_finalize, edit);
- }
+ if (edit->invisible)
+ gtk_widget_destroy (edit->invisible);
if (edit->tep)
g_object_unref (edit->tep);
if (edit->primary_selection)
@@ -2215,8 +2206,6 @@ static GtkWidget *e_cell_text_view_get_invisible (CellEdit *edit)
g_signal_connect (invisible, "selection_received",
G_CALLBACK (_selection_received),
edit);
-
- g_object_weak_ref (G_OBJECT (invisible), invisible_finalize, edit);
}
return edit->invisible;
}
diff --git a/widgets/table/e-table-item.c b/widgets/table/e-table-item.c
index af88c5a889..bd6a8f3f67 100644
--- a/widgets/table/e-table-item.c
+++ b/widgets/table/e-table-item.c
@@ -2545,7 +2545,7 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
#ifdef DO_TOOLTIPS
if (!g_getenv ("GAL_DONT_DO_TOOLTIPS")) {
- if (eti->tooltip->timer > 0)
+ if (eti->tooltip->timer)
gtk_timeout_remove (eti->tooltip->timer);
eti->tooltip->col = col;
eti->tooltip->row = row;
@@ -2779,7 +2779,7 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
d(leave = TRUE);
case GDK_ENTER_NOTIFY:
d(g_print("%s: %s received\n", __FUNCTION__, leave ? "GDK_LEAVE_NOTIFY" : "GDK_ENTER_NOTIFY"));
- if (eti->tooltip->timer > 0)
+ if (eti->tooltip->timer)
gtk_timeout_remove (eti->tooltip->timer);
eti->tooltip->timer = 0;
break;
diff --git a/widgets/table/e-tree-table-adapter.c b/widgets/table/e-tree-table-adapter.c
index 1fff0eb560..13635f4aa9 100644
--- a/widgets/table/e-tree-table-adapter.c
+++ b/widgets/table/e-tree-table-adapter.c
@@ -474,7 +474,7 @@ update_node(ETreeTableAdapter *etta, ETreePath path)
closure.paths = NULL;
if (gnode)
- g_node_traverse(gnode, G_IN_ORDER, G_TRAVERSE_ALL, -1, check_expanded, &closure);
+ g_node_traverse(gnode, G_POST_ORDER, G_TRAVERSE_ALL, -1, check_expanded, &closure);
if (e_tree_model_node_is_root(etta->priv->source, path))
generate_tree(etta, path);
@@ -484,7 +484,8 @@ update_node(ETreeTableAdapter *etta, ETreePath path)
}
for (l = closure.paths; l; l = l->next)
- e_tree_table_adapter_node_set_expanded (etta, l->data, !closure.expanded);
+ if (lookup_gnode(etta, l->data))
+ e_tree_table_adapter_node_set_expanded (etta, l->data, !closure.expanded);
g_slist_free(closure.paths);
}