summaryrefslogtreecommitdiff
path: root/plugingui/filebrowser.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2015-09-28 19:32:26 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2015-09-28 19:32:26 +0200
commitbf72f82495542f7e052978b7135fc312ede8eec4 (patch)
tree7108deec160a858dffd51ab89a2e36fabdce8ad4 /plugingui/filebrowser.cc
parentf7bdf8448c3ea0fcb07a1dffb14c5811d4e91079 (diff)
Refactored Button.
Diffstat (limited to 'plugingui/filebrowser.cc')
-rw-r--r--plugingui/filebrowser.cc14
1 files changed, 12 insertions, 2 deletions
diff --git a/plugingui/filebrowser.cc b/plugingui/filebrowser.cc
index f025c25..b32b586 100644
--- a/plugingui/filebrowser.cc
+++ b/plugingui/filebrowser.cc
@@ -196,10 +196,10 @@ GUI::FileBrowser::FileBrowser(GUI::Widget *parent)
listbox.registerSelectHandler(changeDir, prv);
btn_sel.setText("Select");
- btn_sel.registerClickHandler(changeDir, prv);
+ CONNECT((&btn_sel), clickNotifier, this, &FileBrowser::selectButtonClicked);
btn_esc.setText("Cancel");
- btn_esc.registerClickHandler(cancel, this);
+ CONNECT((&btn_esc), clickNotifier, this, &FileBrowser::cancelButtonClicked);
changeDir(prv);
@@ -266,3 +266,13 @@ void GUI::FileBrowser::repaintEvent(GUI::RepaintEvent *e)
Painter p(this);
p.drawImageStretched(0,0, &back, width(), height());
}
+
+void GUI::FileBrowser::selectButtonClicked()
+{
+ changeDir(prv);
+}
+
+void GUI::FileBrowser::cancelButtonClicked()
+{
+ cancel(this);
+}