diff options
author | Timo Sirainen <cras@irssi.org> | 2002-06-04 20:47:36 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2002-06-04 20:47:36 +0000 |
commit | 1c2be864ee0e8cdfe44b9d4a05b621faca441d04 (patch) | |
tree | 1d24f96d32ea444ebae43a4c8772a79693c29661 /src | |
parent | 8d41e24b58ed5b4111b80042754d38ecb4cff1bb (diff) | |
download | irssi-1c2be864ee0e8cdfe44b9d4a05b621faca441d04.zip |
/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
Diffstat (limited to 'src')
-rw-r--r-- | src/fe-common/core/fe-exec.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/fe-common/core/fe-exec.c b/src/fe-common/core/fe-exec.c index 8c23072c..a93f185c 100644 --- a/src/fe-common/core/fe-exec.c +++ b/src/fe-common/core/fe-exec.c @@ -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); |