Does not select last opened directory on startup
expandSuccess is false if directory do not have subdirs
This commit is contained in:
parent
972ebbd9a8
commit
3a711689b1
@ -341,13 +341,10 @@ void DirBrowser::open (const Glib::ustring& dirname, const Glib::ustring& fileNa
|
|||||||
|
|
||||||
Glib::ustring absDirPath = Gio::File::create_for_path(dirname)->get_parse_name ();
|
Glib::ustring absDirPath = Gio::File::create_for_path(dirname)->get_parse_name ();
|
||||||
Gtk::TreePath path = expandToDir (absDirPath);
|
Gtk::TreePath path = expandToDir (absDirPath);
|
||||||
|
dirtree->scroll_to_row (path);
|
||||||
if (expandSuccess) {
|
dirtree->get_selection()->select (path);
|
||||||
dirtree->scroll_to_row (path);
|
for (int i=0; i<dllisteners.size(); i++)
|
||||||
dirtree->get_selection()->select (path);
|
dllisteners[i]->dirSelected (absDirPath, Glib::build_filename (absDirPath, fileName));
|
||||||
for (int i=0; i<dllisteners.size(); i++)
|
|
||||||
dllisteners[i]->dirSelected (absDirPath, Glib::build_filename (absDirPath, fileName));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DirBrowser::file_changed (const Glib::RefPtr<Gio::File>& file, const Glib::RefPtr<Gio::File>& other_file, Gio::FileMonitorEvent event_type, const Gtk::TreeModel::iterator& iter, const Glib::ustring& dirName) {
|
void DirBrowser::file_changed (const Glib::RefPtr<Gio::File>& file, const Glib::RefPtr<Gio::File>& other_file, Gio::FileMonitorEvent event_type, const Gtk::TreeModel::iterator& iter, const Glib::ustring& dirName) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user