Re: [anjuta-devel] GDL placeholder

Hi James,

Le 04/05/2012 06:08, James Liggett a écrit :
I have a similar problem with git shell, where if you click on a command
button multiple times, the command panes don't get placed on the bottom
where they should be. They end up in the center instead, which looks
really odd. I have no idea why this happens.

I have looked at this issue, I think I have an explanation:
- You start with the Git pane containing a vertical paned widget with all git windows in a notebook at the top and your dialog at the bottom.
- You click on the command button again
- It uses anjuta_dock_replace_command_pane to add a new dialog, replacing the current one.
- First this function remove the old dialog at the bottom
- This trigger the removing of the vertical pane which contains only the notebook now. - The notebook is removed from the pane and added to the top git pane. The size of the notebook is lost in the operation, a size negotiation is requested but it will be done later in Glib main loop. - You are back in anjuta_dock_replace_command_pane function and add the new dialog now. - You enter gdl_dock_add_item to add the new dialog at the bottom. The only docking widget is the notebook, so you plan to merge it with the notebook at the bottom. - But the function gdl_dock_refine_placement consider that the notebook is already at the bottom of the docking area (its size is not valid yet). - So instead of adding a pane with the notebook on the top and the dialog at the bottom, it adds the dialog in the notebook. -Then the size request is done and the notebook grows to fill the complete docking space, but it is too late your dialog is already docked inside the notebook.

I don't think it is really a bug in GDL. It means that you cannot change several GDL widgets at the same time. I think this is acceptable.

I don't know how to fix this. An easy solution is to delete the dialog immediately and add it later in a idle handler. A better solution would be to redo it as soon as the size has been renegotiated or force an immediate renegotiation. If you have more ideas, I'm interested.

Else, I have recompiled gtranslator and I have enable and disable several plugins but I haven't found an obvious missing widget. I think it's possible to have a widget hidden when one part of a paned widget is 0 perhaps it can explain this issue.

Then the destination position doesn't always appear or sometimes appears at the wrong place. I see it in Anjuta too. But it's the only real bug that I have seen at the moment.



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