Browse Source

MacOS drag-and-drop has been fixed in latest gtk+ homebrew package. Workarounds removed.

merge-requests/365/head
eidheim 8 years ago
parent
commit
5ad81c3d56
  1. 19
      src/directories.cc
  2. 2
      src/directories.h

19
src/directories.cc

@ -10,25 +10,6 @@ bool Directories::TreeStore::row_drop_possible_vfunc(const Gtk::TreeModel::Path
return true; return true;
} }
bool Directories::TreeStore::row_draggable_vfunc(const TreeModel::Path &path) const {
// Drag and drop does not work on MacOS anymore
// TODO june 2018, see if this issue has been fixed
#ifdef __APPLE__
return false;
#else
return Gtk::TreeStore::row_draggable_vfunc(path);
#endif
}
bool Directories::TreeStore::drag_data_get_vfunc(const TreeModel::Path &path, Gtk::SelectionData &selection_data) const {
// Workaround for MacOS crash when dragging a path for instance inside dir/subdir
#ifdef __APPLE__
return true;
#else
return Gtk::TreeStore::drag_data_get_vfunc(path, selection_data);
#endif
}
bool Directories::TreeStore::drag_data_received_vfunc(const TreeModel::Path &path, const Gtk::SelectionData &selection_data) { bool Directories::TreeStore::drag_data_received_vfunc(const TreeModel::Path &path, const Gtk::SelectionData &selection_data) {
auto &directories=Directories::get(); auto &directories=Directories::get();

2
src/directories.h

@ -27,8 +27,6 @@ class Directories : public Gtk::ListViewText {
TreeStore() {} TreeStore() {}
bool row_drop_possible_vfunc(const Gtk::TreeModel::Path &path, const Gtk::SelectionData &selection_data) const override; bool row_drop_possible_vfunc(const Gtk::TreeModel::Path &path, const Gtk::SelectionData &selection_data) const override;
bool row_draggable_vfunc(const TreeModel::Path &path) const override;
bool drag_data_get_vfunc(const TreeModel::Path &path, Gtk::SelectionData &selection_data) const override;
bool drag_data_received_vfunc(const TreeModel::Path &path, const Gtk::SelectionData &selection_data) override; bool drag_data_received_vfunc(const TreeModel::Path &path, const Gtk::SelectionData &selection_data) override;
bool drag_data_delete_vfunc (const Gtk::TreeModel::Path &path) override; bool drag_data_delete_vfunc (const Gtk::TreeModel::Path &path) override;

Loading…
Cancel
Save