// LoadPortalFileDialog.cpp : implementation file
//
-#include "LoadPortalFileDialog.h"
+#include "stdafx.h"
-#include <gtk/gtk.h>
-#include "stream/stringstream.h"
-#include "convert.h"
-
-#include "qerplugin.h"
-
-#include "PrtView.h"
-#include "Portals.h"
+#ifdef _DEBUG
+#define new DEBUG_NEW
+#undef THIS_FILE
+//static char THIS_FILE[] = __FILE__;
+#endif
static void dialog_button_callback (GtkWidget *widget, gpointer data)
{
GTK_SIGNAL_FUNC (dialog_button_callback), GINT_TO_POINTER (IDOK));
gtk_widget_set_usize (button, 60, -2);
- strcpy (portals.fn, GlobalRadiant().getMapName());
- char* fn = strrchr (portals.fn, '.');
+ char *fn = g_FuncTable.m_pfnGetMapName();
+ strcpy (portals.fn, fn);
+ fn = strrchr (portals.fn, '.');
if (fn != NULL)
{
- strcpy(fn, ".prt");
+ *fn = '\0';
+ strcat (portals.fn, ".prt");
}
- StringOutputStream value(256);
- value << ConvertLocaleToUTF8(portals.fn);
- gtk_entry_set_text (GTK_ENTRY (entry), value.c_str());
+ gtk_entry_set_text (GTK_ENTRY (entry), portals.fn);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check2d), portals.show_2d);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check3d), portals.show_3d);