Commit 4c2dd05c authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen
Browse files

Use GTK_SELECTION_BROWSE.

2004-05-11  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkcombobox.c (gtk_combo_box_list_setup): Use
	GTK_SELECTION_BROWSE.

	* gtk/gtktreeview.c: Make hover selection work for
	GTK_SELECTION_BROWSE as well.
parent 2faae17e
2004-05-11 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkcombobox.c (gtk_combo_box_list_setup): Use
GTK_SELECTION_BROWSE.
* gtk/gtktreeview.c: Make hover selection work for
GTK_SELECTION_BROWSE as well.
Tue May 11 00:38:25 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkcellrenderertoggle.c (gtk_cell_renderer_toggle_class_init):
......
2004-05-11 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkcombobox.c (gtk_combo_box_list_setup): Use
GTK_SELECTION_BROWSE.
* gtk/gtktreeview.c: Make hover selection work for
GTK_SELECTION_BROWSE as well.
Tue May 11 00:38:25 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkcellrenderertoggle.c (gtk_cell_renderer_toggle_class_init):
......
2004-05-11 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkcombobox.c (gtk_combo_box_list_setup): Use
GTK_SELECTION_BROWSE.
* gtk/gtktreeview.c: Make hover selection work for
GTK_SELECTION_BROWSE as well.
Tue May 11 00:38:25 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkcellrenderertoggle.c (gtk_cell_renderer_toggle_class_init):
......
2004-05-11 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkcombobox.c (gtk_combo_box_list_setup): Use
GTK_SELECTION_BROWSE.
* gtk/gtktreeview.c: Make hover selection work for
GTK_SELECTION_BROWSE as well.
Tue May 11 00:38:25 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkcellrenderertoggle.c (gtk_cell_renderer_toggle_class_init):
......
......@@ -2241,7 +2241,7 @@ gtk_combo_box_list_setup (GtkComboBox *combo_box)
combo_box->priv->tree_view = gtk_tree_view_new ();
sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (combo_box->priv->tree_view));
gtk_tree_selection_set_mode (sel, GTK_SELECTION_SINGLE);
gtk_tree_selection_set_mode (sel, GTK_SELECTION_BROWSE);
gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (combo_box->priv->tree_view),
FALSE);
gtk_tree_view_set_hover_selection (GTK_TREE_VIEW (combo_box->priv->tree_view),
......
......@@ -630,7 +630,9 @@ gtk_tree_view_class_init (GtkTreeViewClass *class)
*
* Enables of disables the hover selection mode of @tree_view.
* Hover selection makes the selected row follow the pointer.
* Currently, this works only for the selection mode %GTK_SELECTION_SINGLE.
* Currently, this works only for the selection modes
* %GTK_SELECTION_SINGLE and %GTK_SELECTION_BROWSE.
*
* This mode is primarily indended for treeviews in popups, e.g.
* in #GtkComboBox or #GtkEntryCompletion.
*
......@@ -2723,8 +2725,10 @@ prelight_or_select (GtkTreeView *tree_view,
gint x,
gint y)
{
GtkSelectionMode mode = gtk_tree_selection_get_mode (tree_view->priv->selection);
if (tree_view->priv->hover_selection &&
gtk_tree_selection_get_mode (tree_view->priv->selection) == GTK_SELECTION_SINGLE &&
(mode == GTK_SELECTION_SINGLE || mode == GTK_SELECTION_BROWSE) &&
!(tree_view->priv->edited_column &&
tree_view->priv->edited_column->editable_widget))
{
......@@ -2744,7 +2748,7 @@ prelight_or_select (GtkTreeView *tree_view,
gtk_tree_path_free (path);
}
}
else
else if (mode == GTK_SELECTION_SINGLE)
gtk_tree_selection_unselect_all (tree_view->priv->selection);
}
else
......@@ -12262,8 +12266,8 @@ gtk_tree_view_stop_editing (GtkTreeView *tree_view,
*
* Enables of disables the hover selection mode of @tree_view.
* Hover selection makes the selected row follow the pointer.
* Currently, this works only for the selection mode
* %GTK_SELECTION_SINGLE.
* Currently, this works only for the selection modes
* %GTK_SELECTION_SINGLE and %GTK_SELECTION_BROWSE.
*
* Since: 2.6
**/
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment