xmlSetProp checkbox/"Run in terminal" menueditor support
Jean-François Wauthy
pollux at xfce.org
Mon Mar 1 16:28:17 CET 2004
could you send me your patch, i'll take a look
Le lun 01/03/2004 à 13:08, Joshua Cummings a écrit :
> On Mon, 2004-03-01 at 04:46, Jean-François Wauthy wrote:
> > xmlSetProp takes a const xmlChar * as third argument and you send a
> > gboolean so casting is needed.
> > or you can do :
> >
> > <code>
> > gboolean in_terminal;
> >
> > in_terminal = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(checkbox));
> > if(in_terminal)
> > xmlSetProp(node, "term", "true");
> > </code>
>
> "term" doesn't even show up using this method.
> I tried:
>
> if(in_terminal == TRUE){
> xmlSetProp(node, "term", "yes");
> }
> else{
> xmlSetProp(node, "term", "no");
> }
>
> but that results in term="no" all the time.
> The following suggested by Danny does the same thing.
>
> gboolean in_terminal;
> in_terminal = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(checkbox));
> xmlSetProp(node, "term", in_terminal ? "yes" : "no");
>
> gtk_toggle_button_get_active is supposed to return TRUE if the checkbox
> is raised and FALSE otherwise. I just need this TRUE/FALSE status turned
> into a yes or no for term="".
>
> This part has become one big brick wall for me. I'm now just taking
> stabs in the dark based upon docs and other code. Sorry if I'm coming
> off as completely clueless, but this is really my first venture in to
> the whole libxml/checkbox mixture etc. and xfce code in general.
>
> As soon as I can get this sorted out I can do a cleanup and submit a
> patch.
--
Jean-François Wauthy <pollux at xfce.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Ceci est une partie de message num?riquement sign?e.
URL: <http://mail.xfce.org/pipermail/xfce4-dev/attachments/20040301/9f04d861/attachment.pgp>
More information about the Xfce4-dev
mailing list