Hi, I just added an entry in Odyssey beta kas1e and otehrs are updting fixing.
I have almost all gui/objects finsihed (bugs apart), and I implemented such new entry like oenctextmenu and mimetypes (as a separate ..classgroup, ..listclass), Working fine :-)
But alas the useragent list is a separate ASCII file where useragents are saved and need to know when user click on SAVE (or USE) buton to..well ,erm save new usergagent file :-)
putting some debug I get:
...
(USE)
[/amiga/Odyssey/odyssey-r155188-1.23/Source/WebKit/OrigynWebBrowser/Api/MorphOS/appclass.cpp:2387 handleMM_OWBApp_PrefsSave] SaveENVARC=0x00000000
[/amiga/Odyssey/odyssey-r155188-1.23/Source/WebKit/OrigynWebBrowser/Api/MorphOS/useragentgroupclass.cpp:489 handleMUIM_Export] UserAgent EXPORT:
[/amiga/Odyssey/odyssey-r155188-1.23/Source/WebKit/OrigynWebBrowser/Api/MorphOS/useragentgroupclass.cpp:254 save_useragents] SAVing user-agents...
[/amiga/Odyssey/odyssey-r155188-1.23/Source/WebKit/OrigynWebBrowser/Api/MorphOS/useragentgroupclass.cpp:270 save_useragents] 'PROGDIR:Conf/useragents.prefs' FILE:
[/amiga/Odyssey/odyssey-r155188-1.23/Source/WebKit/OrigynWebBrowser/Api/MorphOS/useragentgroupclass.cpp:283 save_useragents] skipping built-in user-agents (1)
[/amiga/Odyssey/odyssey-r155188-1.23/Source/WebKit/OrigynWebBrowser/Api/MorphOS/appclass.cpp:2393 handleMM_OWBApp_PrefsSave] prefs_update()
[/amiga/Odyssey/odyssey-r155188-1.23/Source/WebKit/OrigynWebBrowser/Api/MorphOS/useragentgroupclass.cpp:85 get_user_agent_strings] get_user_agent_strings() 0x57405a2c
...
(SAVE)
[/amiga/Odyssey/odyssey-r155188-1.23/Source/WebKit/OrigynWebBrowser/Api/MorphOS/appclass.cpp:2387 handleMM_OWBApp_PrefsSave] SaveENVARC=0x00000001
[/amiga/Odyssey/odyssey-r155188-1.23/Source/WebKit/OrigynWebBrowser/Api/MorphOS/useragentgroupclass.cpp:489 handleMUIM_Export] UserAgent EXPORT:
[/amiga/Odyssey/odyssey-r155188-1.23/Source/WebKit/OrigynWebBrowser/Api/MorphOS/useragentgroupclass.cpp:254 save_useragents] SAVing user-agents...
[/amiga/Odyssey/odyssey-r155188-1.23/Source/WebKit/OrigynWebBrowser/Api/MorphOS/useragentgroupclass.cpp:270 save_useragents] 'PROGDIR:Conf/useragents.prefs' FILE:
[/amiga/Odyssey/odyssey-r155188-1.23/Source/WebKit/OrigynWebBrowser/Api/MorphOS/useragentgroupclass.cpp:283 save_useragents] skipping built-in user-agents (1)
[/amiga/Odyssey/odyssey-r155188-1.23/Source/WebKit/OrigynWebBrowser/Api/MorphOS/useragentgroupclass.cpp:489 handleMUIM_Export] UserAgent EXPORT:
[/amiga/Odyssey/odyssey-r155188-1.23/Source/WebKit/OrigynWebBrowser/Api/MorphOS/useragentgroupclass.cpp:254 save_useragents] SAVing user-agents...
[/amiga/Odyssey/odyssey-r155188-1.23/Source/WebKit/OrigynWebBrowser/Api/MorphOS/useragentgroupclass.cpp:270 save_useragents] 'PROGDIR:Conf/useragents.prefs' FILE:
[/amiga/Odyssey/odyssey-r155188-1.23/Source/WebKit/OrigynWebBrowser/Api/MorphOS/useragentgroupclass.cpp:283 save_useragents] skipping built-in user-agents (1)
[/amiga/Odyssey/odyssey-r155188-1.23/Source/WebKit/OrigynWebBrowser/Api/MorphOS/appclass.cpp:2393 handleMM_OWBApp_PrefsSave] prefs_update()
[/amiga/Odyssey/odyssey-r155188-1.23/Source/WebKit/OrigynWebBrowser/Api/MorphOS/useragentgroupclass.cpp:85 get_user_agent_strings] get_user_agent_strings() 0x57405a2c
...
CONTINUES ON BELOW POST/REPLY..
The (SAVE) performs a double EXPORT, 'cos 1st save to ENVARC: and then to ENV:
As you can "see" there is "SaveENVARC" variable that tels me if user clicked on USE or SAVE, but this check is on appclass.cpp source:
...
and such metod then "calls" useragent EXPORT method (useragents.cpp):
Is tehre a way I can get in EXPORT the "SaveENVARC" variable?
Or how to "pass" "SaveENVARC" to EXPORT so the I can check for such variable value.
My knowledge in MUI is very very basic, any help/tips will be helpfull. TiA
AOS4.1/SAM460ex/PPC460EX-1155MHZ/2048MB/RadeonHD6570/SSD120GB/DVDRW :-P
aaaand think got the solution.
Just added a new method (MM_PrefsWindow_SaveUserAgents) to appclass.cpp, now it only saves when user clicks on SAVE button:
AOS4.1/SAM460ex/PPC460EX-1155MHZ/2048MB/RadeonHD6570/SSD120GB/DVDRW :-P