diff options
Diffstat (limited to 'plugingui/filebrowser.cc')
-rw-r--r-- | plugingui/filebrowser.cc | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/plugingui/filebrowser.cc b/plugingui/filebrowser.cc index b32b586..5846ffe 100644 --- a/plugingui/filebrowser.cc +++ b/plugingui/filebrowser.cc @@ -193,13 +193,13 @@ GUI::FileBrowser::FileBrowser(GUI::Widget *parent) prv->lineedit->registerEnterPressedHandler(handleKeyEvent, prv); prv->listbox = &listbox; - listbox.registerSelectHandler(changeDir, prv); + CONNECT(&listbox, selectionNotifier, this, &FileBrowser::listSelectionChanged); btn_sel.setText("Select"); - CONNECT((&btn_sel), clickNotifier, this, &FileBrowser::selectButtonClicked); + CONNECT(&btn_sel, clickNotifier, this, &FileBrowser::selectButtonClicked); btn_esc.setText("Cancel"); - CONNECT((&btn_esc), clickNotifier, this, &FileBrowser::cancelButtonClicked); + CONNECT(&btn_esc, clickNotifier, this, &FileBrowser::cancelButtonClicked); changeDir(prv); @@ -267,6 +267,11 @@ void GUI::FileBrowser::repaintEvent(GUI::RepaintEvent *e) p.drawImageStretched(0,0, &back, width(), height()); } +void GUI::FileBrowser::listSelectionChanged() +{ + changeDir(prv); +} + void GUI::FileBrowser::selectButtonClicked() { changeDir(prv); |