[geany/geany] 43bff9: Make locate_sci_in_container() search recursively
Matthew Brush
git-noreply at xxxxx
Sat May 24 13:05:14 UTC 2014
Branch: refs/heads/master
Author: Matthew Brush <matt at geany.org>
Committer: Thomas Martitz <kugel at rockbox.org>
Date: Sat, 24 May 2014 13:05:14 UTC
Commit: 43bff93046d891cdf250704d520e4785f5f07cd4
https://github.com/geany/geany/commit/43bff93046d891cdf250704d520e4785f5f07cd4
Log Message:
-----------
Make locate_sci_in_container() search recursively
Supports changes to the widget heirarchy in the future.
Modified Paths:
--------------
src/document.c
Modified: src/document.c
11 lines changed, 11 insertions(+), 0 deletions(-)
===================================================================
@@ -231,6 +231,10 @@ gint document_get_notebook_page(GeanyDocument *doc)
}
+/*
+ * Recursively searches a containers children until it finds a
+ * Scintilla widget, or NULL if one was not found.
+ */
static ScintillaObject *locate_sci_in_container(GtkWidget *container)
{
ScintillaObject *sci = NULL;
@@ -246,6 +250,13 @@ static ScintillaObject *locate_sci_in_container(GtkWidget *container)
sci = SCINTILLA(iter->data);
break;
}
+ else if (GTK_IS_CONTAINER(iter->data))
+ {
+ sci = locate_sci_in_container(iter->data);
+ if (IS_SCINTILLA(sci))
+ break;
+ sci = NULL;
+ }
}
g_list_free(children);
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
More information about the Commits
mailing list