#include <gtk/gtkcellrenderertext.h>
#include <gtk/gtktreeselection.h>
#include <gtk/gtkliststore.h>
+#include <uilib/uilib.h>
#include "os/path.h"
#include "math/aabb.h"
GtkEntry* fsgame_entry;
};
-gboolean OnSelchangeComboWhatgame( GtkWidget *widget, GameCombo* combo ){
+gboolean OnSelchangeComboWhatgame( ui::Widget widget, GameCombo* combo ){
const char *gamename;
{
GtkTreeIter iter;
GtkComboBox* gamemode_combo;
};
-GtkWindow* ProjectSettingsDialog_construct( ProjectSettingsDialog& dialog, ModalDialog& modal ){
- GtkWindow* window = create_dialog_window( MainFrame_getWindow(), "Project Settings", G_CALLBACK( dialog_delete_callback ), &modal );
+ui::Window ProjectSettingsDialog_construct( ProjectSettingsDialog& dialog, ModalDialog& modal ){
+ ui::Window window = MainFrame_getWindow().create_dialog_window("Project Settings", G_CALLBACK(dialog_delete_callback ), &modal );
{
GtkTable* table1 = create_dialog_table( 1, 2, 4, 4, 4 );
gtk_container_add( GTK_CONTAINER( frame ), GTK_WIDGET( table2 ) );
{
- GtkLabel* label = GTK_LABEL( gtk_label_new( "Select mod" ) );
+ GtkLabel* label = GTK_LABEL( ui::Label( "Select mod" ) );
gtk_widget_show( GTK_WIDGET( label ) );
gtk_table_attach( table2, GTK_WIDGET( label ), 0, 1, 0, 1,
(GtkAttachOptions) ( GTK_FILL ),
gtk_misc_set_alignment( GTK_MISC( label ), 1, 0.5 );
}
{
- dialog.game_combo.game_select = GTK_COMBO_BOX( gtk_combo_box_new_text() );
+ dialog.game_combo.game_select = ui::ComboBoxText();
gtk_combo_box_append_text( dialog.game_combo.game_select, globalGameComboConfiguration().basegame );
if ( globalGameComboConfiguration().known[0] != '\0' ) {
}
{
- GtkLabel* label = GTK_LABEL( gtk_label_new( "fs_game" ) );
+ GtkLabel* label = GTK_LABEL( ui::Label( "fs_game" ) );
gtk_widget_show( GTK_WIDGET( label ) );
gtk_table_attach( table2, GTK_WIDGET( label ), 0, 1, 1, 2,
(GtkAttachOptions) ( GTK_FILL ),
gtk_misc_set_alignment( GTK_MISC( label ), 1, 0.5 );
}
{
- GtkEntry* entry = GTK_ENTRY( gtk_entry_new() );
+ GtkEntry* entry = ui::Entry();
gtk_widget_show( GTK_WIDGET( entry ) );
gtk_table_attach( table2, GTK_WIDGET( entry ), 1, 2, 1, 2,
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
}
if ( globalMappingMode().do_mapping_mode ) {
- GtkLabel* label = GTK_LABEL( gtk_label_new( "Mapping mode" ) );
+ GtkLabel* label = GTK_LABEL( ui::Label( "Mapping mode" ) );
gtk_widget_show( GTK_WIDGET( label ) );
gtk_table_attach( table2, GTK_WIDGET( label ), 0, 1, 3, 4,
(GtkAttachOptions) ( GTK_FILL ),
(GtkAttachOptions) ( 0 ), 0, 0 );
gtk_misc_set_alignment( GTK_MISC( label ), 1, 0.5 );
- GtkComboBox* combo = GTK_COMBO_BOX( gtk_combo_box_new_text() );
+ GtkComboBox* combo = ui::ComboBoxText();
gtk_combo_box_append_text( combo, globalMappingMode().sp_mapping_mode );
gtk_combo_box_append_text( combo, globalMappingMode().mp_mapping_mode );
ModalDialog modal;
ProjectSettingsDialog dialog;
- GtkWindow* window = ProjectSettingsDialog_construct( dialog, modal );
+ ui::Window window = ProjectSettingsDialog_construct( dialog, modal );
if ( modal_dialog_show( window, modal ) == eIDOK ) {
ProjectSettingsDialog_ok( dialog );
ModalDialog dialog;
GtkEntry* sides_entry;
- GtkWindow* window = create_dialog_window( MainFrame_getWindow(), "Arbitrary sides", G_CALLBACK( dialog_delete_callback ), &dialog );
+ ui::Window window = MainFrame_getWindow().create_dialog_window("Arbitrary sides", G_CALLBACK(dialog_delete_callback ), &dialog );
- GtkAccelGroup* accel = gtk_accel_group_new();
+ GtkAccelGroup* accel = ui::AccelGroup();
gtk_window_add_accel_group( window, accel );
{
GtkHBox* hbox = create_dialog_hbox( 4, 4 );
gtk_container_add( GTK_CONTAINER( window ), GTK_WIDGET( hbox ) );
{
- GtkLabel* label = GTK_LABEL( gtk_label_new( "Sides:" ) );
+ GtkLabel* label = GTK_LABEL( ui::Label( "Sides:" ) );
gtk_widget_show( GTK_WIDGET( label ) );
gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( label ), FALSE, FALSE, 0 );
}
{
- GtkEntry* entry = GTK_ENTRY( gtk_entry_new() );
+ GtkEntry* entry = ui::Entry();
gtk_widget_show( GTK_WIDGET( entry ) );
gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( entry ), FALSE, FALSE, 0 );
sides_entry = entry;
// =============================================================================
// About dialog (no program is complete without one)
-void about_button_changelog( GtkWidget *widget, gpointer data ){
+void about_button_changelog( ui::Widget widget, gpointer data ){
StringOutputStream log( 256 );
log << AppPath_get() << "changelog.txt";
OpenURL( log.c_str() );
}
-void about_button_credits( GtkWidget *widget, gpointer data ){
+void about_button_credits( ui::Widget widget, gpointer data ){
StringOutputStream cred( 256 );
cred << AppPath_get() << "credits.html";
OpenURL( cred.c_str() );
ModalDialog dialog;
ModalDialogButton ok_button( dialog, eIDOK );
- GtkWindow* window = create_modal_dialog_window( MainFrame_getWindow(), "About NetRadiant", dialog );
+ ui::Window window = MainFrame_getWindow().create_modal_dialog_window("About NetRadiant", dialog );
{
GtkVBox* vbox = create_dialog_vbox( 4, 4 );
}
{
- GtkLabel* label = GTK_LABEL( gtk_label_new( "NetRadiant " RADIANT_VERSION "\n"
- __DATE__ "\n\n"
- RADIANT_ABOUTMSG "\n\n"
- "By alientrap.org\n\n"
- "This program is free software\n"
- "licensed under the GNU GPL.\n\n"
- "NetRadiant is unsupported, however\n"
- "you may report your problems at\n"
- "http://www.icculus.org/netradiant/"
- ) );
+ std::string label_text = "NetRadiant " + radiant::version() + "\n"
+ __DATE__ "\n\n"
+ + radiant::about_msg() + "\n\n"
+ "This program is free software\n"
+ "licensed under the GNU GPL.\n\n"
+ "NetRadiant is unsupported, however\n"
+ "you may report your problems at\n"
+ "https://gitlab.com/xonotic/netradiant/issues";
+
+ GtkLabel* label = GTK_LABEL( ui::Label( label_text.c_str() ) );
gtk_widget_show( GTK_WIDGET( label ) );
gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( label ), FALSE, FALSE, 0 );
GtkTable* table = create_dialog_table( 3, 2, 4, 4, 4 );
gtk_container_add( GTK_CONTAINER( frame ), GTK_WIDGET( table ) );
{
- GtkLabel* label = GTK_LABEL( gtk_label_new( "Vendor:" ) );
+ GtkLabel* label = GTK_LABEL( ui::Label( "Vendor:" ) );
gtk_widget_show( GTK_WIDGET( label ) );
gtk_table_attach( table, GTK_WIDGET( label ), 0, 1, 0, 1,
(GtkAttachOptions) ( GTK_FILL ),
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
}
{
- GtkLabel* label = GTK_LABEL( gtk_label_new( "Version:" ) );
+ GtkLabel* label = GTK_LABEL( ui::Label( "Version:" ) );
gtk_widget_show( GTK_WIDGET( label ) );
gtk_table_attach( table, GTK_WIDGET( label ), 0, 1, 1, 2,
(GtkAttachOptions) ( GTK_FILL ),
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
}
{
- GtkLabel* label = GTK_LABEL( gtk_label_new( "Renderer:" ) );
+ GtkLabel* label = GTK_LABEL( ui::Label( "Renderer:" ) );
gtk_widget_show( GTK_WIDGET( label ) );
gtk_table_attach( table, GTK_WIDGET( label ), 0, 1, 2, 3,
(GtkAttachOptions) ( GTK_FILL ),
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
}
{
- GtkLabel* label = GTK_LABEL( gtk_label_new( reinterpret_cast<const char*>( glGetString( GL_VENDOR ) ) ) );
+ GtkLabel* label = GTK_LABEL( ui::Label( reinterpret_cast<const char*>( glGetString( GL_VENDOR ) ) ) );
gtk_widget_show( GTK_WIDGET( label ) );
gtk_table_attach( table, GTK_WIDGET( label ), 1, 2, 0, 1,
(GtkAttachOptions) ( GTK_FILL ),
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
}
{
- GtkLabel* label = GTK_LABEL( gtk_label_new( reinterpret_cast<const char*>( glGetString( GL_VERSION ) ) ) );
+ GtkLabel* label = GTK_LABEL( ui::Label( reinterpret_cast<const char*>( glGetString( GL_VERSION ) ) ) );
gtk_widget_show( GTK_WIDGET( label ) );
gtk_table_attach( table, GTK_WIDGET( label ), 1, 2, 1, 2,
(GtkAttachOptions) ( GTK_FILL ),
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
}
{
- GtkLabel* label = GTK_LABEL( gtk_label_new( reinterpret_cast<const char*>( glGetString( GL_RENDERER ) ) ) );
+ GtkLabel* label = GTK_LABEL( ui::Label( reinterpret_cast<const char*>( glGetString( GL_RENDERER ) ) ) );
gtk_widget_show( GTK_WIDGET( label ) );
gtk_table_attach( table, GTK_WIDGET( label ), 1, 2, 2, 3,
(GtkAttachOptions) ( GTK_FILL ),
GtkScrolledWindow* sc_extensions = create_scrolled_window( GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS, 4 );
gtk_container_add( GTK_CONTAINER( frame ), GTK_WIDGET( sc_extensions ) );
{
- GtkWidget* text_extensions = gtk_text_view_new();
+ ui::Widget text_extensions = ui::TextView();
gtk_text_view_set_editable( GTK_TEXT_VIEW( text_extensions ), FALSE );
gtk_container_add( GTK_CONTAINER( sc_extensions ), text_extensions );
GtkTextBuffer* buffer = gtk_text_view_get_buffer( GTK_TEXT_VIEW( text_extensions ) );
GtkEntry* x;
GtkEntry* y;
- GtkWindow* window = create_modal_dialog_window( MainFrame_getWindow(), "Patch texture layout", dialog );
+ ui::Window window = MainFrame_getWindow().create_modal_dialog_window("Patch texture layout", dialog );
- GtkAccelGroup* accel = gtk_accel_group_new();
+ GtkAccelGroup* accel = ui::AccelGroup();
gtk_window_add_accel_group( window, accel );
{
GtkVBox* vbox = create_dialog_vbox( 4 );
gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( vbox ), TRUE, TRUE, 0 );
{
- GtkLabel* label = GTK_LABEL( gtk_label_new( "Texture will be fit across the patch based\n"
+ GtkLabel* label = GTK_LABEL( ui::Label( "Texture will be fit across the patch based\n"
"on the x and y values given. Values of 1x1\n"
"will \"fit\" the texture. 2x2 will repeat\n"
"it twice, etc." ) );
gtk_widget_show( GTK_WIDGET( table ) );
gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( table ), TRUE, TRUE, 0 );
{
- GtkLabel* label = GTK_LABEL( gtk_label_new( "Texture x:" ) );
+ GtkLabel* label = GTK_LABEL( ui::Label( "Texture x:" ) );
gtk_widget_show( GTK_WIDGET( label ) );
gtk_table_attach( table, GTK_WIDGET( label ), 0, 1, 0, 1,
(GtkAttachOptions) ( GTK_FILL ),
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
}
{
- GtkLabel* label = GTK_LABEL( gtk_label_new( "Texture y:" ) );
+ GtkLabel* label = GTK_LABEL( ui::Label( "Texture y:" ) );
gtk_widget_show( GTK_WIDGET( label ) );
gtk_table_attach( table, GTK_WIDGET( label ), 0, 1, 1, 2,
(GtkAttachOptions) ( GTK_FILL ),
gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
}
{
- GtkEntry* entry = GTK_ENTRY( gtk_entry_new() );
+ GtkEntry* entry = ui::Entry();
gtk_widget_show( GTK_WIDGET( entry ) );
gtk_table_attach( table, GTK_WIDGET( entry ), 1, 2, 0, 1,
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
x = entry;
}
{
- GtkEntry* entry = GTK_ENTRY( gtk_entry_new() );
+ GtkEntry* entry = ui::Entry();
gtk_widget_show( GTK_WIDGET( entry ) );
gtk_table_attach( table, GTK_WIDGET( entry ), 1, 2, 1, 2,
(GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
// Text Editor dialog
// master window widget
-static GtkWidget *text_editor = 0;
-static GtkWidget *text_widget; // slave, text widget from the gtk editor
+static ui::Widget text_editor;
+static ui::Widget text_widget; // slave, text widget from the gtk editor
-static gint editor_delete( GtkWidget *widget, gpointer data ){
- if ( gtk_MessageBox( widget, "Close the shader editor ?", "Radiant", eMB_YESNO, eMB_ICONQUESTION ) == eIDNO ) {
+static gint editor_delete( ui::Widget widget, gpointer data ){
+ if ( widget.alert( "Close the shader editor ?", "Radiant", ui::alert_type::YESNO, ui::alert_icon::QUESTION ) == ui::alert_response::NO ) {
return TRUE;
}
return TRUE;
}
-static void editor_save( GtkWidget *widget, gpointer data ){
+static void editor_save( ui::Widget widget, gpointer data ){
FILE *f = fopen( (char*)g_object_get_data( G_OBJECT( data ), "filename" ), "w" );
gpointer text = g_object_get_data( G_OBJECT( data ), "text" );
if ( f == 0 ) {
- gtk_MessageBox( GTK_WIDGET( data ), "Error saving file !" );
+ ui::Widget(GTK_WIDGET( data )).alert( "Error saving file !" );
return;
}
fclose( f );
}
-static void editor_close( GtkWidget *widget, gpointer data ){
- if ( gtk_MessageBox( text_editor, "Close the shader editor ?", "Radiant", eMB_YESNO, eMB_ICONQUESTION ) == eIDNO ) {
+static void editor_close( ui::Widget widget, gpointer data ){
+ if ( text_editor.alert( "Close the shader editor ?", "Radiant", ui::alert_type::YESNO, ui::alert_icon::QUESTION ) == ui::alert_response::NO ) {
return;
}
}
static void CreateGtkTextEditor(){
- GtkWidget *dlg;
- GtkWidget *vbox, *hbox, *button, *scr, *text;
+ ui::Widget dlg;
+ ui::Widget vbox, hbox, button, scr, text;
- dlg = gtk_window_new( GTK_WINDOW_TOPLEVEL );
+ dlg = ui::Window( ui::window_type::TOP );
g_signal_connect( G_OBJECT( dlg ), "delete_event",
G_CALLBACK( editor_delete ), 0 );
gtk_window_set_default_size( GTK_WINDOW( dlg ), 600, 300 );
- vbox = gtk_vbox_new( FALSE, 5 );
+ vbox = ui::VBox( FALSE, 5 );
gtk_widget_show( vbox );
gtk_container_add( GTK_CONTAINER( dlg ), GTK_WIDGET( vbox ) );
gtk_container_set_border_width( GTK_CONTAINER( vbox ), 5 );
- scr = gtk_scrolled_window_new( 0, 0 );
+ scr = ui::ScrolledWindow();
gtk_widget_show( scr );
gtk_box_pack_start( GTK_BOX( vbox ), scr, TRUE, TRUE, 0 );
gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( scr ), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC );
gtk_scrolled_window_set_shadow_type( GTK_SCROLLED_WINDOW( scr ), GTK_SHADOW_IN );
- text = gtk_text_view_new();
+ text = ui::TextView();
gtk_container_add( GTK_CONTAINER( scr ), text );
gtk_widget_show( text );
- g_object_set_data( G_OBJECT( dlg ), "text", text );
+ g_object_set_data( G_OBJECT( dlg ), "text", (gpointer) text );
gtk_text_view_set_editable( GTK_TEXT_VIEW( text ), TRUE );
- hbox = gtk_hbox_new( FALSE, 5 );
+ hbox = ui::HBox( FALSE, 5 );
gtk_widget_show( hbox );
gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( hbox ), FALSE, TRUE, 0 );
- button = gtk_button_new_with_label( "Close" );
+ button = ui::Button( "Close" );
gtk_widget_show( button );
gtk_box_pack_end( GTK_BOX( hbox ), button, FALSE, FALSE, 0 );
g_signal_connect( G_OBJECT( button ), "clicked",
G_CALLBACK( editor_close ), dlg );
gtk_widget_set_usize( button, 60, -2 );
- button = gtk_button_new_with_label( "Save" );
+ button = ui::Button( "Save" );
gtk_widget_show( button );
gtk_box_pack_end( GTK_BOX( hbox ), button, FALSE, FALSE, 0 );
g_signal_connect( G_OBJECT( button ), "clicked",
ModalDialogButton ok_button( dialog, eIDOK );
ModalDialogButton cancel_button( dialog, eIDCANCEL );
- GtkWindow* window = create_modal_dialog_window( MainFrame_getWindow(), "Light intensity", dialog, -1, -1 );
+ ui::Window window = MainFrame_getWindow().create_modal_dialog_window("Light intensity", dialog, -1, -1 );
- GtkAccelGroup *accel_group = gtk_accel_group_new();
+ GtkAccelGroup *accel_group = ui::AccelGroup();
gtk_window_add_accel_group( window, accel_group );
{
GtkVBox* vbox = create_dialog_vbox( 4 );
gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( vbox ), TRUE, TRUE, 0 );
{
- GtkLabel* label = GTK_LABEL( gtk_label_new( "ESC for default, ENTER to validate" ) );
+ GtkLabel* label = GTK_LABEL( ui::Label( "ESC for default, ENTER to validate" ) );
gtk_widget_show( GTK_WIDGET( label ) );
gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( label ), FALSE, FALSE, 0 );
}
{
- GtkEntry* entry = GTK_ENTRY( gtk_entry_new() );
+ GtkEntry* entry = ui::Entry();
gtk_widget_show( GTK_WIDGET( entry ) );
gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( entry ), TRUE, TRUE, 0 );
// =============================================================================
// Add new shader tag dialog
-EMessageBoxReturn DoShaderTagDlg( CopiedString* tag, char* title ){
+EMessageBoxReturn DoShaderTagDlg( std::string* tag, const char* title ){
ModalDialog dialog;
GtkEntry* textentry;
ModalDialogButton ok_button( dialog, eIDOK );
ModalDialogButton cancel_button( dialog, eIDCANCEL );
- GtkWindow* window = create_modal_dialog_window( MainFrame_getWindow(), title, dialog, -1, -1 );
+ ui::Window window = MainFrame_getWindow().create_modal_dialog_window(title, dialog, -1, -1 );
- GtkAccelGroup *accel_group = gtk_accel_group_new();
+ GtkAccelGroup *accel_group = ui::AccelGroup();
gtk_window_add_accel_group( window, accel_group );
{
gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( vbox ), TRUE, TRUE, 0 );
{
//GtkLabel* label = GTK_LABEL(gtk_label_new("Enter one ore more tags separated by spaces"));
- GtkLabel* label = GTK_LABEL( gtk_label_new( "ESC to cancel, ENTER to validate" ) );
+ GtkLabel* label = GTK_LABEL( ui::Label( "ESC to cancel, ENTER to validate" ) );
gtk_widget_show( GTK_WIDGET( label ) );
gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( label ), FALSE, FALSE, 0 );
}
{
- GtkEntry* entry = GTK_ENTRY( gtk_entry_new() );
+ GtkEntry* entry = ui::Entry();
gtk_widget_show( GTK_WIDGET( entry ) );
gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( entry ), TRUE, TRUE, 0 );
return ret;
}
-EMessageBoxReturn DoShaderInfoDlg( const char* name, const char* filename, char* title ){
+EMessageBoxReturn DoShaderInfoDlg( const char* name, const char* filename, const char* title ){
ModalDialog dialog;
ModalDialogButton ok_button( dialog, eIDOK );
- GtkWindow* window = create_modal_dialog_window( MainFrame_getWindow(), title, dialog, -1, -1 );
+ ui::Window window = MainFrame_getWindow().create_modal_dialog_window(title, dialog, -1, -1 );
- GtkAccelGroup *accel_group = gtk_accel_group_new();
+ GtkAccelGroup *accel_group = ui::AccelGroup();
gtk_window_add_accel_group( window, accel_group );
{
GtkVBox* vbox = create_dialog_vbox( 4 );
gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( vbox ), FALSE, FALSE, 0 );
{
- GtkLabel* label = GTK_LABEL( gtk_label_new( "The selected shader" ) );
+ GtkLabel* label = GTK_LABEL( ui::Label( "The selected shader" ) );
gtk_widget_show( GTK_WIDGET( label ) );
gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( label ), FALSE, FALSE, 0 );
}
{
- GtkLabel* label = GTK_LABEL( gtk_label_new( name ) );
+ GtkLabel* label = GTK_LABEL( ui::Label( name ) );
gtk_widget_show( GTK_WIDGET( label ) );
gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( label ), FALSE, FALSE, 0 );
}
{
- GtkLabel* label = GTK_LABEL( gtk_label_new( "is located in file" ) );
+ GtkLabel* label = GTK_LABEL( ui::Label( "is located in file" ) );
gtk_widget_show( GTK_WIDGET( label ) );
gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( label ), FALSE, FALSE, 0 );
}
{
- GtkLabel* label = GTK_LABEL( gtk_label_new( filename ) );
+ GtkLabel* label = GTK_LABEL( ui::Label( filename ) );
gtk_widget_show( GTK_WIDGET( label ) );
gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( label ), FALSE, FALSE, 0 );
}
#else
// custom shader editor
bool g_TextEditor_useCustomEditor = false;
-CopiedString g_TextEditor_editorCommand( "" );
+std::string g_TextEditor_editorCommand( "" );
#endif
void DoTextEditor( const char* filename, int cursorpos ){