summaryrefslogtreecommitdiff
path: root/src/sidebar/Tree.vala
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2018-09-30 14:11:00 +0200
committerJörg Frings-Fürst <debian@jff.email>2018-09-30 14:11:00 +0200
commit0ac947a9070322180e94d1b71e30836cce4d74bc (patch)
tree4a6f3923c250377536a5004ed203768111a1d27f /src/sidebar/Tree.vala
parenteca5837e235a356c8db9416bbbc13577db3e6f76 (diff)
parent01b2b5ec9177046f64c6d0a6e73a6ac8a42089a1 (diff)
Merge branch 'feature/upstream' into develop
Diffstat (limited to 'src/sidebar/Tree.vala')
-rw-r--r--src/sidebar/Tree.vala14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/sidebar/Tree.vala b/src/sidebar/Tree.vala
index c707c63..ea039ea 100644
--- a/src/sidebar/Tree.vala
+++ b/src/sidebar/Tree.vala
@@ -101,6 +101,7 @@ public class Sidebar.Tree : Gtk.TreeView {
text_column.pack_start (icon_renderer, false);
text_column.add_attribute(icon_renderer, "gicon", Columns.ICON);
text_column.set_cell_data_func(icon_renderer, icon_renderer_function);
+ text_column.set_spacing(6);
text_renderer = new Gtk.CellRendererText();
text_renderer.ellipsize = Pango.EllipsizeMode.END;
text_renderer.editing_canceled.connect(on_editing_canceled);
@@ -811,8 +812,8 @@ public class Sidebar.Tree : Gtk.TreeView {
private Gtk.TreePath? get_path_from_event(Gdk.EventButton event) {
int x, y;
Gdk.ModifierType mask;
- event.window.get_device_position(Gdk.Display.get_default().get_device_manager().
- get_client_pointer(), out x, out y, out mask);
+ var seat = event.get_seat();
+ event.window.get_device_position(seat.get_pointer(), out x, out y, out mask);
int cell_x, cell_y;
Gtk.TreePath path;
@@ -863,16 +864,13 @@ public class Sidebar.Tree : Gtk.TreeView {
context_menu.attach_to_widget (this, null);
}
- if (event != null)
- context_menu.popup(null, null, null, event.button, event.time);
- else
- context_menu.popup(null, null, null, 0, Gtk.get_current_event_time());
-
+ context_menu.popup_at_pointer(event);
+
return true;
}
private bool popup_default_context_menu(Gdk.EventButton event) {
- default_context_menu.popup(null, null, null, event.button, event.time);
+ default_context_menu.popup_at_pointer(event);
return true;
}