SF.net SVN: geany: [443] trunk/src
eht16 at users.sourceforge.net
eht16 at xxxxx
Tue Jun 13 20:03:49 UTC 2006
Revision: 443
Author: eht16
Date: 2006-06-13 13:03:44 -0700 (Tue, 13 Jun 2006)
ViewCVS: http://svn.sourceforge.net/geany/?rev=443&view=rev
Log Message:
-----------
Implemented code for setting indicators while compiling.
Modified Paths:
--------------
trunk/src/callbacks.c
trunk/src/utils.h
Modified: trunk/src/callbacks.c
===================================================================
--- trunk/src/callbacks.c 2006-06-13 19:37:21 UTC (rev 442)
+++ trunk/src/callbacks.c 2006-06-13 20:03:44 UTC (rev 443)
@@ -979,24 +979,6 @@
}
#endif
- // experimental code to simulate pasting by middle mouse button
- if (event->button == 2)
- {
- GtkClipboard *cp = gtk_clipboard_get(gdk_atom_intern("PRIMARY", FALSE));
-
- if (gtk_clipboard_wait_is_text_available(cp))
- {
- gchar *text = gtk_clipboard_wait_for_text(cp);
-
- if (text != NULL)
- {
- sci_insert_text(doc_list[idx].sci, clickpos, text);
- g_free(text);
- return TRUE;
- }
- }
- }
-
if (event->button == 3)
{
utils_find_current_word(doc_list[idx].sci, clickpos,
@@ -1398,7 +1380,10 @@
gtk_tree_model_get(model, &iter, 0, &color, 1, &string, -1);
if (string && gdk_color_equal(&red, color))
{
- utils_parse_compiler_error_line(string);
+ gint line;
+ gint idx;
+ utils_parse_compiler_error_line(string, &idx, &line);
+ if (idx != -1 && line != -1) utils_goto_line(idx, line);
}
g_free(string);
}
@@ -2378,3 +2363,12 @@
on_go_to_line_activate(menuitem, user_data);
}
+
+void
+on_menu_remove_indicators1_activate (GtkMenuItem *menuitem,
+ gpointer user_data)
+{
+ gint idx = document_get_cur_idx();
+ document_clear_indicators(idx);
+}
+
Modified: trunk/src/utils.h
===================================================================
--- trunk/src/utils.h 2006-06-13 19:37:21 UTC (rev 442)
+++ trunk/src/utils.h 2006-06-13 20:03:44 UTC (rev 443)
@@ -207,7 +207,8 @@
double utils_strtod(const char *source, char **end);
/* try to parse the file and line number where the error occured described in line
- * and when something useful is found, it jumps to file and scrolls to the line */
-void utils_parse_compiler_error_line(const gchar *line);
+ * and when something useful is found, it stores the line number in *line and the index of
+ * the file in *idx_of_error_file. */
+void utils_parse_compiler_error_line(const gchar *string, gint *idx_of_error_file, gint *line);
#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Commits
mailing list