[gtk-mac-integration] Remove PyGtk support.
- From: John Ralls <jralls src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-mac-integration] Remove PyGtk support.
- Date: Thu, 14 Jan 2021 19:19:05 +0000 (UTC)
commit 27efc0b1116ce805bafa238b5c6f2574936daad6
Author: John Ralls <jralls ceridwen us>
Date: Mon Jan 11 20:00:01 2021 -0800
Remove PyGtk support.
PyGtk was the preferred python interface for Gtk2, but development
ceased several years ago and it depends on Python2, also no longer
maintainted. A check of MacPorts shows no packages currently depend on
PyGtk bindings for gtk-mac-integration. Gtk2 had its last release in
December 2020. There are no differences in GtkosxApplication required
for C support of Gtk2 and Gtk3 so there's no reason to disable support
for Gtk2 in C, but it's no longer reasonable to maintain the PyGtk
support code.
Makefile.am | 4 +-
bindings/Makefile.am | 5 --
bindings/python/.gitignore | 2 -
bindings/python/Makefile.am | 4 -
bindings/python/gtkosx_application/Makefile.am | 41 ----------
bindings/python/gtkosx_application/__init__.py | 28 -------
.../gtkosx_application/gtkosx_application-module.c | 25 ------
.../gtkosx_application/gtkosx_application.override | 93 ----------------------
.../python/gtkosx_application/test-integration.py | 85 --------------------
configure.ac | 6 --
docs/reference/gtk-mac-integration-sections.txt | 3 +-
src/Makefile.am | 19 +++--
src/gtkosxapplication.c | 13 ---
src/gtkosxapplication.h | 4 -
{bindings/python => src}/test-introspection.py | 11 ++-
15 files changed, 22 insertions(+), 321 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 18975b6..2458644 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,6 @@
-SUBDIRS = src data bindings docs po
+SUBDIRS = src data docs po
EXTRA_DIST = gtk-doc.make accel_map autogen.sh
-DISTCHECK_CONFIGURE_FLAGS = --enable-python=all --enable-gtk-doc
+DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc
ACLOCAL_AMFLAGS = -I m4
diff --git a/configure.ac b/configure.ac
index 0b9a752..5c3254a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -73,11 +73,9 @@ if test "x$with_gtk2" = "xno" && test "x$with_gtk3" = "xno" ; then
AC_MSG_ERROR([Neither GTK+-2.0 nor GTK+-3.0 was found])
fi
-AM_CONDITIONAL([INTROSPECTION], [test x$with_gtk3 = xyes])
AM_CONDITIONAL([WITH_GTK2], [test x$with_gtk2 = xyes])
AM_CONDITIONAL([WITH_GTK3], [test x$with_gtk3 = xyes])
-GTK_PYTHON_CHECK
GOBJECT_INTROSPECTION_CHECK([0.10.1])
# This will cause the automake generated makefiles to pass the correct
@@ -94,9 +92,6 @@ AC_CONFIG_FILES(
po/Makefile.in
Makefile
src/Makefile
- bindings/Makefile
- bindings/python/Makefile
- bindings/python/gtkosx_application/Makefile
data/Makefile
docs/Makefile
docs/reference/Makefile
@@ -110,6 +105,5 @@ echo
echo "Prefix : $prefix"
echo "GTK+2 bindings : $with_gtk2"
echo "GTK+3 bindings : $with_gtk3"
-echo "Python bindings: $enable_python"
echo "Introspection : $enable_introspection"
echo
diff --git a/docs/reference/gtk-mac-integration-sections.txt b/docs/reference/gtk-mac-integration-sections.txt
index 235f052..a2fa3d5 100644
--- a/docs/reference/gtk-mac-integration-sections.txt
+++ b/docs/reference/gtk-mac-integration-sections.txt
@@ -2,6 +2,7 @@
<FILE>gtkosxapplication</FILE>
<TITLE>GtkosxApplication</TITLE>
GtkosxApplicationMenuGroup
+GtkosxApplicationAttentionType
gtkosx_application_get
gtkosx_application_ready
gtkosx_application_set_use_quartz_accelerators
@@ -11,8 +12,6 @@ gtkosx_application_sync_menubar
gtkosx_application_insert_app_menu_item
gtkosx_application_set_window_menu
gtkosx_application_set_help_menu
-GtkosxApplicationAttentionType
-GTKOSX_TYPE_APPLICATION_ATTENTION_TYPE
gtkosx_application_set_dock_menu
gtkosx_application_set_dock_icon_pixbuf
gtkosx_application_set_dock_icon_resource
diff --git a/src/Makefile.am b/src/Makefile.am
index f9b922d..f1a2847 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -66,23 +66,28 @@ test_integration_gtk2_CFLAGS = $(GTK2_CFLAGS)
test_integration_gtk2_LDADD = $(GTK2_LIBS) libgtkmacintegration-gtk2.la
endif
-EXTRA_DIST = testui.xml $(HEADER)
-
-if INTROSPECTION
+EXTRA_DIST = test-introspection.py testui.xml $(HEADER)
+if HAVE_INTROSPECTION
+if WITH_GTK3
test_integration_gtk3_CFLAGS += -DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_2
-if HAVE_INTROSPECTION
-GtkosxApplication-1.0.gir: $(INTROSPECTION_SCANNER) libgtkmacintegration-gtk3.la
+introspection_LIBS =
+gir_INCLUDES = Atk-1.0 GLib-2.0
+introspection_LIBS += libgtkmacintegration-gtk3.la
+gir_INCLUDES += Gtk-3.0
+
+GtkosxApplication-1.0.gir: $(INTROSPECTION_SCANNER) ${introspection_LIBS}
+
GtkosxApplication_1_0_gir_SCANNERFLAGS = \
--identifier-prefix=Gtkosx \
--warn-all
-GtkosxApplication_1_0_gir_INCLUDES = Atk-1.0 GLib-2.0 Gtk-3.0
+GtkosxApplication_1_0_gir_INCLUDES = ${gir_INCLUDES}
GtkosxApplication_1_0_gir_CFLAGS = \
$(AM_CPPFLAGS)
-GtkosxApplication_1_0_gir_LIBS = libgtkmacintegration-gtk3.la
+GtkosxApplication_1_0_gir_LIBS = ${introspection_LIBS}
GtkosxApplication_1_0_gir_FILES = \
gtkosxapplication.h \
gtkosxapplication.c
diff --git a/src/gtkosxapplication.c b/src/gtkosxapplication.c
index e66c248..23c7d06 100644
--- a/src/gtkosxapplication.c
+++ b/src/gtkosxapplication.c
@@ -288,16 +288,3 @@ gtkosx_application_set_use_quartz_accelerators (GtkosxApplication *self,
{
self->priv->use_quartz_accelerators = use_quartz_accelerators;
}
-
-/*
- * gtk_type_osxapplication_attention_type_get_type:
- *
- * A public enum used to set the parameter for attention
- * requests. Exists soley to satisfy the PyGObject codegen system.
- */
-GType
-gtkosx_type_application_attention_type_get_type (void)
-{
- //Bogus GType, but there's no good reason to register this; it's only an enum
- return GTKOSX_TYPE_APPLICATION;
-}
diff --git a/src/gtkosxapplication.h b/src/gtkosxapplication.h
index 1706906..ddd0dc2 100644
--- a/src/gtkosxapplication.h
+++ b/src/gtkosxapplication.h
@@ -103,10 +103,6 @@ typedef enum {
INFO_REQUEST = 10
} GtkosxApplicationAttentionType;
-/*To satisfy h2defs.py */
-#define GTKOSX_TYPE_APPLICATION_ATTENTION_TYPE (gtkosx_type_application_attention_type_get_type())
-GType gtkosx_type_application_attention_type_get_type(void);
-
void gtkosx_application_set_dock_menu(GtkosxApplication *self,
GtkMenuShell *menu_shell);
void gtkosx_application_set_dock_icon_pixbuf(GtkosxApplication *self,
diff --git a/bindings/python/test-introspection.py b/src/test-introspection.py
similarity index 90%
rename from bindings/python/test-introspection.py
rename to src/test-introspection.py
index 6809d6e..e867a18 100755
--- a/bindings/python/test-introspection.py
+++ b/src/test-introspection.py
@@ -1,7 +1,10 @@
#!/usr/bin/env python
+from gi import require_version
+require_version('Gtk', '2.0')
from gi.repository import Gtk
from gi.repository import GObject
+require_version('GtkosxApplication', '1.0')
from gi.repository import GtkosxApplication
class MainWindow(Gtk.Window):
@@ -67,13 +70,13 @@ class MainWindow(Gtk.Window):
macapp.insert_app_menu_item(item, 3)
# def dock_clicked_cb(self, dock):
-# print "Dock clicked"
+# print("Dock clicked")
def activate_cb(self, widget):
try:
- print widget.get_child().get_text()
+ print(widget.get_child().get_text())
except:
- print widget
+ print(widget)
if __name__ == '__main__':
macapp = GtkosxApplication.Application()
@@ -81,6 +84,6 @@ if __name__ == '__main__':
window.connect("destroy", Gtk.main_quit)
macapp.ready()
#Just to illustrate using the qtkosx_application_get... functions
- print macapp.get_resource_path()
+ print(macapp.get_resource_path())
Gtk.main()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]