mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-11 21:20:09 +00:00
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.
This commit is contained in:
parent
2faae17e6d
commit
4c2dd05c96
@ -1,3 +1,11 @@
|
||||
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):
|
||||
|
@ -1,3 +1,11 @@
|
||||
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):
|
||||
|
@ -1,3 +1,11 @@
|
||||
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):
|
||||
|
@ -1,3 +1,11 @@
|
||||
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
|
||||
**/
|
||||
|
Loading…
Reference in New Issue
Block a user