[Glade-users] Help to port sound-juicer to GtkBuilder
- From: tristan.van.berkom at gmail.com (Tristan Van Berkom)
- Subject: [Glade-users] Help to port sound-juicer to GtkBuilder
- Date: Wed, 20 Jan 2010 07:07:49 -0500
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]