summaryrefslogtreecommitdiff
path: root/plugins/pychrysa/plugin.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2012-08-06 20:29:20 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2012-08-06 20:29:20 (GMT)
commitfc49e98dc2b3e0ae08a5874ecacaef046a0f3ec1 (patch)
treee121c5eb5dd0629554a498f8e1a1cce3fc0715b4 /plugins/pychrysa/plugin.c
parentfacec716100f598a8694889274a4589c75c14722 (diff)
Saved progress toward the Android permissions display.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@258 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'plugins/pychrysa/plugin.c')
-rw-r--r--plugins/pychrysa/plugin.c48
1 files changed, 47 insertions, 1 deletions
diff --git a/plugins/pychrysa/plugin.c b/plugins/pychrysa/plugin.c
index 9dc0c29..6d8a494 100644
--- a/plugins/pychrysa/plugin.c
+++ b/plugins/pychrysa/plugin.c
@@ -482,7 +482,6 @@ static MatchingFormatAction g_python_plugin_is_matching(const GPythonPlugin *plu
-
/******************************************************************************
* *
* Paramètres : plugin = greffon de prise en charge à utiliser. *
@@ -749,6 +748,50 @@ static PyObject *pychrysa_plugin_run(PyObject *self, PyObject *args)
+#include <pygtk-2.0/pygobject.h>
+
+static int convert_to_w(PyGObject *obj, void **out)
+{
+
+ //if (!pygobject_check(obj,
+
+ *out = pygobject_get(obj);
+
+ return (1);
+
+}
+
+
+static PyObject *add_wgt(PyObject *self, PyObject *args)
+{
+ GtkWidget *result;
+ GtkWidget *button;
+
+
+ result = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+ gtk_widget_set_size_request(result, 400, 300);
+ gtk_window_set_position(GTK_WINDOW(result), GTK_WIN_POS_CENTER);
+ gtk_container_set_border_width(GTK_CONTAINER(result), 4);
+ gtk_window_set_title(GTK_WINDOW(result), _("ChrysalideWWW"));
+
+ gtk_widget_show (result);
+
+
+ if (!PyArg_ParseTuple(args, "O&", convert_to_w, &button))
+ return Py_None;
+
+ gtk_container_add(GTK_CONTAINER(result), button);
+
+
+ return Py_None;
+
+}
+
+
+
+
+
+
/******************************************************************************
* *
@@ -780,6 +823,9 @@ static PyMethodDef pychrysa_plugin_methods[] = {
{ "run", (PyCFunction)pychrysa_plugin_run, METH_VARARGS,
"Run the plugin for a specific action."
},
+ { "add_wgt", (PyCFunction)add_wgt, METH_VARARGS,
+ "Run the plugin for a specific action."
+ },
NULL
};