From 5fc656ee46d1c94e79952e97523db3e33221782b Mon Sep 17 00:00:00 2001 From: Gerald Combs Date: Fri, 27 Jul 2012 21:43:02 +0000 Subject: Add a preview to the common file dialog. Adjust the win32 file dialog preview logic slightly. svn path=/trunk/; revision=44080 --- ui/win32/file_dlg_win32.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'ui/win32') 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 { -- cgit v1.2.3