Re: widget accessibility roles: being able to override it

2018-03-19 Thread Matthias Clasen
On Mon, Mar 19, 2018 at 10:19 AM, Samuel Thibault 
wrote:

> Hello,
>
> Samuel Thibault, on lun. 05 mars 2018 16:17:24 +0100, wrote:
> > Some dialog boxes use labels for static information, e.g. printer
> > status, replace result, etc.  For the screen reader to properly
> > understand that, it should have role ATK_ROLE_STATIC.  I have not found
> > any way in glade's .ui format to specify this, actually ROLE_STATIC does
> > not appear in gtk+3.0 source code, so I guess it's just not there.
> >
> > I'm thinking we could have something like
> >
> > 
> >   
> > 
> >
> > to be able to specify e.g. labels' role?
>
> FI, I have posted a patch implementing this in gtk on
>
> https://gitlab.gnome.org/GNOME/gtk/issues/109
>
> Along the way, I found that there is
>
> 
> 
> ATK_ROLE_STATIC
> 
> 
>
> which is supposed to do the same, but that doesn't work:
> "accessible-role" is supposed to be an int, not a string, and thus one
> would have to put 117 there instead of ATK_ROLE_STATIC, which is really
> going to work :)
>
>
This is a bug in atk, I would say. The role property should really be
defined as enum, not as int.
If that is fixed, then your ui file snipplet will start to work.
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: Using a ButtonBox instead of a Notebook?

2018-03-19 Thread Lucky B.C
On Mon, Mar 19, 2018, 19:00 Bachsau  wrote:

>
> Now I want to expand my application to manage not just one but several
> bunches of those data, each in a different tab inside the same window.
>
>
First as you said that and then I thought you needed to know about
GtkTreeModel widget

"The GtkTreeModel
 interface
defines a generic tree interface for use by the GtkTreeView
 widget. It is an
abstract interface, and is designed to be usable with any appropriate data
structure. The programmer just has to implement this interface on their own
data type for it to be viewable by a GtkTreeView
 widget."

for *bunches of those data, each in a different tab inside the same window.*

On Mon, Mar 19, 2018 at 8:13 PM, Bachsau  wrote:

> Am 19.03.2018 um 13:21 schrieb Lucky B.C:
>
>> don't keep only one GtkTreeModel for storing the data, I mean you should
>> have multiple GtkTreeModels.
>>
>
> You mean I should use more than one GtkTreeModel for a *single* set of
> data? What would be the benefit of this and how does it help with my
> problem?
>
> I already read through the documents. If I would have understood them
> completely I might not be asking...
>
>
Second what you just said was different before that *You mean I should use
more than one GtkTreeModel for a *single* set of data?*

On Mon, Mar 19, 2018 at 8:30 PM, Bachsau  wrote:

> Am 19.03.18 um 13:17 schrieb '-':
>
>> Have you tried removing the existing TreeView widget from one Notebook
>> tab, and adding it (the same instance) to another when the user switches?
>>
>
> No, I didn't implement any Notebook yet. This was just to describe how it
> should look like. What you propose is an ugly hack I'd rather avoid. If I
> there is no use for any of the functionalyties of a Notebook, I won't use
> it just to get it's look and if I would, probably the cleanest way would be
> to not place anything on its pages at all, so only the tabs are visible and
> keep the TreeView in an area beyond.
>
> Also, TreeView has a set_model() method which lets you specify which model
>> to use. For example, unset the model before making numerous data changes
>> and set it back afterwards, works faster without needless redraws.
>>
>
> I will look into that.
>

Finally, yes it's the same what I wanted you find in the Gtk document at
the first message from me to you.

On Mon, Mar 19, 2018 at 11:39 AM, Lucky B.C  wrote:

> Hi, you're wrong about GtkTreeView did! Let's have more detail about what
> a GtkTreeView 
> can do, here we go:
>
> 1) GtkTreeView can use more one GtkTreeModel
> .
>
> 2) GtkTreeModel is implemented by GtkListStore
> ,
> GtkTreeModelFilter
> ,
> GtkTreeModelSort
>  and
> GtkTreeStore .
>
> 3) GtkList ... GtkTreeStore are what you need in the case.
>

*GtkTreeView can use more one GtkTreeModel* as the gtk_tree_view_set_model
function.
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: widget accessibility roles: being able to override it

2018-03-19 Thread Samuel Thibault
Hello,

Samuel Thibault, on lun. 05 mars 2018 16:17:24 +0100, wrote:
> Some dialog boxes use labels for static information, e.g. printer
> status, replace result, etc.  For the screen reader to properly
> understand that, it should have role ATK_ROLE_STATIC.  I have not found
> any way in glade's .ui format to specify this, actually ROLE_STATIC does
> not appear in gtk+3.0 source code, so I guess it's just not there.
> 
> I'm thinking we could have something like
> 
> 
>   
> 
> 
> to be able to specify e.g. labels' role?

FI, I have posted a patch implementing this in gtk on 

https://gitlab.gnome.org/GNOME/gtk/issues/109

Along the way, I found that there is



ATK_ROLE_STATIC



which is supposed to do the same, but that doesn't work:
"accessible-role" is supposed to be an int, not a string, and thus one
would have to put 117 there instead of ATK_ROLE_STATIC, which is really
going to work :)

So I'd say my proposal still make sense?

Samuel
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: Re: Using a ButtonBox instead of a Notebook?

2018-03-19 Thread Bachsau

Am 19.03.18 um 13:17 schrieb '-':

Have you tried removing the existing TreeView widget from one Notebook tab, and 
adding it (the same instance) to another when the user switches?


No, I didn't implement any Notebook yet. This was just to describe how 
it should look like. What you propose is an ugly hack I'd rather avoid. 
If I there is no use for any of the functionalyties of a Notebook, I 
won't use it just to get it's look and if I would, probably the cleanest 
way would be to not place anything on its pages at all, so only the tabs 
are visible and keep the TreeView in an area beyond.



Also, TreeView has a set_model() method which lets you specify which model to 
use. For example, unset the model before making numerous data changes and set 
it back afterwards, works faster without needless redraws.


I will look into that.

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: Using a ButtonBox instead of a Notebook?

2018-03-19 Thread Bachsau

Am 19.03.2018 um 13:21 schrieb Lucky B.C:
don't keep only one GtkTreeModel for storing the data, I mean you should 
have multiple GtkTreeModels.


You mean I should use more than one GtkTreeModel for a *single* set of 
data? What would be the benefit of this and how does it help with my 
problem?


I already read through the documents. If I would have understood them 
completely I might not be asking...


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: Using a ButtonBox instead of a Notebook?

2018-03-19 Thread '-'
Yo,

Have you tried removing the existing TreeView widget from one Notebook tab, and 
adding it (the same instance) to another when the user switches?

Also, TreeView has a set_model() method which lets you specify which model to 
use. For example, unset the model before making numerous data changes and set 
it back afterwards, works faster without needless redraws.

Whether this combination, compared to each tab having its own TreeView, helps 
you improve performance and resource usage or not, you'll need to test on your 
data. Please tell if it does.

Cheers,
Makepost

On March 19, 2018 2:00:32 PM GMT+02:00, Bachsau  wrote:
>I'm sorry, but I think I don't understand what you're trying to tell
>me, 
>as I think this is how I already do it.
>
>I have a working Application managing a bunch of data represented by a 
>list of items with several attributes. These items are displayed to the
>
>user by using a GtkTreeView backed by a GtkListStore, to which I append
>
>those items.
>
>Now I want to expand my application to manage not just one but several 
>bunches of those data, each in a different tab inside the same window.
>
>As I understand it, the GtkTreeView widget is really just a display 
>element, taking all of its data from the GtkListStore. This is why I 
>thought I could just create and keep a separate GtkListStore in memory 
>for every bunch of data and assign them to the one GtkTreeView widget 
>whenever the user clicks a button.
>
>
>Am 19.03.2018 um 05:39 schrieb Lucky B.C:
>> Hi, you're wrong about GtkTreeView did! Let's have more detail about 
>> what a GtkTreeView 
>>  can do,
>here 
>> we go:
>> 
>> 1) GtkTreeView can use more one GtkTreeModel 
>> .
>> 
>> 2) GtkTreeModel is implemented by GtkListStore 
>> , 
>> GtkTreeModelFilter 
>> , 
>> GtkTreeModelSort 
>>  and 
>> GtkTreeStore
>.
>> 
>> 3) GtkList ... GtkTreeStore are what you need in the case.
>> 
>> 
>> On Mon, Mar 19, 2018 at 4:21 AM, Bachsau > > wrote:
>> 
>> Hi, I'm currently developing an app that uses two panes in its
>main
>> window, each containing a "TreeView". Now it shall be capable of
>> showing the contents of several different files in tabs. But
>using a
>> "Notebook" would require me to have a distinct copy of the
>"Paned"
>> and "TreeView" widgets on every page of the Notebook. I don't
>really
>> like that and had the idea of using a "ButtonBox" with radio
>buttons
>> instead, which just swap the "ListStore"s displayed by the
>"TreeView"s.
>> 
>> What do you think of this idea and is there a way to make the
>radio
>> buttons look like default "Notebook" tabs?
>> 
>> Thanks in advance,
>> Bachsau
>> 
>> 
>> ___
>> gtk-app-devel-list mailing list
>> gtk-app-devel-list@gnome.org
>
>> https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
>> 
>> 
>> 

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Using a ButtonBox instead of a Notebook?

2018-03-19 Thread '-'
Yo,

Have you tried removing the existing TreeView widget from one Notebook tab, and 
adding it (the same instance) to another when the user switches?

Also, TreeView has a set_model() method which lets you specify which model to 
use. For example, unset the model before making numerous data changes and set 
it back afterwards, works faster without needless redraws.

Whether this combination, compared to each tab having its own TreeView, helps 
you improve performance and resource usage or not, you'll need to test on your 
data. Please tell if it does.

Cheers,
Makepost

On March 19, 2018 2:00:32 PM GMT+02:00, Bachsau  wrote:
>I'm sorry, but I think I don't understand what you're trying to tell
>me, 
>as I think this is how I already do it.
>
>I have a working Application managing a bunch of data represented by a 
>list of items with several attributes. These items are displayed to the
>
>user by using a GtkTreeView backed by a GtkListStore, to which I append
>
>those items.
>
>Now I want to expand my application to manage not just one but several 
>bunches of those data, each in a different tab inside the same window.
>
>As I understand it, the GtkTreeView widget is really just a display 
>element, taking all of its data from the GtkListStore. This is why I 
>thought I could just create and keep a separate GtkListStore in memory 
>for every bunch of data and assign them to the one GtkTreeView widget 
>whenever the user clicks a button.
>
>
>Am 19.03.2018 um 05:39 schrieb Lucky B.C:
>> Hi, you're wrong about GtkTreeView did! Let's have more detail about 
>> what a GtkTreeView 
>>  can do,
>here 
>> we go:
>> 
>> 1) GtkTreeView can use more one GtkTreeModel 
>> .
>> 
>> 2) GtkTreeModel is implemented by GtkListStore 
>> , 
>> GtkTreeModelFilter 
>> , 
>> GtkTreeModelSort 
>>  and 
>> GtkTreeStore
>.
>> 
>> 3) GtkList ... GtkTreeStore are what you need in the case.
>> 
>> 
>> On Mon, Mar 19, 2018 at 4:21 AM, Bachsau > > wrote:
>> 
>> Hi, I'm currently developing an app that uses two panes in its
>main
>> window, each containing a "TreeView". Now it shall be capable of
>> showing the contents of several different files in tabs. But
>using a
>> "Notebook" would require me to have a distinct copy of the
>"Paned"
>> and "TreeView" widgets on every page of the Notebook. I don't
>really
>> like that and had the idea of using a "ButtonBox" with radio
>buttons
>> instead, which just swap the "ListStore"s displayed by the
>"TreeView"s.
>> 
>> What do you think of this idea and is there a way to make the
>radio
>> buttons look like default "Notebook" tabs?
>> 
>> Thanks in advance,
>> Bachsau
>> 
>> 
>> ___
>> gtk-app-devel-list mailing list
>> gtk-app-devel-list@gnome.org
>
>> https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
>> 
>> 
>> 

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.
-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Using a ButtonBox instead of a Notebook?

2018-03-19 Thread Lucky B.C
Well, that's why you was wrong as I said, don't keep only one GtkTreeModel
for storing the data, I mean you should have multiple GtkTreeModels. Please
read again more detail in Gtk documents.

On Mon, Mar 19, 2018, 19:00 Bachsau  wrote:

> I'm sorry, but I think I don't understand what you're trying to tell me,
> as I think this is how I already do it.
>
> I have a working Application managing a bunch of data represented by a
> list of items with several attributes. These items are displayed to the
> user by using a GtkTreeView backed by a GtkListStore, to which I append
> those items.
>
> Now I want to expand my application to manage not just one but several
> bunches of those data, each in a different tab inside the same window.
>
> As I understand it, the GtkTreeView widget is really just a display
> element, taking all of its data from the GtkListStore. This is why I
> thought I could just create and keep a separate GtkListStore in memory
> for every bunch of data and assign them to the one GtkTreeView widget
> whenever the user clicks a button.
>
>
> Am 19.03.2018 um 05:39 schrieb Lucky B.C:
> > Hi, you're wrong about GtkTreeView did! Let's have more detail about
> > what a GtkTreeView
> >  can do, here
> > we go:
> >
> > 1) GtkTreeView can use more one GtkTreeModel
> > .
> >
> > 2) GtkTreeModel is implemented by GtkListStore
> > ,
> > GtkTreeModelFilter
> > ,
> > GtkTreeModelSort
> >  and
> > GtkTreeStore  >.
> >
> > 3) GtkList ... GtkTreeStore are what you need in the case.
> >
> >
> > On Mon, Mar 19, 2018 at 4:21 AM, Bachsau  > > wrote:
> >
> > Hi, I'm currently developing an app that uses two panes in its main
> > window, each containing a "TreeView". Now it shall be capable of
> > showing the contents of several different files in tabs. But using a
> > "Notebook" would require me to have a distinct copy of the "Paned"
> > and "TreeView" widgets on every page of the Notebook. I don't really
> > like that and had the idea of using a "ButtonBox" with radio buttons
> > instead, which just swap the "ListStore"s displayed by the
> "TreeView"s.
> >
> > What do you think of this idea and is there a way to make the radio
> > buttons look like default "Notebook" tabs?
> >
> > Thanks in advance,
> > Bachsau
> >
> >
> > ___
> > gtk-app-devel-list mailing list
> > gtk-app-devel-list@gnome.org 
> > https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
> > 
> >
> >
>
>
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Using a ButtonBox instead of a Notebook?

2018-03-19 Thread Bachsau
I'm sorry, but I think I don't understand what you're trying to tell me, 
as I think this is how I already do it.


I have a working Application managing a bunch of data represented by a 
list of items with several attributes. These items are displayed to the 
user by using a GtkTreeView backed by a GtkListStore, to which I append 
those items.


Now I want to expand my application to manage not just one but several 
bunches of those data, each in a different tab inside the same window.


As I understand it, the GtkTreeView widget is really just a display 
element, taking all of its data from the GtkListStore. This is why I 
thought I could just create and keep a separate GtkListStore in memory 
for every bunch of data and assign them to the one GtkTreeView widget 
whenever the user clicks a button.



Am 19.03.2018 um 05:39 schrieb Lucky B.C:
Hi, you're wrong about GtkTreeView did! Let's have more detail about 
what a GtkTreeView 
 can do, here 
we go:


1) GtkTreeView can use more one GtkTreeModel 
.


2) GtkTreeModel is implemented by GtkListStore 
, 
GtkTreeModelFilter 
, 
GtkTreeModelSort 
 and 
GtkTreeStore .


3) GtkList ... GtkTreeStore are what you need in the case.


On Mon, Mar 19, 2018 at 4:21 AM, Bachsau > wrote:


Hi, I'm currently developing an app that uses two panes in its main
window, each containing a "TreeView". Now it shall be capable of
showing the contents of several different files in tabs. But using a
"Notebook" would require me to have a distinct copy of the "Paned"
and "TreeView" widgets on every page of the Notebook. I don't really
like that and had the idea of using a "ButtonBox" with radio buttons
instead, which just swap the "ListStore"s displayed by the "TreeView"s.

What do you think of this idea and is there a way to make the radio
buttons look like default "Notebook" tabs?

Thanks in advance,
Bachsau


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org 
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list





___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list