General :
K-Meleon Web Browser Forum
General discussion about K-Meleon
Plugins (MonkeeSage please read)
Posted by:
asmpgmr
Date: April 21, 2003 03:18PM
MonkeeSage,
Don't update the plugins just yet, Ulf is making a bunch of changes. The bookmarks plugin has a lot of changes, from what I can tell the bookmarks edit window is no longer modal but a real window, it now has incremental search, Mozilla bookmark groups are supported, my status bar and bookmark alignment fix are there as well. The favorites and hotlist have some minor updates as well. The history plugin has my incremental search fix plus a fix for bug 426. Toolbars has your separator width fix and my IsButtonChecked/IsButtonEnabled consistency fix.
Re: Plugins (MonkeeSage please read)
Posted by:
MonkeeSage
Date: April 21, 2003 04:36PM
asmpgmr:
Thanks for the tip! LOL...man that is crazy...Ulf did almost exactly what I was doing it looks like...
his:
else if ((t = strstr(p, "<DD>")) != NULL && lastNode != NULL) {
char *e = t+4;
while (*e && *e!='\n')
e++;
*e = 0;
lastNode->desc = t+4;
}
mine:
// find description tag <DD>
u = strchr(t, '\0');
u++;
v = strchr(u, '\n');
w = (char*)malloc(v-u);
strncpy(w, u, v-u);
w[v-u] = 0;
if ((desc = strstr(w, "<DD>")) != NULL){
desc+=4;
}
He's a step ahead of me.
I'll build / up all of Ulf's updates tomorrow. Date on top left of the unofficial builds page will be current when they are up.
Shelumi`El
Jordan
S.D.G
Re: Plugins (MonkeeSage please read)
Posted by:
asmpgmr
Date: April 21, 2003 06:10PM
So far Ulf has updated bookmarks, favorites, fullscreen, history, hotlist, and toolbars. No changes to the main program as of yet.
Re: Plugins (MonkeeSage please read)
Posted by:
MonkeeSage
Date: April 21, 2003 07:51PM
asmpgmr:
I had a bit of time so I built the updated plugins just now. They all work well (of course, you already know that for half of the fixes since you wrote them
).
Had to do a bit of playing to get descriptions fully supported (Ulf had the exact same idea idea, but he implemented it better, but he also forgot a few minor details--like the handler for pressing enter in the description edit field), but it works now.
I'm going to post the fixes on the Dev-List tomorrow if he hasn't already fixed them in CVS.
The edit window was also being created but not shown, so it took two Ctrl-B presses to see it--I guess Ulf is used to the modal version and forgot that you have to explicitly show window and move it to the top of the window stack after creating it for non-modal dialogs.
Updated plugin builds are:
bookmarks.dll
favorites.dll
hotlist.dll
history.dll
toolbars.dll
Shelumi`El
Jordan
S.D.G
Re: Plugins (MonkeeSage please read)
Posted by:
MonkeeSage
Date: April 21, 2003 07:55PM
The build of fullscreen.dll on the site is also updated now.
Shelumi`El
Jordan
S.D.G
Re: Plugins (MonkeeSage please read)
Posted by:
MonkeeSage
Date: April 21, 2003 08:38PM
I also found a nice icon for the bookmarks edit dialog.
Let me know if you like. I'm also going to send that to the Dev-List.
Shelumi`El
Jordan
S.D.G
Re: Plugins (MonkeeSage please read)
Posted by:
asmpgmr
Date: April 21, 2003 08:59PM
MonkeeSage,
The new bookmarks plugins has a couple of problems:
- It's still modal and worse pressing Esc doesn't return focus to the previous browser window (did you put up Ulf's build ? It looked non-modal from the code)
- All of the "Set as ..." items on the right click menu are always checked.
As for the icon, the star reminds me too much of Opera (yuck).
For now I went back to the previous build. New fullscreen, history, and toolbars are ok.
Re: Plugins (MonkeeSage please read)
Posted by:
MonkeeSage
Date: April 21, 2003 09:16PM
asmpgmr:
Yes, I uped the build from Ulf's code from CVS, pulled at like 11:15 PM my time (it's now 2:07 PM here). There are several very large chucks of code that are changed in ns_bookmarks_edit.cpp dealing with making the window non-modal and there is no more DoModal anywhere. I think the History plugin had a problem of not returning focus on ESC also, I'll have a look at what is done there and do the same in bookmarks (you should probably alert Ulf about it too, so he can fix it in CVS).
About the "Set As..." items--is that true for any bookmarks folder? On mine only the ones that apply the particular folder that is selected are checked. (Checks are used now instead of the Other: box which is used for descriptions in the current build). Ulf is the man behind all of that though, I was just making it write to the statusbar instead in my version, so if it is a bug then he should probably be told about that one as well.
Shelumi`El
Jordan
S.D.G
Re: Plugins (MonkeeSage please read)
Posted by:
jsnj
Date: April 21, 2003 09:20PM
I don't see a binary of the fullscreen.dll on your site. A couple things I noticed: The new favorites.dll, like the original from 0.7, takes a long time to load if you have alot of favorites. The sp1 version had fixed that. I also didn't see any way to add a bookmark group which asmpgmr suggested was supported. The differences I found were that the new description field replaces the "other:" field, I noticed the incremental search, though I'm not sure how useful that is compared to a full-fledged search function. BTW, where's the star icon? I don't see it.
Re: Plugins (MonkeeSage please read)
Posted by:
asmpgmr
Date: April 21, 2003 09:28PM
MonkeeSage,
Try pulling the bookmarks code again since Ulf has been a busy programmer. The bookmarks I downloaded from your page was modal as before with no program bar entry but did have the find stuff. Actually I don't think the incremental find stuff is all that great for the bookmarks but I don't have many bookmarks and find first letter access easier, no biggie though since I generally use the menu anyway.
All 3 "Set As ..." items were checked for all entries. I don't use any of those features (toolbar folders, new bookmark folders, bookmark menu).
As for the icon, here's a suggestion - can you make it a folder (the same one used in the bookmarks editor ?) I agree the win logo isn't good but the star immediately made me think of Opera.
As for contacting Ulf, I guess I should get on the mailing list.
Re: Plugins (MonkeeSage please read)
Posted by:
asmpgmr
Date: April 21, 2003 09:40PM
jsnj,
About the bookmarks search, a full fledged search (via Ctrl-F or F3) sounds like a better idea, then the original first letter search can be restored. You should open an RFE for this against bookmarks and mention that it should apply to favorites and hotlist as well.
fullscreen.dll is there but there's no link on his page (yet) -
http://monkeesage.d2g.com/fullscreen.dll
Re: Plugins (MonkeeSage please read)
Posted by:
MonkeeSage
Date: April 21, 2003 09:45PM
asmpgmr:
I just did a diff one the CVS, and I am building with the latest version, the only differences are dealing with the description support.
The ESC / focus issue is fixed now, this needs to replace the current case IDCANCEL: label;
case IDCANCEL:
if (!zoom) {
ghWndEdit = NULL;
if (gBookmarkRoot.child)
delete gBookmarkRoot.child;
if (gBookmarkRoot.next)
delete gBookmarkRoot.next;
gBookmarkRoot.child = NULL;
gBookmarkRoot.next = NULL;
UnhookWindowsHookEx(hHook);
if (hWndFront)
PostMessage(hWndFront, WM_COMMAND, wm_deferbringtotop, (LPARAM)NULL);
EndDialog(hDlg, 0);
break;
}
I doubt I'll use the find that much either, I have my bookmarks pretty well organized and I generally know where all my bookmarks are by category.
The menu checks sounds thing like a bug where all are selected if none are or something like that hehe.
Let me see if I can find a folder icon for it that is beter suited to K-M.
jsnj:
You must have downloaded the dll before I uped the one with the star icon,, try it again now. I'll also up another build with a folder icon when I find one. Keep in mind that as a .dll it can be reshacked like any other program with compiled resources, so you can also find your own icon... so long as it at least has
some icon set by default for you to index and ultimately replace.
There is groupmarks support in the code, but evidentally not in the UI. I'd have to look at the changes in the code a bit more carefully to know what it is doing exactly. I just know it it checking for a certain flag to indicate groupmarks. i'm not sure how it handles them if it reads that flag.
Oh, almost forgot, the fullscreen.dll, if it's not linked on the download page, is on the same site as the other individuals binaries, I just forgot to add a link.
Shelumi`El
Jordan
S.D.G
Re: Plugins (MonkeeSage please read)
Posted by:
jsnj
Date: April 21, 2003 09:51PM
MonkeeSage,
I'd suggest taking down the bookmarks.dll you uploaded. It had the star icon...and I tested the seach function which worked better than I thought, but after the edit dialogue window was closed....none of the bookmarks from the dropdown list would function. Then next time I went to select a bookmark, it had erased my entire bookmarks file out of the blue. Luckily I have a backup copy.
Re: Plugins (MonkeeSage please read)
Posted by:
jsnj
Date: April 21, 2003 10:13PM
I just tested it again. What I described above happens happens directly after using the search function.
Re: Plugins (MonkeeSage please read)
Posted by:
MonkeeSage
Date: April 21, 2003 10:21PM
jsnj:
I think I just caused that with the ESC / focus fix...
case IDCANCEL:
if (!zoom) {
ghWndEdit = NULL;
if (gBookmarkRoot.child)
delete gBookmarkRoot.child;
if (gBookmarkRoot.next)
delete gBookmarkRoot.next;
gBookmarkRoot.child = NULL;
gBookmarkRoot.next = NULL;
UnhookWindowsHookEx(hHook);
if (hWndFront)
PostMessage(hWndFront, WM_COMMAND, wm_deferbringtotop, (LPARAM)NULL);
EndDialog(hDlg, 0);
break;
}
hmmm....if I make it just:
case IDCANCEL:
if (!zoom) {
ghWndEdit = NULL;
UnhookWindowsHookEx(hHook);
if (hWndFront)
PostMessage(hWndFront, WM_COMMAND, wm_deferbringtotop, (LPARAM)NULL);
EndDialog(hDlg, 0);
break;
}
It doesn't return focus...but if I put in the block for deleting the gBookmarkRoot members like in the Hotlist plugin, it deletes the file? Wierd...I'll change it back to the one without the delete stuff. I don't think it is supposed to erase the file, heh, but I guess that is what it did...
This means the Esc / focus issue still needs to be fixed in some way that won't kill the bookmarks.html file. Sorry about that. Glad you had a backup!
Shelumi`El
Jordan
S.D.G
Re: Plugins (MonkeeSage please read)
Posted by:
jsnj
Date: April 21, 2003 10:29PM
I can confirm that this only happened with the build that has the star icon. The previous one without the icon didn't erase it and that's what I'm using now. But there's one other glitch that happens with both. When searching, you can only search once per session. If you try another search that session, even after closing or cancelling out of the edit dialog, it searches for what you typed the first time.
Re: Plugins (MonkeeSage please read)
Posted by:
asmpgmr
Date: April 21, 2003 11:06PM
MonkeeSage,
Delete removes the bookmark entry structure so if they all get deleted then the saved bookmarks file will have no entries. I'll go through CVS and see if I can find the update made to fix the focus problem in the history plugin.
Re: Plugins (MonkeeSage please read)
Posted by:
asmpgmr
Date: April 21, 2003 11:29PM
MonkeeSage,
This is the code that should do the trick unless hWndFront is somehow NULL, though the edit window that I got was modal. I think if the modality issue was solved then this would work properly. hWndFront should be the previous window so posting the message wm_deferbringtop should bring it to the top.
if (hWndFront)
PostMessage(hWndFront, WM_COMMAND, wm_deferbringtotop, (LPARAM) NULL);
As for the folder icon, can't you get it from bookmarks.dll ? Isn't it a resource in there ?
Re: Plugins (MonkeeSage please read)
Posted by:
MonkeeSage
Date: April 21, 2003 11:46PM
asmpgmr:
I thought so also on the PostMessage thing, but there wasn't even a handler there for wm_deferbringtotop...I added the one from op_hotlist, but it doesn't change anything...
Because of the issue with the CVS bookmarks plugin, I've renamed it to bookmarks-beta.dll if anyone wants to play with it...the delete code is gone now so it shouldn't do any harm.
As the regular bookmarks.dll I have my build of the lastest version of the code prior to the CVS pull. This includes full bookmark description support, but it is modal and always has focus while opened, unlike the new modeless 'beta' plugin in CVS; and has no typeahead searching, but it is stable.
The icons used for folders in the actual dialog are bmp and I don't have microangelo installed right now, so I can't convert them to .ico, which the main icon for the program has to be. Tomorrow I will install it and pull the red arrow picture that is used for idividual bookmarks and see how that looks as the dialog icon, and if that is ugly, I'll try the tan colored open folder picture... that or go to someplace like DeviantArt and get a nice folder icon that matches the colors. Something like that...
Shelumi`El
Jordan
S.D.G
Re: Plugins (MonkeeSage please read)
Posted by:
asmpgmr
Date: April 21, 2003 11:56PM
MonkeeSage,
Variable hWndFront was always null since it was never set. Try adding the following code to ns_bookmarks_util in callback function WndProc: (you already got the second part)
if (message == WM_SETFOCUS)
hWndFront = hWnd;
else if (message == WM_COMMAND) {
...
else if (command == wm_deferbringtotop) {
BringWindowToTop(hWnd);
return true;
}
Re: Plugins (MonkeeSage please read)
Posted by:
MonkeeSage
Date: April 22, 2003 12:08AM
asmpgmr:
Yup, you got it my friend. Works perfectly now (that aspect at least), and returns focus as expected.
Bookmarks-beta.dll is updated.
Shelumi`El
Jordan
S.D.G
Re: Plugins (MonkeeSage please read)
Posted by:
MonkeeSage
Date: April 22, 2003 12:32AM
jsnj:
Try out the Favorites plugin now and see if it is any faster, I think I used the wrong switch when I compiled it earlier.
Shelumi`El
Jordan
S.D.G
Re: Plugins (MonkeeSage please read)
Posted by:
asmpgmr
Date: April 22, 2003 12:43AM
MonkeeSage,
Latest bookmarks works better now, window is non-modal and focus is properly returned on Escape.
As for the "Set as ..." items being checked, this happens for entries in the root folder because of new code in ns_bookmarks_utils.cpp function OnRClick:
if (node && node->type != BOOKMARK_FOLDER) {
HTREEITEM htiParent = TreeView_GetParent(hTree, hItem);
if (htiParent)
node = GetBookmarkNode(hTree, htiParent);
else
node = NULL;
}
I'm not sure what Ulf is trying to accomplish with this code but the following new code then uses the parent folder for the initial check state
if (node && (node->flags & BOOKMARK_FLAG_T
)
CheckMenuItem(contextMenu, ID__SETAS_TOOLBARFOLDER, MF_BYCOMMAND | MF_CHECKED);
else
CheckMenuItem(contextMenu, ID__SETAS_TOOLBARFOLDER, MF_BYCOMMAND | MF_UNCHECKED);
if (node && (node->flags & BOOKMARK_FLAG_BM))
CheckMenuItem(contextMenu, ID__SETAS_BOOKMARKMENU, MF_BYCOMMAND | MF_CHECKED);
else
CheckMenuItem(contextMenu, ID__SETAS_BOOKMARKMENU, MF_BYCOMMAND | MF_UNCHECKED);
if (node && (node->flags & BOOKMARK_FLAG_N
)
CheckMenuItem(contextMenu, ID__SETAS_NEWBOOKMARKFOLDER, MF_BYCOMMAND | MF_CHECKED);
else
CheckMenuItem(contextMenu, ID__SETAS_NEWBOOKMARKFOLDER, MF_BYCOMMAND | MF_UNCHECKED);
I would imagine that only folders should be allowed these 3 menu items, actual bookmark entries should have them greyed out.
Re: Plugins (MonkeeSage please read)
Posted by:
jsnj
Date: April 22, 2003 01:35AM
MonkeeSage,
I just downloaded bookmarks-beta.dll. The search function is no longer the same. It's now only a first letter search. Is that on purpose? Also, there was no change in startup time with the favorites.dll. Still takes a long time.
Re: Plugins (MonkeeSage please read)
Posted by:
jsnj
Date: April 22, 2003 02:57AM
Duh, I just went back and checked again and I was downloading the wrong one, but it's a bit of a pain to download without the link posted because I have to right click your binaries and click "save link as". If I left click your binaries, KM tries to view it as text. So pasting
http://monkeesage.d2g.com/bookmarks-beta.dll in the URL bar doesn't do me much good. I'll be able to right-click the link once I've posted this, but can you guys left-click the dll's on that page and get the save prompt or do you have to right-click them the way I do?
Re: Plugins (MonkeeSage please read)
Posted by:
asmpgmr
Date: April 22, 2003 03:22AM
jsnj,
I get the same thing, you have to setup some browser type prefs to make it not do that. You can save the file with Ctrl-S once it's loaded or goto the disk cache (about:cache?device=disk), find the entry, click on it to get info and right click on the link from there.
Re: Plugins (MonkeeSage please read)
Posted by:
asmpgmr
Date: April 22, 2003 03:50AM
MonkeeSage,
For the check menu items issue, in ns_bookmarks_edit.cpp function OnRClick change:
CBookmarkNode *node = GetBookmarkNode(hTree, hItem);
if (node && node->type != BOOKMARK_FOLDER) {
HTREEITEM htiParent = TreeView_GetParent(hTree, hItem);
if (htiParent)
node = GetBookmarkNode(hTree, htiParent);
else
node = NULL;
}
to:
CBookmarkNode *node = GetBookmarkNode(hTree, hItem);
if (node && node->type != BOOKMARK_FOLDER) {
EnableMenuItem(contextMenu, ID__SETAS_TOOLBARFOLDER, MF_BYCOMMAND | MF_GRAYED);
EnableMenuItem(contextMenu, ID__SETAS_BOOKMARKMENU, MF_BYCOMMAND | MF_GRAYED);
EnableMenuItem(contextMenu, ID__SETAS_NEWBOOKMARKFOLDER, MF_BYCOMMAND | MF_GRAYED);
}
else {
EnableMenuItem(contextMenu, ID__SETAS_TOOLBARFOLDER, MF_BYCOMMAND | MF_ENABLED);
EnableMenuItem(contextMenu, ID__SETAS_BOOKMARKMENU, MF_BYCOMMAND | MF_ENABLED);
EnableMenuItem(contextMenu, ID__SETAS_NEWBOOKMARKFOLDER, MF_BYCOMMAND | MF_ENABLED);
}
Re: Plugins (MonkeeSage please read)
Posted by:
MonkeeSage
Date: April 22, 2003 06:57PM
asmpgmr:
That fixes it. The options are grayed for items and only enabled for folders. bookmarks-beta.dll is updated.
Shelumi`El
Jordan
S.D.G
Re: Plugins (MonkeeSage please read)
Posted by:
asmpgmr
Date: April 22, 2003 07:28PM
MonkeeSage,
Is that the last issue in the new bookmarks ? If so I suppose bookmarks-beta.dll can be made the distribution version.
Re: Plugins (MonkeeSage please read)
Posted by:
jsnj
Date: April 22, 2003 10:34PM
Just a small issue. To amend what I was saying previously about the search function and only being able to do it once per session, actually, the issue is how the search feature is refreshed. It refreshes by hitting Esc, or F5, or automatically if it's results are chosen. If you decide to OK or cancel out of the edit window after you've typed a search without choosing to visit the site it found, it doesn't automatically refresh. So, next time you go to search, maybe an hour later, when you start typing, the previous search appears in the title bar and you have to refresh by hitting the Esc or F5. Shouldn't it automatically refresh once you exit out of the edit window regardless of whether you've chosen its result?