[latexila] Rename PartitionState -> BuildState
- From: SÃbastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [latexila] Rename PartitionState -> BuildState
- Date: Tue, 10 Jul 2012 06:20:31 +0000 (UTC)
commit ce34b32a9d66ccc11afdbdc617dde7d7da50afe0
Author: SÃbastien Wilmet <swilmet src gnome org>
Date: Tue Jul 10 08:20:30 2012 +0200
Rename PartitionState -> BuildState
src/build_tool_runner.vala | 22 +++++++++++-----------
src/build_view.vala | 20 ++++++++++----------
2 files changed, 21 insertions(+), 21 deletions(-)
---
diff --git a/src/build_tool_runner.vala b/src/build_tool_runner.vala
index 3c767b6..c2bcd9d 100644
--- a/src/build_tool_runner.vala
+++ b/src/build_tool_runner.vala
@@ -67,7 +67,7 @@ public class BuildToolRunner : GLib.Object
jobs = tool.jobs;
this.view = view;
view.clear ();
- root_partition = view.set_title (tool.label, PartitionState.RUNNING);
+ root_partition = view.set_title (tool.label, BuildState.RUNNING);
if (! add_job_titles ())
return;
@@ -92,7 +92,7 @@ public class BuildToolRunner : GLib.Object
catch (ShellError e)
{
TreeIter job_partition =
- view.add_job_title (job.command, PartitionState.FAILED);
+ view.add_job_title (job.command, BuildState.FAILED);
BuildMsg message = BuildMsg ();
message.text = "Failed to parse command line:";
@@ -108,7 +108,7 @@ public class BuildToolRunner : GLib.Object
}
string job_title = string.joinv (" ", command);
- job_partitions += view.add_job_title (job_title, PartitionState.RUNNING);
+ job_partitions += view.add_job_title (job_title, BuildState.RUNNING);
job_num++;
}
@@ -124,9 +124,9 @@ public class BuildToolRunner : GLib.Object
_command_runner.abort ();
action_stop_exec.set_sensitive (false);
- view.set_partition_state (root_partition, PartitionState.ABORTED);
+ view.set_partition_state (root_partition, BuildState.ABORTED);
for (int i = job_num ; i < job_partitions.length ; i++)
- view.set_partition_state (job_partitions[i], PartitionState.ABORTED);
+ view.set_partition_state (job_partitions[i], BuildState.ABORTED);
}
private void on_command_finished (int exit_status)
@@ -165,13 +165,13 @@ public class BuildToolRunner : GLib.Object
if (post_processor.successful)
{
- view.set_partition_state (job_partitions[job_num], PartitionState.SUCCEEDED);
+ view.set_partition_state (job_partitions[job_num], BuildState.SUCCEEDED);
job_num++;
proceed ();
}
else
{
- view.set_partition_state (job_partitions[job_num], PartitionState.FAILED);
+ view.set_partition_state (job_partitions[job_num], BuildState.FAILED);
failed ();
}
}
@@ -181,7 +181,7 @@ public class BuildToolRunner : GLib.Object
// all jobs executed, finished
if (job_num >= jobs.size)
{
- view.set_partition_state (root_partition, PartitionState.SUCCEEDED);
+ view.set_partition_state (root_partition, BuildState.SUCCEEDED);
action_stop_exec.set_sensitive (false);
finished ();
return;
@@ -227,7 +227,7 @@ public class BuildToolRunner : GLib.Object
}
catch (Error e)
{
- view.set_partition_state (job_partitions[job_num], PartitionState.FAILED);
+ view.set_partition_state (job_partitions[job_num], BuildState.FAILED);
BuildMsg error_msg = BuildMsg ();
error_msg.text = e.message;
@@ -303,9 +303,9 @@ public class BuildToolRunner : GLib.Object
private void failed ()
{
- view.set_partition_state (root_partition, PartitionState.FAILED);
+ view.set_partition_state (root_partition, BuildState.FAILED);
for (int i = job_num + 1 ; i < job_partitions.length ; i++)
- view.set_partition_state (job_partitions[i], PartitionState.ABORTED);
+ view.set_partition_state (job_partitions[i], BuildState.ABORTED);
action_stop_exec.set_sensitive (false);
}
diff --git a/src/build_view.vala b/src/build_view.vala
index e766a6c..6a4158f 100644
--- a/src/build_view.vala
+++ b/src/build_view.vala
@@ -21,7 +21,7 @@
using Gtk;
-public enum PartitionState
+public enum BuildState
{
RUNNING,
SUCCEEDED,
@@ -242,17 +242,17 @@ public class BuildView : TreeView
this.columns_autosize ();
}
- public TreeIter set_title (string title, PartitionState state)
+ public TreeIter set_title (string title, BuildState state)
{
return add_partition (title, state, BuildMsgType.TITLE);
}
- public TreeIter add_job_title (string job_title, PartitionState state)
+ public TreeIter add_job_title (string job_title, BuildState state)
{
return add_partition (job_title, state, BuildMsgType.JOB_TITLE);
}
- private TreeIter add_partition (string msg, PartitionState state, BuildMsgType type)
+ private TreeIter add_partition (string msg, BuildState state, BuildMsgType type)
{
bool bold = type == BuildMsgType.TITLE;
@@ -270,7 +270,7 @@ public class BuildView : TreeView
return iter;
}
- public void set_partition_state (TreeIter partition_id, PartitionState state)
+ public void set_partition_state (TreeIter partition_id, BuildState state)
{
_store.set (partition_id, BuildMsgColumn.ICON, get_icon_from_state (state));
}
@@ -341,20 +341,20 @@ public class BuildView : TreeView
return iter;
}
- private string? get_icon_from_state (PartitionState state)
+ private string? get_icon_from_state (BuildState state)
{
switch (state)
{
- case PartitionState.RUNNING:
+ case BuildState.RUNNING:
return Stock.EXECUTE;
- case PartitionState.SUCCEEDED:
+ case BuildState.SUCCEEDED:
return Stock.APPLY;
- case PartitionState.FAILED:
+ case BuildState.FAILED:
return Stock.DIALOG_ERROR;
- case PartitionState.ABORTED:
+ case BuildState.ABORTED:
return Stock.STOP;
default:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]