Search
lxdream.org :: lxdream/src/gtkui/dump_win.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/gtkui/dump_win.c
changeset 736:a02d1475ccfd
prev669:ab344e42bca9
next755:ab873907b00e
author nkeynes
date Mon Jul 14 07:44:42 2008 +0000 (13 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/dump_win.c Mon May 12 10:00:13 2008 +0000
1.2 +++ b/src/gtkui/dump_win.c Mon Jul 14 07:44:42 2008 +0000
1.3 @@ -46,7 +46,7 @@
1.4 static dump_window_t dump_list_head = NULL;
1.5
1.6 gboolean on_dump_window_delete_event( GtkWidget *widget, GdkEvent *event,
1.7 - gpointer user_data );
1.8 + gpointer user_data );
1.9 void on_dump_window_button_view_clicked( GtkWidget *widget, gpointer user_data );
1.10 void dump_window_set_text( dump_window_t data, unsigned char *old_data, unsigned char *new_data );
1.11
1.12 @@ -78,7 +78,7 @@
1.13 dump->toInput = gtk_entry_new ();
1.14 gtk_entry_set_text( GTK_ENTRY(dump->toInput), "" );
1.15 dump_view_button = gtk_button_new_with_mnemonic (_("View"));
1.16 -
1.17 +
1.18 gtk_box_pack_start (GTK_BOX (hbox2), gtk_label_new(_(" From ")), FALSE, FALSE, 0);
1.19 gtk_box_pack_start (GTK_BOX (hbox2), dump->fromInput, FALSE, TRUE, 0);
1.20 gtk_box_pack_start (GTK_BOX (hbox2), gtk_label_new(_(" To ")), FALSE, FALSE, 0);
1.21 @@ -90,7 +90,7 @@
1.22 dump->textArea = gtk_text_view_new ();
1.23 dump->textBuffer = gtk_text_buffer_new(NULL);
1.24 dump->changedTag = gtk_text_buffer_create_tag(dump->textBuffer, "changed",
1.25 - "foreground", "blue", NULL);
1.26 + "foreground", "blue", NULL);
1.27 gtk_widget_modify_font(GTK_WIDGET(dump->textArea),gui_fixed_font);
1.28 gtk_text_view_set_editable(GTK_TEXT_VIEW(dump->textArea), FALSE);
1.29 gtk_text_view_set_buffer(GTK_TEXT_VIEW(dump->textArea), dump->textBuffer);
1.30 @@ -98,7 +98,7 @@
1.31 gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow9), GTK_SHADOW_IN);
1.32 gtk_container_add (GTK_CONTAINER (scrolledwindow9), dump->textArea);
1.33 gtk_box_pack_start (GTK_BOX (vbox3), scrolledwindow9, TRUE, TRUE, 0);
1.34 -
1.35 +
1.36 g_signal_connect (dump->window, "delete_event",
1.37 G_CALLBACK (on_dump_window_delete_event),
1.38 dump);
1.39 @@ -132,7 +132,7 @@
1.40 }
1.41
1.42 gboolean on_dump_window_delete_event( GtkWidget *widget, GdkEvent *event,
1.43 - gpointer user_data )
1.44 + gpointer user_data )
1.45 {
1.46 dump_window_t data = (dump_window_t)user_data;
1.47 if( data->data != NULL )
1.48 @@ -158,7 +158,7 @@
1.49
1.50 assert( data != NULL );
1.51 assert( data->_tag == DUMP_WINDOW_TAG );
1.52 -
1.53 +
1.54 startVal = gtk_entry_get_hex_value(GTK_ENTRY(data->fromInput), data->start);
1.55 endVal = gtk_entry_get_hex_value(GTK_ENTRY(data->toInput), data->end);
1.56 if( startVal != data->start || endVal != data->end ) {
1.57 @@ -171,7 +171,7 @@
1.58 endVal = startVal + MAX_DUMP_SIZE;
1.59
1.60 gtk_entry_set_hex_value(GTK_ENTRY(data->fromInput),startVal);
1.61 - gtk_entry_set_hex_value(GTK_ENTRY(data->toInput),endVal);
1.62 + gtk_entry_set_hex_value(GTK_ENTRY(data->toInput),endVal);
1.63 data->start = startVal;
1.64 data->end = endVal;
1.65
1.66 @@ -218,7 +218,7 @@
1.67 gtk_text_buffer_get_end_iter(buf,&endIter);
1.68 gtk_text_buffer_delete(buf,&iter,&endIter);
1.69 gtk_text_buffer_get_start_iter(buf,&iter);
1.70 -
1.71 +
1.72 for( offset = 0, i=data->start; i<data->end; i+=16, offset+=16 ) {
1.73 char text[80];
1.74 sprintf(text, "%08X:", i );
1.75 @@ -234,7 +234,7 @@
1.76 gtk_text_buffer_insert( buf, &iter, text, 3 );
1.77 else
1.78 gtk_text_buffer_insert_with_tags( buf, &iter, text, 3,
1.79 - changedTag, NULL );
1.80 + changedTag, NULL );
1.81 } else {
1.82 gtk_text_buffer_insert( buf, &iter, " ", 3 );
1.83 }
1.84 @@ -250,7 +250,7 @@
1.85 gtk_text_buffer_insert( buf, &iter, text, 1 );
1.86 else
1.87 gtk_text_buffer_insert_with_tags( buf, &iter, text, 1,
1.88 - changedTag, NULL );
1.89 + changedTag, NULL );
1.90 }
1.91 gtk_text_buffer_insert( buf, &iter, "\n", 1 );
1.92 }
.