Commit Graph

16 Commits

Author SHA1 Message Date
Gerald Combs 0d150d241f Qt: Convert the list management icons to templates.
Move the rest of the list management icons (remove, copy, clear, up, and
down) to the stock_icons directory. Convert them to templates by adding
".template" to their name.

Switch the UAT dialog to the "new" icons.

Convert the image README to .adoc.

To do:
- Make sure the icons are actually black.
- Convert the rest of the preference dialogs and other consumers.

Ping-Bug: 15511
Change-Id: Ie39afd52585ecbb644812be9f2762fede6e449ba
Reviewed-on: https://code.wireshark.org/review/33687
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-06-20 20:50:25 +00:00
Stig Bjørlykke 75c370fe54 Qt: Refactor copy from profile widget
Refactor CopyFromProfile class from Button to Menu to make it
usable for existing buttons, both QPushButton and QToolButton.

Change-Id: I7d23b4225dbe45f961fb05e73dbb4dd51e6f8ea1
Reviewed-on: https://code.wireshark.org/review/30083
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-10-08 21:07:49 +00:00
Stig Bjørlykke 9388bd0436 Qt: Clean up indentation
Change-Id: Idbae503b44c207d71431159a3eaf762e1dc79977
Reviewed-on: https://code.wireshark.org/review/30056
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-10-07 20:27:09 +00:00
Stig Bjørlykke 6f8ee143f7 Qt: Update UAT clear button enabling
Check for enabling the clear button when loading a UatDialog.

Also move setting enabled property to false for deleteToolButton,
copyToolButton, moveUpToolButton, moveDownToolButton and clearToolButton
to uat_dialog.ui.

Change-Id: I1ff3ed9906eb541e929297b34abcce2bee4a062c
Reviewed-on: https://code.wireshark.org/review/29953
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-10-01 09:05:48 +00:00
Gerald Combs 0f3aa8522e Qt: Move sized toolbar images to stock_icons.
The sized (WWxHH) icons in the toolbar directory aren't limited to
toolbars. Create a "stock_icons" directory and move them and their
related SVGs there.

Change-Id: I2c1852499594aa738371c79542f24bd3351653bb
Reviewed-on: https://code.wireshark.org/review/25133
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-01-05 03:27:15 +00:00
Stig Bjørlykke 665eb78729 Qt: Add UAT move up and down buttons
Add two new buttons for moving entries up and down in the list.

Change-Id: I90e5c5812754391651885e2a622148cecc124099
Reviewed-on: https://code.wireshark.org/review/24413
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-11-16 06:10:47 +00:00
Stig Bjørlykke 8d9fbdf851 Qt: Show as much as possible of UAT pathLabel
Remove the horizontal spacer between buttons an path label in UAT
views to show as much as possible of the path label.

Change-Id: I99d21ff6a1d151c9fcf83200a88b34b2e0c8eb5d
Reviewed-on: https://code.wireshark.org/review/24444
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-11-15 15:09:40 +00:00
Michael Mann 61380f9504 Add button in Qt UAT dialog/frame to remove all UAT entries at once.
Change-Id: If5a172cd69beeb0b9a22eb7f6b9e7cb25f350b49
Reviewed-on: https://code.wireshark.org/review/23968
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-10-21 16:33:03 +00:00
Peter Wu 4beb7430d4 Qt: refactor UatTreeView into something reusable
UatTreeView had two functions:
 1. Saner navigation functionality when pressing tab.
 2. Start editing when the currently selected item changes.

Since this tab navigation functionality is desired in more places,
extract this functionality. Add more documentation while at it and use
an alternative, declarative style to connect signals.

Move the second functionality to the caller since not all views need it.

Change-Id: Ibe886f2c2763dbe024614203a44b72173fbbce06
Reviewed-on: https://code.wireshark.org/review/22639
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-07-16 14:47:01 +00:00
Roland Knall ee699eb720 Qt: Move all utility widgets to widgets subdirectory
Move all utility widgets to the widgets subdirectory and
add separate source_group for their files

Correct some alphabetization in ui/qt/CMakeLists.txt noticed
during compare.

Change-Id: I2d664edc2b32f126438fb673ea53a5ae94cd43d1
Reviewed-on: https://code.wireshark.org/review/22531
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-07-11 21:30:29 +00:00
Stig Bjørlykke 591e63366b Qt: Position UAT hint label just below the list.
Place the UAT hint label at the same position as in other dialogs;
just below the main widget.  Also use smaller font and italic.

Change-Id: I51251825ff08122e17ca60144ef53fed5c6142ef
Reviewed-on: https://code.wireshark.org/review/18969
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2016-11-28 19:42:47 +00:00
Peter Wu 1cd22559a8 Qt: convert UatDialog to model/view pattern, improve UX
Fixes:
 - Fix crash (heap-use-after-free) on removing a record while editing.
 - Mark a record as invalid if any of the fields fail the validation.
   (Fixes crash in at least the ISAKMP dissector.)
 - Prevent saving of invalid UAT entries (e.g. empty UATs).
 - Do not close the dialog on pressing Enter/Escape while editing,
   close the editor instead.
 - Fix HTML injection in the error messages.

Improvements:
 - Tab-navigation now works between fields.
 - The field editor is now closed once the focus is lost.
 - Fields that fail validation are marked (currently with a pink color).
 - The error hint selection has become smarter (see comments in
   UatDialog::checkForErrorHint).
 - Properly recognizes PT_TXTMOD_HEXBYTES formats like "aa:bb"
   (previously it would not expect the ":" and report a bad length).
   A validator prevents invalid strings from being entered.
 - The OK button is disabled when new/edited records are bad. Notably,
   existing (possibly invalid) records are skipped. (Bug 7471).

Live validation (while typing in the editor) was dropped during
conversion, but it can be added later if desired.

Drag and drop reordering still needs to be implemented.

Bug: 11714
Bug: 7471
Change-Id: Ic0b6a177f90503fbd65b5001d8a87a10e38f4d64
Reviewed-on: https://code.wireshark.org/review/17994
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-10-12 03:53:27 +00:00
Pascal Quantin ccca843a57 Activate word wrap for hintLabel defined as QLabel
Without this, a long hint string (like a wrong protocol name in the SSL UAT preference) will resize the window to match the string.
With this change, instead the hintLabel string is continuing on a new line to match currently configured window size

Change-Id: Ib8fcc7bd96585717f122b0921165c4d916442cb0
Reviewed-on: https://code.wireshark.org/review/11529
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-11-04 11:34:30 +00:00
Gerald Combs 2d065bcd52 Fix some copy+pasted tooltip text.
Change-Id: I782cc60b33639ad8b8b403db7094d9568e6cfc59
Reviewed-on: https://code.wireshark.org/review/11227
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-10-23 18:09:11 +00:00
Pascal Quantin 969c307820 Qt: various fixes to UAT dialog
- call set callback even when no check callback is available
- convert an ascii string containing hex to an hex string for PT_TXTMOD_HEXBYTES entries
- move update_cb call to the end of stringPrefEditingFinished() (to avoid calling it each time a character is typed in the edit line)
- when a new row is created, ensure that UAT record is configured with the default enum value selected by the GUI

Bug: 11396
Change-Id: I9d1094629b4a014fed1704b35cd795cd7f2f136a
Reviewed-on: https://code.wireshark.org/review/11032
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: Anders Broman <a.broman58@gmail.com>
2015-10-16 06:22:37 +00:00
Gerald Combs a05f55bffc Add a UAT dialog. Make UAT preferences uat_t * instead of void *.
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-07-25 23:49:47 +00:00