|
Bugzilla – Full Text Bug Listing |
| Summary: | software repositories: maintain entry selection common sense position after delete | ||
|---|---|---|---|
| Product: | [openSUSE] openSUSE 10.3 | Reporter: | macias - <bluedzins> |
| Component: | YaST2 | Assignee: | Ladislav Slezák <lslezak> |
| Status: | RESOLVED WONTFIX | QA Contact: | Jiri Srain <jsrain> |
| Severity: | Enhancement | ||
| Priority: | P5 - None | ||
| Version: | Final | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Other | ||
| Whiteboard: | |||
| Found By: | --- | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
|
Description
macias -
2007-10-09 13:57:43 UTC
Please attach y2logs. If you are in doubt follow: http://en.opensuse.org/Bugs/YaST Thanks! It is quite easy to reproduce -- launch SR, sort repos by status (disabled/enabled) and delete any. OK reproduced, looks like yast is being confused by sorting them. It behaves same on my x86_64 so it seems to be hw independent. This cannot be fixed because the yast script cannot get the current sorting from UI when the table is sorted by user manually. (I can only disable sorting but that's a bad idea...) Ladislav, _EVEN_ if yast is composition of backend and frontend... user: delete entry -> UI: delete entry X -> backend: delete X reverse direction a) backend: success -> UI: delete it visually -> UI: skip to next item b) backend: failure -> UI: do nothing I'm sorry but I don't understand comment #5 at all... The problem is that the backend (Yast script) cannot get the current order of the table items after sorting it by another column in UI. It simply doesn't know order of the items in the table. The only thing which script can read or set is the selected item or set content of a cell. See http://forgeftp.novell.com/yast/doc/SL10.2/tdg/Table_widget.html Ladislav, I showed you steps in such case, i.e. there is some backend, and this backend does not know anything about sorting. How it is done -- I (user) click to delete repo. This is at GUI level right? So GUI calls backend to delete the item, if this succeeds then _GUI_ (not yast) removes the repo _visually_. And it is GUI part job to jump to next item. Yast script (backend) should not know anything about table, list, whatever -- it should handle low-level primitives functions, like: a) get repo list b) change repo attributes c) add repo d) remove repo (In reply to comment #7 from Maciej Pilichowski) > This is at GUI level right? So GUI calls backend to delete the item, if this > succeeds then _GUI_ (not yast) removes the repo _visually_. No, the problem is here: The item is deleted by the Yast script. Actually the item is not deleted, the _whole_ table content is _replaced_. UI doesn't support removing of a single line from the table widget. It would need to be implemented in 3 frontends (Qt, GTK, ncurses). I think it's not worth of doing it, the effort is much bigger than the benefit. Ok, but UI handles deleting item, right? So it takes (at UI level) only getting item number from the list (table) before the delete, deleting, getting whole table back, restoring sorting, and setting the item number to previously stored value. Problem solved (reopening). Please, see http://forgeftp.novell.com/yast/doc/SL10.2/tdg/Table_widget.html for list of supported operations (section Properties). No, sorry, this really cannot be simply implemented. The table widget doesn't allow to set or get the current sorting. Ladislav, this is not ironic, or anything, just compare: Possible things: * OCR, voice recognition, auto-driven vehicles (Darpa Challenge), machine translation, google search (in split second), CGI (movies), flight to Mars and to the Moon Impossible things: * maintaining position in table Ladislav, does sorting change when delete is done? If not, you can skip this step too. Just reset the position back. Of coure it _IS_ possible, but the effort to implement it would be very high, it's not worth of doing it as I have written in comment #8. Sorry, but we have more important problems than sorting table items. (BTW yast is open source, your patch will be welcomed.) I resolved the bug as WONTFIX, that means that the bug report is valid but for some reason it will not be fixed. (As opposed to INVALID which means the bug is not a bug.) The position is set back when you delete some item from the table. It works if you do not change sorting. If you change sorting it breaks because the yast script doesn't know that sorting has changed and set the new item according to the original sorting. > The position is set back when you delete some item from the table. It works
> if you do not change sorting.
I did the test -- I added an item, it was put as the last one, I deleted it. The first item gets selected.
I did not change any sorting. Just started SR, added repo, deleted it. So it does not maintain position (even without changing order).
|