Changeset 3300 in orxonox.OLD for orxonox/branches/updater/src/gui/orxonox_gui_exec.cc
- Timestamp:
- Dec 27, 2004, 4:14:47 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/updater/src/gui/orxonox_gui_exec.cc
r3297 r3300 27 27 #include <iostream> 28 28 #include <string> 29 30 HashTable* orxonoxFlagHash; 29 31 30 32 /** … … 42 44 start = new Button ("Start"); 43 45 #ifdef HAVE_GTK2 44 start->connectSignal ("clicked", startOrxonox);46 start->connectSignal ("clicked", this, startOrxonox); 45 47 #endif /* HAVE_GTK2 */ 46 48 execBox->fill (start); … … 59 61 quit = new Button ("Quit"); 60 62 #ifdef HAVE_GTK2 61 quit->connectSignal ("clicked", orxonoxGUI->orxonox_gui_quit); 63 quit->connectSignal ("clicked", this, OrxonoxGuiExec::quitOrxonox); 64 orxonoxGUI->connectSignal ("destroy", this, OrxonoxGuiExec::quitOrxonox); 65 //! orxonoxGUI->connectSignal ("delete_event", this, OrxonoxGuiExec::quitOrxonox); \todo fix this to work. 62 66 #endif /* HAVE_GTK2 */ 63 67 execBox->fill (quit); … … 294 298 /** 295 299 \brief Starts ORXONOX. (not really implemented yet, but the function is there.\n 296 This is a Signal and can be executed through Widget::signal_connect297 300 \param widget the widget that executed the start command 298 301 \param data additional data 299 */ 300 int OrxonoxGuiExec::startOrxonox (GtkWidget* widget, Widget* data) 301 { 302 303 This is a Signal and can be executed through Widget::signal_connect 304 */ 305 int OrxonoxGuiExec::startOrxonox (GtkWidget* widget, void* data) 306 { 307 OrxonoxGuiExec* exec = (OrxonoxGuiExec*)data; 308 if (exec->shouldsave()) 309 exec->writeToFile (Window::mainWindow); 302 310 cout << "Starting Orxonox" <<endl; 303 } 304 #else /* HAVE_GTK2 */ 311 gtk_main_quit(); 312 system("cd ..;./orxonox"); //!< \todo fix this. should execute orxonox for real (coded not over the shell) 313 } 314 305 315 /** 306 316 \brief Starts ORXONOX. (not really implemented yet, but the function is there.\n 307 This is a Signal and can be executed through Widget::signal_connect308 317 \param widget the widget that executed the start command 309 318 \param data additional data 310 */ 311 int OrxonoxGuiExec::startOrxonox (void* widget, Widget* data) 312 { 313 cout << "Starting Orxonox" <<endl; 319 320 This is a Signal and can be executed through Widget::signal_connect 321 */ 322 int OrxonoxGuiExec::quitOrxonox (GtkWidget* widget, void* data) 323 { 324 OrxonoxGuiExec* exec = (OrxonoxGuiExec*)data; 325 PRINT(3)( "Quitting Orxonox %p\n", exec); 326 if (exec->shouldsave()) 327 exec->writeToFile (Window::mainWindow); 328 gtk_main_quit(); 329 } 330 #else /* HAVE_GTK2 */ 331 /** 332 \brief Starts ORXONOX. (not really implemented yet, but the function is there.\n 333 \param widget the widget that executed the start command 334 \param data additional data 335 */ 336 int OrxonoxGuiExec::startOrxonox (void* widget, void* data) 337 { 338 OrxonoxGuiExec* exec = (OrxonoxGuiExec*)data; 339 COUT(3) << "Starting Orxonox" <<endl; 340 if (exec->shouldsave()) 341 exec->writeToFile (Window::mainWindow); 342 } 343 /** 344 \brief Quits ORXONOX. 345 \param widget the widget that executed the Quit command 346 \param data additional data 347 348 This is a Signal and can be executed through Widget::signal_connect 349 */ 350 int OrxonoxGuiExec::quitOrxonox (void* widget, void* data) 351 { 352 OrxonoxGuiExec* exec = (OrxonoxGuiExec*)data; 353 COUT(3) << "Quiting Orxonox" <<endl; 354 if (exec->shouldsave()) 355 exec->writeToFile (Window::mainWindow); 314 356 } 315 357
Note: See TracChangeset
for help on using the changeset viewer.