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 625248 - [enh] migrate to GtkBuilder
[enh] migrate to GtkBuilder
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: nm-applet
git master
Other All
: Normal normal
: ---
Assigned To: Dan Williams
Dan Williams
: 589500 (view as bug list)
Depends on:
Blocks: 572883
 
 
Reported: 2010-07-25 17:01 UTC by Pablo Castellano (IRC: pablog)
Modified: 2010-11-28 23:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
0001-Migrate-from-Glade-to-GtkBuilder.patch (757.24 KB, patch)
2010-08-07 00:53 UTC, Pablo Castellano (IRC: pablog)
none Details | Review
Migrate openvpn plugin to gtkbuilder (132.59 KB, patch)
2010-08-07 01:20 UTC, Pablo Castellano (IRC: pablog)
none Details | Review
Migrate openvpn plugin to gtkbuilder (215.46 KB, patch)
2010-08-07 02:20 UTC, Pablo Castellano (IRC: pablog)
none Details | Review
Migrate applet to gtkbuilder (757.34 KB, patch)
2010-08-07 14:38 UTC, Pablo Castellano (IRC: pablog)
none Details | Review

Description Pablo Castellano (IRC: pablog) 2010-07-25 17:01:40 UTC
This plugin is still using glade.
Comment 1 Dan Williams 2010-07-27 21:27:50 UTC
All of them are so far... we do need to convert.  Now that we've branched for 0.9, we can do this.
Comment 2 Pablo Castellano (IRC: pablog) 2010-07-27 22:11:44 UTC
I have finished a patch for it but unfortunately at the moment I cannot build NetworkManager because of bug 623952 and so, I have not tested it.

I get:
/home/pablo/opt/gnome2/lib/libgio-2.0.so: undefined reference to
`g_variant_new_bytestring'
/home/pablo/opt/gnome2/lib/libgio-2.0.so: undefined reference to
`g_variant_new_bytestring_array'
/home/pablo/opt/gnome2/lib/libgio-2.0.so: undefined reference to
`g_variant_get_bytestring'

any idea?
Comment 4 Dan Williams 2010-08-03 16:50:03 UTC
(In reply to comment #2)
> I have finished a patch for it but unfortunately at the moment I cannot build
> NetworkManager because of bug 623952 and so, I have not tested it.
> 
> I get:
> /home/pablo/opt/gnome2/lib/libgio-2.0.so: undefined reference to
> `g_variant_new_bytestring'
> /home/pablo/opt/gnome2/lib/libgio-2.0.so: undefined reference to
> `g_variant_new_bytestring_array'
> /home/pablo/opt/gnome2/lib/libgio-2.0.so: undefined reference to
> `g_variant_get_bytestring'
> 
> any idea?

These are glib issues; seems you have a  mismatched glib install or need to update the glib pkgconfig file to include whatever lib the GVariant stuff is in?  GVariant is pretty new and that's a core glib thing now, so this indicates a link error in glib and not in NM.
Comment 5 Dan Williams 2010-08-03 16:50:15 UTC
*** Bug 589500 has been marked as a duplicate of this bug. ***
Comment 6 Dan Williams 2010-08-03 16:50:53 UTC
Thanks for picking this up too!  It's something that's needed to happen for a while.
Comment 7 Pablo Castellano (IRC: pablog) 2010-08-07 00:53:10 UTC
Created attachment 167293 [details] [review]
0001-Migrate-from-Glade-to-GtkBuilder.patch

Here is a huge patch to migrate network-manager-applet to gtkbuilder.
I have tested it and everything seem to work fine :)

The only things I have doubts is about using gtk_widget_unparent() to solve some issues I found when trying to pack with gtk_container_add() a widget drawn and taken from an .ui file (which already has a parent).
According to the documentation it should only be called by widget implementations. 

Comments are welcome.
Comment 8 Pablo Castellano (IRC: pablog) 2010-08-07 01:04:43 UTC
Not less important: August 16th begins UI freeze
Comment 9 Pablo Castellano (IRC: pablog) 2010-08-07 01:20:08 UTC
Created attachment 167294 [details] [review]
Migrate openvpn plugin to gtkbuilder

This patch migrates the network-manager-openvpn to gtkbuilder.
Tested and it's OK for me.
Comment 10 Pablo Castellano (IRC: pablog) 2010-08-07 02:20:05 UTC
Created attachment 167295 [details] [review]
Migrate openvpn plugin to gtkbuilder

Forgot to add the new .ui file in previous patch
Comment 11 André Klapper 2010-08-07 08:56:22 UTC
(In reply to comment #8)
> Not less important: August 16th begins UI freeze

But only for modules that are included in GNOME. N-M is not.
Comment 12 Pablo Castellano (IRC: pablog) 2010-08-07 09:58:22 UTC
(In reply to comment #11)
> (In reply to comment #8)
> > Not less important: August 16th begins UI freeze
> 
> But only for modules that are included in GNOME. N-M is not.

Oh, that's true. Thanks for clarifying
Comment 13 Pablo Castellano (IRC: pablog) 2010-08-07 14:38:53 UTC
Created attachment 167321 [details] [review]
Migrate applet to gtkbuilder

Forgot to add another gtk_widget_unparent() in previous patch
Comment 14 Dan Williams 2010-11-24 05:15:49 UTC
Thanks again, hope to review and push these by the weekend.
Comment 15 Dan Williams 2010-11-28 22:16:48 UTC
nm-openvpn:

880e1d105babeac8777a30348f46a28a7a39c3b8 (master)
2ce3f5254d3e7bfe4cf5c87a7959ff928892f578 (0.8.x)

nm-applet:

32f66acbc06dfd645aa41f2bf14d197f414fd163 (master)
f706aaa4c36c21bd663e08707dc9412c1732f854 (0.8.x)

thanks again!
Comment 16 Pablo Castellano (IRC: pablog) 2010-11-28 23:54:35 UTC
Great!! :-D