Re: desktop.links entries - was Re: Advocacy report [part 2]




Sorry to take so long to reply;

On 8 Nov 1999, Miguel de Icaza wrote:
> > and found *I think* I have to add "Icon" to the gnome_metadata_set call,
> > so the prog now looks like,
> 
> Strange, where did you read this?

Well I found the gnome_metadata_set call on developer.gnome.org and
realised I should be putting *something* in there but as to where I got
"Icon" from I don't know ;-) oops.

> To add a pointer to a file (which is the only one supported by gmc),
> you need to use the "icon-filename".

Ok, so now the prog looks like

---------------------------------------
#include <libgnome/libgnome.h>

void set_icon (char *filename, char *icon_path)
{
    gnome_metadata_set (filename, "icon-filename", strlen(icon_path) + 1, icon_path);
}

int main (int argc, char *argv[])
{
   if (argc != 3){
      fprintf (stderr, "Usage: set-icon filename icon-filename");
      exit (1);
   }
   set_icon (argv [1], argv [2]);
}
------------------------------------------

this compiles ok, runs ok, but doesn't change the icon.

marx{progs}8% ./set-icon $HOME/.gnome-desktop/floppy /usr/share/pixmaps/mc/i-floppy.png

Paul



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]