path for icon



Dear friends,
in my GTK(3) app, I am using icons as
 gtk_window_set_icon(GTK_WINDOW(window),
create_pixbuf("images/icon.svg"));
or 
GtkWidget *ast4im = gtk_image_new_from_file ("images/mkb3.png");

The problem is, when I am running the app away from the source
directory, those images are broken, obviously due to the fact that the
path is missing. One solution is to put absolute path, but then the code
will not be portable.

Is there any better way of doing it?




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