ui: updates TODO.md
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
# TODO:
|
||||
|
||||
- [ ] Input: get rid of char accumulator and use everywhere wchar_t
|
||||
|
||||
## Current:
|
||||
- [ ] File upload multiline description (window)
|
||||
- [x] Input: fix non-Latin letters
|
||||
- [ ] Separate common structures in the common.h
|
||||
- [ ] Sorting in the file list
|
||||
- [ ] More intuitive navigation between nested groups (by pressing left and right buttons)
|
||||
- [ ] Cancel upload/download
|
||||
- [x] Input: fix non-Latin letters
|
||||
- [x] Get rid of unsigned integers
|
||||
- [x] Check registration / enter server name again
|
||||
- [x] PageUp/PageDown key functionality in lists
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/* #include "../file_processor.h"
|
||||
#include "../windows/fs_file_list.h"
|
||||
#include "group.h"
|
||||
#include "widget_core.h"
|
||||
#include <ncursesw/ncurses.h>
|
||||
@@ -11,7 +12,7 @@ void upload_dialogue_modal_cb(w_cb_args_t *args) {
|
||||
app_t *app = args->app;
|
||||
w_dialogue_t *d = (w_dialogue_t *)app->active_widget;
|
||||
memcpy(&d_args, args, sizeof(w_cb_args_t));
|
||||
/* d_args.app = NULL; */
|
||||
d_args.app = NULL;
|
||||
d_args.element = app->active_widget;
|
||||
w_dialogue_callback_default(&d_args);
|
||||
w_lfl_ui_t *fui = (w_lfl_ui_t *)d->g_content->elements[0].element;
|
||||
|
||||
+6
-3
@@ -19,6 +19,7 @@ bool w_input_default_key_action(w_cb_args_t *args) {
|
||||
wchar_t w_key[2];
|
||||
app_t *app = args->app;
|
||||
char long_key[3];
|
||||
int short_val_len = 1;
|
||||
|
||||
switch (key) {
|
||||
case KEY_BACKSPACE:
|
||||
@@ -36,22 +37,24 @@ bool w_input_default_key_action(w_cb_args_t *args) {
|
||||
default:
|
||||
if (input->value_len == input->max_len) break;
|
||||
long_key[0] = key;
|
||||
input->value_len++;
|
||||
if ((key & 0xC0) == 0xC0) {
|
||||
long_key[1] = wgetch(app->win);
|
||||
long_key[2] = '\0';
|
||||
short_val_len++;
|
||||
} else {
|
||||
long_key[1] = '\0';
|
||||
}
|
||||
mbstowcs(w_key, (const char *)&long_key, 2);
|
||||
if (input->cur_pos > 0) {
|
||||
start_pos = input->value_len++ - input->cur_pos;
|
||||
start_pos = input->value_len - input->cur_pos;
|
||||
memmove(input->value + start_pos + 1, input->value + start_pos,
|
||||
input->value_len - start_pos);
|
||||
input->value[start_pos] = key;
|
||||
strcpy(input->value + start_pos, long_key);
|
||||
input->w_value[start_pos] = w_key[0];
|
||||
} else {
|
||||
input->value[input->value_len++] = key;
|
||||
input->value[input->value_len] = '\0';
|
||||
strcpy(input->value + input->value_len, long_key);
|
||||
|
||||
input->w_value[input->value_len - 1] = w_key[0];
|
||||
input->w_value[input->value_len] = '\0';
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@
|
||||
typedef struct {
|
||||
w_t w;
|
||||
wchar_t w_value[INPUT_TEXT];
|
||||
char value[INPUT_TEXT];
|
||||
char value[INPUT_TEXT*2];
|
||||
int32_t cur_pos; /* is relative to the end of a string */
|
||||
int32_t value_len;
|
||||
int32_t max_len;
|
||||
|
||||
Reference in New Issue
Block a user