Bugs :  K-Meleon Web Browser Forum
You can talk about issues with k-meleon here.  
View image
Posted by: AirSpirit
Date: March 26, 2009 07:54PM

Today I've updated to K-Meleon 1.5.2
On the page http://kmeleon.sourceforge.net/bugs/viewbug.php?bugid=1051 is said that bug when K-Meleon opens a new window instead of a new tab was fixed. But when I click "View Image" a new window is opened. What should I do to fix it?

Options: ReplyQuote
Re: View image
Posted by: disrupted
Date: March 26, 2009 09:39PM

it's not a bug, it's just how ID_VIEW_IMAGE is coded inside k-meleon to open in a new window.. similar to ID_ABOUT_PAGE etc
you can either replace the command for &View Image in menus.cfg by editing custom menus.cfg (edit>configuration>menus config) but i don't know if this is a good idea.. cause it will tie it to your profile.

another way is this, download this macro and save it in k-meleon macros folder (k=meleon\macros):
http://necb.bizhat.com/kmeleon/imagetab.kmm

# K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage)

# ----------imageinTAB-------------------------------------
#
# Dependencies : -
# Resources : -
# Preferences : -
#
# ------------------------------------------------------------

imagetab{
opentab("".$ImageURL);
}

imagetab_BuildMenu{
# image menu(contextmenu)
setmenu(ImageView,macro,"View Image:Tab",imagetab,2);
}

$OnInit=$OnInit."imagetab_BuildMenu;";

# --------------------------------------------------------------
$macroModules=$macroModules."imagetab;";


this will add a new entry in the image context menu "view image:tab", selecting it will open the image in a tab instead of the default window.. so now you have 2 options to choose from grinning smiley

Options: ReplyQuote
Re: View image
Posted by: AirSpirit
Date: March 26, 2009 10:04PM

Thanks, macro is good smiling smiley

Options: ReplyQuote
Re: View image
Posted by: desga2
Date: March 27, 2009 01:13AM

@ disrupted:

I preferer to use OpenURL_InNew default macro function in main.kmm because this open in new tab opr in new window by user preferences.

OpenURL_InNew{
# Open an URL in a new tab if tabs are enabled, in a new window otherwise
$OpenURL==""?0:$kTabs?opentab($OpenURL)yawning smileypennew($OpenURL);
}

In your code:
imagetab{
$OpenURL=$ImageURL;
&OpenURL_InNew;
}

P.S.; Why "".$ImageURL? you are adding $ImageURL to empty string (""), this is identical to $ImageURL only.

K-Meleon in Spanish

Options: ReplyQuote
Re: View image
Posted by: disrupted
Date: March 27, 2009 12:05PM

you're very welcome air smiling smiley

desga, i didn't know i can call out $imageURL directly with opentab.. still learning smiling smiley i fixed it in the macro.. thanks. as for using openurl_innew it's a preference thing but i think since view image already opens in new window in all cases, it's better to enforce opening view image:tab in tab regardless of user settings of handling new windows.. otherwise the macro won't serve any purpose if new opens window instead of tab.

edit: i understand your macro now..sorry, you mean if tabs are disabled then opens in new window.. yes, that's a better idea.



Edited 1 time(s). Last edit at 03/27/2009 12:09PM by disrupted.

Options: ReplyQuote


K-Meleon forum is powered by Phorum.