X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fmain.c;h=5d7c6a3591e306c84c19aab073ebb7d2dfa3c110;hb=4327370bd9e07150bdeea7df0416f87f0417b8ab;hp=a6ce43d8fb64510a8a14f9532b256fc72771cd81;hpb=46e463392aadbd388529558b6a5f771e686e80d6;p=melted_gui diff --git a/src/main.c b/src/main.c index a6ce43d..5d7c6a3 100644 --- a/src/main.c +++ b/src/main.c @@ -1,6 +1,6 @@ /* - * main.c -- GTK+ 2 omnplay - * Copyright (C) 2011 Maksym Veremeyenko + * main.c -- GTK+ 2 melted gui + * Copyright (C) 2012 Maksym Veremeyenko * * 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 @@ -31,7 +31,7 @@ #include #include "ui.h" -#include "omnplay.h" +#include "instance.h" #include "support.h" #ifdef _WIN32 @@ -62,7 +62,7 @@ char *strcasestr(char *haystack, char *needle) int main(int argc, char **argv) { char path[ 512 ], *buf; - omnplay_instance_t *app = NULL; + instance_t *app = NULL; #ifdef ENABLE_NLS bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR); @@ -79,21 +79,21 @@ int main(int argc, char **argv) #ifdef _WIN32 GetModuleFileName(NULL, path, sizeof(path)); // g_warning("GetModuleFileName [%s]\n", path); - if((buf = strstr(path, "\\bin\\omnplay.exe"))) + if((buf = strstr(path, "\\bin\\" PACKAGE ".exe"))) { buf[0] = 0; - strcat(path, "\\share\\omnplay\\pixmaps"); + strcat(path, "\\share\\" PACKAGE "\\pixmaps"); } #else // Linux hack to determine path of the executable readlink( "/proc/self/exe", path, sizeof(path)); g_warning ("path=(%s)\n", path); - if((buf = strstr(path, "/bin/omnplay"))) + if((buf = strstr(path, "/bin/" PACKAGE))) { buf[0] = 0; - strcat(path, "/share/omnplay/pixmaps"); + strcat(path, "/share/" PACKAGE "/pixmaps"); } - else if((buf = strstr(path, "/src/omnplay"))) + else if((buf = strstr(path, "/src/" PACKAGE))) { buf[0] = 0; strcat( path, "/pixmaps" ); @@ -105,18 +105,18 @@ int main(int argc, char **argv) add_pixmap_directory( path ); g_warning ("add_pixmap_directory(%s)\n", path); - app = omnplay_create(argc, argv); + app = instance_create(argc, argv); if(app->window) { gtk_widget_show (app->window); gdk_threads_enter(); - omnplay_init(app); + instance_init(app); gtk_main (); gdk_threads_leave(); }; - omnplay_destroy(app); + instance_destroy(app); return 0; }