Re: desktop.links entries - was Re: Advocacy report [part 2]
- From: Paul G Cooper <pgc maths warwick ac uk>
- To: Miguel de Icaza <miguel gnu org>
- cc: gnome-list gnome org
- Subject: Re: desktop.links entries - was Re: Advocacy report [part 2]
- Date: Mon, 1 Nov 1999 10:38:21 +0000 (GMT)
Sorry to be so clueless but gcc doesn't like it;
marx{progs}31% gcc set-icon.c -o set-icon `gnome-config --libs --cflags
gnome`
In file included from set-icon.c:1:
/usr/include/libgnome/gnome-metadata.h:31: syntax error before `typedef'
set-icon.c:3: syntax error before `void'
set-icon.c: In function `set_icon':
set-icon.c:5: warning: passing arg 2 of `gnome_metadata_set' makes pointer
from integer without a cast
set-icon.c:5: warning: passing arg 3 of `gnome_metadata_set' makes integer
from pointer without a cast
set-icon.c:5: too few arguments to function `gnome_metadata_set'
set-icon.c: In function `main':
set-icon.c:11: `stderr' undeclared (first use in this function)
set-icon.c:11: (Each undeclared identifier is reported only once
set-icon.c:11: for each function it appears in.)
set-icon.c:14: warning: passing arg 1 of `set_icon' makes pointer from
integer without a cast
set-icon.c:14: warning: passing arg 2 of `set_icon' makes pointer from
integer without a cast
Paul
On Fri, 29 Oct 1999, Miguel de Icaza wrote:
>
> > by the way `gmc --desktop-linksdir` points to /usr/lib/mc/desktop-scripts
> > on my rh6 plus october gnome system, however this directory doesn't exist
> > - so I mkdir this directory put the script in there and hey presto the
> > link is made when I select Recreate default icons. OK, so my question now
> > is - how do I give this link the floppy icon?
>
> Mhm, this is a bit harder :-)
>
> You have to make a little C program for now that will configure this:
>
> ----------------------------------------------------------------------
> #include <libgnome/gnome-metadata.h>
>
> void set_icon (char *filename, char *icon_path)
> {
> gnome_metadata_set (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]);
> }
> ----------------------------------------------------------------------
>
> And you compile it with:
>
> gcc set-icon.c -o set-icon `gnome-config --libs --cflags gnome`
>
>
> best wishes,
> Miguel.
>
>
> --
> FAQ: Frequently-Asked Questions at http://www.gnome.org/gnomefaq
> To unsubscribe: mail gnome-list-request@gnome.org with
> "unsubscribe" as the Subject.
>
-------------------------------------------------------
Paul Cooper | pgc@maths.warwick.ac.uk
Phd Research Student | 01203 523523 ext. 26325
Room 129 | www.maths.warwick.ac.uk/~pgc/
Mathematics Institute |
University of Warwick |
Coventry, CV5 7AL |
-------------------------------------------------------
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]