summaryrefslogtreecommitdiff
path: root/src/sidebar/Tree.vala
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2018-10-01 07:17:16 +0200
committerJörg Frings-Fürst <debian@jff.email>2018-10-01 07:17:16 +0200
commit71137cc5832110d91599d68790402cf196762ed3 (patch)
treee7985bbfb6ca50ea738b38a9f852ee51431d48a7 /src/sidebar/Tree.vala
parent8ae550d463720d5d1c0e253af29843ff15de1a54 (diff)
parent1e92964463e564bb3359a7110342182fcfdc67f2 (diff)
Merge branch 'release/debian/0.30.1-1'debian/0.30.1-1
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;
}