From a952776b899dd29056ad6779b14dab75a4125924 Mon Sep 17 00:00:00 2001 From: Paul Fariello Date: Wed, 11 Apr 2018 22:17:50 +0520 Subject: Rename mucconf wins into conf wins Configuration windows are now being used by both muc and cmd. --- src/ui/window.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'src/ui/window.c') diff --git a/src/ui/window.c b/src/ui/window.c index a6f65d1b..16cd9490 100644 --- a/src/ui/window.c +++ b/src/ui/window.c @@ -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); -- cgit 1.4.1-2-gfad0