|
@ -8,7 +8,7 @@ import wx |
|
|
import sys |
|
|
import sys |
|
|
import subprocess |
|
|
import subprocess |
|
|
|
|
|
|
|
|
from wx.lib.pubsub import pub |
|
|
|
|
|
|
|
|
from gooey.gui.pubsub import pub |
|
|
|
|
|
|
|
|
from multiprocessing.dummy import Pool |
|
|
from multiprocessing.dummy import Pool |
|
|
from gooey.gui import events |
|
|
from gooey.gui import events |
|
@ -43,7 +43,7 @@ class Controller(object): |
|
|
pub.subscribe(self.on_edit, events.WINDOW_EDIT) |
|
|
pub.subscribe(self.on_edit, events.WINDOW_EDIT) |
|
|
|
|
|
|
|
|
def on_edit(self): |
|
|
def on_edit(self): |
|
|
pub.sendMessage(events.WINDOW_CHANGE, view_name=views.CONFIG_SCREEN) |
|
|
|
|
|
|
|
|
pub.send_message(events.WINDOW_CHANGE, view_name=views.CONFIG_SCREEN) |
|
|
|
|
|
|
|
|
def on_close(self): |
|
|
def on_close(self): |
|
|
self.core_gui.Destroy() |
|
|
self.core_gui.Destroy() |
|
@ -71,7 +71,7 @@ class Controller(object): |
|
|
|
|
|
|
|
|
cmd_line_args = self.core_gui.GetOptions() |
|
|
cmd_line_args = self.core_gui.GetOptions() |
|
|
command = '{0} {1}'.format(self.build_spec['target'], cmd_line_args) |
|
|
command = '{0} {1}'.format(self.build_spec['target'], cmd_line_args) |
|
|
pub.sendMessage(events.WINDOW_CHANGE, view_name=views.RUNNING_SCREEN) |
|
|
|
|
|
|
|
|
pub.send_message(events.WINDOW_CHANGE, view_name=views.RUNNING_SCREEN) |
|
|
self.run_client_code(command) |
|
|
self.run_client_code(command) |
|
|
|
|
|
|
|
|
def run_client_code(self, command): |
|
|
def run_client_code(self, command): |
|
@ -90,10 +90,10 @@ class Controller(object): |
|
|
def process_result(self, process): |
|
|
def process_result(self, process): |
|
|
_stdout, _stderr = process.communicate() |
|
|
_stdout, _stderr = process.communicate() |
|
|
if process.returncode == 0: |
|
|
if process.returncode == 0: |
|
|
pub.sendMessage(events.WINDOW_CHANGE, view_name=views.SUCCESS_SCREEN) |
|
|
|
|
|
|
|
|
pub.send_message(events.WINDOW_CHANGE, view_name=views.SUCCESS_SCREEN) |
|
|
self.success_dialog() |
|
|
self.success_dialog() |
|
|
else: |
|
|
else: |
|
|
pub.sendMessage(events.WINDOW_CHANGE, view_name=views.ERROR_SCREEN) |
|
|
|
|
|
|
|
|
pub.send_message(events.WINDOW_CHANGE, view_name=views.ERROR_SCREEN) |
|
|
self.error_dialog(_stderr) |
|
|
self.error_dialog(_stderr) |
|
|
|
|
|
|
|
|
def skipping_config(self): |
|
|
def skipping_config(self): |
|
|