X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fmain.c;h=0b775f49e50ead8cf723c07973af12636c2d1619;hb=d46fa892381df244e07f05949d033ace6707f8fd;hp=e5faa96df63fe8624795651b54f51cbb6f13ca91;hpb=4c1dc967fd477540e82566fff8d60e1c67ff3ca1;p=rugen diff --git a/src/main.c b/src/main.c index e5faa96..0b775f4 100644 --- a/src/main.c +++ b/src/main.c @@ -1,6 +1,7 @@ /* * main.c -- GTK+ 2 dv1394d client demo * Copyright (C) 2002-2003 Charles Yates + * Copyright (C) 2010 Dan Dennedy * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -48,13 +49,20 @@ int main( int argc, char *argv[] ) gtk_init( &argc, &argv ); // Linux hack to determine path of the executable + memset(path, 0, sizeof(path)); readlink( "/proc/self/exe", path, 512 ); - if ( strstr( path, "/bin/fireswamp" ) ) + if ( strstr( path, "/bin/rugen" ) ) { - ( *strstr( path, "/bin/fireswamp" ) ) = '\0'; - strcat( path, "/share/fireswamp/pixmaps" ); + ( *strstr( path, "/bin/rugen" ) ) = '\0'; + strcat( path, "/share/rugen/pixmaps" ); add_pixmap_directory( path ); } + else if ( strstr( path, "/src/rugen" ) ) + { + ( *strstr( path, "/src/rugen" ) ) = '\0'; + strcat( path, "/pixmaps" ); + add_pixmap_directory( path ); + } else { add_pixmap_directory( PACKAGE_DATA_DIR "/" PACKAGE "/pixmaps" );