Skip to content
This repository was archived by the owner on Jun 25, 2020. It is now read-only.

Commit 6792826

Browse files
committed
Fixed crash on MacOS by disabling drag-and-drop in directories view
1 parent e1e18a4 commit 6792826

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

src/directories.cc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,16 @@ bool Directories::TreeStore::row_drop_possible_vfunc(const Gtk::TreeModel::Path
1010
return true;
1111
}
1212

13+
bool Directories::TreeStore::row_draggable_vfunc(const TreeModel::Path &path) const {
14+
// Drag and drop does not work on MacOS anymore
15+
// TODO june 2018, see if this issue has been fixed
16+
#ifdef __APPLE__
17+
return false;
18+
#else
19+
return Gtk::TreeStore::row_draggable_vfunc(path);
20+
#endif
21+
}
22+
1323
bool Directories::TreeStore::drag_data_get_vfunc(const TreeModel::Path &path, Gtk::SelectionData &selection_data) const {
1424
// Workaround for MacOS crash when dragging a path for instance inside dir/subdir
1525
#ifdef __APPLE__

src/directories.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ class Directories : public Gtk::ListViewText {
2727
TreeStore() {}
2828

2929
bool row_drop_possible_vfunc(const Gtk::TreeModel::Path &path, const Gtk::SelectionData &selection_data) const override;
30+
bool row_draggable_vfunc(const TreeModel::Path &path) const override;
3031
bool drag_data_get_vfunc(const TreeModel::Path &path, Gtk::SelectionData &selection_data) const override;
3132
bool drag_data_received_vfunc(const TreeModel::Path &path, const Gtk::SelectionData &selection_data) override;
3233
bool drag_data_delete_vfunc (const Gtk::TreeModel::Path &path) override;

0 commit comments

Comments
 (0)