Extensions :  K-Meleon Web Browser Forum
All about K-Meleon extensions. 
Pages: 12Next
Current Page: 1 of 2
k-meleon skins manager(test release)
Posted by: disrupted
Date: January 14, 2010 06:09PM





Edited 1 time(s). Last edit at 01/19/2010 01:33AM by disrupted.

Options: ReplyQuote
Re: k-meleon skins manager(preview)
Posted by: disrupted
Date: January 16, 2010 04:08PM

preview

skin with a preview image:


skin without a preview image:


Options: ReplyQuote
Re: k-meleon skins manager(preview)
Posted by: jsnj
Date: January 16, 2010 04:49PM

Looks good. Bit confused though, since they both look like they have preview images.

Options: ReplyQuote
Re: k-meleon skins manager(preview)
Posted by: disrupted
Date: January 16, 2010 05:34PM

sorry, if the skin folder has a preview image (preview.jpg) ksm will use it as the preview image for that skin -it's up to the skin author to include the preview.jpg preview. if ksm does not find preview.jpg it will search for mainbarcold.bmp or toolcold.bmp and use it for the preview. in any case there will always be a preview

Options: ReplyQuote
Re: k-meleon skins manager(preview)
Posted by: jsnj
Date: January 16, 2010 06:07PM

Cool. One question a little off-topic... why is a chevron used for reload in aura alpha?

Options: ReplyQuote
Re: k-meleon skins manager(preview)
Posted by: disrupted
Date: January 16, 2010 10:25PM

it's the reload for aura.. i think the rotating cycle thing did not display properly when converted to non-alpha 24 bitmap so i chose this one from the aura icons set. i'm not sure what the final aura will look like, there have been several variations.. alpha with premultiple that draws shadows had problems on 9x and ubuntu/xwine so either regular alpha will be used(with no support for shadows) or usual magic pink bitmaps, the icons also have to be in accordance to the ones which will be used for menu icons and i don't know if the final 1.5.4 will support alpha transparency menus.

probably 1.6 will have the complete alpha set with the proper aura because support for 9x will be dropped

gunter and dorian naturally are more updated on the final aura and alpha status for 1.5.4

Options: ReplyQuote
Re: k-meleon skins manager(preview)
Posted by: Matt
Date: January 17, 2010 01:38PM

Nice one, disrupted. I can translate the strings as far as you plan localised versions. It could be then offered for download on http://kmext.sf.net/ like ext manager is.

Options: ReplyQuote
Re: k-meleon skins manager(preview)
Posted by: disrupted
Date: January 17, 2010 03:42PM

thank you so much matt..localisation will be last thing.. if all goes well, it's quite complicated and will require lots of testing before final release

latest update:

first run: displays current skin.. background status(macro parameter), throbber is enabled (throbber.avi exists)


skin with disabled throbber (throbber.avi-renamed to throbber.bak), reenable renames back to .avi


skin with no throbber.avi (control disabled)


skinswitcher active(macro parameter passed), other controls get disabled
apply button gets disabled if primary skin is the same as secondary skin(foolproff). preview panel switchs to the skinswitcher comboboxes


pending:
new skin installer
possible throbber preview(ctrl for avi video)

Options: ReplyQuote
Re: k-meleon skins manager(preview)
Posted by: disrupted
Date: January 19, 2010 01:33AM

test release: (NT only)
http://kmext.sourceforge.net/tests/ksm-NT.zip











skin devs: please read readme.txt

Options: ReplyQuote
Re: k-meleon skins manager(preview)
Posted by: jsnj
Date: January 19, 2010 02:23AM

Nice. Couple issues:

"enable background" is tied to "use this skin". Placing a check mark next to it implies that it will enable the background regardless of whether you change the skin or not. Initially I thought it didn't stick until I changed skins.

"toolbars editor" doesn't work. It doesn't detect the toolbars.cfg file in my skin folder. Tried it with a couple different skins. Says the file can't be found. Also, the warning message displays an incorrect path to notepad.exe.

Options: ReplyQuote
Re: k-meleon skins manager(preview)
Posted by: disrupted
Date: January 19, 2010 04:45PM

that's pretty strange because the script will not attempt to launch the bundled editor unless it checks for it first

if fileexists(@scriptdir & "\notepad.exe") then
$editor=filegetshortname(@scriptdir & "\notepad.exe")
else
$editor=("notepad.exe")
endif


that means if the user deletes or renames the notepad.exe, the script will then use the default windows notepad.. the paths have been tested wiith very long file/folder names +spaces but it could be a system thing so i've updated it to use dos 8.3, if it still gives you errors, simply delete the bundled notepad.exe and it should use windows notepad.

download it again from the same link, there's also a bug fix for installed skins number not updating when a new skin was installed(not set as default)

the background thing is dilemma.. apart from the throbbers,you can't set anything unless kmeleon is closed because all settings have to be written to prefs which is locked when kmeleon is running and restaring the browser for a simple background change sounds very unpractical..i could disable the setting for the current skin but that might cause confusion that the skin does not support backgrounds..
the only way i could think of to enable/disable the background onselect is by writing the pref or a setting string in a temporary text file..then a macro in kmeleon set onquit to read that text file and run a command and then accordingly another script or ksm itself(without gui) will run and read that file when kmeleon closes and writes it to prefs..this has to be done very quickly in case the user is restarting kmeleon(kmrestarter)

Options: ReplyQuote
Re: k-meleon skins manager(preview)
Posted by: disrupted
Date: January 19, 2010 07:16PM

download again, update to support enable/disable background for the default skin(without changing skin)
pref is set after kmeleon is closed wiithout anything running in the background waiting for kmeeon to close.

user just has to click the exit button after enabling/disabling the background.

-exit button checks for any changes for background setting before closing if yes: writes to log file with value to the bg image(1=on 0=off)
Case $msg = $cancbutton
$chkbg=GUICtrlRead($optbg)
;msgbox(0, $chkbg, $chkbg)
;msgbox(0, $cmdline[2], $cmdline[2])
if $cmdline[2]=("0") and $chkbg=("1") then
_FileCreate(@scriptdir & "\setbgstatus.log")
FileWriteLine (@scriptdir & "\setbgstatus.log", "1" )
elseif $cmdline[2]=("1") and $chkbg=("4") then
_FileCreate(@scriptdir & "\setbgstatus.log")
FileWriteLine (@scriptdir & "\setbgstatus.log", "0" )
endif
ExitLoop
Case $msg = $GUI_EVENT_CLOSE
ExitLoop
endselect
WEnd
exit


macro will then send a command to ksm onquit event
setbgimgcheck{
exec($_tool_path."\\ksm\\ksm.exe \"".$_profile_path."\" ");
}

$OnQuit=$OnQuit."setbgimgcheck;sknswitcher;";


ksm on quit will check for logfile, if yes will parse it and write to km prefs
support for kmrestart, superexit, loader.exe:
if you select restart or use loader or superexit, ksm will terminate and run them accordingly and still write the value to prefs without problems
elseif $cmdline[0]=1 then
setbgstatus()

func setbgstatus()
if fileexists(@scriptdir & "\setbgstatus.log") then
checkrestloader()
else
exit
endif
exit
endfunc


func checkrestloader()
$bgstats=(@scriptdir & "\setbgstatus.log")
$kmprefs=($cmdline[1] & "\prefs.js")
$getbgset=filereadline($bgstats, 1)
$skinbgimageon='user_pref("kmeleon.display.backgroundImageEnabled", true);'
$skinbgimageoff='user_pref("kmeleon.display.backgroundImageEnabled", false);'
if process-exists("kmsuperexit.exe") and process-exists("loader.exe") and $getbgset=("1") then
processclose("kmsuperexit.exe")
processclose("k-meleon.exe")
processclose("loader.exe")
;msgbox(0, "iest", "writing for loader and restart:ON")
FileWriteLine($kmprefs, $skinbgimageon)
run($kmbinary)
sleep(1488)
run($kmloader)
elseif process-exists("kmsuperexit.exe") and process-exists("loader.exe") and $getbgset<>("1") then
processclose("kmsuperexit.exe")
processclose("k-meleon.exe")
processclose("loader.exe")
;msgbox(0, "iest", "writing for loader and restart:OFF")
FileWriteLine($kmprefs, $skinbgimageoff)
run($kmbinary)
sleep(1488)
run($kmloader)
endif
if process-exists("restartkm.exe") and $getbgset=("1") then
processclose("k-meleon.exe")
;msgbox(0, "iest", "writing for restart:ON")
FileWriteLine($kmprefs, $skinbgimageon)
elseif process-exists("restartkm.exe") and $getbgset<>("1") then
processclose("k-meleon.exe")
;msgbox(0, "iest", "writing for restart:OFF")
FileWriteLine($kmprefs, $skinbgimageoff)
endif
if $getbgset=("1") then
;msgbox(0, "iest", "writing normally:ON")
FileWriteLine($kmprefs, $skinbgimageon)
elseif $getbgset<>("1") then
;msgbox(0, "iest", "writing normally:OFF")
FileWriteLine($kmprefs, $skinbgimageoff)
endif
filedelete($bgstats)
exit
endfunc


Options: ReplyQuote
Re: k-meleon skins manager(preview)
Posted by: desga2
Date: January 19, 2010 09:05PM
Options: ReplyQuote
Re: k-meleon skins manager(preview)
Posted by: disrupted
Date: January 19, 2010 10:03PM

yes, that can work with onquit when the user quits kmeleon normally but not with restart or superexit extensions which force kills kmeleon to terminate the loader.exe so the pref has to be written with an external command independent from kmeleon macro

Options: ReplyQuote
Re: k-meleon skins manager(preview)
Posted by: disrupted
Date: January 20, 2010 01:23AM

found a much better way to set the bg image.. much easier than the other complicated and rather baroque method

by setting accelerators in the ksm macro..1 for bg image on and one on off like this
setbgimgon{
#alert("background image on", "testfuck", EXCLAIM)
setpref(BOOL,"kmeleon.display.backgroundImageEnabled", "true");
}

setbgimgoff{
#alert("background image off", "testfuck", EXCLAIM)
setpref(BOOL,"kmeleon.display.backgroundImageEnabled", "false");
}

setbgimgon_SetAccels{
setaccel("CTRL ALT SHIFT 1","macros(setbgimgon)");
}

setbgimgoff_SetAccels{
setaccel("CTRL ALT SHIFT 0","macros(setbgimgoff)");
}


and then the script which will naturally exit after clicking the exit button, checks the setting in ksm and accordingly sends the keys to the km window
Case $msg = $cancbutton
$chkbg=GUICtrlRead($optbg)
if $cmdline[2]=("0") and $chkbg=("1") then
guidelete()
winactivate("[CLASS:KMeleon Browser Window]", "")
send("^!+1")
elseif $cmdline[2]=("1") and $chkbg=("4") then
guidelete()
winactivate("[CLASS:KMeleon Browser Window]", "")
send("^!+0")
endif
ExitLoop
Case $msg = $GUI_EVENT_CLOSE
ExitLoop
endselect
WEnd
exit


no more worries about writing that pref onquit and checking for kmrestart or loader and also this is better because the bgimage change in ksm will also affect kmeleon, so if the user opens km preferences, toolbar background will be set exactly as last set in ksm

download update
http://kmext.sourceforge.net/tests/ksm-NT.zip

Options: ReplyQuote
Re: k-meleon skins manager(preview)
Posted by: jsnj
Date: January 20, 2010 04:08AM

Just tested. The notepad & background bugs seem fixed.

"enable skinswitcher" seems tied to "use this skin". If in use, trying to disable it by unchecking the box has no effect unless you change the skin with "use this skin" .

Actual preview image size limit is: 321x33, not 322x34 as mentioned in the readme.

Might as well keep the menu item consistent with KEM and just name it "Skins Manager". Lose the KM smiling smiley

Options: ReplyQuote
Re: k-meleon skins manager(preview)
Posted by: disrupted
Date: January 20, 2010 07:51PM
Options: ReplyQuote
Re: k-meleon skins manager(preview)
Posted by: jsnj
Date: January 21, 2010 02:02AM

Strange preview image behavior for the currently used skin.

1-Start Skins Manager. Preview image looks normal.

2-Minimize Skins Manager

3-Bring Skins Manager back up. The preview image will appear shrunken.





Edited 1 time(s). Last edit at 01/21/2010 02:05AM by jsnj.

Attachments: ksm.png (27.1 KB)   ksmpl.png (26.8 KB)  
Options: ReplyQuote
Re: k-meleon skins manager(preview)
Posted by: disrupted
Date: January 21, 2010 01:42PM

beta 2:
NT: http://kmext.sourceforge.net/tests/ksm-beta2NT.zip
9x: http://kmext.sourceforge.net/tests/ksm-beta29x.zip

installing a skin with several variations (multi skin)


fix for redraw bug after minimise
other bug fixes
installer update:

now supports 3 different structure of zipped archives:

1- (default) zip file contains 1 folder with skin name
e.g. green.zip\green\skin files

2- zip file contains skin without a folder
e.g green.zip\skin files

3- zip file contains several variations of a skin in different named folders
e.g green.zip\green-small
\green(large)
\green-blahblue etc

those are the zip structures that ksm supports to extract, naturally they have to be valid km skins(with at least one toolbar bmp and must contain toolbars.cfg) otherwise will not be recognised as skin and will not be installed

zip structures that will not be accepted as skins and will never be supported:
e.g. green.zip\sub folder\ subfolderx\skin files
or green.zip\skins\green\skin files (skins must not have the extensions archiving structure)

ksm will only support zip for installing skins and no other formats

- skin preview area has been slightly expanded and therefore skin preview image preview.jpg( optional) has increased by 2 px for width and height



Edited 1 time(s). Last edit at 01/21/2010 01:47PM by disrupted.

Options: ReplyQuote
Re: k-meleon skins manager(preview)
Posted by: jsnj
Date: January 21, 2010 11:52PM

So far what I've tested works well. smiling smiley Noticed that the KSM window is modal unlike the KEM window. Any particular reason why? Also, is it too late for a button to the left of "toolbars editor" that opens the "skin folder" or since a readme file is supported, one pointing to that? No biggie, but either seems like a natural fit. Skin folder would be better though smiling smiley

Guess I'm the only tester. What up people???

Options: ReplyQuote
Re: k-meleon skins manager(preview)
Posted by: disrupted
Date: January 22, 2010 01:07PM

beta3:
NT: http://kmext.sourceforge.net/tests/ksm-beta3NT.zip
9x: http://kmext.sourceforge.net/tests/ksm-beta39x.zip



adds new option to display/hide toolbars line separator

ksm is more complicated.. kem basically adds and removes files, doesn't require preview or checkboxes. ksm is more integrated with kmeleon as it reads everything from km prefs before it runs and writes them back, kem only needs the profile directory from kmeleon and locale

an open skins folder is actually very easy to add but i don't think it's a good idea and can be risky, first it will require more coding to monitor any changes made (folder removed/added) after windows explorer has been closed and you notice the default phoenity skins in ksm are locked and can't be uninstalled so it;s better to avoid adding this option..everything most users will need to manage the skins are within ksm and an auto skin switcher for those who may get bored with one skin

Options: ReplyQuote
Re: k-meleon skins manager(preview)
Posted by: jsnj
Date: January 22, 2010 08:18PM

Quote
disrupted
adds new option to display/hide toolbars line separator

ksm is more complicated.. kem basically adds and removes files, doesn't require preview or checkboxes. ksm is more integrated with kmeleon as it reads everything from km prefs before it runs and writes them back, kem only needs the profile directory from kmeleon and locale

an open skins folder is actually very easy to add but i don't think it's a good idea and can be risky, first it will require more coding to monitor any changes made (folder removed/added) after windows explorer has been closed and you notice the default phoenity skins in ksm are locked and can't be uninstalled so it;s better to avoid adding this option..everything most users will need to manage the skins are within ksm and an auto skin switcher for those who may get bored with one skin

The toolbars_line pref is a good idea since most don't know it exists. You don't need to code the manager to monitor windows explorer changes. Just auto-close the manager. It's just convenient to use the manager to get to the skin folder directly instead of through edit - config - macros - up directory to skins and THEN the skin folder :p Of course, advanced users can macro to the folders, but that's a tall ask for most. Actually, messing with toolbars.cfg is more dangerous since errors in that file can lead to the KM window not opening. The browse installation directory option for each extension & theme in FF's addon manager is quite handy. Anyway, the skins manager looks good either way.



Edited 1 time(s). Last edit at 01/22/2010 08:20PM by jsnj.

Options: ReplyQuote
Re: k-meleon skins manager(preview)
Posted by: siria
Date: January 22, 2010 08:58PM

Just three small thoughts:
-Not sure if that's really meant to be "menus.cfg", or perhaps menuicons.cfg...
-For the preview jpg isn't the best format, so if it's not too much trouble png and perhaps gif could also be supported...
-Perhaps the throbber.bak could be renamed to throbber.avi.bak, because if a clueless user later looks into that folder, he probably has no idea what the original format of that throbber thing was...
(Pity the preview pics are so tiny, but that's just me tongue sticking out smiley)

Options: ReplyQuote
Re: k-meleon skins manager(preview)
Posted by: disrupted
Date: January 23, 2010 06:15PM

thank you for your feedback siria

it's menuicons, it will be changed after localisation
jpg isn't the best format if low quality compression is used, with high quality jpeg is just as good as bitmaps. it won't make much difference with small images like the preview.

jpg is much better that gif formats in avoiding redraw bugs, naturally the best format to completely avoid redraws is bmp but that could be too big in size.

png is not supported. to enable png support, gdiplus functions will have to be used extensively and might not work on older systems and will increase memory usage.

the throbber is no longer getting renamed, that was in the first test release only.. the throbber display settings are directly read from km prefs now

the preview is not tiny, it uses the main skin toolbar as the preview regardless of its size when no preview image is supplied. the preview image that can be added by the author has enough space to display the main toolbar+throbber and the privacybar if available. overall the preview pane size is restricted by the main gui size which is meant to be reasonable as a manager and not too big

Options: ReplyQuote
Re: k-meleon skins manager(preview)
Posted by: Matt
Date: January 25, 2010 12:43PM

Quote
disrupted
if ksm does not find preview.jpg it will search for mainbarcold.bmp or toolcold.bmp and use it for the preview. in any case there will always be a preview

Works fine here; just one thing: no preview for Karameleon skin; inside the skin folder there is no mainbarcold.bmp & preview.jpg. Could KSM search for toolbarhot.bmp to display a preview?


PS Judging from current design of KSM window, for localisation purposes some buttons will have to be just a little bit wider.

Options: ReplyQuote
Re: k-meleon skins manager(preview)
Posted by: disrupted
Date: January 25, 2010 03:55PM

ok, added support for toolbarcold:
NT: http://kmext.sourceforge.net/tests/ksm-beta4NT.zip
9x: http://kmext.sourceforge.net/tests/ksm-beta49x.zip

yeah, mostly with russian more than polish.. russian has too many letters..we'll see after translating, tarantul is very smart and often rephrases in shorter words to accomodate the buttons

Options: ReplyQuote
Re: k-meleon skins manager(preview)
Posted by: disrupted
Date: January 30, 2010 12:09AM

translation needed for this file(ksm.ini) in portuguese, spanish, french and polish
http://kmext.sourceforge.net/tests/ksm.ini
thanks


http://kmext.sourceforge.net/tests/ksm-intNT.zip
http://kmext.sourceforge.net/tests/ksm-int9x.zip

Options: ReplyQuote
Re: k-meleon skins manager(preview)
Posted by: desga2
Date: January 30, 2010 01:31AM

To translate "Skins Manager" option in Tool menu with a kml file you must change this kmm line code:
setmenu(keu_pag,macro,"Skins Manager",ksm,0);

by this other:
setmenu(keu_pag,macro,_("Skins Manager"),ksm,0);

K-Meleon in Spanish

Options: ReplyQuote
Re: k-meleon skins manager(preview)
Posted by: Matt
Date: February 13, 2010 11:57AM

Quote
disrupted
translation needed for this file(ksm.ini) in portuguese, spanish, french and polish

disrupted, did you get my translation? I sent it Februar 02.

Options: ReplyQuote
Re: k-meleon skins manager(preview)
Posted by: disrupted
Date: February 14, 2010 08:28AM

nope i never got it..must have been lost in cyberspace.
please resend it. thanks matty

Options: ReplyQuote
Pages: 12Next
Current Page: 1 of 2


K-Meleon forum is powered by Phorum.