ui: dialogue: +id_map
This commit is contained in:
@@ -3,7 +3,13 @@ add_library(modals STATIC)
|
||||
file(GLOB M_HEADERS "*.h")
|
||||
file(GLOB M_SOURCES "*.c")
|
||||
|
||||
target_link_libraries(modals PRIVATE widget widget_core bstring)
|
||||
target_link_libraries(modals
|
||||
PRIVATE
|
||||
widget
|
||||
widget_core
|
||||
bstring
|
||||
utils
|
||||
)
|
||||
|
||||
target_sources(modals
|
||||
PRIVATE
|
||||
@@ -16,4 +22,5 @@ target_sources(modals
|
||||
|
||||
target_include_directories(modals PRIVATE "../widget")
|
||||
target_include_directories(modals PRIVATE "../widget_core")
|
||||
target_include_directories(modals PRIVATE "../lib/")
|
||||
target_include_directories(modals PRIVATE "../lib/")
|
||||
target_include_directories(widget PRIVATE "../utils/")
|
||||
+1
-1
@@ -33,7 +33,7 @@ void notification(const char *title, const char *message,
|
||||
|
||||
d->w.callback = alert_cb;
|
||||
d->g_content = NULL;
|
||||
d->g_action = init_group(&(d->win), &(d->w), actions, horizontal);
|
||||
d->g_action = init_group(&(d->win), &(d->w), actions,&(d->id_map), horizontal);
|
||||
|
||||
dialogue_init_active_id(d);
|
||||
d->color_scheme = color;
|
||||
|
||||
@@ -60,8 +60,8 @@ dialogue_t *init_asa_modal(app_t *app) {
|
||||
dialogue_t *d = &(app->modal);
|
||||
|
||||
d->w.callback = asa_modal_dialogue_callback;
|
||||
d->g_content = init_group(&(d->win), &(d->w), content, horizontal);
|
||||
d->g_action = init_group(&(d->win), &(d->w), actions, horizontal);
|
||||
d->g_content = init_group(&(d->win), &(d->w), content,&(d->id_map), horizontal);
|
||||
d->g_action = init_group(&(d->win), &(d->w), actions,&(d->id_map), horizontal);
|
||||
|
||||
dialogue_init_active_id(d);
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@ dialogue_t *init_dwn_pr_modal(app_t *app, bool is_upload) {
|
||||
dialogue_t *d = &(app->modal);
|
||||
|
||||
d->w.callback = dwn_pr_modal_cb;
|
||||
d->g_content = init_group(&(d->win), &(d->w), content, horizontal);
|
||||
d->g_action = init_group(&(d->win), &(d->w), actions, horizontal);
|
||||
d->g_content = init_group(&(d->win), &(d->w), content, &(d->id_map), horizontal);
|
||||
d->g_action = init_group(&(d->win), &(d->w), actions, &(d->id_map), horizontal);
|
||||
|
||||
app->query_args->progress_bar = d->g_content->elements[0].element;
|
||||
app->query_args->active_dialogue = d;
|
||||
|
||||
@@ -65,8 +65,8 @@ dialogue_t *init_login_credentials_modal(app_t *app) {
|
||||
dialogue_t *d = &(app->modal);
|
||||
|
||||
d->w.callback = init_login_credentials_modal_cb;
|
||||
d->g_content = init_group(&(d->win), &(d->w), content, horizontal);
|
||||
d->g_action = init_group(&(d->win), &(d->w), actions, horizontal);
|
||||
d->g_content = init_group(&(d->win), &(d->w), content, &(d->id_map), horizontal);
|
||||
d->g_action = init_group(&(d->win), &(d->w), actions, &(d->id_map), horizontal);
|
||||
|
||||
dialogue_init_active_id(d);
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ void login_modal_option_cb(callback_args_t *args) {
|
||||
d->needs_destroy = true;
|
||||
app->params->uname = malloc(sizeof "anonymous");
|
||||
strcpy(app->params->uname, "anonymous");
|
||||
write(app->params->sd, app->params->uname, sizeof "anonymous"-1);
|
||||
write(app->params->sd, app->params->uname, sizeof "anonymous" - 1);
|
||||
app->query_args->state = S_WAIT_SERVER;
|
||||
print_bars(app);
|
||||
break;
|
||||
@@ -55,9 +55,8 @@ dialogue_t *init_login_option_modal(app_t *app) {
|
||||
"Select your login "
|
||||
"option",
|
||||
&(app->coordinates));
|
||||
app->modal.g_action =
|
||||
init_group(&(app->modal.win), &(app->modal.w), children,
|
||||
horizontal);
|
||||
app->modal.g_action = init_group(&(app->modal.win), &(app->modal.w), children,
|
||||
&(app->modal.id_map), horizontal);
|
||||
app->modal.w.callback = login_modal_option_cb;
|
||||
dialogue_init_active_id(&(app->modal));
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ dialogue_t *init_notification_modal(app_t *app) {
|
||||
|
||||
d->w.callback = init_notification_modal_cb;
|
||||
d->g_content = NULL;
|
||||
d->g_action = init_group(&(d->win), &(d->w), actions, horizontal);
|
||||
d->g_action = init_group(&(d->win), &(d->w), actions, &(d->id_map), horizontal);
|
||||
|
||||
dialogue_init_active_id(d);
|
||||
|
||||
|
||||
@@ -93,8 +93,10 @@ dialogue_t *init_register_modal(app_t *app) {
|
||||
dialogue_t *d = &(app->modal);
|
||||
|
||||
d->w.callback = init_register_modal_cb;
|
||||
d->g_content = init_group(&(d->win), &(d->w), content, horizontal);
|
||||
d->g_action = init_group(&(d->win), &(d->w), actions, horizontal);
|
||||
d->g_content =
|
||||
init_group(&(d->win), &(d->w), content, &(d->id_map), horizontal);
|
||||
d->g_action =
|
||||
init_group(&(d->win), &(d->w), actions, &(d->id_map), horizontal);
|
||||
|
||||
dialogue_init_active_id(d);
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ void *init_server_message_modal(app_t *app) {
|
||||
init_dialogue(&(app->modal), "Server response",
|
||||
app->query_args->server_message.text, &(app->coordinates));
|
||||
app->modal.g_action =
|
||||
init_group(&(app->modal.win), &(app->modal.w), children, horizontal);
|
||||
init_group(&(app->modal.win), &(app->modal.w), children, &(app->modal.id_map), horizontal);
|
||||
app->modal.w.callback = server_message_modal_cb;
|
||||
dialogue_init_active_id(&(app->modal));
|
||||
|
||||
|
||||
@@ -49,8 +49,8 @@ dialogue_t *init_upload_dialogue_modal(app_t *app) {
|
||||
dialogue_t *d = &(app->modal);
|
||||
|
||||
d->w.callback = upload_dialogue_modal_cb;
|
||||
d->g_content = init_group(&(d->win), &(d->w), content, horizontal);
|
||||
d->g_action = init_group(&(d->win), &(d->w), actions, horizontal);
|
||||
d->g_content = init_group(&(d->win), &(d->w), content, &(d->id_map), horizontal);
|
||||
d->g_action = init_group(&(d->win), &(d->w), actions, &(d->id_map), horizontal);
|
||||
|
||||
app->query_args->active_dialogue = d;
|
||||
|
||||
|
||||
@@ -64,8 +64,8 @@ dialogue_t *init_upload_props_dialogue_modal(app_t *app) {
|
||||
dialogue_t *d = &(app->modal);
|
||||
|
||||
d->w.callback = upload_props_dialogue_modal_cb;
|
||||
d->g_content = init_group(&(d->win), &(d->w), content, horizontal);
|
||||
d->g_action = init_group(&(d->win), &(d->w), actions, horizontal);
|
||||
d->g_content = init_group(&(d->win), &(d->w), content, &(d->id_map), horizontal);
|
||||
d->g_action = init_group(&(d->win), &(d->w), actions, &(d->id_map), horizontal);
|
||||
|
||||
app->query_args->active_dialogue = d;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user