GNOME Bugzilla – Bug 399364
Implement properties
Last modified: 2015-03-24 16:20:40 UTC
Missing the gobject iface for the getters+setters.
Patch? :P
Created attachment 120648 [details] [review] [PATCH] Bug 399364 – Implement properties src/vte.c | 1021 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 958 insertions(+), 63 deletions(-)
Would be nice if someone could double-check this patch :) There are a few more things that we might add properties for: - 'status-line' ? - char width and height - grid width and height (number of columns and rows) - the dim/bold/fg/bg/cursor/highlight colours; but maybe these would be better as widget style properties? - the palette - has-selection ? - cursor-position ?
Thanks Christian! (In reply to comment #3) > Would be nice if someone could double-check this patch :) I have very limited experience with properties, but from a quick look, this looks good. > There are a few more things that we might add properties for: No idea. Maybe makes sense to write to gtk-devel-list and see what other people have to say from experience? For example, is it a good idea to add properties for something that is changing all the time (like, has-selection), as opposed to returning what the user set last? > - 'status-line' ? Feels weird to me, but will be useful. > - char width and height These two will be readonly props, right? > - grid width and height (number of columns and rows) This one is definitely useful (say, in a UI builder). > - the dim/bold/fg/bg/cursor/highlight colours; but maybe these would be better > as widget style properties? Style makes sense indeed. > - the palette No strong feeling. > - has-selection ? > - cursor-position ? Both sound useful. Not sure. What about the selection itself?
(In reply to comment #4) > > - 'status-line' ? > > Feels weird to me, but will be useful. The idea is that everything that has a 'changed' signal and a getter should be replaced with a property + notification. Eventually we can remove those signals then. > > - char width and height > > These two will be readonly props, right? Yes. > > - grid width and height (number of columns and rows) > > This one is definitely useful (say, in a UI builder). Definitely. Needs to fix bug 317158 for this to work in glade though since there won't be a child process in the terminal in glade. > > - the dim/bold/fg/bg/cursor/highlight colours; but maybe these would be better > > as widget style properties? > > Style makes sense indeed. I'll do that in a follow-up bug then. > > - the palette > > No strong feeling. Deferring too. Could be a gvaluearray of gdkcolor, so it's not hard to implement. > > - has-selection ? > > - cursor-position ? > > Both sound useful. Not sure. What about the selection itself? Not sure... GtkTextView doesn't seem to expose selection changes (?) either, so maybe we can do without too. I think I'll commit this but leave the bug open for more work.
More work coming?
Yes, soon :)
The patch is committed and VteTerminal has had properties for a while now. Closing.