From Steven Schaeffer:

Fix for bug 310. Use the frame number to store history i.s.o. row number.

svn path=/trunk/; revision=21680
This commit is contained in:
Jaap Keuter 2007-05-04 11:21:03 +00:00
parent 176949badb
commit 742a43f941
2 changed files with 15 additions and 4 deletions

View File

@ -93,6 +93,11 @@ static void clear_list(GList *current) {
/* add an entry to the history list */
void packet_history_add(gint row) {
if(row < 1) {
/* Not a valid row number */
return;
}
if(ignore_jump) {
/* we jumping back and forward in history, so don't change list */
return;
@ -142,7 +147,7 @@ static void packet_history_back(void) {
/* goto that packet but don't change history */
ignore_jump = TRUE;
cf_goto_frame(&cfile, GPOINTER_TO_INT(previous->data) +1);
cf_goto_frame(&cfile, GPOINTER_TO_INT(previous->data));
ignore_jump = FALSE;
}
}
@ -163,7 +168,7 @@ static void packet_history_forward(void) {
/* goto that packet but don't change history */
ignore_jump = TRUE;
cf_goto_frame(&cfile, GPOINTER_TO_INT(next->data) +1);
cf_goto_frame(&cfile, GPOINTER_TO_INT(next->data));
ignore_jump = FALSE;
}
}

View File

@ -274,14 +274,20 @@ packet_list_click_column_cb(EthCList *clist, gint column, gpointer data)
/* What to do when a list item is selected/unselected */
static void
packet_list_select_cb(GtkWidget *w _U_, gint row, gint col _U_, gpointer evt _U_) {
frame_data *fdata;
/* Remove the hex display tabbed pages */
/* Remove the hex display tabbed pages */
while( (gtk_notebook_get_nth_page( GTK_NOTEBOOK(byte_nb_ptr), 0)))
gtk_notebook_remove_page( GTK_NOTEBOOK(byte_nb_ptr), 0);
cf_select_packet(&cfile, row);
gtk_widget_grab_focus(packet_list);
packet_history_add(row);
/* Lookup the frame number that corresponds to the list row number */
fdata = (frame_data *)packet_list_get_row_data(row);
if (fdata != NULL) {
packet_history_add(fdata->num);
}
}
static void