Small fixes

svn path=/trunk/; revision=18503
This commit is contained in:
Matthias Clasen 2007-07-19 15:06:52 +00:00
parent 9719e5fb3c
commit a8442c5d01
2 changed files with 17 additions and 4 deletions

View File

@ -1,3 +1,9 @@
2007-07-19 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_set_tooltip_column):
Only connect/disconnect signals when necessary, emit
change notification.
2007-07-19 Kristian Rietveld <kris@imendio.com>
* gtk/gtktooltip.c (find_topmost_widget_coords_from_event): handle

View File

@ -15429,6 +15429,9 @@ gtk_tree_view_set_tooltip_column (GtkTreeView *tree_view,
{
g_return_if_fail (GTK_IS_TREE_VIEW (tree_view));
if (column == tree_view->priv->tooltip_column)
return;
if (column == -1)
{
g_signal_handlers_disconnect_by_func (tree_view,
@ -15437,13 +15440,17 @@ gtk_tree_view_set_tooltip_column (GtkTreeView *tree_view,
gtk_widget_set_has_tooltip (GTK_WIDGET (tree_view), FALSE);
}
else
{
if (tree_view->priv->tooltip_column == -1)
{
g_signal_connect (tree_view, "query-tooltip",
G_CALLBACK (gtk_tree_view_set_tooltip_query_cb), NULL);
gtk_widget_set_has_tooltip (GTK_WIDGET (tree_view), TRUE);
}
}
tree_view->priv->tooltip_column = column;
g_object_notify (G_OBJECT (tree_view), "tooltip-column");
}
/**