anjuta r4680 - in trunk: . libanjuta/interfaces plugins/document-manager plugins/language-support-cpp-java plugins/scintilla plugins/search plugins/sourceview
- From: jhs svn gnome org
- To: svn-commits-list gnome org
- Subject: anjuta r4680 - in trunk: . libanjuta/interfaces plugins/document-manager plugins/language-support-cpp-java plugins/scintilla plugins/search plugins/sourceview
- Date: Mon, 2 Feb 2009 08:50:17 +0000 (UTC)
Author: jhs
Date: Mon Feb 2 08:50:16 2009
New Revision: 4680
URL: http://svn.gnome.org/viewvc/anjuta?rev=4680&view=rev
Log:
2009-02-02 Johannes Schmid <jhs gnome org>
* libanjuta/interfaces/libanjuta.idl:
* plugins/document-manager/search-box.c (on_incremental_search),
(on_search_activated):
* plugins/language-support-cpp-java/cpp-java-assist.c
(on_assist_chosen):
* plugins/scintilla/text_editor.c (iselection_set),
(iselection_iface_init):
* plugins/search/search-replace.c (search_and_replace):
* plugins/search/search-replace_backend.c (create_search_entries):
* plugins/sourceview/sourceview.c (set_select), (iselect_block),
(iselect_set), (iselect_iface_init):
#569908 â completion of symbol shouldn't scroll the editor
Modified:
trunk/ChangeLog
trunk/libanjuta/interfaces/libanjuta.idl
trunk/plugins/document-manager/search-box.c
trunk/plugins/language-support-cpp-java/cpp-java-assist.c
trunk/plugins/scintilla/text_editor.c
trunk/plugins/search/search-replace.c
trunk/plugins/search/search-replace_backend.c
trunk/plugins/sourceview/sourceview.c
Modified: trunk/libanjuta/interfaces/libanjuta.idl
==============================================================================
--- trunk/libanjuta/interfaces/libanjuta.idl (original)
+++ trunk/libanjuta/interfaces/libanjuta.idl Mon Feb 2 08:50:16 2009
@@ -1640,12 +1640,13 @@
* @obj: Self
* @start: Begin of selection
* @end: End of selection
+ * @scroll: Scroll selection onscreen
* @err: Error propagation and reporting
*
* Select characters between start and end. Start and end don't have to
* be ordered.
*/
- void set (IAnjutaIterable* start, IAnjutaIterable* end);
+ void set (IAnjutaIterable* start, IAnjutaIterable* end, gboolean scroll);
/**
* ianjuta_editor_selection_get_start:
@@ -1693,16 +1694,6 @@
* method does not do anything.
*/
void select_function ();
-
- /**
- * ianjuta_editor_selection_select_to_brace:
- * @obj: Self
- * @err: Error propagation and reporting
- *
- * Select to brace. Some highlight mode does not have braces concept,
- * in that case, this method does not do anything.
- */
- void select_to_brace ();
/**
* ianjuta_editor_edit_select_all:
Modified: trunk/plugins/document-manager/search-box.c
==============================================================================
--- trunk/plugins/document-manager/search-box.c (original)
+++ trunk/plugins/document-manager/search-box.c Mon Feb 2 08:50:16 2009
@@ -268,7 +268,7 @@
selection = IANJUTA_EDITOR_SELECTION (private->current_editor);
ianjuta_editor_selection_set (selection,
IANJUTA_ITERABLE (result_start),
- IANJUTA_ITERABLE (result_end), NULL);
+ IANJUTA_ITERABLE (result_end), TRUE, NULL);
g_object_unref (result_start);
g_object_unref (result_end);
@@ -393,7 +393,7 @@
{
ianjuta_editor_selection_set (selection,
IANJUTA_ITERABLE (result_start),
- IANJUTA_ITERABLE (result_end), NULL);
+ IANJUTA_ITERABLE (result_end), TRUE, NULL);
g_object_unref (result_start);
g_object_unref (result_end);
}
Modified: trunk/plugins/language-support-cpp-java/cpp-java-assist.c
==============================================================================
--- trunk/plugins/language-support-cpp-java/cpp-java-assist.c (original)
+++ trunk/plugins/language-support-cpp-java/cpp-java-assist.c Mon Feb 2 08:50:16 2009
@@ -883,7 +883,7 @@
{
ianjuta_iterable_next (iter, NULL);
ianjuta_editor_selection_set (IANJUTA_EDITOR_SELECTION (te),
- iter, cur_pos, NULL);
+ iter, cur_pos, FALSE, NULL);
ianjuta_editor_selection_replace (IANJUTA_EDITOR_SELECTION (te),
assistance->str, -1, NULL);
g_free (pre_word);
Modified: trunk/plugins/scintilla/text_editor.c
==============================================================================
--- trunk/plugins/scintilla/text_editor.c (original)
+++ trunk/plugins/scintilla/text_editor.c Mon Feb 2 08:50:16 2009
@@ -2594,6 +2594,7 @@
iselection_set (IAnjutaEditorSelection* edit,
IAnjutaIterable* istart,
IAnjutaIterable* iend,
+ gboolean scroll, /* TODO: Is is possible to set this in scintilla? */
GError** e)
{
TextEditorCell* start = TEXT_EDITOR_CELL (istart);
@@ -2663,12 +2664,6 @@
}
static void
-iselection_select_to_brace (IAnjutaEditorSelection* te, GError** ee)
-{
- text_editor_command (TEXT_EDITOR (te), ANE_SELECTTOBRACE, 0, 0);
-}
-
-static void
iselection_select_block (IAnjutaEditorSelection *te, GError **e)
{
text_editor_command (TEXT_EDITOR(te), ANE_SELECTBLOCK, 0, 0);
@@ -2726,7 +2721,6 @@
iface->get_end = iselection_get_end;
iface->replace = iselection_replace;
iface->select_all = iselection_select_all;
- iface->select_to_brace = iselection_select_to_brace;
iface->select_block = iselection_select_block;
iface->select_function = iselection_select_function;
}
Modified: trunk/plugins/search/search-replace.c
==============================================================================
--- trunk/plugins/search/search-replace.c (original)
+++ trunk/plugins/search/search-replace.c Mon Feb 2 08:50:16 2009
@@ -447,6 +447,7 @@
ianjuta_editor_selection_set(IANJUTA_EDITOR_SELECTION (fb->te),
start,
end,
+ TRUE,
NULL);
g_object_unref (start);
g_object_unref (end);
@@ -479,6 +480,7 @@
ianjuta_editor_selection_set(IANJUTA_EDITOR_SELECTION (fb->te),
start,
end,
+ TRUE,
NULL);
g_object_unref (start);
g_object_unref (end);
@@ -508,6 +510,7 @@
ianjuta_editor_selection_set(IANJUTA_EDITOR_SELECTION (fb->te),
start,
end,
+ TRUE,
NULL);
ianjuta_editor_selection_replace(IANJUTA_EDITOR_SELECTION (fb->te),
sr->replace.repl_str,
@@ -543,6 +546,7 @@
ianjuta_editor_selection_set(IANJUTA_EDITOR_SELECTION (fb->te),
start,
end,
+ TRUE,
NULL);
ianjuta_editor_selection_replace(IANJUTA_EDITOR_SELECTION (fb->te),
sr->replace.repl_str,
Modified: trunk/plugins/search/search-replace_backend.c
==============================================================================
--- trunk/plugins/search/search-replace_backend.c (original)
+++ trunk/plugins/search/search-replace_backend.c Mon Feb 2 08:50:16 2009
@@ -796,7 +796,7 @@
start = ianjuta_editor_get_position_from_offset (se->te, selstart, NULL);
end = ianjuta_editor_get_position_from_offset (se->te, selend, NULL);
ianjuta_editor_selection_set(IANJUTA_EDITOR_SELECTION (se->te),
- start, end, NULL);
+ start, end, TRUE, NULL);
g_object_unref (start);
g_object_unref (end);
}
Modified: trunk/plugins/sourceview/sourceview.c
==============================================================================
--- trunk/plugins/sourceview/sourceview.c (original)
+++ trunk/plugins/sourceview/sourceview.c Mon Feb 2 08:50:16 2009
@@ -1400,27 +1400,22 @@
}
static void
-set_select(Sourceview* sv, GtkTextIter* start_iter, GtkTextIter* end_iter)
+set_select(Sourceview* sv, GtkTextIter* start_iter, GtkTextIter* end_iter, gboolean scroll)
{
GtkTextBuffer* buffer = GTK_TEXT_BUFFER (sv->priv->document);
gtk_text_buffer_select_range (buffer, start_iter, end_iter);
- gtk_text_view_scroll_to_mark (GTK_TEXT_VIEW (sv->priv->view),
- gtk_text_buffer_get_insert (buffer),
- 0.25,
- FALSE,
- 0.0,
- 0.0);
+
+ if (scroll)
+ gtk_text_view_scroll_to_mark (GTK_TEXT_VIEW (sv->priv->view),
+ gtk_text_buffer_get_insert (buffer),
+ 0.25,
+ FALSE,
+ 0.0,
+ 0.0);
}
/* IAnjutaEditorSelection */
-// TODO: Move these to ilanguage-support?
-static void
-iselect_to_brace(IAnjutaEditorSelection* edit, GError** e)
-{
-
-}
-
/* Find the previous open brace that begins the current indentation level. */
static gboolean find_open_bracket(GtkTextIter *iter)
{
@@ -1454,7 +1449,7 @@
{
case '{':
++level;
- break;
+ break;
case '}':
if (!--level)
return TRUE;
@@ -1483,7 +1478,7 @@
if (find_close_bracket (&end_iter))
{
gtk_text_iter_forward_char (&end_iter); /* move past brace */
- set_select (sv, &iter, &end_iter);
+ set_select (sv, &iter, &end_iter, TRUE);
}
}
}
@@ -1492,12 +1487,14 @@
iselect_set (IAnjutaEditorSelection* edit,
IAnjutaIterable* istart,
IAnjutaIterable* iend,
+ gboolean scroll,
GError** e)
{
Sourceview* sv = ANJUTA_SOURCEVIEW(edit);
set_select(sv,
sourceview_cell_get_iter (SOURCEVIEW_CELL (istart)),
- sourceview_cell_get_iter (SOURCEVIEW_CELL (iend)));
+ sourceview_cell_get_iter (SOURCEVIEW_CELL (iend)),
+ scroll);
}
@@ -1600,7 +1597,6 @@
iface->select_block = iselect_block;
iface->select_function = iselect_function;
iface->select_all = iselect_all;
- iface->select_to_brace = iselect_to_brace;
iface->select_block = iselect_block;
iface->get = iselect_get;
iface->replace = iselect_replace;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]