[gcalctool/vala] Fix whitespace
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gcalctool/vala] Fix whitespace
- Date: Sat, 13 Oct 2012 07:23:46 +0000 (UTC)
commit 8484cc1ed48deff8747aafad227d8da3d947ba3a
Author: Robert Ancell <robert ancell canonical com>
Date: Sat Oct 13 20:23:31 2012 +1300
Fix whitespace
src/math-equation.vala | 14 +++++---------
1 files changed, 5 insertions(+), 9 deletions(-)
---
diff --git a/src/math-equation.vala b/src/math-equation.vala
index 8088422..b5fcea6 100644
--- a/src/math-equation.vala
+++ b/src/math-equation.vala
@@ -192,14 +192,14 @@ public class MathEquation : Gtk.TextBuffer
private void get_ans_offsets (out int start, out int end)
{
- Gtk.TextIter iter;
-
if (ans_start_mark == null)
{
- start = end = -1;
+ start = -1;
+ end = -1;
return;
}
+ Gtk.TextIter iter;
get_iter_at_mark (out iter, ans_start_mark);
start = iter.get_offset ();
get_iter_at_mark (out iter, ans_end_mark);
@@ -403,7 +403,6 @@ public class MathEquation : Gtk.TextBuffer
if (do_remove_tag)
{
Gtk.TextIter start, end;
-
get_iter_at_mark (out start, ans_start_mark);
get_iter_at_mark (out end, ans_end_mark);
remove_tag (ans_tag, start, end);
@@ -417,13 +416,12 @@ public class MathEquation : Gtk.TextBuffer
private void apply_state (MathEquationState s)
{
- Gtk.TextIter cursor;
-
/* Disable undo detection */
in_undo_operation = true;
state.ans = s.ans;
set_text (s.expression, -1);
+ Gtk.TextIter cursor;
get_iter_at_offset (out cursor, s.cursor);
place_cursor (cursor);
clear_ans (false);
@@ -449,12 +447,10 @@ public class MathEquation : Gtk.TextBuffer
public void copy ()
{
Gtk.TextIter start, end;
- string text;
-
if (!get_selection_bounds (out start, out end))
get_bounds (out start, out end);
- text = get_text (start, end, false);
+ var text = get_text (start, end, false);
Gtk.Clipboard.get (Gdk.Atom.NONE).set_text (text, -1);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]