Implemented /room config submit for saving room configuration
This commit is contained in:
@@ -1997,6 +1997,8 @@ _ui_handle_room_configuration(const char * const room, DataForm *form)
|
||||
ProfWin *window = wins_new(title->str, WIN_MUC_CONFIG);
|
||||
g_string_free(title, TRUE);
|
||||
|
||||
window->form = form;
|
||||
|
||||
int num = wins_get_num(window);
|
||||
ui_switch_win(num);
|
||||
|
||||
@@ -2041,8 +2043,12 @@ TODO add command to get help for a field
|
||||
|
||||
curr_field = g_slist_next(curr_field);
|
||||
}
|
||||
}
|
||||
|
||||
form_destroy(form);
|
||||
static void
|
||||
_ui_handle_room_config_submit_result(void)
|
||||
{
|
||||
cons_show("GOT ROOM CONFIG SUBMIT RESULT!!!!");
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -2283,4 +2289,5 @@ ui_init_module(void)
|
||||
ui_room_requires_config = _ui_room_requires_config;
|
||||
ui_room_destroyed = _ui_room_destroyed;
|
||||
ui_handle_room_configuration = _ui_handle_room_configuration;
|
||||
ui_handle_room_config_submit_result = _ui_handle_room_config_submit_result;
|
||||
}
|
||||
|
||||
@@ -161,6 +161,7 @@ void (*ui_handle_error)(const char * const err_msg);
|
||||
void (*ui_clear_win_title)(void);
|
||||
void (*ui_handle_room_join_error)(const char * const room, const char * const err);
|
||||
void (*ui_handle_room_configuration)(const char * const room, DataForm *form);
|
||||
void (*ui_handle_room_config_submit_result)(void);
|
||||
|
||||
// contact status functions
|
||||
void (*ui_status_room)(const char * const contact);
|
||||
|
||||
@@ -68,6 +68,7 @@ win_create(const char * const title, int cols, win_type_t type)
|
||||
new_win->type = type;
|
||||
new_win->is_otr = FALSE;
|
||||
new_win->is_trusted = FALSE;
|
||||
new_win->form = NULL;
|
||||
scrollok(new_win->win, TRUE);
|
||||
|
||||
return new_win;
|
||||
@@ -79,6 +80,7 @@ win_free(ProfWin* window)
|
||||
buffer_free(window->buffer);
|
||||
delwin(window->win);
|
||||
free(window->from);
|
||||
form_destroy(window->form);
|
||||
free(window);
|
||||
}
|
||||
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
|
||||
#include "contact.h"
|
||||
#include "ui/buffer.h"
|
||||
#include "xmpp/xmpp.h"
|
||||
|
||||
#define NO_ME 1
|
||||
#define NO_DATE 2
|
||||
@@ -75,6 +76,7 @@ typedef struct prof_win_t {
|
||||
int paged;
|
||||
int unread;
|
||||
int history_shown;
|
||||
DataForm *form;
|
||||
} ProfWin;
|
||||
|
||||
ProfWin* win_create(const char * const title, int cols, win_type_t type);
|
||||
|
||||
Reference in New Issue
Block a user