diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2015-10-03 14:34:20 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2015-10-03 14:34:20 +0200 |
commit | 21bb5bd2bd4243dc83a08d6e0329b5de2f96b1fe (patch) | |
tree | beef1c65f08a9677611b20fbb86deff5f1820bd9 /plugingui/filebrowser.cc | |
parent | 3be8598f672eb5b8e48373ed4ee59feff543ada2 (diff) |
Refactor ComboBox and ListBox(Thin and Basic).
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); |