[gdm] unset tree view model to hide row add/remove signals from gail
- From: William Jon McCann <mccann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm] unset tree view model to hide row add/remove signals from gail
- Date: Fri, 11 Jun 2010 00:21:41 +0000 (UTC)
commit 278e2090a9890841d44c141b3a1d757d74af37b5
Author: William Jon McCann <jmccann redhat com>
Date: Thu Jun 10 18:31:46 2010 -0400
unset tree view model to hide row add/remove signals from gail
Otherwise gail will try to do horrific and expensive things
on each module row-inserted or row-removed signal.
gui/simple-greeter/gdm-chooser-widget.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/gui/simple-greeter/gdm-chooser-widget.c b/gui/simple-greeter/gdm-chooser-widget.c
index 6659ee1..56c7422 100644
--- a/gui/simple-greeter/gdm-chooser-widget.c
+++ b/gui/simple-greeter/gdm-chooser-widget.c
@@ -700,6 +700,7 @@ set_inactive_items_visible (GdmChooserWidget *widget,
gboolean should_show)
{
GtkTreeModel *model;
+ GtkTreeModel *view_model;
char *active_item_id;
GtkTreeIter active_item_iter;
GtkTreeIter iter;
@@ -715,6 +716,11 @@ set_inactive_items_visible (GdmChooserWidget *widget,
return;
}
+ /* unset tree view model to hide row add/remove signals from gail */
+ view_model = gtk_tree_view_get_model (GTK_TREE_VIEW (widget->priv->items_view));
+ g_object_ref (view_model);
+ gtk_tree_view_set_model (GTK_TREE_VIEW (widget->priv->items_view), NULL);
+
g_debug ("GdmChooserWidget: Setting inactive items visible: %s", should_show ? "true" : "false");
do {
@@ -733,6 +739,9 @@ set_inactive_items_visible (GdmChooserWidget *widget,
}
} while (gtk_tree_model_iter_next (model, &iter));
+ gtk_tree_view_set_model (GTK_TREE_VIEW (widget->priv->items_view), view_model);
+ g_object_unref (view_model);
+
g_free (active_item_id);
update_separator_visibility (widget);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]