Samstag, 10. November 2007

KUrlNavigator on windows - or: Never try to fix a bug

While trying to fix a bug in kate I hit a lot of other problems. First it was not compilable (although it was not monday) because kdelibs wanted to have soprano 1.97.2. Then another bug in the cmake scripts hit me. Saro fixed this and I was happy to see if me fix for the bug was correct.

So I started kate, opened a file and... crash! Next start with debugger, kate asked me if I want to overwrite 'Default Session.katesession', I select yes but kate doesn't care and asks me again. After checking if the permissions are correct I decided to start another debugger and see what kio_file is doing. I ended up using an own implementation of FileProtocol::rename() for windows. Also moved out copy(), delete() and some other functions (think we should move all those functions into platform specific sources).

Now kate overwrites the file without asking me more than once and I can go further to see why the first crash happens. But this time it was an easy one. I forgot to install kdebase-runtime (wiped out complete kde4 installation before) and now KIconloader tried to add an empty QPixmap to (Q)KPixmapCache. Looks like nobody else did this before on windows because it simply can't work. Ok, added a hack, wrote a mail to qt-bugs and installed kdebase-runtime.

Started kate again and waited for the next crash. Out of curiosity there was none... opening a file worked like a charm. Ok, at least on the first sight ;)
Changed some things in KUrl and KUrlNavigator to fix problems because it's assumed everywhere that '/' is the one and only root path. Not that big problem and in the end I fixed my first bug from bugs.kde.org :)

While fighting with KUrlNavigator I saw that we can't change the drive - I can just open and save documents on the same drive like kate. Because having kate on every single drive isn't a good option I came to the conclusion that KUrlNavigator needs some tweaks for win32.
Now I wonder how you would like to have KUrlNavigator on windows. Here the screen shot from the native file open dialog:



As you can see there are two pseudo directories above the drives. I would like to add this to KUrlNavigator too - except you've a better idea how to select the drives. But keep in mind that we should use a similar approach like above to not confuse the users.

5 Kommentare:

industrie13 hat gesagt…

The more native to Windows, the better. I would do like suggested adding the pseudo directories too.

Michael

Anonym hat gesagt…

I think that resembling the tree of the dialog you presented will be good for the users. Btw if it's well insulated in kde apis you can go with what you prefer now, and change that later based on user's feedback.

That said, I like to thank you for your work. On my windows system kate doesn't even start up (it claims for a 'missing editor component') but the installer is *very* good, the programs are really welcome and your work is really saving the bills of my psychologist ;-)

Andreas Pakulat hat gesagt…

I guess the reason for not using the native dialogs are the ioslaves? If so, I think the 2 extra levels are only needed if the list of drives is not initially visible and last I checked it was visible at least in the drop-down-box in the kde filedialog.

Sure thats different from the standard dialogs, but unless the list of drives is initially hidden there's no way (IMHO) that a user doesn't find them and needs the "Workspace" item for them.

Anonym hat gesagt…

Still not installed
You realy need to make it simpler to try

Saro hat gesagt…

I would have preferred it, if I would not need to use https:// to post a comment on your blog - then I could have said I was the first to use windows konqueror on your page ;-). You made a lot working now, though https:// isn't within that.
But Thank You Thank You Thank You and good night