1 |
commit: 489db58cb8a16b89650624a3a70b43eb008b8a4c |
2 |
Author: Sven Eden <sven.eden <AT> gmx <DOT> de> |
3 |
AuthorDate: Mon Mar 4 17:58:30 2013 +0000 |
4 |
Commit: Sven Eden <sven.eden <AT> gmx <DOT> de> |
5 |
CommitDate: Mon Mar 4 17:58:30 2013 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/ufed.git;a=commit;h=489db58c |
7 |
|
8 |
Added a new member "row" to the sKey struct to add information about in which row a key is to be displayed. |
9 |
|
10 |
--- |
11 |
ufed-curses-checklist.c | 18 +++++++++--------- |
12 |
ufed-curses-help.c | 8 ++++---- |
13 |
ufed-curses-types.h | 1 + |
14 |
3 files changed, 14 insertions(+), 13 deletions(-) |
15 |
|
16 |
diff --git a/ufed-curses-checklist.c b/ufed-curses-checklist.c |
17 |
index 7e0f018..2118c9c 100644 |
18 |
--- a/ufed-curses-checklist.c |
19 |
+++ b/ufed-curses-checklist.c |
20 |
@@ -20,15 +20,15 @@ static sFlag* flags = NULL; |
21 |
|
22 |
#define mkKey(x) x, sizeof(x)-1 |
23 |
static const sKey keys[] = { |
24 |
- { '?', mkKey("Help (?)") }, |
25 |
- { '\n', mkKey("Save (Enter)") }, |
26 |
- { '\033', mkKey("Cancel (Esc)") }, |
27 |
- { -1, mkKey("Toggle :") }, |
28 |
- { KEY_F(5), mkKey("Local/Global (F5)") }, |
29 |
- { KEY_F(6), mkKey("Installed (F6)") }, |
30 |
- { KEY_F(7), mkKey("Masked/Forced (F7)") }, |
31 |
- { KEY_F(9), mkKey("Pkg/Desc Order (F9)") }, |
32 |
- { '\0', mkKey("") } |
33 |
+ { '?', mkKey("Help (?)"), 0 }, |
34 |
+ { '\n', mkKey("Save (Enter)"), 0 }, |
35 |
+ { '\033', mkKey("Cancel (Esc)"), 0 }, |
36 |
+ { -1, mkKey("Toggle :"), 1 }, |
37 |
+ { KEY_F(5), mkKey("Local/Global (F5)"), 1 }, |
38 |
+ { KEY_F(6), mkKey("Installed (F6)"), 1 }, |
39 |
+ { KEY_F(7), mkKey("Masked/Forced (F7)"), 1 }, |
40 |
+ { KEY_F(9), mkKey("Pkg/Desc Order (F9)"), 1 }, |
41 |
+ { '\0', mkKey(""), 0 } |
42 |
}; |
43 |
#undef mkKey |
44 |
|
45 |
|
46 |
diff --git a/ufed-curses-help.c b/ufed-curses-help.c |
47 |
index 572ccec..7a9115d 100644 |
48 |
--- a/ufed-curses-help.c |
49 |
+++ b/ufed-curses-help.c |
50 |
@@ -283,12 +283,12 @@ static void free_lines(void) |
51 |
} |
52 |
} |
53 |
|
54 |
-static const sKey keys[] = { |
55 |
#define key(x) x, sizeof(x)-1 |
56 |
- { '\033', key("Back (Esc)") }, |
57 |
- { '\0', key("") } |
58 |
-#undef key |
59 |
+static const sKey keys[] = { |
60 |
+ { '\033', key("Back (Esc)"), 0 }, |
61 |
+ { '\0', key(""), 0 } |
62 |
}; |
63 |
+#undef key |
64 |
|
65 |
static int drawline(sFlag* line, bool highlight) |
66 |
{ |
67 |
|
68 |
diff --git a/ufed-curses-types.h b/ufed-curses-types.h |
69 |
index 7eb7991..af7deec 100644 |
70 |
--- a/ufed-curses-types.h |
71 |
+++ b/ufed-curses-types.h |
72 |
@@ -148,6 +148,7 @@ typedef struct sKey_ { |
73 |
int key; //!< curses key or -1 if no key shall be used |
74 |
const char *descr; //!< Help text to display |
75 |
size_t length; //!< length of the description |
76 |
+ int row; //!< On which row this key is to be displayed, 0 or 1 |
77 |
} sKey; |