diff options
author | Gerald Combs <gerald@wireshark.org> | 2015-03-04 08:12:58 -0800 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2015-03-05 00:49:11 +0000 |
commit | 0a4f93ab2bc7d4f45bb97d25a953e474d79550f3 (patch) | |
tree | dfa87b514298a3ebf83cf13a4fdec9fff598983b /ui/qt/qt_ui_utils.cpp | |
parent | 9df502aff5981c7759968ad1a07365c6cfd3961c (diff) |
Qt: Show the full file path in the status bar.
Add file_size_to_qstring and use it to show the file size. Add a
"shrinkable" property to LabelStack. Make the info status shrinkable.
Elide text so that long file paths don't widen the main window.
Change-Id: Ieb1caaf7e016384609d41fcabaa63d8f7a293eff
Bug: 10949
Reviewed-on: https://code.wireshark.org/review/7534
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'ui/qt/qt_ui_utils.cpp')
-rw-r--r-- | ui/qt/qt_ui_utils.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/ui/qt/qt_ui_utils.cpp b/ui/qt/qt_ui_utils.cpp index c4e33e3002..0bc9e39f0c 100644 --- a/ui/qt/qt_ui_utils.cpp +++ b/ui/qt/qt_ui_utils.cpp @@ -99,10 +99,16 @@ const QString val_ext_to_qstring(const guint32 val, value_string_ext *vse, const return val_qstr; } -const QString bits_s_to_qstring(const double val) +const QString bits_s_to_qstring(const double bits_s) { return gchar_free_to_qstring( - format_size(val, format_size_unit_none|format_size_prefix_si)); + format_size(bits_s, format_size_unit_none|format_size_prefix_si)); +} + +const QString file_size_to_qstring(const gint64 size) +{ + return gchar_free_to_qstring( + format_size(size, format_size_unit_bytes|format_size_prefix_si)); } void smooth_font_size(QFont &font) { |