[gitg] Do not recompute diff when only changing tab width
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gitg] Do not recompute diff when only changing tab width
- Date: Thu, 10 Jul 2014 17:13:32 +0000 (UTC)
commit 8aba6770bb17e042e6355a6c38b29b17c97d6c36
Author: Jesse van den Kieboom <jessevdk gnome org>
Date: Thu Jul 10 19:13:16 2014 +0200
Do not recompute diff when only changing tab width
libgitg/gitg-diff-view.vala | 17 ++++++++++++++++-
1 files changed, 16 insertions(+), 1 deletions(-)
---
diff --git a/libgitg/gitg-diff-view.vala b/libgitg/gitg-diff-view.vala
index 19b6286..3d09725 100644
--- a/libgitg/gitg-diff-view.vala
+++ b/libgitg/gitg-diff-view.vala
@@ -121,7 +121,7 @@ namespace Gitg
if (d_tab_width != value)
{
d_tab_width = value;
- update();
+ update_tab_width();
}
}
default = 4;
@@ -452,6 +452,21 @@ namespace Gitg
update();
}
+ private void update_tab_width()
+ {
+ if (!d_loaded)
+ {
+ return;
+ }
+
+ run_javascript.begin(@"update_tab_width($d_tab_width);", null, (obj, res) => {
+ try
+ {
+ run_javascript.end(res);
+ } catch {}
+ });
+ }
+
private void update()
{
if (!d_loaded)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]