From 4e1d74dd9fa376152dea685917741cee77c0e059 Mon Sep 17 00:00:00 2001 From: John Darrington Date: Mon, 10 Aug 2020 09:15:09 +0200 Subject: [PATCH] Revive psppire's glade compatibility --- Makefile.am | 4 - configure.ac | 8 - glade/automake.mk | 70 ----- .../16x16/widget-psppire-psppire-acr.png | Bin 414 -> 0 bytes .../16x16/widget-psppire-psppire-dialog.png | Bin 212 -> 0 bytes .../16x16/widget-psppire-psppire-keypad.png | Bin 112 -> 0 bytes .../16x16/widget-psppire-psppire-selector.png | Bin 124 -> 0 bytes .../22x22/widget-psppire-psppire-acr.png | Bin 251 -> 0 bytes .../22x22/widget-psppire-psppire-dialog.png | Bin 283 -> 0 bytes .../22x22/widget-psppire-psppire-keypad.png | Bin 120 -> 0 bytes .../22x22/widget-psppire-psppire-selector.png | Bin 134 -> 0 bytes glade/psppire.xml | 265 ------------------ src/ui/gui/automake.mk | 140 +++++---- src/ui/gui/dummy.c | 47 ++++ src/ui/gui/glade-wrapper.in | 3 + src/ui/gui/psppire.xml | 21 ++ 16 files changed, 154 insertions(+), 404 deletions(-) delete mode 100644 glade/automake.mk delete mode 100644 glade/icons/16x16/widget-psppire-psppire-acr.png delete mode 100644 glade/icons/16x16/widget-psppire-psppire-dialog.png delete mode 100644 glade/icons/16x16/widget-psppire-psppire-keypad.png delete mode 100644 glade/icons/16x16/widget-psppire-psppire-selector.png delete mode 100644 glade/icons/22x22/widget-psppire-psppire-acr.png delete mode 100644 glade/icons/22x22/widget-psppire-psppire-dialog.png delete mode 100644 glade/icons/22x22/widget-psppire-psppire-keypad.png delete mode 100644 glade/icons/22x22/widget-psppire-psppire-selector.png delete mode 100644 glade/psppire.xml create mode 100644 src/ui/gui/dummy.c create mode 100644 src/ui/gui/glade-wrapper.in create mode 100644 src/ui/gui/psppire.xml diff --git a/Makefile.am b/Makefile.am index be5c7ae9df..ae1905f4c6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -92,10 +92,6 @@ include $(top_srcdir)/src/automake.mk include $(top_srcdir)/utilities/automake.mk include $(top_srcdir)/tests/automake.mk -if WITH_GUI_TOOLS -include $(top_srcdir)/glade/automake.mk -endif - if WITH_PERL_MODULE include $(top_srcdir)/perl-module/automake.mk endif diff --git a/configure.ac b/configure.ac index cac18c36fb..9780d7393f 100644 --- a/configure.ac +++ b/configure.ac @@ -231,14 +231,6 @@ AC_DEFINE( [crc32], [gl_crc32], [Avoid making zlib call gnulib's crc32() instead of its own.]) -AC_ARG_WITH( - gui_tools, - [AS_HELP_STRING([--with-gui-tools], [build the gui developer tools. For DEVELOPERS only! There is no reason why users will need this flag.])]) -if test x"$with_gui_tools" = x"yes" ; then - PKG_CHECK_MODULES(GLADE_UI, gladeui-2.0) -fi -AM_CONDITIONAL(WITH_GUI_TOOLS, test x"$with_gui_tools" = x"yes") - AC_ARG_WITH( [perl-module], [AS_HELP_STRING([--without-perl-module], [do not build the Perl module])], diff --git a/glade/automake.mk b/glade/automake.mk deleted file mode 100644 index 374c015255..0000000000 --- a/glade/automake.mk +++ /dev/null @@ -1,70 +0,0 @@ -# PSPP - a program for statistical analysis. -# Copyright (C) 2017 Free Software Foundation, Inc. -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -# -## Process this file with automake to produce Makefile.in -*- makefile -*- - -module_LTLIBRARIES = libglade-psppire.la - -moduledir = `pkg-config --variable=moduledir gladeui-2.0` -catalogdir = `pkg-config --variable=catalogdir gladeui-2.0` -pixmapdir = `pkg-config --variable=pixmapdir gladeui-2.0` - -small_pixmapdir = $(pixmapdir)/hicolor/16x16/actions -large_pixmapdir = $(pixmapdir)/hicolor/22x22/actions - -# format.c for psppire-value-entry.c - -libglade_psppire_la_SOURCES = \ - src/ui/gui/helper.c \ - src/ui/gui/dialog-common.c \ - src/ui/gui/psppire-var-ptr.c \ - src/data/format.c \ - src/ui/gui/psppire-format.c \ - src/data/value-labels.c \ - src/ui/gui/psppire-conf.c \ - src/ui/gui/psppire-acr.c \ - src/ui/gui/psppire-buttonbox.c \ - src/ui/gui/psppire-dialog.c \ - src/ui/gui/psppire-keypad.c \ - src/ui/gui/psppire-dictview.c \ - src/ui/gui/psppire-selector.c \ - src/ui/gui/psppire-select-dest.c \ - src/ui/gui/psppire-var-view.c \ - src/ui/gui/psppire-checkbox-treeview.c \ - src/ui/gui/psppire-val-chooser.c \ - src/ui/gui/psppire-value-entry.c \ - src/ui/gui/psppire-window-base.c - -dist_catalog_DATA = \ - glade/psppire.xml - -dist_small_pixmap_DATA = \ - glade/icons/16x16/widget-psppire-psppire-acr.png \ - glade/icons/16x16/widget-psppire-psppire-dialog.png \ - glade/icons/16x16/widget-psppire-psppire-keypad.png \ - glade/icons/16x16/widget-psppire-psppire-selector.png - -dist_large_pixmap_DATA = \ - glade/icons/22x22/widget-psppire-psppire-acr.png \ - glade/icons/22x22/widget-psppire-psppire-dialog.png \ - glade/icons/22x22/widget-psppire-psppire-keypad.png \ - glade/icons/22x22/widget-psppire-psppire-selector.png - - -libglade_psppire_la_CFLAGS = $(GLADE_UI_CFLAGS) $(GLADE_CFLAGS) \ - $(GTKSOURCEVIEW_CFLAGS) -I $(top_srcdir)/src/ui/gui -DDEBUGGING - -libglade_psppire_la_LIBADD = gl/libgl.la diff --git a/glade/icons/16x16/widget-psppire-psppire-acr.png b/glade/icons/16x16/widget-psppire-psppire-acr.png deleted file mode 100644 index 717e0886cb356f0dae7fd24d4de3df307d91a664..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 414 zcmV;P0b%}$P)W1V=QcB@Cjt*L_RsaCgGza_>RaFfOq-hGv zvikbK7#rt304(|hd1_TkO}ezXfmayON2U@c% zdufzk_z?OB$K!D#VaCMy0&^yAx7#@r@u!K`>vb~5!{P9{geZ#MGLiJxvya>D2F4h= zu0zu_lT{uR;G9EBsn-(#48y>By@uy`D2ihCn9k=jj8D(`7uVTw4T*b0Pyhe`07*qo IM6N<$f_{Ih3jhEB diff --git a/glade/icons/16x16/widget-psppire-psppire-dialog.png b/glade/icons/16x16/widget-psppire-psppire-dialog.png deleted file mode 100644 index 0d5cf63b6a2b8a290826bb49d5f61f7c45312e9d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 212 zcmV;_04x8AP)q)%)~U zn15y7f8(Scr{b*DDy}BS6D5w{Z8TL$XV89klxfnxya``~=54qZ=T>k|)YOrkVUkkv z9Nywt5#|eocS(A`)8?#TP^%8r#YA})753(Sc6_~X;Q*zIPIZ>?S3 r`+wKo<)XJXhHPDw*0}7t;a$eRj&;{#t0bC%Zes9s^>bP0l+XkK*kxGg diff --git a/glade/icons/22x22/widget-psppire-psppire-dialog.png b/glade/icons/22x22/widget-psppire-psppire-dialog.png deleted file mode 100644 index 575ebf5daa3dc72a527dfce4d21d082a9bf4a3ad..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 283 zcmV+$0p$LPP)#1Z^AK2d?}oBXqpDr+672T3C=kHe1%zPY;28MFMrT1%cdY} zEwt7jG2Z5NUFU5GA!PEkZ96+}PQ_VXP!xr?%#lP&38j=5vr5c4pOxdYG)*@#<7&E6 huzTRubc;1@cmb*>Q=8g}K#>3d002ovPDHLkV1iaJY`Opd diff --git a/glade/icons/22x22/widget-psppire-psppire-keypad.png b/glade/icons/22x22/widget-psppire-psppire-keypad.png deleted file mode 100644 index be61044bf907410584ce50df3d6238e156ba50ca..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 120 zcmeAS@N?(olHy`uVBq!ia0vp^Vj#@H1|*Mc$*~4f_MR?|Ar_~TdHDJLlM@nVoOFnt za85u@?w`E)0++tdMz@433Ad!rNB~9VtEu&?Z4YdApL{!GmBfoDZj(=mFsR=75m}#Q Rkq9)3!PC{xWt~$(699;UCNcm3 diff --git a/glade/icons/22x22/widget-psppire-psppire-selector.png b/glade/icons/22x22/widget-psppire-psppire-selector.png deleted file mode 100644 index ea1330960d1ba1428cb619a7ecff876aaaf22119..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 134 zcmeAS@N?(olHy`uVBq!ia0vp^Vj#@H1|*Mc$*~4fzMd|QAr`0KPTI-KV8Frbe57yQ zL`~1xY7YfVV%#5YW?5s(lgFUJaQ4|t^?m7r3&jezDCm3>TXHn);5#e3^yX_?JEA1S i-0%0UZaw_r8N*8{8UC=vVUj?D89ZJ6T-G@yGywn<%PfTe diff --git a/glade/psppire.xml b/glade/psppire.xml deleted file mode 100644 index 62c609a3b5..0000000000 --- a/glade/psppire.xml +++ /dev/null @@ -1,265 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/ui/gui/automake.mk b/src/ui/gui/automake.mk index 9826d9b8d0..ead491f394 100644 --- a/src/ui/gui/automake.mk +++ b/src/ui/gui/automake.mk @@ -141,49 +141,15 @@ dist_src_ui_gui_psppire_DATA = \ $(UI_FILES) \ $(top_srcdir)/src/ui/gui/pspp.lang -src_ui_gui_psppire_SOURCES = \ - src/ui/gui/builder-wrapper.c \ - src/ui/gui/builder-wrapper.h \ - src/ui/gui/dialog-common.c \ - src/ui/gui/dialog-common.h \ - src/ui/gui/dict-display.c \ - src/ui/gui/dict-display.h \ - src/ui/gui/entry-dialog.c \ - src/ui/gui/entry-dialog.h \ - src/ui/gui/executor.c \ - src/ui/gui/executor.h \ - src/ui/gui/find-dialog.c \ - src/ui/gui/find-dialog.h \ - src/ui/gui/goto-case-dialog.c \ - src/ui/gui/goto-case-dialog.h \ - src/ui/gui/helper.c \ - src/ui/gui/helper.h \ - src/ui/gui/help-menu.c \ - src/ui/gui/help-menu.h \ - src/ui/gui/main.c \ - src/ui/gui/missing-val-dialog.c \ - src/ui/gui/missing-val-dialog.h \ - src/ui/gui/options-dialog.c \ - src/ui/gui/options-dialog.h \ +UI_WIDGETS_ESSENTIAL= \ src/ui/gui/psppire-acr.c \ src/ui/gui/psppire-acr.h \ src/ui/gui/psppire-buttonbox.c \ src/ui/gui/psppire-buttonbox.h \ - src/ui/gui/psppire.c \ src/ui/gui/psppire-checkbox-treeview.c \ src/ui/gui/psppire-checkbox-treeview.h \ src/ui/gui/psppire-conf.c \ src/ui/gui/psppire-conf.h \ - src/ui/gui/psppire-data-editor.c \ - src/ui/gui/psppire-data-editor.h \ - src/ui/gui/psppire-data-sheet.c \ - src/ui/gui/psppire-data-sheet.h \ - src/ui/gui/psppire-data-store.c \ - src/ui/gui/psppire-data-store.h \ - src/ui/gui/psppire-data-window.c \ - src/ui/gui/psppire-data-window.h \ - src/ui/gui/psppire-delimited-text.c \ - src/ui/gui/psppire-delimited-text.h \ src/ui/gui/psppire-dialog-action-1sks.c \ src/ui/gui/psppire-dialog-action-1sks.h \ src/ui/gui/psppire-dialog-action-aggregate.c \ @@ -276,49 +242,87 @@ src_ui_gui_psppire_SOURCES = \ src/ui/gui/psppire-dict.h \ src/ui/gui/psppire-dictview.c \ src/ui/gui/psppire-dictview.h \ - src/ui/gui/psppire-encoding-selector.c \ - src/ui/gui/psppire-encoding-selector.h \ src/ui/gui/psppire-format.c \ src/ui/gui/psppire-format.h \ + src/ui/gui/psppire-keypad.c \ + src/ui/gui/psppire-keypad.h \ + src/ui/gui/psppire-means-layer.c \ + src/ui/gui/psppire-means-layer.h \ + src/ui/gui/psppire-select-dest.c \ + src/ui/gui/psppire-select-dest.h \ + src/ui/gui/psppire-selector.c \ + src/ui/gui/psppire-selector.h \ + src/ui/gui/psppire-text-file.c \ + src/ui/gui/psppire-text-file.h \ + src/ui/gui/psppire-val-chooser.c \ + src/ui/gui/psppire-val-chooser.h \ + src/ui/gui/psppire-var-ptr.c \ + src/ui/gui/psppire-var-ptr.h \ + src/ui/gui/psppire-var-view.c \ + src/ui/gui/psppire-var-view.h \ + src/ui/gui/psppire-window-base.c \ + src/ui/gui/psppire-window-base.h \ + src/ui/gui/dialog-common.c \ + src/ui/gui/dialog-common.h \ + src/ui/gui/widgets.c \ + src/ui/gui/widgets.h \ + src/ui/gui/dict-display.c \ + src/ui/gui/dict-display.h + +src_ui_gui_psppire_SOURCES = $(UI_WIDGETS_ESSENTIAL) \ + src/ui/gui/builder-wrapper.c \ + src/ui/gui/builder-wrapper.h \ + src/ui/gui/entry-dialog.c \ + src/ui/gui/entry-dialog.h \ + src/ui/gui/executor.c \ + src/ui/gui/executor.h \ + src/ui/gui/find-dialog.c \ + src/ui/gui/find-dialog.h \ + src/ui/gui/goto-case-dialog.c \ + src/ui/gui/goto-case-dialog.h \ + src/ui/gui/helper.c \ + src/ui/gui/helper.h \ + src/ui/gui/help-menu.c \ + src/ui/gui/help-menu.h \ + src/ui/gui/main.c \ + src/ui/gui/missing-val-dialog.c \ + src/ui/gui/missing-val-dialog.h \ + src/ui/gui/options-dialog.c \ + src/ui/gui/options-dialog.h \ + src/ui/gui/psppire.c \ + src/ui/gui/psppire-data-editor.c \ + src/ui/gui/psppire-data-editor.h \ + src/ui/gui/psppire-data-sheet.c \ + src/ui/gui/psppire-data-sheet.h \ + src/ui/gui/psppire-data-store.c \ + src/ui/gui/psppire-data-store.h \ + src/ui/gui/psppire-data-window.c \ + src/ui/gui/psppire-data-window.h \ + src/ui/gui/psppire-delimited-text.c \ + src/ui/gui/psppire-delimited-text.h \ + src/ui/gui/psppire-encoding-selector.c \ + src/ui/gui/psppire-encoding-selector.h \ src/ui/gui/psppire.h \ src/ui/gui/psppire-import-assistant.c \ src/ui/gui/psppire-import-assistant.h \ - src/ui/gui/psppire-keypad.c \ - src/ui/gui/psppire-keypad.h \ src/ui/gui/psppire-lex-reader.c \ src/ui/gui/psppire-lex-reader.h \ - src/ui/gui/psppire-means-layer.c \ - src/ui/gui/psppire-means-layer.h \ src/ui/gui/psppire-output-view.c \ src/ui/gui/psppire-output-view.h \ src/ui/gui/psppire-output-window.c \ src/ui/gui/psppire-output-window.h \ src/ui/gui/psppire-scanf.c \ src/ui/gui/psppire-scanf.h \ - src/ui/gui/psppire-select-dest.c \ - src/ui/gui/psppire-select-dest.h \ - src/ui/gui/psppire-selector.c \ - src/ui/gui/psppire-selector.h \ src/ui/gui/psppire-spreadsheet-model.c \ src/ui/gui/psppire-spreadsheet-model.h \ src/ui/gui/psppire-syntax-window.c \ src/ui/gui/psppire-syntax-window.h \ - src/ui/gui/psppire-text-file.c \ - src/ui/gui/psppire-text-file.h \ - src/ui/gui/psppire-val-chooser.c \ - src/ui/gui/psppire-val-chooser.h \ src/ui/gui/psppire-value-entry.c \ src/ui/gui/psppire-value-entry.h \ src/ui/gui/psppire-variable-sheet.c \ src/ui/gui/psppire-variable-sheet.h \ - src/ui/gui/psppire-var-ptr.c \ - src/ui/gui/psppire-var-ptr.h \ src/ui/gui/psppire-var-sheet-header.c \ src/ui/gui/psppire-var-sheet-header.h \ - src/ui/gui/psppire-var-view.c \ - src/ui/gui/psppire-var-view.h \ - src/ui/gui/psppire-window-base.c \ - src/ui/gui/psppire-window-base.h \ src/ui/gui/psppire-window.c \ src/ui/gui/psppire-window.h \ src/ui/gui/psppire-window-register.c \ @@ -335,8 +339,6 @@ src_ui_gui_psppire_SOURCES = \ src/ui/gui/var-type-dialog.h \ src/ui/gui/widget-io.c \ src/ui/gui/widget-io.h \ - src/ui/gui/widgets.c \ - src/ui/gui/widgets.h \ src/ui/gui/windows-menu.c \ src/ui/gui/windows-menu.h @@ -427,3 +429,27 @@ include $(top_srcdir)/src/ui/gui/icons/automake.mk UNINSTALL_DATA_HOOKS += update-icon-cache INSTALL_DATA_HOOKS += update-icon-cache +############################################# + +EXTRA_pkgdir = $(abs_builddir)/src/ui/gui + +EXTRA_pkg_LTLIBRARIES = src/ui/gui/libpsppire-glade.la + +src_ui_gui_libpsppire_glade_la_SOURCES = \ + $(UI_WIDGETS_ESSENTIAL) \ + src/ui/gui/dummy.c + +src_ui_gui_libpsppire_glade_la_LIBADD = \ + src/ui/gui/psppire-marshal.lo + +src_ui_gui_libpsppire_glade_la_CFLAGS = $(GTK_CFLAGS) $(GTKSOURCEVIEW_CFLAGS) +src_ui_gui_libpsppire_glade_la_LDFLAGS = -release $(VERSION) + +EXTRA_DIST += src/ui/gui/psppire.xml src/ui/gui/glade-wrapper.in + +src/ui/gui/glade-wrapper: src/ui/gui/glade-wrapper.in + $(SED) -e 's%\@abs_top_srcdir\@%@abs_top_srcdir@%g' -e 's%\@abs_top_builddir\@%@abs_top_builddir@%g' $< > $@ + chmod a+x $@ + +.PHONY: glade-tools +glade-tools: src/ui/gui/glade-wrapper src/ui/gui/libpsppire-glade.la diff --git a/src/ui/gui/dummy.c b/src/ui/gui/dummy.c new file mode 100644 index 0000000000..fa28d207b3 --- /dev/null +++ b/src/ui/gui/dummy.c @@ -0,0 +1,47 @@ +/* PSPPIRE - a graphical user interface for PSPP. + Copyright (C) 2020 Free Software Foundation + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + */ + + +/* This file exists merely to keep the dynamic linker happy when + trying to resolve symbols in the libpsppire-glade.so library + (used to define psppire's custom widgets in glade). This + file should not be linked into any binary or library used by + pspp or psppire themsleves. */ + + +#include + +#include + +#include "src/language/stats/chart-category.h" + +const GEnumValue align[1]; +const GEnumValue measure[1]; +const GEnumValue role[1]; + + +const int N_AG_FUNCS = 0; +const struct ag_func ag_func[1]; + +int F_8_0; + +int var_is_numeric () {} + + +int tt_options_dialog_run () {} + +int agr_func_tab () {} diff --git a/src/ui/gui/glade-wrapper.in b/src/ui/gui/glade-wrapper.in new file mode 100644 index 0000000000..0e175aef4c --- /dev/null +++ b/src/ui/gui/glade-wrapper.in @@ -0,0 +1,3 @@ +GLADE_CATALOG_SEARCH_PATH=@abs_top_srcdir@/src/ui/gui \ +GLADE_MODULE_SEARCH_PATH=@abs_top_builddir@/src/ui/gui/.libs \ +glade "$@" diff --git a/src/ui/gui/psppire.xml b/src/ui/gui/psppire.xml new file mode 100644 index 0000000000..c0ca929c98 --- /dev/null +++ b/src/ui/gui/psppire.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + -- 2.30.2