X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=src%2Fregwin.c;h=f94b8f9c7cc629a73e3b7db895495b13630ec937;hb=7657e4d7db609460aa6d7bc993ee1ec2aa94670f;hp=05787819d479ae038c118eb32dd486b0c04db9cd;hpb=3e67c30ca5f1f959c06d1061556fa46c11163473;p=emu8051.git diff --git a/src/regwin.c b/src/regwin.c index 0578781..f94b8f9 100644 --- a/src/regwin.c +++ b/src/regwin.c @@ -30,8 +30,10 @@ #include "cpu8051.h" #include "regwin.h" #include "memwin.h" +#include "pgmwin.h" #include "instructions_8051.h" #include "hexfile.h" +#include "emugtk.h" static GtkWidget *reglist; @@ -281,22 +283,20 @@ static GtkListStore * regwin_init_store(void) { GtkTreeIter iter; - int rows; + int row; int col; GtkListStore *store; GType col_types[N_COLUMNS]; - for (col = 0; col < N_COLUMNS; col++) { + /* No need for static array, all our columns are of the same type. */ + for (col = 0; col < N_COLUMNS; col++) col_types[col] = G_TYPE_STRING; - } store = gtk_list_store_newv(N_COLUMNS, col_types); - /* Initialize with rows of dummy data... */ - for (rows = 0; rows < DATA_ROWS; rows++) { - /* Add new row. */ + /* Add rows. */ + for (row = 0; row < DATA_ROWS; row++) gtk_list_store_append(store, &iter); - } return store; } @@ -388,8 +388,7 @@ regwin_cell_edited(GtkCellRendererText *cell, gchar *path_string, * Make sure to update all windows. * For example, R0-R7 values depends on internal memory values. */ - regwin_Show(); - memwin_DumpD("0"); + emugtk_UpdateDisplay(); }; static void @@ -467,7 +466,7 @@ regwin_init(void) /* Show registers. */ void -regwin_Show(void) +regwin_refresh(void) { int row; GtkListStore *store;