Rename mucconf wins into conf wins

Configuration windows are now being used by both muc and cmd.
This commit is contained in:
Paul Fariello
2018-04-11 22:17:50 +05:20
parent 7123e94e82
commit a952776b89
29 changed files with 150 additions and 150 deletions

View File

@@ -203,10 +203,10 @@ win_create_muc(const char *const roomjid)
}
ProfWin*
win_create_muc_config(const char *const roomjid, DataForm *form)
win_create_config(const char *const roomjid, DataForm *form)
{
ProfMucConfWin *new_win = malloc(sizeof(ProfMucConfWin));
new_win->window.type = WIN_MUC_CONFIG;
ProfConfWin *new_win = malloc(sizeof(ProfConfWin));
new_win->window.type = WIN_CONFIG;
new_win->window.layout = _win_create_simple_layout();
new_win->roomjid = strdup(roomjid);
new_win->form = form;
@@ -289,8 +289,8 @@ win_get_title(ProfWin *window)
assert(mucwin->memcheck == PROFMUCWIN_MEMCHECK);
return strdup(mucwin->roomjid);
}
if (window->type == WIN_MUC_CONFIG) {
ProfMucConfWin *confwin = (ProfMucConfWin*) window;
if (window->type == WIN_CONFIG) {
ProfConfWin *confwin = (ProfConfWin*) window;
assert(confwin->memcheck == PROFCONFWIN_MEMCHECK);
GString *title = g_string_new(confwin->roomjid);
g_string_append(title, " config");
@@ -338,10 +338,10 @@ win_get_tab_identifier(ProfWin *window)
ProfMucWin *mucwin = (ProfMucWin*)window;
return strdup(mucwin->roomjid);
}
case WIN_MUC_CONFIG:
case WIN_CONFIG:
{
ProfMucConfWin *mucconfwin = (ProfMucConfWin*)window;
return strdup(mucconfwin->roomjid);
ProfConfWin *confwin = (ProfConfWin*)window;
return strdup(confwin->roomjid);
}
case WIN_PRIVATE:
{
@@ -383,10 +383,10 @@ win_to_string(ProfWin *window)
ProfMucWin *mucwin = (ProfMucWin*)window;
return mucwin_get_string(mucwin);
}
case WIN_MUC_CONFIG:
case WIN_CONFIG:
{
ProfMucConfWin *mucconfwin = (ProfMucConfWin*)window;
return mucconfwin_get_string(mucconfwin);
ProfConfWin *confwin = (ProfConfWin*)window;
return confwin_get_string(confwin);
}
case WIN_PRIVATE:
{
@@ -491,11 +491,11 @@ win_free(ProfWin* window)
free(mucwin->message_char);
break;
}
case WIN_MUC_CONFIG:
case WIN_CONFIG:
{
ProfMucConfWin *mucconf = (ProfMucConfWin*)window;
free(mucconf->roomjid);
form_destroy(mucconf->form);
ProfConfWin *conf = (ProfConfWin*)window;
free(conf->roomjid);
form_destroy(conf->form);
break;
}
case WIN_PRIVATE:
@@ -1389,8 +1389,8 @@ _win_print(ProfWin *window, const char show_char, int pad_indent, GDateTime *tim
case WIN_MUC:
time_pref = prefs_get_string(PREF_TIME_MUC);
break;
case WIN_MUC_CONFIG:
time_pref = prefs_get_string(PREF_TIME_MUCCONFIG);
case WIN_CONFIG:
time_pref = prefs_get_string(PREF_TIME_CONFIG);
break;
case WIN_PRIVATE:
time_pref = prefs_get_string(PREF_TIME_PRIVATE);