GNOME Bugzilla – Bug 542412
GSoc: Glade3 integration
Last modified: 2009-02-02 08:31:31 UTC
I'd like to share my work with you and listen to your feedback. The patch needs some patches for glade3, for now at least: http://bugzilla.gnome.org/attachment.cgi?id=113326 http://bugzilla.gnome.org/attachment.cgi?id=113585 http://bugzilla.gnome.org/attachment.cgi?id=113700 http://bugzilla.gnome.org/attachment.cgi?id=114297 http://bugzilla.gnome.org/attachment.cgi?id=114342 http://bugzilla.gnome.org/attachment.cgi?id=114341 I can give one big patch for all my changes that are not in glade3 svn yet.
Created attachment 114343 [details] [review] Glade3 integration
Thanks a lot especially for all the things you fixed in glade. I doubt that I can review it this week (as I am in Istanbul and there is too much free beer...) but I will have a look at it this week. It would be nice if you could add a summary of the new features to the bug so I am sure I do not miss anything. Also please tell me if there is anything else to implement or if this is more or less feature complete.
First of all, I implemented a mechanism for designer and editor association. Its data is saved to xml file for every project (currently the file is $PROJECT_ROOT_URI/.anjuta/associations and some preferences are saved to that location too). For now it allows to completely perform association between one glade file and one editor file and partially for more then one editor file by marking last editor as having higher priority. You can create an association by item in mein menu and manage association by special dialog. Currently it can only editor auto-posion type and delete associoation. Preview and designer mode. They have influence only on design layout. Unlike default glade3 mode, in designer mode all click are handled by designer. Double click is used to create a handler for default signal e.g. "click" for GtkButton. In preview mode all click are delivered directly to widgets, selection is disabled and placeholders are hidden. All resources that are added to glade3 can be automatically added to appointed target. Signal stub can be added at "automatic position" by double click on widget, by double click on signal name in signal editor, by editing handler in signal editor and by choosing corresponding item in main menu. For all ways but the last one stub is created only when corresponding flag in main menu is checked. Automatic position means that the position is searched by searching associated editor and exact position may be the cursor position, after and before a special text mark, end of file. Currently special mark is only "/* widget_name callbacks */" for "begin" and "/* end of widget_name callbacks */" for "end". widget_name means toplevel widget name and may be ommited. Of course, you can add stub manually by choosing the signal in signal editor and pressing on corresponding item in source code editor's context menu. Also, handler stub isn't created automatically if it can be found by symbol manager, but I couldn't manage to make it work with anjuta svn trunk. Even when a symbol is found I get a strange file path. For defined handlers double click on the signal name in signal editor and double click on widget in designer should lead to jump to that handler, but it doesn't because of mentioned problem. There is almost no preferences, as you can find. But there is one useful item in glade menu called "Glade preferences". For now glade plugin can be deactivated without errors in any way... I hope.
(In reply to comment #1) > Created an attachment (id=114343) [edit] > Glade3 integration > * The patch does not apply cleanly, some #defines are missing (GLADE_WIDGET_EVENT_STOP_EMISSION and GLADE_WIDGET_EVENT_RETURN_TRUE) which I filled with random values. * The anjuta-glade-associations.glade file is not installed correctly. Look at the Makefile.am of other plugins to install it. * UI: The default signal name checkboxes and the preferences should go into the anjuta preferences dialog. The "Check deprecations" feature should have its own menu item. "Auto add resources" should also go into preferences. * The association stuff is a bit confusing. I would like to have a dialog showing all editors where I can choose the associations instead of choosing a random editor. It should also catch the case that one editor has multiple associations with the same file. * I couldn't achive to add a signal handler. Could be because of the missing #defines but it simply didn't work on double-click. * What's the preview mode?
(In reply to comment #4) > * The patch does not apply cleanly, some #defines are missing > (GLADE_WIDGET_EVENT_STOP_EMISSION and GLADE_WIDGET_EVENT_RETURN_TRUE) which I > filled with random values. They are not missing, take a look at gladeui/glade-project.h in http://bugzilla.gnome.org/attachment.cgi?id=114297. > * The association stuff is a bit confusing. I would like to have a dialog > showing all editors where I can choose the associations instead of choosing a > random editor. It should also catch the case that one editor has multiple > associations with the same file. See anjuta mailing list. > * What's the preview mode? Hidden placeholders and clickable widgets in designer. I hope to have more in future.
Created attachment 115135 [details] [review] Glade3 integration Second Try. Preferences page, changed associations dialog, some minor changes (try to create stub once more). Check deprecations menu item is implemented but disabled because it requires changing glade_project_verify function type to extern in glade3 core.
Sorry that reviewing takes so long currently - I am quite busy with non open-source things currently. The patch does not apply cleanly to anjuta-trunk (most likely because of unrelated other changes). Could you please fix this and repost the patch here. Thanks!
(In reply to comment #7) > The patch does not apply cleanly to anjuta-trunk (most likely because of > unrelated other changes). Could you please fix this and repost the patch here. The patch applies cleanly for me with svn rev. 4100. Anyway I'm going to post a new patch.
Created attachment 115634 [details] [review] Glade3 integration #3 Preferences page, improvements of associations usage and associations dialog. Hint: you should have an editor of language "C" or "C++", otherwise stubs will not be inserted.
I am very short in time atm so sorry if this review is not very in-depth yet: - The "Glade Preferences" stuff should go into the preference page - The associations dialog does not work for me though probably some patching issue... - The rest of the UI looks quite good - I would really like to get rid of the editor-indentation file because they contain two much duplicate code. Wouldn't it be enough to insert the stubs using the appropriate tab width/space and let the user do the final indentation (if there is any more needed)? Thanks esspecially for all the patches you filed against Glade/Gtk+, I hope the maintainers will take care of them. And of course the patches for several Anjuta bugs. When you fixed the issues above and think that it is mostly working, you should extend the anjuta manual to cover the glade plugin. For the UI it would wish to sometimes have a bit more explizit things (like a dialog that stubs are not inserted because this is not a C/C++ file).
Created attachment 116841 [details] [review] Glade3 integration #4 A new detached design area, a couple of message dialogs for errors/warnings. The role of "Glade Preferences" is still arguble, so I simply left it as-is and renamed to "Versioning" to avoid ambiguity. Now I'm working on Anjuta manual and will give it as a separated patch very soon.
Created attachment 116895 [details] [review] Manual
First thanks for all your work Pavel, I hope you will continue to improve this after GSoc. As we are already in feature freeze and not all patches have been comitted to glade yet it won't go into trunk before 2.6. Anyway, I will try to merge this as soon as we branch for GNOME 2.26. If you have improvement before, just post additional patches here.
(In reply to comment #0) > I'd like to share my work with you and listen to your feedback. The patch needs > some patches for glade3, for now at least: > http://bugzilla.gnome.org/attachment.cgi?id=113326 > http://bugzilla.gnome.org/attachment.cgi?id=113585 > http://bugzilla.gnome.org/attachment.cgi?id=113700 > http://bugzilla.gnome.org/attachment.cgi?id=114297 > http://bugzilla.gnome.org/attachment.cgi?id=114342 > http://bugzilla.gnome.org/attachment.cgi?id=114341 > BTW, in which bug are these attachments defined?
Those attachments that haven't been applied yet are in bugs 540691, 542337, 542340 (see what this bugs depends on).
(In reply to comment #13 by jhs) > I will try to merge this as soon as we branch for GNOME 2.26. As Anjuta has been branched, can this please get in before we're under freeze again?
Andre, this patch depends on three glade3 bugs. If those patches don't get in we cannot merge it.
Pavel, could you reply to the comments Tristan gave on your patches (and poke him where he did not reply? Thanks
Created attachment 126887 [details] [review] Glade3 integration #5 Most of the difference from the previous patch concern the three glade patches. There's no checkbox "preview mode" in the main menu anymore and all clicks on designer's widget don't reach widget until some key is kept pressed (currently Mod4 (super or windows) key is hardcoded for that). That's why I've marked the manual as obsolete. Default signals are hardcoded, though it's very easy to load them from some file.
Thanks a lot for updating the patches. If have committed them to svn trunk now. Could you please also update the manual? Because though it's now better than before, the workflow is not completely obvious.
Created attachment 127728 [details] [review] Updated manual
Created attachment 127733 [details] [review] Small bugfixes for preference dialog I forgot to mention that the new version of glade plugin can be build with an old version of glade by removing definitions of GLADE_LAYOUT_WIDGET_EVENTS and GLADE_SIGNAL_EDITOR_EXT from plugins/glade/plugin.h. Descriptions of changes in the patch: - signals are disconnected on closing without reconnecting, so I removed the disconnection. - small fixes of warnings.
Thanks! I am closing this bug now!
I guess this file was missed: manuals/anjuta-manual/C/glade.xml.
Yes, sorry about that. The file has been added now.