aboutsummaryrefslogtreecommitdiffstats
path: root/ui/win32
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2012-07-27 21:43:02 +0000
committerGerald Combs <gerald@wireshark.org>2012-07-27 21:43:02 +0000
commit5fc656ee46d1c94e79952e97523db3e33221782b (patch)
treea10b30efbc88b06681771e27e6897a2a36eff72a /ui/win32
parent1f6b7eb9c451188d87a3171ba4f56aa8a7d65b22 (diff)
Add a preview to the common file dialog. Adjust the win32 file dialog
preview logic slightly. svn path=/trunk/; revision=44080
Diffstat (limited to 'ui/win32')
-rw-r--r--ui/win32/file_dlg_win32.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/ui/win32/file_dlg_win32.c b/ui/win32/file_dlg_win32.c
index c346ef5085..d0ea400554 100644
--- a/ui/win32/file_dlg_win32.c
+++ b/ui/win32/file_dlg_win32.c
@@ -1410,7 +1410,7 @@ preview_set_file_info(HWND of_hwnd, gchar *preview_file) {
return FALSE;
}
- /* Format */
+ /* Format: directory */
cur_ctrl = GetDlgItem(of_hwnd, EWFD_PTX_FORMAT);
if (test_for_directory(preview_file) == EISDIR) {
SetWindowText(cur_ctrl, _T("directory"));
@@ -1435,16 +1435,16 @@ preview_set_file_info(HWND of_hwnd, gchar *preview_file) {
}
}
+ /* Format */
+ cur_ctrl = GetDlgItem(of_hwnd, EWFD_PTX_FORMAT);
+ SetWindowText(cur_ctrl, utf_8to16(wtap_file_type_string(wtap_file_type(wth))));
+
/* Size */
filesize = wtap_file_size(wth, &err);
utf_8to16_snprintf(string_buff, PREVIEW_STR_MAX, "%" G_GINT64_FORMAT " bytes", filesize);
cur_ctrl = GetDlgItem(of_hwnd, EWFD_PTX_SIZE);
SetWindowText(cur_ctrl, string_buff);
- /* Type */
- cur_ctrl = GetDlgItem(of_hwnd, EWFD_PTX_FORMAT);
- SetWindowText(cur_ctrl, utf_8to16(wtap_file_type_string(wtap_file_type(wth))));
-
time(&time_preview);
while ( (wtap_read(wth, &err, &err_info, &data_offset)) ) {
phdr = wtap_phdr(wth);
@@ -1477,7 +1477,7 @@ preview_set_file_info(HWND of_hwnd, gchar *preview_file) {
return TRUE;
}
- /* Packet count */
+ /* Packets */
if(is_breaked) {
StringCchPrintf(string_buff, PREVIEW_STR_MAX, _T("more than %u packets (preview timeout)"), packet);
} else {