Improvement requests :  K-Meleon Forum
Use this forum to talk about a feature you're missing. Use the bug tracker to report it if necessary. 
Pages: 12Next
Current Page: 1 of 2
IDEA : a temporary bookmark holder
Posted by: mhf
Date: August 02, 2011 07:41PM

Don't know if this would interest anyone else but I could really do with a temporary bookmark holder.

Here's the reasoning : I often come across a site that I would like to re-visit maybe just once to download something or whatever, but instead of putting a bookmark in my bookmarks and then having to go back into the bookmarks editor, find the url and erase it (if I remember to), what I do is park them in a external textfile or similar which I later throw out ... but that's a bore ...

So how about an extension accessible through the context menu that could hold a certain number of urls and which I could empty easily or in which I could erase the urls one by one when I've finished with them.
There could be a limit on the number of urls it holds to prevent the usual backlog of useless and forgotten links.
There could be a description field too.
Etc.

Any opinions ? grinning smiley Or not ?

Options: ReplyQuote
Re: IDEA : a temporary bookmark holder
Posted by: siria
Date: August 03, 2011 02:19AM

Hmm, there are probably some ways, perhaps even already some macro in the depths of kmext? ;-)

Or why not just throw them into an own bookmarks folder?



Edited 1 time(s). Last edit at 08/03/2011 03:10AM by siria.

Options: ReplyQuote
Re: IDEA : a temporary bookmark holder
Posted by: JamesD
Date: August 03, 2011 03:05AM

I am working on a macro to do this. I need a bit more time to finish. My plan is for 6 items and they can be pages or links.

Options: ReplyQuote
Re: IDEA : a temporary bookmark holder
Posted by: mhf
Date: August 03, 2011 04:15AM

Quote
siria
Hmm, there are probably some ways, perhaps even already some macro in the depths of kmext? ;-)

Or why not just throw them into an own bookmarks folder?

Thanks siria, but that's just what I don't want to do as I said. I end up with folders full of old urls which I don't remember anything about and never get round to deleting them through the bookmarks editor.

Options: ReplyQuote
Re: IDEA : a temporary bookmark holder
Posted by: mhf
Date: August 03, 2011 04:17AM

Quote
JamesD
I am working on a macro to do this. I need a bit more time to finish. My plan is for 6 items and they can be pages or links.

Great James !
Looking forward to it.

Options: ReplyQuote
Re: IDEA : a temporary bookmark holder
Posted by: JamesD
Date: August 03, 2011 08:39AM

This is early code with not enough testing. It should give you and idea of where I am going with this. Post any comments in this thread.

1 - Menu items in document popup and link popup.
2 - Allows to store, retrieve, or delete.
3 - Allows for six (6) items. (Arbitrary, could change)
4 - Allows user editing of item description.

QickStor.kmm

#  K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage2)
#  
# ---------- QickStor.kmm
# ---------- K-Meleon Macro Language Store or retrieve Page URL or Link URL ---------
#
# = = = = =  Early version - For demonstration and comments
#
# Dependencies        : main.kmm 
# Resources           : 
# Preferences         : "k-meleon_QickStor.count"  interger
#		        "k-meleon_QickStor.Description.1...6"  string
#		        "k-meleon_QickStor.Url.1...6"  string
# Version             :  .3   2011-08-02
# Author              :  JamesD  
# --------------------------------------------------------------------------------

_QickStor_StoreP {
$_QickStor_CurrentCount = getpref(INT,"k-meleon_QickStor.count");
$_QickStor_CurrentCount>=6 ? &_QickStor_StorePno : &_QickStor_StoreP2 ;
}

_QickStor_StorePno {
alert($_QickStor_CurrentCount . "  items already stored.", "Maximum storage reached", INFO);
}

_QickStor_StoreP2 {
$_QickStor_NewCount = $_QickStor_CurrentCount + 1;
$_QickStor_Description = prompt("45 characters maximum", "Edit the discription",substr($TITLE,0,45));
$_QickStor_URL = $URL;
alert( "Count: ".$_QickStor_NewCount."\n"."URL: ".$_QickStor_URL."\n"."Desc: ".$_QickStor_Description , "Item to be stored", INFO);
setpref(INT,"k-meleon_QickStor.count", $_QickStor_NewCount);
setpref(STRING,"k-meleon_QickStor.Url.".$_QickStor_NewCount, $_QickStor_URL);
setpref(STRING,"k-meleon_QickStor.Description.".$_QickStor_NewCount, substr($_QickStor_Description,0,45) );
}

_QickStor_StoreL {
$_QickStor_CurrentCount = getpref(INT,"k-meleon_QickStor.count");
$_QickStor_CurrentCount>=6 ? &_QickStor_StorePno : &_QickStor_StoreL2 ;
}

_QickStor_StoreL2 {
$_QickStor_NewCount = $_QickStor_CurrentCount + 1;
id(ID_COPY_LINK_LOCATION);
$_QickStor_URL = getclipboard() ;
$_QickStor_Description = prompt("45 characters maximum", "Edit the discription",substr($_QickStor_URL,0,45));
alert( "Count: ".$_QickStor_NewCount."\n"."URL: ".$_QickStor_URL."\n"."Desc: ".$_QickStor_Description , "Item to be stored", INFO);
setpref(INT,"k-meleon_QickStor.count", $_QickStor_NewCount);
setpref(STRING,"k-meleon_QickStor.Url.".$_QickStor_NewCount, $_QickStor_URL);
setpref(STRING,"k-meleon_QickStor.Description.".$_QickStor_NewCount, substr($_QickStor_Description,0,45) );
}

_QickStor_Retrieve {
$_QickStor_NewCount = getpref(INT,"k-meleon_QickStor.count");
$_QickStor_Description = "";
$_QickStor_Count = 1 ;
while($_QickStor_Count <= $_QickStor_NewCount) {
	$_QickStor_Desc = getpref(STRING,"k-meleon_QickStor.Description.".$_QickStor_Count) ;
	$_QickStor_Description = $_QickStor_Description.$_QickStor_Count." -- ".$_QickStor_Desc."\n" ;
	$_QickStor_Count = $_QickStor_Count +1;
}
alert($_QickStor_Description, "Note the number next to your choice", INFO);
$_QickStor_UseCount = prompt("Enter a number 1 to ". $_QickStor_Count-1,"Retrieve a page");
$_QickStor_UseCount=="" ? &_QickStor_Retrieve1 : &_QickStor_Retrieve2 ;
}

_QickStor_Retrieve1  { alert("Cancel was pressed.", "No action to be taken.", INFO); }

_QickStor_Retrieve2 { $_QickStor_UseCount > $_QickStor_NewCount ? &_QickStor_Retrieve3 : &_QickStor_Retrieve4 ; }

_QickStor_Retrieve3 { alert("Number enter is out of range.", "No action to be taken.", INFO); }

_QickStor_Retrieve4 { $_QickStor_UseCount < 1 ? &_QickStor_Retrieve3 : &_QickStor_Retrieve5 ; }

_QickStor_Retrieve5 {
$_QickStor_URL = getpref(STRING,"k-meleon_QickStor.Url.".$_QickStor_UseCount);
open($_QickStor_URL);
}

_QickStor_Delete {
$_QickStor_CurrCount = getpref(INT,"k-meleon_QickStor.count");
$_QickStor_Description = "";
$_QickStor_Count = 1 ;
while($_QickStor_Count <= $_QickStor_CurrCount) {
	$_QickStor_Desc = getpref(STRING,"k-meleon_QickStor.Description.".$_QickStor_Count) ;
	$_QickStor_Description = $_QickStor_Description.$_QickStor_Count." -- ".$_QickStor_Desc."\n" ;
	$_QickStor_Count = $_QickStor_Count +1;
}
alert($_QickStor_Description, "Note the number next to your choice", INFO);
$_QickStor_DelCount = prompt("Enter a number 1 to ". $_QickStor_Count-1, "Delete this record");
$_QickStor_DelCount=="" ? &_QickStor_Delete1 : &_QickStor_Delete2 ;
}

_QickStor_Delete1  { alert("Cancel was pressed.", "No action to be taken.", INFO); }

_QickStor_Delete2 { $_QickStor_DelCount > $_QickStor_NewCount ? &_QickStor_Delete3 : &_QickStor_Delete4 ; }

_QickStor_Delete3 { alert("Number enter is out of range.", "No action to be taken.", INFO); }

_QickStor_Delete4 { $_QickStor_DelCount < 1 ? &_QickStor_Delete3 : &_QickStor_Delete5 ; }

_QickStor_Delete5 {
if ( $_QickStor_DelCount == $_QickStor_CurrCount) {   ## take off top only - no collaspe
	setpref(INT,"k-meleon_QickStor.count", $_QickStor_CurrCount-1);  # reduce count by one
	delpref("k-meleon_QickStor.Description.".$_QickStor_DelCount);
	delpref("k-meleon_QickStor.Url.".$_QickStor_DelCount);
	} else {
	setpref(INT,"k-meleon_QickStor.count", $_QickStor_CurrCount-1);  # reduce count by one
	while ( $_QickStor_DelCount < $_QickStor_CurrCount) {
		## copy downward
		$_QickStor_ResetD = getpref(STRING,"k-meleon_QickStor.Description.".$_QickStor_DelCount +1);
		setpref(STRING,"k-meleon_QickStor.Description.".$_QickStor_DelCount, $_QickStor_ResetD );
		setpref(STRING,"k-meleon_QickStor.Description.".$_QickStor_DelCount, $_QickStor_ResetD );
		$_QickStor_ResetU = getpref(STRING,"k-meleon_QickStor.Url.".$_QickStor_DelCount +1);
		setpref(STRING,"k-meleon_QickStor.Url.".$_QickStor_DelCount, $_QickStor_ResetU );
		$_QickStor_DelCount = $_QickStor_DelCount + 1;
		}
	delpref("k-meleon_QickStor.Description.".$_QickStor_CurrCount);
	delpref("k-meleon_QickStor.Url.".$_QickStor_CurrCount);
}
}

_QickStor_ModMenu{
$_QickStor_PopmL = "QuickStoreLink";
$_QickStor_PopmP = "QuickStorePage";
setmenu("LinkSave",popup,$_QickStor_PopmL,-1);
setmenu("Document",popup,$_QickStor_PopmP,-1);
&_QickStor_ModMenuP;
&_QickStor_ModMenuL;
}
_QickStor_ModMenuP{
setmenu($_QickStor_PopmP,macro,"Store", _QickStor_StoreP,0);
setmenu($_QickStor_PopmP,macro,"Retrieve", _QickStor_Retrieve,1);
setmenu($_QickStor_PopmP,macro,"Delete", _QickStor_Delete,2);
rebuildmenu($_QickStor_PopmP);
}

_QickStor_ModMenuL{
setmenu($_QickStor_PopmL,macro,"Store", _QickStor_StoreL,0);
setmenu($_QickStor_PopmL,macro,"Retrieve", _QickStor_Retrieve,1);
setmenu($_QickStor_PopmL,macro,"Delete", _QickStor_Delete,2);
rebuildmenu($_QickStor_PopmL);
}

# - - - - - - - - - - - - - - - - - - - 
$OnInit=$OnInit."_QickStor_ModMenu;";
$macroModules=$macroModules."QickStor;";



Edited 1 time(s). Last edit at 08/03/2011 08:41AM by JamesD.

Options: ReplyQuote
Re: IDEA : a temporary bookmark holder
Posted by: mhf
Date: August 03, 2011 05:42PM

James : testing - looking really good so far and no problems encountered.

This is maybe too much to ask but I was thinking about an input window to add a meaningful description and not just the url as a description ... ? grinning smiley grinning smiley grinning smiley

Options: ReplyQuote
Re: IDEA : a temporary bookmark holder
Posted by: JamesD
Date: August 03, 2011 06:43PM

Quote
mhf
This is maybe too much to ask but I was thinking about an input window to add a meaningful description and not just the url as a description ... ?

I think you can already. See the blue line of code. Links don't provide a description. Pages have titles which I used.

_QickStor_StoreL2 {
$_QickStor_NewCount = $_QickStor_CurrentCount + 1;
id(ID_COPY_LINK_LOCATION);
$_QickStor_URL = getclipboard() ;
$_QickStor_Description = prompt("45 characters maximum", "Edit the discription",substr($_QickStor_URL,0,45));
alert( "Count: ".$_QickStor_NewCount."\n"."URL: ".$_QickStor_URL."\n"."Desc: ".$_QickStor_Description , "Item to be stored", INFO);
setpref(INT,"k-meleon_QickStor.count", $_QickStor_NewCount);
setpref(STRING,"k-meleon_QickStor.Url.".$_QickStor_NewCount, $_QickStor_URL);
setpref(STRING,"k-meleon_QickStor.Description.".$_QickStor_NewCount, substr($_QickStor_Description,0,45) );
}



Options: ReplyQuote
Re: IDEA : a temporary bookmark holder
Posted by: mhf
Date: August 03, 2011 06:48PM

Yes, sorry, didn't see that - perfect.

By the way, seems you don't like "W" ... grinning smiley

(Hint : Q.. and q.. ) !


Edit : just realized that the QuickStorePage > Store doesn't seem to work, up to now I've been testing the QuickStoreLink, but QuickStorePage > Retrieve does work.



Edited 1 time(s). Last edit at 08/03/2011 06:54PM by mhf.

Options: ReplyQuote
Re: IDEA : a temporary bookmark holder
Posted by: JamesD
Date: August 03, 2011 07:22PM

I just stored a page, and it worked for me. What is happening when you try to store a page?

Options: ReplyQuote
Re: IDEA : a temporary bookmark holder
Posted by: mhf
Date: August 03, 2011 07:33PM

Quote
JamesD
I just stored a page, and it worked for me. What is happening when you try to store a page?

Nothing happens !

By the way, the macro conflicts with quite a few other macros, e.g. : the Edit menu and the context menu of the search button.



Edited 1 time(s). Last edit at 08/03/2011 07:38PM by mhf.

Options: ReplyQuote
Re: IDEA : a temporary bookmark holder
Posted by: JamesD
Date: August 03, 2011 07:43PM

What is nature of the menu conflicts? No conflicts appear in my system.

Edit: I have to be away much of today. Will get back on this tonight or tomorrow.



Edited 1 time(s). Last edit at 08/03/2011 08:09PM by JamesD.

Options: ReplyQuote
Re: IDEA : a temporary bookmark holder
Posted by: mhf
Date: August 03, 2011 11:56PM

Well I do have quite a few macros running, here are the ones that disappear when I allow QwikStor :

agentswitcher
capture faststone
cookie culler
cookies manager
fdmint
flasaver
flashcookiescleaner
fullscreen2plus
groups2
ietab
kmextmanager
managehosts
mapdomain
mtypes
priortabs
profilebackup
proxy
search+icon

I have used the names as they appear in the macros page of Preferences.

Options: ReplyQuote
Re: IDEA : a temporary bookmark holder
Posted by: siria
Date: August 04, 2011 12:03AM

Oh...! Thats it, thanks for finally enlightening me what that "rebuildmenu" command is here for, have been riddling for a year at least grinning smiley Okay, so it seems to reset the menus to the state before the macro menus are added, or at least those before the current macro is added *lightbulb*

(Well, so just delete all rebuildmenu lines or add a # comment sign at the beginning, then the menu is not reset)



Edited 1 time(s). Last edit at 08/04/2011 12:04AM by siria.

Options: ReplyQuote
Re: IDEA : a temporary bookmark holder
Posted by: jsnj
Date: August 04, 2011 12:40AM

Quote
mhf
Well I do have quite a few macros running, here are the ones that disappear when I allow QwikStor :

agentswitcher
capture faststone
cookie culler
cookies manager
fdmint
flasaver
flashcookiescleaner
fullscreen2plus
groups2
ietab
kmextmanager
managehosts
mapdomain
mtypes
priortabs
profilebackup
proxy
search+icon

I have used the names as they appear in the macros page of Preferences.

Perhaps it's a simpe copy & paste error. Try the attached file instead and see if it makes a difference.

Attachments: QuickStor.kmm (6.6 KB)  
Options: ReplyQuote
Re: IDEA : a temporary bookmark holder
Posted by: mhf
Date: August 04, 2011 01:05AM

Coolaroola ...! That works ! cool smiley

So was it a copy/paste error or did someone "delete all rebuildmenu lines or add a # comment sign at the beginning" ... ?

AND, the QuickStorePage > Store option is working now for me.

Big thanks to all.



Edited 1 time(s). Last edit at 08/04/2011 01:08AM by mhf.

Options: ReplyQuote
Re: IDEA : a temporary bookmark holder
Posted by: siria
Date: August 04, 2011 01:28AM

Seriously, what's that command used for?
If it's not for resetting, then it's back now on my virtual list of the few not-yet-riddled out commands in macrolanguage *confused*

Options: ReplyQuote
Re: IDEA : a temporary bookmark holder
Posted by: siria
Date: August 04, 2011 02:13AM

Okay, have stored it and played a little bit, just for curiosity smiling smiley

Noticed that storing doesn't work on my machine, the URL pref stays empty. Also there's no title suggestion, as the prompt finds no URL string.
I'm aware on my slightly tuned win98 there's sometimes a problem with clipboard in KM1.6beta (or was that for all people?) Anyway, would suppose the clipboard causes the storing prob.

Just a suggestion, it's possible to leave the clipboard untouched, then it works. By replacing:
id(ID_COPY_LINK_LOCATION);
$_QuickStor_URL = getclipboard() ;

with
$_QuickStor_URL = $LinkURL;

Options: ReplyQuote
Re: IDEA : a temporary bookmark holder
Posted by: jsnj
Date: August 04, 2011 02:24AM

Quote
siria
Seriously, what's that command used for?
If it's not for resetting, then it's back now on my virtual list of the few not-yet-riddled out commands in macrolanguage *confused*

http://home.arcor.de/cool.mckluus/software/kmeleon/project/reference/macrolanguage/ui.html#rebuildmenu

Options: ReplyQuote
Re: IDEA : a temporary bookmark holder
Posted by: jsnj
Date: August 04, 2011 02:28AM

Quote
mhf
Coolaroola ...! That works ! cool smiley

So was it a copy/paste error or did someone "delete all rebuildmenu lines or add a # comment sign at the beginning" ... ?

AND, the QuickStorePage > Store option is working now for me.

Big thanks to all.

I didn't alter James's code. Just replaced spelling instances of Qik with Quick. So it was probably a copy & paste error or less likely an encoding issue. The kmm files should be UTF-8.

Options: ReplyQuote
Re: IDEA : a temporary bookmark holder
Posted by: siria
Date: August 04, 2011 02:34AM

Thanks for the hint, yet that's exactly what keeps confusing me... Because on one hand building menu lines works fine just with "setmenu", also for adding, deleting or modifying single items in a menu on-the-fly, sometime during a session. What I haven't understood yet, is how to delete or modify a "whole menu" on-the-fly (popup or inline).
The description sounds easy enough, and yet... Perhaps I'm "sitting on the cable" as we say here ;-) What I'd need is a simple example macro. The given "proxy" example didn't really help when I tried it awhile ago, can't remember exactly why. Either the command wasn't in it at all or it was because the whole macro is about 3 levels above my own level. Didn't manage to find any other macro that uses it.

@mhf: just a wild guess, you didn't happen to copy the name of the macro ("QickStor.kmm") also inside the kmm-file, did you...?



Edited 4 time(s). Last edit at 08/04/2011 02:54AM by siria.

Options: ReplyQuote
Re: IDEA : a temporary bookmark holder
Posted by: JamesD
Date: August 04, 2011 05:43AM

I am back. I see that I have missed a number of posts. I will try to answer some of the items.

1 - QickStor vs QuickStore was just my attempt to create a shorter and more unique name. I was not sure there was not already a QuickStore.

2 - Rebuildmenu will be needed a future enhancement. I plan an inline menu replacement for Retrieve. The rebuildmenu lines can be commented out for right now.

3 - Siria, the '$_QuickStor_URL = $LinkURL;' is a good find. I will make that change in the next version.

4 - Mhf, are things running OK now? Sounds like they are.

Is there still something that I need to address in this version? I have found some areas where more validation of user input is required. I am working on that.

Should I post a link to a file instead of posting code for the next version?

Options: ReplyQuote
Re: IDEA : a temporary bookmark holder
Posted by: jsnj
Date: August 04, 2011 05:49AM

Quote
siria
Thanks for the hint, yet that's exactly what keeps confusing me... Because on one hand building menu lines works fine just with "setmenu", also for adding, deleting or modifying single items in a menu on-the-fly, sometime during a session. What I haven't understood yet, is how to delete or modify a "whole menu" on-the-fly (popup or inline).
The description sounds easy enough, and yet... Perhaps I'm "sitting on the cable" as we say here ;-) What I'd need is a simple example macro. The given "proxy" example didn't really help when I tried it awhile ago, can't remember exactly why. Either the command wasn't in it at all or it was because the whole macro is about 3 levels above my own level. Didn't manage to find any other macro that uses it.

James's Groups2 macro also uses it.


Setmenu can also delete or more accurately hide a "whole" menu. I used it to toggle visibilty of the "Previous Searches" popup menu in the Search+ extension.


_SearchPreviousMenu{
getpref(BOOL, $_Search_pref_Prev.".OFF") ? setmenu("&Web Search",inline,$_SubM,0): setmenu("&Web Search",popup,_("&Previous Searches"),0);
setmenu(_("&Previous Searches"),inline,_PreviousSearchList);
$_loc=""; &_GetPrevCount; while($_p>0) &_Search_BuildPrevMenu;
setmenu(_("&Previous Searches"),inline,"ClearPrevious");
setmenu(_("Searches"),inline,"ClearPrevious");
setmenu(ClearPrevious,macro,_("Clear Previous Searches..."),"_ClearPrevSearches");
}
_TogglePreviousSearch{
menuchecked=(getpref(BOOL, $_Search_pref_Prev.".OFF")!=true);
togglepref(BOOL,$_Search_pref_Prev.".OFF"); $_SubM=""; &_SearchPreviousMenu;
}
_Search_BuildPrevMenu{
$_PS=getpref(STRING,$_Search_pref_Prev.$_p.".name");
$_PQ=getpref(STRING,$_Search_pref_Prev.$_p.".query");
$_PS ? $_PS=$_PQ." --> ".$_PS:"";
setmenu("_PreviousSearchList",macro,$_PS,"_OpenPreviousSearch(".$_p.")",$_loc);
$_p=$_p-1;
}


Had to define $_SubM as " " OnInit (not to be confused with "" as shown above in TogglePreviousSearch) for it to work properly. Somewhat hackish solution maybe but I couldn't get rebuildmenu to work for me in this regard or for rebuilding the previous search list itself. I don't think it could've worked for what I wanted in Search+. I may have another look one day.

EDIT: Just noticed that I'd toggled between defining the menu as inline and popup. Not sure why I did that originally. Keeping it as popup eliminates the need for $_SubM at all. Just hide the popup menu with "".



Edited 1 time(s). Last edit at 08/04/2011 10:32AM by jsnj.

Options: ReplyQuote
Re: IDEA : a temporary bookmark holder
Posted by: jsnj
Date: August 04, 2011 05:55AM

Quote
JamesD
I am back. I see that I have missed a number of posts. I will try to answer some of the items.

1 - QickStor vs QuickStore was just my attempt to create a shorter and more unique name. I was not sure there was not already a QuickStore.

2 - Rebuildmenu will be needed a future enhancement. I plan an inline menu replacement for Retrieve. The rebuildmenu lines can be commented out for right now.

3 - Siria, the '$_QuickStor_URL = $LinkURL;' is a good find. I will make that change in the next version.

4 - Mhf, are things running OK now? Sounds like they are.

Is there still something that I need to address in this version? I have found some areas where more validation of user input is required. I am working on that.

Should I post a link to a file instead of posting code for the next version?

I thought it was just a spelling error. Without the u it looks like it should be pronounced Kickstor smiling smiley I'd keep the u or at least a w if you want to be unique.

Posting a link to a file is better since it avoids copy/paste and forum bug errors.

Options: ReplyQuote
Re: IDEA : a temporary bookmark holder
Posted by: mhf
Date: August 04, 2011 10:38PM

Quote
JamesD

4 - Mhf, are things running OK now? Sounds like they are.

Is there still something that I need to address in this version? I have found some areas where more validation of user input is required. I am working on that.

Hi James, yes thanks, things are running OK now.

One idea came up about user input : where to open retrieved pages or links - new tab, background, tab, this tab ? I'd like background tab as default as that is generally how I do things but maybe this could be in options, or would that make things too weighty ?

Options: ReplyQuote
Re: IDEA : a temporary bookmark holder
Posted by: siria
Date: August 04, 2011 11:54PM

Or could use the default setting of a user? Just which one exactly ... ;-)

Options: ReplyQuote
Re: IDEA : a temporary bookmark holder
Posted by: JamesD
Date: August 05, 2011 02:52AM

@ sira

An excellent suggestion that you have made. I will do it that way. It looks like the choices are as follows.
## user_pref("kmeleon.general.openurl", "ID_OPEN_LINK_IN_NEW_TAB");
## user_pref("kmeleon.general.openurl", "ID_OPEN_LINK_IN_BACKGROUNDTAB");
## user_pref("kmeleon.general.openurl", "ID_OPEN_LINK_IN_NEW_WINDOW");
## user_pref("kmeleon.general.openurl", "ID_OPEN_LINK_IN_BACKGROUND");
That pref is missing if in the current tab is chosen.

After listening to peer review, I think the next version will use the name QuickStore.

Thanks to everyone for good suggestions. Now if only I can stay at home for a while and work on the project.

Options: ReplyQuote
Re: IDEA : a temporary bookmark holder
Posted by: JamesD
Date: August 05, 2011 03:30AM

@ mhf

If you wish, you can try out this new part of the code. It should open you page in your default method for typed URLs.

Replace this code:
_QickStor_Retrieve5 {
$_QickStor_URL = getpref(STRING,"k-meleon_QickStor.Url.".$_QickStor_UseCount);
open($_QickStor_URL);
}

With this code:
_QickStor_Retrieve5 {
$_QickStor_URL = getpref(STRING,"k-meleon_QickStor.Url.".$_QickStor_UseCount);
$_QickStor_OpenMethod = getpref(STRING, "kmeleon.general.openurl");
if ($kTabs) {
	if ($_QickStor_OpenMethod == "ID_OPEN_LINK_IN_NEW_TAB") { opentab( $_QickStor_URL ); }
	if ($_QickStor_OpenMethod == "ID_OPEN_LINK_IN_BACKGROUNDTAB") { openbgtab( $_QickStor_URL ); }
}
if ($_QickStor_OpenMethod == "ID_OPEN_LINK_IN_NEW_WINDOW") { opennew( $_QickStor_URL ); }
if ($_QickStor_OpenMethod == "ID_OPEN_LINK_IN_BACKGROUND") { openbg( $_QickStor_URL ); }
if ($_QickStor_OpenMethod == "ID_OPEN_LINK") { open($_QickStor_URL); }
}



Edited 1 time(s). Last edit at 08/05/2011 03:30AM by JamesD.

Options: ReplyQuote
Re: IDEA : a temporary bookmark holder
Posted by: siria
Date: August 05, 2011 03:48AM

Hmm... or perhaps you could use existing modules from main.kmm, that would simplify it a bit. Haven't tested, just in theory guess this probably works?

$OpenURL=getpref(STRING,"k-meleon_QickStor.Url.".$_QickStor_UseCount);
$_How="kmeleon.general.openurl";
&_OpenURL_How;

Options: ReplyQuote
Re: IDEA : a temporary bookmark holder
Posted by: JamesD
Date: August 05, 2011 04:18AM

WOW! Yes, that works and it is a lot less code. Thanks.

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


K-Meleon forum is powered by Phorum.