Jump to content

Zagna

Members
  • Posts

    513
  • Joined

  • Last visited

  • Days Won

    4

Posts posted by Zagna

  1. Odd rounding when there shouldn't be any rounding?

    I was updating some of the help images and just doing misc stuff, then I chose rectangle select, fixed size and switched the inches to pixels and got weird results.

    The resolution was the standard 96px/inch and somehow the default 4 and 3 inches measurement ended up being 383.9976 pixels and 287.9972 pixels.

    Can't repro it now, but I'll try to keep a look out for it if it happens again.

    Edit: This is on Windows 7 Pro x64.

    Edit2: Opened those pics again and this time the result was 383.944 and 287.958.

    It's not that big of a problem but still odd?

  2. If anyone wants to use this, here's something little for plugin makers. I use this for finnish language pack install.

    Hidden Content:
    ; Paint.nsi
    ; NSIS Paint.NET Effect/Language Pack Installer template
    ;---------------------------------------
    SetCompressor /SOLID lzma
    
    ; http://nsis.sourceforge.net/NsProcess_plugin
    ; Not mandatory but useful
    !include "nsProcess.nsh"
    
    Name "Installer name"
    OutFile "Filename.exe"
    XPStyle on
    ShowInstDetails nevershow
    CRCCheck on
    Icon "Icon.ico"
    ; Choose your own from %ProgramFiles(x86)%\NSIS\Contrib\Language files
    LoadLanguageFile "${NSISDIR}\Contrib\Language files\English.nlf" 
    AutoCloseWindow true ; Closes at the end of install
    SetOverwrite ifnewer
    RequestExecutionLevel admin ; Required so that you won't get 'Did this program install correctly' prompt after install.
    
    ; Pages
    
    Caption "Installer name"
    PageEx directory
    DirText "This install will copy files in the Paint.NET folder." ; Choose your own words
    Caption " "
    PageExEnd
    PageEx instfiles ; Most often people wont see this since it can take less than a second.
    Caption " "
    PageExEnd
    
    Section "" ; All files here, set directory first and then each file separately.
    SetOutPath $INSTDIR
    File Filename.resx
    SetOutPath $INSTDIR\Effects
    File Filename.dll
    SectionEnd
    
    Function .onInit ; Loaded first when installer is started.
    ; Can be removed if nsProcess plugin is not used.
    ${nsProcess::FindProcess} "PaintDotNet.exe" $R1
    ${nsProcess::Unload}
    StrCmp $R1 "0" 0 +3
    	MessageBox MB_ICONSTOP|MB_OK "Paint.NET is running. Close it and try again."
    	Abort
    ; Remove until here.
    SetRegView 64 ; Required for 64 bit OS support.
    ReadRegStr $R0 HKLM "Software\Paint.NET" "TARGETDIR"
    IfErrors 0 +3 ; If Abort is omitted, change the last number to +2
    	MessageBox MB_ICONSTOP|MB_OK "Paint.NET install not found. This file requires Paint.NET."
    	Abort ; This line can be omitted so that the user can input a directory even though the registry key was not found.
    StrCpy $INSTDIR $R0
    FunctionEnd

  3. Did you open the .resources file in Notepad?

    If so, you're going at this the wrong way. You should download the .resx file that Rick has posted on the forum.

    http://paintdotnet.forumer.com/viewtopic.php?f=14&t=31863

    That is an xml file which you can edit more easily. After you edit it, you need to get ResGen.exe and use it to compile the .resx file into a .resources file. And you should also do the B, i, u images and the About dialog.

    http://www.getpaint.net/files/loc/2.6/TranslationPack.txt

    Check there for some information.

  4. I imagine 2 things. How would it be able to send it?

    In order to send an email, the user would need to input the ISP email server and possibly authentication info. Or send that info to an open relay which the ISP might block.

    Or would the crash be sent to a crash log server via HTTP POST or similar. That would have to be open, and somebody could just inspect the headers sent and spam the server and get a DoS.

    Microsoft has propably complex auth and vast resources for the Windows crash logs.

    My 0.02€.

  5. Um... when you create a selection, sure you see the selection width and height.... but you also see the actual size in pixels.

    So just use magic wand to select globally all the red you want, and just read the number in the status bar? No percentages, no calculating.... just reading a number?

×
×
  • Create New...