More patches



Here a couple of patches for anjuta2 and gbf I did the last days. Each item
in this list is for one patched file.
1) Anjuta should use bind_textdomain_codeset to UTF-8, because the gnome 2
   libraries need UTF-8. It breaks on de_DE otherweise.
2) Correct the behaviour of the error-event-callback to actually use the
   error data structures instead of the warning ones. Also fixes a comment
   in the gbf setup to say what will be done.
   Additionally: Place a untagged U+0xFEFF (Non breaking zero width space,
   aka byte order mark, the unicode NOP character) after each warning or
   error, so gtk_text_iter_backward_to_tag_toggle finds the beginning
   of the warning I clicked, not the warning at the first of a block
   of warnings.
   It would be nice if clicking a warning or error also focusses the
   document, because I didn't find any way except TABbing to focus the
   document without moving the cursor. And pressing four times SHIFT-TAB
   after clicking an error ist quite a bit inconvinient. I was not able
   to patch that, because I didn't really get a view through the widget
   structure, and gtk_widget_grab_focus does not work on the notebook or
   the document, but just on the GtkText hidden somewhere down in those
   widgets.
3) I want to see the new Project view widget when starting anjuta :-)
   Why the heck is that all put in one line?

Index: src/anjuta.c
===================================================================
RCS file: /cvs/gnome/anjuta2/src/anjuta.c,v
retrieving revision 1.43
diff -u -r1.43 anjuta.c
--- src/anjuta.c	15 Nov 2002 09:25:20 -0000	1.43
+++ src/anjuta.c	25 Dec 2002 22:49:23 -0000
@@ -120,6 +120,7 @@
 
 	/* Internationalization */
 	bindtextdomain (PACKAGE, GNOMELOCALEDIR);
+	bind_textdomain_codeset (PACKAGE, "UTF-8");
 	textdomain (PACKAGE);
 	
 	program = gnome_program_init (PACKAGE, VERSION, 
Index: src/controls/gbf-build-info.c
===================================================================
RCS file: /cvs/gnome/gnome-build/src/controls/gbf-build-info.c,v
retrieving revision 1.19
diff -u -r1.19 gbf-build-info.c
--- src/controls/gbf-build-info.c	29 Dec 2002 19:45:08 -0000	1.19
+++ src/controls/gbf-build-info.c	12 Jan 2003 18:50:37 -0000
@@ -317,6 +317,10 @@
 							  &start,
 							  warn->output, strlen (warn->output),
 							  "warning", NULL);
+		gtk_text_buffer_get_end_iter (priv->buffer, &start);
+		/* Non-breaking zero-width space (aka byte order mark) to
+		   separate warnings */
+		gtk_text_buffer_insert(priv->buffer, &start, "\xEF\xBB\xBF",3);
 		break;
 	case GBF_BUILD_ERROR:
 		err = data;
@@ -327,6 +331,10 @@
 							  &start,
 							  err->output, strlen (err->output),
 							  "error", NULL);
+		gtk_text_buffer_get_end_iter (priv->buffer, &start);
+		/* Non-breaking zero-width space (aka byte order mark) to
+		   separate errors */
+		gtk_text_buffer_insert(priv->buffer, &start, "\xEF\xBB\xBF",3);
 		break;
 	}
 
@@ -365,7 +373,7 @@
 	g_object_set (G_OBJECT (tag), "underline", PANGO_UNDERLINE_SINGLE, NULL);
 	g_signal_connect (G_OBJECT (tag), "event", G_CALLBACK (error_link_cb), info);
 
-	/* Build warning. */
+	/* Build status. */
 	tag = gtk_text_tag_new ("status");
 	gtk_text_tag_table_add (table, tag);
 	g_object_set (G_OBJECT (tag), "foreground", "blue", NULL);
@@ -477,14 +485,14 @@
 
 		buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (obj));
 		table = gtk_text_buffer_get_tag_table (buffer);
-		tag = gtk_text_tag_table_lookup (table, "warning");
+		tag = gtk_text_tag_table_lookup (table, "error");
 
 		gtk_text_iter_backward_to_tag_toggle (start_iter, tag);
 
 		offset = gtk_text_iter_get_offset (start_iter);
-		err = g_hash_table_lookup (info->priv->warnings, GINT_TO_POINTER (offset));
+		err = g_hash_table_lookup (info->priv->errors, GINT_TO_POINTER (offset));
 		g_assert (err != NULL);
-		g_signal_emit (G_OBJECT (info), info_signals [WARNING_SELECTED],
+		g_signal_emit (G_OBJECT (info), info_signals [ERROR_SELECTED],
 			       0, err->filename, err->line, NULL);
 		gtk_text_iter_free (start_iter);
 	}
--- anjuta2-cvs/src/layout.xml	Sun Jun  9 02:52:38 2002
+++ anjuta2/src/layout.xml	Mon Jan 13 00:15:35 2003
@@ -1,4 +1,4 @@
 <?xml version="1.0"?>
 <dock-layout>
   
-<layout name="__default__"><dock name="__dock_1" floating="no" width="-1" height="-1" floatx="0" floaty="0"><paned orientation="horizontal" locked="no" position="200"><paned orientation="vertical" locked="no" position="244"><notebook orientation="horizontal" locked="no" page="0"><item name="ProjectFileTree" orientation="horizontal" locked="no"><placeholder name="ph_left" next-placement="center"/></item><item name="ProjectTargetTree" orientation="horizontal" locked="no"><placeholder name="ph_right" next-placement="center"/></item><item name="SymbolBrowser" orientation="horizontal" locked="no"/></notebook><notebook orientation="horizontal" locked="no" page="0"><item name="HelpIndex" orientation="horizontal" locked="no"/><item name="HelpSearch" orientation="horizontal" locked="no"/></notebook></paned><paned orientation="vertical" locked="no" position="325"><notebook orientation="horizontal" locked="no" page="0"><item name="DocumentManager" orientation="horizontal" locked="no"/!
><item name="HelpBrowser" orientation="horizontal" locked="no"/></notebook><item name="ProjectBuildInfo" orientation="horizontal" locked="no"><placeholder name="ph_bottom" next-placement="center"/><placeholder name="ph_top" next-placement="center"/></item></paned></paned></dock></layout></dock-layout>
+<layout name="__default__"><dock name="__dock_1" floating="no" width="-1" height="-1" floatx="0" floaty="0"><paned orientation="horizontal" locked="no" position="200"><paned orientation="vertical" locked="no" position="244"><notebook orientation="horizontal" locked="no" page="0"><item name="ProjectView" orientation="horizontal" locked="no"><placeholder name="ph_left" next-placement="center"/></item><item name="SymbolBrowser" orientation="horizontal" locked="no"/></notebook><notebook orientation="horizontal" locked="no" page="0"><item name="HelpIndex" orientation="horizontal" locked="no"/><item name="HelpSearch" orientation="horizontal" locked="no"/></notebook></paned><paned orientation="vertical" locked="no" position="325"><notebook orientation="horizontal" locked="no" page="0"><item name="DocumentManager" orientation="horizontal" locked="no"/><item name="HelpBrowser" orientation="horizontal" locked="no"/></notebook><item name="ProjectBuildInfo" orientation="horizontal" loc!
ked="no"><placeholder name="ph_bottom" next-placement="center"/><placeholder name="ph_top" next-placement="center"/></item></paned></paned></dock></layout></dock-layout>



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