General :  K-Meleon Web Browser Forum
General discussion about K-Meleon 
Pages: Previous1234Next
Current Page: 2 of 4
Re: Mozi-Meleon
Posted by: asmpgmr
Date: April 06, 2003 03:36PM

MonkeeSage,

I don't think adding prefs while the browser is running will work because the new pref wouldn't be in the internal preferences list which is created when the browser is started. I see no reason of adding prefs while the browser is running.


ie_utils.cpp (near the end):

else if (CBookmarkNode *node = gFavoritesRoot.FindNode(LOWORD(id))) {
char *ptr = (char *)node->url.c_str();
...
kPlugin.kFuncs->SetStatusBarText((char *)node->url.c_str());

return true;
}
else {
kPlugin.kFuncs->SetStatusBarText("");
}


op_utils.cpp (also near the end):

else if (CBookmarkNode *node = gHotlistRoot.FindNode(LOWORD(id))) {
kPlugin.kFuncs->SetStatusBarText((char *)node->url.c_str());
return true;
}
else {
kPlugin.kFuncs->SetStatusBarText("");
}

Options: ReplyQuote
Re: Mozi-Meleon
Posted by: asmpgmr
Date: April 06, 2003 04:41PM

MonkeeSage,

A minor change to my history code update, I noticed that the grey plus key opens a folder so the grey minus should close it for consistency. Therefore VK_SUBTRACT should not send a minus, only VK_MINUS should.

In hist_view.cpp, change:

else if ( (wParam == VK_MINUS || wParam == VK_SUBTRACT) &&
len < (SEARCH_LEN-1) ) {
str[len] = '-';
len++;
}

to:

else if ( (wParam == VK_MINUS) &&
len < (SEARCH_LEN-1) ) {
str[len] = '-';
len++;
}

I already tested this by patching out the VK_SUBTRACT compare and it works, the minus key is usable for searches and the grey minus key closes an open folder.

Options: ReplyQuote
Re: Mozi-Meleon
Posted by: asmpgmr
Date: April 07, 2003 03:48AM

FYI - undo and redo can be made to work in K-Meleon by deleting and commenting out the following lines in accel.cfg:

CTRL Z = ID_EDIT_UNDO
ALT VK_BACK = ID_EDIT_UNDO

The undo and redo functions are inherit in the Mozilla code like the standard cursor movements. Undo is Ctrl-Z or Alt-Backspace, redo is Ctrl-Y. Since there is no redo function in K-Meleon the definitions were blocking the underlying Mozilla functions. Note there is no way to make the undo menu item work since this would require an function in K-Meleon which handles the ID_EDIT_UNDO command message and a corresponding message to enable/disable (grey) the menu item.

Options: ReplyQuote
Re: Mozi-Meleon
Posted by: MonkeeSage
Date: April 07, 2003 06:18AM

asmpgmr:

AWSOME about CTRL-Z, I kept wondering why there was no undo for forms!!! Sweet! grinning smiley

I added the ststusbar fix to the other bookmark plugins (favs & hotlist), and I changed the bit there in the history plugin code.

http://monkeesage.d2g.com/favorites.dll
http://monkeesage.d2g.com/hotlist.dll
http://monkeesage.d2g.com/history.dll


Shelumi`El
Jordan

S.D.G

Options: ReplyQuote
Re: Mozi-Meleon
Posted by: asmpgmr
Date: April 08, 2003 12:58AM

MonkeeSage,

About bug 23, no changes are needed. K-Meleon already has code to reinitialize the prefs when prefs.js is modified using the internal editor in the prefs panel.


Here is a diff file for mfcembed.rc which fixes a couple of typos, removes some unused statusbar messages and adds a couple of missing statusbar messages. Note the first two lines should have a tab character (09h) between the filename and timestamp

--- mfcembed.rc 2003-03-30 22:23:08.000000000 +0000
+++ mfcembed.rc 2003-04-07 20:27:36.000000000 +0000
@@ -861,25 +861,12 @@

STRINGTABLE DISCARDABLE
BEGIN
- ID_NEXT_PANE "Switch to the next window pane\nNext Pane"
- ID_PREV_PANE "Switch back to the previous window pane\nPrevious Pane"
-END
-
-STRINGTABLE DISCARDABLE
-BEGIN
- ID_WINDOW_SPLIT "Split the active window into panes\nSplit"
-END
-
-STRINGTABLE DISCARDABLE
-BEGIN
ID_EDIT_CLEAR "Erase the selection\nErase"
ID_EDIT_CLEAR_ALL "Erase everything\nErase All"
ID_EDIT_COPY "Copy the selection and put it on the Clipboard\nCopy"
ID_EDIT_CUT "Cut the selection and put it on the Clipboard\nCut"
ID_EDIT_FIND "Find the specified text\nFind"
ID_EDIT_PASTE "Insert Clipboard contents\nPaste"
- ID_EDIT_REPEAT "Repeat the last action\nRepeat"
- ID_EDIT_REPLACE "Replace specific text with different text\nReplace"
ID_EDIT_SELECT_ALL "Select the entire document\nSelect All"
ID_EDIT_UNDO "Undo the last action\nUndo"
ID_EDIT_REDO "Redo the previously undone action\nRedo"
@@ -894,9 +881,10 @@
ID_LINK_KMELEON_FAQ "View the K-Meleon FAQ"
ID_LINK_KMELEON_MANUAL "View the K-Meleon User's Guide and Reference Manual"
ID_LINK_ABOUT_PLUGINS "View information on installed third party plugins"
- ID_EDIT_FINDNEXT "Find the next occurance of the specified text"
- ID_EDIT_FINDPREV "Find the previous occurance of the specified text"
+ ID_EDIT_FINDNEXT "Find the next occurence of the specified text"
+ ID_EDIT_FINDPREV "Find the previous occurence of the specified text"
ID_WINDOW_NEXT "Switch to next K-Meleon window"
+ ID_WINDOW_PREV "Switch to previous K-Meleon window"
END

STRINGTABLE DISCARDABLE
@@ -909,18 +897,15 @@
ID_NAV_SEARCH "Search the Internet"
ID_EDIT_SELECT_NONE "Select nothing in the document\nSelect None"
ID_NEW_BROWSER "Open a new browser window"
- ID_VIEW_SOURCE "View the souce of the current page"
-END
-
-STRINGTABLE DISCARDABLE
-BEGIN
- ID_WINDOW_PREV "Switch to previous K-Meleon window"
+ ID_VIEW_SOURCE "View the source of the current page"
END

STRINGTABLE DISCARDABLE
BEGIN
ID_VIEW_TOOLBAR "Show or hide the toolbar\nToggle ToolBar"
ID_VIEW_STATUS_BAR "Show or hide the status bar\nToggle StatusBar"
+ ID_FONT_INCREASE "Increase font size"
+ ID_FONT_DECREASE "Decrease font size"
END

STRINGTABLE DISCARDABLE

Options: ReplyQuote
Re: Mozi-Meleon
Posted by: asmpgmr
Date: April 08, 2003 04:16PM

Here is some .exe size reduction stuff:

In AccelParser.cpp delete the definitions for F13-F24 in the VK_TEST block. I have only seen these keys on old mainframe connectivity keyboards. Also the definitions for KANA through MODECHANGE should probably be deleted as well, these are only for Japanese keyboards and have special purposes so they most likely wouldn't be redefined as accelerators.


Edit Cookies should be removed from the prefs panel for the following reasons:

1. Cookies are cached so editing cookies.txt is pointless, all changes from the current session are in the cookie cache and are written out at exit.
2. Notepad doesn't properly handle cookie.txt it expects CR-LF at the end of lines and cookies.txt only has LF at the end of lines.
3. Tabs are used as a delimiter in cookie.txt and if expanded by an editor will cause cookies to be lost.

In PreferencesDlg.cpp delete the following lines:

ON_BN_CLICKED(IDC_BUTTON_COOKIES, OnEditCookies)
...
void CPreferencePage::OnEditCookies() {
CString cookiePath;
cookiePath = theApp.preferences.profileDir + "cookies.txt";
ShellExecute(NULL, NULL, "notepad.exe", cookiePath.GetBuffer(0), NULL, SW_SHOW);
}

In PreferencesDlg.h delete the following lines:

afx_msg void OnEditCookies();


In MfcEmbed.rc delete the following lines:

PUSHBUTTON "Edit Coo&kies...",IDC_BUTTON_COOKIES,154,57,88,12,
WS_GROUP

Options: ReplyQuote
Re: Mozi-Meleon
Posted by: MonkeeSage
Date: April 09, 2003 07:11AM

asmpgmr:

Build is up with these changes.

http://monkeesage.d2g.com/


Shelumi`El
Jordan

S.D.G

Options: ReplyQuote
Re: Mozi-Meleon
Posted by: asmpgmr
Date: April 09, 2003 04:23PM

MonkeeSage,

All of the changes were not there. Please redo the mfcembed.rc diff and don't add any other resources. Make sure the three typos are fixed. Also there were extra strings in there which just add unnecessary bloat. Also in AccelParser.cpp, the definitions for KANA through MODECHANGE were still present. Finally there should be no changes in the prefs saving. That change has prefs.js written out TWICE at exit which makes no sense. Plus DeleteTempFiles should only delete temp files, it should not reinit prefs at exit. Anyone who wants to make changes to prefs.js directly can use the builtin editor in the prefs panel or close K-Meleon.

Options: ReplyQuote
Re: Mozi-Meleon
Posted by: asmpgmr
Date: April 10, 2003 04:58PM

The commands ID_FILE_PRINTPREVIEW and ID_FILE_PRINTSETUP should actually be ID_FILE_PRINT_PREVIEW and ID_FILE_PRINT_SETUP which are standard win32 definitions like ID_FILE_PRINT. Changing them to the standard definitions should make the default menu statusbar text appear for them though this will require accel.cfg and menus.cfg to be changed as well as some other source files. This one simple update should do the trick without any other changes:

In k-meleon\resources.h change:

#define ID_FILE_PRINTPREVIEW 32801
#define ID_FILE_PRINTSETUP 32802

to:

#define ID_FILE_PRINTPREVIEW ID_FILE_PRINT_PREVIEW
#define ID_FILE_PRINTSETUP ID_FILE_PRINT_SETUP

Options: ReplyQuote
Re: Mozi-Meleon
Posted by: asmpgmr
Date: April 10, 2003 06:40PM

One more minor update for consistency sake. The bookmarks plugin doesn't display statusbar messages for commands like the favorites and hotlist plugins do. Changing the last else if block (WM_MENUSELECT) at the end of ns_bookmarks\ns_bookmarks_utils.cpp to the following will fix this:

else if (message == WM_MENUSELECT) {
UINT id = LOWORD(wParam);
if (id >= nConfigCommand && id < nDropdownCommand) {
if (id == nConfigCommand)
kPlugin.kFuncs->SetStatusBarText("Configure the bookmarks plugin");
else if (id == nAddCommand)
kPlugin.kFuncs->SetStatusBarText("Add to bookmarks");
else if (id == nAddLinkCommand)
kPlugin.kFuncs->SetStatusBarText("Add link to bookmarks");
else if (id == nEditCommand)
kPlugin.kFuncs->SetStatusBarText("Edit the bookmarks");
return true;
}
else if (CBookmarkNode *node = gBookmarkRoot.FindNode(LOWORD(id))) {
kPlugin.kFuncs->SetStatusBarText(node->url.c_str());
return true;
}
else {
kPlugin.kFuncs->SetStatusBarText("");
}
}

Options: ReplyQuote
Re: Mozi-Meleon
Posted by: MonkeeSage
Date: April 10, 2003 11:38PM

asmpgmr:

I added these latest additions, and removed the preference stuff I added on exit.

The reason the KANA ekeys are not commented out is because I think they are modifiers, I think that making certain characters would be a pain in the butt without them. I know two of them (KANA and KANJI stand for two different styles of writing, katakana and katakanji). But what I did was comment out the F13-F24 jeys and move the KANA-MODECHANGE to the second to the last parse items.

The extra resource node "24" with 1:1033:Binary is the XP Manifest file, it is not even loaded at run-time unless you are on windows XP, otherwise it is treated as discardable and never gets a call to load it into memory.


Shelumi`El
Jordan

S.D.G

Options: ReplyQuote
Re: Mozi-Meleon
Posted by: MonkeeSage
Date: April 10, 2003 11:40PM
Options: ReplyQuote
Re: Mozi-Meleon
Posted by: asmpgmr
Date: April 10, 2003 11:56PM

MonkeeSage,

The list in AccelParser.cpp is only used for defining accelerators in accel.cfg so I seriously doubt any of the special Japanese keys would be used as accelerators since their purpose is as modifiers so it's safe to comment them out there, it won't affect their use elsewhere.

Could you take the xp stuff out of the build you post separately ? I don't run xp (and never will). I prefer everything to be as small as possible.

By the way I'm still looking into the focus stealing problem (bug 12).

Options: ReplyQuote
Re: Mozi-Meleon
Posted by: asmpgmr
Date: April 11, 2003 12:04AM

MonkeeSage,

The typos in mfcembed.rc for the statusbar messages are still there. The typos are in the string tables, in ID_EDIT_FINDNEXT and ID_EDIT_FINDPREV "occurence" is misspelled (a instead of e), in ID_VIEW_SOURCE "source" is misspelled (missing r).

Here are the corrected lines:

ID_EDIT_FINDNEXT "Find the next occurence of the specified text"
ID_EDIT_FINDPREV "Find the previous occurence of the specified text"

ID_VIEW_SOURCE "View the source of the current page"

Options: ReplyQuote
Re: Mozi-Meleon
Posted by: MonkeeSage
Date: April 11, 2003 01:10AM

asmpgmr:

Check:

http://gratisDei.com/KM.htm

Should have all the links you want for the single binaries and plugins now (the -noManifest binaries have no resource node 24). smiling smiley


Shelumi`El
Jordan

S.D.G

Options: ReplyQuote
Re: Mozi-Meleon
Posted by: asmpgmr
Date: April 11, 2003 01:27AM

MonkeeSage,

Looks good now, I like the separate links, they're conveinent for updates to only one component.

By the way thanks for building all of many and sometimes frequent updates.

Options: ReplyQuote
Re: Mozi-Meleon
Posted by: asmpgmr
Date: April 11, 2003 02:52AM

MonkeeSage,

You're missing the fullscreen plugin, it was changed since the service pack.

Options: ReplyQuote
Re: Mozi-Meleon
Posted by: MonkeeSage
Date: April 11, 2003 02:55AM

asmpgmr:

Sure thing. I'm glad you're fixing so many bugs! I don't mind building the fixes at all. smiling smiley


I was messing with K-Meleon ID_EDIT_UNDO and ID_EDIT_REDO commands...I got them to work, using the keybd_event() function, like:

keybd_event(VK_CONTROL, 0, 0, 0);
keybd_event(0x5A, 0, 0, 0);
keybd_event(0x5A, 0, KEYEVENTF_KEYUP, 0);
keybd_event(VK_CONTROL, 0, KEYEVENTF_KEYUP, 0);


But you can't assign it to CTRL-Z or it just prints a Z, heh, CTRL-SHIFT-Z is fine...so that's not ideal...but when I try the same thing with PostMessage(), like so":

PostMessage(WM_KEYDOWN, VK_CONTROL, 0);
PostMessage(WM_KEYDOWN, 0x5A, 0);
PostMessage(WM_KEYUP, 0x5A, 0);
PostMessage(WM_KEYUP, VK_CONTROL, 0);

Crash!

This doesn't work either (no crash but nothing happens):

PostMessage(WM_KEYDOWN, VK_CONTROL & 0x5A, 0);

And:

PostMessage(WM_KEYUP, VK_CONTROL & 0x5A, 0);

Got any ideas? Not really important since the CTRL-Z works fine, but this way the resource strings would be accessible in K-M for having undo / redo as menu items.


I'm also going to try to figure out how to add menuicons for the macros() commands like they have for IDs. Any ideas there would be appreciated as well.

Thanks!


Shelumi`El
Jordan

S.D.G

Options: ReplyQuote
Re: Mozi-Meleon
Posted by: asmpgmr
Date: April 11, 2003 02:41PM

MonkeeSage,

As far as I can tell K-Meleon calls routines in Mozilla to handle the supported cut, copy, paste commands and Mozilla ultimately ends of calling clipboard routines. There would be have to an interface in Mozilla that K-Meleon could use for undo and redo that would allow them to be displayed on a menu but there isn't. Now the URL bar context menu works differently but I think that's part of the win32 combo box functionality. Interestingly all of the editing commands are defined in Mozilla, look in the files
K-Meleon/res/builtin/htmlBindings.xml
K-Meleon/res/builtin/platformHTMLBindings.xml

This where all of the standard browser key functions (up, down, pgup, pgdn, etc) are defined also.

Options: ReplyQuote
Re: Mozi-Meleon
Posted by: asmpgmr
Date: April 11, 2003 04:45PM

MonkeeSage,

I just noticed a pattern to bug 288 with form input fields sometimes being lost on back. This only seems to happen when text is pasted into a form input field, often the pasted text is lost when returning to the page via back. Text which is typed in or edited manually never seems to be lost. I tried removing the ID_EDIT_CUT, ID_EDIT_COPY, ID_EDIT_PASTE, and ID_EDIT_SELECT_ALL key definitons from accel.cfg so these functions goto Mozilla instead and so far that seems to work.

Options: ReplyQuote
Re: Mozi-Meleon
Posted by: asmpgmr
Date: April 12, 2003 12:05AM

MonkeeSage,

There are several issues - one the functions in BrowserView.cpp which handle text editing call functions in a Mozilla clipboard interface (nsIClipboardCommands) which should ultimately call the same functions Mozilla does for the key defined in the xml files. Clearly something isn't right though because removing the ID_EDIT definitions from accel.cfg fixes bug 288. Also there's checking for the URL bar in each On.../OnUpdate... function even though the URL bar is handled as part of the standard combo box processing, notice there's no menu definition for it but its context menu works properly. Finally the Mozilla clipboard interface doesn't have definitions for undo and redo even though these functions exist a deeper level in the Mozilla editor code. See webshell/public/nsIClipboardCommands.idl and docshell/base/nsWebShell.cpp.

Anyway the only way I can see to have the commands appear on the text popup context menu is to fix whatever is wrong with the Paste and/or OnPaste function unless there's an interface to the lower level functions. Even then there's currently no way to make undo, redo, and clear work since they're simply not in the nsIClipboardCommands interface.

Options: ReplyQuote
Re: Mozi-Meleon
Posted by: MonkeeSage
Date: April 12, 2003 04:25AM

asmpgmr:

That's wierd...hmmm. Thanks for doing all the research on that. I guess it's just another instance where 3rd party embedding doesn't get to use real Mozilla functionality.


Shelumi`El
Jordan

S.D.G

Options: ReplyQuote
Re: Mozi-Meleon
Posted by: jsnj
Date: April 12, 2003 09:23PM

I've just tried the new toolbars.dll to test out the fixed RFE 368(toolbar separators) and came across what I think are a couple bugs unless there's a new setting that I'm unaware of that I need to adjust. Main toolbars can no longer be overlapped...and I'm not sure if that's a bug or on purpose but it lessens UI flexibility. Also, what would definitely be considered a bug is that any separator added creates an extra empty space at the end of the toolbar...so two separators within the toolbar creates two extra spaces at the end of the toolbar, which as I mentioned before cannot be overlapped. Would you guys know how to fix that or is that up to Ulf since I believe he added the separator functionality?

Options: ReplyQuote
Re: Mozi-Meleon
Posted by: jsnj
Date: April 12, 2003 09:33PM

Main toolbars can no longer be overlapped..

Meaning the bitmaps on the toolbar can't be covered by another toolbar.The rest of the empty bar can be covered except for the extra spaces created by new separators.

Options: ReplyQuote
Re: Mozi-Meleon
Posted by: asmpgmr
Date: April 12, 2003 09:48PM

jsnj,

I know the separators code was added but never looked at, the big thing for me in the new toolbars.dll was being able to get rid of the annoying and stupid tooltips. The one line fix for bug 410 may have changed the overlap behavior. Does this also happen without using separators ? As for the separators, a quick look at the code doesn't turn up any problems. A button separator is added for each dash in toolbars.cfg.

Options: ReplyQuote
Re: Mozi-Meleon
Posted by: jsnj
Date: April 12, 2003 10:13PM

The overlap behavior is consistent with or without separators but being able to overlap the bitmaps isn't really important because if you don't want the buttons you can always take'm out. That overlap flexibility is only important for the bookmark toolbar until the ability to implement menus from the main toolbar(s) is created.

A button separator is added for each dash in toolbars.cfg

What do you mean by "button" separator? Would this account for the empty spaces at the end of each toolbar per separator(dash)? What would its purpose be? I'm only familiar with vertical line separators(if there is such a term) which a dash in toolbars.cfg creates. If a dash creates both, how can you specify one without creating the other? Hope I made sense.

Options: ReplyQuote
Re: Mozi-Meleon
Posted by: asmpgmr
Date: April 12, 2003 11:46PM

jsnj,

I meant a vertical separator between the buttons. Basically the separator is itself a button but with no width, no height, and a special flag indicating it's actually a separator. I would guess there's some code somewhere that's adding one pixel for every button or something. Toolbar elements really shouldn't overlap.

Note I don't really use the toolbars, I only have a normal menu and the standard toolbar with four buttons (back, forward, reload, stop), the URL bar, and throbber. I access the bookmarks via the bookmarks dropdown (Alt-cool smiley. Doesn't the bookmarks toolbar have a menu dropdown ? I saw something in the code (bookmarks, favorites, and hotlist) about a toolbar chevron which should issue a dropdown menu when selected.

Options: ReplyQuote
Re: Mozi-Meleon
Posted by: jsnj
Date: April 13, 2003 12:36AM

Doesn't the bookmarks toolbar have a menu dropdown ?

Yeah, there's a double downward arrow at the beginning of the bookmarks toolbar which serves as a dropdown list. That's where I store all of my menu and submenu items as well as the bookmarks list rendering the traditional menu bar unnecessary, therefore saving screen real estate which I'm picky about. But it feels like a bit of a workaround to have to display an essentially covered bookmarks toolbar just for the downward arrow dropdown menu list at the end of it. A toolbar button that allows a dropdown menu list would seem more efficient since you wouldn't have to have the bookmarks plugin & bookmarks toolbar enabled if you prefer the favorites or hotlist plugins whose toolbars don't have chevrons. K-Meleon is still far more flexible in its UI than any other browser though.

Options: ReplyQuote
Re: Mozi-Meleon
Posted by: asmpgmr
Date: April 13, 2003 12:54AM

jsnj,

Current versions of all three plugins (post 0.7.1) have the chevron dropdown (at least that's what I'm seeing in the code). MonkeeSage builds should have them. I agree it would be nice if toolbar buttons could open dropdown menus, I think MonkeeSage is looking into enabling the code to do that, most of the code is already there but commented out. See the thread "Is there a way to ..." The only thing is if you want to be able to access the bookmarks via a keystroke (Alt-cool smiley like I do then having a dropdown menu from a toolbar button doesn't help, you still need the real menu bar for accelerator access.

Options: ReplyQuote
Re: Mozi-Meleon
Posted by: jsnj
Date: April 13, 2003 01:13AM

Current versions of all three plugins (post 0.7.1) have the chevron dropdown (at least that's what I'm seeing in the code). MonkeeSage builds should have them.

I just downloaded the favorites and hotlist binaries from his page and enabled their toolbars. No chevrons appeared for some reason.

Options: ReplyQuote
Pages: Previous1234Next
Current Page: 2 of 4


K-Meleon forum is powered by Phorum.