Correct cancel editing the file description after file upload
This commit is contained in:
@@ -40,10 +40,6 @@ void upload_props_dialogue_modal_cb(w_cb_args_t *args) {
|
||||
app->query_args->file->size, privileges);
|
||||
/* app->query_args->file->description =
|
||||
malloc(desc_input->value_len + 9); reserve space for \n:END:\n */
|
||||
app->query_args->file->description =
|
||||
malloc(sizeof("[Empty description]\n:END:\n"));
|
||||
strcpy(app->query_args->file->description,
|
||||
"[Empty description]\n:END:\n");
|
||||
d->needs_destroy = true;
|
||||
app->query_args->state = S_UPLOAD_REQUESTED;
|
||||
break;
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
#include <wchar.h>
|
||||
|
||||
#include "d_array.h"
|
||||
#include "text_edit.h"
|
||||
#include "file_list.h"
|
||||
#include "text_edit.h"
|
||||
#include "widget_core.h"
|
||||
|
||||
/* TODO: расширять capacity линии при достижении лимита */
|
||||
@@ -210,6 +210,9 @@ static int32_t process_user_input(app_t *app, w_cb_args_t *d_args) {
|
||||
/* Save */
|
||||
break;
|
||||
case KEY_F(8):
|
||||
server_send_string(app->query_args, "[Empty description]\n:END:\n");
|
||||
app->query_args->state = S_WAIT_SERVER;
|
||||
app->callback_after_notification = callback_after_notification;
|
||||
/* Cancel */
|
||||
break;
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user