GNOME Bugzilla – Bug 771155
Main window goes insensitive if builder fails to open a listed project
Last modified: 2016-12-26 17:01:49 UTC
How to reproduce: 1. Create some project for test. 2. Close builder after project creation, and reopen builder. 3. The test project created is listed in the 'Recent projects'. Delete the 'configure.ac' file from the project (without closing builder). 4. Now try to open the project. builder fails to open the project, which is OK. But after that the main window goes insensitive which shouldn't happen.
Created attachment 342444 [details] [review] make main window sensitive when failed in opening a project Main window is made insensitive before opening a project. This patch makes main window sensitive again when there is an error in opening project.
Hi, i get: WARNING: Error when getting information for file “/home/slaf/Projects/test/configure.ac”: No such file or directory But the main window stays sensitive, maybe it's already fixed in master. try and tell me, thanks
I build master now. After clicking, on close of error dialog, window remains insensitive. https://drive.google.com/file/d/0BzuWMluhCkpBQUdrYXBwNVRsa2M/view?usp=sharing
ok, got it. At first i was trying to create a new project with Builder and by selecting "version control", telling it to use git, the result was a warning in the terminal. By not selecting git, we get (and we are not consistent here) a warning dialog and i can reproduce the problem.
Review of attachment 342444 [details] [review]: ::: libide/greeter/ide-greeter-perspective.c @@ +453,3 @@ + gtk_widget_set_sensitive (GTK_WIDGET (IDE_GREETER_PERSPECTIVE (perspective)), TRUE); + gtk_widget_set_sensitive (GTK_WIDGET (IDE_GREETER_PERSPECTIVE (perspective)->titlebar), TRUE); + } we can do better that is: When calling ide_workbench_open_project_async, use user_data to transmit self (our perspective) then now, in ide_greeter_perspective_open_project_cb you can cast user_data to IdeGreeterPerspective *self and (and not before), after gtk_window_present, that is aftter closing the dialog, you can call the gtk_widget_set_sensitive
Created attachment 342459 [details] [review] greeter : Make greeter sensitive after an error Made fixes. IdeGreeterPerspective object is passed as user_data to ide_greeter_perspective_open_project_cb .In that function window is made sensitive again.
i have made your patch more robust so that we are sure the perspective will not vanish when the dialog is displayed.
Attachment 342459 [details] pushed as fd5258c - greeter : Make greeter sensitive after an error