X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cf44735628cecb0326b953c4872260f223fc8769..246037e22990a4719c672c2e2a8b62b99cc4d49c:/src/gtk/utilsgtk.cpp diff --git a/src/gtk/utilsgtk.cpp b/src/gtk/utilsgtk.cpp index ccd767f3b6..d0d75b07a9 100644 --- a/src/gtk/utilsgtk.cpp +++ b/src/gtk/utilsgtk.cpp @@ -51,6 +51,12 @@ int wxKill(long pid, int sig) return kill(pid, sig); }; +void wxDisplaySize( int *width, int *height ) +{ + if (width) *width = gdk_screen_width(); + if (height) *height = gdk_screen_height(); +} + //------------------------------------------------------------------------ // user and home routines //------------------------------------------------------------------------ @@ -364,7 +370,7 @@ static void GTK_EndProcessDetector(gpointer data, gint source, proc_data->pid = 0; }; -long wxExecute( char **argv, bool Async, wxProcess *process ) +long wxExecute( char **argv, bool sync, wxProcess *process ) { wxEndProcessData *data = new wxEndProcessData; int end_proc_detect[2]; @@ -409,7 +415,7 @@ long wxExecute( char **argv, bool Async, wxProcess *process ) data->tag = gdk_input_add(end_proc_detect[0], GDK_INPUT_READ, GTK_EndProcessDetector, (gpointer)data); data->pid = pid; - if (Async) { + if (!sync) { data->process = process; } else { data->process = NULL; @@ -424,7 +430,7 @@ long wxExecute( char **argv, bool Async, wxProcess *process ) return pid; }; -long wxExecute( const wxString& command, bool Async, wxProcess *process ) +long wxExecute( const wxString& command, bool sync, wxProcess *process ) { if (command.IsNull() || command == "") return FALSE; @@ -438,6 +444,7 @@ long wxExecute( const wxString& command, bool Async, wxProcess *process ) argv[argc++] = strtok (tmp, IFS); while ((argv[argc++] = strtok(NULL, IFS)) != NULL) /* loop */ ; - return wxExecute(argv, Async, process); + return wxExecute(argv, sync, process); }; +