summaryrefslogtreecommitdiff
path: root/src/sidebar/Tree.vala
diff options
context:
space:
mode:
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;
}