[gnome-calculator] Eliminates repeated entries in history-view
- From: Arth Patel <arthpatel src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [gnome-calculator] Eliminates repeated entries in history-view
- Date: Mon, 22 Dec 2014 21:17:33 +0000 (UTC)
commit 9c79a1438ae99732ad4496f7e290a1e03d12060f
Author: Elita <loboelita gmail com>
Date:   Tue Oct 28 01:52:26 2014 +0530
    Eliminates repeated entries in history-view
 src/math-history.vala |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/math-history.vala b/src/math-history.vala
index 9e7999a..862537a 100644
--- a/src/math-history.vala
+++ b/src/math-history.vala
@@ -71,12 +71,12 @@ public class HistoryView : Gtk.Box
         string current_equation = equation;
         string ans = answer;
         Gtk.ListBoxRow row = (listbox.get_row_at_index (no_ofitems - 1) as Gtk.ListBoxRow);
-        Gtk.Box box = (row.get_child () as Gtk.Box);
-        if (box != null)
+        Gtk.Grid grid = (row.get_child () as Gtk.Grid);
+        if (grid != null)
         {
-            Gtk.EventBox ans_eventbox = box.get_children ().nth_data (1) as Gtk.EventBox;
+            Gtk.EventBox ans_eventbox = grid.get_children ().nth_data (0) as Gtk.EventBox;
             string prev_ans = (ans_eventbox.get_child () as Gtk.Label).get_tooltip_text (); /* retrieves 
previous equation */
-            Gtk.EventBox eq_eventbox = box.get_children ().nth_data (0) as Gtk.EventBox;
+            Gtk.EventBox eq_eventbox = grid.get_children ().nth_data (1) as Gtk.EventBox;
             string prev_equation = (eq_eventbox.get_child () as Gtk.Label).get_tooltip_text (); /* retrieves 
previous answer */
 
             if ((no_ofitems >= 1) && (prev_ans == ans) && (current_equation == prev_equation))
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]