Feature #519 ยป 0054-Ruledit-Make-sure-there-s-editable-entry-in-helptext.patch
tools/ruledit/edit_impr.cpp | ||
---|---|---|
**************************************************************************/
|
||
void edit_impr::helptext()
|
||
{
|
||
open_help(impr->helptext);
|
||
open_help(&impr->helptext);
|
||
}
|
tools/ruledit/edit_tech.cpp | ||
---|---|---|
**************************************************************************/
|
||
void edit_tech::helptext()
|
||
{
|
||
open_help(tech->helptext);
|
||
open_help(&tech->helptext);
|
||
}
|
tools/ruledit/edit_utype.cpp | ||
---|---|---|
**************************************************************************/
|
||
void edit_utype::helptext()
|
||
{
|
||
open_help(utype->helptext);
|
||
open_help(&utype->helptext);
|
||
}
|
tools/ruledit/helpeditor.cpp | ||
---|---|---|
free(helps);
|
||
strvec_remove_empty(helptext);
|
||
done(0);
|
||
}
|
||
tools/ruledit/values_dlg.cpp | ||
---|---|---|
#include <fc_config.h>
|
||
#endif
|
||
// utility
|
||
#include "string_vector.h"
|
||
// ruledit
|
||
#include "helpeditor.h"
|
||
... | ... | |
/**********************************************************************//**
|
||
Open help editor
|
||
**************************************************************************/
|
||
void values_dlg::open_help(struct strvec *helptext)
|
||
void values_dlg::open_help(struct strvec **helptext)
|
||
{
|
||
if (help == nullptr && helptext != nullptr) {
|
||
help = new helpeditor(this, helptext);
|
||
if (help == nullptr) {
|
||
// Create the strvec if it does not exist
|
||
if (*helptext == nullptr) {
|
||
*helptext = strvec_new();
|
||
}
|
||
// Make sure there's at least one element to edit
|
||
if (strvec_size(*helptext) == 0) {
|
||
strvec_append(*helptext, "");
|
||
}
|
||
help = new helpeditor(this, *helptext);
|
||
help->show();
|
||
}
|
tools/ruledit/values_dlg.h | ||
---|---|---|
public:
|
||
values_dlg();
|
||
void open_help(struct strvec *help);
|
||
void open_help(struct strvec **help);
|
||
void close_help();
|
||
private:
|