ctk_window_close(&runwindow);
EK_EVENTHANDLER(program_handler_eventhandler, ev, data){#ifdef WITH_LOADER_ARCH  unsigned char err;  struct dsc *dsc;#endif /* WITH_LOADER_ARCH */  unsigned char i;  struct dsc **dscp;  /*  DISPATCHER_SIGHANDLER_ARGS(s, data);*/  EK_EVENTHANDLER_ARGS(ev, data);  if(ev == EK_EVENT_INIT) {    /* Create the menus */    ctk_menu_add(&contikimenu);#if WITH_LOADER_ARCH    runmenuitem = ctk_menuitem_add(&contikimenu, "Run program...");    make_windows();#endif /* WITH_LOADER_ARCH */            displayname = NULL;    screensaver[0] = 0;  } else if(ev == ctk_signal_button_activate) {#ifdef WITH_LOADER_ARCH    if(data == (ek_data_t)&loadbutton) {      ctk_window_close(&runwindow);      program_handler_load(name, NULL);    } else if(data == (ek_data_t)&errorokbutton) {      ctk_dialog_close();    }#endif /* WITH_LOADER_ARCH */    dscp = &contikidsc[0];    for(i = 0; i < CTK_CONF_MAXMENUITEMS; ++i) {          if(*dscp != NULL &&	 data == (ek_data_t)(*dscp)->icon) {	RUN((*dscp)->prgname, (*dscp)->init, NULL);	break;      }      ++dscp;    }  } else if(ev == ctk_signal_menu_activate) {    if((struct ctk_menu *)data == &contikimenu) {#if WITH_LOADER_ARCH      dsc = contikidsc[contikimenu.active];      if(dsc != NULL) {	RUN(dsc->prgname, dsc->init, NULL);      } else if(contikimenu.active == runmenuitem) {	make_windows();	ctk_window_open(&runwindow);	CTK_WIDGET_FOCUS(&runwindow, &nameentry);      }#else /* WITH_LOADER_ARCH */      if(contikidsc[contikimenu.active] != NULL) {	RUN(contikidsc[contikimenu.active]->prgname,	    contikidsc[contikimenu.active]->init,	    NULL);      }#endif /* WITH_LOADER_ARCH */    }#if CTK_CONF_SCREENSAVER  } else if(ev == ctk_signal_screensaver_start) {#if WITH_LOADER_ARCH    if(screensaver[0] != 0) {      program_handler_load(screensaver, NULL);    }#endif /* WITH_LOADER_ARCH */#endif /* CTK_CONF_SCREENSAVER */  } else if(ev == LOADER_EVENT_DISPLAY_NAME) {#if WITH_LOADER_ARCH    if(displayname == NULL) {      make_windows();      ctk_label_set_text(&loadingname, ((struct pnarg *)data)->name);      ctk_dialog_open(&loadingdialog);      /*      dispatcher_emit(loader_signal_load, data, id);*/      ek_post(id, LOADER_EVENT_LOAD, data);      displayname = data;    } else {      /* Try again. */      /*      dispatcher_emit(loader_signal_display_name, data, id);*/      ek_post(id, LOADER_EVENT_DISPLAY_NAME, data);    }#endif /* WITH_LOADER_ARCH */  } else if(ev == LOADER_EVENT_LOAD) {#if WITH_LOADER_ARCH    if(displayname == data) {      ctk_dialog_close();      displayname = NULL;      log_message("Loading ", ((struct pnarg *)data)->name);      err = LOADER_LOAD(((struct pnarg *)data)->name,			((struct pnarg *)data)->arg);      if(err != LOADER_OK) {	make_windows();	errorfilename[0] = '"';	strncpy(errorfilename + 1, ((struct pnarg *)data)->name,		sizeof(errorfilename) - 2);	errorfilename[1 + strlen(((struct pnarg *)data)->name)] = '"';	ctk_label_set_text(&errortype, (char *)errormsgs[err]);	ctk_dialog_open(&errordialog);	log_message((char *)errormsgs[err], errorfilename);      }      pnarg_free(data);    } else {      /* Try again. *//*      dispatcher_emit(loader_signal_display_name, data, id);*/      ek_post(id, LOADER_EVENT_DISPLAY_NAME, data);    }#endif /* WITH_LOADEER_ARCH */  } }