* [PATCH 1/5] cfdisk: allow an uppercase X to toggle the extra info
@ 2015-07-25 15:18 Benno Schulenberg
2015-07-25 15:18 ` [PATCH 2/5] cfdisk: spell "label" in lower case Benno Schulenberg
` (4 more replies)
0 siblings, 5 replies; 9+ messages in thread
From: Benno Schulenberg @ 2015-07-25 15:18 UTC (permalink / raw)
To: util-linux
To make true the help text line that says that all commands
can be entered with either upper or lower case.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
disk-utils/cfdisk.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/disk-utils/cfdisk.c b/disk-utils/cfdisk.c
index 11a087e..ac07bb5 100644
--- a/disk-utils/cfdisk.c
+++ b/disk-utils/cfdisk.c
@@ -2519,6 +2519,7 @@ static int ui_run(struct cfdisk *cf)
case '\r':
rc = main_menu_action(cf, 0);
break;
+ case 'X':
case 'x': /* Extra */
toggle_show_extra(cf);
break;
--
1.7.0.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/5] cfdisk: spell "label" in lower case
2015-07-25 15:18 [PATCH 1/5] cfdisk: allow an uppercase X to toggle the extra info Benno Schulenberg
@ 2015-07-25 15:18 ` Benno Schulenberg
2015-07-27 10:29 ` Karel Zak
2015-07-25 15:18 ` [PATCH 3/5] cfdisk: bring the hint line closer to the menu line Benno Schulenberg
` (3 subsequent siblings)
4 siblings, 1 reply; 9+ messages in thread
From: Benno Schulenberg @ 2015-07-25 15:18 UTC (permalink / raw)
To: util-linux
To be less shouty. It is not an abbreviation like "UUID".
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
disk-utils/cfdisk.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/disk-utils/cfdisk.c b/disk-utils/cfdisk.c
index ac07bb5..5e46136 100644
--- a/disk-utils/cfdisk.c
+++ b/disk-utils/cfdisk.c
@@ -1338,7 +1338,7 @@ static void extra_prepare_data(struct cfdisk *cf)
if (!blkid_probe_lookup_value(pr, "TYPE", &bdata, NULL))
extra_insert_pair(l, _("Filesystem:"), bdata);
if (!blkid_probe_lookup_value(pr, "LABEL", &bdata, NULL)) {
- extra_insert_pair(l, _("Filesystem LABEL:"), bdata);
+ extra_insert_pair(l, _("Filesystem label:"), bdata);
devlabel = xstrdup(bdata);
}
if (!blkid_probe_lookup_value(pr, "UUID", &bdata, NULL)) {
--
1.7.0.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 3/5] cfdisk: bring the hint line closer to the menu line
2015-07-25 15:18 [PATCH 1/5] cfdisk: allow an uppercase X to toggle the extra info Benno Schulenberg
2015-07-25 15:18 ` [PATCH 2/5] cfdisk: spell "label" in lower case Benno Schulenberg
@ 2015-07-25 15:18 ` Benno Schulenberg
2015-07-27 10:42 ` Karel Zak
2015-07-25 15:18 ` [PATCH 4/5] cfdisk: keep the extra info block separate from menu and partitions Benno Schulenberg
` (2 subsequent siblings)
4 siblings, 1 reply; 9+ messages in thread
From: Benno Schulenberg @ 2015-07-25 15:18 UTC (permalink / raw)
To: util-linux
To make it clearer that they belong together.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
disk-utils/cfdisk.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/disk-utils/cfdisk.c b/disk-utils/cfdisk.c
index 5e46136..ddec7f4 100644
--- a/disk-utils/cfdisk.c
+++ b/disk-utils/cfdisk.c
@@ -94,7 +94,7 @@
#define MENU_H_POSTSTR_SZ (sizeof(MENU_H_POSTSTR) - 1)
#define TABLE_START_LINE 4
-#define MENU_START_LINE (ui_lines - 5)
+#define MENU_START_LINE (ui_lines - 3)
#define INFO_LINE (ui_lines - 2)
#define WARN_LINE INFO_LINE
#define HINT_LINE (ui_lines - 1)
--
1.7.0.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 4/5] cfdisk: keep the extra info block separate from menu and partitions
2015-07-25 15:18 [PATCH 1/5] cfdisk: allow an uppercase X to toggle the extra info Benno Schulenberg
2015-07-25 15:18 ` [PATCH 2/5] cfdisk: spell "label" in lower case Benno Schulenberg
2015-07-25 15:18 ` [PATCH 3/5] cfdisk: bring the hint line closer to the menu line Benno Schulenberg
@ 2015-07-25 15:18 ` Benno Schulenberg
2015-07-27 11:21 ` Karel Zak
2015-07-25 15:18 ` [PATCH 5/5] cfdisk: when moving inside the menu, always redraw it completely Benno Schulenberg
2015-07-27 10:28 ` [PATCH 1/5] cfdisk: allow an uppercase X to toggle the extra info Karel Zak
4 siblings, 1 reply; 9+ messages in thread
From: Benno Schulenberg @ 2015-07-25 15:18 UTC (permalink / raw)
To: util-linux
By adding a blank line between them. Also, keep the top of the info
block in a fixed position close to the partition list, so that it is
clearer that it belongs to a partition and not to the menu.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
disk-utils/cfdisk.c | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/disk-utils/cfdisk.c b/disk-utils/cfdisk.c
index ddec7f4..bf865d9 100644
--- a/disk-utils/cfdisk.c
+++ b/disk-utils/cfdisk.c
@@ -1394,8 +1394,8 @@ static int ui_draw_extra(struct cfdisk *cf)
ndatalines = fdisk_table_get_nents(cf->table) + 1;
/* nents + header + one free line */
- win_ex_start_line = TABLE_START_LINE + ndatalines;
- win_height = MENU_START_LINE - win_ex_start_line;
+ win_ex_start_line = TABLE_START_LINE + ndatalines + 1;
+ win_height = MENU_START_LINE - win_ex_start_line - 1;
tblen = scols_table_get_nlines(ln->extra);
/* we can't get a single line of data under the partlist*/
@@ -1405,9 +1405,6 @@ static int ui_draw_extra(struct cfdisk *cf)
/* number of data lines + 2 for top/bottom lines */
win_height = win_height < tblen + 2 ? win_height : tblen + 2;
- if ((size_t) win_ex_start_line + win_height + 1 < MENU_START_LINE)
- win_ex_start_line = MENU_START_LINE - win_height;
-
win_ex = subwin(stdscr, win_height, ui_cols - 2, win_ex_start_line, 1);
scols_table_reduce_termwidth(ln->extra, 4);
--
1.7.0.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 5/5] cfdisk: when moving inside the menu, always redraw it completely
2015-07-25 15:18 [PATCH 1/5] cfdisk: allow an uppercase X to toggle the extra info Benno Schulenberg
` (2 preceding siblings ...)
2015-07-25 15:18 ` [PATCH 4/5] cfdisk: keep the extra info block separate from menu and partitions Benno Schulenberg
@ 2015-07-25 15:18 ` Benno Schulenberg
2015-07-27 10:28 ` [PATCH 1/5] cfdisk: allow an uppercase X to toggle the extra info Karel Zak
4 siblings, 0 replies; 9+ messages in thread
From: Benno Schulenberg @ 2015-07-25 15:18 UTC (permalink / raw)
To: util-linux
To restore it in case it was partially overwritten by the info line.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
disk-utils/cfdisk.c | 18 +-----------------
1 files changed, 1 insertions(+), 17 deletions(-)
diff --git a/disk-utils/cfdisk.c b/disk-utils/cfdisk.c
index bf865d9..7dc7e65 100644
--- a/disk-utils/cfdisk.c
+++ b/disk-utils/cfdisk.c
@@ -1436,9 +1436,6 @@ static int ui_draw_extra(struct cfdisk *cf)
static void ui_menu_goto(struct cfdisk *cf, int where)
{
- struct cfdisk_menuitem *d;
- size_t old;
-
/* stop and begin/end for vertical menus */
if (cf->menu->vertical) {
if (where < 0)
@@ -1455,22 +1452,9 @@ static void ui_menu_goto(struct cfdisk *cf, int where)
if ((size_t) where == cf->menu->idx)
return;
- ui_clean_info();
-
- old = cf->menu->idx;
cf->menu->idx = where;
- if (!menuitem_on_page(cf, old)) {
- ui_draw_menu(cf);
- return;
- }
-
- d = menu_get_menuitem(cf, old);
- ui_draw_menuitem(cf, d, old);
-
- d = menu_get_menuitem(cf, where);
- ui_draw_menuitem(cf, d, where);
-
+ ui_draw_menu(cf);
}
static int ui_menu_move(struct cfdisk *cf, int key)
--
1.7.0.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 1/5] cfdisk: allow an uppercase X to toggle the extra info
2015-07-25 15:18 [PATCH 1/5] cfdisk: allow an uppercase X to toggle the extra info Benno Schulenberg
` (3 preceding siblings ...)
2015-07-25 15:18 ` [PATCH 5/5] cfdisk: when moving inside the menu, always redraw it completely Benno Schulenberg
@ 2015-07-27 10:28 ` Karel Zak
4 siblings, 0 replies; 9+ messages in thread
From: Karel Zak @ 2015-07-27 10:28 UTC (permalink / raw)
To: Benno Schulenberg; +Cc: util-linux
On Sat, Jul 25, 2015 at 05:18:14PM +0200, Benno Schulenberg wrote:
> disk-utils/cfdisk.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
Applied, thanks.
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/5] cfdisk: spell "label" in lower case
2015-07-25 15:18 ` [PATCH 2/5] cfdisk: spell "label" in lower case Benno Schulenberg
@ 2015-07-27 10:29 ` Karel Zak
0 siblings, 0 replies; 9+ messages in thread
From: Karel Zak @ 2015-07-27 10:29 UTC (permalink / raw)
To: Benno Schulenberg; +Cc: util-linux
On Sat, Jul 25, 2015 at 05:18:15PM +0200, Benno Schulenberg wrote:
> To be less shouty. It is not an abbreviation like "UUID".
You're right.
> disk-utils/cfdisk.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
Applied, thanks.
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 3/5] cfdisk: bring the hint line closer to the menu line
2015-07-25 15:18 ` [PATCH 3/5] cfdisk: bring the hint line closer to the menu line Benno Schulenberg
@ 2015-07-27 10:42 ` Karel Zak
0 siblings, 0 replies; 9+ messages in thread
From: Karel Zak @ 2015-07-27 10:42 UTC (permalink / raw)
To: Benno Schulenberg; +Cc: util-linux
On Sat, Jul 25, 2015 at 05:18:16PM +0200, Benno Schulenberg wrote:
> To make it clearer that they belong together.
Please, don't treat with users as idiots. This is (c)fdisk, no gnome
project...
> Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
> ---
> disk-utils/cfdisk.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/disk-utils/cfdisk.c b/disk-utils/cfdisk.c
> index 5e46136..ddec7f4 100644
> --- a/disk-utils/cfdisk.c
> +++ b/disk-utils/cfdisk.c
> @@ -94,7 +94,7 @@
> #define MENU_H_POSTSTR_SZ (sizeof(MENU_H_POSTSTR) - 1)
>
> #define TABLE_START_LINE 4
> -#define MENU_START_LINE (ui_lines - 5)
> +#define MENU_START_LINE (ui_lines - 3)
> #define INFO_LINE (ui_lines - 2)
> #define WARN_LINE INFO_LINE
> #define HINT_LINE (ui_lines - 1)
I don't like it, on small terminal the menu uses two lines. It
introduces a new problem which you want to fix in another patch.
Unnecessary.
I have moved the menu to (ui_lines - 4), it's enough.
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 4/5] cfdisk: keep the extra info block separate from menu and partitions
2015-07-25 15:18 ` [PATCH 4/5] cfdisk: keep the extra info block separate from menu and partitions Benno Schulenberg
@ 2015-07-27 11:21 ` Karel Zak
0 siblings, 0 replies; 9+ messages in thread
From: Karel Zak @ 2015-07-27 11:21 UTC (permalink / raw)
To: Benno Schulenberg; +Cc: util-linux
On Sat, Jul 25, 2015 at 05:18:17PM +0200, Benno Schulenberg wrote:
> - if ((size_t) win_ex_start_line + win_height + 1 < MENU_START_LINE)
> - win_ex_start_line = MENU_START_LINE - win_height;
> -
> win_ex = subwin(stdscr, win_height, ui_cols - 2, win_ex_start_line, 1);
I have made small survey between colleagues in the office and result is "down".
http://people.redhat.com/kzak/cfdisk-down.png
http://people.redhat.com/kzak/cfdisk-up.png
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2015-07-27 11:21 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-25 15:18 [PATCH 1/5] cfdisk: allow an uppercase X to toggle the extra info Benno Schulenberg
2015-07-25 15:18 ` [PATCH 2/5] cfdisk: spell "label" in lower case Benno Schulenberg
2015-07-27 10:29 ` Karel Zak
2015-07-25 15:18 ` [PATCH 3/5] cfdisk: bring the hint line closer to the menu line Benno Schulenberg
2015-07-27 10:42 ` Karel Zak
2015-07-25 15:18 ` [PATCH 4/5] cfdisk: keep the extra info block separate from menu and partitions Benno Schulenberg
2015-07-27 11:21 ` Karel Zak
2015-07-25 15:18 ` [PATCH 5/5] cfdisk: when moving inside the menu, always redraw it completely Benno Schulenberg
2015-07-27 10:28 ` [PATCH 1/5] cfdisk: allow an uppercase X to toggle the extra info Karel Zak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox