GUI2/Screenshot Notification: select filename initially

This is pretty hacky, need to do something better.
This commit is contained in:
Charles Dang 2020-12-19 11:54:25 +11:00
parent 7a3ebe1777
commit 35733f1143

View file

@ -83,6 +83,7 @@ void screenshot_notification::pre_show(window& window)
text_box& path_box = find_widget<text_box>(&window, "path", false);
path_box.set_value(filesystem::base_name(path_));
path_box.set_selection(0, path_box.text().find_last_of('.')); // TODO: do this cleaner!
window.keyboard_capture(&path_box);
connect_signal_pre_key_press(path_box, std::bind(&screenshot_notification::keypress_callback, this,
std::placeholders::_3, std::placeholders::_5));