[geany/geany-plugins] 9ba664: GeanyPy: Add `search_show_find_in_files_dialog()` wrapper

Matthew Brush git-noreply at xxxxx
Sat Jun 15 20:29:41 UTC 2013


Branch:      refs/heads/master
Author:      Matthew Brush <matt at geany.org>
Committer:   Matthew Brush <matt at geany.org>
Date:        Sat, 15 Jun 2013 20:29:41 UTC
Commit:      9ba6643de5bbb4d5713c2948002e2f9b3f14253a
             https://github.com/geany/geany-plugins/commit/9ba6643de5bbb4d5713c2948002e2f9b3f14253a

Log Message:
-----------
GeanyPy: Add `search_show_find_in_files_dialog()` wrapper

Was missing from the bindings because it was not documented in the
C plugin API. Patch ported from "upstream" GeanyPy repo.


Modified Paths:
--------------
    geanypy/src/geanypy-search.c

Modified: geanypy/src/geanypy-search.c
23 files changed, 22 insertions(+), 1 deletions(-)
===================================================================
@@ -76,7 +76,28 @@
 };
 
 
-static PyMethodDef SearchPrefsModule_methods[] = { { NULL } };
+static PyObject *
+Search_show_find_in_files_dialog(PyObject *self, PyObject *args, PyObject *kwargs)
+{
+	gchar *dir = NULL;
+	static gchar *kwlist[] = { "init_dir", NULL };
+
+	PyArg_ParseTupleAndKeywords(args, kwargs, "s", kwlist, &dir);
+	search_show_find_in_files_dialog(dir);
+
+	Py_RETURN_NONE;
+}
+
+
+static PyMethodDef SearchPrefsModule_methods[] = {
+	{ "show_find_in_files_dialog",
+		(PyCFunction) Search_show_find_in_files_dialog,
+		METH_KEYWORDS,
+		"Shows the Find in Files dialog, taking an optional directory "
+		"to search in for the dialog or if not specified then uses "
+		"the current document's directory." },
+	{ NULL }
+};
 
 
 PyMODINIT_FUNC initsearch(void)



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).


More information about the Plugins-Commits mailing list