forked from osmocom/wireshark
Make sure that we stop auto scroll if we start scrolling manually.
Caveat: we jump to first frame when auto scroll is stopped svn path=/trunk/; revision=29685
This commit is contained in:
parent
7b5da30392
commit
bd69669e1d
2
file.c
2
file.c
|
@ -753,6 +753,7 @@ cf_continue_tail(capture_file *cf, volatile int to_read, int *err)
|
|||
*err = 0;
|
||||
|
||||
#ifdef NEW_PACKET_LIST
|
||||
new_packet_list_check_end();
|
||||
new_packet_list_freeze();
|
||||
#else
|
||||
packet_list_check_end();
|
||||
|
@ -882,6 +883,7 @@ cf_finish_tail(capture_file *cf, int *err)
|
|||
}
|
||||
|
||||
#ifdef NEW_PACKET_LIST
|
||||
new_packet_list_check_end();
|
||||
new_packet_list_freeze();
|
||||
#else
|
||||
packet_list_check_end();
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
#include "gtk/main_statusbar.h"
|
||||
|
||||
static PacketList *packetlist;
|
||||
|
||||
static gboolean last_at_end = FALSE;
|
||||
static gboolean enable_color;
|
||||
|
||||
static GtkWidget *create_view_and_model(void);
|
||||
|
@ -414,6 +414,27 @@ new_packet_list_moveto_end(void)
|
|||
gtk_tree_path_free(path);
|
||||
}
|
||||
|
||||
gboolean
|
||||
new_packet_list_check_end(void)
|
||||
{
|
||||
gboolean at_end = FALSE;
|
||||
GtkAdjustment *adj;
|
||||
|
||||
adj = gtk_tree_view_get_vadjustment(GTK_TREE_VIEW(packetlist->view));
|
||||
g_return_val_if_fail(adj != NULL, FALSE);
|
||||
|
||||
if (adj->value >= adj->upper - adj->page_size) {
|
||||
at_end = TRUE;
|
||||
}
|
||||
#ifdef HAVE_LIBPCAP
|
||||
if (adj->value > 0 && at_end != last_at_end && at_end != auto_scroll_live) {
|
||||
menu_auto_scroll_live_changed(at_end);
|
||||
}
|
||||
#endif
|
||||
last_at_end = at_end;
|
||||
return at_end;
|
||||
}
|
||||
|
||||
gint
|
||||
new_packet_list_find_row_from_data(gpointer data, gboolean select)
|
||||
{
|
||||
|
|
|
@ -74,6 +74,7 @@ void new_packet_list_queue_draw(void);
|
|||
void new_packet_list_select_first_row(void);
|
||||
void new_packet_list_select_last_row(void);
|
||||
void new_packet_list_moveto_end(void);
|
||||
gboolean new_packet_list_check_end(void);
|
||||
gint new_packet_list_find_row_from_data(gpointer data, gboolean select);
|
||||
#else
|
||||
/* packet list related functions */
|
||||
|
|
Loading…
Reference in New Issue