Fix compilation on Windows.
svn path=/trunk/; revision=45106
This commit is contained in:
parent
25eab1c383
commit
e9d4c115b5
|
@ -45,7 +45,6 @@
|
|||
#include <wsutil/file_util.h>
|
||||
|
||||
#include "ui/alert_box.h"
|
||||
#include "ui/file_dialog.h"
|
||||
#include "ui/recent.h"
|
||||
#include "ui/simple_dialog.h"
|
||||
#include "ui/ui_util.h"
|
||||
|
@ -1728,8 +1727,8 @@ file_save_as_cmd(capture_file *cf, gboolean must_support_comments,
|
|||
*/
|
||||
for (;;) {
|
||||
#ifdef USE_WIN32_FILE_DIALOGS
|
||||
//if (win32_save_as_file(GDK_WINDOW_HWND(gtk_widget_get_window(top_level)), cf,
|
||||
// file_name, &file_type, &compressed, must_support_comments)) {
|
||||
if (win32_save_as_file(GDK_WINDOW_HWND(gtk_widget_get_window(top_level)), cf,
|
||||
file_name, &file_type, &compressed, must_support_comments)) {
|
||||
/* They discarded comments, so redraw the packet details window
|
||||
to reflect any packets that no longer have comments. */
|
||||
packet_list_queue_draw();
|
||||
|
@ -1741,7 +1740,7 @@ file_save_as_cmd(capture_file *cf, gboolean must_support_comments,
|
|||
support them? If not, ask the user whether they want to
|
||||
discard the comments or choose a different format. */
|
||||
#ifdef USE_WIN32_FILE_DIALOGS
|
||||
//switch (win32_check_save_as_with_comments(GDK_WINDOW_HWND(gtk_widget_get_window(top_level)), cf, file_type) {
|
||||
switch (win32_check_save_as_with_comments(GDK_WINDOW_HWND(gtk_widget_get_window(top_level)), cf, file_type)) {
|
||||
#else /* USE_WIN32_FILE_DIALOGS */
|
||||
switch (gtk_check_save_as_with_comments(top_level, cf, file_type)) {
|
||||
#endif /* USE_WIN32_FILE_DIALOGS */
|
||||
|
|
|
@ -56,7 +56,6 @@
|
|||
#include "../color_filters.h"
|
||||
#include "../merge.h"
|
||||
|
||||
#include "ui/file_dialog.h"
|
||||
#include "ui/last_open_dir.h"
|
||||
|
||||
#include "ui/gtk/main.h"
|
||||
|
@ -368,7 +367,6 @@ win32_save_as_file(HWND h_wnd, capture_file *cf, GString *file_name, int *file_t
|
|||
GArray *savable_file_types;
|
||||
OPENFILENAME *ofn;
|
||||
TCHAR file_name16[MAX_PATH] = _T("");
|
||||
gchar *dirname;
|
||||
int ofnsize;
|
||||
gboolean gsfn_ok;
|
||||
#if (_MSC_VER >= 1500)
|
||||
|
@ -437,13 +435,14 @@ win32_save_as_file(HWND h_wnd, capture_file *cf, GString *file_name, int *file_t
|
|||
*compressed = g_compressed;
|
||||
} else {
|
||||
/* User cancelled or closed the dialog, or an error occurred. */
|
||||
if (CommDlgExtendedError() != 0) {
|
||||
/* XXX - pop up some error here. FNERR_INVALIDFILENAME
|
||||
* might be a user error; if so, they should know about
|
||||
* it. For now we force a do-over.
|
||||
*/
|
||||
g_string_truncate(file_name, 0);
|
||||
gsfn_ok = TRUE;
|
||||
if (CommDlgExtendedError() == 0) {
|
||||
/* XXX - pop up some error here. FNERR_INVALIDFILENAME
|
||||
* might be a user error; if so, they should know about
|
||||
* it. For now we force a do-over.
|
||||
*/
|
||||
g_string_truncate(file_name, 0);
|
||||
gsfn_ok = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
g_sf_hwnd = NULL;
|
||||
|
|
|
@ -25,6 +25,8 @@
|
|||
#ifndef __FILE_DLG_WIN32_H__
|
||||
#define __FILE_DLG_WIN32_H__
|
||||
|
||||
#include "ui/file_dialog.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
|
Loading…
Reference in New Issue