From: <pa...@rc...> - 2000-11-27 09:47:19
|
Joe Piolunek wrote: > Have you or has anyone else been able to test the more recent xojpanel code > on an officejet that uses a two-line LCD? Do whitespace stripping, line-2 > scrolling and scroll-delays work the way you expect? It's better, in that text on the second line scrolls properly (and only when necessary), but now it segfaults when the second line is blank and the peripheral returns a string of spaces (which is the case on the K80 and G85). It works OK on the 570 (which only has one line anyway) because it doesn't return the superfluous spaces when asked for the second line. > Is it definite that no OfficeJets output unicode to their LCD? If they don't, > it might make more sense to #define something like "USE_QCHAR" in place of > "UNICODE_SUPPORT" for whitespace stripping. Should It be changed? I'm pretty sure that there is currently no Unicode support. If there were you would know it by what symbol set was specified in the PML GET reply. For now I don't think you need to worry about that. If it ever became necessary, then you could check the symbol set at runtime and respond appropriately. Of course, this runtime switch should only be enabled for appropriate versions of QT. From this standpoint it might make sense to call it "USE_QCHAR" instead. Here are a couple of other suggestions: - Create a single function (possibly an overridden QPixmap::load) which takes a simple filename parameter and does the magic of trying to load it from the various possible locations and printing an error message if unsuccessful. It's easier to maintain this code in once place. Of course, when adding a path you'll have to use a temporary buffer, which should probably be dynamically allocated (and freed) to be able to fit the default path, simple filename, slash in between (if necessary), and final null byte. - Instead of hard-coding the default path, use something like this: #ifndef XOJPANEL_DEFAULT_PATH #define XOJPANEL_DEFAULT_PATH "/usr/local/share/pixmaps/hpoj/" #endif That way, I can modify the configure/build process to pass the right path if the user specifies the "--prefix=<DIR>" switch to the configure script to change the install directory. David |