diff options
author | James Booth <boothj5@gmail.com> | 2016-07-12 02:16:12 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2016-07-12 02:16:12 +0100 |
commit | 5f393a6d9f995a9be86923f24e8b634a7a9d4ed9 (patch) | |
tree | 5735138d37f5952b255dea210d5a4b62496af40e /src/window_list.c | |
parent | 1a7eb0076395faf9be1fcd0f5b076b3156693f37 (diff) | |
download | profani-tty-5f393a6d9f995a9be86923f24e8b634a7a9d4ed9.tar.gz |
Remove plugin window on /close
Diffstat (limited to 'src/window_list.c')
-rw-r--r-- | src/window_list.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/window_list.c b/src/window_list.c index 0f90ac6b..af17f405 100644 --- a/src/window_list.c +++ b/src/window_list.c @@ -580,6 +580,7 @@ wins_close_by_num(int i) case WIN_PLUGIN: { ProfPluginWin *pluginwin = (ProfPluginWin*)window; + plugins_close_win(pluginwin->plugin_name, pluginwin->tag); autocomplete_remove(wins_ac, pluginwin->tag); autocomplete_remove(wins_close_ac, pluginwin->tag); break; @@ -681,12 +682,12 @@ wins_new_private(const char *const fulljid) } ProfWin * -wins_new_plugin(const char * const tag) +wins_new_plugin(const char *const plugin_name, const char * const tag) { GList *keys = g_hash_table_get_keys(windows); int result = get_next_available_win_num(keys); g_list_free(keys); - ProfWin *newwin = win_create_plugin(tag); + ProfWin *newwin = win_create_plugin(plugin_name, tag); g_hash_table_insert(windows, GINT_TO_POINTER(result), newwin); autocomplete_add(wins_ac, tag); autocomplete_add(wins_close_ac, tag); |