[gedit] ViewFrame: do not show the number of occurrences alone



commit 7d1f3662ad3701e460146ad331ec6738c6a91ec0
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Wed Aug 28 14:11:47 2013 +0200

    ViewFrame: do not show the number of occurrences alone
    
    Always show it with the match position, like "3 of 10". Not "10" alone.

 gedit/gedit-view-frame.c |   19 ++++++-------------
 1 files changed, 6 insertions(+), 13 deletions(-)
---
diff --git a/gedit/gedit-view-frame.c b/gedit/gedit-view-frame.c
index 07d3211..0f6cf18 100644
--- a/gedit/gedit-view-frame.c
+++ b/gedit/gedit-view-frame.c
@@ -650,25 +650,18 @@ update_entry_tag (GeditViewFrame *frame)
                return;
        }
 
-       if (count == 0)
+       if (count == 0 || pos == 0)
        {
                gd_tagged_entry_remove_tag (frame->priv->search_entry,
                                            frame->priv->entry_tag);
                return;
        }
 
-       if (pos == 0)
-       {
-               label = g_strdup_printf ("%d", count);
-       }
-       else
-       {
-               /* Translators: the first %d is the position of the current search
-                * occurrence, and the second %d is the total number of search
-                * occurrences.
-                */
-               label = g_strdup_printf (_("%d of %d"), pos, count);
-       }
+       /* Translators: the first %d is the position of the current search
+        * occurrence, and the second %d is the total number of search
+        * occurrences.
+        */
+       label = g_strdup_printf (_("%d of %d"), pos, count);
 
        gd_tagged_entry_tag_set_label (frame->priv->entry_tag, label);
 


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