/* No frame selected, no field in that frame selected. */
cf->current_frame = NULL;
+ cf->current_row = 0;
cf->finfo_selected = NULL;
/* Clear the packet list. */
cf->lnk_t = wtap_file_encap(cf->wth);
cf->current_frame = cf->first_displayed;
+ cf->current_row = 0;
+
packet_list_thaw();
cf_callback_invoke(cf_cb_file_read_finished, cf);
/* Record that this frame is the current frame. */
cf->current_frame = fdata;
+ cf->current_row = row;
/* Create the logical protocol tree. */
if (cf->edt != NULL) {
/* No packet is selected. */
cf->current_frame = NULL;
+ cf->current_row = 0;
cf_callback_invoke(cf_cb_packet_unselected, cf);
}
if (cfile.current_frame) {
- /* XXX hum, should better have a "cfile->current_row" here ... */
set_frame_reftime(!cfile.current_frame->flags.ref_time,
- cfile.current_frame,
- packet_list_find_row_from_data(cfile.current_frame));
+ cfile.current_frame, cfile.current_row);
}
}
simple_dialog_primary_start(), simple_dialog_primary_end());
simple_dialog_set_cb(reftime_dialog, reftime_answered_cb, NULL);
} else {
- /* XXX hum, should better have a "cfile->current_row" here ... */
set_frame_reftime(!cfile.current_frame->flags.ref_time,
- cfile.current_frame,
- packet_list_find_row_from_data(cfile.current_frame));
+ cfile.current_frame, cfile.current_row);
}
}
break;
frame_data *fdata;
/* Check if already selected */
- if (cfile.current_frame &&
- (gtk_clist_find_row_from_data(GTK_CLIST(packet_list), cfile.current_frame) == row))
+ if (cfile.current_frame && cfile.current_row == row)
return;
/* Remove the hex display tabbed pages */
void packet_list_mark_frame_cb(GtkWidget *w _U_, gpointer data _U_) {
if (cfile.current_frame) {
- /* XXX hum, should better have a "cfile->current_row" here ... */
set_frame_mark(!cfile.current_frame->flags.marked,
- cfile.current_frame,
- gtk_clist_find_row_from_data(GTK_CLIST(packet_list),
- cfile.current_frame));
+ cfile.current_frame, cfile.current_row);
mark_frames_ready();
}
}
void packet_list_copy_summary_cb(GtkWidget * w _U_, gpointer data _U_, copy_summary_type copy_type)
{
- gint row;
gint col;
gchar* celltext = NULL;
GString* text;
- if(CS_CSV == copy_type) {
- text = g_string_new("\"");
- } else {
- text = g_string_new("");
- }
+ if(CS_CSV == copy_type) {
+ text = g_string_new("\"");
+ } else {
+ text = g_string_new("");
+ }
if (cfile.current_frame) {
- /* XXX hum, should better have a "cfile->current_row" here ... */
- row = gtk_clist_find_row_from_data(GTK_CLIST(packet_list),
- cfile.current_frame);
for(col = 0; col < cfile.cinfo.num_cols; ++col) {
if(col != 0) {
- if(CS_CSV == copy_type) {
- g_string_append(text,"\",\"");
- } else {
- g_string_append_c(text, '\t');
- }
+ if(CS_CSV == copy_type) {
+ g_string_append(text,"\",\"");
+ } else {
+ g_string_append_c(text, '\t');
+ }
}
- if(0 != gtk_clist_get_text(GTK_CLIST(packet_list),row,col,&celltext)) {
+ if(0 != gtk_clist_get_text(GTK_CLIST(packet_list),cfile.current_row,col,&celltext)) {
g_string_append(text,celltext);
}
}
- if(CS_CSV == copy_type) {
- g_string_append_c(text,'"');
- }
+ if(CS_CSV == copy_type) {
+ g_string_append_c(text,'"');
+ }
copy_to_clipboard(text);
}
g_string_free(text,TRUE);