Search
lxdream.org :: lxdream/src/gui/mmio_win.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/gui/mmio_win.c
changeset 238:6af4cc93b137
prev57:5648c0e0638b
next429:e581b90c3fb3
author nkeynes
date Fri Dec 15 10:17:08 2006 +0000 (13 years ago)
permissions -rw-r--r--
last change Add UI for the trace flag
file annotate diff log raw
1.1 --- a/src/gui/mmio_win.c Mon Jan 02 14:47:55 2006 +0000
1.2 +++ b/src/gui/mmio_win.c Fri Dec 15 10:17:08 2006 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: mmio_win.c,v 1.4 2006-01-02 14:47:55 nkeynes Exp $
1.6 + * $Id: mmio_win.c,v 1.5 2006-12-15 10:17:08 nkeynes Exp $
1.7 *
1.8 * Implements the MMIO register viewing window
1.9 *
1.10 @@ -19,6 +19,7 @@
1.11 #include <stdint.h>
1.12 #include <gnome.h>
1.13 #include "interface.h"
1.14 +#include "callbacks.h"
1.15 #include "gui.h"
1.16 #include "mem.h"
1.17 #include "mmio.h"
1.18 @@ -56,11 +57,13 @@
1.19 }
1.20
1.21
1.22 -static GtkCList *create_mmr_page( char *name )
1.23 +static GtkCList *create_mmr_page( char *name, struct mmio_region *io_rgn )
1.24 {
1.25 GtkCList *list;
1.26 GtkWidget *scroll;
1.27 GtkWidget *tab;
1.28 + GtkCheckButton *trace_button;
1.29 + GtkVBox *vbox;
1.30
1.31 scroll = gtk_scrolled_window_new(NULL, NULL);
1.32 gtk_widget_show( scroll );
1.33 @@ -86,8 +89,21 @@
1.34 tab = gtk_label_new(_(name));
1.35 gtk_widget_show( tab );
1.36 gtk_container_add( GTK_CONTAINER(scroll), GTK_WIDGET(list) );
1.37 - gtk_notebook_append_page( mmr_book, scroll, tab );
1.38 +
1.39 + vbox = gtk_vbox_new( FALSE, 0 );
1.40 + gtk_widget_show( GTK_WIDGET(vbox) );
1.41 + gtk_container_add( GTK_CONTAINER(vbox), GTK_WIDGET(scroll) );
1.42 +
1.43 + trace_button = gtk_check_button_new_with_label("Trace access");
1.44 + gtk_widget_show( GTK_WIDGET(trace_button) );
1.45 + gtk_container_add( GTK_CONTAINER(vbox), GTK_WIDGET(trace_button) );
1.46 + gtk_box_set_child_packing( GTK_BOX(vbox), GTK_WIDGET(trace_button),
1.47 + FALSE, FALSE, 0, GTK_PACK_START );
1.48 + gtk_notebook_append_page( mmr_book, vbox, tab );
1.49 gtk_object_set_data( GTK_OBJECT(mmr_win), name, list );
1.50 + g_signal_connect ((gpointer) trace_button, "toggled",
1.51 + G_CALLBACK (on_trace_button_toggled),
1.52 + io_rgn);
1.53 return list;
1.54 }
1.55
1.56 @@ -138,9 +154,9 @@
1.57 /* kill the dummy page glade insists on adding */
1.58 gtk_notebook_remove_page( mmr_book, 0 );
1.59
1.60 - all_list = create_mmr_page( "All" );
1.61 + all_list = create_mmr_page( "All", NULL );
1.62 for( i=0; i < num_io_rgns; i++ ) {
1.63 - GtkCList *list = create_mmr_page( io_rgn[i]->id );
1.64 + GtkCList *list = create_mmr_page( io_rgn[i]->id, io_rgn[i] );
1.65
1.66 for( j=0; io_rgn[i]->ports[j].id != NULL; j++ ) {
1.67 int sz = io_rgn[i]->ports[j].width;
.