Changeset 134a36022f726cd51165392d8d68b4249f425794
- Timestamp:
- 07/01/11 13:25:32 (2 years ago)
- Children:
- 6907a8e216b3303b3279c644e459eecaded0446a
- Parents:
- 372eb3dcd21ac852c68f554713d7b67588aa9f16
- git-committer:
- Matias De la Puente <mfpuente.ar@…> (07/01/11 13:25:32)
- Files:
-
- 4 edited
- 4 moved
-
.gitignore (modified) (1 diff)
-
libi4uccore/Makefile.am (modified) (2 diffs)
-
libi4uccore/commandrunner.vala (moved) (moved from libi4uccore/command.vala) (3 diffs)
-
libi4uccore/commandrunnerfactory.c (moved) (moved from libi4uccore/commandfactory.c) (2 diffs)
-
libi4uccore/posixcommandrunner.vala (moved) (moved from libi4uccore/posixcommand.vala) (2 diffs)
-
libi4uccore/profilebuilder.vala (modified) (5 diffs)
-
libi4uccore/programmerslogic.vala (modified) (5 diffs)
-
libi4uccore/wincommandrunner.vala (moved) (moved from libi4uccore/wincommand.vala) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
.gitignore
r5f73715 r134a360 38 38 po/.intltool-merge-cache 39 39 po/i4uc.pot 40 !libi4uccore/ i4uccommandfactory.c41 !libi4uccore/ i4ucserialportutilsfactory.c40 !libi4uccore/commandrunnerfactory.c 41 !libi4uccore/serialportutilsfactory.c -
libi4uccore/Makefile.am
r9fab498 r134a360 2 2 3 3 WIN_SOURCES = \ 4 wincommand .vala \4 wincommandrunner.vala \ 5 5 winserialportutils.vala \ 6 6 $(NULL) 7 7 8 8 POSIX_SOURCES = \ 9 posixcommand .vala \9 posixcommandrunner.vala \ 10 10 posixserialportutils.vala \ 11 11 $(NULL) … … 41 41 builder.vala \ 42 42 builderslist.vala \ 43 command .vala \44 command factory.c \43 commandrunner.vala \ 44 commandrunnerfactory.c \ 45 45 dialogresponse.vala \ 46 46 document.vala \ -
libi4uccore/commandrunner.vala
r840e33f r134a360 1 /* command .vala1 /* commandrunner.vala 2 2 * 3 * Copyright (C) 2009 Matias De la Puente3 * Copyright (C) 2009-2011 Matias De la Puente 4 4 * 5 5 * This program is free software: you can redistribute it and/or modify … … 20 20 */ 21 21 22 public abstract class I4uc.Core.Command : GLib.Object22 public abstract class I4uc.Core.CommandRunner : GLib.Object 23 23 { 24 24 protected Pid? _child_pid = null; … … 93 93 namespace I4uc.Core 94 94 { 95 //Defined in command factory.c96 public extern Command create_command();95 //Defined in commandrunnerfactory.c 96 public extern CommandRunner create_command_runner (); 97 97 } -
libi4uccore/commandrunnerfactory.c
rdfe49c7 r134a360 1 /* command factory.c1 /* commandrunnerfactory.c 2 2 * 3 * Copyright (C) 2010 Matias De la Puente3 * Copyright (C) 2010-2011 Matias De la Puente 4 4 * 5 5 * This program is free software: you can redistribute it and/or modify … … 21 21 #include <i4uccore.h> 22 22 23 I4ucCoreCommand * i4uc_core_create_command()23 I4ucCoreCommandRunner* i4uc_core_create_command_runner () 24 24 { 25 25 #if __gnu_linux__ 26 return (I4ucCoreCommand *)i4uc_core_posix_command_new ();26 return (I4ucCoreCommandRunner*)i4uc_core_posix_command_runner_new (); 27 27 #elif __WIN32__ 28 return (I4ucCoreCommand *)i4uc_core_win_command_new ();28 return (I4ucCoreCommandRunner*)i4uc_core_win_command_runner_new (); 29 29 #else 30 30 return NULL; -
libi4uccore/posixcommandrunner.vala
r4358b86 r134a360 1 /* posixcommand .vala1 /* posixcommandrunner.vala 2 2 * 3 * Copyright (C) 2010 Matias De la Puente3 * Copyright (C) 2010-2011 Matias De la Puente 4 4 * 5 5 * This program is free software: you can redistribute it and/or modify … … 21 21 using Posix; 22 22 23 public class I4uc.Core.PosixCommand : Command23 public class I4uc.Core.PosixCommandRunner : CommandRunner 24 24 { 25 25 private override void close_process () -
libi4uccore/profilebuilder.vala
r372eb3d r134a360 32 32 { 33 33 private App _app; 34 private Command _command = create_command();34 private CommandRunner _command_runner = create_command_runner (); 35 35 private ArrayList<CommandContext> _commands = new ArrayList<CommandContext> (); 36 36 private int _command_index = 0; … … 53 53 { 54 54 _app = app; 55 _command .finished.connect (on_command_finished);55 _command_runner.finished.connect (on_command_runner_finished); 56 56 } 57 57 … … 155 155 } 156 156 157 on_command_ finished (true);157 on_command_runner_finished (true); 158 158 } 159 159 … … 203 203 { 204 204 _commands.clear (); 205 _command .stop ();206 } 207 208 private void on_command_ finished (bool exited_ok, string standard_output="", string standard_error="")205 _command_runner.stop (); 206 } 207 208 private void on_command_runner_finished (bool exited_ok, string standard_output="", string standard_error="") 209 209 { 210 210 // When _command_index is different to 0, a command just finished … … 221 221 try 222 222 { 223 _command .run (_commands[_command_index].command, folder_file.get_path ());223 _command_runner.run (_commands[_command_index].command, folder_file.get_path ()); 224 224 this.is_building = true; 225 225 _command_index++; -
libi4uccore/programmerslogic.vala
r372eb3d r134a360 26 26 private DocumentsLogic _documents_logic; 27 27 private Programmer _current_programmer; 28 private Command _command = create_command();28 private CommandRunner _command_runner = create_command_runner (); 29 29 private SerialPortUtils _serial_port_utils = create_serial_port_utils (); 30 30 private string _read_firmware; … … 77 77 _view.read_fuses_clicked.connect (() => run_command (_current_programmer.read_fuses_command)); 78 78 _view.get_version_clicked.connect (() => run_command (_current_programmer.get_version_command)); 79 _view.stop_clicked.connect (() => _command .stop ());80 _command .finished.connect (on_command_finished);79 _view.stop_clicked.connect (() => _command_runner.stop ()); 80 _command_runner.finished.connect (on_command_finished); 81 81 } 82 82 … … 94 94 { 95 95 _view.log_page.add_message ("<b>" + _("Running:") + " </b><i>" + filtered_command + "</i>"); 96 _command .run (filtered_command);96 _command_runner.run (filtered_command); 97 97 set_parameters_sensitive (false); 98 98 disable_actions (); … … 363 363 { 364 364 _view.log_page.add_message ("<b>" + _("Running:") + " </b><i>" + filtered_command + "</i>"); 365 _command .run (filtered_command);365 _command_runner.run (filtered_command); 366 366 set_parameters_sensitive (false); 367 367 disable_actions (); … … 427 427 _view.read_fuses_sensitive = _current_programmer.can_read_fuses; 428 428 _view.get_version_sensitive = _current_programmer.can_get_version; 429 _view.stop_sensitive = _command .is_running;429 _view.stop_sensitive = _command_runner.is_running; 430 430 } 431 431 -
libi4uccore/wincommandrunner.vala
r4358b86 r134a360 1 /* wincommand .vala1 /* wincommandrunner.vala 2 2 * 3 * Copyright (C) 2010 Matias De la Puente3 * Copyright (C) 2010-2011 Matias De la Puente 4 4 * 5 5 * This program is free software: you can redistribute it and/or modify … … 21 21 using Windows; 22 22 23 public class I4uc.Core.WinCommand : Command23 public class I4uc.Core.WinCommandRunner : CommandRunner 24 24 { 25 25 private override void close_process ()
Note: See TracChangeset
for help on using the changeset viewer.

