aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/packet_list.h
AgeCommit message (Collapse)AuthorFilesLines
2017-06-20Qt: Turn off auto scroll when going to a packetStig Bjørlykke1-0/+1
When going to a packet (first, last, next, prev and specific) during capture we must turn off auto scroll to let the packet be shown in the packet list. Change-Id: If1c615eb4d422c3b4c0418114064f7a4a0b75b35 Reviewed-on: https://code.wireshark.org/review/22244 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-06-20Don't scroll back to the selected frame when we get name resolution updates.Jeff Morriss1-0/+1
With live or large capture files and asynchronous name resolution this can cause serious scrolling issues as the name resolutions come in. Bug: 12074 Change-Id: I1a5cca410c0608927b32e9e7107885370caf14d7 Reviewed-on: https://code.wireshark.org/review/22245 Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-03-03Qt: Add selection history navigation.Gerald Combs1-0/+7
Add the ability to move back and forth in the packet selection history similar to GTK+. Update the documentation accordingly. Change-Id: If1fdc1e59b240c0588c292dc0f7f0a5f083c30e1 Reviewed-on: https://code.wireshark.org/review/20320 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-12-13Qt: Optionally restore our selected packet when thawing.Gerald Combs1-1/+14
Stash the current row when we freeze the packet list. Make it possible to restore it when thawing. Do so when the layout changes and when we move a column. Change-Id: I44cfb8bafcd4d49a46e1c89bf47aecf5ac139773 Reviewed-on: https://code.wireshark.org/review/19222 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-09-22Qt: Optimized setColumnVisibility() usageStig Bjørlykke1-1/+0
Setting column visibility (show/hide columns) is only needed when columns has changed and when show/hide from column popup menu. Change-Id: Ia33d6fccab44443c453921fc2629bbf1d22efd01 Reviewed-on: https://code.wireshark.org/review/17781 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-04-28Qt: Refactor the packet list scroll bar.Gerald Combs1-1/+2
Split OverlayScrollBar into parent and child scroll bar widgets. This gives us two packet list scroll bars: a packet map, which draws and operates on nearby packets and a normal scroll bar. The packet map is drawn to the left of the child scroll bar. This gives us more room to draw and doesn't obscure the scroll bar itself (which is a problem on newer versions of Windows). When the user clicks on a portion of the map, scroll to that part of the packet list. Draw marked packet ticks over the normal scroll bar. Marked & ignored are on the left, time references are on the right. To do: - Borrow more from packet fence and graph something (packet size? time delta?) Change-Id: Ie952fcbd98fd0e047200f2279cb63227feabf5b1 Reviewed-on: https://code.wireshark.org/review/15046 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-01-23ui: Code cleanupStig Bjørlykke1-1/+1
Fixed code layout to use common style in the file. Mostly whitespace changes. Change-Id: Id37b57717a9e26248fad07322dff09b1d1f45ac2 Reviewed-on: https://code.wireshark.org/review/13504 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-12-13Qt: Removed applyRecentColumnWidths from recentFilesReadStig Bjørlykke1-1/+2
Adjusting column widths from recent settings is only needed when columns has changed. Don't recreate the columns when changing timestamp options or name resolution, only reset columns. Change-Id: I4c9a9f63c34542935dd282188d98b2b5b013c5f3 Reviewed-on: https://code.wireshark.org/review/12579 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-11-28Qt: fix "go to packet" broken by g56625ddPascal Quantin1-0/+1
Keeping auto scroll is required to update the row displayed. Instead catch the mouse event and stop auto scroll only during that time. Change-Id: Ibc5b0a4115192fc3e01e63c82e67761e5aed9d3b Reviewed-on: https://code.wireshark.org/review/12235 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-11-27Qt: remove automatic horizontal scrolling when selecting a rowPascal Quantin1-1/+1
QTreeView automatically scrolls so as to show as much as possible the content of the selected column. Let's get rid of that. Rename PacketList::setAutoScroll() so that it does not overload QAbstractItemView::setAutoscroll() Change-Id: I09fb54f9b31c3025efddce6a4e709baaf107702d Reviewed-on: https://code.wireshark.org/review/12225 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-11-27Qt: Check zero recent column widthStig Bjørlykke1-0/+1
Hidden columns may have been stored with zero width, so ensure we always check for this when fetching. Change-Id: I625c05adccaf2d81198fdeeccf7feeb9a9eb82c2 Reviewed-on: https://code.wireshark.org/review/12196 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-11-26Qt: Use correct column width when switching profileStig Bjørlykke1-0/+1
QTreeView::setColumnHidden() saves column width on hide and restores column width on show. When switching from a profile with hidden columns to a profile where this columns are shown we get a sectionResized() signal with the saved width from the old profile, initiated from columnsChanged() -> setColumnVisibility(). We must avoid setting this as a new column width because this is recent values from a old column layout. In other cases we use setColumnVisibility() we don’t need to set a new column width either, because we store the column width ourself. Don't store column width when hiding column (new_width == 0). Restore column width when showing column because profiles may have changed the packet_list layout. Change-Id: I7e89c3477402ec6d621cd2015ee74b086f60d6cb Reviewed-on: https://code.wireshark.org/review/12111 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-11-23Qt: Fixed more column issues when changing profile.Stig Bjørlykke1-0/+1
When changing profile without a loaded capture file we have to rebuild cap_file_->cinfo when a capture is loaded. Bug: 11493 Change-Id: I9b561a360236056c104cfdb478b855fa550325e2 Reviewed-on: https://code.wireshark.org/review/12068 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-11-13Qt: Coloring Rules dialog fixups.Gerald Combs1-1/+1
Insert new rules at the top. This matches the GTK+ UI behavior. Recolor the packet list when we press "OK". Add a "to do" item about setting the filter column width. Change-Id: I2a9e58fe8642a89f12e1c34622b96613f3ec4c05 Reviewed-on: https://code.wireshark.org/review/11781 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-10-27Add preferences for related packets and the scroll bar minimap.Gerald Combs1-1/+1
Add gui.packet_list_show_related and gui.packet_list_show_minimap. Show_related enables and disables the related packet delegate. Show_minimap enables and disables the minimap. Start calling it the "intelligent scroll bar" since that's the best suggestion for a name I've seen so far. Leave them out of the Appearance preference pane for now. Change-Id: I5869c446fda5c8e62d6b1e49a74d63ba3b117b0f Reviewed-on: https://code.wireshark.org/review/11332 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-10-19Qt: fix time shiftGerald Combs1-0/+2
Add a timeShifted signal to TimeShiftDialog and use it to update the packet list and model. Add drawCurrentPacket to PacketList so that we can do a more thorough job of redrawing the current packet and tree. Bug: 11575 Change-Id: I960d8cdbf6872e3f71007cb4d2bbd5457f268257 Reviewed-on: https://code.wireshark.org/review/11068 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-09-23Qt: Always make the packet list row heights uniform.Gerald Combs1-1/+1
In tests here using GTK+ 2.24 and 3.10, GtkTreeView handles multi-line items by adjusting the height for all rows, but only after the number of multi-line items exceeds some sort of threshold. For a packet capture which contains a few DNS packets and a lot of TCP packets, if I change "Standard query" to "Standard\nquery" in packet-dns.c I get single-height packet list items. If I change "[TCP segment of a reassembled PDU]" to "[TCP segment of a\nreassembled PDU]" in packet-tcp.c (which results in more multi-line column strings) I get double-height packet list items. The current Qt code initially sets the uniformRowHeights property then falls back to variable row heights if we run across a multi-line column string. This adds a lot of logic which can impact other functionality (e.g. column widths) and recalculating row heights is painfully slow for large numbers of packets. Instead of trying to manage variable row heights, always enable uniformRowHeights. Track the maximum newline count and trigger a row height adjustment when it changes. This mimics the GTK+ UI behavior, although it should be more reliable. Note that we need to adjust some numbers in RelatedPacketDelegate. Change-Id: I289e963b6f00338c4374e602fa3fc83d04554519 Ping-Bug: 11515 Ping-Bug: 10924 Reviewed-on: https://code.wireshark.org/review/10628 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-09-17Packet list speedups.Gerald Combs1-0/+2
beginInsertRows + endInsertRows is expensive. Instead of calling them each time we add a packet to the list, queue up a list of visible packets and flush it during the next UI update. Assume that none of our column data has newlines. Enable uniformRowHeights and only disable it when we need to. Note that this requires further work. Ping-Bug: 11515 Ping-Bug: 10924 Change-Id: Ifbdd2964b174247a4745d4889ebda5bf3b886ba4 Reviewed-on: https://code.wireshark.org/review/10553 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-09-08Qt: Fixed a resource leak in getFilterFromRowAndColumnStig Bjørlykke1-1/+1
Found by coverity CID 1314608 and Apple Instruments. Change-Id: I264ce335bd8985946a097bb8f99f7c41c0eb027d Reviewed-on: https://code.wireshark.org/review/10378 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-17Qt: Always rebuild columns when fields changedStig Bjørlykke1-0/+1
The columns must be recreated even if no capture file is loaded because custom columns may have reference to deregistered fields. Change-Id: I4ed7345b3200e5af211695f1a6511ee229d5f13c Reviewed-on: https://code.wireshark.org/review/10076 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-06Add an elide mode preference for the Qt packet list.Gerald Combs1-0/+1
Change-Id: I081cc1e9b2a0eea7f0a3ef1157561c50beb4c4db Reviewed-on: https://code.wireshark.org/review/9902 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-30Packet list and detail context menu updates.Gerald Combs1-0/+2
Add some missing items to the packet list and detail "Copy" context menus. Don't nest the "Copy" items so deeply. Add YAML to the supported summary formats. Note that "Copy as Binary" copies to the clipboard as application/octet-stream, which is a) arguably correct, and b) not very useful. Fixes welcome. Enable and disable packet detail context menu items from a set of booleans similar to the packet list. Change-Id: Iaa931c766aa476c33f27de089e5c4dbaf9ce74d6 Ping-Bug: 9320 Bug: 10831 Reviewed-on: https://code.wireshark.org/review/9825 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-29Main menu and packet list menu updates.Gerald Combs1-0/+3
Enable and disable packet list-relasted menu items in one place. Add "Colorize Conversation" items to the packet list context menu. In the GTK+ UI we tend to disable entire menus, which makes their items inaccessible. Try not to do that in the Qt UI so that menu items are always visible even if they're disabled. Remove commented items which are now complete. Change-Id: I69b878b45334bf88014694b1bf016278fa55a94b Reviewed-on: https://code.wireshark.org/review/9819 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-27Fixup packet list context menu behavior.Gerald Combs1-1/+1
Add logic to setMenusForSelectedPacket for setting the enabled states for the "Apply As" and "Prepare A" actions. Update the PacketList context menu code to fill in the right filter at the right time. Exit out of setMenusForSelectedTreeRow if the packet list has focus so that we don't clobber the enabled states of various actions. Take the "Apply As" and "Prepare A" context menu titles from their main window counterparts. Remove actionApply_as_Filter and actionPrepare_a_Filter. Remove completed to-do items. Change-Id: I8f6f538bb7786d8df02a999f3b449dfde640e847 Reviewed-on: https://code.wireshark.org/review/9810 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-20Qt: Add option to back white line separator for packet list itemsMichal Labedzki1-0/+2
This uses one line (on bottom) of items and makes it white. Seen in Wireshark on some configurations of GTK 2 on Linux, so backports it to Qt for people who like it. In my opinion it helps if you use packet list background colors for frames and you have a lot of following frames with the same background color. Bug: 10954 Change-Id: Id8f58520d7224db4eb8181bcc04febd7416a8578 Reviewed-on: https://code.wireshark.org/review/7293 Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-07-16Draw packet colors in the packet list scrollbar.Gerald Combs1-2/+13
Inspired by (but not as fancy as) Packet Fence, an enhancement written for Ethereal a loooong time ago by Martin Visser: https://www.wireshark.org/lists/ethereal-dev/200011/msg00122.html Several text editors call this a "minimap". Color each scrollbar raster line to match the color of up to 7 packets. Note in the comments why this number was chosen. If we have any flagged frames (marked, ignored, time ref) indicate them on either side of the scrolbar. Handle HiDPI (retina) displays. This means that your window size depends on the height of your scrollbar *and* your monitor resolution. Qt's idea of the slider rect doesn't match up with the slider on OS X. This might be local to my build -- I can replicate it Qt Creator. Change-Id: Ia089d2d766ce37bab11e22d1a5721b4908935304 Reviewed-on: https://code.wireshark.org/review/8982 Reviewed-by: Gerald Combs <gerald@wireshark.org> Tested-by: Gerald Combs <gerald@wireshark.org>
2015-07-16Qt: Frame flag updates.Gerald Combs1-3/+0
Move frame flag (mark, ignore, ref_time) member functions from PacketList to PacketListModel. They arguably belong there and we can emit dataChanged to signal updates. Rename some variables named "index" since they shadow a function name. Change-Id: I9a731a76e4e63e562b561c29d13915278d5a7dbb Reviewed-on: https://code.wireshark.org/review/9663 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-07-13PacketList column fixes.Gerald Combs1-0/+2
Add a columnsChanged slot to PacketList and move the column update code from redrawVisiblePackets there. Make sure we call packet_list_model_->recreateVisibleRows, which should fix the behavior described in bug 11324. Call columnsChanged when we, uh, change columns. Add a sectionMoved slot to handle column reordering. Don't rebuild the column list when we update the widgets in the column preferences frame. Do enable and disable the "remove" button as needed. Try to keep the user from removing all of the columns in both the packet list and column preferences. Left as an exercise for the reader: The GTK+ UI also fails when you remove all of the columns via the preferences: packet_list.c:377:packet_list_sort_column: assertion failed: (col) Bug: 11324 Change-Id: Id58cf98e42cbda9aa2fc370ea06b8bcc6098c8ca Reviewed-on: https://code.wireshark.org/review/9591 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-06-18Add a preferences editor frame.Gerald Combs1-0/+1
This replaces the single preference editor dialog in the GTK+ UI. Change-Id: I10e030981e9f7d1ec121811593586b65cf0797c5 Reviewed-on: https://code.wireshark.org/review/8966 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-06-17Qt: Add protocol preferences menus.Gerald Combs1-1/+4
Add protocol preferences in the packet list and packet detail context menus. Note that we need a PreferencesEditorFrame in the main window for editing numeric and string preferences. For now we just show the prefs dialog. Change-Id: Ice0cc8e9bc25963cc14aa47698f042f2a73088d8 Reviewed-on: https://code.wireshark.org/review/8957 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-29Qt: Add Conversation Filter sub menuAlexis La Goutte1-0/+1
Apply conversation filters using the new color_dissector_filters.[ch] from g1f03180. Change-Id: I2e535bb3d5b95fd26226422daf9f83c452a95e3c Reviewed-on: https://code.wireshark.org/review/3558 Petri-Dish: Gerald Combs <gerald@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-14Qt: Column preference fixes.Gerald Combs1-1/+2
Don't call redrawVisiblePackets in PacketList::sectionResized. Otherwise we trigger the crash in bug 11179. Call recent_set_column_width instead. Clean up the slots called when column preferences change and when recent column widths change. Update our column visibility in redrawVisiblePackets. Use recent_get_column_width when writing the recent file. columnWidth doesn't return a valid value when we're not visible. Bug: 11179. Change-Id: I34ab93d944b341e42129a1c8ff94ba8f7ad4f5fc Reviewed-on: https://code.wireshark.org/review/8457 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-05-08Expert Info dialog.Gerald Combs1-0/+1
Show all expert messages in a combined view. Group top-level items by a (severity, group, protocol) tuple. Let the user enable and disable messages via a check menu. Add ProtoTree::goToField and expert_info_t.hf_index. Use them to jump to what we hope is the afflicted item. Enable the context menu only if the user has selected a packet item. Add a free-form search field that matches expert summaries. This differs from the GTK+ version but hopefully provides a smoother workflow. Bug: 10931 Change-Id: Ia12cb7c27cdea1634fa2798fb7e4c1b23bd16ad2 Reviewed-on: https://code.wireshark.org/review/8294 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-05-07Qt: Fix packet list column resizing.Gerald Combs1-0/+1
The size hint changes in g5ab8490 broke packet list column resizing. Add back a way to force the hinting necessary for sizeHintForColumn to work properly. Bug: 11067 Ping-Bug: 10924 Change-Id: Icd525200f7a88f2b6d22a3039cda98ad0527239e Reviewed-on: https://code.wireshark.org/review/8334 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-03-05Qt: Add extra related packet indicator types.Gerald Combs1-1/+0
Add the ability to set frame number types: none, request, or response. Use the types to draw different related packet indicators in the packet list. Track the conversation in PacketListRecord. Use it to draw dashed lines for unrelated frames. Set frame number types for DNS and ICMP. Instead of drawing a transparent QImage, alpha blend our foreground color and draw directly in our painter. Blend more toward the foreground color. Add FRAMENUM_TYPE to checkAPIs. Change-Id: I2495945bb436413e05d6ec697184a0b4fd5ad214 Reviewed-on: https://code.wireshark.org/review/7436 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-27Qt: Automatically scroll the packet list.Michal Labedzki1-2/+14
Add an "Auto Scroll in Live Capture" action to the Go menu. It's in the View menu in the GTK+ UI but it seems to make more sense as a navigation item. Use a timeout interval for automatic scrolling. I haven't run any tests to see if this makes a difference but it would seem that the less drawing we do during a high speed capture the better, particularly for remote displays. Update the x-stay-last icons. Note that we might want to make prefs.capture_auto_scroll a "recent" setting. Mark auto_scroll_live and packet_list_check_end GTK+ only. Bug: 10601 Co-authored-by: Gerald Combs <gerald@wireshark.org> Change-Id: I645d27c0814f0e4a0d5b01ae68be366847e2522d Reviewed-on: https://code.wireshark.org/review/7292 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-24Qt: Apply recent settings.Gerald Combs1-1/+4
Add PacketList::applyRecentColumnWidths which set the packet list column widths from our recent settings. Make sure it gets called at startup and when we change profiles. Save the packet list header state so that we can restore it when we reset the model (i.e. freezing and thawing) and load a new capture file. Save the state when the user resizes a column. As a side effect this works around a weird bug that adjusts the width of column 1 at an inopportune time. Add a profileChanging signal so that we can save the main window geometry in each profile. Get rid of MainWindow::configurationProfileChanged. It was unused. Apply saved pane widths and heights. Note that we might want to add a separate pair of recent settings for the Qt panes. Use the last opened directory in the capture file dialog. Git rid of some unneeded Q_UNUSEDs while we're here. Bug: 10953 Change-Id: I812aff59818cf0b4d1598b580627d32728d2e9d7 Reviewed-on: https://code.wireshark.org/review/7247 Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Michal Labedzki <michal.labedzki@tieto.com> Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-10Qt/C++: Change a bunch of includes to forward declarations.Gerald Combs1-1/+0
In theory this this should reduce compilation times. On my particular system it makes no difference but hopefully it will elsewhere. Change-Id: I570177d3ca4eec691c82d46b4dbbce74092aac1d Reviewed-on: https://code.wireshark.org/review/7060 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-07Qt: Add the Coloring Rules dialog.Gerald Combs1-0/+1
Merge in the old ColorDialog which was a placeholder for color_filter_add_cb. Change-Id: I48d188509f480b8514122b4011ac9d8790fcca10 Reviewed-on: https://code.wireshark.org/review/6996 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-01-06Qt: Add a context menu to the packet list header.Gerald Combs1-0/+28
Don't carry over the sort items from the GTK+ UI (for now, at least). Update some names. Add a column editor frame similar to the "Go to Packet" and "Search" frames. Change-Id: I1bd3834a26994de96894d2b7512bce2c19915c77 Reviewed-on: https://code.wireshark.org/review/6277 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-11-05Qt: Simplify disabling entries in ContextMenuMichal Labedzki1-2/+0
We have direct access to every entry (action) in ContextMenu. Use it instead of storing "actions" and checking its name. Change-Id: I97a1723898409faf13280c5655b7738661ab594b Reviewed-on: https://code.wireshark.org/review/5135 Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com> Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-10-21Qt: Fill in time display menu items. Other fixes and updates.Gerald Combs1-1/+1
Reselect the current packet when we redraw the packet list. Don't crash if we try to mark when no frame is selected. Try to invalidate cached packet list strings when needed. Rename PacketList::updateAll to redrawVisiblePackets so that its purpose is more clear. When changing the font size, call redrawVisiblePackets instead of rebuilding the entire list of visible rows. Change-Id: I6e7a15067e7063d0efc26082170e1795ae3c0779 Reviewed-on: https://code.wireshark.org/review/4901 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-09-23Qt: Add zoom and column resize actions.Gerald Combs1-0/+1
Plumb signals and slots for changing the text size in the main window. Remove the bold font code from WiresharkApplication. It was only used in ByteViewText. Adjust the icons a bit. Bug: When we change the font preferences the packet list stops drawing cached strings. I haven't been able to track down the cause. Change-Id: I609d740c9f26265628fa4b7de1b75b0e56651387 Reviewed-on: https://code.wireshark.org/review/4269 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-08-29Qt: Rework the "Manage Interfaces" dialog.Gerald Combs1-1/+0
Convert QTableWidget to QTreeWidget. It looks like the GTK+ version has a separate set of apply/save buttons for each tab which *only* operates on that tab. This can result unexpected behavior which throws away changes if the user updates more than one tab. Use a single "OK" button that applies all of our changes instead. Reorder the tabs. Put Local Interfaces first and select it by default. Always show Remote Interfaces. Disable it on platforms that don't have PCAP_REMOTE. Automatically start editing when we add a new pipe. Don't immediately update pipe interface settings. Wait until we hit "OK" instead. Rename NewFileDelegate to PathChooserDelegate. Note that we might want to move it use it elsewhere in the application. Try switching the user-facing terminology from "Hide" to the more positive "Show". Tell the user that we don't save pipe or remote interface settings. Add a help URL for the "Manage Interfaces" dialog box. Use the GLib and Qt string functions and classes to split and join comma-separated preferences. This makes sure capture_dev_user_descr_find doesn't skip over the first interface. It also keeps the Qt code from adding a leading comma to our capture preferences. Add a note about strings to README.qt. Summary: Use QStrings. For another day: - If we *do* save remote settings we need to store credentials securely, e.g. with CryptProtectData. - Get rid of the remote settings dialogs. Their controls should fit in the remote settings tab. - Add an extcap tab. - We need getter/setter functions for global_capture_opts.all_ifaces. We iterate over it *way* too much. Change-Id: Ib7b61972f3ece4325e0230f725e7f2678acbb24b Reviewed-on: https://code.wireshark.org/review/3873 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-07-21[WIP] Add a conversation dialog.Gerald Combs1-1/+1
Items are sorted by value. Move common conversation code to ui/conversation_hash.[ch]. Add a conversation_type_e enum along with convenience functions for fetching titles, tap names, etc. We have a single main dialog instead of a main dialog + individual protocol dialogs. It de-clutters the statistics menu and results in simpler code. Conversation type tabs can be added and removed within the dialog itself. The tab list is sticky and saved with the current profile when the dialog closes. Data can be copied as CSV or YAML. Add a FilterAction class and a corresponding filterAction slot to MainWindow. Use it for the Conversations context menu. Add an addressResolutionChanged signal and related plumbing. Get rid of the iterator members in the conversation item struct. Update the GTK+ code accordingly. Excercise for the reader: - Update TShark to use the common hash code. Ping-Bug: 9231 Ping-Bug: 8703 Ping-Bug: 6727 Change-Id: I8728d771fc5b1a85937bed9d898e53c3ecc3a544 Reviewed-on: https://code.wireshark.org/review/2987 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-16Column visibility fixups.Gerald Combs1-0/+1
Move visibility to its own method and call it when we show ourselves and when we thaw. Change-Id: I936cd33e5ccabddb32061ea347a465ac12f1be87 Reviewed-on: https://code.wireshark.org/review/2289 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-03-04Remove all $Id$ from top of fileAlexis La Goutte1-2/+0
(Using sed : sed -i '/^ \* \$Id\$/,+1 d') Fix manually some typo (in export_object_dicom.c and crc16-plain.c) Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8 Reviewed-on: https://code.wireshark.org/review/497 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2013-12-10Add "Decode As" to the packet list and protocol tree context menus.Gerald Combs1-0/+1
Automatically add a new item if "Decode As" is triggered from the context menus. svn path=/trunk/; revision=53915
2013-11-22Fix packet list selection signaling.Gerald Combs1-1/+1
It looks like resetting the packet list model during freezing and thawing disconnects the selection changed signal between the model and the main window. Rename the packet list's setMenusFollowStream signal to packetSelectionChanged and use it to trigger menu updates in the main window. svn path=/trunk/; revision=53516
2013-11-15When we freeze the packet list disconnect its model.Gerald Combs1-0/+2
This matches the GTK+ behavior and keeps us from dissecting TCP packets out of order when we follow a TCP stream. svn path=/trunk/; revision=53342