Closed asermax closed 12 years ago
I can't reproduce the bug: I select a row and then I click on a checkbox of a different row, but it works! Maybe I don't get the right procedure...
You mean that we need to get the current selected row using the treeModel instead of treeview.get_selection().get_selected()
? If you can do it and it solves the bug, it will be great!
Anyway, I try to see if I can do something like that, but I'm not sure: the treeview is really tough to handle :/
It seems that you are doing the same procedure as I'm. Idk why it happens to me, and it only happens sometimes :/
The TreeModel (in this case the ListStore) contains the data being shown on the TreeView. Whenever an user modifies the View, the changes are reflected on the Model (MVC pattern, lol). For what I can see on the TreeModel documentation, whenever a row info changes, the signal row-changed is fired. This signal includes some params that help you identify the modified row, which would be the service that was modified. I was thinking, maybe if using this signal works, you could also allow the editing of the service name.
Well, if you want and can (implying that I explained myself well xD), please fix it for me. Otherwise, I will attack it as soon as I can d:
Heh, while testing, I found out (you probably already knew this) that the toggle cell render doesn't behave as expected (the activatable property doesn't work for some reason). So, to fix the issue I was having, I changed the toggle callback to use the checkbox' row through it's tree path, instead of using the currently selected row. You should test it to see if it brokes something on your side, but I don't think it would :3 let me know either way!
Great job! So now the bug is fixed? I can't test it out until this evening or tomorrow, but I think it will work great :D
Thanks again!
Well, I post this issue as a follow up of the conversation we were having on the other thread. I tried using the reset to default option, but it keep happening, so I kept looking at it a little more. I realized that sometimes, when trying to click on a checkbox from the treeview directly, the 'cursor' (current selected row) wouldn't change, and the checkbox wouldn't toggle. Nevertheless, after aplying the changes and opening the service manager again, the checkbox of the previously selected service (the one that wouldn't loose the cursor when trying to click the toggle) of the same column of the toggle I tried to click, had changed it's value. Reviewing the code of the manager window, I saw that in 'website_toggled_from_list' you get the current selected row and apply the change there; in the case I experienced and described before, that would explain the misbehavior.
Idk if you can reproduce this bug, but in case you can't and it's hard for you to test it, I'll see if I can modify the implementation to fix this issue. I was thinking of using the signals from the TreeModel, that seem a little more straightforward to store changes made on the model (ListStore implements TreeModel, so it implements this signals too).