mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
/exec -interactive window items didn't have get_target() which crashed
irssi at some point if they were used. patch by peder. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2834 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
8d41e24b58
commit
1c2be864ee
@ -58,6 +58,11 @@ static void exec_wi_destroy(EXEC_WI_REC *rec)
|
||||
g_free(rec);
|
||||
}
|
||||
|
||||
static const char *exec_get_target(WI_ITEM_REC *item)
|
||||
{
|
||||
return ((EXEC_WI_REC *) item)->visible_name;
|
||||
}
|
||||
|
||||
static EXEC_WI_REC *exec_wi_create(WINDOW_REC *window, PROCESS_REC *rec)
|
||||
{
|
||||
EXEC_WI_REC *item;
|
||||
@ -68,6 +73,7 @@ static EXEC_WI_REC *exec_wi_create(WINDOW_REC *window, PROCESS_REC *rec)
|
||||
item = g_new0(EXEC_WI_REC, 1);
|
||||
item->type = module_get_uniq_id_str("WINDOW ITEM TYPE", "EXEC");
|
||||
item->destroy = (void (*) (WI_ITEM_REC *)) exec_wi_destroy;
|
||||
item->get_target = exec_get_target;
|
||||
item->visible_name = rec->name != NULL ? g_strdup(rec->name) :
|
||||
g_strdup_printf("%%%d", rec->id);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user