Remove plugin window on /close

This commit is contained in:
James Booth
2016-07-12 02:16:12 +01:00
parent 1a7eb00763
commit 5f393a6d9f
11 changed files with 28 additions and 7 deletions

View File

@@ -344,7 +344,7 @@ ProfWin* win_create_chat(const char *const barejid);
ProfWin* win_create_muc(const char *const roomjid);
ProfWin* win_create_muc_config(const char *const title, DataForm *form);
ProfWin* win_create_private(const char *const fulljid);
ProfWin* win_create_plugin(const char *const tag);
ProfWin* win_create_plugin(const char *const plugin_name, const char *const tag);
void win_update_virtual(ProfWin *window);
void win_free(ProfWin *window);
gboolean win_notify_remind(ProfWin *window);

View File

@@ -190,6 +190,7 @@ typedef struct prof_xml_win_t {
typedef struct prof_plugin_win_t {
ProfWin super;
char *tag;
char *plugin_name;
unsigned long memcheck;
} ProfPluginWin;

View File

@@ -238,13 +238,14 @@ win_create_xmlconsole(void)
}
ProfWin*
win_create_plugin(const char *const tag)
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->tag = strdup(tag);
new_win->plugin_name = strdup(plugin_name);
new_win->memcheck = PROFPLUGINWIN_MEMCHECK;