YTable and checkable columns
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi all, Following Michael ideas I'm trying to summarize what I'm currently discussing with YUI team. I've recently started a new fork to add checkable columns to Ytable. My first will is to got a new rpm front-end in mageia, so the checkable column is intended as rpm installed or, as soon as user checks it, to be installed. Of course un-checking it means to be uninistall :) In the very first implementation i thought to NCTable multiselection, but that imo does not cover the aim. Selecting more lines, means doing something on the selection, which action could finish soon after it's been called -think to a context menu with some actions like print, send via mail etc.-, but even check them all. While checking them means doing something after you selected the one you wanted, where ever they are in the list, not only on the screen (yes i know ctrl + mouse click, but it's not that easy after all, no? :) ), let's say to install/uninstall them for instance in my case. Well to make the long story short, i studied the code a bit and i left the user (well the developer really) decide where and how many chackable columns to put. When a column is checked, an YItem value changed is emitted. Which is the problem then? - - We are trying to understand if we have regressions. - - We are trying to understand if all i did was necessary - - I have a problem in ncurses in which last column sometimes is not shown in its whole - - Thomas does not like how i selected the column in ncurses I think it's all. My code is here https://github.com/anaselli (i need to merge to the last changes though). Cheers, Angelo -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlGWM3kACgkQqEs9DA4DquDvZgCgs9jLuvuFRveT1TlQtFniCCQU OAkAn3pXxdne6GApUFQcu/RnrZ/Jn5Uc =Dt1s -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: libyui-devel+unsubscribe@opensuse.org To contact the owner, e-mail: libyui-devel+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi all,
Following Michael ideas I'm trying to summarize what I'm currently discussing with YUI team.
I've recently started a new fork to add checkable columns to Ytable. My first will is to got a new rpm front-end in mageia, so the checkable column is intended as rpm installed or, as soon as user checks it, to be installed. Of course un-checking it means to be uninistall :) The YaST team had a similar problem and created a special widgets for
On 05/17/2013 03:41 PM, Angelo Naselli wrote: package management because that's not a trivial task which can be solved by a normal widget. Please have a look at libyui-ncurses-pkg, libyui-qt-pkg, and libyui-gtk-pkg.
In the very first implementation i thought to NCTable multiselection, but that imo does not cover the aim. Selecting more lines, means doing something on the selection, which action could finish soon after it's been called -think to a context menu with some actions like print, send via mail etc.-, but even check them all. While checking them means doing something after you selected the one you wanted, where ever they are in the list, not only on the screen (yes i know ctrl + mouse click, but it's not that easy after all, no? :) ), let's say to install/uninstall them for instance in my case.
The yast partitioner is an good example how non-trivial lists can be represented by a libyui widget with context menus.
Well to make the long story short, i studied the code a bit and i left the user (well the developer really) decide where and how many chackable columns to put. When a column is checked, an YItem value changed is emitted.
Which is the problem then?
- - We are trying to understand if we have regressions. - - We are trying to understand if all i did was necessary - - I have a problem in ncurses in which last column sometimes is not shown in its whole - - Thomas does not like how i selected the column in ncurses
I can offer even more objections: - Multiple checkboxes per row might confuse users - Retrieving the selected items of such a widget is tricky (is a row selected when some checkboxes are checked and some not?). - Selecting checkboxes in qt with your changes doesn't work with keyboard. Cheers, Thomas
I think it's all.
My code is here https://github.com/anaselli (i need to merge to the last changes though).
Cheers, Angelo -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iEYEARECAAYFAlGWM3kACgkQqEs9DA4DquDvZgCgs9jLuvuFRveT1TlQtFniCCQU OAkAn3pXxdne6GApUFQcu/RnrZ/Jn5Uc =Dt1s -----END PGP SIGNATURE-----
-- Thomas Goettlicher SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: libyui-devel+unsubscribe@opensuse.org To contact the owner, e-mail: libyui-devel+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Il 17/05/2013 16:34, Thomas Goettlicher ha scritto: > I can offer even more objections: - Multiple checkboxes per row > might confuse users Well a check list has a column header, you should know what you're checking. Moreover your example here below, is good after all Name | Description | Security Update | Needs reboot - -------+-------------+-----------------+------------- bash | shell | [X] | [ ] kernel | kernel | [X] | [X] I can add this: Service | level 0 |...|level 3 |...| level 7 - ----------+---------+...+--------+---+---------- ... | .... |...| ... |...| ... shorewall | [ ] |...| [X] |...| [ ] sound | [ ] |...| [X] |...| [ ] ... | .... |...| ... |...| ... > - Retrieving the selected items of such a widget is tricky (is a > row selected when some checkboxes are checked and some not?). It could/should but it's the current item that emits the value changes if any. > - Selecting checkboxes in qt with your changes doesn't work with > keyboard. Well this shows I haven't thought to everything :D Cheers, Angelo -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlGWQuoACgkQqEs9DA4DquBDQACdFVu5/G2MUvEZZWyfETldrxQ0 ASkAoLQgnN29jfdowAYv7m95iUB4YUft =l42x -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: libyui-devel+unsubscribe@opensuse.org To contact the owner, e-mail: libyui-devel+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Il 17/05/2013 16:34, Thomas Goettlicher ha scritto: > - Selecting checkboxes in qt with your changes doesn't work with > keyboard. - - Selecting checkboxes works in gtk, but there is no evidence on selected column I'm trying to follow your idea to have only a multiselection, with a checkable column as a choice. I need this checkable column working and upstream as soon as possible ;) Multiselection though does not allow an header and at the moment is (using ncurses) at the first column. Angelo -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlGWa6gACgkQqEs9DA4DquA/gACeJYCvKmJPR8n+a8HMdwwFTcTh vKIAnA5Y08hiO+09rkSxwE+Ny/8YRwja =PIbE -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: libyui-devel+unsubscribe@opensuse.org To contact the owner, e-mail: libyui-devel+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Il 17/05/2013 19:41, Angelo Naselli ha scritto: > Il 17/05/2013 16:34, Thomas Goettlicher ha scritto: >> - Selecting checkboxes in qt with your changes doesn't work with >> keyboard. > - Selecting checkboxes works in gtk, but there is no evidence on > selected column > > > I'm trying to follow your idea to have only a multiselection, with > a checkable column as a choice. I need this checkable column > working and upstream as soon as possible ;) > > Multiselection though does not allow an header and at the moment is > (using ncurses) at the first column. > > Angelo > Well i thought for while more, before starting working on it and i think my old approach is not wrong after all. There is a difference in line (item) selected and checked, here below a cut of rpmdragora in necurses. I used "[............]" to show the line selection here: [x]│vim-X11...│7.3.762 │5.mga3 │x86_64│installed [[ ]│xemacs....│21.4.22 │13.mga2 │x86_64│not installed] ... ─────────────────────────────────────────────────────────────── Informations xemacs - Highly customizable text editor and application development system Notice: This is an official package supported by Mageia ─────────────────────────────────────────────────────────────── As you can see checked means to be installed or already installed, while selected retrieve package info. They are not the same, even if in ncurses selecting the line with space and return, usually checks the first column. Selecting the line can fall in adding/removing any packages :) So I believe the action here is to select the column, not the line... Also because in QT/GTK the multiselection finishes as soon as we select another line, so the behavior is different again. I think, to avoid confusion, adding a checkable item should block multi-selection in YTable, at least for ncurses. Maybe a first approach could be to add a checkable item, at the begin or at the end, so we can add only one column in a fixed position, at the end solve the selection/check issue in ncurses, but the user has to move to last column to check it. Thomas, I thought also to setShowCheckBoxes(true) idea, but i found a problem in there, setting it later (means after constructor), has some bad side effects, columns in qt are built in the constructor, so we have to add one as soon as setShowCheckBoxex has been called, if it's called after some items have been added, the job is more complicated, and last if ytable item is not set as multiselection we have to decide if managing it anyway or not. But as i said above selecting and checking are different things imo. Any comments here? TIA, Angelo -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlGXJMMACgkQqEs9DA4DquBqNQCbBwK9irh2gsbt4N+98gIYXmXD mukAnjVMavkMBAHSfflHHdSzuZRzZVRV =UlYE -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: libyui-devel+unsubscribe@opensuse.org To contact the owner, e-mail: libyui-devel+owner@opensuse.org
On 05/18/2013 08:50 AM, Angelo Naselli wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Il 17/05/2013 19:41, Angelo Naselli ha scritto: >> Il 17/05/2013 16:34, Thomas Goettlicher ha scritto: >>> - Selecting checkboxes in qt with your changes doesn't work with >>> keyboard. >> - Selecting checkboxes works in gtk, but there is no evidence on >> selected column >> >> >> I'm trying to follow your idea to have only a multiselection, with >> a checkable column as a choice. I need this checkable column >> working and upstream as soon as possible ;) >> >> Multiselection though does not allow an header and at the moment is >> (using ncurses) at the first column. >> >> Angelo >> > Well i thought for while more, before starting working on it > and i think my old approach is not wrong after all. There is > a difference in line (item) selected and checked, here below a cut of > rpmdragora in necurses. I used "[............]" to show > the line selection here: > > [x]│vim-X11...│7.3.762 │5.mga3 │x86_64│installed > [[ ]│xemacs....│21.4.22 │13.mga2 │x86_64│not installed] > ... > > ─────────────────────────────────────────────────────────────── > Informations > > xemacs - Highly customizable text editor and application > development system > Notice: This is an official package supported by > Mageia > ─────────────────────────────────────────────────────────────── > > As you can see checked means to be installed or already installed, > while selected retrieve package info. They are not the same, even > if in ncurses selecting the line with space and return, usually > checks the first column. > Selecting the line can fall in adding/removing any packages :) > So I believe the action here is to select the column, not the > line... Also because in QT/GTK the multiselection finishes as > soon as we select another line, so the behavior is different again. > > I think, to avoid confusion, adding a checkable item should > block multi-selection in YTable, at least for ncurses. > > Maybe a first approach could be to add a checkable item, > at the begin or at the end, so we can add only one column > in a fixed position, at the end solve the selection/check > issue in ncurses, but the user has to move to last column > to check it. > > Thomas, I thought also to setShowCheckBoxes(true) idea, but i found > a problem in there, setting it later (means after constructor), > has some bad side effects, columns in qt are built in the constructor, > so we have to add one as soon as setShowCheckBoxex has been called, > if it's called after some items have been added, the job is more > complicated, and last if ytable item is not set as multiselection > we have to decide if managing it anyway or not. But as i said above > selecting and checking are different things imo. > > Any comments here? Most important is not to brake applications which use YTable already. Even with code changes the widgets should behave to applications in the same way they behaved before. BTW: If the checkbox is just an indicator for a status an icon could be the solution. The Qt package selector uses an icon to show if an package is installed, selected for installation, selected for update, and so on. Cheers, Thomas > > TIA, > Angelo > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.12 (GNU/Linux) > Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ > > iEYEARECAAYFAlGXJMMACgkQqEs9DA4DquBqNQCbBwK9irh2gsbt4N+98gIYXmXD > mukAnjVMavkMBAHSfflHHdSzuZRzZVRV > =UlYE > -----END PGP SIGNATURE----- -- Thomas Goettlicher SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: libyui-devel+unsubscribe@opensuse.org To contact the owner, e-mail: libyui-devel+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Il 21/05/2013 12:52, Thomas Goettlicher ha scritto:
Most important is not to brake applications which use YTable already. Even with code changes the widgets should behave to applications in the same way they behaved before. True :)
BTW: If the checkbox is just an indicator for a status an icon could be the solution. The Qt package selector uses an icon to show if an package is installed, selected for installation, selected for update, and so on. Well it isn't only an indicator, is also an indicator. Checked is either installed or to be installed now.
Anyway I'm reconsidering my position. I've just almost fixed the cell behavior in qt (moving by keyboard), and i found that adding that means managing better signals because again clicked on cell is different then checking it. The basic idea now is to work on your suggestion, e.g. having a check box at YItemTable level so that checking means to get all the line. But i think i have to do a lot of changes to my previous ones, and i needed a lot of time to work on ncurses and gtk... so i don't think you will have news very soon :), maybe as soon as i have something on Qt. I'm trying to see if it's better to add this info at YTable constructor or not, as for multi selection i mean. So maybe something like YTable(...., mode=[multisel, checkbox at the end, checkbox at left side]) so that in ncurses multisel is not managed also with check box and we could have [X] | Item col 0 | Item Col 1 |....| Item Col 9 or Item col 0 | Item Col 1 |....| Item Col 9 | [X] Does it sound better? Cheers, Angelo -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlGbaiMACgkQqEs9DA4DquCgRwCgsgmfMPuRRMhi7uQQFcHJ2Zuo p5kAoJpHF50qFdt6PCVc3KfnFwtzNx4u =gYu+ -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: libyui-devel+unsubscribe@opensuse.org To contact the owner, e-mail: libyui-devel+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Il 21/05/2013 12:52, Thomas Goettlicher ha scritto:
Most important is not to brake applications which use YTable already. Even with code changes the widgets should behave to applications in the same way they behaved before. True :)
BTW: If the checkbox is just an indicator for a status an icon could be the solution. The Qt package selector uses an icon to show if an package is installed, selected for installation, selected for update, and so on. Well it isn't only an indicator, is also an indicator. Checked is either installed or to be installed now.
Anyway I'm reconsidering my position. I've just almost fixed the cell behavior in qt (moving by keyboard), and i found that adding that means managing better signals because again clicked on cell is different then checking it.
On 05/21/2013 02:35 PM, Angelo Naselli wrote: libyui is an abstraction layer.
The basic idea now is to work on your suggestion, e.g. having a check box at YItemTable level so that checking means to get all the line. But i think i have to do a lot of changes to my previous ones, and i needed a lot of time to work on ncurses and gtk... so i don't think you will have news very soon :), maybe as soon as i have something on Qt.
There is no hurry.
I'm trying to see if it's better to add this info at YTable constructor or not, as for multi selection i mean. So maybe something like YTable(...., mode=[multisel, checkbox at the end, checkbox at left side])
so that in ncurses multisel is not managed also with check box and we could have [X] | Item col 0 | Item Col 1 |....| Item Col 9 or Item col 0 | Item Col 1 |....| Item Col 9 | [X]
Does it sound better?
That sounds almost good to me. "Checkbox at the end" is okay. But "Checkbox at the left side" should be "Checkbox in front" or so. The reason is that e.g. Arabic uses right-to-left layout. The default option should generate the widget that looks the same way as it used to look like. ycp-ui-bindings should be extended to allow ycp code to set these options as well. Cheers, Thomas
Cheers, Angelo -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iEYEARECAAYFAlGbaiMACgkQqEs9DA4DquCgRwCgsgmfMPuRRMhi7uQQFcHJ2Zuo p5kAoJpHF50qFdt6PCVc3KfnFwtzNx4u =gYu+ -----END PGP SIGNATURE-----
-- Thomas Goettlicher SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: libyui-devel+unsubscribe@opensuse.org To contact the owner, e-mail: libyui-devel+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Il 21/05/2013 17:25, Thomas Goettlicher ha scritto:
"Checkbox at the end" is okay. But "Checkbox at the left side" should be "Checkbox in front" or so. The reason is that e.g. Arabic uses right-to-left layout. Yes, it was not a final definition, i mean I'm going to add an enum we can call its items as we want to better understand it. So maybe left and right should be more appropriate since left and right are fixed despite of which way we're writing.
The default option should generate the widget that looks the same way as it used to look like. For default option i thought the same as it is by now if now is multiselection=false, we should have mode=Normal which i forgot in my previous mail.
ycp-ui-bindings should be extended to allow ycp code to set these options as well. I have to understand how those buildings work, i just looked at
So Normal No multiselection/no Check-boxes multi-selection Enable multi-selection mode Check on left Enable check-boxes on the left side of table Check on right Enable check-boxes on the right side of table These last can be discussed, but i'm not sure we can reverse the definition looking on user settings. But I'm open to discuss, and any help/improvemente later can be don by anybody :) libyui-bindings and for the most, they have just to be rebuilt to get new interfaces. BTW, is there any documentations for ycp-* to understand how to extend YUI widgets? Because i'd expect that an extended widget must be done for QT, GTK, ncurses and at last for a binding of them, right? Cheers, Angelo -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlGbl94ACgkQqEs9DA4DquDUWwCeKVlF0i2bAhDIciFvDADc32B1 eKQAn2W6H6ihIrR+qtthlo7yD8evYdwZ =/lzA -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: libyui-devel+unsubscribe@opensuse.org To contact the owner, e-mail: libyui-devel+owner@opensuse.org
On 05/21/2013 05:50 PM, Angelo Naselli wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Il 21/05/2013 17:25, Thomas Goettlicher ha scritto:
"Checkbox at the end" is okay. But "Checkbox at the left side" should be "Checkbox in front" or so. The reason is that e.g. Arabic uses right-to-left layout. Yes, it was not a final definition, i mean I'm going to add an enum we can call its items as we want to better understand it. So maybe left and right should be more appropriate since left and right are fixed despite of which way we're writing. I'd prefer 'first' and 'last column' because the columns are resorted when the ui is switched to right-to-left layout.
The default option should generate the widget that looks the same way as it used to look like. For default option i thought the same as it is by now if now is multiselection=false, we should have mode=Normal which i forgot in my previous mail.
So Normal No multiselection/no Check-boxes multi-selection Enable multi-selection mode Check on left Enable check-boxes on the left side of table Check on right Enable check-boxes on the right side of table
Why don't you use a constructor with following arguments: bool multiSelection = false and bool checkboxInLastColumn = false ?
These last can be discussed, but i'm not sure we can reverse the definition looking on user settings. But I'm open to discuss, and any help/improvemente later can be don by anybody :)
ycp-ui-bindings should be extended to allow ycp code to set these options as well. I have to understand how those buildings work, i just looked at libyui-bindings and for the most, they have just to be rebuilt to get new interfaces.
BTW, is there any documentations for ycp-* to understand how to extend YUI widgets? Because i'd expect that an extended widget must be done for QT, GTK, ncurses and at last for a binding of them, right?
The header file contains comments. See: https://github.com/libyui/libyui/blob/master/src/YUIPlugin.h Please let me know if you need additional help. Cheers, Thomas
Cheers, Angelo -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iEYEARECAAYFAlGbl94ACgkQqEs9DA4DquDUWwCeKVlF0i2bAhDIciFvDADc32B1 eKQAn2W6H6ihIrR+qtthlo7yD8evYdwZ =/lzA -----END PGP SIGNATURE-----
-- Thomas Goettlicher SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: libyui-devel+unsubscribe@opensuse.org To contact the owner, e-mail: libyui-devel+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Il 22/05/2013 16:16, Thomas Goettlicher ha scritto:
I'd prefer 'first' and 'last column' because the columns are resorted when the ui is switched to right-to-left layout. fine for me, since i don't need to do any tricks for managing right-to-left layout :)
Why don't you use a constructor with following arguments: bool multiSelection = false and bool checkboxInLastColumn = false ?
Well it was my first thought, and try really. But then i realized that i could have Multiselection =true and checkboxInLastColumn = true. that means having 2 checkboxes in ncurses, and that should mean i have to manage click/move on any columns to check or select it. I would have the same problems as now, and as you said it can confuse the users...
The header file contains comments. See: https://github.com/libyui/libyui/blob/master/src/YUIPlugin.h Thanks i will give it a read as soon as i can.
Please let me know if you need additional help. Sure :)
Cheers, Angelo -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlGdKk8ACgkQqEs9DA4DquAEsACfXROM8lr4dDXo4mfNumWrwvWW uD8AoIJn3PKLvT0btH5Lzquv75vCadQA =a/MF -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: libyui-devel+unsubscribe@opensuse.org To contact the owner, e-mail: libyui-devel+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Il 22/05/2013 16:16, Thomas Goettlicher ha scritto:
I'd prefer 'first' and 'last column' because the columns are resorted when the ui is switched to right-to-left layout. fine for me, since i don't need to do any tricks for managing right-to-left layout :) E.g. in libyui-qt the Qt library itself takes care of the layout
On 05/22/2013 10:27 PM, Angelo Naselli wrote: direction depending on the language.
Why don't you use a constructor with following arguments: bool multiSelection = false and bool checkboxInLastColumn = false ? Well it was my first thought, and try really. But then i realized that i could have Multiselection =true and checkboxInLastColumn = true. that means having 2 checkboxes in ncurses, and that should mean i have to manage click/move on any columns to check or select it. I would have the same problems as now, and as you said it can confuse the users... Well, checkboxInLastColumn = false means the checkbox is shown in the first column. Whereas checkboxInLastColumn = true means the checkbox is shown in the last
column only.
Cheers, Thomas
The header file contains comments. See: https://github.com/libyui/libyui/blob/master/src/YUIPlugin.h Thanks i will give it a read as soon as i can.
Please let me know if you need additional help. Sure :)
Cheers, Angelo
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iEYEARECAAYFAlGdKk8ACgkQqEs9DA4DquAEsACfXROM8lr4dDXo4mfNumWrwvWW uD8AoIJn3PKLvT0btH5Lzquv75vCadQA =a/MF -----END PGP SIGNATURE-----
-- Thomas Goettlicher SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: libyui-devel+unsubscribe@opensuse.org To contact the owner, e-mail: libyui-devel+owner@opensuse.org
Well, checkboxInLastColumn = false means the checkbox is shown in the first column. Whereas checkboxInLastColumn = true means the checkbox is shown in the last column only. But multiselection can be true as well... how can i manage it? i'd have in ncurses: [X] item1 | item2....|[X] and without the changes i made in my branch, i cannot manage well
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Il 23/05/2013 14:20, Thomas Goettlicher ha scritto: the following outputs: [X].....[ ] and [ ].....[X] And as you said this confuse the users in any case, am i wrong? Angelo -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlGeCqgACgkQqEs9DA4DquDkVwCdG1WuAZz1ZqH5TRBZfeumfCrF nw0AoJLuaAJOSaXXVE249bGHGP/Lmfe3 =Xt/T -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: libyui-devel+unsubscribe@opensuse.org To contact the owner, e-mail: libyui-devel+owner@opensuse.org
On 05/23/2013 02:25 PM, Angelo Naselli wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Well, checkboxInLastColumn = false means the checkbox is shown in the first column. Whereas checkboxInLastColumn = true means the checkbox is shown in the last column only. But multiselection can be true as well... how can i manage it? i'd have in ncurses: [X] item1 | item2....|[X] and without the changes i made in my branch, i cannot manage well
Il 23/05/2013 14:20, Thomas Goettlicher ha scritto: the following outputs: [X].....[ ] and [ ].....[X]
And as you said this confuse the users in any case, am i wrong? checkboxInLastColumn = true means there is no checkbox in the first
column, but in the last column.
Selected rows have check marks, unselected rows have no check marks. Cheers, Thomas
Angelo -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iEYEARECAAYFAlGeCqgACgkQqEs9DA4DquDkVwCdG1WuAZz1ZqH5TRBZfeumfCrF nw0AoJLuaAJOSaXXVE249bGHGP/Lmfe3 =Xt/T -----END PGP SIGNATURE-----
-- Thomas Goettlicher SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: libyui-devel+unsubscribe@opensuse.org To contact the owner, e-mail: libyui-devel+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Il 23/05/2013 14:32, Thomas Goettlicher ha scritto:
checkboxInLastColumn = true means there is no checkbox in the first column, but in the last column.
Selected rows have check marks, unselected rows have no check marks. hmmm? multiselection in ncurses has checkbox in the first column and that is how is working now. I cannot understand what you mean sorry :/
So I'd expect in ncurses with multi=true and checkInLast=false [X]|[X].... and with multi=true and checkInLast=true [X]|....|[X] while with multi=false they are respectively: [X]|.... and ....|[X] Angelo -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlGeEOMACgkQqEs9DA4DquBeywCcCBYpbiBEegT8MLJjWekPiTOy xDAAn2b4YBZ6xLj0bKxxkDHghreFLXDC =usNy -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: libyui-devel+unsubscribe@opensuse.org To contact the owner, e-mail: libyui-devel+owner@opensuse.org
On 05/23/2013 02:51 PM, Angelo Naselli wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Il 23/05/2013 14:32, Thomas Goettlicher ha scritto:
checkboxInLastColumn = true means there is no checkbox in the first column, but in the last column.
Selected rows have check marks, unselected rows have no check marks. hmmm? multiselection in ncurses has checkbox in the first column and that is how is working now. I cannot understand what you mean sorry :/ I'd expect checkboxes in the last row if the user sets multiSelect=true and checkBoxInLastColumn=true. For multiSelect=false the value of checkBoxInLastColumn is simply ignored an no checkboxes are shown.
I hope that makes clear what I mean. If not please don't hesitate to ask. Cheers, Thomas
So I'd expect in ncurses with multi=true and checkInLast=false [X]|[X].... and with multi=true and checkInLast=true [X]|....|[X] while with multi=false they are respectively: [X]|.... and ....|[X]
Angelo -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iEYEARECAAYFAlGeEOMACgkQqEs9DA4DquBeywCcCBYpbiBEegT8MLJjWekPiTOy xDAAn2b4YBZ6xLj0bKxxkDHghreFLXDC =usNy -----END PGP SIGNATURE-----
-- Thomas Goettlicher SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: libyui-devel+unsubscribe@opensuse.org To contact the owner, e-mail: libyui-devel+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Il 24/05/2013 09:16, Thomas Goettlicher ha scritto:
I'd expect checkboxes in the last row if the user sets multiSelect=true and checkBoxInLastColumn=true. For multiSelect=false the value of checkBoxInLastColumn is simply ignored an no checkboxes are shown.
hmm yes :)
I hope that makes clear what I mean. If not please don't hesitate to ask. hmm and yes ;)
In my opinion cheks and selection are different. Moreover in GUI (QT/GTK) Multiselection is CTRL-up/down/click or shift-up/down/click While checks are different. I see what you mean... it's simpler implementation, but the problem is that you cannot manage in QT/GTK the multiselection as it is nowadays, because you will always have checks with this interface. Angelo -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlGfdn0ACgkQqEs9DA4DquDp5QCfUsgUCnuUMN30sk3eHEzXub85 /xMAoKCZOMGmJPYqQQk2xWpIVVI/RDjA =J2cs -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: libyui-devel+unsubscribe@opensuse.org To contact the owner, e-mail: libyui-devel+owner@opensuse.org
On 05/24/2013 04:17 PM, Angelo Naselli wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Il 24/05/2013 09:16, Thomas Goettlicher ha scritto:
I'd expect checkboxes in the last row if the user sets multiSelect=true and checkBoxInLastColumn=true. For multiSelect=false the value of checkBoxInLastColumn is simply ignored an no checkboxes are shown. hmm yes :)
I hope that makes clear what I mean. If not please don't hesitate to ask. hmm and yes ;)
In my opinion cheks and selection are different. Moreover in GUI (QT/GTK) Multiselection is CTRL-up/down/click or shift-up/down/click While checks are different. Basically there is a small difference, but libyui is an abstraction. We cannot support all corner cases, drag'n'drop also doesn't work for example. We always need to find a simplification that works in both text and graphical ui.
I see what you mean... it's simpler implementation, but the problem is that you cannot manage in QT/GTK the multiselection as it is nowadays, because you will always have checks with this interface.
You are right. We have to option to change the look of the Qt and Gtk interface and have checkboxes in multiselection widgets. That would be fine with me. If someone has objections, please speak up!! We also could have an option showCheckboxes = { no | firstColumn | lastColumn } Cheers, Thomas
Angelo -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iEYEARECAAYFAlGfdn0ACgkQqEs9DA4DquDp5QCfUsgUCnuUMN30sk3eHEzXub85 /xMAoKCZOMGmJPYqQQk2xWpIVVI/RDjA =J2cs -----END PGP SIGNATURE-----
-- Thomas Goettlicher SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: libyui-devel+unsubscribe@opensuse.org To contact the owner, e-mail: libyui-devel+owner@opensuse.org
Il 24/05/2013 16:39, Thomas Goettlicher ha scritto:
We also could have an option showCheckboxes = { no | firstColumn | lastColumn } That remind me my first proposal more or less :D
I'd prefer this one, rally, but at that point we could have the selection mode = {multi, no, checkOnFirst, checkOnLast} ;) Happy week-end. Angelo -- To unsubscribe, e-mail: libyui-devel+unsubscribe@opensuse.org To contact the owner, e-mail: libyui-devel+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Il 24/05/2013 16:59, Angelo Naselli ha scritto:
Il 24/05/2013 16:39, Thomas Goettlicher ha scritto:
We also could have an option showCheckboxes = { no | firstColumn | lastColumn } That remind me my first proposal more or less :D
I'd prefer this one, rally, but at that point we could have the selection mode = {multi, no, checkOnFirst, checkOnLast} ;)
Happy week-end.
Angelo
I finally implementated it, could you please give it a look? My fork is as usual at https://github.com/anaselli libyui, libyui-qt, libyui-ncurses, libyui-gtk. There's something i think it could be improved, but now does what we talked about. Tomorrow i'll try on suse for regressions. Cheers Angelo -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlGrsaQACgkQqEs9DA4DquArnQCcD9obliVc4qSjV6xjQftlPOfB RtIAn3HCE5Z1K/DPU90RZ9i5xswAlX/t =f9VA -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: libyui-devel+unsubscribe@opensuse.org To contact the owner, e-mail: libyui-devel+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Il 02/06/2013 22:57, Angelo Naselli ha scritto:
I finally implementated it, could you please give it a look?
My fork is as usual at https://github.com/anaselli
libyui, libyui-qt, libyui-ncurses, libyui-gtk.
There's something i think it could be improved, but now does what we talked about. Tomorrow i'll try on suse for regressions. Rebuilt all and yast-ycp-ui-bindings under opensuse 12.3, I seem not to see any regressions, running yast2 disk and some Table ycp examples.
Of course i think you should change something there to have play with new YTable options :) I think i could ask for a push, but i'd prefer to get a feedback from you before... just to know if i forget something important in suse. (I'll remove some prints first :) ) Angelo -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlGzSMgACgkQqEs9DA4DquDs7gCZAcUUmJryfeUAG+z3RcwRlQbS xScAnRInrF7sbgcXpKMD8aNDieqldC45 =fO4S -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: libyui-devel+unsubscribe@opensuse.org To contact the owner, e-mail: libyui-devel+owner@opensuse.org
Am 08.06.2013 17:07, schrieb Angelo Naselli:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Il 02/06/2013 22:57, Angelo Naselli ha scritto:
I finally implementated it, could you please give it a look?
My fork is as usual at https://github.com/anaselli
libyui, libyui-qt, libyui-ncurses, libyui-gtk.
There's something i think it could be improved, but now does what we talked about. Tomorrow i'll try on suse for regressions. Rebuilt all and yast-ycp-ui-bindings under opensuse 12.3, I seem not to see any regressions, running yast2 disk and some Table ycp examples.
Of course i think you should change something there to have play with new YTable options :)
I think i could ask for a push, but i'd prefer to get a feedback from you before... just to know if i forget something important in suse. (I'll remove some prints first :) ) I have checked the code changes for libyui-ncurses.
AFAICS the only difference to former code is that the column to check can at be at first or last column now. I think this complicates the code unnessecarily. For me YTableMode is not clearly defined, e.g. what's the difference between YTableCheckBoxOnFirstColumn and YTableMultiSelection? I think it doesn't make sense to have the checkable column at last column for ncurses (not as easy to scroll here as in qt/gtk). My suggestion is not to change libyui-ncurses because 'old' code fulfills the requirements (in my opinion). Greetings Gabi Another remark: Change below would break usage in yast disk: diff --git a/src/NCTable.cc b/src/NCTable.cc @@ -543,7 +587,7 @@ NCursesEvent NCTable::wHandleInput( wint_t key ) else { toggleCurrentItem(); - if ( notify() && immediateMode() ) + if ( notify() || immediateMode() ) -> breaks 'yast disk' module/volume management (when adding a volume group and selecting a device). { return NCursesEvent::ValueChanged; }
Angelo -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iEYEARECAAYFAlGzSMgACgkQqEs9DA4DquDs7gCZAcUUmJryfeUAG+z3RcwRlQbS xScAnRInrF7sbgcXpKMD8aNDieqldC45 =fO4S -----END PGP SIGNATURE-----
-- Gabriele Mohr SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstr. 5 Tel: +49 911 740 53 362 90409 Nürnberg Email: gs@suse.de ----------------------------------------------------------------- -- To unsubscribe, e-mail: libyui-devel+unsubscribe@opensuse.org To contact the owner, e-mail: libyui-devel+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
AFAICS the only difference to former code is that the column to check can at be at first or last column now. I think this complicates the code unnessecarily. For me YTableMode is not clearly defined, e.g. what's the difference between YTableCheckBoxOnFirstColumn and YTableMultiSelection? Well not all is ncurses ;) Multiselection as you changed now is not very different, since you change in your last commit the event sent from Activated to ValueChanged. As i said IMO that's wrong for multiselection, but i see, it's easier in ncurses, even if it does not work in such a way in GUI.
A multiselection is something different in GUI (Qt/Gtk) and who ported it in ncurses did by using checkboxes, that i think it's a great idea. What i need is having checkboxes in YTable in GUI, so Multiselection is not the solution. As discussed in this thread, a check-box column at the beginning or at the end seemed ok.
I think it doesn't make sense to have the checkable column at last column for ncurses (not as easy to scroll here as in qt/gtk).
My suggestion is not to change libyui-ncurses because 'old' code fulfills the requirements (in my opinion). Well it does not fullfill mine, or at least what i'm trying to port under libyui. I need check box to manage a package manager, and with my implementation i have. |Package │Version │Release [ ]│texmacs │1.0.7.16│3.mga3... [x]│vim-X11 │7.3.762 │5.mga3... [ ]│xemacs │21.4.22 │18.mag3... In GUI that cannot be managed by multiselection
I also needed for the font manager something like Enable Update Font [X] [ ] Core [X] [X] Core Updates But you stopped my previous implementation to avoid any user confusions. And at the moment i have to study another way to do that.
Another remark: Change below would break usage in yast disk:
diff --git a/src/NCTable.cc b/src/NCTable.cc
@@ -543,7 +587,7 @@ NCursesEvent NCTable::wHandleInput( wint_t key ) else { toggleCurrentItem(); - if ( notify() && immediateMode() ) + if ( notify() || immediateMode() )
-> breaks 'yast disk' module/volume management (when adding a volume group and selecting a device). { return NCursesEvent::ValueChanged; }
hmm, I'm sorry for that, but then i cannot understand how it works :/ as said, and written in code immediate mode include notify, so "and clause" is useless, because immediate mode already means notify. Moreover if i set only notify, i don't have an notification in ncurses... So i wonder where i'm wrong? Cheers, Angelo -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlG1u+QACgkQqEs9DA4DquD2hwCfValzDhcG7Kz7Cx9MN/6faJI9 oRcAoJLFkjuX05/W9dudftOD9nO9O5HA =zGC/ -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: libyui-devel+unsubscribe@opensuse.org To contact the owner, e-mail: libyui-devel+owner@opensuse.org
Am 10.06.2013 13:43, schrieb Angelo Naselli:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
AFAICS the only difference to former code is that the column to check can at be at first or last column now. I think this complicates the code unnessecarily. For me YTableMode is not clearly defined, e.g. what's the difference between YTableCheckBoxOnFirstColumn and YTableMultiSelection? Well not all is ncurses ;) Multiselection as you changed now is not very different, since you change in your last commit the event sent from Activated to ValueChanged.
No, I only added additional return ValueChanged if item is toggled (which is conform to NCMultiSelectionBox). see commit 0b69bb499fa5e2b011aa614dfcf0df884b45456a NCTable::NCTable( YWidget * parent, YTableHeader *tableHeader, bool multiSelection ) : YTable( parent, tableHeader, multiSelection ) , NCPadWidget( parent ) @@ -529,6 +543,10 @@ NCursesEvent NCTable::wHandleInput( wint_t key ) else { toggleCurrentItem(); + if ( notify() && immediateMode() ) + { + return NCursesEvent::ValueChanged; + } } break;
As i said IMO that's wrong for multiselection, but i see, it's easier in ncurses, even if it does not work in such a way in GUI.
A multiselection is something different in GUI (Qt/Gtk) and who ported it in ncurses did by using checkboxes, that i think it's a great idea.
What i need is having checkboxes in YTable in GUI, so Multiselection is not the solution. As discussed in this thread, a check-box column at the beginning or at the end seemed ok.
I think it doesn't make sense to have the checkable column at last column for ncurses (not as easy to scroll here as in qt/gtk).
My suggestion is not to change libyui-ncurses because 'old' code fulfills the requirements (in my opinion). Well it does not fullfill mine, or at least what i'm trying to port under libyui. I need check box to manage a package manager, and with my implementation i have. |Package │Version │Release [ ]│texmacs │1.0.7.16│3.mga3... [x]│vim-X11 │7.3.762 │5.mga3... [ ]│xemacs │21.4.22 │18.mag3... In GUI that cannot be managed by multiselection
I also needed for the font manager something like Enable Update Font [X] [ ] Core [X] [X] Core Updates
But you stopped my previous implementation to avoid any user confusions. And at the moment i have to study another way to do that.
Another remark: Change below would break usage in yast disk:
diff --git a/src/NCTable.cc b/src/NCTable.cc
@@ -543,7 +587,7 @@ NCursesEvent NCTable::wHandleInput( wint_t key ) else { toggleCurrentItem(); - if ( notify() && immediateMode() ) + if ( notify() || immediateMode() )
-> breaks 'yast disk' module/volume management (when adding a volume group and selecting a device). { return NCursesEvent::ValueChanged; }
hmm, I'm sorry for that, but then i cannot understand how it works :/
as said, and written in code immediate mode include notify, so "and clause" is useless, because immediate mode already means notify. Moreover if i set only notify, i don't have an notification in ncurses... So i wonder where i'm wrong?
Cheers, Angelo
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iEYEARECAAYFAlG1u+QACgkQqEs9DA4DquD2hwCfValzDhcG7Kz7Cx9MN/6faJI9 oRcAoJLFkjuX05/W9dudftOD9nO9O5HA =zGC/ -----END PGP SIGNATURE-----
-- Gabriele Mohr SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstr. 5 Tel: +49 911 740 53 362 90409 Nürnberg Email: gs@suse.de ----------------------------------------------------------------- -- To unsubscribe, e-mail: libyui-devel+unsubscribe@opensuse.org To contact the owner, e-mail: libyui-devel+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Il 10/06/2013 14:05, Gabriele Mohr ha scritto:
No, I only added additional return ValueChanged if item is toggled (which is conform to NCMultiSelectionBox).
see commit 0b69bb499fa5e2b011aa614dfcf0df884b45456a
NCTable::NCTable( YWidget * parent, YTableHeader *tableHeader, bool multiSelection ) : YTable( parent, tableHeader, multiSelection ) , NCPadWidget( parent ) @@ -529,6 +543,10 @@ NCursesEvent NCTable::wHandleInput( wint_t key ) else { toggleCurrentItem(); + if ( notify() && immediateMode() ) + { + return NCursesEvent::ValueChanged; + } } break;
Sorry that is not true -neither mine previous really- :) else
{ toggleCurrentItem(); + if ( notify() && immediateMode() ) + { + return NCursesEvent::ValueChanged; + } } break; Means that you return in the case you have a multi-selection so you skip the code below: if ( citem != getCurrentItem() ) { if ( notify() && immediateMode() ) ret = NCursesEvent::SelectionChanged;
if ( !multiselect ) selectCurrentItem(); } Selection changed is not emitted, so it's not an additional event it's a different one in some cases... ;) Cheers, Angelo P.S. and which is the explanation for notify() and/or immediateMode() instead? -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlG1xoQACgkQqEs9DA4DquA3EwCfQZB5hJhlsdKKSiXBa2XiQ4Vm kC4An3DWBqVhmn7/UGrRna4trTzIOPPf =po9u -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: libyui-devel+unsubscribe@opensuse.org To contact the owner, e-mail: libyui-devel+owner@opensuse.org
Am 10.06.2013 14:28, schrieb Angelo Naselli:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Il 10/06/2013 14:05, Gabriele Mohr ha scritto:
No, I only added additional return ValueChanged if item is toggled (which is conform to NCMultiSelectionBox).
see commit 0b69bb499fa5e2b011aa614dfcf0df884b45456a
NCTable::NCTable( YWidget * parent, YTableHeader *tableHeader, bool multiSelection ) : YTable( parent, tableHeader, multiSelection ) , NCPadWidget( parent ) @@ -529,6 +543,10 @@ NCursesEvent NCTable::wHandleInput( wint_t key ) else { toggleCurrentItem(); + if ( notify() && immediateMode() ) + { + return NCursesEvent::ValueChanged; + } } break;
Sorry that is not true -neither mine previous really- :) else
{ toggleCurrentItem(); + if ( notify() && immediateMode() ) + { + return NCursesEvent::ValueChanged; + } } break; Means that you return in the case you have a multi-selection so you skip the code below: if ( citem != getCurrentItem() ) { if ( notify() && immediateMode() ) ret = NCursesEvent::SelectionChanged;
if ( !multiselect ) selectCurrentItem(); }
Selection changed is not emitted, so it's not an additional event it's a different one in some cases... ;)
No, SelectionChanged wasn't emitted before because the position in the list is unchanged when item is toggled and the condition: if ( citem != getCurrentItem() ) hasn't applied. SelectionChanged is emitted for single and multi selection if position in list has changed (scrolled up/down).
Cheers, Angelo
P.S. and which is the explanation for notify() and/or immediateMode() instead?
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iEYEARECAAYFAlG1xoQACgkQqEs9DA4DquA3EwCfQZB5hJhlsdKKSiXBa2XiQ4Vm kC4An3DWBqVhmn7/UGrRna4trTzIOPPf =po9u -----END PGP SIGNATURE-----
-- Gabriele Mohr SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstr. 5 Tel: +49 911 740 53 362 90409 Nürnberg Email: gs@suse.de ----------------------------------------------------------------- -- To unsubscribe, e-mail: libyui-devel+unsubscribe@opensuse.org To contact the owner, e-mail: libyui-devel+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Il 10/06/2013 15:03, Gabriele Mohr ha scritto:
No, SelectionChanged wasn't emitted before because the position in the list is unchanged when item is toggled and the condition:
if ( citem != getCurrentItem() )
hasn't applied.
SelectionChanged is emitted for single and multi selection if position in list has changed (scrolled up/down). indeed the problem is there imo.
You asked for the difference between YTableCheckBoxOnFirstColumn and YTableMultiSelection, and imo all is there. Multiselection, as the second part of the word says, is concerning selection. That is clear in GUI, not in ncurses since is represented by check boxes. I believe Multiselection should emit a SelectionChanged event because the selection has changed... and not a valueChanged because of the item. Instead with YTableCheckBoxOn[First|Last]Column a checked column means that the item is changed so a valueChanged is more appropriated than a selection changed. Anyway I'm always open to discuss, but I need also answers, if my code is not correct, it does not make sense etc, how can i manage my needs, in a simple way as libyui allows, without specializing code for gtk, qt and ncurses? Cheers, Angelo -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlG2EsYACgkQqEs9DA4DquBCIwCfYLkgGJf37AO04K4HkKa7ONYl lwcAni9bwMbZF8N+JAJzG2TkLzSg6vDT =F+mC -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: libyui-devel+unsubscribe@opensuse.org To contact the owner, e-mail: libyui-devel+owner@opensuse.org
Am 10.06.2013 19:54, schrieb Angelo Naselli:
No, SelectionChanged wasn't emitted before because the position in
the list is unchanged when item is toggled and the condition:
if ( citem != getCurrentItem() )
hasn't applied.
SelectionChanged is emitted for single and multi selection if position in list has changed (scrolled up/down). indeed the problem is there imo.
It's intended and conform to all widgets concerned (SelectionBox, MultiselectionBox, Table, Tree), SelectionChanged means the position in the list has changed.
You asked for the difference between YTableCheckBoxOnFirstColumn and YTableMultiSelection, and imo all is there.
Where? I didn't find documentation in YTypes.h: +enum YTableMode { + YTableSingleLineSelection, + YTableMultiSelection, + YTableCheckBoxOnFirstColumn, + YTableCheckBoxOnLastColumn + };
Multiselection, as the second part of the word says, is concerning selection. That is clear in GUI, not in ncurses since is represented by check boxes. I believe Multiselection should emit a SelectionChanged event because the selection has changed... and not a valueChanged because of the item. Instead with YTableCheckBoxOn[First|Last]Column a checked column means that the item is changed so a valueChanged is more appropriated than a selection changed. The naming might be confusing, but as written before, SelectionChanged is used for list position changes and ValueChanged is emitted conform to MultiSelectionBox if an list item is toggled.
Anyway I'm always open to discuss, but I need also answers, if my code is not correct, it does not make sense etc, how can i manage my needs, in a simple way as libyui allows, without specializing code for gtk, qt and ncurses?
For an application it rarely matters which exact type of event is sent. Example: Have a list of packages and let the user select several lines (which means multiSelection mode of the table widget). And have an Ok (Install) button. The user clicks Ok and you want to install the selected packages. In this case it doesn't matter which events are sent during checking (selecting), you simple have to get the list of selectedItems after getting the activated event of the OK button. In your case: do you want to react on changes concerning the selection (the checked items) immediately? libyui-ncurses now returns the ValueChanged event and you can check for this (has to be added for qt). -- Gabriele Mohr SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstr. 5 Tel: +49 911 740 53 362 90409 Nürnberg Email: gs@suse.de ----------------------------------------------------------------- -- To unsubscribe, e-mail: libyui-devel+unsubscribe@opensuse.org To contact the owner, e-mail: libyui-devel+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Il 13/06/2013 15:30, Gabriele Mohr ha scritto:
Where? I didn't find documentation in YTypes.h: +enum YTableMode { + YTableSingleLineSelection, + YTableMultiSelection, + YTableCheckBoxOnFirstColumn, + YTableCheckBoxOnLastColumn + }; I didn't mean that :D and yes you're right there's no explanation there. This is another reason why i'm not ready for a push request :D
Angelo -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlG575QACgkQqEs9DA4DquC8IACfVZBRKOXY0Nh4M0dOLOvpw+1z xmoAn2RORhoJ4SVjrR87b+z46/4yRVd8 =AM6i -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: libyui-devel+unsubscribe@opensuse.org To contact the owner, e-mail: libyui-devel+owner@opensuse.org
On 06/10/2013 07:54 PM, Angelo Naselli wrote:
Anyway I'm always open to discuss, but I need also answers, if my code is not correct, it does not make sense etc, how can i manage my needs, in a simple way as libyui allows, without specializing code for gtk, qt and ncurses?
First of all we should agree on the fact that libyui itself is an abstracted UI which cannot support each and every corner case. If one's application has special requirements, e.g. package selection, graphs and so on, one needs to create a special widget that fulfills this task. Back to topic: The way the multiselection is implemented in libyui-ncurses looks good to me. The checkbox in the first coulum indicates the selected items. I'd prefer a similar presentation for libyui-qt and libyui-gtk for the multiselection widget. Everything beyond that sounds like a special widget. Cheers, Thomas -- To unsubscribe, e-mail: libyui-devel+unsubscribe@opensuse.org To contact the owner, e-mail: libyui-devel+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Il 18/06/2013 14:22, Thomas Goettlicher ha scritto:
Back to topic: The way the multiselection is implemented in libyui-ncurses looks good to me. The checkbox in the first coulum indicates the selected items. I'd prefer a similar presentation for libyui-qt and libyui-gtk for the multiselection widget. Everything beyond that sounds like a special widget.
I think that could be a good solution, but i also think i won't work on it because it needs to change gtk and qt behaviour, and I don't want to change things for the third time, now sure to break something since gtk and qt will work differently and hear that this or that does not work anymore. It should be easy to get some code of mine and change some little things in the implementation we have now... I'm confident to see this change very soon then :) Angelo -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlHAuroACgkQqEs9DA4DquAK/gCeLzr+K2GEqu9Sh/eEXw/E8BLV 4bMAn1ZBJHKj11ELzJcHb5dmjzAI4zS4 =V3aJ -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: libyui-devel+unsubscribe@opensuse.org To contact the owner, e-mail: libyui-devel+owner@opensuse.org
participants (3)
-
Angelo Naselli
-
Gabriele Mohr
-
Thomas Goettlicher