Archive: Problems with latest CVS build and Modern UI


Problems with latest CVS build and Modern UI
Hi!

I'm having a couple of problems with the latest CVS build of NSIS, using Modern UI, and I'm not sure if it's something I need to change in my code.

1) The subtitle text in the window titlebar for each page is back when before I could just use Caption "${MUI_TITLE}" to disable it.

2) I've been using SetFont to change the font used on each page. That still works fine for all pages except for the inner dialog text on the license page, which stays at 8-point tahoma/ms sans serif/whatever.

3) Using !define MUI_BRANDINGTEXT " " no longer works. The default branding text is there, regardless.

I've put the !define's for the settings for each page before the !insertmacro command for the pages (which solved a few errors), but no idea what to do now....

Any ideas?

Thanks in advance..

Brad.


Well, I've resolved 1) and 3), but am having no luck with 2). Is this an oversight in the Modern UI code, or could I be doing something wrong? I'm guessing that SetFont should set the font for all pages, like it has previously....

Regards,

Brad.


http://forums.winamp.com/showthread....hreadid=148146


I've one problem:
I want one license page but the license file should depend on the language.
How can I do this with the latest Snapshot?


LicenseLangString.


Thanks,
I'll try.


I'm using the following code:

LangString LicenseLangString ${LANG_ENGLISH} "License.rtf"
LangString LicenseLangString ${LANG_GERMAN} "Lizenz.rtf"
!define MUI_LICENSEPAGE_RADIOBUTTONS
!insertmacro MUI_PAGE_LICENSE LicenseLangString

I get only:

LicenseData: open failed "LicenseLangString"
Usage: LicenseData local_file_that_has_license_text | license_lang_string
Error in macro MUI_PAGE_LICENSE on macroline 15


The command LicenseLangString...

LinceseLangString myLicense ${LANG_ENGLISH} "license.rtf"
LinceseLangString myLicense ${LANG_GERMAN} "license-german.rtf"

LicenseData $(myLicesnse)
or
!insertmacro MUI_PAGE_LICENSE $(myLicense)


Ok, can you perhaps give me a whole example.

If I try to use LicenseLangString before the Language loading I get "LicenseLangString "myLicense" set multiple times for 0, wasting space (...)".
So it doesn't load the license and the field is blank.

If I use the code after language initialisation it's blank cause it's after the !insertmacro MUI_PAGE_LICENSE $(myLicense)

If I use the language initialisation before the page command I'm getting one warning after the other that some strings are missing and many fields are blank.


Fixed in latest CVS version.

It wasn't because you've defined the LangString after you've used it, you should be able to do that. The right way is to use the LangString created by LicenseLangString before you set it.


Hi Joost,

Followed the link you gave, but I'm not sure how or where it'll help me resolve the issue I'm having.

It seems that for whatever reason, I'm unable to change the font on the license page, whereas every other page is displayed fine. I've put all the page settings before inserting the page, but other than that, it has worked as it should in the past. I've attached my nsi file. Any ideas?

Thanks in advance.

Brad.


Assuming you are talking only about the license data itself your answer is that RTF has its own font settings. To change the font for the license data you should change the RTF or use a text file instead.


Thanks kichik, but no, I'm referring to the inner dialog text on the license page. (sorry, should have been clearer). The header text and button text are fine, and the overall width of the window is fine to match the other pages. I've attached a screenshot of the page to show you what I mean.


Fixed in latest CVS version. I have also improved SetFont so you can set a different font for every language from the script.


>> Using !define MUI_BRANDINGTEXT no longer works.

i can copy this :(
CVS from this morning.


You should use the normal BrandingText command.


huh?

Important: Because the Modern UI has its own macro system, its own default settings and a lot of new features, the interface configuration works differently. So you should not use commands like Icon, BrandingText etc.

I'll change that. Because of the new langauge stuff, the Modern UI doesn't need it own BrandingText setting anymore.


@Joost

the change must be somewhere between 30-08 and 03-09.

all versions from september has bugs like "brandingtext has already been defined"

the version from 30-08 works fine here - i have to step back to get all my scripts so far to work.

little bit disappointed and angry about that.


Please read http://forums.winamp.com/showthread....hreadid=148146

A lot has changed, you should not use MUI_BRANDINGTEXT anymore. You should also make other changes to make your script compatible (as descriped in that topic).


Thanks, everyone!

Now it works as before.

Just one other query: I've been experimenting with SetCtlColors, and have been able to set the background colour of all things on all pages except for two problems:

How do you set the background colour of the inner dialog of the start menu page? Becuase it doesn't have a custom show page, is it possible at all?

Also, how do you set the background colour of the branding text without the horizontal bevelled line disappearing altogether. Using the following example in the documentation does just that:


Function .onGUIInit
# 1028 is the id of the branding text control
GetDlgItem $R0 $HWNDPARENT 1028
CreateFont $R1 "Tahoma" 10 700
SendMessage $R0 ${WM_SETFONT} $R1 0
# set background color to white and text color to red
SetCtlColors $R0 FFFFFF FF0000
FunctionEnd


Thanks again.

Brad.

As for the StartMenu, not yet. See http://sourceforge.net/tracker/index...49&atid=373088

For the branding in the MUI you need to set the background to control number 1256. I have added an option in latest CVS to combine both colors and /BRANDING. Use:

GetDlgItem $0 $HWNDPARENT 1256
SetCtlColors $0 /BRANDING FF0000


I've updated my kit to use:

LicenseLangString myLicense ${LANG_ENGLISH} "license/en/license.txt"
...
but i want to copy it to the install dir BUT if I try:

File $(myLicense)

it tell that file does not exists!!

How do I resolve this problem ?
(Did I mention, the license is working and it's loaded in the kit but i need to copy it to the destionation foloder and create a link to it)


$(myLicense) contains the text of the license and is a runtime "variable". You would have to copy the right license according to the language select (StrCmp $LANGUAGE ...).


Imagine that now I have 5 languages and the list will grow soon. Do I have to include assembles style if/else code for every change?
I think we need a better way, quick.

Any ideea?


You can always create a nice little macro.