UI: separate windows objects
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#include "../file_processor.h"
|
||||
/* #include "../file_processor.h"
|
||||
#include "group.h"
|
||||
#include "widget_core.h"
|
||||
#include <ncursesw/ncurses.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
@@ -13,8 +14,7 @@ void upload_dialogue_modal_cb(w_cb_args_t *args) {
|
||||
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;
|
||||
w_lfl_ui_t *fui = (w_lfl_ui_t *)d->g_content->elements[0].element;
|
||||
if (d_args.resp_data.code == cbrp_val) {
|
||||
switch (d_args.resp_data.val.val.num) {
|
||||
case 0:
|
||||
@@ -38,26 +38,27 @@ w_dialogue_t *m_upload_dialogue_init(w_app_t *app) {
|
||||
return NULL;
|
||||
w_group_el_init_t content[] = {
|
||||
// {.type = w_input, .label = "File description", .length = 30},
|
||||
{.type = w_fs_file_list, .label = "File", .length = 30},
|
||||
{.type = w_box, .label = "File", .length = 30},
|
||||
{.type = w_end}};
|
||||
|
||||
w_group_el_init_t actions[] = {
|
||||
{.type = w_button, .label = "Cancel", .is_default = false, .val.num = 0}, {.type = w_end}};
|
||||
{.type = w_button, .label = "Cancel", .is_default = false, .val.num = 0},
|
||||
{.type = w_end}};
|
||||
|
||||
app->modal.w.parent_win = &app->win;
|
||||
w_dialogue_init(&(app->modal), "Upload new file", "Enter essential data",
|
||||
&(app->coordinates));
|
||||
&(app->coordinates));
|
||||
w_dialogue_t *d = &(app->modal);
|
||||
|
||||
d->w.callback = upload_dialogue_modal_cb;
|
||||
d->g_content = w_group_init(&(d->win), &(d->w), content, &(d->id_map),
|
||||
horizontal, g_content);
|
||||
horizontal, g_content);
|
||||
d->g_action = w_group_init(&(d->win), &(d->w), actions, &(d->id_map),
|
||||
horizontal, g_action);
|
||||
horizontal, g_action);
|
||||
|
||||
app->query_args->active_dialogue = d;
|
||||
|
||||
w_dialogue_init_active_id(d);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
} */
|
||||
Reference in New Issue
Block a user