gtranslator r3794 - in trunk: . src



Author: icq
Date: Wed Sep 24 06:24:30 2008
New Revision: 3794
URL: http://svn.gnome.org/viewvc/gtranslator?rev=3794&view=rev

Log:
2008-09-24  Ignacio Casal Quinteiro  <nacho resa gmail com>

	* src/actions-search.c (phrase_found), (phrase_not_found):
	Added flash messages when searching.


Modified:
   trunk/ChangeLog
   trunk/src/actions-search.c

Modified: trunk/src/actions-search.c
==============================================================================
--- trunk/src/actions-search.c	(original)
+++ trunk/src/actions-search.c	Wed Sep 24 06:24:30 2008
@@ -34,6 +34,7 @@
 
 #include "actions.h"
 #include "msg.h"
+#include "statusbar.h"
 #include "utils.h"
 #include "view.h"
 #include "window.h"
@@ -163,38 +164,40 @@
 phrase_found (GtranslatorWindow *window,
 	      gint         occurrences)
 {
+	GtranslatorStatusbar *statusbar;
+	
+	statusbar = GTR_STATUSBAR (gtranslator_window_get_statusbar (window));
+	
 	if (occurrences > 1)
 	{
-		/*gtranslator_statusbar_flash_message (GTR_STATUSBAR (window->priv->statusbar),
-					       window->priv->generic_message_cid,
-					       ngettext("Found and replaced %d occurrence",
-					     	        "Found and replaced %d occurrences",
-					     	        occurrences),
-					       occurrences);*/
+		gtranslator_statusbar_flash_message (statusbar,
+						     0,
+						     ngettext("Found and replaced %d occurrence",
+							      "Found and replaced %d occurrences",
+							      occurrences),
+						     occurrences);
 	}
 	else
 	{
-		/*if (occurrences == 1)
-			gtranslator_statusbar_flash_message (GTR_STATUSBAR (window->priv->statusbar),
-						       window->priv->generic_message_cid,
-						       _("Found and replaced one occurrence"));
+		if (occurrences == 1)
+			gtranslator_statusbar_flash_message (statusbar,
+							     0,
+							     _("Found and replaced one occurrence"));
 		else
-			gtranslator_statusbar_flash_message (GTR_STATUSBAR (window->priv->statusbar),
-						       window->priv->generic_message_cid,
-						       " ");*/
-	}
-	g_warning(ngettext("Found and replaced one occurrence",
-			   "Found and replaced %d occurrences",
-			   occurrences));
+			gtranslator_statusbar_flash_message (statusbar,
+							     0,
+							     " ");
+	}
 }
 
 static void
 phrase_not_found (GtranslatorWindow *window)
 {
-	/*gtranslator_statusbar_flash_message (GTR_STATUSBAR (window->priv->statusbar),
-				       window->priv->generic_message_cid,
-				       _("Phrase not found"));*/
-	g_warning("Phrase not found");
+	GtranslatorStatusbar *status;
+	
+	status = GTR_STATUSBAR (gtranslator_window_get_statusbar (window));
+	gtranslator_statusbar_flash_message (status, 0,
+					     _("Phrase not found"));
 }
 
 static gboolean



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