[gtranslator: 2/3] Fix fuzzy field remove



commit a9be9f67a9f0e55c9ed6c5e02b31469b2b66d687
Author: Daniel GarcĂ­a Moreno <danigm wadobo com>
Date:   Mon Oct 15 10:24:42 2018 +0200

    Fix fuzzy field remove
    
    See #26

 src/gtr-actions-search.c | 79 +++++++++++++++---------------------------------
 1 file changed, 25 insertions(+), 54 deletions(-)
---
diff --git a/src/gtr-actions-search.c b/src/gtr-actions-search.c
index 63adee08..d749bdec 100644
--- a/src/gtr-actions-search.c
+++ b/src/gtr-actions-search.c
@@ -251,72 +251,43 @@ find_in_list (GtrWindow * window,
 
   do
     {
-      if (gtr_msg_is_fuzzy (GTR_MSG (l->data)) )
+      while (viewsaux != NULL)
         {
-          if (!search_backwards)
+          gboolean aux = found;
+
+          found = run_search (GTR_VIEW (viewsaux->data), found);
+          if (found)
             {
-              if (l->next == NULL)
-                {
-                  if (!wrap_around)
-                    return FALSE;
-                  l = g_list_first (l);
-                }
-              else
-                l = l->next;
+              gtr_tab_message_go_to (tab, l->data, FALSE, GTR_TAB_MOVE_NONE);
+              run_search (GTR_VIEW (viewsaux->data), aux);
+              return TRUE;
             }
-          else
+          viewsaux = viewsaux->next;
+        }
+      if (!search_backwards)
+        {
+          if (l->next == NULL)
             {
-              if (l->prev == NULL)
-                {
-                  if (!wrap_around)
-                    return FALSE;
-                  l = g_list_last (l);
-                }
-              else
-                l = l->prev;
+              if (!wrap_around)
+                return FALSE;
+              l = g_list_first (l);
             }
-          gtr_tab_message_go_to (tab, l->data, TRUE, GTR_TAB_MOVE_NONE);
+          else
+            l = l->next;
         }
       else
         {
-          while (viewsaux != NULL)
+          if (l->prev == NULL)
             {
-              gboolean aux = found;
-
-              found = run_search (GTR_VIEW (viewsaux->data), found);
-              if (found)
-                {
-                  gtr_tab_message_go_to (tab, l->data, FALSE, GTR_TAB_MOVE_NONE);
-                  run_search (GTR_VIEW (viewsaux->data), aux);
-                  return TRUE;
-                }
-              viewsaux = viewsaux->next;
-            }
-          if (!search_backwards)
-            {
-              if (l->next == NULL)
-                {
-                  if (!wrap_around)
-                    return FALSE;
-                  l = g_list_first (l);
-                }
-              else
-                l = l->next;
+              if (!wrap_around)
+                return FALSE;
+              l = g_list_last (l);
             }
           else
-            {
-              if (l->prev == NULL)
-                {
-                  if (!wrap_around)
-                    return FALSE;
-                  l = g_list_last (l);
-                }
-              else
-                l = l->prev;
-            }
-          gtr_tab_message_go_to (tab, l->data, TRUE, GTR_TAB_MOVE_NONE);
-          viewsaux = views;
+            l = l->prev;
         }
+      gtr_tab_message_go_to (tab, l->data, TRUE, GTR_TAB_MOVE_NONE);
+      viewsaux = views;
     }
   while (l != current);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]