Search
lxdream.org :: lxdream/src/gui/gui.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/gui/gui.c
changeset 392:39e596b3b6dd
prev275:005945dbb813
next429:e581b90c3fb3
author nkeynes
date Tue Sep 18 10:48:57 2007 +0000 (13 years ago)
permissions -rw-r--r--
last change Remove debugger from default startup - now only shown if started with -D
file annotate diff log raw
1.1 --- a/src/gui/gui.c Thu Jan 11 12:15:36 2007 +0000
1.2 +++ b/src/gui/gui.c Tue Sep 18 10:48:57 2007 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: gui.c,v 1.13 2007-01-11 12:15:36 nkeynes Exp $
1.6 + * $Id: gui.c,v 1.14 2007-09-18 10:48:57 nkeynes Exp $
1.7 *
1.8 * Top-level GUI (GTK2) module.
1.9 *
1.10 @@ -33,8 +33,7 @@
1.11 GdkColor clrBreak, clrTempBreak, clrWhite;
1.12 PangoFontDescription *fixed_list_font;
1.13
1.14 -debug_info_t main_debug;
1.15 -
1.16 +debug_info_t main_debug = NULL;
1.17
1.18 void open_file_callback(GtkWidget *btn, gint result, gpointer user_data);
1.19
1.20 @@ -55,7 +54,6 @@
1.21
1.22 void gtk_gui_init() {
1.23 GdkColormap *map;
1.24 - GtkWidget *debug_win;
1.25
1.26 clrNormal.red = clrNormal.green = clrNormal.blue = 0;
1.27 clrChanged.red = clrChanged.green = 64*256;
1.28 @@ -88,13 +86,16 @@
1.29 gdk_colormap_alloc_color(map, &clrTempBreak, TRUE, TRUE);
1.30 gdk_colormap_alloc_color(map, &clrWhite, TRUE, TRUE);
1.31 fixed_list_font = pango_font_description_from_string("Courier 10");
1.32 - debug_win = create_debug_win ();
1.33 +}
1.34 +
1.35 +void gtk_gui_show_debugger()
1.36 +{
1.37 + GtkWidget *debug_win = create_debug_win ();
1.38 main_debug = init_debug_win(debug_win, cpu_descs);
1.39 init_mmr_win();
1.40
1.41 gtk_widget_show (debug_win);
1.42 -
1.43 -}
1.44 +}
1.45
1.46 /**
1.47 * Hook called when DC starts running. Just disables the run/step buttons
1.48 @@ -130,12 +131,12 @@
1.49 }
1.50
1.51 void gtk_gui_update(void) {
1.52 - if( main_debug == NULL )
1.53 - return;
1.54 - update_registers(main_debug);
1.55 - update_icount(main_debug);
1.56 - update_mmr_win();
1.57 - dump_win_update_all();
1.58 + if( main_debug != NULL ) {
1.59 + update_registers(main_debug);
1.60 + update_icount(main_debug);
1.61 + update_mmr_win();
1.62 + dump_win_update_all();
1.63 + }
1.64 }
1.65
1.66 void open_file_callback(GtkWidget *btn, gint result, gpointer user_data) {
.