Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4039 in orxonox.OLD for orxonox/trunk/src/lib/gui


Ignore:
Timestamp:
May 4, 2005, 1:22:27 PM (20 years ago)
Author:
bensch
Message:

orxonox/trunk/gui: minor change

Location:
orxonox/trunk/src/lib/gui/gui
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/gui/gui/Makefile.am

    r4024 r4039  
    2424
    2525bin_PROGRAMS=gui
    26 gui_SOURCES=orxonox_gui.cc \
     26gui_SOURCES=orxonox_gui_main.cc \
     27            orxonox_gui.cc \
    2728            orxonox_gui_gtk.cc \
    2829            orxonox_gui_element.cc \
  • orxonox/trunk/src/lib/gui/gui/Makefile.in

    r4024 r4039  
    5353binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
    5454PROGRAMS = $(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)
     55am_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)
    6061gui_OBJECTS = $(am_gui_OBJECTS)
    6162gui_LDADD = $(LDADD)
     
    7172@AMDEP_TRUE@    ./$(DEPDIR)/orxonox_gui_gtk.Po \
    7273@AMDEP_TRUE@    ./$(DEPDIR)/orxonox_gui_keys.Po \
     74@AMDEP_TRUE@    ./$(DEPDIR)/orxonox_gui_main.Po \
    7375@AMDEP_TRUE@    ./$(DEPDIR)/orxonox_gui_update.Po \
    7476@AMDEP_TRUE@    ./$(DEPDIR)/orxonox_gui_video.Po
     
    198200#AM_LDFLAGS=$(GTK2_LIBS)   $(GTHREAD_LIBS)
    199201AM_LDFLAGS = $(GTK2_LIBS) $(GTHREAD_LIBS) $(CURL_LIBS)
    200 gui_SOURCES = orxonox_gui.cc \
     202gui_SOURCES = orxonox_gui_main.cc \
     203            orxonox_gui.cc \
    201204            orxonox_gui_gtk.cc \
    202205            orxonox_gui_element.cc \
     
    304307@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_gui_gtk.Po@am__quote@
    305308@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@
    306310@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_gui_update.Po@am__quote@
    307311@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_gui_video.Po@am__quote@
  • orxonox/trunk/src/lib/gui/gui/orxonox_gui.cc

    r4027 r4039  
    4444  OrxonoxGuiUpdate* update = NULL;
    4545int verbose = 4;
    46 
    47 int main(int argc, char *argv[])
    48 {
    49   OrxonoxGui* orxonoxgui = new OrxonoxGui(argc, argv);
    50   return 0;
    51 }
    5246
    5347/* ORXONOXGUI */
  • orxonox/trunk/src/lib/gui/gui/orxonox_gui_exec.cc

    r4036 r4039  
    346346}
    347347
    348 #ifdef HAVE_GTK2
    349348/**
    350349   \brief Starts ORXONOX.(not really implemented yet, but the function is there.\n
     
    354353   This is a Signal and can be executed through Widget::signal_connect
    355354*/
     355#ifdef HAVE_GTK2
    356356int OrxonoxGuiExec::startOrxonox(GtkWidget* widget, void* data)
     357#else /* HAVE_GTK2 */
     358int OrxonoxGuiExec::startOrxonox(void* widget, void* data)
     359#endif /* HAVE_GTK2 */
    357360{
    358361  OrxonoxGuiExec* exec =(OrxonoxGuiExec*)data;
     
    360363    exec->writeToFile(Window::mainWindow);
    361364  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();
    363367}
    364368
     
    370374   This is a Signal and can be executed through Widget::signal_connect
    371375*/
     376#ifdef HAVE_GTK2
    372377int OrxonoxGuiExec::quitOrxonox(GtkWidget* widget, void* data)
     378#else /* HAVE_GTK2 */
     379int OrxonoxGuiExec::quitOrxonox(void* widget, void* data)
     380#endif /* HAVE_GTK2 */
    373381{
    374382  OrxonoxGuiExec* exec =(OrxonoxGuiExec*)data;
     
    378386  gtk_main_quit();
    379387}
    380 #else /* HAVE_GTK2 */
    381 /**
    382    \brief Starts ORXONOX.(not really implemented yet, but the function is there.\n
    383    \param widget the widget that executed the start command
    384    \param data additional data
    385 */
    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 command
    397    \param data additional data
    398 
    399    This is a Signal and can be executed through Widget::signal_connect
    400 */
    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  
    6363
    6464  this->flagsLabel->ereaseText();
    65   this->flagsLabel->appendText("orxonox");
     65  this->flagsLabel->appendText(progExecutable);
    6666  widget->walkThrough(OrxonoxGuiFlags::flagsText, &flagInfo, 0);
    6767  //  flagsLabel->setTitle(flagText);
  • orxonox/trunk/src/lib/gui/gui/orxonox_gui_gtk.cc

    r4035 r4039  
    3636extern Window* orxonoxGUI;
    3737extern OrxonoxGuiFlags* flags;
     38char* guiExecutable;
     39char* progExecutable;
    3840
    3941/**
     
    4446bool initGUI(int argc, char *argv[])
    4547{
     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
    4654#ifdef HAVE_GTK2
    4755#ifdef HAVE_GTHREAD
  • orxonox/trunk/src/lib/gui/gui/orxonox_gui_gtk.h

    r4030 r4039  
    3030#endif /* HAVE_GTK2 */
    3131
     32extern char* guiExecutable;
     33extern char* progExecutable;
     34
    3235bool initGUI(int argc, char* argv[]);
    3336bool mainloopGUI(void);
Note: See TracChangeset for help on using the changeset viewer.