aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2016-12-12 14:03:25 -0800
committerGerald Combs <gerald@wireshark.org>2016-12-12 23:39:42 +0000
commitce54bfe055a8f1f674f0fe19fa0236e89744cddd (patch)
treee545f7d129b976ffb7c1bd0524d91d2471aeb3bd
parent7ad655c9b69f017f880dfd1cd1d0ec4a04479e2b (diff)
Remove some GtkCList comments and code.
Remove some comments and hopefully-no-longer-necessary code specific to GtkCList. Change-Id: Ib62387f87e662798afba282cf95cbd215d60075e Reviewed-on: https://code.wireshark.org/review/19227 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
-rw-r--r--file.c46
-rw-r--r--ui/gtk/gui_stat_util.h2
2 files changed, 2 insertions, 46 deletions
diff --git a/file.c b/file.c
index 2f7aa518ee..b5920fd569 100644
--- a/file.c
+++ b/file.c
@@ -1146,19 +1146,7 @@ add_packet_to_packet_list(frame_data *fdata, capture_file *cf,
frame_data_set_after_dissect(fdata, &cf->cum_bytes);
cf->prev_dis = fdata;
- /* If we haven't yet seen the first frame, this is it.
-
- XXX - we must do this before we add the row to the display,
- as, if the display's GtkCList's selection mode is
- GTK_SELECTION_BROWSE, when the first entry is added to it,
- "cf_select_packet()" will be called, and it will fetch the row
- data for the 0th row, and will get a null pointer rather than
- "fdata", as "gtk_clist_append()" won't yet have returned and
- thus "gtk_clist_set_row_data()" won't yet have been called.
-
- We thus need to leave behind bread crumbs so that
- "cf_select_packet()" can find this frame. See the comment
- in "cf_select_packet()". */
+ /* If we haven't yet seen the first frame, this is it. */
if (cf->first_displayed == 0)
cf->first_displayed = fdata->num;
@@ -3645,38 +3633,6 @@ cf_select_packet(capture_file *cf, int row)
fdata = packet_list_get_row_data(row);
if (fdata == NULL) {
- /* XXX - if a GtkCList's selection mode is GTK_SELECTION_BROWSE, when
- the first entry is added to it by "real_insert_row()", that row
- is selected (see "real_insert_row()", in "ui/gtk/gtkclist.c", in both
- our version and the vanilla GTK+ version).
-
- This means that a "select-row" signal is emitted; this causes
- "packet_list_select_cb()" to be called, which causes "cf_select_packet()"
- to be called.
-
- "cf_select_packet()" fetches, above, the data associated with the
- row that was selected; however, as "gtk_clist_append()", which
- called "real_insert_row()", hasn't yet returned, we haven't yet
- associated any data with that row, so we get back a null pointer.
-
- We can't assume that there's only one frame in the frame list,
- either, as we may be filtering the display.
-
- We therefore assume that, if "row" is 0, i.e. the first row
- is being selected, and "cf->first_displayed" equals
- "cf->last_displayed", i.e. there's only one frame being
- displayed, that frame is the frame we want.
-
- This means we have to set "cf->first_displayed" and
- "cf->last_displayed" before adding the row to the
- GtkCList; see the comment in "add_packet_to_packet_list()". */
-
- if (row == 0 && cf->first_displayed == cf->last_displayed)
- fdata = frame_data_sequence_find(cf->frames, cf->first_displayed);
- }
-
- /* If fdata _still_ isn't set simply give up. */
- if (fdata == NULL) {
return;
}
diff --git a/ui/gtk/gui_stat_util.h b/ui/gtk/gui_stat_util.h
index 3e656e32fb..4f929bf1c2 100644
--- a/ui/gtk/gui_stat_util.h
+++ b/ui/gtk/gui_stat_util.h
@@ -48,7 +48,7 @@ typedef struct {
*/
extern void init_main_stat_window(GtkWidget *window, GtkWidget *mainbox, const char *title, const char *filter);
-/** Create a stats table, using a scrollable gtkclist.
+/** Create a stats table, using GtkListStore and GtkTreeView.
*
* @param scrolled_window the scrolled window
* @param vbox the vbox for the window