aboutsummaryrefslogtreecommitdiffstats
path: root/epan/prefs.c
AgeCommit message (Collapse)AuthorFilesLines
2016-02-08prefs: fix a leak.Dario Lombardo1-42/+86
This change fix a leak in the prefs subsystem when setting a preference as obsolete. Found by valgrind. ==5779== 1 bytes in 1 blocks are definitely lost in loss record 7 of 3,421 ==5779== at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==5779== by 0xA7FE610: g_malloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4002.0) ==5779== by 0xA815B0E: g_strdup (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4002.0) ==5779== by 0x65E01DF: register_string_like_preference (prefs.c:1052) ==5779== by 0x65E054E: prefs_register_string_preference (prefs.c:1096) ==5779== by 0x688D010: proto_register_dtls (packet-dtls.c:1828) ==5779== by 0x71C4C34: register_all_protocols (register.c:350) ==5779== by 0x65EEFA7: proto_init (proto.c:521) ==5779== by 0x65CD621: epan_init (epan.c:126) ==5779== by 0x115330: main (tshark.c:1220) Bug: 12096 Change-Id: I8f36114e2098b0255b4e774c6e0f35b64da6d366 Reviewed-on: https://code.wireshark.org/review/13798 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-02-02prefs: Add missing newline for filter expressions headingStig Bjørlykke1-1/+1
Change-Id: I005904ffddf4542248c1994a0786340383b62192 Reviewed-on: https://code.wireshark.org/review/13660 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-02-01extcap: Add Save functionality to options dialogRoland Knall1-0/+22
This patch creates the functionality of saving all parameters for extcap devices in the general preference section. For now, multiselect and fileselect do not save their values but patches for this will be provided in the future Also, all preferences are stored as strings to make handling easier. This might change in the future, but for the first version it will stick. Restore to Defaults is not implemented as of yet, and will be in a future version, once the preference storing is finalized Bug: 11666 Change-Id: I178346405146d2e43f4f3481c05c92c0b3595af5 Reviewed-on: https://code.wireshark.org/review/13451 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Roland Knall <rknall@gmail.com>
2016-01-27Remove the deprecated column types so users don't think they still exist.Michael Mann1-25/+41
Bug: 11559 Change-Id: I51836dc9a4fa399835c7bdabcba577ebd40327ad Reviewed-on: https://code.wireshark.org/review/13538 Reviewed-by: Michael Mann <mmann78@netscape.net> 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-01-25Fix missing validation (crash) for certain prefsPeter Wu1-11/+33
The gui.layout_type preference is part of the Layout submodule (which is part of the gui module. The Layout submodule has a special apply callback that validates its prefs. These validations were never called though because the prefix is "gui" and as a result that module would be marked as changed. Fix this crash by calling the validation function on the submodules instead holding the pref, not its parent. Change-Id: I2a49dce93fdc7fab4ab3dc52dad90288c2d17434 Reviewed-on: https://code.wireshark.org/review/13154 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-01-21Qt: Add some window title variablesStig Bjørlykke1-2/+2
Add some variables to be used in custom window title. %P = profile name %V = version info Change-Id: I049717432a4d3523b541bb4f6f882c75abc38ddb Reviewed-on: https://code.wireshark.org/review/13419 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-01-08Fix warnings for epan/prefs.c [-Wcast-qual]João Valverde1-109/+90
Change-Id: I86032d624ee37edc86a868eb2aaaffce81a8807b Reviewed-on: https://code.wireshark.org/review/12719 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
2016-01-01No need for toolkit-dependent color initialization.Guy Harris1-0/+4
We're not allocating colors ourselves in GTK+ (and haven't been doing so since at least 1.12), and all color_t values are valid colors, so we don't need any toolkit-specific processing to fill in a color_t. While we're at it, catch read errors when reading color filter files. Change-Id: Ieb520d141cf15e371a31a01459d466c95ba2209b Reviewed-on: https://code.wireshark.org/review/12985 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-01Get rid of the "pixel" member of a color_t.Guy Harris1-17/+5
Now that we're letting GTK+/GDK allocate colors behind the scenes, if it allocates them at all, there's no reason to save the allocated color in the toolkit-independent color value. Change-Id: I99df32bd6b07924f41f3d855d2ddecb3dc8d5201 Reviewed-on: https://code.wireshark.org/review/12983 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-29Qt: Add gui.prepend_window_title optionAlexis La Goutte1-0/+7
Bug: 11102 Change-Id: I659b6be4652a65542c217370e01340e4696c0e31 Reviewed-on: https://code.wireshark.org/review/12653 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>
2015-12-20Qt: Add missing multi-field column validationMichal Labedzki1-31/+31
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-19Get rid of the argument to filter_expression_init().Guy Harris1-1/+1
It's always TRUE. Clean up indentation while we're at it. Change-Id: I11f5b849274b68bbda4fa32a8d909d6d5e71cbb1 Reviewed-on: https://code.wireshark.org/review/12732 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-19Get rid of a couple of extra blank lines.Guy Harris1-2/+0
Change-Id: I57fd59a065e987e0e188b0898a874116e7cc56e8 Reviewed-on: https://code.wireshark.org/review/12722 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-18Remove a comment that didn't need to be copied and pasted.Guy Harris1-4/+0
Change-Id: Id05c3fbf0c667ae2b2e349b73eba62a23d9e9e9e Reviewed-on: https://code.wireshark.org/review/12721 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-18prefs_register_modules() is used only in epan/prefs.c; make it static.Guy Harris1-1/+6
Change-Id: If2a5ad5c836c5dfddb4f6c4ffa41c52e52f2b671 Reviewed-on: https://code.wireshark.org/review/12717 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-18More common code for string-like preferences.Guy Harris1-43/+32
Change-Id: I0143c40cabc0e60265aad2004884cb24cd41a8ac Reviewed-on: https://code.wireshark.org/review/12714 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-18Provide routines to set string-like and range preferences from a string.Guy Harris1-32/+52
That gets rid of some duplicate code. Change-Id: I4b65c6c73929d18602f6b0425e4f3dbbabbf0127 Reviewed-on: https://code.wireshark.org/review/12713 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-13Start deprecating the capture info API.Gerald Combs1-0/+2
The GTK+ UI has a capture info dialog which shows a summary of captured protocols, including IPX (!), NetBIOS (!!) and VINES (!!OMG!!). It's been disabled by default since 2006 (g59aa9e40). Remove the preference in the Qt UI capture pane. It's still available via the advanced prefs. Add comments in various parts of the code noting that the capture_info routines and structs are GTK+ only. Also note that if we *do* want to add a Qt capture info dialog we'll probably want to modernize the information we show. Change-Id: I3c63f6f01b60f0767fb33602a7f0c3b537dbde51 Reviewed-on: https://code.wireshark.org/review/10991 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-07Spelling fixes for errors found by lintianBalint Reczey1-1/+1
Change-Id: I889283902875193f4d3f3fd59788f59f8d9bcc20 Reviewed-on: https://code.wireshark.org/review/11945 Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-11-25Fix memory leak in write_prefsMikael Kanstrup1-0/+1
Valgrind reports leaks like these: 384 bytes in 8 blocks are definitely lost in loss record 43,909 of 46,703 at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) by 0xD6A055F: __vasprintf_chk (vasprintf_chk.c:80) by 0xA5FD0FB: g_vasprintf (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4002.0) by 0xA5D8C7F: g_strdup_vprintf (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4002.0) by 0xA5D8D1B: g_strdup_printf (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4002.0) by 0x6854FA6: write_prefs (prefs.c:4941) by 0x733A9A: prefs_main_write (preference_utils.c:266) by 0x5F8A5C: CaptureInterfacesDialog::saveOptionsToPreferences() (capture_interfaces_dialog.cpp:851) by 0x5F93CD: CaptureInterfacesDialog::on_manage_clicked() (capture_interfaces_dialog.cpp:858) by 0x7182AC: CaptureInterfacesDialog::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (capture_interfaces_dialog.moc.cpp:316) by 0x718822: CaptureInterfacesDialog::qt_metacall(QMetaObject::Call, int, void**) (capture_interfaces_dialog.moc.cpp:413) by 0xBEBE36C: QMetaObject::activate(QObject*, int, int, void**) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.2.1) When storing user preferences the constructed pathname of user's preferences file is not freed properly. Change-Id: I5cdc53ca836503af048e1d06e4614d83ef8921ac Reviewed-on: https://code.wireshark.org/review/12114 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2015-11-20Qt: Fixed column issues when changing profile.Stig Bjørlykke1-13/+14
Always initialize prefs.col_list in pre_init_prefs. When switching to a profile without a saved 'preferences' file we have to initialize prefs.col_list to default values to avoid reusing settings from the profile we leave. This was introduced in 5012cf84e6d84a448171dac64c14d9c83e3d4ae6 Emit columnsChanged() before preferencesChanged(). This because columnsChanged() rebuilds cap_file_->cinfo which is used in preferencesChanged() to align columns (and possible other actions). Doing this in the wrong order will give an inconsistency and a heap-buffer-overflow if having different number of columns. Bug: 11493 Change-Id: I5792dfc0ede11b9457b96f092af8da00453787b1 Reviewed-on: https://code.wireshark.org/review/11971 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-11-20More spelling fixes found by lintianBalint Reczey1-1/+1
Change-Id: Id218dec9e5a721d6c63fd34962ffe50b6ab8dd56 Reviewed-on: https://code.wireshark.org/review/11946 Reviewed-by: Guy Harris <guy@alum.mit.edu> Reviewed-by: Diederik de Groot <dkgroot@talon.nl> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-11-11Change prototype of callbacks passed to wmem_tree_foreach so that theyMatthieu Coudron1-5/+5
accept the node key as a first parameter. wmem_tree accepts all sort of keys (strings, integers, soon ranges), thus it is of interest for various purposes (testing, greedy search) to know the key of the node. Change-Id: Ie748b917bef91f0b1ba8cce15bd1b471922641dc Reviewed-on: https://code.wireshark.org/review/11683 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Evan Huus <eapache@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-10Apple calls it just "OS X" these days.Guy Harris1-2/+2
Change-Id: I98905988ceb394d27307d1cbe883d8fe95ac23e4 Reviewed-on: https://code.wireshark.org/review/11703 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-11-07Clean up includes of unistd.h, fcntl.h, and sys/stat.h.Guy Harris1-4/+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-10-27Add preferences for related packets and the scroll bar minimap.Gerald Combs1-0/+12
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-04Fix various memleaksPeter Wu1-0/+1
Found by starting Wireshark within an empty profile, opening Preferences, search for Protocol "IEEE 802.11" (because it has radio buttons), then close everything again. Many fixes are trivial, but the various recent_read_* functions in recent.c were changed to return a boolean such that the result can always be checked even if errno==0. QButtonGroup leak was hinted by Clang Static Analyzer, all other memleaks were found using ASAN/LSan. Change-Id: Ia73f5d4c09d92f22e72377be59e23342f8ad7211 Reviewed-on: https://code.wireshark.org/review/10776 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-09-02The official #define for 32-bit and 64-bit Windows is _WIN32.Guy Harris1-1/+1
It's _WIN32, with a leading underscore, not WIN32. See, for example: https://sourceforge.net/p/predef/wiki/OperatingSystems/ and https://msdn.microsoft.com/en-us/library/b0084kay.aspx *Some* environments may also define WIN32, but we shouldn't depend on that. Replace all-caps "WIN32" referring to Windows in comments and other text with "Windows" or "Win32". (The two are pretty much equivalent, these days; nobody much cares about Win16, not that we ever ran on it, and 64-bit Windows is just a 64-bitified Win32.) Change-Id: Id327bcd4b1e9baa4f27055eff08c2d9e594d6f70 Reviewed-on: https://code.wireshark.org/review/10367 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-08-11Added Reload Lua plugins.Stig Bjørlykke1-0/+31
This is initial support for reloading Lua plugins without restarting the application. Still todo: - Deregister FileHandlers - Support deregister ProtoField with existing abbrev (same_name_hfinfo) - Add a progress dialog when reloading many plugins - Search for memory leakages in wslua functions Change-Id: I48870d8741251705ca15ffe1068613fcb0cb18c1 Reviewed-on: https://code.wireshark.org/review/5028 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-06Add an elide mode preference for the Qt packet list.Gerald Combs1-0/+14
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-25DNS: move DNS name resolution pref to Name Resolution prefsHadriel Kaplan1-8/+5
Move the boolean flag for using captured DNS packet info for name resolution to the Name Resolution preferences settings, as it was rather surprising to disable Name Resolution preferences and still have names being resolved. Also disble them all if the '-n' command line switch is used, and re-enable it for a 'd' character in the '-N' option. Bug: 10337 Change-Id: Ie4d47bab0100db3360cc447cd3e446b2e39aa917 Reviewed-on: https://code.wireshark.org/review/9786 Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
2015-07-20Qt: Add option to back white line separator for packet list itemsMichal Labedzki1-0/+8
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-17Remove all preferences related to enabling/disabling heuristic dissectors.Michael Mann1-0/+74
The preferences are still supported for backwards compatibility, but the heuristic_protos file has final say on the "preference" to enable/disable a heuristic dissector. Also add parameter to heur_dissector_add() for the "default" enable/disable of a heuristic dissector. With this parameter, a few more (presumably weak) heuristic dissectors have been "registered" but of course default to being disabled. Change-Id: I51bebb2146ef3fbb8418d4f5c7f2cb2b58003a22 Reviewed-on: https://code.wireshark.org/review/9610 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Roland Knall <rknall@gmail.com> Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-06prefs: fix memory leak reading capture columnsEvan Huus1-3/+5
Change-Id: I925ec3329cc099a5f3d2ae66e43b06fc52309dc8 Reviewed-on: https://code.wireshark.org/review/9504 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Evan Huus <eapache@gmail.com>
2015-06-25Fix a memory leak registering prefsEvan Huus1-1/+21
Built-in string prefs have to be dynamic, but get overwritten by the registration routine, so we have to save and then free them after-the-fact. Change-Id: Ib418b14296391dd198a8b49b0c99c5f697d8050f Reviewed-on: https://code.wireshark.org/review/9132 Reviewed-by: Evan Huus <eapache@gmail.com>
2015-06-24Initialize default stats before using themEvan Huus1-1/+5
Quick hack fix for bug 11275. The longer fix I am still thinking about, but it goes something like this: we have a terribly confusing dependency graph in ordering our various preferences, so it's fragile and needs refactoring. 1. We must call epan_init before we read the preferences files, since dissectors register many preferences. 2. We must call pre_init_prefs before we call prefs_register_modules, since that inits the default values of the "global" preferences structure. `init_prefs()` handles this normally. 3. We must call epan_init before we call init_prefs since init_prefs depends on UATs being initialized (which is something epan_init does). 4. We must call prefs_register_modules before we call epan_init since that generates the `protocols` subtree which is needed for registering dissector-specific preferences. The above graph has a cycle, which I *think* can be solved by splitting prefs_register_modules? Bug: 11275 Change-Id: I08dae6a7ade178896e0de5e5091f7eeaca95846f Reviewed-on: https://code.wireshark.org/review/9098 Reviewed-by: Evan Huus <eapache@gmail.com>
2015-06-23prefs: fix memleakPeter Wu1-40/+12
Calling g_list_remove_link(link, llink) does not free the removed last link llink. g_list_next or g_list_foreach+g_free followed by g_list_free should be used instead such that the data is freed before and then dropped from the list. This fixes a memleak in tshark -r dns.pcap detected by ASAN (single packet). Set pref->default_val.list = NULL just in case, and with symmetry with capture_columns handling. Change-Id: I3cc52e275784037ab40c0b42c68d0dd83b73cd98 Reviewed-on: https://code.wireshark.org/review/9026 Reviewed-by: Evan Huus <eapache@gmail.com> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2015-03-25Have a #define for whether the capture buffer size can be set.Guy Harris1-2/+2
It can be set if either 1) this is Windows (where we're assumed to be using WinPcap, which includes calls to set the buffer size) or 2) we have pcap_create() (in which case we also have pcap_set_buffer_size(), at least in a normal libpcap release). Use that rather than testing "defined(_WIN32) || defined(HAVE_PCAP_CREATE)"; that makes it a bit more obvious what's being tested. Change-Id: Id9f8455019d19206b04dd6820a748cb97ae5ad12 Reviewed-on: https://code.wireshark.org/review/7816 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-27Qt: Automatically scroll the packet list.Michal Labedzki1-0/+1
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-21Fix GTK-sharkMichal Labedzki1-1/+1
Looks like a copy/paste issue. ERROR: wireshark/color_filters.c:100:color_filters_add_tmp: assertion failed: (strlen(prefs.gui_colorized_fg)==69) Change-Id: I7b8309cfc178fd834951078a098bbce986639ed2 Reviewed-on: https://code.wireshark.org/review/7286 Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-02-21Call pre_init_prefs each time our profile changes.Gerald Combs1-47/+60
Manually back out gafa96c3 so that we can set our preferences to their default values each time we switch profiles. Zero the prefs struct at startup. Change-Id: Ic28db44cd0c4cdf640e977d7277f7357db10ebe8 Reviewed-on: https://code.wireshark.org/review/7282 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-20Clear the filter expression list in prefs.c.Gerald Combs1-0/+7
Move filter_expression_nuke from ui/gtk to epan and rename it to filter_expression_free. Call it in prefs_reset along with the other preference reset routines. This keeps the Qt filter toolbar from filling up with duplicate expressions when the profile changes. Change-Id: I9fae9a7b48944079ea342a126979d9e79af0d22b Reviewed-on: https://code.wireshark.org/review/7281 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-12Support for looking for incomplete dissectors.Dario Lombardo1-0/+5
Change-Id: I03e592dd3d54fc0e1c4af09d5d5336dda93f950e Reviewed-on: https://code.wireshark.org/review/6978 Reviewed-by: Evan Huus <eapache@gmail.com> Petri-Dish: Evan Huus <eapache@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-01-12Remove emem APIs from UAT functionality.Michael Mann1-7/+11
Change-Id: I009c09f25d170e5c9aaaef713eaacb3252817856 Reviewed-on: https://code.wireshark.org/review/6460 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Evan Huus <eapache@gmail.com> Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-10Add preference to display spaces between bytes for FT_BYTES fields.Michael Mann1-0/+6
I think this can make fields more readable (for a small amount of bytes). Converted DeviceNet dissector to use proto_tree_add_item for some FT_BYTES field as tvb_bytes_to_str_punct was used to create this effect "manually". Change-Id: I59e2acf9b00a4eb1279e6c2b2b7bd8ecef20db9b Reviewed-on: https://code.wireshark.org/review/6304 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-12-31prefs: fix typoAlexis La Goutte1-1/+1
Change-Id: Ic4dbbab5e53b5745cb703e6e30b2dc6251c3918e Reviewed-on: https://code.wireshark.org/review/6161 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-11-04Qt: Dynamic languagesMichal Labedzki1-18/+0
- get language as soon as possible (before creating any Qt objects) to make all translations working - dynamic list of supported languages - runtime change of GUI language (no need to restart application) - add flags icons support - search for *.qm languages in buildin resources, then data dir called "languages" (main directory in sources or /usr/share/wireshark/languages), then user directory (UNIX: ~/.wireshark/languages); "languages" directory should contains files wireshark_xx.qm where xx is language code (en, en_GB, etc.), and optional xx.svg for flag icon - try to fix some untranslated manually-created UI items (need manual reset text of those components) Change-Id: I62ca8a8cddce47cec9dbcad6b0bd68b6cfd92229 Reviewed-on: https://code.wireshark.org/review/5041 Tested-by: Michal Labedzki <michal.labedzki@tieto.com> Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2014-10-28Pref: Remove unsued functionAlexis La Goutte1-0/+2
Fix also warning: no previous prototype for 'prefs_get_uint_preference' [-Wmissing-prototypes] Change-Id: I4626372a9c131584c515a43e73aa019e2f696d29 Reviewed-on: https://code.wireshark.org/review/4960 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-10-17Don't use ctype.h routines.Guy Harris1-12/+9
That avoids locale dependency and handles possibly-signed chars (which we weren't always doing before). Change-Id: Ieceb93029252f646397b6488f2df8a57c6d2a23d Reviewed-on: https://code.wireshark.org/review/4794 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-16Added italian translation to qt.Dario Lombardo1-0/+1
Change-Id: If58ed29e78a9994fc488a4d01cf665f7e8d82830 Reviewed-on: https://code.wireshark.org/review/4707 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>