mirror of
https://github.com/TTimo/GtkRadiant.git
synced 2024-11-10 07:11:54 +00:00
saving out some old win32 portability work
git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/branches/timo-win32@306 8a3a26a2-13c4-0310-b231-cf6edde360e5
This commit is contained in:
parent
3436c03f4a
commit
082d0ab8d6
4 changed files with 16 additions and 10 deletions
|
@ -9,6 +9,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "radiant", "radiant\radiant.
|
|||
{DC2F2B6B-2596-4B90-88CE-2FDE4C2FFB01} = {DC2F2B6B-2596-4B90-88CE-2FDE4C2FFB01}
|
||||
{0B522841-BDCC-493A-BA5C-604AE2CD5756} = {0B522841-BDCC-493A-BA5C-604AE2CD5756}
|
||||
{3886C418-A41E-4AFF-BBD1-8E1E508920C9} = {3886C418-A41E-4AFF-BBD1-8E1E508920C9}
|
||||
{444E6FDA-83BD-49F1-89A4-7CF716F742A8} = {444E6FDA-83BD-49F1-89A4-7CF716F742A8}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "synapse", "libs\synapse\synapse.vcproj", "{E13CCFB0-A366-4EF3-A66F-C374B563E4DF}"
|
||||
|
@ -72,6 +73,7 @@ EndProject
|
|||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "q3map2", "tools\quake3\q3map2\q3map2.vcproj", "{F5D0509C-80E0-49B7-B033-885D8253063A}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{DC2F2B6B-2596-4B90-88CE-2FDE4C2FFB01} = {DC2F2B6B-2596-4B90-88CE-2FDE4C2FFB01}
|
||||
{444E6FDA-83BD-49F1-89A4-7CF716F742A8} = {444E6FDA-83BD-49F1-89A4-7CF716F742A8}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
|
|
|
@ -1474,8 +1474,9 @@ char* WINAPI dir_dialog (void *parent, const char* title, const char* path)
|
|||
GTK_SIGNAL_FUNC (dialog_delete_callback), NULL);
|
||||
gtk_file_selection_hide_fileop_buttons (GTK_FILE_SELECTION (file_sel));
|
||||
|
||||
if (parent != NULL)
|
||||
gtk_window_set_transient_for (GTK_WINDOW (file_sel), GTK_WINDOW (parent));
|
||||
if ( parent != NULL ) {
|
||||
gtk_window_set_transient_for( GTK_WINDOW( file_sel ), GTK_WINDOW( parent ) );
|
||||
}
|
||||
|
||||
gtk_widget_hide (GTK_FILE_SELECTION (file_sel)->file_list->parent);
|
||||
|
||||
|
@ -1491,10 +1492,10 @@ char* WINAPI dir_dialog (void *parent, const char* title, const char* path)
|
|||
while (loop)
|
||||
gtk_main_iteration ();
|
||||
|
||||
filename = g_strdup(gtk_file_selection_get_filename (GTK_FILE_SELECTION (file_sel)));
|
||||
filename = g_strdup( gtk_file_selection_get_filename( GTK_FILE_SELECTION( file_sel ) ) );
|
||||
|
||||
gtk_grab_remove (file_sel);
|
||||
gtk_widget_destroy (file_sel);
|
||||
gtk_grab_remove( file_sel );
|
||||
gtk_widget_destroy( file_sel );
|
||||
|
||||
return filename;
|
||||
}
|
||||
|
|
|
@ -205,11 +205,11 @@ EPathCheck CheckFile( const char *path ) {
|
|||
}
|
||||
|
||||
bool radCreateDirectory( const char *directory ) {
|
||||
return CreateDirectory( directory, NULL );
|
||||
return ( CreateDirectory( directory, NULL ) != 0 );
|
||||
}
|
||||
|
||||
bool radCopyFile( const char *lpExistingFileName, const char *lpNewFileName ) {
|
||||
return CopyFile( lpExistingFileName, lpNewFileName, FALSE );
|
||||
return ( CopyFile( lpExistingFileName, lpNewFileName, FALSE ) != 0 );
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -236,7 +236,10 @@ bool CopyTree( const char *source, const char *dest ) {
|
|||
switch ( CheckFile( srcEntry.GetBuffer() ) ) {
|
||||
case PATH_DIRECTORY: {
|
||||
if ( CheckFile( dstEntry.GetBuffer() ) == PATH_FAIL ) {
|
||||
radCreateDirectory( dstEntry.GetBuffer() );
|
||||
if ( !radCreateDirectory( dstEntry.GetBuffer() ) ) {
|
||||
Sys_Printf( "create directory %s failed\n", dstEntry.GetBuffer() );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
bool ret;
|
||||
ret = CopyTree( srcEntry.GetBuffer(), dstEntry.GetBuffer() );
|
||||
|
|
|
@ -3171,14 +3171,14 @@ void CGameInstall::OnBtnBrowseEngine( GtkWidget *widget, gpointer data ) {
|
|||
Sys_Printf( "OnBtnBrowseEngine\n" );
|
||||
|
||||
CGameInstall* i = static_cast<CGameInstall*>( data );
|
||||
char *dir = dir_dialog( widget, "Select game directory", NULL );
|
||||
char *dir = dir_dialog( i->m_pWidget, "Select game directory", NULL );
|
||||
|
||||
i->UpdateData( TRUE );
|
||||
|
||||
if ( dir != NULL ) {
|
||||
i->m_strEngine = dir;
|
||||
i->UpdateData( FALSE );
|
||||
free( dir );
|
||||
g_free( dir );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue