Search
lxdream.org :: lxdream/src/gui/debug_win.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/gui/debug_win.c
changeset 28:81c206f59dc7
prev26:ad258e3daaa5
next29:c29373ff63ee
author nkeynes
date Sun Dec 25 03:35:08 2005 +0000 (15 years ago)
permissions -rw-r--r--
last change Enable/disable run+stop buttons depending on state
file annotate diff log raw
1.1 --- a/src/gui/debug_win.c Sat Dec 24 08:02:18 2005 +0000
1.2 +++ b/src/gui/debug_win.c Sun Dec 25 03:35:08 2005 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: debug_win.c,v 1.7 2005-12-24 08:02:18 nkeynes Exp $
1.6 + * $Id: debug_win.c,v 1.8 2005-12-25 03:35:08 nkeynes Exp $
1.7 * This file is responsible for the main debugger gui frame.
1.8 *
1.9 * Copyright (c) 2005 Nathan Keynes.
1.10 @@ -35,6 +35,7 @@
1.11 GtkCList *regs_list;
1.12 GtkCList *disasm_list;
1.13 GtkEntry *page_field;
1.14 + GtkWidget *win;
1.15 GtkProgressBar *icounter;
1.16 char icounter_text[16];
1.17 char saved_regs[0];
1.18 @@ -52,6 +53,7 @@
1.19 data->cpu_list = cpu_list;
1.20
1.21 data->regs_list= gtk_object_get_data(GTK_OBJECT(win), "reg_list");
1.22 + data->win = win;
1.23 gtk_widget_modify_font( GTK_WIDGET(data->regs_list), fixed_list_font );
1.24 init_register_list( data );
1.25 data->msgs_list = gtk_object_get_data(GTK_OBJECT(win), "output_list");
1.26 @@ -64,6 +66,7 @@
1.27 gtk_progress_bar_set_text(data->icounter, "1");
1.28
1.29 gtk_object_set_data( GTK_OBJECT(win), "debug_data", data );
1.30 + debug_win_set_running( data, FALSE );
1.31 return data;
1.32 }
1.33
1.34 @@ -268,3 +271,17 @@
1.35 return data;
1.36 }
1.37
1.38 +void debug_win_enable_widget( debug_info_t data, const char *name,
1.39 + gboolean enabled )
1.40 +{
1.41 + GtkWidget *widget = GTK_WIDGET(gtk_object_get_data(GTK_OBJECT(data->win), name));
1.42 + gtk_widget_set_sensitive( widget, enabled );
1.43 +}
1.44 +
1.45 +void debug_win_set_running( debug_info_t data, gboolean isRunning )
1.46 +{
1.47 + debug_win_enable_widget( data, "stop_btn", isRunning );
1.48 + debug_win_enable_widget( data, "step_btn", !isRunning );
1.49 + debug_win_enable_widget( data, "run_btn", !isRunning );
1.50 + debug_win_enable_widget( data, "runto_btn", !isRunning );
1.51 +}
.