aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/preferences_dialog.cpp
AgeCommit message (Collapse)AuthorFilesLines
2016-07-02Qt: add initializer (CID 1159352).Dario Lombardo1-1/+2
Change-Id: Ie355a31284685ca0c160a46a4daa6c28b39e3093 Reviewed-on: https://code.wireshark.org/review/16247 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-06-30Add missing breaks.Gerald Combs1-1/+3
Add a couple of missing breaks. Fixes CIDs 1362970 and 1362971. Change-Id: If37bcfed9b48ba30ce8ed85df6e232a6bc5d36f4 Reviewed-on: https://code.wireshark.org/review/16223 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-06-28Qt: Make recent preferences changes work with Qt4.Gerald Combs1-9/+11
Cast a pointer to a QWidget * so that compilation and pref selection works for Qt4. Add an assert and some comments. Change-Id: Ide89b698220a9af7b7252488f0770ff35081432e Reviewed-on: https://code.wireshark.org/review/16195 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-28Qt: Add a missing Q_DECLARE_METATYPE to fix a compile error on RHEL 7.Jens Kilian1-0/+1
Change-Id: I6cf0a95525334d5a7561a477093b892a3f821b98 Reviewed-on: https://code.wireshark.org/review/16189 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-06-28Qt: Preferences dialog performance improvements.Gerald Combs1-189/+285
Fill in advanced and module tree item text when requested. Create ModulePreferencesScrollAreas only when we need to show them. Change-Id: I5aa7d5dba8f5d20de088de3a9d1ee9d58e779269 Reviewed-on: https://code.wireshark.org/review/16181 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>
2016-03-03Qt: Allow regex searching in the advanced prefs.Gerald Combs1-5/+6
Use a QRegex for Preferences → Advanced → Search. Change-Id: Iebf1cba9c17ff774ce50ef909b6d181751b272aa Reviewed-on: https://code.wireshark.org/review/13924 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-02-28Qt: Add dialog geometry restoreStig Bjørlykke1-1/+3
Add GeometryStateDialog class to handle load and save dialog geometry. The QDialog class name will be used as window name. For shared classes the UAT name or the statistics title or abbr will be used. Change-Id: I5a019598307fb3861518f41e733de834788184d8 Reviewed-on: https://code.wireshark.org/review/14139 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-02-24De-canonicalize paths for file and directory path preferences.Guy Harris1-1/+1
Undo Qt's "helpful" canonicalization of paths returned by the file dialogs to use / as the pathname component separator rather than using the native pathname component separator. Bug: 12117 Change-Id: I6077191a2204574ca50f53b5424f7f421db33db3 Reviewed-on: https://code.wireshark.org/review/14109 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-08-26Don't emit app signals from dialogs.Gerald Combs1-5/+2
Emitting PacketDissectionChanged from a dialog on can render the main window unusable on OS X. A workaround for this was added to the preferences dialog in g8fc2327. Generalize the workaround and use it elsewhere. Fix the "Enabled Protocols" action name while we're here. Bug: 11361 Bug: 11448 Change-Id: I89e98daaaedc877d3b13b0d33b6f3be033e323d7 Reviewed-on: https://code.wireshark.org/review/10271 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-07Starting to get rid of Q_UNUSED declarations for unused function parameters.Joerg Mayer1-14/+5
The official C++ way is to leave out the variable name instead. This has the advantage to be reliable: In one case a variable declared unused was later used. Change-Id: I1c96636f7fa7a621d1594d1e9cacaec75c561faa Reviewed-on: https://code.wireshark.org/review/9532 Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2015-06-25Qt: use <> for including the generated ui_*.h filesMartin Kaiser1-1/+1
this should make Visual Studio pick up the generated include files from the build directory instead of the source directory (which may contain lefovers from an in-tree build) Change-Id: Ie3de4cdd85a2865e203118a42ab10f443372f03b Reviewed-on: https://code.wireshark.org/review/9129 Petri-Dish: Martin Kaiser <wireshark@kaiser.cx> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-06-15Qt: Add the ability to show preferences by module name.Gerald Combs1-9/+29
Currently unused, but allows feature parity with the GTK+ UI. Change-Id: I33e0bfb434949aabd75ecd2ed36e696731195542 Reviewed-on: https://code.wireshark.org/review/8922 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-14Qt: Apply protocol preferences.Gerald Combs1-0/+8
Make sure we call prefs_apply_all when saving preferences. Bug: 11119 Change-Id: Iacf1e28e69c2aebcbbd7dceaa210c8219663665f Reviewed-on: https://code.wireshark.org/review/8462 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-10Qt/C++: Change a bunch of includes to forward declarations.Gerald Combs1-0/+1
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-01-06Qt: Add a context menu to the packet list header.Gerald Combs1-4/+7
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-12-31Qt: Convert more dialog titles.Gerald Combs1-4/+2
Change-Id: I9c3e3471a92b7af9347a541bece3d9405d37dce0 Reviewed-on: https://code.wireshark.org/review/6193 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-12-30Qt: Continue using the new window title format.Gerald Combs1-0/+2
Update several dialog titles to "Wireshark · <subtile...>". Change-Id: I64645e913500ecd55a008e1609b46385dafe7de9 Reviewed-on: https://code.wireshark.org/review/6127 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-12-28Removed duplicated #include linesDario Lombardo1-1/+0
Change-Id: I9cafa3cd5c74121168777d8c656e7e94e89efd3c Reviewed-on: https://code.wireshark.org/review/6065 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-12-24Qt (KeyPressEvent): Missing break in switch (CID 1159205, 1159206, 1159208, ↵Alexis La Goutte1-0/+2
1159209) Change-Id: I40b7c7eefb269570e6a1c5c9ec310fa97840d42d Reviewed-on: https://code.wireshark.org/review/5995 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-11-04Qt: Dynamic languagesMichal Labedzki1-1/+5
- 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-09-24Qt: Fix preference bugs.Gerald Combs1-3/+3
Make sure we set the "resolved" member of the column fmt_data struct. Emitting WiresharkApplication::AppSignals from a modal dialog can cause event loop problems on OS X. Queue them up in PreferencesDialog and emit them after closing. Change-Id: I2de77778a0448db3b87d402e431b8e5f325cbbda Reviewed-on: https://code.wireshark.org/review/4274 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-07-04Move utility routines for capturing into a libcaputils static library.Guy Harris1-1/+1
Some of those routines are used only in dumpcap; others are used in TShark and Wireshark as well. Change-Id: I9d92483f2fcff57a7d8b6bf6bdf2870505d19fb7 Reviewed-on: https://code.wireshark.org/review/2841 Reviewed-by: Guy Harris <guy@alum.mit.edu>
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-10Do not show uat preferences if not registered for the gui.Irene Rüngeler1-3/+5
svn path=/trunk/; revision=53904
2013-11-25From Thomas ERSFELD (GSoC13) : Add Capture interface dialog windowAlexis La Goutte1-55/+56
* Reuse sparkline from welcome * Split settings in tab (!= GTK) * No all feature work (Work In Progress...) * ... Comments (and review) are welcome ! svn path=/trunk/; revision=53563
2013-07-25Add a UAT dialog. Make UAT preferences uat_t * instead of void *.Gerald Combs1-2/+5
C++-ize the UAT headers. Add an ElidedLabel widget. Use it in the File Set, Profile, and UAT dialogs. Update the Qt README. svn path=/trunk/; revision=50896
2013-05-13Add Some missing text to translateAlexis La Goutte1-2/+2
svn path=/trunk/; revision=49271
2013-04-24The porting guide for Qt5 requires that Q_OS_ be used insteadJörg Mayer1-1/+1
of Q_WS_ in Qt4 projects See: http://qt-project.org/doc/qt-5.0/qtdoc/portingguide.html svn path=/trunk/; revision=49013
2013-02-08Add a directory name preference type (PREF_DIRNAME) and registrationGerald Combs1-4/+13
routine (prefs_register_directory_preference). Add PREF_FILENAME and PREF_DIRNAME support to the Qt module preferences. Change a couple of preferences to directory names. Clean up some names and default settings. svn path=/trunk/; revision=47573
2013-02-08Add a ModulePreferencesScrollArea widget which builds a scrollable frameGerald Combs1-11/+131
for a preferences module. Use it to fill in the remaining preferences. Don't show the printing preferences since they're not used here. Change the titles and tooltips for some of the name resolution preferences. Disable the capture preferences if we can't capture. This is different from the GTK+ version which hides it completely. Thus concludes the preferences dialog (for the time being). svn path=/trunk/; revision=47545
2013-02-06Add Filter Expressions^WButton^WShortcut^WBookmark preferences. Gerald Combs1-0/+1
Add comments noting that - We might want to do something different when the bookmark button is pressed. - The display filters (dfilters file) and gui.filter_expressions preferences should be merged. - Many buttons on Qt4 + OS X + unifiedTitleAndToolBarOnMac makes the main window really wide. Add a qstring_strdup convenience routine. Add "disabled" display filter edit icons. Fix up whitespace and descriptions in a couple of places. svn path=/trunk/; revision=47522
2013-02-01Add interface prefs. Adjust some spacing and resize behavior.Gerald Combs1-0/+3
svn path=/trunk/; revision=47403
2013-01-24Add font and color preferences. Unfortunately Qt doesn't have a colorGerald Combs1-0/+2
picker widget so we're back to popping up dialogs. Move the contents of monospace_font.{cpp,h} to wireshark_application.{cpp,h}. Pango and Qt use completely different string representations for fonts. Add a separate gui.qt.font_name preference so that they don't clobber each other. svn path=/trunk/; revision=47240
2013-01-23Add column preferences.Gerald Combs1-1/+5
svn path=/trunk/; revision=47231
2013-01-21Add an initial layout preference pane. Set SVN properties.Gerald Combs1-0/+3
svn path=/trunk/; revision=47190
2013-01-20Add Some missing text to translateAlexis La Goutte1-5/+5
svn path=/trunk/; revision=47182
2013-01-19Add an "Appearance" (aka "User Interface") preference pane. Having anGerald Combs1-7/+34
"Advanced" pane gives us the luxury of omitting some items in favor of simplicity so do that. svn path=/trunk/; revision=47158
2013-01-18Add more AirPcap code, disabled for now.Gerald Combs1-0/+8
svn path=/trunk/; revision=47142
2013-01-18Don't call prefs_airpcap_update() for now. Remove some debugging code.Gerald Combs1-1/+1
svn path=/trunk/; revision=47141
2013-01-18Rename the "saved_val" preference element to "stashed_val" in order toGerald Combs1-39/+180
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-14When the user is editing text or selecting from a combo box, don'tGerald Combs1-42/+102
immediately close the dialog if he or she presses the escape or enter keys. Revert the value if the user presses escape. Properly handle the base for uint preferences. Fix a NULL pointer dereference. Add a gchar_free_to_qstring utility routine which creates a QString from a g_malloced string and frees it. svn path=/trunk/; revision=47083
2013-01-07Allow editing via the advanced preferences tree. Double-clicking anGerald Combs1-57/+333
item's name, status, or type resets it to its default value. Double-clicking the item's value lets you edit it. Implement the advanced search field. (Clicking OK and Cancel still doesn't yet do anything.) Note that we could probably use a prefs_register_{uint16|port}_preference routine for 16-bit values. Make reset_pref public. Update some names and descriptions. svn path=/trunk/; revision=46986
2013-01-05Break out preference type names, type descriptions, stringGerald Combs1-0/+185
representations, and default status out of write_prefs and into their own routines. Split the corresponding custom preference write callbacks. Fix an apparent memory leak in the hidden column callback. Add an initial preferences dialog to the Qt port. Use the new preference routines to implement an "Adavanced" page similar to the "about:config" page available in many web browsers. Standard pages will hopefully follow soon. Remove some QDebug includes and make sure our QTreeWidgets have uniform row heights set. svn path=/trunk/; revision=46942