Just a thought: Since the patch is presumably called in the context of whatever task/process is opening the window, could you just call FindTask(NULL) and then check the task's name to see if it's the Workbench?
Of course, Workbench opens other kinds of windows too, such as the About window and various requesters. But those don't seem to have WFLG_WBENCHWINDOW set.
Question is : what about all other opened windowses via OpenWindowTagList(). Will try to test with some simple OpenWindowTagList() test case to see if it will be different than Workbench.
And i not sure, but is it corrects to call FindTask (or any other task based stuff) like this in the patched function?
@LiveForIt Quote:
Sorry I don’t get it, why not simply use Opus5 instead.
Because Dopus5 is pretty heavy, patching everything everywhere, can't be modernized very well till latest OS4 support (i.e. it can be, just need a lot of work) and add a lot of things one may not want.
What we want there, it's simple, configurable toolbar hack , which looks tasty, small, good-looking and that all. Nothing else. This is all pure technical fun and for those who want exactly this. There is no point to argue who require that or not. This is need for those who need it, and exactly that. Not dopus5, not context menus, nothing else. Who see no interest in, didn't have needs to worry about.
Sorry I don’t get it, why not simply use Opus5 instead.
One of those small items that make the OS more pleasant to use.
I think because the current situation where all drawers open on top of eachother isn't really user friendly. At least I rather use the shell then use WB when I have to navigate further then two levels.
An easy way to navigate inside a single windows should be a part of the OS. Dopus still feels like it is stuck in the '80s.
Since it isn't and probably not will be part of the OS. A patch is the next best thing.
A navigation bar was introduced even on AROS more than 10 years ago... even if a "simple" thing the inability to navigate between the windows is one of the most hateful things about the Workbench!.. A prehistoric 80's thing that have no sense to exist nowadays... more than due to technical difficult I have the impression that not introducing a banal navigation bar was more of a choice than anything else, sometimes I wonder why Amigans are so conservative So yep until we will have a proper solution even an hacky patch would be more than welcome
Sorry I don’t get it, why not simply use Opus5 instead.
Others have already answered plus I realized that I prefer to use WB over Opus/Filer even if it means more clicking.A slight modernization is enough for me.... and gives a false, visual impression that OS moves forward, too
PS. Hey, my post initiated quite a serious discussion
and nothing more, 'cos you pass NULL to NewWindow (struct) and I added " if(newWin == NULL) { return oldOpenWinFunc(ii, newWin, tagList); }" to my testSetMethod.c
'Cos it passes NewWindow data (struct). And not quite sure, but maybe we can AddGadget (in a nice/proper way) to the last (Gad_#06) one and show a toolbar or whatever we want.
That why i ask : with the test case you upload, i didn't have this when run my test case after patching openwindowtaglist by your patching code you upload.
Quote:
And not quite sure, but maybe we can AddGadget (in a nice/proper way) to the last (Gad_#06) one and show a toolbar or whatever we want.
We can try, just enough a simple gadget to see how it will connect to the moved windowses, etc. If that works, we can think more how to detect correctly wb windowses , etc, etc.
@Javier Try to run your latest test case from the shell, then hit in the shell "amiga+n" (for new TAB) => crash :) From second time can't reproduce, so maybe just bad luck.
And , if not tryig to open tab, but simple run from another shell my "openwindowtag", then it still print nothing, because in your code check on the NULL window sit before printf.
Anyway, question is now still remain: how to detect that those are workbench windowses, and how to attach a gadget to it.
What I'm doing is getting list of opened drawers from WB and then comparing directory paths last part to a window title. That method is not errorless, of course. Volumes have more stuff on the titlebar than just the name.
struct List *drwlist=NULL;
IWorkbench->WorkbenchControl(0,WBCTRLA_GetOpenDrawerList,&drwlist,TAG_DONE);
// browser through the list
IWorkbench->WorkbenchControl(0,WBCTRLA_FreeOpenDrawerList,drwlist,TAG_DONE);
You can use AddGadget() to add more gadgets to a window.
PS. I'm almost tempted to volunteer to Hyperion to improve the WB itself.
Rock lobster bit me - so I'm here forever X1000 + AmigaOS 4.1 FE "Anyone can build a fast CPU. The trick is to build a fast system." - Seymour Cray
PS. I'm almost tempted to volunteer to Hyperion to improve the WB itself.
Touching WB itself is so complecated and hardcore stuff, and everything should be discussed / redisussed milion (gazilion) of times with everyone before any single change in the WB itself to be done.
Things like we do, hurt no one : same WB as it was, just one who prefer can a bit update it. But rewriting/changing whole original workbench it's much more than just adding toolbar (it mean preferenes editors, etc ,etc a loooooooot of boring work).
@Javier Quote:
When you launch it and you open a WB window juts click on the upper left of the window inner space it should show a red/green button:
Tested ! Wow, it attaches fine, moves with windowses correctly, everyhting looks like it expected to be.
What about (for now just for tests), to put there simple aiss button “root”, so pressing on which will return us to the original, root of directory. By this we will have mostly all we need, all other stuff will be mostly design/thinking how to handle it all better, etc.
Yeah, 2 buttons there :) Through not from the start : you need to hit button to see them. Is it possible to “refresh” the list of gadgets before opening of the window ? (so to make them visibly from the start). Through that probably not the important bit now. Important to somehow find a way how to gain control over the content : i.e., hitting on button to cause, let's say, “level up”.
Hello everyone, Apologies in advance for the Google translation. I still hope that what I write comes across understandably. I am following this thread with great interest to bring Drawergenie to AmigaOS4.x. This idea is really great. I had a conversation with a programmer at a meeting in Germany tens of years ago about almost the same topic, how to make navigation easier in AmigaOS4.x without opening multiple windows. He actually already had something in the works. If it can possibly help with your approach, I would be happy to ask the programmer whether he releases the source code. I have to say that it is an experimental software, it sometimes causes a crash on my X5000. Here are a few screenshots of the software, the preferences are in German, but there is a catalog file to translate it into other languages. As written above, I will try to reach the author to see if he releases the source code. Hoping that it can help in your endeavors.
@MCFly Wasn't it Andre Doerffler ? I have a chat with him 10 years ago, when he actively works on it. And i actually find a source of it he's sending me 10 years ago. And he also explains me actually about issues/problems and patching stuff of workbench as well, i just find out all the mails now ..
Seeing the sources now, i see that Andre do use SetMethod() to patch those functions: OpenWindowTagList() CloseWindow() SetWindowTitles() AddAppWindowA() AddAppWindow() AddAppWindowDropZoneA() RemoveAppWindow() RemoveAppWindowDropZone() LockLayerInfo()
So same method..
Through app itself visually looks not very tasty (at least address bar at bottom, and no way to set it at top), and a bit buggy there and there, but, the code for sure can be used as reference to make a better/new one !
@kas1e oh, I didn't know you knew about Window Tray too. Then it sort of took care of itself. I have no idea about programming, but it occurred to me that I was able to test something similar to Drawergenie on my AmigaOne several years ago