aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2016-02-10 20:39:55 +0100
committerStig Bjørlykke <stig@bjorlykke.org>2016-02-11 07:36:01 +0000
commiteefcbc0a591c1823697f2d049dbd921c97102611 (patch)
treeec82f49ebfc603eaab2efe7a0b9ea737aa14eb2f /ui/qt
parent7a1eca1726609fcc75594c688756621c3329a509 (diff)
Qt: Add hint label in Show Packet Bytes
Show frame number, field name (abbrev) and number of bytes. Added some translations. Change-Id: I9777d43d63a52fcdb221864bad097a9604522d3a Reviewed-on: https://code.wireshark.org/review/13888 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Diffstat (limited to 'ui/qt')
-rw-r--r--ui/qt/show_packet_bytes_dialog.cpp10
-rw-r--r--ui/qt/show_packet_bytes_dialog.ui10
-rw-r--r--ui/qt/wireshark_en.ts103
3 files changed, 121 insertions, 2 deletions
diff --git a/ui/qt/show_packet_bytes_dialog.cpp b/ui/qt/show_packet_bytes_dialog.cpp
index d09c7ac9b3..166309d43d 100644
--- a/ui/qt/show_packet_bytes_dialog.cpp
+++ b/ui/qt/show_packet_bytes_dialog.cpp
@@ -49,11 +49,19 @@ ShowPacketBytesDialog::ShowPacketBytesDialog(QWidget &parent, CaptureFile &cf) :
ui->setupUi(this);
field_info *finfo = cf.capFile()->finfo_selected;
- setWindowSubtitle (QString("%1 (%2)").arg(finfo->hfinfo->name, finfo->hfinfo->abbrev));
+ QString field_name = QString("%1 (%2)").arg(finfo->hfinfo->name, finfo->hfinfo->abbrev);
+ setWindowSubtitle (field_name);
const guint8 *bytes = tvb_get_ptr(finfo->ds_tvb, 0, -1) + finfo->start;
field_bytes_ = QByteArray((const char *)bytes, finfo->length);
+ QString hint = tr("Frame %1, %2, %Ln byte(s).", "", finfo->length)
+ .arg(cf.capFile()->current_frame->num)
+ .arg(field_name);
+ hint.prepend("<small><i>");
+ hint.append("</i></small>");
+ ui->hintLabel->setText(hint);
+
// Try loading as image
if (image_.loadFromData(field_bytes_)) {
show_as_ = ShowAsImage;
diff --git a/ui/qt/show_packet_bytes_dialog.ui b/ui/qt/show_packet_bytes_dialog.ui
index 7c8e94fb73..b0c00aa11c 100644
--- a/ui/qt/show_packet_bytes_dialog.ui
+++ b/ui/qt/show_packet_bytes_dialog.ui
@@ -31,6 +31,16 @@
</widget>
</item>
<item>
+ <widget class="QLabel" name="hintLabel">
+ <property name="text">
+ <string>Hint.</string>
+ </property>
+ <property name="wordWrap">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
<layout class="QHBoxLayout" name="horizontalLayout_1" stretch="0,0,0,0,1,0,0">
<item>
<widget class="QLabel" name="lShowAs">
diff --git a/ui/qt/wireshark_en.ts b/ui/qt/wireshark_en.ts
index aa26f727b3..3c66cdfd9b 100644
--- a/ui/qt/wireshark_en.ts
+++ b/ui/qt/wireshark_en.ts
@@ -8043,7 +8043,12 @@ a:hover {
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="main_window.ui" line="2866"/>
+ <location filename="main_window.ui" line="2842"/>
+ <source>Show Packet Bytes…</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="main_window.ui" line="2871"/>
<source>UDP Multicast Streams</source>
<translation type="unfinished"></translation>
</message>
@@ -13702,6 +13707,102 @@ a:hover {
</message>
</context>
<context>
+ <name>ShowPacketBytesDialog</name>
+ <message>
+ <location filename="show_packet_bytes_dialog.ui" line="20"/>
+ <source>Show Packet Bytes</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="show_packet_bytes_dialog.ui" line="36"/>
+ <source>Hint.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="show_packet_bytes_dialog.ui" line="48"/>
+ <source>Show as</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="show_packet_bytes_dialog.ui" line="79"/>
+ <source>Find:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="show_packet_bytes_dialog.ui" line="89"/>
+ <source>Find &amp;Next</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message numerus="yes">
+ <location filename="show_packet_bytes_dialog.cpp" line="58"/>
+ <source>Frame %1, %2, %Ln byte(s).</source>
+ <translation type="unfinished">
+ <numerusform>Frame %1, %2, %Ln byte.</numerusform>
+ <numerusform>Frame %1, %2, %Ln bytes.</numerusform>
+ </translation>
+ </message>
+ <message>
+ <location filename="show_packet_bytes_dialog.cpp" line="76"/>
+ <source>ASCII</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="show_packet_bytes_dialog.cpp" line="77"/>
+ <source>EBCDIC</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="show_packet_bytes_dialog.cpp" line="78"/>
+ <source>Hex Dump</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="show_packet_bytes_dialog.cpp" line="79"/>
+ <source>HTML</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="show_packet_bytes_dialog.cpp" line="80"/>
+ <source>Image</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="show_packet_bytes_dialog.cpp" line="81"/>
+ <source>ISO 8859-1</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="show_packet_bytes_dialog.cpp" line="82"/>
+ <source>Raw</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="show_packet_bytes_dialog.cpp" line="83"/>
+ <source>UTF-8</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="show_packet_bytes_dialog.cpp" line="87"/>
+ <source>Print</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="show_packet_bytes_dialog.cpp" line="90"/>
+ <source>Copy</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="show_packet_bytes_dialog.cpp" line="93"/>
+ <source>Save as</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="show_packet_bytes_dialog.cpp" line="179"/>
+ <source>Save Selected Packet Bytes As</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
<name>SimpleDialog</name>
<message>
<location filename="simple_dialog.cpp" line="200"/>