aboutsummaryrefslogtreecommitdiffstats
path: root/wireshark-qt.cpp
AgeCommit message (Collapse)AuthorFilesLines
2016-12-05Clean up initialization code for programs.Guy Harris1-1/+2
Make the init_progfile_dir() call unconditionally, even if plugins aren't supported, as that doesn't necessarily mean nobody uses the directory containing the executable. Report the error the same way in all programs, and free the error string after we're finished with it. Make the error - and the comment before the code - reflect what init_progfile_dir() is actually doing (the goal is to get the full pathname of the directory *containing* the executable; that's generally done by getting the pathname of the executable and stripping off the name of the executable, but that's won't necessarily always be the case). Also note for TShark that we won't be able to capture traffic, just as we do for Wireshark (if we don't have the pathname of the program file, we don't have a pathname to use to find dumpcap). Have the plugin scanner just fail silently if we weren't able to get the plugin directory path, so we don't have to worry about calling it if init_progfile_dir() fails. Clean up white space while we're at it. Change-Id: I8e580c719aab6fbf74a764bf6629962394fff7c8 Reviewed-on: https://code.wireshark.org/review/19076 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-12-04Have a routine to do all the work of initializing libwiretap.Guy Harris1-2/+1
Have programs that use libwiretap call that routine rather than separately calling some or all of init_open_routines(), wtap_register_plugin_types(), and wtap_opttypes_initialize(). Also don't have routines internal to libwiretap call those. Yes, this means doing some initialization work when it isn't necessary, but scattering on-demand calls throughout the code is a great way to forget to make those calls. Change-Id: I5828e1c5591c9d94fbb3eb0a0e54591e8fc61710 Reviewed-on: https://code.wireshark.org/review/19069 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-12-04Show codec information in About dialogPeter Wu1-0/+2
Show codec libraries in About dialog, this should give the user a clue of what codecs are available. SBC is already supported, Spandsp (for G.722/G.726) is work in progress. Change-Id: Iebc4d9c9fae619a442e06c8afc780a420aa3971b Reviewed-on: https://code.wireshark.org/review/18978 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2016-12-04codecs: allow it to be used without pluginsPeter Wu1-3/+1
Not all codecs require the plugin infrastructure. For example, G.711U/A is a built-in codec. Allow such functionality to be registered even if plugin support is disabled. Change-Id: I2505cc9955e7953268ec0739531278921f70a771 Reviewed-on: https://code.wireshark.org/review/18977 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-11-10Qt: Handle retranslation events in the main window.Gerald Combs1-1/+1
Update most (but not all) of the main status bar text when the user changes the language setting. Try to distinguish between recent preferences and recent captures more clearly. Change-Id: I5278a503178fe3620a25b185742688f957dc30f4 Ping-Bug: 11307 Reviewed-on: https://code.wireshark.org/review/9575 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: Michael Mann <mmann78@netscape.net>
2016-10-30Have routines for parsing options that affect dissection.Guy Harris1-6/+7
Have them handle -d, -t, --disable-protocol, --disable-heuristic, and --enable-heuristic for TShark and both flavors of Wireshark. Change-Id: I612c276b1f9df8a2092202d23ab3d48be7857e85 Reviewed-on: https://code.wireshark.org/review/18583 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>
2016-10-20WelcomeUI: Make Open and Capture clickableRoland Knall1-0/+2
Make the texts "Open" and "Capture" clickable, and have them open the FileOpen and CaptureOptions dialogs respectively Change-Id: I2a3efbc4cdf160aa0b4efc6496d09228affbff46 Reviewed-on: https://code.wireshark.org/review/18303 Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl> Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-10-17Qt: Read our dynamic recent entries a bit earlier.Gerald Combs1-9/+10
Call recent_read_dynamic a bit earlier in the startup process. Note that it determines when we fill in the recent files list, so the earlier we call it the better. Change-Id: Iad37d3aa2222873259d6c96ba79672236c8e4cd5 Reviewed-on: https://code.wireshark.org/review/18235 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: Michael Mann <mmann78@netscape.net>
2016-09-16Qt: Argument vector fixups.Gerald Combs1-8/+8
In wireshark-qt.cpp we have two "argv" variables, one that we pass to QCoreApplication (which it then corrupts irreversibly on Windows if you pass it multibyte characters), and one that we convert to UTF-8 and use normally. Name the throwaway argument vector "qt_argv". Name ours "argv", which is the traditional and less error-prone name. Bug: 12900 Change-Id: Idd80b9f779f36ffe977465afd623d320212f92b1 Reviewed-on: https://code.wireshark.org/review/17723 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-09-12fix some compilation issues without extcap.Dario Lombardo1-0/+2
Change-Id: I18c855e13281013a6277c1f38eeac92e74d52b34 Reviewed-on: https://code.wireshark.org/review/17665 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-09-11qt: fix minor memory leaks on exitPeter Wu1-0/+2
Change-Id: I4856b7ce7eec15abe1278e9ba8314be61845347a Reviewed-on: https://code.wireshark.org/review/17638 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-11extcap: fix use-after-free for preferencesPeter Wu1-4/+2
In commit v2.3.0rc0-117-g485bc45 (backported to v2.2.0rc0-44-g66721ca), extcap_prefs_dynamic_vals and extcap_cleanup were added in an attempt to address dangling pointers. Unfortunately it is not sufficient: - A pointer to the preference value is stored in extcap_arg and passed to the prefs API, but this extcap_arg structure can become invalid which result in use-after-free whenever the preference is accessed. - On exit, a use-after-free occurs in prefs_cleanup when the preference value is being checked. As the preference subsystem actually manages the memory for the string value and consumers should only provide a pointer where the value can be stored, convert the char* field in extcap to char**. This has as additional benefit that values are not limited to 256 bytes anymore. extcap_cleanup is moved after epan_cleanup to ensure that prefs_cleanup does not operate on dangling pointers. Crash is reproducible under ASAN with: tshark -i randpkt Ping-Bug: 12183 Change-Id: Ibf1ba1102a5633aa085dc278a12ffc05a4f4a34b Reviewed-on: https://code.wireshark.org/review/17631 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Roland Knall <rknall@gmail.com>
2016-09-05Have scan_plugins() take an argument specify what to do on load failures.Guy Harris1-1/+1
That's a less gross hack to suppress load failures due to not having libwiretap than providing a no-op failure-message routine, as it at least allows other code using a failure-message routine, such as cmdarg_err() and routines that call it, to be used. We really should put libwiretap and libwireshark plugins into separate subdirectories of the plugin directories, and avoid even looking at libwireshark plugins in programs that don't use libwireshark. Change-Id: I0a6ec01ecb4e718ed36233cfaf638a317f839a73 Reviewed-on: https://code.wireshark.org/review/17506 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-08-01Fix compilation without extcap.Dario Lombardo1-0/+1
Change-Id: I627dd6c514066ba67cd501925ff95e9cf819c0e9 Reviewed-on: https://code.wireshark.org/review/16828 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Roland Knall <rknall@gmail.com>
2016-07-29extcap: Restore functionality for optionsRoland Knall1-0/+4
Allow stored options to be restored to their default values. This adds a global cleanup method for extcap and globally defined preference values, which fixes the parameter problem with windows Change-Id: I48e0cf846ef81f4732d652c6a2ad0020db5df08e Reviewed-on: https://code.wireshark.org/review/13741 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-07-01Qt+Gtk: Fix the -t command line flag.Gerald Combs1-1/+0
Add the time format to commandline_param_info_t and apply it when we've finished application initialization. Bug: 12489 Change-Id: Ice626198a610567e945a8e53c0c1093797e8208e Reviewed-on: https://code.wireshark.org/review/16232 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: Michael Mann <mmann78@netscape.net>
2016-06-28Have commandline_other_options() directly fill in the global structure.Guy Harris1-1/+1
Other code looks at the global structure, so there won't be other structures; just fill in the global structure directly. Change-Id: I4dc87b79168c5a7c9ab1f085aa2d78cc6d2c9019 Reviewed-on: https://code.wireshark.org/review/16184 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-06-28Make quit_after_cap an item in commandline_param_info_t.Guy Harris1-28/+27
And make the commandline_info structure global, so all the places that look at quit_after_cap can get at it. Change-Id: I006329cf8842c655cca36f024570855d1b16e107 Reviewed-on: https://code.wireshark.org/review/16182 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-06-27qt: fix linking error with global_capture_optsPeter Wu1-4/+0
global_capture_opts is already defined by ui/commandline.c which is also linked with wireshark-qt.cpp. Remove the duplicate definition to avoid a build failure with the gold linker. Fixes regression from v2.1.1rc0-192-g9b5b444. Change-Id: I4484e2769bf270dee1ec0378fd9c925e01eaf390 Reviewed-on: https://code.wireshark.org/review/16175 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-06-26Add an RA_INTERFACES register action.Gerald Combs1-0/+2
Add RA_INTERFACES between RA_PREFERENCES and RA_CONFIGURATION. Wireshark was spending a suspiciously long time loading module preferences here. (Now we just need to find out why that section of the code is slow.) Change-Id: Iecbe55e8e10c8844bcb151a13e383cb13a3f6eb1 Reviewed-on: https://code.wireshark.org/review/16133 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-06-25Minor UI locale updates.Gerald Combs1-6/+6
Qt: Call setlocale before commandline_early_options so that we get proper "-v" output, similar to the GTK+ UI. GTK+: Call setlocale once at startup. Bug: 11960 Change-Id: I3c3a196b9d94fc768e1085200891bc8d67e21a08 Reviewed-on: https://code.wireshark.org/review/16132 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: João Valverde <j@v6e.pt>
2016-06-23Qt: Support the -j, -J, and -l command line flagsGerald Combs1-0/+16
Add support for -j, -J, and -l. Mark the -m flag deprecated. Bug: 12546 Change-Id: Ic44b3997840018e5d571aa1813a1646bce11d4a6 Reviewed-on: https://code.wireshark.org/review/16083 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: Michael Mann <mmann78@netscape.net>
2016-06-21pcap: Add support to "new" Npcap native mode without setting PATHYang Luo1-0/+1
Npcap decided not to add "C:\Windows\System32\Npcap" to system PATH in the installation any more (starting from Npcap 0.07 r14). So this patch needs to be applied, otherwise Wireshark will not find Packet.dll (the error message will only say wpcap.dll is missing, but actually is Packet.dll missing). Change-Id: Ifd8b6e6d8ecf9866cd37c3368b604de210ff8c7b Reviewed-on: https://code.wireshark.org/review/15959 Reviewed-by: Yang Luo <hsluoyz@gmail.com> 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>
2016-06-20Pull the options structure initialization into commandline_other_options().Guy Harris1-15/+0
Change-Id: I931cde27a81566dfa0ce6e5c9307bfc1a4d5fe54 Reviewed-on: https://code.wireshark.org/review/16033 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-06-19Move some option checking to common code.Guy Harris1-48/+0
Change-Id: Icff9dacd73ea933c59ed664db05098dd8cb3dbf5 Reviewed-on: https://code.wireshark.org/review/16029 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-06-19Pass the info strings directly to commandline_early_options().Guy Harris1-8/+6
Just pass them directly as arguments, don't stuff them into a structure. Change-Id: Iac84226f54898bc953011bca64795e9049762905 Reviewed-on: https://code.wireshark.org/review/16022 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-06-19Handle capture options in pcap-less Wireshark in the commandline_ routines.Guy Harris1-6/+0
Get rid of the capture_option_specified and arg_error members of the commandline_capture_param_info_t and commandline_param_info_t structures, and have them be local variables in commandline_early_options() and commandline_other_options(). Have commandline_early_options() print the "sorry, Wireshark wasn't built with pcap" and exit if -D was specified but Wireshark wasn't built with pcap. Change-Id: I0efcdea89d9585af8f3c0a28aee060f33d3ec5fd Reviewed-on: https://code.wireshark.org/review/16021 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-06-19Those aren't capture options, they're the options we must process early.Guy Harris1-1/+1
The only one of those options that has anything to do with packet capture is -i, and all we do there is check for an argument of "-"; the rest are either 1) options that affect your preference settings (-C to select the profile, -P to set the personal file directory path); 2) options that just print something to the standard output or error and exit, before firing up the GUI; 3) extension command line options (-X). Change-Id: Iba9b8b14fe468e2ca9d4c67e1a9b8103603678d9 Reviewed-on: https://code.wireshark.org/review/16019 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-06-19Get rid of an unused variable; set a structure member.Guy Harris1-1/+0
There's no need for the capture_option_specified variable, but we *do* need to initialize the capture_option_specified member of *param_info before parsing the flags. Change-Id: I89d0b8c338c2784742b21ba4e854f702ce491849 Reviewed-on: https://code.wireshark.org/review/16017 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-06-19Revert "tap: change glib functions to wmem."Pascal Quantin1-10/+10
This reverts commit 2e9f3c5d366eaa7139fc877b5301392166b3f985. It breaks the registration of codec, dissector and libwiretap plugins. Change-Id: I4ef91dd192f765adf87ea9fe9f3693e25dbd24de Reviewed-on: https://code.wireshark.org/review/16012 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2016-06-19Put #ifdef/#endif around a variable used only on Windows.Guy Harris1-1/+4
Change-Id: Ia6fed6db03cb88433469e758693fcc72c4bd9071 Reviewed-on: https://code.wireshark.org/review/16009 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-06-19Refactor command-line handling of GUI options.Michael Mann1-566/+58
Both GTK and Qt both use the same command-line options, so refactor the parsing and (possibly) applying of those arguments to a single location. Ping-Bug: 12546 Change-Id: Ib31e576c509c5d3d21c33d3247640d9f9c68661b Reviewed-on: https://code.wireshark.org/review/16006 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-06-17tap: change glib functions to wmem.Dario Lombardo1-10/+10
Change-Id: I878ae6b121a669f9b7f4e1e57bc079f0cb44c0bf Reviewed-on: https://code.wireshark.org/review/15270 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Evan Huus <eapache@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-05-13Qt: add some cleanup function calls missing when leaving applicationPascal Quantin1-2/+18
Change-Id: I8f22d321e84daa36d4a40856b61d0844d3489cc2 Reviewed-on: https://code.wireshark.org/review/15374 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>
2016-05-11Qt: fix loading of profile by command linePascal Quantin1-11/+13
recent_read_static() must be called before processing the -C option as it will select the last profile used. While we are at it, add a missing profile_store_persconffiles(FALSE) call to match what is done in GTK based UI Bug: 12425 Change-Id: I9cfdca3ed25f0ed97535178973e3f0427b9ad2b1 Reviewed-on: https://code.wireshark.org/review/15371 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>
2016-04-21Link version code statically againJoão Valverde1-1/+1
This allows keeping the code-sharing with the static linking. This "fixes" a hypothetical ABI mismatch with wsutil and avoids pulling more external dependencies to wsutil than strictly necessary. A nice side-effect is that libwsutil no longer depends on version.h. Follow up to f95976eefcbeb5d24df383c29d29ef888b503945. Change-Id: I8f0d6a557ab3f7ce6f0e2c269124c89f29d6ad23 Reviewed-on: https://code.wireshark.org/review/15002 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-04-04Include ws_diag_control.h in config.hJoão Valverde1-1/+0
Change-Id: Ia394071710ecda3b0e6686a51fbca45a8ff20317 Reviewed-on: https://code.wireshark.org/review/14749 Petri-Dish: João Valverde <j@v6e.pt> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
2016-04-04Remove synchronous DNS name resolutionJoão Valverde1-2/+2
Change-Id: Ie5e670b769eb0674950f3679ef511047641c2873 Reviewed-on: https://code.wireshark.org/review/14751 Petri-Dish: João Valverde <j@v6e.pt> 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-04-03Move zlib version check to wsutilJoão Valverde1-22/+0
Change-Id: I0950f61e90af5bb21c0017204de0c0b509616e5c Reviewed-on: https://code.wireshark.org/review/14747 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-03-27Make failure_alert_box() be printf-like.Guy Harris1-1/+1
Have it be printf-like, and have vfailure_alert_box() be vprintf-like. Rename a few variables to make it clearer what pointers point to vprintf-like functions. Change-Id: I960e2138a18edcc742c450d68a0c6f7248f50c3f Reviewed-on: https://code.wireshark.org/review/14646 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-03-11Remove the last remnants of U3 support.Gerald Combs1-6/+0
Change-Id: Ide4c177e67a77c5f9495b3b4c0f817f40e6dde30 Reviewed-on: https://code.wireshark.org/review/14425 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-02-04Fix memleaks related to get_dirnamePeter Wu1-2/+2
get_dirname may return NULL instead of the original string, so avoid patterns like get_dirname(strdup(x)). Writing to cf_path.toUtf8().data() is fine btw, toUtf8() returns new memory. This fixes two memleak reported by LeakSanitizer via fileset_add_dir and MainWindow::captureFileReadFinished (both via cf_callback_invoke). Change-Id: I0f1528763e77e1f55b54b6674c890a9d02302ee8 Reviewed-on: https://code.wireshark.org/review/13691 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-02-01extcap: Add Save functionality to options dialogRoland Knall1-0/+8
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-01No need for toolkit-dependent color initialization.Guy Harris1-1/+1
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>
2015-12-29Qt: Add support of gui.window_titleAlexis La Goutte1-0/+2
Ping-Bug: 11102 Bug: 11691 Change-Id: I7b1673ffafcda644f4905265061ba11733dd91d3 Reviewed-on: https://code.wireshark.org/review/12650 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-12-28Refactor GUI dependencies out of color_filters.[ch] and move it to epan ↵Michael Mann1-5/+10
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-19Allow "capture info data" to not be a singleton.Michael Mann1-1/+1
It was buried as a static variable in capture_info.c, and functions were refactored to allow a pointer to the info_data_t structure to be passed in. TShark and GTK will have their own single (global) copy of the structure, while it opens up Qt to have multiple instances. Change-Id: Ic2d7a2ad574de43f457cb18b194d6bc3fffb6120 Reviewed-on: https://code.wireshark.org/review/12691 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-16Qt: save custom colors in recent_common filePascal Quantin1-15/+1
This allows to save colors across sessions for systems other than OSX that do not provide a system wide color picker While we are at it, let's stop reading the recent file twice at startup Bug: 11888 Change-Id: I69ff14d699d8111fe6a8bdac0157fcd115a60c2b Reviewed-on: https://code.wireshark.org/review/12659 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-12-15Qt: apply '-Y' display filter unconditionally and not only when opening a ↵Pascal Quantin1-2/+2
capture file Bug: 11891 Change-Id: I20c4497bdf255627c845f5d6fba2ad7797815b08 Reviewed-on: https://code.wireshark.org/review/12645 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: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-12-14Make init_progfile_dir() take a function pointer [-Wpedantic]João Valverde1-1/+1
Change-Id: I45f8ea5ee6ccc5a484c60ad6e686aaf30f6b0c98 Reviewed-on: https://code.wireshark.org/review/12557 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu>