Commit 75c2b630 authored by Steve Frécinaux's avatar Steve Frécinaux Committed by Steve Frécinaux

expose a gedit.version tuple in python.

2006-07-13  Steve Frécinaux  <steve@istique.net>

        * gedit/gedit-python-module.c: expose a gedit.version tuple in python.

        * configure.ac: define version components separately, and add
        GEDIT_(MAJOR|MINOR|MICRO)_VERSION definition to config.h.
parent e25c53db
2006-07-13 Steve Frécinaux <steve@istique.net>
* gedit/gedit-python-module.c: expose a gedit.version tuple in python.
* configure.ac: define version components separately, and add
GEDIT_(MAJOR|MINOR|MICRO)_VERSION definition to config.h.
Note: maybe we'd like to have a gedit.require_version() function, too.
=== gedit 2.15.4 ===
2006-07-10 Jesse van den Kieboom <jesse@icecrew.nl>
......@@ -9,6 +18,7 @@
gedit 2.15.4 released.
* docs/reference/gedit-sections.txt: added gedit-sections.txt
* Makefile.am: added --enable-gtk-doc to DISTCHECK_CONFIGURE_FLAGS
2006-06-20 Steve Frécinaux <steve@istique.net>
......
......@@ -2,10 +2,22 @@ dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
AC_INIT(gedit, 2.15.4, http://bugzilla.gnome.org/enter_bug.cgi?product=gedit)
m4_define(gedit_major_version, 2)
m4_define(gedit_minor_version, 15)
m4_define(gedit_micro_version, 4)
m4_define(gedit_version, gedit_major_version.gedit_minor_version.gedit_micro_version)
AC_INIT(gedit, gedit_version, http://bugzilla.gnome.org/enter_bug.cgi?product=gedit)
AC_CONFIG_SRCDIR(gedit/gedit.c)
AC_CONFIG_MACRO_DIR([m4])
AC_DEFINE(GEDIT_MAJOR_VERSION, gedit_major_version, [Gedit major version])
AC_SUBST(GEDIT_MAJOR_VERSION, gedit_major_version)
AC_DEFINE(GEDIT_MINOR_VERSION, gedit_minor_version, [Gedit minor version])
AC_SUBST(GEDIT_MINOR_VERSION, gedit_minor_version)
AC_DEFINE(GEDIT_MICRO_VERSION, gedit_micro_version, [Gedit micro version])
AC_SUBST(GEDIT_MICRO_VERSION, gedit_micro_version)
GEDIT_MAJOR=2.14
AC_SUBST(GEDIT_MAJOR)
......
......@@ -74,7 +74,7 @@ G_DEFINE_TYPE (GeditPythonModule, gedit_python_module, G_TYPE_TYPE_MODULE)
static void
gedit_python_module_init_python ()
{
PyObject *pygtk, *mdict, *require, *path;
PyObject *pygtk, *mdict, *require, *path, *tuple;
PyObject *sys_path, *gtk, *gedit, *geditutils, *geditcommands;
PyObject *pygtk_version, *pygtk_required_version;
PyObject *gettext, *install, *gettext_args;
......@@ -169,6 +169,14 @@ gedit_python_module_init_python ()
pygedit_register_classes (mdict);
pygedit_add_constants (gedit, "GEDIT_");
/* gedit version */
tuple = Py_BuildValue("(iii)",
GEDIT_MAJOR_VERSION,
GEDIT_MINOR_VERSION,
GEDIT_MICRO_VERSION);
PyDict_SetItemString(mdict, "version", tuple);
Py_DECREF(tuple);
/* Retrieve the Python type for gedit.Plugin */
PyGeditPlugin_Type = (PyTypeObject *) PyDict_GetItemString (mdict, "Plugin");
if (PyGeditPlugin_Type == NULL)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment