Revision: 4363 http://geany.svn.sourceforge.net/geany/?rev=4363&view=rev Author: eht16 Date: 2009-10-25 22:27:13 +0000 (Sun, 25 Oct 2009)
Log Message: ----------- Add sci_goto_line() to the plugin API.
Modified Paths: -------------- trunk/ChangeLog trunk/plugins/geanyfunctions.h trunk/src/plugindata.h trunk/src/plugins.c trunk/src/sciwrappers.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2009-10-25 12:32:57 UTC (rev 4362) +++ trunk/ChangeLog 2009-10-25 22:27:13 UTC (rev 4363) @@ -10,7 +10,8 @@ * src/sidebar.c: Rename "select" variables into "selection" to avoid shadowed names. * plugins/geanyfunctions.h, src/plugins.c, src/plugindata.h: - Add ui_widget_modify_font_from_string() to the plugin API. + Add ui_widget_modify_font_from_string() and sci_goto_line() + to the plugin API. * plugins/filebrowser.c: Rename "select" variables into "selection" to avoid shadowed names. Make use of ui_widget_modify_font_from_string().
Modified: trunk/plugins/geanyfunctions.h =================================================================== --- trunk/plugins/geanyfunctions.h 2009-10-25 12:32:57 UTC (rev 4362) +++ trunk/plugins/geanyfunctions.h 2009-10-25 22:27:13 UTC (rev 4363) @@ -178,6 +178,8 @@ geany_functions->p_sci->delete_marker_at_line #define sci_is_marker_set_at_line \ geany_functions->p_sci->is_marker_set_at_line +#define sci_goto_line \ + geany_functions->p_sci->goto_line #define templates_get_template_fileheader \ geany_functions->p_templates->get_template_fileheader #define utils_str_equal \
Modified: trunk/src/plugindata.h =================================================================== --- trunk/src/plugindata.h 2009-10-25 12:32:57 UTC (rev 4362) +++ trunk/src/plugindata.h 2009-10-25 22:27:13 UTC (rev 4363) @@ -50,7 +50,7 @@ enum { /** The Application Programming Interface (API) version, incremented * whenever any plugin data types are modified or appended to. */ - GEANY_API_VERSION = 163, + GEANY_API_VERSION = 164,
/** The Application Binary Interface (ABI) version, incremented whenever * existing fields in the plugin data types have to be changed or reordered. */ @@ -345,6 +345,7 @@ void (*set_marker_at_line) (struct _ScintillaObject *sci, gint line_number, gint marker); void (*delete_marker_at_line) (struct _ScintillaObject *sci, gint line_number, gint marker); gboolean (*is_marker_set_at_line) (struct _ScintillaObject *sci, gint line, gint marker); + void (*goto_line) (struct _ScintillaObject *sci, gint line, gboolean unfold); } SciFuncs;
Modified: trunk/src/plugins.c =================================================================== --- trunk/src/plugins.c 2009-10-25 12:32:57 UTC (rev 4362) +++ trunk/src/plugins.c 2009-10-25 22:27:13 UTC (rev 4363) @@ -176,7 +176,8 @@ &sci_replace_target, &sci_set_marker_at_line, &sci_delete_marker_at_line, - &sci_is_marker_set_at_line + &sci_is_marker_set_at_line, + &sci_goto_line };
static TemplateFuncs template_funcs = {
Modified: trunk/src/sciwrappers.c =================================================================== --- trunk/src/sciwrappers.c 2009-10-25 12:32:57 UTC (rev 4362) +++ trunk/src/sciwrappers.c 2009-10-25 22:27:13 UTC (rev 4363) @@ -809,6 +809,13 @@ }
+/** Jump to the specified line in the document. + * If @a unfold is set and @a line is hidden by a fold, it is unfolded + * first to ensure it is visible. + * @param sci Scintilla widget. + * @param line Line. + * @param unfold Whether to unfold first. + */ void sci_goto_line(ScintillaObject *sci, gint line, gboolean unfold) { if (unfold) SSM(sci, SCI_ENSUREVISIBLE, line, 0);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.