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:
parent
176949badb
commit
742a43f941
|
@ -93,6 +93,11 @@ static void clear_list(GList *current) {
|
||||||
/* add an entry to the history list */
|
/* add an entry to the history list */
|
||||||
void packet_history_add(gint row) {
|
void packet_history_add(gint row) {
|
||||||
|
|
||||||
|
if(row < 1) {
|
||||||
|
/* Not a valid row number */
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if(ignore_jump) {
|
if(ignore_jump) {
|
||||||
/* we jumping back and forward in history, so don't change list */
|
/* we jumping back and forward in history, so don't change list */
|
||||||
return;
|
return;
|
||||||
|
@ -142,7 +147,7 @@ static void packet_history_back(void) {
|
||||||
|
|
||||||
/* goto that packet but don't change history */
|
/* goto that packet but don't change history */
|
||||||
ignore_jump = TRUE;
|
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;
|
ignore_jump = FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -163,7 +168,7 @@ static void packet_history_forward(void) {
|
||||||
|
|
||||||
/* goto that packet but don't change history */
|
/* goto that packet but don't change history */
|
||||||
ignore_jump = TRUE;
|
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;
|
ignore_jump = FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 */
|
/* What to do when a list item is selected/unselected */
|
||||||
static void
|
static void
|
||||||
packet_list_select_cb(GtkWidget *w _U_, gint row, gint col _U_, gpointer evt _U_) {
|
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)))
|
while( (gtk_notebook_get_nth_page( GTK_NOTEBOOK(byte_nb_ptr), 0)))
|
||||||
gtk_notebook_remove_page( GTK_NOTEBOOK(byte_nb_ptr), 0);
|
gtk_notebook_remove_page( GTK_NOTEBOOK(byte_nb_ptr), 0);
|
||||||
|
|
||||||
cf_select_packet(&cfile, row);
|
cf_select_packet(&cfile, row);
|
||||||
gtk_widget_grab_focus(packet_list);
|
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
|
static void
|
||||||
|
|
Loading…
Reference in New Issue