libglade -> GtkBuilder porting

Brian J. Tarricone brian at tarricone.org
Mon Oct 5 05:57:17 CEST 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi all,

I noticed a little gotcha when porting xfdesktop's settings dialog to
GtkBuilder.  I used the gtk-builder-convert script on the .glade file,
and it dropped the GtkDialog response-ids for the action buttons in the
dialog.  I think that's because we're using XfceTitledDialog, so the
script doesn't know to keep the response-id properties.

To fix it manually afterward, you can open the generated xml file, and
scroll to the bottom.  Inside the <object> element for the
XfceTitledDialog, but after everything else in it, add something like:

<action-widgets>
  <action-widget response="-11">button2</action-widget>
  <action-widget response="-3">button1</action-widget>
</action-widgets>

- -11 is GTK_RESPONSE_HELP, and -3 is GTK_RESPONSE_ACCEPT.  The "button1"
and "button2" correspond to the object names in the gtkbuilder file.

Hope this is useful so others don't have to track this problem down :-P

	-brian
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (GNU/Linux)

iEYEARECAAYFAkrJbp0ACgkQ6XyW6VEeAnsFZwCfdzcHYVQEGSLorAQzUFIFtdBG
uBUAn2hrSMf9ih093+rc2+OnYXlME8WC
=hlG7
-----END PGP SIGNATURE-----



More information about the Xfce4-dev mailing list