BOOL XAP_Win32Dialog_HTMLOptions::_onInitDialog(HWND /*hWnd*/, WPARAM /*wParam*/, LPARAM /*lParam*/)
{
	localizeDialogTitle(XAP_STRING_ID_DLG_HTMLOPT_ExpTitle);

	// localize controls
	localizeControlText(XAP_RID_DIALOG_HTMLOPTIONS_LBL,			XAP_STRING_ID_DLG_HTMLOPT_ExpLabel);
	localizeControlText(XAP_RID_DIALOG_HTMLOPTIONS_CHK_HTML4,	XAP_STRING_ID_DLG_HTMLOPT_ExpIs4);
	localizeControlText(XAP_RID_DIALOG_HTMLOPTIONS_CHK_PHP,		XAP_STRING_ID_DLG_HTMLOPT_ExpAbiWebDoc);
	localizeControlText(XAP_RID_DIALOG_HTMLOPTIONS_CHK_XML,		XAP_STRING_ID_DLG_HTMLOPT_ExpDeclareXML);
	localizeControlText(XAP_RID_DIALOG_HTMLOPTIONS_CHK_AWML,	XAP_STRING_ID_DLG_HTMLOPT_ExpAllowAWML);
	localizeControlText(XAP_RID_DIALOG_HTMLOPTIONS_CHK_EMBEDCSS,XAP_STRING_ID_DLG_HTMLOPT_ExpEmbedCSS);
	localizeControlText(XAP_RID_DIALOG_HTMLOPTIONS_CHK_URLIMAGE,XAP_STRING_ID_DLG_HTMLOPT_ExpEmbedImages);
	localizeControlText(XAP_RID_DIALOG_HTMLOPTIONS_CHK_PNGMATHML,XAP_STRING_ID_DLG_HTMLOPT_ExpMathMLRenderPNG);
	localizeControlText(XAP_RID_DIALOG_HTMLOPTIONS_CHK_SPLITFILE,XAP_STRING_ID_DLG_HTMLOPT_ExpSplitDocument);
	localizeControlText(XAP_RID_DIALOG_HTMLOPTIONS_BTN_SAVE,	XAP_STRING_ID_DLG_HTMLOPT_ExpSave);
	localizeControlText(XAP_RID_DIALOG_HTMLOPTIONS_BTN_RESTORE,	XAP_STRING_ID_DLG_HTMLOPT_ExpRestore);
	localizeControlText(XAP_RID_DIALOG_HTMLOPTIONS_BTN_OK,		XAP_STRING_ID_DLG_OK);
	localizeControlText(XAP_RID_DIALOG_HTMLOPTIONS_BTN_CANCEL,	XAP_STRING_ID_DLG_Cancel);

	// Set Initial conditions
	refreshStates();
	centerDialog();
	
	return 1;							// 1 == we did not call SetFocus()
}
Beispiel #2
0
BOOL AP_Win32Dialog_InsertHyperlink::_onInitDialog(HWND hWnd, WPARAM /*wParam*/, LPARAM /*lParam*/)
{
	// localize dialog title
	localizeDialogTitle(AP_STRING_ID_DLG_InsertHyperlink_Title);

	// localize controls
	localizeControlText(AP_RID_DIALOG_INSERTHYPERLINK_BTN_OK,		XAP_STRING_ID_DLG_OK);
	localizeControlText(AP_RID_DIALOG_INSERTHYPERLINK_BTN_CANCEL,	XAP_STRING_ID_DLG_Cancel);
	localizeControlText(AP_RID_DIALOG_INSERTHYPERLINK_LBL_MSG,		AP_STRING_ID_DLG_InsertHyperlink_Msg);

	// initial data
	resetContent(AP_RID_DIALOG_INSERTHYPERLINK_LBX_LINK);

	UT_uint32 count = getExistingBookmarksCount();
	for( UT_uint32 i = 0; i < count; i++)
	{
		addItemToList( AP_RID_DIALOG_INSERTHYPERLINK_LBX_LINK,
                       getNthExistingBookmark( i ) );
	}

	SetFocus(GetDlgItem(hWnd,AP_RID_DIALOG_INSERTHYPERLINK_EBX_LINK));

	const gchar * hyperlink = getHyperlink();

	if(hyperlink)
	{
		if(hyperlink[0]=='#')  //ignore the anchor for internal bookmarks
		{
			setControlText(AP_RID_DIALOG_INSERTHYPERLINK_EBX_LINK, hyperlink+1);
		}
		else
		{
			setControlText(AP_RID_DIALOG_INSERTHYPERLINK_EBX_LINK, hyperlink);
		}
		selectControlText(AP_RID_DIALOG_INSERTHYPERLINK_EBX_LINK, 0, -1);
	}

	centerDialog();	
	return 0; // 0 because we called set focus
}
BOOL XAP_Win32Dialog_PluginManager::_onInitDialog(HWND /*hWnd*/, WPARAM /*wParam*/, LPARAM /*lParam*/)
{		
	
	localizeDialogTitle(XAP_STRING_ID_DLG_PLUGIN_MANAGER_TITLE);

	/* Localise controls */	
	localizeControlText(IDOK,			XAP_STRING_ID_DLG_OK);
	localizeControlText(XAP_RID_DIALOG_PLUGIN_MANAGER_BTN_ACTIVE,		XAP_STRING_ID_DLG_PLUGIN_MANAGER_ACTIVE);
	localizeControlText(XAP_RID_DIALOG_PLUGIN_MANAGER_BTN_INSTALL,		XAP_STRING_ID_DLG_PLUGIN_MANAGER_INSTALL);			

	localizeControlText(XAP_RID_DIALOG_PLUGIN_MANAGER_LBL_NAME,			XAP_STRING_ID_DLG_PLUGIN_MANAGER_NAME);
	localizeControlText(XAP_RID_DIALOG_PLUGIN_MANAGER_LBL_DESCRIPTION,	XAP_STRING_ID_DLG_PLUGIN_MANAGER_DESC);
	localizeControlText(XAP_RID_DIALOG_PLUGIN_MANAGER_LBL_AUTHOR,		XAP_STRING_ID_DLG_PLUGIN_MANAGER_AUTHOR);
	localizeControlText(XAP_RID_DIALOG_PLUGIN_MANAGER_LBL_VERSION,		XAP_STRING_ID_DLG_PLUGIN_MANAGER_VERSION);

	refreshPluginList();	

	/* Default */
	selectListItem(XAP_RID_DIALOG_PLUGIN_MANAGER_LBX_LIST, 0);
	centerDialog();

	return 1;							// 1 == we did not call SetFocus()
}
BOOL XAP_Win32Dialog_WindowMore::_onInitDialog(HWND /*hWnd*/, WPARAM /*wParam*/, LPARAM /*lParam*/)
{
	// localize controls
	localizeDialogTitle(XAP_STRING_ID_DLG_MW_MoreWindows);

	localizeControlText(XAP_RID_DIALOG_WINDOWMORE_TEXT_ACTIVATE,	XAP_STRING_ID_DLG_MW_Activate);
	localizeControlText(XAP_RID_DIALOG_WINDOWMORE_BTN_OK,			XAP_STRING_ID_DLG_OK);
	localizeControlText(XAP_RID_DIALOG_WINDOWMORE_BTN_CANCEL,		XAP_STRING_ID_DLG_Cancel);

	// load each frame name into the list
	for (UT_sint32 i=0; i<m_pApp->getFrameCount(); i++)
	{
		XAP_Frame * f = m_pApp->getFrame(i);
		UT_continue_if_fail(f);

		int nIndex = addItemToList(XAP_RID_DIALOG_WINDOWMORE_LIST, f->getTitle().utf8_str());
		setListDataItem(XAP_RID_DIALOG_WINDOWMORE_LIST, nIndex, (DWORD) i);
     } 

	// select the one we're in
	selectListItem(XAP_RID_DIALOG_WINDOWMORE_LIST, m_ndxSelFrame);

	return 1;							// 1 == we did not call SetFocus()
}