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 580209 - Drop libglade and use GtkBuilder
Drop libglade and use GtkBuilder
Status: RESOLVED FIXED
Product: vinagre
Classification: Applications
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: vinagre-maint
vinagre-maint
Depends on:
Blocks: 498402 572883
 
 
Reported: 2009-04-25 11:05 UTC by Bruno Boaventura
Modified: 2009-07-28 19:18 UTC
See Also:
GNOME target: ---
GNOME version: 2.27/2.28


Attachments
Diff file showing modifications on vinagre source (15.48 KB, text/x-patch)
2009-07-17 03:57 UTC, Leandro Resende Mattioli
  Details
Modifications in order to use GtkBuilder instead of libglade (126.32 KB, patch)
2009-07-27 21:36 UTC, Leandro Resende Mattioli
committed Details | Review

Description Bruno Boaventura 2009-04-25 11:05:22 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...
Comment 1 Jonh Wendell 2009-04-25 11:13:15 UTC
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!
Comment 2 Bruno Boaventura 2009-04-25 11:32:20 UTC
Ok, Jonh, just let me know when. A hug, my friend!
Comment 3 Leandro Resende Mattioli 2009-07-17 03:57:43 UTC
Created attachment 138569 [details]
Diff file showing modifications on vinagre source
Comment 4 Leandro Resende Mattioli 2009-07-17 04:07:08 UTC
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
Comment 5 André Klapper 2009-07-17 09:45:57 UTC
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
Comment 6 Jonh Wendell 2009-07-17 10:58:32 UTC
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.
Comment 7 Leandro Resende Mattioli 2009-07-17 16:33:29 UTC
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
Comment 8 Jonh Wendell 2009-07-27 18:28:47 UTC
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.
Comment 9 Leandro Resende Mattioli 2009-07-27 21:36:44 UTC
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.
Comment 10 Jonh Wendell 2009-07-28 19:18:11 UTC
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