[1809] | 1 | #include "orxonox_gui.h" |
---|
| 2 | #include "orxonox_gui_video.h" |
---|
[1813] | 3 | #include "orxonox_gui_audio.h" |
---|
[1817] | 4 | int verbose = 1; |
---|
[1809] | 5 | |
---|
| 6 | int main( int argc, char *argv[] ) |
---|
| 7 | { |
---|
| 8 | GtkWidget *window; |
---|
| 9 | GtkWidget *vbox_main; |
---|
| 10 | GtkWidget *hbox_video_audio; |
---|
| 11 | GtkWidget *hbox_view_exec; |
---|
[1817] | 12 | struct settings *orxonox_settings; |
---|
[1829] | 13 | |
---|
[1817] | 14 | int option_count = 7; /* important: look that this is greater than options in 'struct settings' */ |
---|
[1809] | 15 | |
---|
[1817] | 16 | /* Initialize all settings */ |
---|
| 17 | |
---|
| 18 | orxonox_settings = malloc (option_count*sizeof (int)); |
---|
| 19 | |
---|
| 20 | orxonox_gui_file_default (orxonox_settings); |
---|
[1829] | 21 | orxonox_gui_file_load ("~/.orxonox.conf", orxonox_settings); |
---|
[1817] | 22 | |
---|
| 23 | |
---|
[1809] | 24 | gtk_init (&argc, &argv); |
---|
| 25 | /* Main Window */ |
---|
| 26 | window = gtk_window_new (GTK_WINDOW_TOPLEVEL); |
---|
| 27 | gtk_window_set_title ( GTK_WINDOW (window), "orxonox"); |
---|
| 28 | g_signal_connect (G_OBJECT (window), "delete_event", G_CALLBACK (gtk_main_quit), NULL); |
---|
[1829] | 29 | g_signal_connect (G_OBJECT (window), "destroy", G_CALLBACK (orxonox_gui_quit), orxonox_settings); |
---|
[1809] | 30 | gtk_container_set_border_width (GTK_CONTAINER (window), 5); |
---|
| 31 | |
---|
| 32 | /* VBOX - MAIN */ |
---|
| 33 | vbox_main = gtk_vbox_new (FALSE, 0); |
---|
| 34 | { |
---|
| 35 | hbox_video_audio = gtk_hbox_new (FALSE, 0); |
---|
| 36 | |
---|
| 37 | { |
---|
[1817] | 38 | gtk_box_pack_start(GTK_BOX(hbox_video_audio), orxonox_gui_video_frame(orxonox_settings), TRUE, TRUE, 0); |
---|
[1809] | 39 | |
---|
[1818] | 40 | gtk_box_pack_start(GTK_BOX(hbox_video_audio), orxonox_gui_audio_frame(orxonox_settings), TRUE, TRUE, 0); |
---|
[1809] | 41 | } |
---|
| 42 | gtk_box_pack_start (GTK_BOX (vbox_main), hbox_video_audio, TRUE, TRUE, 0); |
---|
[1812] | 43 | |
---|
[1809] | 44 | { |
---|
| 45 | hbox_view_exec = gtk_hbox_new ( FALSE,0); |
---|
[1812] | 46 | /* |
---|
[1809] | 47 | { |
---|
| 48 | info ( hbox_view_exec ); |
---|
| 49 | } |
---|
[1812] | 50 | */ |
---|
[1809] | 51 | { |
---|
[1818] | 52 | gtk_box_pack_start(GTK_BOX(hbox_view_exec), orxonox_gui_exec_frame(orxonox_settings), TRUE, TRUE, 0); |
---|
[1809] | 53 | |
---|
| 54 | } |
---|
| 55 | gtk_box_pack_start (GTK_BOX (vbox_main), hbox_view_exec, TRUE, TRUE, 0); |
---|
[1812] | 56 | } |
---|
[1809] | 57 | } |
---|
| 58 | gtk_container_add (GTK_CONTAINER (window), vbox_main); |
---|
| 59 | |
---|
| 60 | gtk_widget_show_all (window); |
---|
[1820] | 61 | |
---|
[1809] | 62 | gtk_main (); |
---|
| 63 | |
---|
| 64 | return(0); |
---|
| 65 | } |
---|