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, ...@@ -65,6 +65,11 @@ void *CnvXtthelpToPs::insert( navh_eItemType item_type, char *text1,
navh_eHelpFile file_type, int help_index, navh_eHelpFile file_type, int help_index,
char *bookmark) char *bookmark)
{ {
if ( option & ps_mOption_printDisable &&
item_type != navh_eItemType_Option)
return NULL;
if ( (text2 && strcmp(text2, "") != 0) || if ( (text2 && strcmp(text2, "") != 0) ||
(text3 && strcmp(text3, "") != 0) ) { (text3 && strcmp(text3, "") != 0) ) {
if ( !(status & ps_mStatus_table)) if ( !(status & ps_mStatus_table))
...@@ -271,6 +276,7 @@ void *CnvXtthelpToPs::insert( navh_eItemType item_type, char *text1, ...@@ -271,6 +276,7 @@ void *CnvXtthelpToPs::insert( navh_eItemType item_type, char *text1,
tops.print_text( str, tops.style[tops.ci].link, tops.print_text( str, tops.style[tops.ci].link,
ps_mPrintMode_End | ps_mPrintMode_FixX); ps_mPrintMode_End | ps_mPrintMode_FixX);
else { else {
#if 0
if ( !(text3 && strcmp(text3, "") != 0)) { if ( !(text3 && strcmp(text3, "") != 0)) {
tops.x = ps_cLeftMargin + 2 * ps_cCellSize; tops.x = ps_cLeftMargin + 2 * ps_cCellSize;
if ( ps_cLeftMargin + ps_cCellSize + strlen(text2) * hstyle->font_size * 0.5 > tops.x) 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, ...@@ -283,6 +289,7 @@ void *CnvXtthelpToPs::insert( navh_eItemType item_type, char *text1,
} }
tops.print_text( str, tops.style[tops.ci].link, tops.print_text( str, tops.style[tops.ci].link,
ps_mPrintMode_KeepY | ps_mPrintMode_FixX); ps_mPrintMode_KeepY | ps_mPrintMode_FixX);
#endif
} }
} }
} }
...@@ -326,6 +333,14 @@ void *CnvXtthelpToPs::insert( navh_eItemType item_type, char *text1, ...@@ -326,6 +333,14 @@ void *CnvXtthelpToPs::insert( navh_eItemType item_type, char *text1,
printf( "Image: %s not found\n", text1); printf( "Image: %s not found\n", text1);
return NULL; 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: default:
return 0; return 0;
} }
......
...@@ -28,11 +28,15 @@ typedef enum { ...@@ -28,11 +28,15 @@ typedef enum {
ps_mStatus_topic = 1 << 3 ps_mStatus_topic = 1 << 3
} ps_mStatus; } ps_mStatus;
typedef enum {
ps_mOption_printDisable = 1 << 0
} ps_mOption;
class CnvXtthelpToPs : public CnvXtthelpTo { class CnvXtthelpToPs : public CnvXtthelpTo {
public: public:
CnvXtthelpToPs( CnvCtx *cnv_ctx) : CnvXtthelpToPs( CnvCtx *cnv_ctx) :
ctx(cnv_ctx), base_ci(0), first_topic(1), user_style(0), status(0), 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, ""); strcpy( current_subject, "");
} }
...@@ -67,6 +71,7 @@ class CnvXtthelpToPs : public CnvXtthelpTo { ...@@ -67,6 +71,7 @@ class CnvXtthelpToPs : public CnvXtthelpTo {
unsigned int status; unsigned int status;
bool conf_pass; bool conf_pass;
char current_subject[80]; char current_subject[80];
unsigned int option;
}; };
#endif #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