]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - contrib/prtview/LoadPortalFileDialog.cpp
This is a major change that updates the 3rd party libs on Windows builds.
[xonotic/netradiant.git] / contrib / prtview / LoadPortalFileDialog.cpp
index 4444c3fbb634317e198554fd0eafdd9a512777d6..8d6b5318a9671ed353d91cea98c48215c534e308 100644 (file)
@@ -20,16 +20,13 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 // 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)
 {
@@ -166,16 +163,16 @@ int DoLoadPortalFileDialog ()
                      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);