Commit c06abeb2 authored by claes's avatar claes

Option print disable, and minor layout modifications

parent ac05ff75
......@@ -65,6 +65,11 @@ void *CnvXtthelpToPs::insert( navh_eItemType item_type, char *text1,
navh_eHelpFile file_type, int help_index,
char *bookmark)
{
if ( option & ps_mOption_printDisable &&
item_type != navh_eItemType_Option)
return NULL;
if ( (text2 && strcmp(text2, "") != 0) ||
(text3 && strcmp(text3, "") != 0) ) {
if ( !(status & ps_mStatus_table))
......@@ -271,6 +276,7 @@ void *CnvXtthelpToPs::insert( navh_eItemType item_type, char *text1,
tops.print_text( str, tops.style[tops.ci].link,
ps_mPrintMode_End | ps_mPrintMode_FixX);
else {
#if 0
if ( !(text3 && strcmp(text3, "") != 0)) {
tops.x = ps_cLeftMargin + 2 * ps_cCellSize;
if ( ps_cLeftMargin + ps_cCellSize + strlen(text2) * hstyle->font_size * 0.5 > tops.x)
......@@ -283,6 +289,7 @@ void *CnvXtthelpToPs::insert( navh_eItemType item_type, char *text1,
}
tops.print_text( str, tops.style[tops.ci].link,
ps_mPrintMode_KeepY | ps_mPrintMode_FixX);
#endif
}
}
}
......@@ -326,6 +333,14 @@ void *CnvXtthelpToPs::insert( navh_eItemType item_type, char *text1,
printf( "Image: %s not found\n", text1);
return NULL;
}
case navh_eItemType_Option:
{
if ( strcmp( text1, "printdisable") == 0)
option |= ps_mOption_printDisable;
else if ( strcmp( text1, "printenable") == 0)
option &= ~ps_mOption_printDisable;
return NULL;
}
default:
return 0;
}
......
......@@ -28,11 +28,15 @@ typedef enum {
ps_mStatus_topic = 1 << 3
} ps_mStatus;
typedef enum {
ps_mOption_printDisable = 1 << 0
} ps_mOption;
class CnvXtthelpToPs : public CnvXtthelpTo {
public:
CnvXtthelpToPs( CnvCtx *cnv_ctx) :
ctx(cnv_ctx), base_ci(0), first_topic(1), user_style(0), status(0),
conf_pass(false)
conf_pass(false), option(0)
{
strcpy( current_subject, "");
}
......@@ -67,6 +71,7 @@ class CnvXtthelpToPs : public CnvXtthelpTo {
unsigned int status;
bool conf_pass;
char current_subject[80];
unsigned int option;
};
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment