Search
lxdream.org :: lxdream/src/gtkui/mmio_win.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/gtkui/mmio_win.c
changeset 736:a02d1475ccfd
prev586:2a3ba82cf243
next755:ab873907b00e
author nkeynes
date Mon Jul 14 07:44:42 2008 +0000 (11 years ago)
permissions -rw-r--r--
last change Re-indent everything consistently
Fix include guards for consistency as well
file annotate diff log raw
1.1 --- a/src/gtkui/mmio_win.c Tue Jan 15 20:50:23 2008 +0000
1.2 +++ b/src/gtkui/mmio_win.c Mon Jul 14 07:44:42 2008 +0000
1.3 @@ -57,14 +57,14 @@
1.4 }
1.5 *out = '\0';
1.6 }
1.7 -
1.8 +
1.9
1.10
1.11
1.12 gboolean
1.13 on_mmio_delete_event (GtkWidget *widget,
1.14 - GdkEvent *event,
1.15 - gpointer user_data)
1.16 + GdkEvent *event,
1.17 + gpointer user_data)
1.18 {
1.19 gtk_widget_hide(widget);
1.20 return TRUE;
1.21 @@ -78,12 +78,12 @@
1.22
1.23
1.24 void on_trace_button_toggled (GtkToggleButton *button,
1.25 - gpointer user_data)
1.26 + gpointer user_data)
1.27 {
1.28 struct mmio_region *io_rgn = (struct mmio_region *)user_data;
1.29 gboolean isActive = gtk_toggle_button_get_active(button);
1.30 if( io_rgn != NULL ) {
1.31 - io_rgn->trace_flag = isActive ? 1 : 0;
1.32 + io_rgn->trace_flag = isActive ? 1 : 0;
1.33 }
1.34 }
1.35
1.36 @@ -116,23 +116,23 @@
1.37 gtk_widget_modify_font( GTK_WIDGET(list), gui_fixed_font );
1.38 tab = gtk_label_new(_(name));
1.39 gtk_container_add( GTK_CONTAINER(scroll), GTK_WIDGET(list) );
1.40 -
1.41 +
1.42 vbox = GTK_VBOX(gtk_vbox_new( FALSE, 0 ));
1.43 gtk_container_add( GTK_CONTAINER(vbox), GTK_WIDGET(scroll) );
1.44
1.45 trace_button = GTK_CHECK_BUTTON(gtk_check_button_new_with_label(_("Trace access")));
1.46 if( io_rgn != NULL ) {
1.47 - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(trace_button),
1.48 - io_rgn->trace_flag ? TRUE : FALSE);
1.49 + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(trace_button),
1.50 + io_rgn->trace_flag ? TRUE : FALSE);
1.51 }
1.52 gtk_container_add( GTK_CONTAINER(vbox), GTK_WIDGET(trace_button) );
1.53 gtk_box_set_child_packing( GTK_BOX(vbox), GTK_WIDGET(trace_button),
1.54 - FALSE, FALSE, 0, GTK_PACK_START );
1.55 + FALSE, FALSE, 0, GTK_PACK_START );
1.56 gtk_notebook_append_page( GTK_NOTEBOOK(mmio->notebook), GTK_WIDGET(vbox), tab );
1.57 gtk_object_set_data( GTK_OBJECT(mmio->window), name, list );
1.58 g_signal_connect ((gpointer) trace_button, "toggled",
1.59 - G_CALLBACK (on_trace_button_toggled),
1.60 - io_rgn);
1.61 + G_CALLBACK (on_trace_button_toggled),
1.62 + io_rgn);
1.63 return list;
1.64 }
1.65
1.66 @@ -141,7 +141,7 @@
1.67 mmio_window_t mmio_window_new( const gchar *title )
1.68 {
1.69 mmio_window_t mmio = g_malloc0( sizeof(struct mmio_window_info) );
1.70 -
1.71 +
1.72 int i, j;
1.73 GtkCList *all_list;
1.74 GtkWidget *vbox1;
1.75 @@ -162,7 +162,7 @@
1.76 hbuttonbox1 = gtk_hbutton_box_new ();
1.77 gtk_box_pack_start (GTK_BOX (vbox1), hbuttonbox1, FALSE, TRUE, 0);
1.78 gtk_box_set_spacing (GTK_BOX (hbuttonbox1), 30);
1.79 -
1.80 +
1.81 mmr_close = gtk_button_new_with_mnemonic (_("Close"));
1.82 gtk_container_add (GTK_CONTAINER (hbuttonbox1), mmr_close);
1.83 GTK_WIDGET_SET_FLAGS (mmr_close, GTK_CAN_DEFAULT);
1.84 @@ -175,7 +175,7 @@
1.85 int sz = io_rgn[i]->ports[j].width;
1.86 char addr[10], data[10], bits[40];
1.87 char *arr[] = { addr, io_rgn[i]->ports[j].id, data, bits,
1.88 - io_rgn[i]->ports[j].desc };
1.89 + io_rgn[i]->ports[j].desc };
1.90 sprintf( addr, "%08X",
1.91 io_rgn[i]->base + io_rgn[i]->ports[j].offset );
1.92 printhex( data, sz, *io_rgn[i]->ports[j].val );
1.93 @@ -185,18 +185,18 @@
1.94 gtk_clist_append( all_list, arr );
1.95 }
1.96 }
1.97 -
1.98 +
1.99 g_signal_connect ((gpointer) mmio->window, "delete_event",
1.100 - G_CALLBACK (on_mmio_delete_event),
1.101 - NULL);
1.102 + G_CALLBACK (on_mmio_delete_event),
1.103 + NULL);
1.104 g_signal_connect ((gpointer) mmr_close, "clicked",
1.105 - G_CALLBACK (on_mmio_close_clicked),
1.106 - mmio);
1.107 + G_CALLBACK (on_mmio_close_clicked),
1.108 + mmio);
1.109
1.110 gtk_widget_show_all( mmio->window );
1.111 return mmio;
1.112 }
1.113 -
1.114 +
1.115 void mmio_window_update( mmio_window_t mmio )
1.116 {
1.117 int i,j, count = 0;
1.118 @@ -204,10 +204,10 @@
1.119 char data[10], bits[40];
1.120
1.121 all_page = GTK_CLIST(gtk_object_get_data( GTK_OBJECT(mmio->window), "All" ));
1.122 -
1.123 +
1.124 for( i=0; i < num_io_rgns; i++ ) {
1.125 page = GTK_CLIST(gtk_object_get_data( GTK_OBJECT(mmio->window),
1.126 - io_rgn[i]->id ));
1.127 + io_rgn[i]->id ));
1.128 for( j=0; io_rgn[i]->ports[j].id != NULL; j++ ) {
1.129 if( *io_rgn[i]->ports[j].val !=
1.130 *(uint32_t *)(io_rgn[i]->save_mem+io_rgn[i]->ports[j].offset)){
1.131 @@ -215,15 +215,15 @@
1.132 /* Changed */
1.133 printhex( data, sz, *io_rgn[i]->ports[j].val );
1.134 printbits( bits, sz, *io_rgn[i]->ports[j].val );
1.135 -
1.136 +
1.137 gtk_clist_set_text( page, j, 2, data );
1.138 gtk_clist_set_text( page, j, 3, bits );
1.139 gtk_clist_set_foreground( page, j, &gui_colour_changed );
1.140 -
1.141 +
1.142 gtk_clist_set_text( all_page, count, 2, data );
1.143 gtk_clist_set_text( all_page, count, 3, bits );
1.144 gtk_clist_set_foreground( all_page, count, &gui_colour_changed );
1.145 -
1.146 +
1.147 } else {
1.148 gtk_clist_set_foreground( page, j, &gui_colour_normal );
1.149 gtk_clist_set_foreground( all_page, count, &gui_colour_normal );
1.150 @@ -237,9 +237,9 @@
1.151 void mmio_window_show( mmio_window_t mmio, gboolean show )
1.152 {
1.153 if( show ) {
1.154 - gtk_widget_show( mmio->window );
1.155 + gtk_widget_show( mmio->window );
1.156 } else {
1.157 - gtk_widget_hide( mmio->window );
1.158 + gtk_widget_hide( mmio->window );
1.159 }
1.160 }
1.161
.