Search
lxdream.org :: lxdream/src/gtkui/gtkui.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/gtkui/gtkui.c
changeset 543:361ec0a70cf2
prev537:d924be49e192
next546:7d01e597a066
author nkeynes
date Thu Nov 22 11:10:15 2007 +0000 (13 years ago)
permissions -rw-r--r--
last change Re-add "Load Binary" menu item (misplaced in GUI rewrite)
Prevent running with no code loaded
file annotate diff log raw
1.1 --- a/src/gtkui/gtkui.c Tue Nov 20 10:27:58 2007 +0000
1.2 +++ b/src/gtkui/gtkui.c Thu Nov 22 11:10:15 2007 +0000
1.3 @@ -67,6 +67,7 @@
1.4 { "FileMenu", NULL, N_("_File") },
1.5 { "SettingsMenu", NULL, N_("_Settings") },
1.6 { "HelpMenu", NULL, N_("_Help") },
1.7 + { "LoadBinary", NULL, N_("Load _Binary..."), NULL, N_("Load and run a program binary"), G_CALLBACK(load_binary_action_callback) },
1.8 { "Reset", GTK_STOCK_REFRESH, N_("_Reset"), "<control>R", N_("Reset dreamcast"), G_CALLBACK(reset_action_callback) },
1.9 { "Pause", GTK_STOCK_MEDIA_PAUSE, N_("_Pause"), NULL, N_("Pause dreamcast"), G_CALLBACK(pause_action_callback) },
1.10 { "Run", GTK_STOCK_MEDIA_PLAY, N_("Resume"), NULL, N_("Resume"), G_CALLBACK(resume_action_callback) },
1.11 @@ -100,6 +101,7 @@
1.12 "<ui>"
1.13 " <menubar name='MainMenu'>"
1.14 " <menu action='FileMenu'>"
1.15 + " <menuitem action='LoadBinary'/>"
1.16 " <menuitem action='GdromSettings'/>"
1.17 " <separator/>"
1.18 " <menuitem action='Reset'/>"
1.19 @@ -235,6 +237,7 @@
1.20
1.21 void gui_main_loop(void)
1.22 {
1.23 + gtk_gui_update();
1.24 gtk_main();
1.25 }
1.26
1.27 @@ -346,6 +349,8 @@
1.28
1.29 void gtk_gui_update( void )
1.30 {
1.31 + gtk_gui_enable_action("Run", dreamcast_can_run() && !dreamcast_is_running() );
1.32 + gtk_gui_enable_action("Pause", dreamcast_is_running() );
1.33 if( debug_win ) {
1.34 debug_window_set_running( debug_win, FALSE );
1.35 debug_window_update(debug_win);
.