After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 616728 - hide breakpoints and watches windows on new project
hide breakpoints and watches windows on new project
Status: RESOLVED FIXED
Product: anjuta
Classification: Applications
Component: plugins: debug-manager
git master
Other Linux
: Normal normal
: ---
Assigned To: Sébastien Granjoux
Anjuta maintainers
Depends on: 569160
Blocks:
 
 
Reported: 2010-04-24 19:20 UTC by Massimo Cora'
Modified: 2012-11-25 17:43 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Massimo Cora' 2010-04-24 19:20:37 UTC
everytime on 'new project' Anjuta starts with two default windows: breakpoints and watches, which are useless at that point of the project.
It would be nice if they were hidden.
Comment 1 Johannes Schmid 2010-04-24 19:51:48 UTC
Argh, yes I wanted to fix this for ages. I could be a problem with the default or whatever! Hope I can do this till monday (2.30.1 release).

Thanks for reporting, I always forget about it.
Comment 2 Massimo Cora' 2010-04-24 23:55:21 UTC
from what I see when an user activates a plugin, all its widgets are docked and displayed.
Maybe this is more a feature than a bug?
Comment 3 Massimo Cora' 2010-04-24 23:59:58 UTC
view->Memory and view->Disassembly choices appear when debugger is running.
Then probably moving breakpoints and watches there should do the trick, I think.
Comment 4 Massimo Cora' 2010-04-25 00:33:40 UTC
I've tried with anjuta_shell_iconify_dockable_widget () or anjuta_shell_hide_dockable_widget () but nothing happens. 
Instead a warning is displayed:

(anjuta:13768): Anjuta-CRITICAL **: anjuta_app_hide_dockable_widget: assertion `dock_item != NULL' failed
Comment 5 Sébastien Granjoux 2010-04-25 07:45:19 UTC
I don't think it is a good idea to display the breakpoint and watches windows only when the debugger is running, like the diassembly window.

You can define breakpoint and watches even when the debugger is not running. Normally, you want to save both breakpoints and watches, so they have to exist even when the debugger is not running.

I don't really see this as an issue. Moreover if you hide both windows in your project, this configuration will be saved when you exit the project.

Or do you want to hide both windows by default when creating a new project ? I'm not sure it's very useful as keeping them will help an user to see this feature. Anyway perhaps it's possible to generate an additional configuration file to make them hidden.

Then perhaps you rather want to hide these windows when the debugger is stopped. The issue is that it needs an additional options somewhere as we cannot use the View menu item.
Comment 6 Johannes Schmid 2010-04-25 10:38:41 UTC
(In reply to comment #5)
> I don't think it is a good idea to display the breakpoint and watches windows
> only when the debugger is running, like the diassembly window.

Yes, they should just be hidden so they can be activated in the "View menu.

> You can define breakpoint and watches even when the debugger is not running.
> Normally, you want to save both breakpoints and watches, so they have to exist
> even when the debugger is not running.
> 
> I don't really see this as an issue. Moreover if you hide both windows in your
> project, this configuration will be saved when you exit the project.
> 
> Or do you want to hide both windows by default when creating a new project ?
> I'm not sure it's very useful as keeping them will help an user to see this
> feature. Anyway perhaps it's possible to generate an additional configuration
> file to make them hidden.

Yes, hiding them as default is the way to go, mostly for optical reasons. The default startup for a project just looks too distracting.

> Then perhaps you rather want to hide these windows when the debugger is
> stopped. The issue is that it needs an additional options somewhere as we
> cannot use the View menu item.

I don't think we need to hide them when the debugger stops.

I have fixed that now. This is not entirely perfect as it will hide the items always and not only when there are not in the layout. They more perfect solution is to ship a dock-layout.xml file and fix gdl to also track windows that aren't available.
Comment 7 Massimo Cora' 2010-04-25 11:04:18 UTC
I've just checked with you patch Johannes, but it doesn't work.

I got the following warnings

[...]
(anjuta:6722): libanjuta-symbol-db-DEBUG: symbol-db-engine-core.c:3241 (sdb_engine_check_db_version_and_upgrade) No need to upgrade.

(anjuta:6722): Anjuta-CRITICAL **: anjuta_app_hide_dockable_widget: assertion `dock_item != NULL' failed

(anjuta:6722): Anjuta-CRITICAL **: anjuta_app_hide_dockable_widget: assertion `dock_item != NULL' failed
[...]


and the windows are still there when creating a new project.
I tried your way yesterday night, but the same happens. Maybe it's because the anjuta_shell_hide_dockable_widget () is given before the widget is actually docked?
Comment 8 Johannes Schmid 2010-04-25 11:16:08 UTC
hmm, I tried here with latest gdl and gtk+ and it worked without problems.
Comment 9 Massimo Cora' 2010-04-25 13:03:34 UTC
I've just upgraded gdl, but same happens.

I've gtk version 2.20.0-3, debian testing.
I'll try with more tests later tonight, but it would be great if a third person could test on his box.
Comment 10 Johannes Schmid 2010-04-25 19:30:28 UTC
Hmm, had to revert that patch because it seems that it is sometimes breaking the layout. I had to reset the layout quite often. I guess this is easier to fix when #569160 is fixed.
Comment 11 Johannes Schmid 2012-07-26 09:10:43 UTC
Actually that got worse with the recent changes in gdl now - the watch and break window is now shown *every* time you open anjuta - even if you closed them in your layout before.
Comment 12 Sébastien Granjoux 2012-11-25 17:43:32 UTC
The bug #569160 has been fixed in GDL 3.6.0. This is easier to fix, I have just changed the default layout to have the debugger breakpoints and watches windows hidden by default.