Archive: Modern User Interface 1.6


Modern User Interface 1.6
  Finally...Modern UI 1.6 is ready!

New Welcome and Finish pages with automatic 'Ask for Reboot', 'Run Program' and 'Show Readme' options! :D

http://nsis.sourceforge.net/modernui-1.png

http://nsis.sourceforge.net/modernui-2.png

Grab the latest version from CVS or download a snapshot at http://nsis.sourceforge.net/nightly/nsis.zip

Translations

All language files need to be updated again :) Please post your updated files here:
http://forums.winamp.com/showthread.php?threadid=108831

Note that also existing strings have been updated.

Thanks ;)


Very nice! You should have called it Modern UI 2.0 :)


Bug:
Caption of the button in finish dialog is always "Finish"


Some language files don't have this string yet. German is one of them.


No, it's not because of the language file.
I changed the German language file.
Still "Finish" when using Dutch language file which is in the new format with the new strings.


Another bug in ModernUI 1.16:

If I use language files (German, English), let the user select the language on .onInit and use !insertmacro MUI_WELCOMEFINISHPAGE_INIT then the window text is always the German one.
All button captions and following pages are alright but not the welcome page.

Ramon


The last one happens because MUI_WELCOMEFINISHPAGE_INIT should be in SetWelcome and not .onInit. We'll fix both of the problems later, hopefully tomorrow.


Thanks for your bugreports. Fixed 'em all :D

You don't even have to insert the init macro anymore, the Modern UI does it for you.


It works now.
Thanks.

NSIS 2 is great. Easy to use.
Keep on the track.


Another small bug (at least I think ;))

At the MUI_STARTMENU_WRITE_BEGIN of system.nsh, it should compare with >, not ^, ie


StrCmp ${MUI_TEMP1} ">" no_startmenu_shortcuts 

>
because the dll returns the name with > in front, not ^

Thanks, fixed :)

I have updated the Modern UI to use the default shell font for the texts and Verdana for the titles on the Welcome/Finish pages.

A new NSIS version without the DIALOGEX bug will be uploaded when SF CVS is up again.


Maybe its just me, but none of the Modern UI examples work (current cvs). They all compile but when executed nothing is shown.


Originally posted by rainwater
Maybe its just me, but none of the Modern UI examples work (current cvs). They all compile but when executed nothing is shown.
Same here.

All ok here.

P.S:
StartMenu.nsi and WelcomeFinish.nsi are always missed.
Please add them into the makensis.nsi. :)


As I already said, there was a DIALOGEX bug in NSIS's ChangeUI.

SourceForge CVS was down yesterday, so kichik could not upload te fixed version.

I have uploaded a fixed makensis.exe now :) The sources will be updated when kichik is back online.


Sources uploaded.


Help needed.
I insert language macro (i don't use multilanguage), but I can't chagne strings (when I specify, it doesn't change).

Three strings I need to change: DirText, LicenseText and ComponentText. Anyone can help?


Have a look at the Readme :D

Example:


!define MUI_INNERTEXT_LICENSE_TOP "Text on the top of the license dialog"
!insertmacro MUI_LANGUAGE "English"

Originally posted by Joost Verburg
Have a look at the Readme :D

Example:


!define MUI_INNERTEXT_LICENSE_TOP "Text on the top of the license dialog"
!insertmacro MUI_LANGUAGE "English"
I will try again.

OK, works now - I figured where problem was. I needed to use "" quotes instead of ''. Why? (NSIS recognizes both of them).


What do you mean?

Both


!define MUI_INNERTEXT_LICENSE_TOP "Text on the top of the license dialog"
and

!define MUI_INNERTEXT_LICENSE_TOP 'Text on the top of the license dialog'
work.

If you are using ' chars in your string, you should use double quotes.

'What's new' won't work, you should use "What's new".

Originally posted by Joost Verburg
What do you mean?

Both

!define MUI_INNERTEXT_LICENSE_TOP "Text on the top of the license dialog"
and

!define MUI_INNERTEXT_LICENSE_TOP 'Text on the top of the license dialog'
work.

If you are using ' chars in your string, you should use double quotes.

'What's new' won't work, you should use "What's new".
I had this situation
!define MUI_INNERTEXT_LICENSE_TOP 'blah blah "blah" blah blah'
and it didn't work. When I changed to this:
!define MUI_INNERTEXT_LICENSE_TOP "blah blah 'blah' blah blah"
It worked.

Weird.

The Modern UI gets that value without the quotes. Because it has might contain spaces, it adds "" around it.

Example: "${VALUE}"

I'll update the Modern UI to use ` (that's not ') instead of ".


Originally posted by Joost Verburg
The Modern UI gets that value without the quotes. Because it has might contain spaces, it adds "" around it.

Example: "${VALUE}"

I'll update the Modern UI to use ` (that's not ') instead of ".
Can you update to use both of them or all three?

Using ` gives problems with the Japanese language.

Maybe we can find a method to escape ". I'll have a look at it tomorrow.


Please tell me if I'm wrong, but in some languages they use << instead of " e.g.
<<Nullsoft>>

<< is supposed to be one character.


Other possibilities are " \"text\" " and " ""text"" ".


Or, like in C++, like this:

"And he said /"Hello there!/""

with a /" before the " when it is a 'real' character.


Originally posted by virtlink
Please tell me if I'm wrong, but in some languages they use << instead of " e.g.
<<Nullsoft>>

<< is supposed to be one character.
It's « Nullsoft » :)

That's exactly what I meant. « N.I.C.E. », but I couldn't find it on my keyboard.


Ready :D Use $\" to add a double quote.


Of course $\' and $\` work too...


Yep, but you don't need to use them in the Modern UI. The Modern UI macro's use " to separate parameters.


C:\Program Files\NSIS\Contrib\Modern UI\Readme.html

There is no second image which is in HTML file, but not in directory.

Removed or should be there?


That file exists on CVS but I forgot to add it to the installer. Fixed :D


Since working with the Modern-UI is much different than working with 'normal' NSIS scripting, I suggest that you add an extra chapter to the manual about working with the Modern-UI. How to write strings (with or without `, ', ", $/", etc..), how to change the things that normally can be changed by 'standard' NSIS instructions etc..


Everything is already in the Modern UI Readme (Contrib\Modern UI\Readme.html).


Didn't notice it before ;) .


can i still use older versions of ModernUI, by keeping the old files?

if so, do i need any other files than WinMessages.nsh and ModernUI.nsh (will rename them of course, so they dont get overwritten)?

could there be compilation errors if i keep ModernUI 1.4?


You can still use 1.4 if you keep all the files (macros, graphics, examples). Older versions are not compatble with beta 0.

But there are quite some bugs in version 1.4 which have been fixed later, so upgrading is really recommanded. You only have to make some very small changes.

Other example scripts like makensis.nsi also won't work with 1.4.