summaryrefslogtreecommitdiffstats
path: root/CategoriesPanel.c
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2015-02-03 22:32:07 +0100
committerHisham Muhammad <hisham@gobolinux.org>2015-02-03 22:32:07 +0100
commitd7c843c23bf73655df201e95fffef36c7e57c298 (patch)
treed23217b5f5cbd0c76601ea68a56dc1de7af98b4a /CategoriesPanel.c
parent14bd77c5f4ac968e9d6f0a5a9be29d49c5588f6d (diff)
Complete cursor-based movement of headers.
Diffstat (limited to 'CategoriesPanel.c')
-rw-r--r--CategoriesPanel.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/CategoriesPanel.c b/CategoriesPanel.c
index d691d7f4..7fa31b7d 100644
--- a/CategoriesPanel.c
+++ b/CategoriesPanel.c
@@ -34,9 +34,13 @@ typedef struct CategoriesPanel_ {
}*/
-static const char* MetersFunctions[] = {" ", " ", " ", "Type ", " ", " ", "MoveUp", "MoveDn", "Remove", "Done ", NULL};
+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 const char* AvailableMetersFunctions[] = {" ", " ", " ", " ", "Add L ", "Add R ", " ", " ", " ", "Done ", NULL};
+static const char* AvailableMetersFunctions[] = {"Add ", "Done ", NULL};
+static const char* AvailableMetersKeys[] = {"Enter", "Esc"};
+static int AvailableMetersEvents[] = {13, 27};
static const char* DisplayOptionsFunctions[] = {" ", " ", " ", " ", " ", " ", " ", " ", " ", "Done ", NULL};
@@ -54,12 +58,14 @@ static void CategoriesPanel_delete(Object* object) {
}
void CategoriesPanel_makeMetersPage(CategoriesPanel* this) {
- Panel* leftMeters = (Panel*) MetersPanel_new(this->settings, "Left column", this->header->columns[0], this->scr);
- Panel* rightMeters = (Panel*) MetersPanel_new(this->settings, "Right column", this->header->columns[1], this->scr);
- Panel* availableMeters = (Panel*) AvailableMetersPanel_new(this->settings, this->header, leftMeters, rightMeters, this->scr, this->pl);
- ScreenManager_add(this->scr, leftMeters, FunctionBar_new(MetersFunctions, NULL, NULL), 20);
- ScreenManager_add(this->scr, rightMeters, FunctionBar_new(MetersFunctions, NULL, NULL), 20);
- ScreenManager_add(this->scr, availableMeters, FunctionBar_new(AvailableMetersFunctions, NULL, NULL), -1);
+ MetersPanel* leftMeters = MetersPanel_new(this->settings, "Left column", this->header->columns[0], this->scr);
+ MetersPanel* rightMeters = MetersPanel_new(this->settings, "Right column", this->header->columns[1], this->scr);
+ leftMeters->rightNeighbor = rightMeters;
+ rightMeters->leftNeighbor = leftMeters;
+ Panel* availableMeters = (Panel*) AvailableMetersPanel_new(this->settings, this->header, (Panel*) leftMeters, (Panel*) rightMeters, this->scr, this->pl);
+ ScreenManager_add(this->scr, (Panel*) leftMeters, FunctionBar_new(MetersFunctions, MetersKeys, MetersEvents), 20);
+ ScreenManager_add(this->scr, (Panel*) rightMeters, FunctionBar_new(MetersFunctions, MetersKeys, MetersEvents), 20);
+ ScreenManager_add(this->scr, availableMeters, FunctionBar_new(AvailableMetersFunctions, AvailableMetersKeys, AvailableMetersEvents), -1);
}
static void CategoriesPanel_makeDisplayOptionsPage(CategoriesPanel* this) {

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