xfce_rc_delete_entry not working

Benedikt Meurer benedikt.meurer at unix-ag.uni-siegen.de
Wed Apr 19 18:24:01 CEST 2006


juha wrote:
> I use 
> 
> xfce_rc_simple_open() 
> 
>  like this:
> ...
> static void oc_write_rc_file(XfcePanelPlugin *plugin, Clock *clock)
> {
>     gchar  *file;
>     XfceRc *rc;
>     gchar   tmp[100];
> 
>     if (!(file = xfce_panel_plugin_save_location(plugin, TRUE)))
>         return;
> 
>     rc = xfce_rc_simple_open(file, FALSE);
>     g_free(file);
> 
>     if (!rc)
>         return;
> 
>     xfce_rc_write_bool_entry(rc, "fg_set", clock->fg_set);
>     if (clock->fg_set) {
>         sprintf(tmp, "%uR %uG %uB"
>                 , clock->fg.red, clock->fg.green, clock->fg.blue);
>         xfce_rc_write_entry(rc, "fg", tmp);
>     }
>     else {
>         *xfce_rc_delete_entry*(rc, "fg", TRUE);
>     }
> 
> 
>     xfce_rc_close(rc);
> }
> ...

I just checked it, and it does indeed work. See the attached example.
Can you try the example?

Benedikt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: delete.c
Type: text/x-csrc
Size: 255 bytes
Desc: not available
URL: <http://mail.xfce.org/pipermail/xfce4-dev/attachments/20060419/6f5d5390/attachment.c>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: delete.rc
URL: <http://mail.xfce.org/pipermail/xfce4-dev/attachments/20060419/6f5d5390/attachment.ksh>


More information about the Xfce4-dev mailing list