|
@@ -30,9 +30,9 @@ |
|
|
|
|
|
|
|
|
#include <sys/stat.h> |
|
|
#include <sys/stat.h> |
|
|
GUI::ui_handle_t gui = 0; |
|
|
GUI::ui_handle_t gui = 0; |
|
|
|
|
|
const char *embedId = NULL; |
|
|
#if USE_NSM |
|
|
#if USE_NSM |
|
|
NSM_Client *nsm = NULL; |
|
|
NSM_Client *nsm = NULL; |
|
|
const char *embedId = NULL; |
|
|
|
|
|
#endif |
|
|
#endif |
|
|
lo_server server; |
|
|
lo_server server; |
|
|
std::string sendtourl; |
|
|
std::string sendtourl; |
|
@@ -193,21 +193,24 @@ ui_handle_t GUI::createUi(Fl_Osc_Interface *osc, void *exit) |
|
|
|
|
|
|
|
|
ui = new MasterUI((int*)exit, osc); |
|
|
ui = new MasterUI((int*)exit, osc); |
|
|
|
|
|
|
|
|
#ifdef NTK_GUI |
|
|
|
|
|
if (embedId != NULL) |
|
|
if (embedId != NULL) |
|
|
{ |
|
|
{ |
|
|
if (long long winId = atoll(embedId)) |
|
|
if (long long winId = atoll(embedId)) |
|
|
{ |
|
|
{ |
|
|
// running embed as plugin |
|
|
|
|
|
|
|
|
// running as plugin |
|
|
isPlugin = true; |
|
|
isPlugin = true; |
|
|
MasterUI::menu_mastermenu[11].hide(); // file -> nio settings |
|
|
MasterUI::menu_mastermenu[11].hide(); // file -> nio settings |
|
|
MasterUI::menu_mastermenu[13].hide(); // file -> exit |
|
|
|
|
|
MasterUI::menu_mastermenu[26].deactivate(); // misc -> switch interface mode |
|
|
MasterUI::menu_mastermenu[26].deactivate(); // misc -> switch interface mode |
|
|
fl_embed(ui->masterwindow, winId); |
|
|
|
|
|
|
|
|
#ifdef NTK_GUI |
|
|
|
|
|
if (winId != 1) |
|
|
|
|
|
{ |
|
|
|
|
|
MasterUI::menu_mastermenu[13].hide(); // file -> exit |
|
|
|
|
|
fl_embed(ui->masterwindow, winId); |
|
|
|
|
|
} |
|
|
|
|
|
#endif |
|
|
ui->masterwindow->show(); |
|
|
ui->masterwindow->show(); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
return (void*) ui; |
|
|
return (void*) ui; |
|
|
} |
|
|
} |
|
@@ -586,6 +589,7 @@ const char *help_message = |
|
|
int main(int argc, char *argv[]) |
|
|
int main(int argc, char *argv[]) |
|
|
{ |
|
|
{ |
|
|
const char *uri = NULL; |
|
|
const char *uri = NULL; |
|
|
|
|
|
const char *title = NULL; |
|
|
bool help = false; |
|
|
bool help = false; |
|
|
bool no_uri = false; |
|
|
bool no_uri = false; |
|
|
for(int i=1; i<argc; ++i) { |
|
|
for(int i=1; i<argc; ++i) { |
|
@@ -593,10 +597,10 @@ int main(int argc, char *argv[]) |
|
|
help = true; |
|
|
help = true; |
|
|
else if(!strcmp("--no-uri", argv[i])) |
|
|
else if(!strcmp("--no-uri", argv[i])) |
|
|
no_uri = true; |
|
|
no_uri = true; |
|
|
#if USE_NSM |
|
|
|
|
|
else if(!strcmp("--embed", argv[i])) |
|
|
else if(!strcmp("--embed", argv[i])) |
|
|
embedId = argv[++i]; |
|
|
embedId = argv[++i]; |
|
|
#endif |
|
|
|
|
|
|
|
|
else if(!strcmp("--title", argv[i])) |
|
|
|
|
|
title = argv[++i]; |
|
|
else |
|
|
else |
|
|
uri = argv[i]; |
|
|
uri = argv[i]; |
|
|
} |
|
|
} |
|
@@ -619,6 +623,9 @@ int main(int argc, char *argv[]) |
|
|
|
|
|
|
|
|
gui = GUI::createUi(new UI_Interface(), &Pexitprogram); |
|
|
gui = GUI::createUi(new UI_Interface(), &Pexitprogram); |
|
|
|
|
|
|
|
|
|
|
|
if (title != NULL) |
|
|
|
|
|
GUI::raiseUi(gui, "/ui/title", "s", title); |
|
|
|
|
|
|
|
|
GUI::raiseUi(gui, "/show", "i", 1); |
|
|
GUI::raiseUi(gui, "/show", "i", 1); |
|
|
while(Pexitprogram == 0) { |
|
|
while(Pexitprogram == 0) { |
|
|
GUI::tickUi(gui); |
|
|
GUI::tickUi(gui); |
|
|