[Anjuta-list] Re: [Anjuta-devel] build messages don't appear and code hiding



El mar, 08-07-2003 a las 18:26, Eric Laly escribió:
> I have a problem with the gnome2 port of anjuta (1.1.1 and now 1.1.97).
> When there is a compilation error, the message doesn't appear in the 
> build window.(see screen capture)

There is a small bug with i18n, because compiler messages are not
converted to UTF8 encoding. 

I append a patch that fixes this. Now it depends on .po files to guess
warnings (because the string " warning: " must be translated). I've just
modified es.po and fr.po, as I haven't found any other languages
translating gcc messages.

Regards,
Jesus.

Index: anjuta/po/es.po
diff -u anjuta/po/es.po:1.1.1.1 anjuta/po/es.po:1.2
--- anjuta/po/es.po:1.1.1.1	Mon Jul 14 01:43:51 2003
+++ anjuta/po/es.po	Mon Jul 14 03:32:11 2003
@@ -8754,3 +8754,6 @@
 
 #~ msgid "Multiple selection mode"
 #~ msgstr "Modo de seleción múltiple"
+
+msgid " warning: "
+msgstr " aviso: "
Index: anjuta/po/fr.po
diff -u anjuta/po/fr.po:1.1.1.1 anjuta/po/fr.po:1.2
--- anjuta/po/fr.po:1.1.1.1	Mon Jul 14 01:43:51 2003
+++ anjuta/po/fr.po	Mon Jul 14 03:32:11 2003
@@ -9099,3 +9099,6 @@
 
 #~ msgid "Click Here to undock this window"
 #~ msgstr "Détache cette fenêtre"
+
+msgid " warning: "
+msgstr " AVERTISSEMENT: "
Index: anjuta/src/build_project.c
diff -u anjuta/src/build_project.c:1.1.1.1 anjuta/src/build_project.c:1.2
--- anjuta/src/build_project.c:1.1.1.1	Mon Jul 14 01:43:53 2003
+++ anjuta/src/build_project.c	Mon Jul 14 02:01:32 2003
@@ -323,7 +323,11 @@
 void
 build_mesg_arrived (const gchar * mesg)
 {
-	an_message_manager_append (app->messages, mesg, MESSAGE_BUILD);
+	// Build messages are in some locale encoding and must
+	// be converted to utf8
+	gchar* conv_msg = g_locale_to_utf8(mesg,-1,NULL,NULL,NULL);
+	an_message_manager_append (app->messages, conv_msg, MESSAGE_BUILD);
+	g_free(conv_msg);
 }
 
 void
Index: anjuta/src/message-manager-private.cc
diff -u anjuta/src/message-manager-private.cc:1.1.1.1 anjuta/src/message-manager-private.cc:1.4
--- anjuta/src/message-manager-private.cc:1.1.1.1	Mon Jul 14 01:43:53 2003
+++ anjuta/src/message-manager-private.cc	Mon Jul 14 03:32:11 2003
@@ -321,7 +321,7 @@
 	GdkColor color; 
 	if (parse_error_line(message.c_str(), &dummy_fn, &dummy_int))
 	{
-		if (message.find(" warning: ") != message.npos)
+		if (message.find(_(" warning: ")) != message.npos)
 		{
 			color =	m_parent->intern->color_warning;
 			an_message_manager_indicate_warning (m_parent, m_type_id, dummy_fn, dummy_int);
@@ -349,8 +349,10 @@
 	GtkTreeIter iter;	
 	GtkListStore* store = GTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(m_tree)));
 	gtk_list_store_append(store, &iter);
+	// Must be normalized to compose representation to be
+	// displayed correctly (Bug in gtk_list???)
 	gchar* utf8_msg = g_utf8_normalize(c_message.c_str(), -1, 
-									   G_NORMALIZE_DEFAULT);
+									   G_NORMALIZE_DEFAULT_COMPOSE);
 	gtk_list_store_set (store, &iter,
 						COLUMN_MESSAGES, utf8_msg,
 						COLUMN_COLOR, &color,


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