diff options
author | Michael Mann <mmann78@netscape.net> | 2017-11-09 20:58:38 -0500 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2017-11-10 03:57:17 +0000 |
commit | cb7e896a4a450294dde70f01dc7cc105a883ef44 (patch) | |
tree | c92a8bbcf8a38eb465ec17d3309eea6331f3d958 /ui | |
parent | fd46a58581d0e5bacfb8bf5e57670adaacaf18ab (diff) |
Add frame number to packet comment dialog
Bug: 14185
Change-Id: I9f52999339d3c34502d4e046e22f05a83fa773bb
Reviewed-on: https://code.wireshark.org/review/24330
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'ui')
-rw-r--r-- | ui/qt/main_window_slots.cpp | 2 | ||||
-rw-r--r-- | ui/qt/packet_comment_dialog.cpp | 8 | ||||
-rw-r--r-- | ui/qt/packet_comment_dialog.h | 4 |
3 files changed, 10 insertions, 4 deletions
diff --git a/ui/qt/main_window_slots.cpp b/ui/qt/main_window_slots.cpp index 4c5491920a..9c3a181022 100644 --- a/ui/qt/main_window_slots.cpp +++ b/ui/qt/main_window_slots.cpp @@ -2237,7 +2237,7 @@ void MainWindow::on_actionEditTimeShift_triggered() void MainWindow::on_actionEditPacketComment_triggered() { - PacketCommentDialog pc_dialog(this, packet_list_->packetComment()); + PacketCommentDialog pc_dialog(capture_file_.capFile()->current_frame->num, this, packet_list_->packetComment()); if (pc_dialog.exec() == QDialog::Accepted) { packet_list_->setPacketComment(pc_dialog.text()); updateForUnsavedChanges(); diff --git a/ui/qt/packet_comment_dialog.cpp b/ui/qt/packet_comment_dialog.cpp index 85318f9cd3..6355f3aa9e 100644 --- a/ui/qt/packet_comment_dialog.cpp +++ b/ui/qt/packet_comment_dialog.cpp @@ -24,13 +24,17 @@ #include "wireshark_application.h" -PacketCommentDialog::PacketCommentDialog(QWidget *parent, QString comment) : +PacketCommentDialog::PacketCommentDialog(guint32 frame, QWidget *parent, QString comment) : GeometryStateDialog(parent), pc_ui_(new Ui::PacketCommentDialog) { + + QString title = QString(tr("Packet %1 Comment")) + .arg(frame); + pc_ui_->setupUi(this); loadGeometry(); - setWindowTitle(wsApp->windowTitleString(tr("Packet Comment"))); + setWindowTitle(wsApp->windowTitleString(title)); pc_ui_->commentTextEdit->setPlainText(comment); } diff --git a/ui/qt/packet_comment_dialog.h b/ui/qt/packet_comment_dialog.h index 9593b74960..591312f2f0 100644 --- a/ui/qt/packet_comment_dialog.h +++ b/ui/qt/packet_comment_dialog.h @@ -22,6 +22,8 @@ #ifndef PACKET_COMMENT_DIALOG_H #define PACKET_COMMENT_DIALOG_H +#include <glib.h> + #include "geometry_state_dialog.h" namespace Ui { @@ -33,7 +35,7 @@ class PacketCommentDialog : public GeometryStateDialog Q_OBJECT public: - explicit PacketCommentDialog(QWidget *parent = 0, QString comment = QString()); + explicit PacketCommentDialog(guint32 frame, QWidget *parent = 0, QString comment = QString()); ~PacketCommentDialog(); QString text(); |