aboutsummaryrefslogtreecommitdiffstats
path: root/ui/packet_range.h
diff options
context:
space:
mode:
authorRoland Knall <rknall@gmail.com>2019-11-12 16:39:19 +0100
committerRoland Knall <rknall@gmail.com>2019-11-17 12:20:29 +0000
commitb3f240dbf8c5e24cf420e977d8544c4abb40c80e (patch)
treec783c4f210f09ed7c8ab227e9923953a6d8872e0 /ui/packet_range.h
parent7d2e3fa8f5115e8cdddd5ea7a05797151a3965e7 (diff)
Qt: Multiselection in PacketList
This implements multi-selection for the PacketList. It allows multiple lines to be selected, and either drag/drop them to a text editor or use Ctrl/Cmd+C to copy the content to a clipboard. Opening the context menu disables the selection, and it does not change the underlying currently selection. This is done on purpose, as multi-selection is a copy-task only functionality at this point Export & Print work as expected, exporting just the selected items. Same goes for the copy menu, which has the additional entries for copying the list elements Bug: 14612 Change-Id: I77960aa1ab1d172a21abfa469baac0cd57f9f9d9 Reviewed-on: https://code.wireshark.org/review/35073 Petri-Dish: Roland Knall <rknall@gmail.com> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
Diffstat (limited to 'ui/packet_range.h')
-rw-r--r--ui/packet_range.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/ui/packet_range.h b/ui/packet_range.h
index 1622648199..6e7d34d118 100644
--- a/ui/packet_range.h
+++ b/ui/packet_range.h
@@ -47,16 +47,19 @@ typedef struct packet_range_tag {
convert_ret_t user_range_status;
/* calculated values */
- guint32 selected_packet; /* the currently selected packet */
+ range_t *selection_range; /* the currently selected packets */
+ convert_ret_t selection_range_status;
/* current packet counts (captured) */
capture_file *cf; /* Associated capture file. */
guint32 mark_range_cnt; /* packets in marked range */
guint32 user_range_cnt; /* packets in user specified range */
+ guint32 selection_range_cnt; /* packets in the selected range */
guint32 ignored_cnt; /* packets ignored */
guint32 ignored_marked_cnt; /* packets ignored and marked */
guint32 ignored_mark_range_cnt; /* packets ignored in marked range */
guint32 ignored_user_range_cnt; /* packets ignored in user specified range */
+ guint32 ignored_selection_range_cnt; /* packets ignored in the selected range */
/* current packet counts (displayed) */
guint32 displayed_cnt;
@@ -64,10 +67,12 @@ typedef struct packet_range_tag {
guint32 displayed_marked_cnt;
guint32 displayed_mark_range_cnt;
guint32 displayed_user_range_cnt;
+ guint32 displayed_selection_range_cnt;
guint32 displayed_ignored_cnt;
guint32 displayed_ignored_marked_cnt;
guint32 displayed_ignored_mark_range_cnt;
guint32 displayed_ignored_user_range_cnt;
+ guint32 displayed_ignored_selection_range_cnt;
/* "enumeration" values */
gboolean marked_range_active; /* marked range is currently processed */
@@ -102,6 +107,9 @@ extern range_process_e packet_range_process_packet(packet_range_t *range, frame_
/* convert user given string to the internal user specified range representation */
extern void packet_range_convert_str(packet_range_t *range, const gchar *es);
+/* convert user given string to the internal selection specified range representation */
+extern void packet_range_convert_selection_str(packet_range_t *range, const gchar *es);
+
#ifdef __cplusplus
}
#endif /* __cplusplus */