[gitg/vala] Added virtual methods for started, update and finished
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gitg/vala] Added virtual methods for started, update and finished
- Date: Sun, 15 Apr 2012 12:59:06 +0000 (UTC)
commit 85cb74a335220e246f2666b972d61ecfd49aea3a
Author: Jesse van den Kieboom <jesse vandenkieboom epfl ch>
Date: Sun Apr 15 14:56:59 2012 +0200
Added virtual methods for started, update and finished
libgitg/gitg-commit-model.vala | 21 ++++++++++++++++++---
1 files changed, 18 insertions(+), 3 deletions(-)
---
diff --git a/libgitg/gitg-commit-model.vala b/libgitg/gitg-commit-model.vala
index 50015b6..9ead638 100644
--- a/libgitg/gitg-commit-model.vala
+++ b/libgitg/gitg-commit-model.vala
@@ -74,10 +74,25 @@ public class CommitModel : Object
d_ids = new Gitg.Commit[0];
d_advertized_size = 0;
+ emit_started();
+ emit_finished();
+ }
+
+ protected virtual void emit_started()
+ {
started();
+ }
+
+ protected virtual void emit_finished()
+ {
finished();
}
+ protected virtual void emit_update(uint added)
+ {
+ update(added);
+ }
+
public void reload()
{
cancel();
@@ -135,7 +150,7 @@ public class CommitModel : Object
uint added = newsize - d_advertized_size;
d_advertized_size = newsize;
- update(added);
+ emit_update(added);
if (isend)
{
@@ -143,7 +158,7 @@ public class CommitModel : Object
d_thread = null;
d_cancellable = null;
- finished();
+ emit_finished();
}
}
@@ -264,7 +279,7 @@ public class CommitModel : Object
}
catch
{
- finished();
+ emit_finished();
d_cancellable = null;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]