Commit Graph

45 Commits

Author SHA1 Message Date
Guy Harris 4dd48721ee Rename cf_get_comment() to reflect what comment it gets.
Change-Id: Id3b0430a1d462b29833259462536ed4cb0424f77
Reviewed-on: https://code.wireshark.org/review/22662
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-07-17 03:49:33 +00:00
Stig Bjørlykke 578f2a15bb Qt: Restore multi custom column width and align
Put custom column field settings in quotes in the recent file to
support multi custom columns which contains space.  Otherwise the
space will be removed in prefs_get_string_list() and the field will
not match when reading the recent file.

Change-Id: Ic6e2b1e02d68970a4e11fbecbe55a7b10f8b10dd
Reviewed-on: https://code.wireshark.org/review/22349
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-22 15:57:12 +00:00
Michael Mann 887b203083 Don't copy details of hidden columns.
Bug: 11788
Change-Id: I3f4df884d98903222de8a340de6a08e680687b0a
Reviewed-on: https://code.wireshark.org/review/15727
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-06-05 10:02:06 +00:00
Michael Mann 5e4bbcda98 Refactor GUI dependencies out of color_filters.[ch] and move it to epan directory.
This also moved color.h into color_filters.h

Change-Id: Ic19e27aa1b3ec67e764aa7ee8bbef7b1187bb12e
Reviewed-on: https://code.wireshark.org/review/12831
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-28 18:33:41 +00:00
Michal Labedzki 9bb3f6be4c Qt: Add missing multi-field column validation
GTK already has it, but Qt forgot about it, so multi-field custom column
works ok if previously saved in GTK-shark. Invalid validation prevent from
modifying and saving multi-field custom column in Qt version.

While at it, rename "custom field" to "custom fields" to ensure
we think about multi-field custom column.

Change-Id: I99588150ccb38be11b75f5dd5b0f6443e7055ebb
Reviewed-on: https://code.wireshark.org/review/12685
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-12-20 08:21:02 +00:00
Stig Bjørlykke c5fb402222 Qt: Set tooltip for packet list header
Added get_column_tooltip() to use common code in GTK and Qt.

Change-Id: I2f6ce95e2e129752bbb958a28aec6f42aa81be3d
Reviewed-on: https://code.wireshark.org/review/12047
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-11-23 05:41:09 +00:00
Roland Knall 61ea02b145 PluginIF: Fix GTK PluginIF interface
- Move the apply-filter code to main_menubar,
   because there already the code of the preference
   pop-ups is handled

 - Fix the apply-filter callback, which was not working
   at all

Change-Id: I25d5a161d8b78695c15b3100653be36786129408
Reviewed-on: https://code.wireshark.org/review/10444
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-09-09 04:12:11 +00:00
Michael Mann da09a1bfd8 Take all epan_column_info members that always get allocated to "number of columns" to share their own data structure.
Change-Id: Ib982662db6cf68730a7d121eac60d9bc5ae67429
Reviewed-on: https://code.wireshark.org/review/9195
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-29 02:11:04 +00:00
Evan Huus 78e71f6f5a Remove the other g_hash_table_contains
Missed a bunch of them in g131f8f0.

Change-Id: I5b1df810a31c26c3ab3cd778f8774519283217c8
Reviewed-on: https://code.wireshark.org/review/9143
Reviewed-by: Evan Huus <eapache@gmail.com>
2015-06-25 18:56:15 +00:00
Roland Knall acc581081e Plugin Interface: Add GUI callbacks
Rename ext_menubar to a more appropriate plugin_if.

 External menus can be implemented by plugins to present
 additional menus for deep-packet analysis. One side-effect
 of such menus being implemented as plugins is, that they
 are being executed in different threads and therefore can
 only use limited access to the main GUI. Also, there is
 no safe cross-gui (GTK and Qt) way for many features.

 This patch implements a first functionality, by which a
 plugin implemented using ext_menubar can apply a display
 filter to the main view.

 For now the implementation supports filtering, as well as
 saving a preference.

Change-Id: Iffe4caa954bbeb8ce356352de4dae348a50efba9
Reviewed-on: https://code.wireshark.org/review/8773
Reviewed-by: Roland Knall <rknall@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-06-25 16:23:08 +00:00
Pascal Quantin 244f2fbbf6 GTK: fix a crash when switching a column to custom through 'Edit Column Details'
Bug: 11245
Change-Id: I269d4dc8bd1ec23e3e6be4c9432563b8e275c548
Reviewed-on: https://code.wireshark.org/review/8778
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-06-05 21:14:08 +00:00
Jeff Morriss 8e709fca69 Assert that the row number passed to packet_list_get_row_data() is valid.
Unfortunately that row number may come from a dissector/tap but allowing us
to continue just causes us to die horribly later (and we can't except out of
processing a tap).

Change-Id: I37f03385db55dbe55f91e2ec6a03add5664857ba
Ping-Bug: 10885
Reviewed-on: https://code.wireshark.org/review/7652
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-03-12 05:18:39 +00:00
Bill Meier bfde04b845 ui/gtk/*.c: Add editor modelines; As needed: Fix indentation
Change-Id: I8cd9d9fe5f12c284f46b8f725766f681faccd753
Reviewed-on: https://code.wireshark.org/review/7138
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-02-15 19:02:30 +00:00
Alexis La Goutte ec7ff4e25d GTK: fix no previous prototype for ... [-Wmissing-prototypes]
Add by commit g43f09e67b (Remove unneeded includes from ui folder)

Change-Id: I66eb113430bde97e18bb3d2b00f6bac46a01797e
Reviewed-on: https://code.wireshark.org/review/6809
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-01-27 12:37:10 +00:00
Peter Wu ff01bc6c4e gtk: fix crash when moving columns
When the columns are moved, the packet list is redrawn from the
columns-changed signal handler. Apparently GTK does not like that the
parent contains got destroyed.

Call packet_list_recreate outside the callback to workaround this issue.
Since the signal handler is blocked, it can never be called twice (and
there will always be at most one packet_list_recreate_delayed
scheduled).

Bug: 10795
Change-Id: Ia97d330c8bef747809fa09a8709a19cb03c7e00a
Reviewed-on: https://code.wireshark.org/review/5881
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-01-04 16:46:52 +00:00
Martin Mathieson 43f09e67b4 Remove unneeded includes from ui folder
Change-Id: Ifd1eebff9080cd3867e44e4dcb2d2681370ed60a
Reviewed-on: https://code.wireshark.org/review/6128
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2015-01-01 23:11:10 +00:00
Michal Labedzki 7b2ae71235 Fix filter valid/invalid test for multifield custom type
Check for "or" or "||" (also ignore whitespaces)
and check both arguments of this operator to be
fieldname (character check), then check whole filter is valid
for dfilter compiler.

Change-Id: I412b5dc1fca16fcd2b640aa74af81167300fd11e
Reviewed-on: https://code.wireshark.org/review/5848
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Tested-by: Michal Labedzki <michal.labedzki@tieto.com>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2014-12-20 17:59:25 +00:00
Alexis La Goutte 296591399f Remove all $Id$ from top of file
(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>
2014-03-04 14:27:33 +00:00
Jakub Zawadzki 65db82872c When including <epan/prefs.h> don't force inclusion of <epan/uat.h>
svn path=/trunk/; revision=53769
2013-12-03 22:16:49 +00:00
Jakub Zawadzki 6aec20c782 Rmove packet_info argument from packet_list_append(), never used.
Part of attachment 12060, from Didier Gautheron (bug #9419).

svn path=/trunk/; revision=53544
2013-11-24 12:49:50 +00:00
Jörg Mayer 662c7704f8 After looking for something in the column-*.h files and
not finding it, I finally found it in column_info.h
Renamed column_info.h to column-info.h to have consistency
with the column*h files.

svn path=/trunk/; revision=52667
2013-10-18 13:06:05 +00:00
Jakub Zawadzki 08eb36b5af Remove fdata->opt_comment, add pkt_comment to pinfo
Original (read from file) comments can be accessed by pkthdr->opt_comment
Keep user comments in seperated BST, add new method for epan session to get it.

svn path=/trunk/; revision=51090
2013-08-01 20:59:38 +00:00
Gerald Combs 59644b3899 New Qt feature: Show related packet list items in the frame number
column. Conversation spans (setup frame to last frame) are shown with a
square bracket. Linked frames are shown with a circle.

Use correct column justifications in Qt. Move common
justification-related packet list code to ui/packet_list_utils.[ch].

Add a last_frame element to conversation_t.

svn path=/trunk/; revision=50447
2013-07-08 16:54:18 +00:00
Jakub Zawadzki 97d59088b0 #gtk #packet-list simplify, use gtk_tree_view_column_add_attribute() for text attribute.
svn path=/trunk/; revision=50176
2013-06-26 22:03:57 +00:00
Guy Harris 039a075699 Eliminate some includes of ui/simple_dialog.h by files that don't use
anything from it.

svn path=/trunk/; revision=49277
2013-05-13 22:50:29 +00:00
Evan Huus 4836f13ac0 From Michail Koreshkov via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8371
Add item to context menu of frame references to open the referenced frame in a
new window. Very useful when the referenced frame is hidden by a filter.

From me:
- modelines
- simplify some of the logic

svn path=/trunk/; revision=48451
2013-03-21 15:27:38 +00:00
Bill Meier 8112ecc321 From beroset:
remove C++ incompatibilities
 https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 attachment #10404

Note: The following parts of the patch had been previously done:
 asn1/snmp/packet-snmp-template.c
 epan/dissectors/packet-snmp.c
 epan/dissectors/packet-x11.c

Also; hostlist_table.c: code under '#ifdef HAVE_GEOIP'
 didn't compile and needed a few additional patches.


svn path=/trunk/; revision=48447
2013-03-21 02:29:09 +00:00
Bill Meier 96a24cc79f Fix spelling/typos found using a list of commonly misspelled words.
The misspellings were mostly in comments but some were
in text strings visible to the user.


svn path=/trunk/; revision=47899
2013-02-26 04:42:26 +00:00
Gerald Combs 21e66f0c6f Add column preferences.
svn path=/trunk/; revision=47231
2013-01-23 19:04:36 +00:00
Gerald Combs 6ef1fc5002 GTK+:
Get rid of user-hostile behavior. In the layout preferences pane 2 & 3
radio buttons overrode the user's selection if a duplicate item was
selected. Now we assume that the user knows what he or she is doing and
steal duplicate selections from the other panes.

Qt:

Match the new GTK+ behavior in the layout preferences. Add padding
around the layout images. Add toolbar style preferences to the
Appearance pane (instead of the layout pane).

All:

Remove the selection mode and scrollbar placement prefs and mark them
obsolete as recently discussed on -dev.

Adjust the layout images yet again after more Awful Monitor Testing.

svn path=/trunk/; revision=47214
2013-01-22 18:27:18 +00:00
Gerald Combs ae7ee61e84 Rename the "saved_val" preference element to "stashed_val" in order to
more clearly indicate that it's a copy of a preference value rather than
something we've saved in the preferences file. Update
prefs_pref_to_str() to handle default, stashed, and current prefs.

Create ui/preference_utils.[ch] and move some common routines there. Use
prefs_pref_type_name() in the GTK+ preferences dialog.

Make the "OK" button in the Qt preferences dialog work. We simply write
the prefs and redissect on "OK" and do nothing on "Cancel". This is
intentionally different from the Apply/OK/Cancel behavior in the GTK+
version.

Add a general "emitAppSignal" method to wsApp and use it for packet
dissection and preference changes.

Suggest that we might want to create a WsString class to make conversion
between QStrings, gchar *s, and GStrings easier.

svn path=/trunk/; revision=47139
2013-01-18 00:50:14 +00:00
Bill Meier e28da09c31 Replace gtk_table...() with ws_gtk_grid...().
Also: Do some minor whitespace cleanup.

svn path=/trunk/; revision=47026
2013-01-11 01:19:05 +00:00
Guy Harris 8ed7a73e22 Fix a bunch of warnings.
Cast away some implicit 64-bit-to-32-bit conversion errors due to use of
sizeof.

Cast away some implicit 64-bit-to-32-bit conversion errors due to use of
strtol() and strtoul().

Change some data types to avoid those implicit conversion warnings.

When assigning a constant to a float, make sure the constant isn't a
double, by appending "f" to the constant.

Constify a bunch of variables, parameters, and return values to
eliminate warnings due to strings being given const qualifiers.  Cast
away those warnings in some cases where an API we don't control forces
us to do so.

Enable a bunch of additional warnings by default.  Note why at least
some of the other warnings aren't enabled.

randpkt.c and text2pcap.c are used to build programs, so they don't need
to be in EXTRA_DIST.

If the user specifies --enable-warnings-as-errors, add -Werror *even if
the user specified --enable-extra-gcc-flags; assume they know what
they're doing and are willing to have the compile fail due to the extra
GCC warnings being treated as errors.

svn path=/trunk/; revision=46748
2012-12-26 05:57:06 +00:00
Gerald Combs a5d5162826 Qt: Implement packet comments. Fix packet detail updates.
GTK+: Shorten the packet comment menu item name.  Remove a couple of
unneeded includes.

Both: Add an arbitrary 20 MB limit when fetching all packet comments.
Use a color from the Tango palette for comments.

svn path=/trunk/; revision=46709
2012-12-23 04:37:58 +00:00
Evan Huus 52aff57285 Remove unneeded initializations, and one redundant if condition.
svn path=/trunk/; revision=46702
2012-12-22 21:14:13 +00:00
Anders Broman 55a7c0f646 Get rid of now unused variable.
svn path=/trunk/; revision=46223
2012-11-27 14:42:28 +00:00
Anders Broman 18d5f2dbfc Start including info from Statistics/Summary.
svn path=/trunk/; revision=46219
2012-11-27 13:35:33 +00:00
Anders Broman 77dafd7b7c Add comment syúmmary to GUI and add Capture comment from SHB.
svn path=/trunk/; revision=46206
2012-11-26 18:52:29 +00:00
Anders Broman beeabf86aa Rudimentary code to show comments summary.
svn path=/trunk/; revision=46204
2012-11-26 16:11:04 +00:00
Anders Broman fbce97738b From Preben Guldberg:
Add a tooltip for a pkt_comment column to show packet comment.

Modified to check frame data for packet_comment and show it as
a tooltip for the entire row.

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7995

svn path=/trunk/; revision=46141
2012-11-22 12:33:21 +00:00
Alexis La Goutte b504e64b6a From Edwin Groothuis via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7842
Make relative time columns rightly right justified

When showing the relative time in the framelist columns, they are left aligned.
This is sub-optimal if you are scanning the list for a different time.

This patch, very small, will properly right justify these times:
DELTA_TIME
DELTA_TIME_DIS

svn path=/trunk/; revision=45481
2012-10-11 20:16:24 +00:00
Evan Huus 92c3bc0228 Don't leak all of our column data in packet_list_recreate (I think we still leak
some of it?).

Maybe part of https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7775

svn path=/trunk/; revision=45388
2012-10-08 15:12:45 +00:00
Jeff Morriss 3729335973 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45016
2012-09-20 01:48:30 +00:00
Jörg Mayer 12a0aa4849 - Replace packet_list_recreate_visible_rows -> packet_list_recreate_visible_rows_list
- Replace new_packet_list_ -> packet_list_


svn path=/trunk/; revision=44765
2012-09-04 02:35:25 +00:00
Jörg Mayer 380fe63a6d Rename new_packet_list.[ch] to packet_list.[ch]
svn path=/trunk/; revision=44764
2012-09-04 01:57:36 +00:00