GNOME Bugzilla – Bug 580209
Drop libglade and use GtkBuilder
Last modified: 2009-07-28 19:18:11 UTC
We should migrate from glade to GtkBuilder. I'm trying to cook a patch, but seems src/vinagre-bookmarks-ui.c (the file I started to work) have some indentation problems. Shall I use "2 space" or "tab 8"? The file have the two types...
Hi, Bruno, it should have tab 8. Anyway, I'd ask you to hold on a few days, once I'm in the middle of a huge change in vinagre. I don't know in advance if I'll touch the same files that you, that's why I'm asking a few days to you. Feel free to work on it though, we'll see if there will be conflicts. Thanks!
Ok, Jonh, just let me know when. A hug, my friend!
Created attachment 138569 [details] Diff file showing modifications on vinagre source
Hi, guys. I guess i've found something weird. After changing vinagre's source code in order to use GtkBuilder instead of Libglade, the compiler sends an error message like: vinagre-connection.h:27:30: error: libxml/xmlwriter.h: File not found (the compilation was successful before changing the source code) However, I haven't changed this file or anything else related with xmlwrite. I just searched for "glade" and made the appropriated modifications. I'd appreciate if someone could explain what's going on. I've attached a diff file generated by git with my modifications. Thanks. -- Leandro Mattioli
libxml/xmlwriter.h is in the package libxml2. vinagre's configure.ac does not mention vinagre's dependency on libxml2 so it must be added. This bug did not come up earlier because libglade depended on libxml2 already: http://git.gnome.org/cgit/libglade/tree/configure.in
As I said earlier, this is not the right time to do such modifications. I am rewriting vinagre so it will be based on plugins, and I'm touching a lot of files.
Ok. Thank you for the explanation. And sorry for the modifications in such an inappropriate moment. I haven't paid attention to John's posted message. Anyway, if I could help later, you can count on me. -- Leandro Mattioli
Ok guys, feel free to provide a patch now that I merged the plugin branch into master. (Bruno or Leandro). Remember to check the option 'This file is a patch' when uploading your patch. Please, mark all strings translatable. Also, make sure to test your patch. I'm using a lot the root parameter of glade_xml_new(), which AFAIK is not available on GtkBuilder. So, you'll might have to rename some UI components. Finally, I'd prefer get_ui_filename() instead of get_gtkbuilder_filename() :) (Use UI in favor of GTKBUILDER where is possible) Thanks.
Created attachment 139328 [details] [review] Modifications in order to use GtkBuilder instead of libglade I have tested the program and it's working. Just one remark... Consider the commands: git rm vinagre.glade git add vinagre.ui and then... git status Although the files WERE different, "git status" considered: renamed: data/vinagre.glade -> data/vinagre.ui Besides, it hasn't shown the differences in git diff (related to the new ui file)... Is this correct? Well, here's the way I've solved the problem: git mv vinagre.glade vinagre.ui (edit vinagre.ui contents replacing with the GtkBuilder format) I'm used to working with subversion. Is there something wrong in the commands I have executed? This is my first patch. If anything's wrong I'd appreciate your help.
Thanks, Leandro. I've committed your patch and modified it a little bit, take a look: http://git.gnome.org/cgit/vinagre/commit/?id=eca3756df8058aaa71fbebf76a1a7bff8df7a9bd