xmlSetProp checkbox/"Run in terminal" menueditor support

Danny Milosavljevic danny.milo at gmx.net
Sun Feb 29 18:45:08 CET 2004


hi,

Am Sun, den 29.02.2004 schrieb Joshua Cummings um 18:16:
> 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)
> 
> 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

ehh... like this?

gboolean in_terminal;
in_terminal = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(checkbox));
xmlSetProp(node, "term", in_terminal ? "yes" : "no");
?

or do you want to read the property from xml, rather ?

> 
> 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?
> 
> It's 4am and I've been working on this for hours, so I hope I've made
> sense.

eeek O_o  sleeep ;)

cheers,
   Danny

-- 
www.keyserver.net Key ID A334AEA6
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
URL: <http://mail.xfce.org/pipermail/xfce4-dev/attachments/20040229/92e30fe4/attachment.pgp>


More information about the Xfce4-dev mailing list