mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-20 21:36:22 +00:00
Show name in statusbar tabs WIP
This commit is contained in:
@@ -125,6 +125,7 @@ win_create_console(void)
|
||||
{
|
||||
ProfConsoleWin *new_win = malloc(sizeof(ProfConsoleWin));
|
||||
new_win->window.type = WIN_CONSOLE;
|
||||
new_win->window.tab_name = strdup("console");
|
||||
new_win->window.layout = _win_create_split_layout();
|
||||
|
||||
return &new_win->window;
|
||||
@@ -135,6 +136,7 @@ win_create_chat(const char *const barejid)
|
||||
{
|
||||
ProfChatWin *new_win = malloc(sizeof(ProfChatWin));
|
||||
new_win->window.type = WIN_CHAT;
|
||||
new_win->window.tab_name = strdup(barejid);
|
||||
new_win->window.layout = _win_create_simple_layout();
|
||||
|
||||
new_win->barejid = strdup(barejid);
|
||||
@@ -162,6 +164,7 @@ win_create_muc(const char *const roomjid)
|
||||
int cols = getmaxx(stdscr);
|
||||
|
||||
new_win->window.type = WIN_MUC;
|
||||
new_win->window.tab_name = strdup(roomjid);
|
||||
|
||||
ProfLayoutSplit *layout = malloc(sizeof(ProfLayoutSplit));
|
||||
layout->base.type = LAYOUT_SPLIT;
|
||||
@@ -207,6 +210,7 @@ win_create_muc_config(const char *const roomjid, DataForm *form)
|
||||
{
|
||||
ProfMucConfWin *new_win = malloc(sizeof(ProfMucConfWin));
|
||||
new_win->window.type = WIN_MUC_CONFIG;
|
||||
new_win->window.tab_name = strdup(roomjid);
|
||||
new_win->window.layout = _win_create_simple_layout();
|
||||
|
||||
new_win->roomjid = strdup(roomjid);
|
||||
@@ -222,6 +226,7 @@ win_create_private(const char *const fulljid)
|
||||
{
|
||||
ProfPrivateWin *new_win = malloc(sizeof(ProfPrivateWin));
|
||||
new_win->window.type = WIN_PRIVATE;
|
||||
new_win->window.tab_name = strdup(fulljid);
|
||||
new_win->window.layout = _win_create_simple_layout();
|
||||
|
||||
new_win->fulljid = strdup(fulljid);
|
||||
@@ -239,6 +244,7 @@ win_create_xmlconsole(void)
|
||||
{
|
||||
ProfXMLWin *new_win = malloc(sizeof(ProfXMLWin));
|
||||
new_win->window.type = WIN_XML;
|
||||
new_win->window.tab_name = strdup("xmlconsole");
|
||||
new_win->window.layout = _win_create_simple_layout();
|
||||
|
||||
new_win->memcheck = PROFXMLWIN_MEMCHECK;
|
||||
@@ -250,15 +256,16 @@ ProfWin*
|
||||
win_create_plugin(const char *const plugin_name, const char *const tag)
|
||||
{
|
||||
ProfPluginWin *new_win = malloc(sizeof(ProfPluginWin));
|
||||
new_win->super.type = WIN_PLUGIN;
|
||||
new_win->super.layout = _win_create_simple_layout();
|
||||
new_win->window.type = WIN_PLUGIN;
|
||||
new_win->window.tab_name = strdup(plugin_name);
|
||||
new_win->window.layout = _win_create_simple_layout();
|
||||
|
||||
new_win->tag = strdup(tag);
|
||||
new_win->plugin_name = strdup(plugin_name);
|
||||
|
||||
new_win->memcheck = PROFPLUGINWIN_MEMCHECK;
|
||||
|
||||
return &new_win->super;
|
||||
return &new_win->window;
|
||||
}
|
||||
|
||||
char*
|
||||
@@ -416,6 +423,7 @@ win_show_subwin(ProfWin *window)
|
||||
void
|
||||
win_free(ProfWin* window)
|
||||
{
|
||||
free(window->tab_name);
|
||||
if (window->layout->type == LAYOUT_SPLIT) {
|
||||
ProfLayoutSplit *layout = (ProfLayoutSplit*)window->layout;
|
||||
if (layout->subwin) {
|
||||
|
||||
Reference in New Issue
Block a user