[gitg] Do not reload commit activity when already reloading
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gitg] Do not reload commit activity when already reloading
- Date: Fri, 5 Jul 2013 18:35:42 +0000 (UTC)
commit 807c3c8ba9ca8fc0b3a8381086ba12ea26c4216d
Author: Jesse van den Kieboom <jessevdk gmail com>
Date: Fri Jul 5 20:34:07 2013 +0200
Do not reload commit activity when already reloading
gitg/commit/gitg-commit.vala | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/gitg/commit/gitg-commit.vala b/gitg/commit/gitg-commit.vala
index 0b89c6d..6588dff 100644
--- a/gitg/commit/gitg-commit.vala
+++ b/gitg/commit/gitg-commit.vala
@@ -24,6 +24,7 @@ namespace GitgCommit
// Do this to pull in config.h before glib.h (for gettext...)
private const string version = Gitg.Config.VERSION;
private Paned? d_main;
+ private bool d_reloading;
public GitgExt.Application? application { owned get; construct set; }
@@ -284,6 +285,13 @@ namespace GitgCommit
public void reload()
{
+ if (d_reloading)
+ {
+ return;
+ }
+
+ d_reloading = true;
+
var model = d_main.sidebar.model;
var stage = application.repository.stage;
@@ -393,6 +401,8 @@ namespace GitgCommit
{
d_main.button_commit.sensitive = true;
}
+
+ d_reloading = false;
});
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]