summaryrefslogtreecommitdiffstats
path: root/MetersPanel.c
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2015-03-23 15:26:56 -0300
committerHisham Muhammad <hisham@gobolinux.org>2015-03-23 15:26:56 -0300
commitd0c72c3fb29d535f5bb12b651e3bcaa516650199 (patch)
tree2c01b7d96d50a7f47334093a1ed8ff4962cec204 /MetersPanel.c
parent1084a3ff8faf3aa98e8e9fbdab97a08a2c40482e (diff)
Move FunctionBar inside Panel
Diffstat (limited to 'MetersPanel.c')
-rw-r--r--MetersPanel.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/MetersPanel.c b/MetersPanel.c
index a4fe7c44..4050dc9e 100644
--- a/MetersPanel.c
+++ b/MetersPanel.c
@@ -30,6 +30,10 @@ struct MetersPanel_ {
}*/
+static const char* MetersFunctions[] = {"Type ", "Move ", "Delete", "Done ", NULL};
+static const char* MetersKeys[] = {"Space", "Enter", "Del", "Esc"};
+static int MetersEvents[] = {' ', 13, 27, KEY_DC};
+
static void MetersPanel_delete(Object* object) {
Panel* super = (Panel*) object;
MetersPanel* this = (MetersPanel*) object;
@@ -172,7 +176,8 @@ PanelClass MetersPanel_class = {
MetersPanel* MetersPanel_new(Settings* settings, const char* header, Vector* meters, ScreenManager* scr) {
MetersPanel* this = AllocThis(MetersPanel);
Panel* super = (Panel*) this;
- Panel_init(super, 1, 1, 1, 1, Class(ListItem), true);
+ FunctionBar* fuBar = FunctionBar_new(MetersFunctions, MetersKeys, MetersEvents);
+ Panel_init(super, 1, 1, 1, 1, Class(ListItem), true, fuBar);
this->settings = settings;
this->meters = meters;

© 2014-2024 Faster IT GmbH | imprint | privacy policy