Notices


Reply
Thread Tools
pichlo's Avatar
Posts: 6,445 | Thanked: 20,981 times | Joined on Sep 2012 @ UK
#11
Originally Posted by peterleinchen View Post
What is the sort mode (did not get it)?
To be absolutely honest, I am not entirely sure myself. That part was copied from scv-reader. I have noticed that it changes the order of entries in Chapter but I am not quite sure how or why.

And when flipping through the tables the edit box gets filled. I would like to avoid that, so that a symbol is only added on a real touch, not a move.
I know and I was trying to get rid of that. The problem is that even a scroll is registered as a button press and I do not know enough about GTK to avoid it. I will try to look into that to see what can be done.

In the meantime, you can use the cursor keys to navigate through the character table. The highlighted character details on the right will still get updated but without entering the characters into the edit box. Any accidentally entered character can also be deleted from the box by simply editing the box.

One workaround would be to never enter characters on touch, only highlight them. Then having a button in the right panel for actually entering the character. I had considered it but thought it was a bit clunky. I would welcome people's opinion on the matter.



WARNING WARNING WARNING

The part below describes a potential future update, please do not confuse it with the current release.

I have an experimental Qt version in the works. It works a bit better: to start with, scrolling is not registered as a button press. The cells in the character table look like real buttons which I find more aesthetically pleasing. They can also be made smaller so I can get a row of 8 characters instead of 5 (the map as it is now is painted by libgucharmap7 itself and I have no control over the parameters). Only the valid characters can be put on the map rather than all characters with blanks for non-printable ones as it is now. And, last but not least, I have it working in portrait as well as landscape.

Here is a little taster:

Name:  Screenshot-20140511-135634.jpg
Views: 348
Size:  26.0 KB

Name:  Screenshot-20140511-141814.jpg
Views: 357
Size:  24.4 KB

Unfortunately there are a few little problems with it. I cannot choose the character set. That is an API call to libgucharmap7 that tells it what to draw. I have not yet found a way to squeeze the list of characters out of it, without letting it draw anything. And, despite trying hard, I have not found any description of the API anywhere, so I could only go with what I could glean from the headers and what scv-reader used.

Another problem is that the Qt version crashes when trying to display too many characters (such as all of them). This is caused by every character being a separate button and it looks like Qt does not like forms with thousands of buttons in them.

So I had to go with the GTK version for the time being.
__________________
Русский военный корабль, иди нахуй!
 

The Following 4 Users Say Thank You to pichlo For This Useful Post:
Copernicus's Avatar
Posts: 1,986 | Thanked: 7,698 times | Joined on Dec 2010 @ Dayton, Ohio
#12
Originally Posted by pichlo View Post
Another problem is that the Qt version crashes when trying to display too many characters (such as all of them). This is caused by every character being a separate button and it looks like Qt does not like forms with thousands of buttons in them.
Well, I'd have to agree with Qt on this one, a single form with thousands of individual buttons does seem a bit cumbersome. I think it might be better to use a QListWidget (or QListView) to display the characters; if you set "flow" to "QListView::LeftToRight", and "isWrapping" to true, Qt should be able to get the characters laid out in a pretty good manner.

BTW, I did finally get the app up and running on my N900. It works quite well!
 

The Following 3 Users Say Thank You to Copernicus For This Useful Post:
Posts: 23 | Thanked: 10 times | Joined on May 2014 @ Germany
#13
very fine, thanks works without any problems!
 
pichlo's Avatar
Posts: 6,445 | Thanked: 20,981 times | Joined on Sep 2012 @ UK
#14
Originally Posted by Copernicus View Post
Well, I'd have to agree with Qt on this one, a single form with thousands of individual buttons does seem a bit cumbersome.
I wasn't disputing with Qt, just explaining

I think it might be better to use a QListWidget (or QListView) to display the characters; if you set "flow" to "QListView::LeftToRight", and "isWrapping" to true, Qt should be able to get the characters laid out in a pretty good manner.
Thanks for the suggestion. I have been experimenting with that and must say it can be made to work pretty well, but at the cost of losing the buttons. I see little point switching to Qt to get the exact same look as I do with the GTK version, so I may as well stick with GTK. The GTK binary is also about half the size, works faster and has fewer dependencies.
__________________
Русский военный корабль, иди нахуй!
 

The Following User Says Thank You to pichlo For This Useful Post:
Copernicus's Avatar
Posts: 1,986 | Thanked: 7,698 times | Joined on Dec 2010 @ Dayton, Ohio
#15
Originally Posted by pichlo View Post
I have been experimenting with that and must say it can be made to work pretty well, but at the cost of losing the buttons. I see little point switching to Qt to get the exact same look as I do with the GTK version, so I may as well stick with GTK. The GTK binary is also about half the size, works faster and has fewer dependencies.
Well, I suspect that part of the reason why the GTK version is able to handle so many characters is that it isn't using full-fledged buttons. I haven't coded in GTK in a while; I know that the selling point of GTK (as opposed to Qt) is that it is more efficient -- but still, I would imagine that turning each character into a real GTK button would eventually lead to the same problems as with real Qt buttons.

(It seems that you can, in fact, insert Qt buttons into a Qt list, but that would probably have the same result as just putting the buttons into a layout widget...)

One thing you can do with Qt, though, is use stylesheets! (Something that I'm slowly learning myself.) So, if you want to make the Qt list items look and act like buttons, something like this might work:

Code:
QListView::item{
  background:qlineargradient(
     spread:pad, x1:0, y1:0, x2:0, y2:1,
     stop:0 rgba(80, 80, 80, 255),
     stop:0.8 rgba(80, 80, 80, 255),
     stop:1 rgba(48, 48, 48, 255));
  border-width: 1px;
  border-style: solid;
  border-radius: 12px;
  border-color:rgba(80,80,80,255);
}

QListView::item:selected{
  background:qlineargradient(
    spread:pad, x1:0, y1:0, x2:0, y2:1,
    stop:0 rgba(128, 128, 128, 255),
    stop:0.8 rgba(128, 128, 128, 255),
    stop:1 rgba(48,48,48,255));
}
The downside of this, though, is that Qt stylesheets are apparently incompatible with Maemo theming...
 

The Following 3 Users Say Thank You to Copernicus For This Useful Post:
pichlo's Avatar
Posts: 6,445 | Thanked: 20,981 times | Joined on Sep 2012 @ UK
#16
Originally Posted by Copernicus View Post
Well, I suspect that part of the reason why the GTK version is able to handle so many characters is that it isn't using full-fledged buttons.
In the specific case of Character Map,the chart with the characters is painted by libgucharmap7. How exactly it does it is hidden (at least until I inspect the sources) but I do not think it uses buttons, even though it emits a "button pressed" event. I would not be at all surprised to find that it does not even cache the whole table all the time but generates only the visible part dynamically. It is after all the caller's job to update the scroll position indicators, there is a callback for that.

I am actually quite getting used to the Qt version without buttons. It now looks very much like the GTK version, only with smaller cells, hence more characters fitting on the screen:

Name:  Screenshot-20140513-232459.jpg
Views: 281
Size:  23.4 KB

I still have the problem of how to show only the characters of the chosen code page though. If anyone has had any experience with libgucharmap, perhaps you can throw me a pointer. I have not found any documentation whatsoever.
__________________
Русский военный корабль, иди нахуй!

Last edited by pichlo; 2014-05-14 at 06:20.
 

The Following 5 Users Say Thank You to pichlo For This Useful Post:
pichlo's Avatar
Posts: 6,445 | Thanked: 20,981 times | Joined on Sep 2012 @ UK
#17
Version 1.0.1 has arrived in extras-devel. Very small update, fixed the ampersand character not displayed properly in the info panel on the right. Curiously, no one has reported that bug

For some reason FAM does not show the changelog. It says "not available". Have any developers here experienced something of that kind and know what may have caused it? The changelog file is provided with the sources of course.
__________________
Русский военный корабль, иди нахуй!
 

The Following 3 Users Say Thank You to pichlo For This Useful Post:
Copernicus's Avatar
Posts: 1,986 | Thanked: 7,698 times | Joined on Dec 2010 @ Dayton, Ohio
#18
Originally Posted by pichlo View Post
For some reason FAM does not show the changelog. It says "not available". Have any developers here experienced something of that kind and know what may have caused it?
I don't know about the changelog, but I recall it was noted last year that FAPMAN (is that another name for FAM?) wasn't displaying the "XB-Maemo-Upgrade-Description" from the control file. (HAM normally shows this description when updating.) So it could be something similar...
 

The Following User Says Thank You to Copernicus For This Useful Post:
Posts: 2,290 | Thanked: 4,133 times | Joined on Apr 2010 @ UK
#19
Originally Posted by pichlo View Post
Version 1.0.1 has arrived in extras-devel.

For some reason FAM does not show the changelog. It says "not available". Have any developers here experienced something of that kind and know what may have caused it? The changelog file is provided with the sources of course.
Sorry can't help you test that as I won't touch FAM with a long barge pole.

One thing I did notice is your control file has Priority as "optional" I believe this should be "extra". Also the section is listed twice, only the one on line 2 should be there. If these cause your issue in FAM I have NFC.
__________________

Wiki Admin
sixwheeledbeast's wiki
Testing Squad Subscriber
- mcallerx - tenminutecore - FlopSwap - Qnotted - zzztop - Bander - Fight2048 -


Before posting or starting a thread please try this.
 

The Following 3 Users Say Thank You to sixwheeledbeast For This Useful Post:
pichlo's Avatar
Posts: 6,445 | Thanked: 20,981 times | Joined on Sep 2012 @ UK
#20
Hmm. Every single control file that I have seen had "Priority: optional". Including your bander
Thanks for the Section hint. I have changed it for the next release.
__________________
Русский военный корабль, иди нахуй!
 

The Following 3 Users Say Thank You to pichlo For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 22:42.