[Glade-users] Help to port sound-juicer to GtkBuilder

Tristan Van Berkom tristan.van.berkom at gmail.com
Wed Jan 20 07:07:49 EST 2010


2010/1/19 Javier Jardón <jjardon at gnome.org>:
> Hello,
>
> could someone help me port a this GNOME module to GtkBuilder?
> It's the latest GNOME module that still uses libglade! :)
> Here the bug with the partial patch: [1]
>
> I need a custom widget, this is the libglade code:
>
> <widget class="Custom" id="audio_profile">
>  <property name="visible">True</property>
>  <property name="can_focus">True</property>
>  <property name="creation_function">gm_audio_profile_choose_new</property>
>  <signal name="changed" handler="prefs_profile_changed"/>
> </widget>
>
> You can see the complete file here: [2]
> With the help of pachi in the IRC, I've replaced it with:
>
> <object class="GMAudioProfileEdit" id="audio_profile">
>  <property name="visible">True</property>
>  <property name="can_focus">True</property>
>  <signal name="changed" handler="prefs_profile_changed"/>
> </object>
>
> GMAudioProfileEdit is defined in gnome-media package: [3]

I've recently noticed a bug in the way gtkbuilder is going to
go about translating the name (I have to double check that,
but I already wrote some alternative code that does it better
than gtkbuilder or glade does).

You might want to check that its getting translated to
gm_audio_profile_edit_get_type() by gtkbuilder...
(it might come out g_m_audio_profile_edit_get_type() instead)

>
> But still doesn't work, the program crash and I get the same errors
> pointed in the bug comment [4]
> (Seems that GTK_WIDGET(gtk_builder_get_object(ui, "audio_profile")) doesnt work)
>
> What I am doing wrong?

Not sure, I assume Glade loads and saves the properties correctly already ?
i.e. it finds the library "libgnome-media-profiles.so" ?

You should also add a glade-widget-group to your catalog, so that your
widgets will show up in the palette.

Cheers,
       -Tristan


>
> [1] https://bugzilla.gnome.org/show_bug.cgi?id=578046#c11
> [2] http://git.gnome.org/browse/sound-juicer/tree/data/sound-juicer.glade#n1072
> [3] http://git.gnome.org/browse/gnome-media/tree/profiles/glade/gnome-media-profiles.xml
> [4] https://bugzilla.gnome.org/show_bug.cgi?id=578046#c12
>
> --
> Javier Jardón Cabezas
> _______________________________________________
> Glade-users maillist  -  Glade-users at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/glade-users
>


More information about the Glade-users mailing list