projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c0e437d
)
filechoosercell: Select item when right click or long press
author
Corey Berla
<corey@berla.me>
Fri, 21 Oct 2022 20:53:49 +0000
(13:53 -0700)
committer
Corey Berla
<corey@berla.me>
Fri, 21 Oct 2022 20:57:15 +0000
(13:57 -0700)
gtk/gtkfilechoosercell.c
patch
|
blob
|
history
diff --git
a/gtk/gtkfilechoosercell.c
b/gtk/gtkfilechoosercell.c
index 267b9511e328ba662bd4c44c0c45669203d82623..c14ae0a0213b3c4fa56200977bba83e02d98ea2a 100644
(file)
--- a/
gtk/gtkfilechoosercell.c
+++ b/
gtk/gtkfilechoosercell.c
@@
-67,11
+67,15
@@
popup_menu (GtkFileChooserCell *self,
double y)
{
GtkWidget *widget = GTK_WIDGET (self);
+ GtkSelectionModel *model;
GtkWidget *impl;
double xx, yy;
impl = gtk_widget_get_ancestor (widget, GTK_TYPE_FILE_CHOOSER_WIDGET);
+ model = gtk_file_chooser_widget_get_selection_model (GTK_FILE_CHOOSER_WIDGET (impl));
+ gtk_selection_model_select_item (model, self->position, TRUE);
+
gtk_widget_translate_coordinates (widget, GTK_WIDGET (impl),
x, y, &xx, &yy);