xmlSetProp checkbox/"Run in terminal" menueditor support
Jean-François Wauthy
pollux at xfce.org
Sun Feb 29 18:46:17 CET 2004
Le dim 29/02/2004 à 18:16, Joshua Cummings a écrit :
> I've added support for Run in terminal to the menueditor add menu dialog
> etc. but I'm stuck on one last thing. (Posting this to -dev since I
> couldn't find info elsewhere and it is xfce related after all)
>
finally you found, i'm the author of the menueditor that is now included
in xfdesktop
> The problem:
>
> xmlSetProp(node, "term", in_terminal); adds "term" to the node, but it
> doesn't read in_terminal (a gboolean), which is
> gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(checkbox));
>
> Make error (builds and runs fine):
> add_dialog.c:284: warning: passing arg 3 of `xmlSetProp' makes pointer
> from integer without a cast
>
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>
>
> All I need to do is get the status of the checkbox so it can be decided
> whether term is yes or no.
> This part is basically all I need to figure out and I'm done.
> Is there a certain variable type that I should be using or a different
> xml function?
>
send me your patch when it's done
> It's 4am and I've been working on this for hours, so I hope I've made
> sense.
--
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/20040229/9e4d429f/attachment.pgp>
More information about the Xfce4-dev
mailing list