Changeset 4039 in orxonox.OLD for orxonox/trunk/src/lib/gui
- Timestamp:
- May 4, 2005, 1:22:27 PM (20 years ago)
- Location:
- orxonox/trunk/src/lib/gui/gui
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/gui/gui/Makefile.am
r4024 r4039 24 24 25 25 bin_PROGRAMS=gui 26 gui_SOURCES=orxonox_gui.cc \ 26 gui_SOURCES=orxonox_gui_main.cc \ 27 orxonox_gui.cc \ 27 28 orxonox_gui_gtk.cc \ 28 29 orxonox_gui_element.cc \ -
orxonox/trunk/src/lib/gui/gui/Makefile.in
r4024 r4039 53 53 binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) 54 54 PROGRAMS = $(bin_PROGRAMS) 55 am_gui_OBJECTS = orxonox_gui.$(OBJEXT) orxonox_gui_gtk.$(OBJEXT) \ 56 orxonox_gui_element.$(OBJEXT) orxonox_gui_video.$(OBJEXT) \ 57 orxonox_gui_audio.$(OBJEXT) orxonox_gui_exec.$(OBJEXT) \ 58 orxonox_gui_flags.$(OBJEXT) orxonox_gui_banner.$(OBJEXT) \ 59 orxonox_gui_keys.$(OBJEXT) orxonox_gui_update.$(OBJEXT) 55 am_gui_OBJECTS = orxonox_gui_main.$(OBJEXT) orxonox_gui.$(OBJEXT) \ 56 orxonox_gui_gtk.$(OBJEXT) orxonox_gui_element.$(OBJEXT) \ 57 orxonox_gui_video.$(OBJEXT) orxonox_gui_audio.$(OBJEXT) \ 58 orxonox_gui_exec.$(OBJEXT) orxonox_gui_flags.$(OBJEXT) \ 59 orxonox_gui_banner.$(OBJEXT) orxonox_gui_keys.$(OBJEXT) \ 60 orxonox_gui_update.$(OBJEXT) 60 61 gui_OBJECTS = $(am_gui_OBJECTS) 61 62 gui_LDADD = $(LDADD) … … 71 72 @AMDEP_TRUE@ ./$(DEPDIR)/orxonox_gui_gtk.Po \ 72 73 @AMDEP_TRUE@ ./$(DEPDIR)/orxonox_gui_keys.Po \ 74 @AMDEP_TRUE@ ./$(DEPDIR)/orxonox_gui_main.Po \ 73 75 @AMDEP_TRUE@ ./$(DEPDIR)/orxonox_gui_update.Po \ 74 76 @AMDEP_TRUE@ ./$(DEPDIR)/orxonox_gui_video.Po … … 198 200 #AM_LDFLAGS=$(GTK2_LIBS) $(GTHREAD_LIBS) 199 201 AM_LDFLAGS = $(GTK2_LIBS) $(GTHREAD_LIBS) $(CURL_LIBS) 200 gui_SOURCES = orxonox_gui.cc \ 202 gui_SOURCES = orxonox_gui_main.cc \ 203 orxonox_gui.cc \ 201 204 orxonox_gui_gtk.cc \ 202 205 orxonox_gui_element.cc \ … … 304 307 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_gui_gtk.Po@am__quote@ 305 308 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_gui_keys.Po@am__quote@ 309 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_gui_main.Po@am__quote@ 306 310 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_gui_update.Po@am__quote@ 307 311 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_gui_video.Po@am__quote@ -
orxonox/trunk/src/lib/gui/gui/orxonox_gui.cc
r4027 r4039 44 44 OrxonoxGuiUpdate* update = NULL; 45 45 int verbose = 4; 46 47 int main(int argc, char *argv[])48 {49 OrxonoxGui* orxonoxgui = new OrxonoxGui(argc, argv);50 return 0;51 }52 46 53 47 /* ORXONOXGUI */ -
orxonox/trunk/src/lib/gui/gui/orxonox_gui_exec.cc
r4036 r4039 346 346 } 347 347 348 #ifdef HAVE_GTK2349 348 /** 350 349 \brief Starts ORXONOX.(not really implemented yet, but the function is there.\n … … 354 353 This is a Signal and can be executed through Widget::signal_connect 355 354 */ 355 #ifdef HAVE_GTK2 356 356 int OrxonoxGuiExec::startOrxonox(GtkWidget* widget, void* data) 357 #else /* HAVE_GTK2 */ 358 int OrxonoxGuiExec::startOrxonox(void* widget, void* data) 359 #endif /* HAVE_GTK2 */ 357 360 { 358 361 OrxonoxGuiExec* exec =(OrxonoxGuiExec*)data; … … 360 363 exec->writeToFile(Window::mainWindow); 361 364 PRINT(3)("Starting Orxonox\n"); 362 system("./orxonox"); //!< \todo fix this. should execute orxonox for real(coded not over the shell) 365 system(progExecutable); //!< \todo fix this. should execute orxonox for real(coded not over the shell) 366 gtk_main_quit(); 363 367 } 364 368 … … 370 374 This is a Signal and can be executed through Widget::signal_connect 371 375 */ 376 #ifdef HAVE_GTK2 372 377 int OrxonoxGuiExec::quitOrxonox(GtkWidget* widget, void* data) 378 #else /* HAVE_GTK2 */ 379 int OrxonoxGuiExec::quitOrxonox(void* widget, void* data) 380 #endif /* HAVE_GTK2 */ 373 381 { 374 382 OrxonoxGuiExec* exec =(OrxonoxGuiExec*)data; … … 378 386 gtk_main_quit(); 379 387 } 380 #else /* HAVE_GTK2 */381 /**382 \brief Starts ORXONOX.(not really implemented yet, but the function is there.\n383 \param widget the widget that executed the start command384 \param data additional data385 */386 int OrxonoxGuiExec::startOrxonox(void* widget, void* data)387 {388 OrxonoxGuiExec* exec =(OrxonoxGuiExec*)data;389 PRINT(3)("Starting Orxonox\n");390 if(exec->shouldsave())391 exec->writeToFile(Window::mainWindow);392 system("./orxonox"); //!< \todo fix this. should execute orxonox for real(coded not over the shell)393 }394 /**395 \brief Quits ORXONOX.396 \param widget the widget that executed the Quit command397 \param data additional data398 399 This is a Signal and can be executed through Widget::signal_connect400 */401 int OrxonoxGuiExec::quitOrxonox(void* widget, void* data)402 {403 OrxonoxGuiExec* exec =(OrxonoxGuiExec*)data;404 PRINT(3)("Quiting Orxonox");405 if(exec->shouldsave())406 exec->writeToFile(Window::mainWindow);407 }408 409 #endif /* HAVE_GTK2 */ -
orxonox/trunk/src/lib/gui/gui/orxonox_gui_flags.cc
r4024 r4039 63 63 64 64 this->flagsLabel->ereaseText(); 65 this->flagsLabel->appendText( "orxonox");65 this->flagsLabel->appendText(progExecutable); 66 66 widget->walkThrough(OrxonoxGuiFlags::flagsText, &flagInfo, 0); 67 67 // flagsLabel->setTitle(flagText); -
orxonox/trunk/src/lib/gui/gui/orxonox_gui_gtk.cc
r4035 r4039 36 36 extern Window* orxonoxGUI; 37 37 extern OrxonoxGuiFlags* flags; 38 char* guiExecutable; 39 char* progExecutable; 38 40 39 41 /** … … 44 46 bool initGUI(int argc, char *argv[]) 45 47 { 48 guiExecutable = new char[strlen(argv[0])+1]; 49 strcpy(guiExecutable, argv[0]); 50 progExecutable = new char[strlen(guiExecutable)-2]; 51 strncpy(progExecutable, guiExecutable, strlen(guiExecutable)-3); 52 progExecutable[strlen(progExecutable)]= '\0'; 53 46 54 #ifdef HAVE_GTK2 47 55 #ifdef HAVE_GTHREAD -
orxonox/trunk/src/lib/gui/gui/orxonox_gui_gtk.h
r4030 r4039 30 30 #endif /* HAVE_GTK2 */ 31 31 32 extern char* guiExecutable; 33 extern char* progExecutable; 34 32 35 bool initGUI(int argc, char* argv[]); 33 36 bool mainloopGUI(void);
Note: See TracChangeset
for help on using the changeset viewer.