Gtkmm-forge digest, Vol 1 #1050 - 7 msgs



Send Gtkmm-forge mailing list submissions to
	gtkmm-forge lists sourceforge net

To subscribe or unsubscribe via the World Wide Web, visit
	https://lists.sourceforge.net/lists/listinfo/gtkmm-forge
or, via email, send a message with subject or body 'help' to
	gtkmm-forge-request lists sourceforge net

You can reach the person managing the list at
	gtkmm-forge-admin lists sourceforge net

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Gtkmm-forge digest..."


gtkmm-forge is the mailing list that receives gtkmm bug reports from bugzilla.  A daily digest is sent to gtkmm-main, to encourage people to help fixing the bugs. Do not try to unsubscribe gtkmm-forge from gtkmm-list.


Today's Topics:

   1. [Bug 329333] A convenient wrapper of TreeView for simple ListBox'es (gtkmm (bugzilla.gnome.org))
   2. [Bug 329333] A convenient wrapper of TreeView for simple ListBox'es (gtkmm (bugzilla.gnome.org))
   3. [Bug 329333] A convenient wrapper of TreeView for simple ListBox'es (gtkmm (bugzilla.gnome.org))
   4. [Bug 329333] A convenient wrapper of TreeView for simple ListBox'es (gtkmm (bugzilla.gnome.org))
   5. [Bug 329333] A convenient wrapper of TreeView for simple ListBox'es (gtkmm (bugzilla.gnome.org))
   6. [Bug 329333] A convenient wrapper of TreeView for simple ListBox'es (gtkmm (bugzilla.gnome.org))
   7. [Bug 329333] A convenient wrapper of TreeView for simple ListBox'es (gtkmm (bugzilla.gnome.org))

--__--__--

Message: 1
To: gtkmm-forge lists sourceforge net
From: "gtkmm (bugzilla.gnome.org)" <bugzilla-daemon bugzilla gnome org>
Date: Wed,  1 Feb 2006 03:59:19 -0500 (EST)
Subject: [gtkmm bugzilla] [Bug 329333] A convenient wrapper of TreeView for simple ListBox'es

Do not reply to this via email (we are currently unable to handle email
responses and they get discarded).  You can add comments to this bug at
http://bugzilla.gnome.org/show_bug.cgi?id=3D329333
 gtkmm | TreeView | Ver: 2.8.x





------- Comment #3 from baltasarq yahoo es  2006-02-01 08:59 UTC -------
(In reply to comment #2)
> I actually kind of like the idea of a convenience wrapper in this case.=
  Thanks
> for starting the discussion

I think I have addressed all of them with the new attachment.

> - put_row() seems to be misnamed.  To me it looks more like it should b=
e called
> set_row().  Both put_row() and get_row() could be implemented with oper=
ator[]()
> as well.  Also note that ComboBoxText does not provide either of these
> convenience functions.

Well, the problem is that get_value doesn't return a reference, AFAIK, or=
 maybe
I am missing something.


--=20
Configure bugmail: http://bugzilla.gnome.org/userprefs.cgi?tab=3Demail
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


--__--__--

Message: 2
To: gtkmm-forge lists sourceforge net
From: "gtkmm (bugzilla.gnome.org)" <bugzilla-daemon bugzilla gnome org>
Date: Wed,  1 Feb 2006 04:01:51 -0500 (EST)
Subject: [gtkmm bugzilla] [Bug 329333] A convenient wrapper of TreeView for simple ListBox'es

Do not reply to this via email (we are currently unable to handle email
responses and they get discarded).  You can add comments to this bug at
http://bugzilla.gnome.org/show_bug.cgi?id=3D329333
 gtkmm | TreeView | Ver: 2.8.x


baltasarq yahoo es changed:

           What    |Removed                     |Added
-------------------------------------------------------------------------=
---
  Attachment #58457|0                           |1
        is obsolete|                            |




------- Comment #4 from baltasarq yahoo es  2006-02-01 09:01 UTC -------
Created an attachment (id=3D58504)
 --> (http://bugzilla.gnome.org/attachment.cgi?id=3D58504&action=3Dview)
Implementation of ListViewText

* New name for this class
* Now inherits from TreeView, instead of wrapping it
* Renaming, from append to append_text, for instance
* Added some members, just to make it as similar as possible to ComboBoxT=
ext


--=20
Configure bugmail: http://bugzilla.gnome.org/userprefs.cgi?tab=3Demail
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


--__--__--

Message: 3
To: gtkmm-forge lists sourceforge net
From: "gtkmm (bugzilla.gnome.org)" <bugzilla-daemon bugzilla gnome org>
Date: Wed,  1 Feb 2006 07:08:09 -0500 (EST)
Subject: [gtkmm bugzilla] [Bug 329333] A convenient wrapper of TreeView for simple ListBox'es

Do not reply to this via email (we are currently unable to handle email
responses and they get discarded).  You can add comments to this bug at
http://bugzilla.gnome.org/show_bug.cgi?id=3D329333
 gtkmm | TreeView | Ver: 2.8.x


Murray Cumming changed:

           What    |Removed                     |Added
-------------------------------------------------------------------------=
---
                 CC|                            |murrayc murrayc com




------- Comment #5 from Murray Cumming  2006-02-01 12:08 UTC -------
So, is this meant to be for a single column? Surely you'd want a ComboBox=
 for
_most_ of the places that you'd use that? I'd like a wrapper like this th=
at
allowed the number of columns to be specified in the constructor. Otherwi=
se it
wouldn't be very useful. You are halfway there.

I'd also like it to allow children (by using TreeStore). We'd then call i=
t
TreeViewText.

/// Returns a vector with the selected rows
/// @return a SelectionList with the selected results
const SelectionList &get_selected();

Needs to be documented as "vector of the indexes of the selected rows." A=
nd
there's no significant performance reason to return a const &.

get_treeViewModel() should_use_underscores. And there's no reason to prov=
ide an
accessor method for this anyway.


--=20
Configure bugmail: http://bugzilla.gnome.org/userprefs.cgi?tab=3Demail
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


--__--__--

Message: 4
To: gtkmm-forge lists sourceforge net
From: "gtkmm (bugzilla.gnome.org)" <bugzilla-daemon bugzilla gnome org>
Date: Wed,  1 Feb 2006 10:33:55 -0500 (EST)
Subject: [gtkmm bugzilla] [Bug 329333] A convenient wrapper of TreeView for simple ListBox'es

Do not reply to this via email (we are currently unable to handle email
responses and they get discarded).  You can add comments to this bug at
http://bugzilla.gnome.org/show_bug.cgi?id=3D329333
 gtkmm | TreeView | Ver: 2.8.x





------- Comment #6 from jonner  2006-02-01 15:33 UTC -------
Much better.  Murray makes a good point (IMO) that most of the time a sin=
gle
column of text selections would probably be implemented as a ComboBox.  A=
dding
columns would complicate the interface of this class somewhat, but it wou=
ld
probably be worth experimenting to see if we can come up with something
slightly more flexible but still sufficiently simple.

Regarding get_text() and set_text(), you use std::advance (which, BTW is
defined in <iterator>, not <utility>) to advance the iterator by i.  Then=
 you
check to make sure it's not equal to end().  But what if you pass in i=3D=
12 and
there are only 6 rows.  Then you'd end up 6 past end() and have an invali=
d
iterator but wouldn't catch it by the simple check to make sure that it w=
asn't
equal to end() (At least that's what I think would happen -- correct me i=
f I'm
wrong).  One alternative is to use the operator[] function of
TreeModel::Children, although I don't know how that function behaves when
passed an index that's too large either.

I'm not sure that we want to have 'using std::xyz' declarations.  The act=
ual
names are used fairly rarely so it's not a big inconvenience, and IMO it'=
s
generally not a good idea for a library to import things into the global
namespace.

type SelectionList is defined as a vector<int>.  I'd prefer consistency w=
ith
other interfaces by using a Glib::ListHandle type.  This way the applicat=
ion
programmer isn't tied to using std::vector, but can use any of the standa=
rd
container types to store the return value.

in get_selected(): does get_depth() really do what we want it to do here?=
  I
assume we want to build a list of row indexes.  My assumption is that
get_depth() returns 1 (or 0) for all top-level items and 2 for all childr=
en of
toplevel items, and 3 for all children of children of top-level items, et=
c.  In
our case, we're just building a flat list (i.e. no children of rows) so I=
 would
think this would return the same value for all rows, but I could be wrong=
.  The
documentation is very sparse on this function and I don't have the abilit=
y to
test it now.


--=20
Configure bugmail: http://bugzilla.gnome.org/userprefs.cgi?tab=3Demail
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


--__--__--

Message: 5
To: gtkmm-forge lists sourceforge net
From: "gtkmm (bugzilla.gnome.org)" <bugzilla-daemon bugzilla gnome org>
Date: Wed,  1 Feb 2006 11:04:47 -0500 (EST)
Subject: [gtkmm bugzilla] [Bug 329333] A convenient wrapper of TreeView for simple ListBox'es

Do not reply to this via email (we are currently unable to handle email
responses and they get discarded).  You can add comments to this bug at
http://bugzilla.gnome.org/show_bug.cgi?id=3D329333
 gtkmm | TreeView | Ver: 2.8.x





------- Comment #8 from baltasarq yahoo es  2006-02-01 16:04 UTC -------
So, to summarize, my proposal here would be to have ListViewText, and als=
o
GridViewText and TreeViewText.

Each class would be specialized in a) list boxes of strings, b) grids of
strings, and c) trees of strings.


--=20
Configure bugmail: http://bugzilla.gnome.org/userprefs.cgi?tab=3Demail
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


--__--__--

Message: 6
To: gtkmm-forge lists sourceforge net
From: "gtkmm (bugzilla.gnome.org)" <bugzilla-daemon bugzilla gnome org>
Date: Wed,  1 Feb 2006 11:00:22 -0500 (EST)
Subject: [gtkmm bugzilla] [Bug 329333] A convenient wrapper of TreeView for simple ListBox'es

Do not reply to this via email (we are currently unable to handle email
responses and they get discarded).  You can add comments to this bug at
http://bugzilla.gnome.org/show_bug.cgi?id=3D329333
 gtkmm | TreeView | Ver: 2.8.x





------- Comment #7 from baltasarq yahoo es  2006-02-01 16:00 UTC -------
(In reply to comment #6)
> Much better.  Murray makes a good point (IMO) that most of the time a s=
ingle
> column of text selections would probably be implemented as a ComboBox. =
 Adding
> columns would complicate the interface of this class somewhat, but it w=
ould
> probably be worth experimenting to see if we can come up with something
> slightly more flexible but still sufficiently simple.

Think of a dialog allowing you to insert e.mail addresses in your TO: and=
 CC:
fields. Would you create a ComboBox for inserting those names ? Actually =
not.
You would put something similar to ListViewText and probably you would li=
ke it
to allow multiple selection.

Something like ListViewText is needed. Maybe it is not used all of the ti=
mes,
but is definitely needed.

If you want something similar to ListViewText but allowing more than one
column, then you are talking about a StringGrid or something similar, i.e=
.,
ANOTHER class/widget. So you would have ListViewText for list boxes and
StringGrid (GridViewText?) for grids of text.

If you also want to allow children for each row, then you are talking abo=
ut
TreeViewText, i.e., something making TreeView more easy for strings.

The problem here is that TreeView is excellent from an Gtkmm implementer =
point
of view, but catastrophic for the programmer who is going to use it in hi=
s
applications, because there are too many abstraction levels in the
documentation to follow and is easy to get lost inside it.

Do you know the SYS UNIX function io_ctrl() ? (I don't remember exactly t=
he
name of the function). With TreeView you have io_ctrl(). You have to know
exactly the parameters it accepts of you want to know the size of a file,=
 Or
you can implement a function called getFileSize() which internally calls
io_ctrl(). Implementers are happy because they still have io_ctrl(),  a s=
ingle
entry point for system calls, and because getFileSize() does not really a=
dd
overload. Programmers are happy because they have a simple, intuitive fun=
ction
to use and can get rid of the complex syntax of the io_ctrl.

>=20
> Regarding get_text() and set_text(), you use std::advance (which, BTW i=
s
> defined in <iterator>, not <utility>)

My fault. However, it compiles :-)

 to advance the iterator by i.  Then you
> check to make sure it's not equal to end().  But what if you pass in i=3D=
12 and
> there are only 6 rows.  Then you'd end up 6 past end() and have an inva=
lid
> iterator but wouldn't catch it by the simple check to make sure that it=
 wasn't
> equal to end() (At least that's what I think would happen -- correct me=
 if I'm
> wrong).  One alternative is to use the operator[] function of
> TreeModel::Children, although I don't know how that function behaves wh=
en
> passed an index that's too large either.

If you are not sure, the think about me (again what I said about io_ctrl(=
)
...). :-)
I expected that kind of functions to send an exception, but haven't found
anything about it.

About the other comments, I will take them in account to create a final
version, provided it is accepted, but I don't think they are not vital at=
 this
stage.


--=20
Configure bugmail: http://bugzilla.gnome.org/userprefs.cgi?tab=3Demail
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


--__--__--

Message: 7
To: gtkmm-forge lists sourceforge net
From: "gtkmm (bugzilla.gnome.org)" <bugzilla-daemon bugzilla gnome org>
Date: Wed,  1 Feb 2006 16:11:01 -0500 (EST)
Subject: [gtkmm bugzilla] [Bug 329333] A convenient wrapper of TreeView for simple ListBox'es

Do not reply to this via email (we are currently unable to handle email
responses and they get discarded).  You can add comments to this bug at
http://bugzilla.gnome.org/show_bug.cgi?id=3D329333
 gtkmm | TreeView | Ver: 2.8.x





------- Comment #9 from Murray Cumming  2006-02-01 21:11 UTC -------
> So, to summarize, my proposal here would be to have ListViewText, and a=
lso
GridViewText and TreeViewText.

No, I see no reason no to add optional column parameters to the methods, =
so
there's no need for "GridViewText". I suppose it would complicate the int=
erface
more to have children, because it requires an abstract iterator instead o=
f a
simple row index, so forget about the TreeStore for now.

Please don't rant.


--=20
Configure bugmail: http://bugzilla.gnome.org/userprefs.cgi?tab=3Demail
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.



--__--__--

_______________________________________________
Gtkmm-forge mailing list
Gtkmm-forge lists sourceforge net
https://lists.sourceforge.net/lists/listinfo/gtkmm-forge


End of Gtkmm-forge Digest



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]