Blog
Page: 0 ... 5 ... 10 ... 15 ... 20 ... 25 ... 30 ... 35 37 38 39 40 41 42 43 44 45 ... 50 ... 55 ... 60 ... 65 ... 70
Progress
Date: 4/3/2007
This morning I had a look at the folder loading code from an optimization point of view. It seems that running the event loop outside the normal place is extremely slow on Carbon (i.e. LgiYield() ) so I removed that from the load folder code and it went from 7sec to 0.7sec. Which means that Scribe starts in about the same amount of time as the win32 build, but it doesn't update the screen as it loads, so it looks like it's not doing anything for a second and then everything appears at once. I can live with that.

I also implemented support for the mouse wheel. Basically I just had to capture the event and call the appropriate event handler in Lgi. All sorted.

Scrolling around in folders is still pretty slow. I suspect that I'm creating destroying lots of ATSUI text objects. So I'll have a go at caching more of those. I'm a bit worried that it's the drawing of ATSUI text that's slow. But we'll see.
(0) Comments | Add Comment

Porting Update
Date: 4/3/2007
The HTML layout is fixed. I needed to apply the origin co-ordinates when displaying text. Also while I was there I fixed the colours. In several places I was using 24bit colour when I should have been using 32bit colour. On little endian machines that works anyway, but on PPC machines it breaks. So I had to do the conversions in a few more places.

In the text control I found that lines of text were being clipped so I spent some time looking at that. It seems the text metrics API is a bit busted. Well none of the API functions actually tell you how big a bit of text will appear on the screen. So at the moment I've erred on the side of more whitespace rather than clipped text. I'll probably leave that for later.

Things are running, but everything is pretty slow. I'll need to do a lot of optimisation to get anywhere near the speed of the Win32 version.

(0) Comments | Add Comment

Mac Port
Date: 3/3/2007
More progress to report. I've fixed the mouse handling so that I can reliably drag the splitter around with out weird coords in the GMouse event. Nice.

I've also fixed the client rect of the main list control so that it paints correctly. So I get a reasonable looking page of email when I start Scribe on the mac.

The HTML control is still drawing all it's text at 0,0 instead of the correct location, so I hope to get that sorted out today, and also the connect to server thread to download mail assert's somewhere so I'll be looking into that.

But that means I'm pretty close to actually... RECEIVING MAIL on the mac. As most of the UI is working now.

Thats pretty exciting for me at least. I'm still pumped over getting the fonts to work from last week ;)
(0) Comments | Add Comment

Mac Porting
Date: 28/2/2007
So I eventually found this little bit of code on the Apple site that shows how to initialize an ATSUI font style with the parameters from a theme font, which is exactly what I wanted to do with fonts inside LGI. My apps now render their text like a native MacOSX app, which is just great.

Also I've fixed enough things in the mail2 backend code that Scribe now loads my main mail folder file (abeit a read-only copy) on my PPC machine. This involved lots of byte swapping.

Current issues are:
  • The list control is not painting anything at all.
  • The scrollbars become blank greyness after resizing a window.
  • Grabbing a splitter and resizing it moves the split to the wrong location. Something to do with co-ordinates and mouse capture.


A triple platform release this month is looking unlikely. Primarily because I'm (again) suffering for chronic RSI and need to take things slowly so that I can recover. But the linux build is pretty close to done, the windows build is still waiting for a focus issue fix and well the mac port is well.... painting its fonts nicely!
(0) Comments | Add Comment

Progress
Date: 15/2/2007
On the Mac coding front I'm implementing support for PPC byte ordering in code that reads/writes the mail2 folders. This is so I can run Scribe on my mini. I think I'm over half way through that, and I'm hoping to have a running build of Scribe next week sometime.

On the Linux front I've ditched the old hack I was using to support some KDE system settings from inside Lgi applications and I've written a new shared library that acts as glue between KDE and Lgi. When an Lgi app detects it's running on a KDE system it loads the support module (hard linked against KDE) that calls the official KDE api to query it for system information. This method has many benifits, first and foremost it's not a hack so it works well and isn't likely to break. Secondly I can now support other window managers easily, so I'll be writing a Gnome support module shortly on Fedora Core 6. The window manager glue module provides access to:
  • Official system path info (e.g. the desktop path)
  • System UI colour settings
  • Mime -> App list translations
  • The currently selected system language
And I guess I could add more if needed. All of this information is optional and Lgi will sythesis it if needed. But having it makes for a nicer user experience. One thing that I could experiement with later is seeing if I can implement a bridge between the KDE/Qt skinning code and the Lgi skinning interface. That could possibly mean that Lgi apps could look like native KDE apps without hard linking against KDE.

On the windows front, I'm still trying to fix the lose of focus issues. I've hacked a fix up for the lose of focus when selecting the root node in Scribe, but I'm finding that there are other places where the same thing is happening, even with the hack in place. For instance sometimes when you click on a message in the list the focus immediately gets lost. Which screws everything up. If I can fix that I'll make a release.

In fact we're looking good for a triple platform release of Scribe this month.
(1) Comment | Add Comment

SetWindowPos Changes Focus
Date: 12/2/2007
Occasionally when I call:
SetWindowPos(hWnd, NULL, x, y, cx, cy, SWP_NOACTIVATE|SWP_NOZORDER);
The focus unexpectedly changes to hWnd. This is annoying and I don't understand why this happens. Anybody care to shed some light on the inner workings of SetWindowPos?

This can be seen in Scribe when you select the root node of the folder tree and the focus disappears. I'm trialing some code that gets the current focus, calls SetWindowPos and then checks the current focus against the old focus, if it's changed it just resets it. But this is a ugly hack and I'd rather just fix the root cause.

It's also annoying users.
(2) Comments | Add Comment