summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Henstridge <james@daa.com.au>2001-02-16 05:24:54 +0000
committerJames Henstridge <jamesh@src.gnome.org>2001-02-16 05:24:54 +0000
commit769546f2fc81eff83ae06800fa144509f80b67bc (patch)
treeb900c4e382fa381f903857a9404682fb1441b9cf
parent1382d560a740c98c157927693c9464b9f5597931 (diff)
downloadpygtk-769546f2fc81eff83ae06800fa144509f80b67bc.tar.gz
add panel size constants. (AppletWidget.__getattr__): handle privcfgpath
2001-02-16 James Henstridge <james@daa.com.au> * pygnome/gnome/applet.py: add panel size constants. (AppletWidget.__getattr__): handle privcfgpath and globcfgpath members. * pygnome/generate/applet.defs (AppletWidget): add privcfgpath and globcfgpath public structure fields. * pygnome/examples/gtkhtml_demo.py: make demo actually work. * pygnome/gtkhtml.py: add support for more APIs. * pygnome/gtkhtmlmodule.c (_wrap_gtk_html_begin): fix argument list. Add some more of the gtkhtml APIs. 2001-02-15 James Henstridge <james@daa.com.au> * acconfig.h: add ENABLE_PYGTK_THREADING constant here. * configure.in (enable_thread): add support for a --disable-thread configure option, so you can disable pygtk threading when compiling with a threaded pygtk. * gtkmodule.c: change define from WITH_THREAD to ENABLE_PYGTK_THREADING. * examples/glade/glade.py: replace with the glade example from the extension-class-branch, which uses libglade -- don't want examples of using the deprecated pyglade module. * gtkmodule.c (GtkStyle_...): guard against NULL values in some parts. (PyGdkWindow_GetAttr): make some attributes inaccessible for GDK_WINDOW_PIXMAP GdkWindows. (_wrap_gtk_set_locale): fix typo.
-rw-r--r--ChangeLog13
-rw-r--r--acconfig.h2
-rw-r--r--configure.in14
-rwxr-xr-xexamples/glade/glade.py18
-rw-r--r--gtkmodule.c4
5 files changed, 36 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog
index 06114cda..7e6be6f2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,18 @@
2001-02-15 James Henstridge <james@daa.com.au>
+ * acconfig.h: add ENABLE_PYGTK_THREADING constant here.
+
+ * configure.in (enable_thread): add support for a --disable-thread
+ configure option, so you can disable pygtk threading when
+ compiling with a threaded pygtk.
+
+ * gtkmodule.c: change define from WITH_THREAD to
+ ENABLE_PYGTK_THREADING.
+
+ * examples/glade/glade.py: replace with the glade example from the
+ extension-class-branch, which uses libglade -- don't want examples
+ of using the deprecated pyglade module.
+
* gtkmodule.c (GtkStyle_...): guard against NULL values in some
parts.
(PyGdkWindow_GetAttr): make some attributes inaccessible for
diff --git a/acconfig.h b/acconfig.h
index bfe533c0..20358cf9 100644
--- a/acconfig.h
+++ b/acconfig.h
@@ -29,5 +29,7 @@
#undef HAVE_EXTENSIONS_ARRAYOBJECT_H
#undef HAVE_NUMERIC_ARRAYOBJECT_H
+#undef ENABLE_PYGTK_THREADING
+
@BOTTOM@
#endif /* !_PYGTK_CONFIG_H_ */
diff --git a/configure.in b/configure.in
index 89552460..840edc6b 100644
--- a/configure.in
+++ b/configure.in
@@ -9,7 +9,19 @@ AC_PROG_LIBTOOL
AM_PATH_PYTHON(module)
AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)])
-AM_CHECK_PYMOD(thread,,extra_mods=gthread,extra_mods=)
+AC_ARG_ENABLE(thread,
+[ --disable-thread Disable pygtk threading support],,
+enable_thread=yes)
+AM_CHECK_PYMOD(thread,,,enable_thread=no)
+AC_MSG_CHECKING(whether to enable threading in pygtk)
+if test "x$enable_thread" != xno; then
+ extra_mods=gthread
+ AC_DEFINE(ENABLE_PYGTK_THREADING)
+ AC_MSG_RESULT(yes)
+else
+ extra_mods=
+ AC_MSG_RESULT(no)
+fi
AM_PATH_GTK(1.2.6,,,$extra_mods)
AM_PATH_GDK_IMLIB(1.8, build_imlib=true, build_imlib=false)
diff --git a/examples/glade/glade.py b/examples/glade/glade.py
index a7778783..6627ed3f 100755
--- a/examples/glade/glade.py
+++ b/examples/glade/glade.py
@@ -1,9 +1,7 @@
#!/usr/bin/env python
import sys
-if sys.version[:3] == '1.4':
- import ni
-from gtk import *
-import pyglade
+import gtk
+import libglade
if len(sys.argv) > 1:
fname = sys.argv[1]
@@ -11,17 +9,13 @@ else:
fname = 'test.glade'
# create widget tree ...
-wtree = pyglade.construct(fname)
+xml = libglade.GladeXML(fname)
# if there is anything that needs to be added to the UI, we can access all
# the widgets like this:
-try:
- win = wtree.get_widget('window1')
-except: pass
+win = xml.get_widget('window1')
# we can connect to any of the signals named in the template:
-try:
- wtree.connect('close_window', mainquit)
-except: pass
+xml.signal_connect('close_window', gtk.mainquit)
-mainloop()
+gtk.mainloop()
diff --git a/gtkmodule.c b/gtkmodule.c
index 2c3e0898..01969613 100644
--- a/gtkmodule.c
+++ b/gtkmodule.c
@@ -67,7 +67,7 @@
*/
-#ifdef WITH_THREAD
+#ifdef ENABLE_PYGTK_THREADING
static GStaticPrivate pythreadstate_key = G_STATIC_PRIVATE_INIT;
static GStaticPrivate counter_key = G_STATIC_PRIVATE_INIT;
@@ -100,7 +100,7 @@ static GStaticPrivate counter_key = G_STATIC_PRIVATE_INIT;
}
-#else /* !WITH_THREADS */
+#else /* !ENABLE_PYGTK_THREADING */
# define PyGTK_BLOCK_THREADS
# define PyGTK_UNBLOCK_THREADS
#endif