Add tooltips for the total number of streams.
authorgerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>
Sat, 4 Jan 2014 01:13:01 +0000 (01:13 +0000)
committergerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>
Sat, 4 Jan 2014 01:13:01 +0000 (01:13 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@54585 f5534014-38df-0310-8fa8-9805f1628bb7

ui/qt/follow_stream_dialog.cpp
ui/qt/qtshark_en.qm
ui/qt/qtshark_en.ts

index dd1ccce0f0fa6c2e169ce01bd3e599a37cc2269c..5d6d5ed9d74625bd4a38bacddacccc4788ab3664 100644 (file)
@@ -552,6 +552,8 @@ void FollowStreamDialog::setCaptureFile(capture_file *cf)
     if (!cf) { // We only want to know when the file closes.
         cap_file_ = NULL;
         ui->streamNumberSpinBox->setEnabled(false);
+        ui->streamNumberSpinBox->setToolTip(QString());
+        ui->streamNumberLabel->setToolTip(QString());
     }
 }
 
@@ -918,12 +920,17 @@ bool FollowStreamDialog::follow(QString previous_filter, bool use_tcp_index)
     switch (follow_type_)
     {
     case FOLLOW_TCP:
+    {
+        int stream_count = get_tcp_stream_count() - 1;
         ui->streamNumberSpinBox->blockSignals(true);
-        ui->streamNumberSpinBox->setMaximum(get_tcp_stream_count() - 1);
+        ui->streamNumberSpinBox->setMaximum(stream_count);
         ui->streamNumberSpinBox->setValue(get_follow_tcp_index());
         ui->streamNumberSpinBox->blockSignals(false);
+        ui->streamNumberSpinBox->setToolTip(tr("%Ln total stream(s).", "", stream_count));
+        ui->streamNumberLabel->setToolTip(ui->streamNumberSpinBox->toolTip());
 
         break;
+    }
     case FOLLOW_UDP:
         /* data will be passed via tap callback*/
         msg = register_tap_listener("udp_follow", &follow_info_,
index fc4bf1e1904822aebf91efc3d3f42ab78cf1ec46..8a88ce9abbf4fc9f9eec24ca118fac0a81593ff9 100755 (executable)
Binary files a/ui/qt/qtshark_en.qm and b/ui/qt/qtshark_en.qm differ
index 6b4b312cae073d26c0b0cac13573dd2a3929418a..f913e8b3ece8256fba78d259486d12593f889120 100755 (executable)
@@ -4,7 +4,7 @@
 <context>
     <name>FollowStreamDialog</name>
     <message numerus="yes">
-        <location filename="follow_stream_dialog.cpp" line="139"/>
+        <location filename="follow_stream_dialog.cpp" line="145"/>
         <source>%Ln client pkt(s), </source>
         <translation>
             <numerusform>%Ln client pkt, </numerusform>
@@ -12,7 +12,7 @@
         </translation>
     </message>
     <message numerus="yes">
-        <location filename="follow_stream_dialog.cpp" line="140"/>
+        <location filename="follow_stream_dialog.cpp" line="146"/>
         <source>%Ln server pkt(s), </source>
         <translation>
             <numerusform>%Ln server pkt, </numerusform>
         </translation>
     </message>
     <message numerus="yes">
-        <location filename="follow_stream_dialog.cpp" line="141"/>
+        <location filename="follow_stream_dialog.cpp" line="147"/>
         <source>%Ln turn(s).</source>
         <translation>
             <numerusform>%Ln turn.</numerusform>
             <numerusform>%Ln turns.</numerusform>
         </translation>
     </message>
+    <message numerus="yes">
+        <location filename="follow_stream_dialog.cpp" line="928"/>
+        <source>%Ln total stream(s).</source>
+        <translation type="unfinished">
+            <numerusform>%Ln stream.</numerusform>
+            <numerusform>%Ln total streams.</numerusform>
+        </translation>
+    </message>
 </context>
 <context>
     <name>SequenceDialog</name>
     <message numerus="yes">
-        <location filename="sequence_dialog.cpp" line="284"/>
         <source>%Ln node(s)</source>
-        <translation>
+        <translation type="obsolete">
             <numerusform>%Ln node</numerusform>
             <numerusform>%Ln nodes</numerusform>
         </translation>
     </message>
     <message numerus="yes">
-        <location filename="sequence_dialog.cpp" line="285"/>
         <source>%Ln item(s)</source>
-        <translation>
+        <translation type="obsolete">
             <numerusform>%Ln item</numerusform>
             <numerusform>%Ln items</numerusform>
         </translation>