summaryrefslogtreecommitdiff
path: root/ui/gtk/packet_panes.c
AgeCommit message (Collapse)AuthorFilesLines
2016-09-01gtk: fix compilation with GTK+ before 2.18Peter Wu1-0/+1
Removed in v1.99.2rc0-399-g43f09e6, but some includes are still needed. Basically I looked for the functions defined in the ui/gtk/old-gtk-compat.h header file that were in files below ui/gtk/. Then I matched it against the removed part in the above commit and added the header back at its old place. In two other cases, the header was only needed for Windows. If the above commit did not reference the file, I checked which function was in use and added the header on top, removing redundant conditionals. Reported and tested by a user of GTK+ 2.12.12 on top of v2.0.5. Change-Id: I649eec1e5531070f88c99d893c4920306f56d849 Reviewed-on: https://code.wireshark.org/review/17371 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2016-09-01gtk: fix 32-bit buildPeter Wu1-2/+2
32-bit glib before 2.31.2 expand GUINT_TO_POINTER(x) as (gpointer)x. add explicit cast since curr_layer_num is 8 bits. Fixes v1.99.10rc0-179-g1d7bcb2. Storing a 64-bit integer into a 32-bit pointer makes the compiler complain. Add explicit cast. Fixes v1.99.1rc0-76-ged0b19b. Change-Id: I75fdf17882a0f5ddce7d3b3e74b1bf80ff6cd4ae Reviewed-on: https://code.wireshark.org/review/17417 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2016-05-10Have fvalue_to_string_repr always return an (wmem) allocated buffer.Michael Mann1-2/+2
Previous patches converted all fvalue_to_string_repr calls to expect an allocated buffer (and not a passed in one). Now changing signature to force an allocated buffer. Added wmem in case that can be taken advantage of within epan (and since the function signature was changing anyway). Change-Id: Ica1ac4a9a182ce0e73303856329e198d9d525b7b Reviewed-on: https://code.wireshark.org/review/15343 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-01-01No, you don't have to allocate colors.Guy Harris1-11/+0
That code's been unused since at least 1.12, so apparently it's not needed. To the extent that it needs to be allocated at all - which is the case only if a colormap is being used - it's apparently all done under the covers. Change-Id: Ib25bfba618b0af4a60ce991a974de1e3f2f89158 Reviewed-on: https://code.wireshark.org/review/12981 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-18Qt: use recent.gui_bytes_view preference to remember bits / byte viewPascal Quantin1-1/+1
While we are at it, let's centralize bytes_view_type definition Bug: 11903 Change-Id: I606c779a8efaea668db1b440d3ae0336e6e3fc67 Reviewed-on: https://code.wireshark.org/review/12706 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: Stig Bjørlykke <stig@bjorlykke.org>
2015-11-27Fix display of bytes as EBCDICPascal Quantin1-2/+2
MSVC compiler does not support properly setting an enum being part of a bit field. For example the following code: pinfo->fd->flags.encoding = PACKET_CHAR_ENC_CHAR_EBCDIC; changes pinfo->fd->flags.encoding from 0x0 to 0xfffffffe instead of 0x1 Let's put back an unsigned int definition (like it is in master-1.12 branch) and add explicit casts where required Bug: 11787 Change-Id: Idae0140fb6c172f1b3dbf10baefc8cfb00128f4c Reviewed-on: https://code.wireshark.org/review/12220 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-07Clean up includes of unistd.h, fcntl.h, and sys/stat.h.Guy Harris1-8/+0
Have wsutil/file_util.h include them on UN*X, just as it includes io.h on Windows, so we can have a rule of "if you do file operations, include <wsutil/file_util.h> and use the routines in it". Remove includes of unistd.h, fcntl.h, and sys/stat.h that aren't necessary (whether because of the addition of them to wsutil/file_util.h or because they weren't needed in the first place). Change-Id: Ie241dd74deff284e39a5f690a297dbb6e1dc485f Reviewed-on: https://code.wireshark.org/review/11619 Petri-Dish: Guy Harris <guy@alum.mit.edu> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-11-04Don't include "file.h" if you don't need it.Guy Harris1-0/+1
It ends up dragging in libwireshark headers, which programs not linking with libwireshark shouldn't do. In particular, including <epan/address.h> causes some functions that refer to libwireshark functions to be defined if the compiler doesn't handle "static inline" the way GCC does, and you end up requiring libwireshark even though you shouldn't require it. Move plurality() to wsutil/str_util.h, so that non-libwireshark code can get it without include epan/packet.h. Fix includes as necessary. Change-Id: Ie4819719da4c2b349f61445112aa419e99b977d3 Reviewed-on: https://code.wireshark.org/review/11545 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-06-24Remove the last deprecated tvb_length callsEvan Huus1-1/+1
And remove the shims themselves! Change-Id: I511c06eb21eaf68d1dc36bbb9558408807472f9c Reviewed-on: https://code.wireshark.org/review/9088 Reviewed-by: Evan Huus <eapache@gmail.com>
2015-02-15ui/gtk/*.c: Add editor modelines; As needed: Fix indentationBill Meier1-0/+13
Change-Id: I8cd9d9fe5f12c284f46b8f725766f681faccd753 Reviewed-on: https://code.wireshark.org/review/7138 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-02-14Fix diagnostics macros and squelch a gcc warning.Gerald Combs1-3/+4
Both clang and gcc define __GNUC__. Make sure we account for that when defining diagnostic macros. Use DIAG_OFF + DIAG_ON to suppress gcc -pedantic warnings about frame_data. Get rid of packet_char_enc casts. Change-Id: Idbcc61bcdb35c1d20f185461c69451dcdf73bae9 Reviewed-on: https://code.wireshark.org/review/7106 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-18Miscellaneous ep_strdup_printf replacement.Michael Mann1-1/+4
Change-Id: I973c672e9d573ad67e9b9fd82a5610aaf8a74efa Reviewed-on: https://code.wireshark.org/review/6605 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-01-04Create BASE_DOT, BASE_DASH, and BASE_SEMICOLON types for the FT_BYTES field ↵Michael Mann1-1/+1
type. These "bases" will put a ".", "-", or ":" respectively between hexidecimal bytes in the field in packet view and display filter. FT_BYTES with BASE_NONE will have no separator in the packet view, but continue to have the ':' as a separator in the display filter. Converted the "string" hf_ entries that used tvb_fc_to_str as a string to use proto_tree_add_item with FT_BYTES/BASE_DOT type. Converted applicable tvb_bytes_to_ep_str_punct() calls to use the new BASE values. Change-Id: I2442185bb314d04a3ff2ba57883652ecd738b5f9 Reviewed-on: https://code.wireshark.org/review/6098 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-10-17Remove unnecessary includes of <ctype.h>.Guy Harris1-2/+0
Change-Id: I8eacec5fa8d57b10d40a3627197461dae89c6cb2 Reviewed-on: https://code.wireshark.org/review/4768 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-13Follow-up of ged0b19b (Make boolean bitmask type 64-bit wide)Pascal Quantin1-2/+2
- use G_GINT64_MODIFIER instead of "%ll" - use G_GUINT64_CONSTANT instead of ULL - add some missing explicit casts Change-Id: Ic048d9ee8966ea504ea542cefe55688edcfb2dc7 Reviewed-on: https://code.wireshark.org/review/4644 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: Michael Mann <mmann78@netscape.net>
2014-10-12Make boolean bitmask type 64-bit wideDaniel Mack1-10/+15
There are protocols out there that have 64-bit wide bit mask fields, so make the internal representation and bitfield decoders 64-bit aware. For this, the ws_ctz() fallback and bits_count_ones() have to be tweaked slightly. Change-Id: I19237b954a69c9e6c55864f281993c1e8731a233 Reviewed-on: https://code.wireshark.org/review/4158 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
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-21Drop isprint.h use g_ascii_isprint() when this include hack was enabled.Jakub Zawadzki1-4/+2
svn path=/trunk/; revision=54327
2013-11-17Move the epan/filesystem.c routines to wsutil; they're not specific toGuy Harris1-1/+1
packet dissection, they're specific to the entire Wireshark suite of programs. svn path=/trunk/; revision=53377
2013-10-11Remove GTK+ and global cfile dependencies from file_dlg_win32.c.Gerald Combs1-1/+1
Move the declaration of set_last_open_dir() to ui/util.h. It still has separate GTK+ and Qt implemenations. We might want to move it to ui/util.c at some point. Remove a lot of unnecessary GTK+ includes. Remove most of the references to the global cfile while we're at it. svn path=/trunk/; revision=52542
2013-08-06Remove hfinfo->bitshift member, add hfinfo_bitshift() to get it.Jakub Zawadzki1-1/+1
svn path=/trunk/; revision=51174
2013-07-26From Cal Turney and Jiří Engelthaler viaJeff Morriss1-3/+0
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8908 : The fix for bug 5585 (r35583) is no longer necessary (thanks to r50516) and it causes the screen to flicker when clicking on bytes in the bytes pane. svn path=/trunk/; revision=50903
2013-07-19Fix problems when expanding whole tree '*' / all subtree nodes <Shift>-RightJakub Zawadzki1-3/+1
Remove gtk_tree_view_collapse_row from check_expand_trees() svn path=/trunk/; revision=50741
2013-07-19Fix gtk warnings when clicking on some byte on byte pane.Jakub Zawadzki1-2/+2
When we don't have path don't check for subtrees. (Originally report by Jeff on https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8908#c17) XXX, we could create a path pointing on begin of tree - but do we want to do it? svn path=/trunk/; revision=50740
2013-07-15One more try at fixing all the issues reported inJeff Morriss1-8/+14
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8908 : Rename check_expand_children() to check_expand_trees() since the function doesn't just do the children of the current path/iter. Add a parameter to that function which controls whether the parent (or just the children) get expanded. As suggest by Jakub in the bug: block further calls to expand_tree() when we're expanding all these trees. Add a comment telling callers of check_expand_trees() to do that. svn path=/trunk/; revision=50595
2013-07-12As suggested by Jakub in ↵Jeff Morriss1-6/+9
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8908#c8 : When auto-expanding previously-expanded children (r50516), only apply auto-scrolling to the tree the user just expanded (not any of its children which were auto-expanded). Also: only expand children of the just-expanded tree, not all instances of the just-expanded tree. This prevents expanding, for example, one SCTP chunk's tree from expanding all other chunks in the same frame. (Of course moving between frames will cause the chunks' trees to be expanded.) svn path=/trunk/; revision=50535
2013-07-11Fix the problem reported in ↵Jeff Morriss1-47/+51
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8908#c3 (the last remaining problem in that bug report): When we expand a tree, check if any of its children need to be expanded too (because the user left them expanded when s/he closed the parent). In the process, rename expand_finfos() to check_expand_children() since the function expands any children (subtrees) which should be expanded. Remove one of that function's parameters too: just reference the global preference that controls whether scrolling should be done or not. Replace some tabs with spaces (for consistency). svn path=/trunk/; revision=50516
2013-07-10Fix bug #8908: Strange behavior of tree expand/collapse in packet detailsJakub Zawadzki1-13/+37
Only expand subtree when parent was also expanded svn path=/trunk/; revision=50479
2013-07-07Make tree_is_expanded array static, add setter/getter function.Jakub Zawadzki1-17/+13
svn path=/trunk/; revision=50433
2013-07-01Fix Coverity CID 1037114 (Dereference before null check).Chris Maynard1-0/+2
svn path=/trunk/; revision=50298
2013-06-21fix for r50095 don't fetch parent hfinfo, traverse tree to get top one.Jakub Zawadzki1-19/+38
svn path=/trunk/; revision=50098
2013-06-20Highlight protocol bytes in grey, idea stolen from qtsharkJakub Zawadzki1-10/+47
svn path=/trunk/; revision=50095
2013-05-15Use file_selection_run() for dialogs created with file_selection_new().Guy Harris1-116/+52
svn path=/trunk/; revision=49320
2013-05-14Give file_selection_new() an argument to specify the parent window ofGuy Harris1-2/+1
the file selection dialog. Call gtk_file_chooser_set_do_overwrite_confirmation() in file_selection_new() for FILE_SELECTION_SAVE file selection dialogs, rather than doing it in the individual callers of file_selection_new(). Use gtk_dialog_set_alternative_button_order() in file_selection_new() to set the alternative button order, rather than using #ifdefs. Use file_selection_new() and file_selection_run() in the graph analysis code. (We should clean up other code that uses file_selection_new() to use file_selection_run(), and clean up other code that uses gtk_file_chooser_dialog_new() to use file_selection_new() and file_selection_run().) svn path=/trunk/; revision=49308
2013-03-21Idea from Michail Koreshkov via bug #8371. Open a referenced packet in a newEvan Huus1-2/+7
window when double-clicking with a modifier key held. The original suggestion was CTRL, but GTK didn't like that, so ALT was suggested as an alternative, but I think SHIFT makes more sense, since that's what browsers use (shift+click) to open links in a new window. svn path=/trunk/; revision=48470
2013-03-21From beroset:Bill Meier1-6/+6
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-02-21Don't yell at the user quite so much. Remove exclamation points fromGerald Combs1-6/+6
some error messages and rephrase some others. svn path=/trunk/; revision=47787
2013-01-25When searching for hex bytes from the "Find Packet" dialog, highlight the ↵Chris Maynard1-6/+13
correct number of bytes. Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8085 #BACKPORT 1.8: ui/gtk/main_proto_draw.c:packet_hex_print() 1.6: gtk/main_proto_draw.c:packet_hex_print() svn path=/trunk/; revision=47277
2013-01-22GTK+:Gerald Combs1-33/+1
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
2012-12-23Qt: Implement packet comments. Fix packet detail updates.Gerald Combs1-1/+1
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-10-20Make data_source opqaue, add getter for tvb.Jakub Zawadzki1-2/+2
svn path=/trunk/; revision=45672
2012-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-3/+1
svn path=/trunk/; revision=45016
2012-07-24Make proto_tree_draw wrapper function to proto_tree_draw_resolve.Jakub Zawadzki1-8/+3
svn path=/trunk/; revision=43966
2012-07-15Fix win* buildbot warnings:Jakub Zawadzki1-1/+1
packet_panes.c(304) : error C2220: warning treated as error - no 'object' file generated packet_panes.c(304) : warning C4244: 'function' : conversion from 'gdouble' to 'int', possible loss of data packet_panes.c(304) : warning C4244: 'function' : conversion from 'gdouble' to 'int', possible loss of data Add casts, old code did the same casts so this should be OK. svn path=/trunk/; revision=43730
2012-07-15Fix bug #6690: Wireshark quite slow displaying frames with many detail pane ↵Jakub Zawadzki1-736/+18
nodes and large byteviews Add custom widget to render hexdump or bitsdump. svn path=/trunk/; revision=43728
2012-07-06- e_addr_resolve is structure so pass it by pointer.Jakub Zawadzki1-1/+1
- name_resolve_concurrency must be only defined when used. svn path=/trunk/; revision=43584
2012-07-06From Michael Mann:Anders Broman1-1/+1
Generic preferences implementation - Printing and Name Resolution. svn path=/trunk/; revision=43579
2012-06-30Fix bug #7425: Per-packet right-click network or MAC name resolution not workingJakub Zawadzki1-0/+13
proto_tree_draw() from r43189 is lazy, and it don't fills tree with all item labels. To fix it, move 'gbl_resolv_flags' hack to proto_tree_model_get_value(). XXX could we pass resolving flags to proto_item_fill_label()? svn path=/trunk/; revision=43550
2012-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2012-06-16Clean up indentation.Guy Harris1-19/+19
svn path=/trunk/; revision=43294