mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Fix the help winodw size
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@105 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
e88650a9de
commit
5298a837c8
@ -187,7 +187,7 @@ helpWindow( Widget parent, char *title, char *htmlfile )
|
|||||||
Widget dialog,
|
Widget dialog,
|
||||||
pane,
|
pane,
|
||||||
controlform,
|
controlform,
|
||||||
actionform,
|
buttonform,
|
||||||
widget;
|
widget;
|
||||||
int position=0;
|
int position=0;
|
||||||
|
|
||||||
@ -208,10 +208,8 @@ helpWindow( Widget parent, char *title, char *htmlfile )
|
|||||||
XmNheight, 400,
|
XmNheight, 400,
|
||||||
XmNtransient, FALSE, /* allow window to be repositioned */
|
XmNtransient, FALSE, /* allow window to be repositioned */
|
||||||
|
|
||||||
/*
|
|
||||||
XmNminWidth, 500,
|
XmNminWidth, 500,
|
||||||
XmNminHeight, 400,
|
XmNminHeight, 200,
|
||||||
*/
|
|
||||||
NULL );
|
NULL );
|
||||||
|
|
||||||
XtAddCallback( dialog, XmNdestroyCallback, closeHelpWin, NULL );
|
XtAddCallback( dialog, XmNdestroyCallback, closeHelpWin, NULL );
|
||||||
@ -242,19 +240,16 @@ helpWindow( Widget parent, char *title, char *htmlfile )
|
|||||||
XmNbottomAttachment, XmATTACH_FORM,
|
XmNbottomAttachment, XmATTACH_FORM,
|
||||||
XmNleftAttachment, XmATTACH_FORM,
|
XmNleftAttachment, XmATTACH_FORM,
|
||||||
XmNrightAttachment, XmATTACH_FORM,
|
XmNrightAttachment, XmATTACH_FORM,
|
||||||
|
XmNwidth, 500,
|
||||||
|
XmNheight, 400,
|
||||||
NULL );
|
NULL );
|
||||||
|
|
||||||
XtAddCallback( helpwidget, WbNanchorCallback, helpAnchorCB, NULL );
|
XtAddCallback( helpwidget, WbNanchorCallback, helpAnchorCB, NULL );
|
||||||
|
|
||||||
XtManageChild( controlform );
|
|
||||||
|
|
||||||
/* we have to load the page after the widget is realized, so
|
|
||||||
* the pictures can be drawn */
|
|
||||||
XtVaSetValues( helpwidget, WbNtext, htmlRead(htmlfile), NULL );
|
|
||||||
|
|
||||||
/** ACTIONFORM ********************************************
|
/** ACTIONFORM ********************************************
|
||||||
* Create a Form actionform for action area of dialog box */
|
* Create a Form buttonform for action area of dialog box */
|
||||||
actionform = XtVaCreateWidget( "actionform",
|
buttonform = XtVaCreateWidget( "buttonform",
|
||||||
xmFormWidgetClass, pane,
|
xmFormWidgetClass, pane,
|
||||||
XmNfractionBase, 7,
|
XmNfractionBase, 7,
|
||||||
NULL );
|
NULL );
|
||||||
@ -262,7 +257,7 @@ helpWindow( Widget parent, char *title, char *htmlfile )
|
|||||||
|
|
||||||
/* The "Back" button */
|
/* The "Back" button */
|
||||||
widget = XtVaCreateManagedWidget( "Back",
|
widget = XtVaCreateManagedWidget( "Back",
|
||||||
xmPushButtonWidgetClass, actionform,
|
xmPushButtonWidgetClass, buttonform,
|
||||||
XmNtopAttachment, XmATTACH_FORM,
|
XmNtopAttachment, XmATTACH_FORM,
|
||||||
XmNbottomAttachment, XmATTACH_FORM,
|
XmNbottomAttachment, XmATTACH_FORM,
|
||||||
XmNleftAttachment, XmATTACH_POSITION,
|
XmNleftAttachment, XmATTACH_POSITION,
|
||||||
@ -277,7 +272,7 @@ helpWindow( Widget parent, char *title, char *htmlfile )
|
|||||||
/* The "Forward" button */
|
/* The "Forward" button */
|
||||||
position +=2;
|
position +=2;
|
||||||
widget = XtVaCreateManagedWidget( "Forward",
|
widget = XtVaCreateManagedWidget( "Forward",
|
||||||
xmPushButtonWidgetClass, actionform,
|
xmPushButtonWidgetClass, buttonform,
|
||||||
XmNtopAttachment, XmATTACH_FORM,
|
XmNtopAttachment, XmATTACH_FORM,
|
||||||
XmNbottomAttachment, XmATTACH_FORM,
|
XmNbottomAttachment, XmATTACH_FORM,
|
||||||
XmNleftAttachment, XmATTACH_POSITION,
|
XmNleftAttachment, XmATTACH_POSITION,
|
||||||
@ -292,7 +287,7 @@ helpWindow( Widget parent, char *title, char *htmlfile )
|
|||||||
/* The "Close" button */
|
/* The "Close" button */
|
||||||
position +=2;
|
position +=2;
|
||||||
widget = XtVaCreateManagedWidget( "Close",
|
widget = XtVaCreateManagedWidget( "Close",
|
||||||
xmPushButtonWidgetClass, actionform,
|
xmPushButtonWidgetClass, buttonform,
|
||||||
XmNtopAttachment, XmATTACH_FORM,
|
XmNtopAttachment, XmATTACH_FORM,
|
||||||
XmNbottomAttachment, XmATTACH_FORM,
|
XmNbottomAttachment, XmATTACH_FORM,
|
||||||
XmNleftAttachment, XmATTACH_POSITION,
|
XmNleftAttachment, XmATTACH_POSITION,
|
||||||
@ -304,16 +299,23 @@ helpWindow( Widget parent, char *title, char *htmlfile )
|
|||||||
|
|
||||||
XtAddCallback( widget, XmNactivateCallback, destroyShellCB, dialog );
|
XtAddCallback( widget, XmNactivateCallback, destroyShellCB, dialog );
|
||||||
|
|
||||||
|
XtManageChild( helpwidget );
|
||||||
|
|
||||||
|
/* we have to load the page after the widget is realized, so
|
||||||
|
* the pictures can be drawn ?? but its not realized yet! */
|
||||||
|
XtVaSetValues( helpwidget, WbNtext, htmlRead(htmlfile), NULL );
|
||||||
|
|
||||||
/* Fix action area of the pane to its current size, and not let it
|
/* Fix action area of the pane to its current size, and not let it
|
||||||
* resize. */
|
* resize. */
|
||||||
XtManageChild( actionform );
|
XtManageChild( buttonform );
|
||||||
|
|
||||||
{
|
{
|
||||||
Dimension h;
|
Dimension h;
|
||||||
XtVaGetValues( widget, XmNheight, &h, NULL );
|
XtVaGetValues( widget, XmNheight, &h, NULL );
|
||||||
XtVaSetValues( actionform, XmNpaneMaximum, h, XmNpaneMinimum, h, NULL );
|
XtVaSetValues( buttonform, XmNpaneMaximum, h, XmNpaneMinimum, h, NULL );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
XtManageChild( controlform );
|
||||||
XtManageChild( pane );
|
XtManageChild( pane );
|
||||||
XtPopup( dialog, XtGrabNone );
|
XtPopup( dialog, XtGrabNone );
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user