Skip to content
Commits on Source (6)
......@@ -53,7 +53,8 @@ Luke Somers <lsomers@sas.upenn.edu>
Vojtěch Salajka <xsalaj02@stud.fit.vutbr.cz>
Numbered ticks and other color axis improvements.
Anna Campbellova <acampbellova@cmi.cz>
Uncertainties of quantities calculated from calibrated data.
Uncertainties of quantities calculated from calibrated data, apparent
Young modulus module.
Lennart Fricke <pge08aqw@studserv.uni-leipzig.de>
3D view and pygwy improvements.
Jozef Veselý <vesely@gjh.sk>
......@@ -81,6 +82,8 @@ Antony Kikaxa <antony.kikaxa@gmail.com>
NanoScanTech format improvements.
Felix Kling <kling@rybkachess.com>
Icons and other graphics.
Robb Puttock <robb.puttock@npl.co.uk>
Magnetic force microscopy data processing.
=== Translators ===
......@@ -163,3 +166,10 @@ The Board of Trustees of the University of Illinois
Ross Hemsley, Bristol University
3D Delaunay triangulation and interpolation, see libprocess/natural.c for
more.
James Henstridge, Johan Dahlin, Gustavo Carneiro, Paul Pogonyshev,
Gian Mario Tagliaretti, John Finlay, John Stowers, Xavier Ordoquy,
Christian Robottom Reis
Authors and maintainers of pygobject and pygtk (the static GObject and
GTK+ python bindings).
# Makefile.in generated by automake 1.15 from Makefile.am.
# Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -96,12 +96,13 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/gconf-2.m4 \
$(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/glibc21.m4 \
$(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/gwy-cc-options.m4 \
$(top_srcdir)/m4/gwy-enable.m4 $(top_srcdir)/m4/gwy-math.m4 \
$(top_srcdir)/m4/gwy-python.m4 $(top_srcdir)/m4/iconv.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
$(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/po.m4 \
$(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac
$(top_srcdir)/m4/gwy-python.m4 $(top_srcdir)/m4/gwy-version.m4 \
$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/pkg.m4 \
$(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
......@@ -381,6 +382,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
PKG_CONFIG = @PKG_CONFIG@
PNGCRUSH = @PNGCRUSH@
PNGCRUSH_SILENCE = @PNGCRUSH_SILENCE@
PNG_CFLAGS = @PNG_CFLAGS@
PNG_LIBS = @PNG_LIBS@
POD2MAN = @POD2MAN@
......
2.51 (2018-06-26)
Application:
- Translations updated: Brazilian Portugese, Czech, French, Russian.
- Toolbox editor: Possible crash when adding a new group was fixed.
Libraries:
- libgwyddion: New functions available in GwyExpr: step, spow (signed pow),
exp2, log2, sinc. If the system math library provides them, the following
are also available: erf, erfc, lGamma, Gamma, J0, J1, Y0, Y1.
- libgwyddion: gwy_sinc function was added for the cardinal sine function.
- libgwyddion: New GwyResource methods for resource deleting and renaming,
including corresponding on-disk operations.
- libgwyddion: Function for decomposing GwySIUnit to base units was added.
More degree variants and a few other odd units are recognised.
- libgwyddion: One-dimensional minimum search function was added.
- libgwyprocess: Functions for magnetic force microscopy data modelling and
handling were added.
- libgwyprocess: New tip model, ball at the end of cylinder, was added.
- libgwyprocess: New GwyBrick functions: copy, transposition, compatibility
checking, setting a plane.
- libgwyprocess: Speed of various GwyBrick summary operations such as
gwy_brick_mean_plane() was considerably improved.
- libgwyprocess: Function for bounding boxes of periodic grains was added.
- libgwyprocess: RMS grain quantity was added.
- libgwyprocess: Simple regularised deconvolution function was added.
- libgwyprocess: New k-th rank filter with arbitrarily shaped kernel function.
- libgwyprocess: New function for calculation of 2D PSDF from masked data.
- libgwydgets: Helper functions for managing a group of check boxes which
correspond to a set of bit flags (gwycheckboxes) were added.
- libgwydgets: GwyGraphModel has new functions for deriving units from a
GwyDataField and replacing a curve model at given index.
- libgwyapp: Helper functions for managing module data in the user directory.
- libgwyapp: Failed assertion message when restoring file open dialogue file
name filter from settings was corrected.
- libgwyapp: Critical warning when deleting XYZ data channel was fixed.
Modules:
- Ambios profile (new): Imports 1D profilometry data (both XML and DAT).
- Volume ASCII export (new): Export of volume data to various text formats.
- Volume Arithmetic (new): Arithmetic operations with volume data.
- Volume summarize planes (new): Plots graphs of dependencies of volume data
plane statistics over z.
- Volume stray field (new): Checks consistency of volume MFM data.
- Volume and image MFM recalculation (new): Converts MFM data to force
gradient.
- Volume transfer function (new): Plane-by-plane estimation of point spread
functions in volume data planes corresponding to different levels.
- Area function (new): Calculates the tip area function.
- Hertz (new): Calculates the apparent Young's modulus of a rough surface
according to Hertzian contact theory.
- Phoenix (new): Imports AFM data files from NASA Phoenix Mars mission.
- Disc synthesis (new): Generates surface randomly covered by discs or tiles.
- XYZ Channels (new): Create XYZ data from three images (values and precise
X and Y coordinates).
- DM3: Raw data are no longer scaled by inverse maximum representable value.
- Coerce: Skew-normal distribution was added.
- Volume Show and Extract: Cleanup; functions superseded by Cut'n'Slice were
removed, visualisation and stability improved.
- MFM modules: Cleanup; a few wrong numerical factors were corrected.
- Volume Z calibration: Calibration can be also taken from another volume data.
- Volume Swap Axes: Preview image units correspond to the transformed data.
- NMM file: Sometimes incorrect import when a only subset of channels is
selected was fixed.
- NRRD file: Import from text-encoded files was corrected. Endian is no longer
required for text data.
- PNI file: Support for v2.0 files was added, at least for a subset of data
types.
- Volume slice: Mislabelled axes on output graphs were corrected.
- Transfer function (PSF) guess and fit: The set of output images can be
controlled
- Transfer function fit: Frequency-space exponential model was added.
- Transfer function guess: The sigma estimation algorithm was improved.
- Nanoscope: Force volume file reading was standardised to follow format
specification.
- WSxM: File headers with ‘UAM’ copyright are recognised.
- Nanonis DAT spectra: All files matching the same fooNNN.dat pattern are
merged, not just with names starting from 1. When files do not seem
numbered at all, the single selected file is loaded instead of failing.
- Basic operations: Function for flipping around the diagonal was added.
- Pattern synthesis: Holes are placed with respect to image centre instead
of some defined but unhelpful origin of coordinates. This means generated
images also changed and match previous versions only statistically.
- Graph logscale: Logarithm base mishandling was fixed. Base-2 logarithm and
negative abscissa handling options were added.
- Statistics Quantities: Volume was added as a new quantity.
- FFT profile: Renamed to 2D PSDF. It can now both extract profiles and create
the entire 2D PSDF image.
- Image export: Font selection having sometimes no effect on the exported
image was, hopefully, fixed. It no longer crashes when there is no image
to export.
- Filters tool: The median filter now uses circular kernel.
- 2D ACF: Creation of the output image is optional. The image can be limited
to the zoomed part.
- Volume summarize profiles: The value for the currently selected profile is
displayed in the dialogue.
- Dimensions and Units: Crash when reinvoked after selecting Match pixel size
was fixed.
- Pygwy: Function gwy_app_data_browser_get_containers() no longer leaks
references to all the returned Containers. GraphModel supports the sequence
protocol.
Other:
- Compilation: pygobject2 codegen is no longer required to build pygwy; an
embedded implementation is used when it is not available.
- Compilation: autogen.sh no longer gets stuck without gettextize; it prints
an error message.
2.50 (2018-02-02)
Application:
- Translations updated: Czech, French, Russian.
......@@ -40,7 +148,7 @@ Modules:
- Binning (new): Reduces image size using binning.
- Rod deposition synthesis (new): Generates (modifies) surfaces by elongated
particle deposition using a simple dynamic model.
- Pile up synthesis (new): Generate (modify) surfaces by piling up geometrical
- Pile up synthesis (new): Generates (modify) surfaces by piling up geometrical
shapes.
- Convolve (new): Convolves two images.
- SPC file (new): Imports Thermo Fisher SPC files.
......@@ -67,7 +175,7 @@ Modules:
- Statistics Quantities: Quantities Sp, Sv and Sz were added.
- Object synthesis: Hexagonal pyramid, full sphere and nuggets shapes were
added. Feature up/down direction is now an arbitrary fraction. There are
new is now options to avoid stacking vertical placement character.
new is now options to avoid stacking and for vertical placement character.
- Roughness tool: Sm and Ry were added. Rz taking into account peaks twice
(instead of peaks plus valleys) was fixed.
- Curvature: Result export now includes file name and channel information.
......
# generated automatically by aclocal 1.15 -*- Autoconf -*-
# generated automatically by aclocal 1.15.1 -*- Autoconf -*-
# Copyright (C) 1996-2014 Free Software Foundation, Inc.
# Copyright (C) 1996-2017 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -1143,7 +1143,7 @@ sixtyfour bits
test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
])
# Copyright (C) 2002-2014 Free Software Foundation, Inc.
# Copyright (C) 2002-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -1158,7 +1158,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],
[am__api_version='1.15'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
m4_if([$1], [1.15], [],
m4_if([$1], [1.15.1], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
......@@ -1174,14 +1174,14 @@ m4_define([_AM_AUTOCONF_VERSION], [])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
[AM_AUTOMAKE_VERSION([1.15])dnl
[AM_AUTOMAKE_VERSION([1.15.1])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
# Copyright (C) 2001-2014 Free Software Foundation, Inc.
# Copyright (C) 2001-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -1233,7 +1233,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd`
# AM_CONDITIONAL -*- Autoconf -*-
# Copyright (C) 1997-2014 Free Software Foundation, Inc.
# Copyright (C) 1997-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -1264,7 +1264,7 @@ AC_CONFIG_COMMANDS_PRE(
Usually this means the macro was only invoked conditionally.]])
fi])])
# Copyright (C) 1999-2014 Free Software Foundation, Inc.
# Copyright (C) 1999-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -1455,7 +1455,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
# Generate code to set up dependency tracking. -*- Autoconf -*-
# Copyright (C) 1999-2014 Free Software Foundation, Inc.
# Copyright (C) 1999-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -1531,7 +1531,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
# Do all the work for Automake. -*- Autoconf -*-
# Copyright (C) 1996-2014 Free Software Foundation, Inc.
# Copyright (C) 1996-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -1728,7 +1728,7 @@ for _am_header in $config_headers :; do
done
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
# Copyright (C) 2001-2014 Free Software Foundation, Inc.
# Copyright (C) 2001-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -1749,7 +1749,7 @@ if test x"${install_sh+set}" != xset; then
fi
AC_SUBST([install_sh])])
# Copyright (C) 2003-2014 Free Software Foundation, Inc.
# Copyright (C) 2003-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -1771,7 +1771,7 @@ AC_SUBST([am__leading_dot])])
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
# From Jim Meyering
# Copyright (C) 1996-2014 Free Software Foundation, Inc.
# Copyright (C) 1996-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -1806,7 +1806,7 @@ AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
# Check to see how 'make' treats includes. -*- Autoconf -*-
# Copyright (C) 2001-2014 Free Software Foundation, Inc.
# Copyright (C) 2001-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -1856,7 +1856,7 @@ rm -f confinc confmf
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
# Copyright (C) 1997-2014 Free Software Foundation, Inc.
# Copyright (C) 1997-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -1895,7 +1895,7 @@ fi
# Helper functions for option handling. -*- Autoconf -*-
# Copyright (C) 2001-2014 Free Software Foundation, Inc.
# Copyright (C) 2001-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -1924,7 +1924,7 @@ AC_DEFUN([_AM_SET_OPTIONS],
AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
# Copyright (C) 1999-2014 Free Software Foundation, Inc.
# Copyright (C) 1999-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -1971,7 +1971,7 @@ AC_LANG_POP([C])])
# For backward compatibility.
AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
# Copyright (C) 1999-2014 Free Software Foundation, Inc.
# Copyright (C) 1999-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -2004,8 +2004,9 @@ AC_DEFUN([AM_PATH_PYTHON],
[
dnl Find a Python interpreter. Python versions prior to 2.0 are not
dnl supported. (2.0 was released on October 16, 2000).
dnl FIXME: Remove the need to hard-code Python versions here.
m4_define_default([_AM_PYTHON_INTERPRETER_LIST],
[python python2 python3 python3.3 python3.2 python3.1 python3.0 python2.7 dnl
[python python2 python3 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 python2.7 dnl
python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0])
AC_ARG_VAR([PYTHON], [the Python interpreter])
......@@ -2206,7 +2207,7 @@ for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]]
sys.exit(sys.hexversion < minverhex)"
AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])])
# Copyright (C) 2001-2014 Free Software Foundation, Inc.
# Copyright (C) 2001-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -2225,7 +2226,7 @@ AC_DEFUN([AM_RUN_LOG],
# Check to make sure that the build environment is sane. -*- Autoconf -*-
# Copyright (C) 1996-2014 Free Software Foundation, Inc.
# Copyright (C) 1996-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -2306,7 +2307,7 @@ AC_CONFIG_COMMANDS_PRE(
rm -f conftest.file
])
# Copyright (C) 2009-2014 Free Software Foundation, Inc.
# Copyright (C) 2009-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -2366,7 +2367,7 @@ AC_SUBST([AM_BACKSLASH])dnl
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
])
# Copyright (C) 2001-2014 Free Software Foundation, Inc.
# Copyright (C) 2001-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -2394,7 +2395,7 @@ fi
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
# Copyright (C) 2006-2014 Free Software Foundation, Inc.
# Copyright (C) 2006-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -2413,7 +2414,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# Check how to create a tarball. -*- Autoconf -*-
# Copyright (C) 2004-2014 Free Software Foundation, Inc.
# Copyright (C) 2004-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -2552,6 +2553,7 @@ m4_include([m4/gwy-cc-options.m4])
m4_include([m4/gwy-enable.m4])
m4_include([m4/gwy-math.m4])
m4_include([m4/gwy-python.m4])
m4_include([m4/gwy-version.m4])
m4_include([m4/iconv.m4])
m4_include([m4/libtool.m4])
m4_include([m4/ltoptions.m4])
......
# $Id: Makefile.am 20784 2018-02-01 08:56:52Z yeti-dn $
# $Id: Makefile.am 21207 2018-06-25 09:29:12Z yeti-dn $
libgwyddion = $(top_builddir)/libgwyddion/libgwyddion2.la
libgwymodule = $(top_builddir)/libgwymodule/libgwymodule2.la
......@@ -116,7 +116,7 @@ AM_LDFLAGS = $(darwin_ldflags)
# Any iface change C++: 0: A
# Adding ifaces C: R: A++
# Changing ifaces C: R: 0
libversion = -version-info 20:0:20
libversion = -version-info 21:0:21
#libversion = -release @LIBRARY_RELEASE@
libgwyapp2_la_LDFLAGS = @GTKGLEXT_LIBS@ @GIO_LIBS@ @BASIC_LIBS@ $(win32_libs) -export-dynamic $(no_undefined) $(export_symbols) $(libversion)
libgwyapp2_la_CPPFLAGS = -DG_LOG_DOMAIN=\"GwyApp\" $(AM_CPPFLAGS)
......
# Makefile.in generated by automake 1.15 from Makefile.am.
# Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -14,7 +14,7 @@
@SET_MAKE@
# $Id: Makefile.am 20784 2018-02-01 08:56:52Z yeti-dn $
# $Id: Makefile.am 21207 2018-06-25 09:29:12Z yeti-dn $
# Generic glib-mkenum rules.
# $Id: mkenum.mk 20681 2017-12-18 18:37:24Z yeti-dn $
......@@ -117,12 +117,13 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/gconf-2.m4 \
$(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/glibc21.m4 \
$(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/gwy-cc-options.m4 \
$(top_srcdir)/m4/gwy-enable.m4 $(top_srcdir)/m4/gwy-math.m4 \
$(top_srcdir)/m4/gwy-python.m4 $(top_srcdir)/m4/iconv.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
$(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/po.m4 \
$(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac
$(top_srcdir)/m4/gwy-python.m4 $(top_srcdir)/m4/gwy-version.m4 \
$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/pkg.m4 \
$(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(libgwyapp2include_HEADERS) \
......@@ -398,6 +399,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
PKG_CONFIG = @PKG_CONFIG@
PNGCRUSH = @PNGCRUSH@
PNGCRUSH_SILENCE = @PNGCRUSH_SILENCE@
PNG_CFLAGS = @PNG_CFLAGS@
PNG_LIBS = @PNG_LIBS@
POD2MAN = @POD2MAN@
......@@ -598,7 +600,7 @@ AM_LDFLAGS = $(darwin_ldflags)
# Any iface change C++: 0: A
# Adding ifaces C: R: A++
# Changing ifaces C: R: 0
libversion = -version-info 20:0:20
libversion = -version-info 21:0:21
#libversion = -release @LIBRARY_RELEASE@
libgwyapp2_la_LDFLAGS = @GTKGLEXT_LIBS@ @GIO_LIBS@ @BASIC_LIBS@ $(win32_libs) -export-dynamic $(no_undefined) $(export_symbols) $(libversion)
libgwyapp2_la_CPPFLAGS = -DG_LOG_DOMAIN=\"GwyApp\" $(AM_CPPFLAGS)
......
......@@ -38,6 +38,7 @@ static const gchar developers[] =
"Samo Ziberna\n"
"Antony Kikaxa\n"
"Felix Kling\n"
"Robb Puttock\n"
;
static const gchar translators[] =
"David Nečas (Yeti)\n"
......
/*
* $Id: data-browser-aux.c 20677 2017-12-18 18:22:52Z yeti-dn $
* $Id: data-browser-aux.c 20848 2018-03-16 09:41:01Z yeti-dn $
* Copyright (C) 2006-2016 David Necas (Yeti), Petr Klapetek.
* E-mail: yeti@gwyddion.net, klapetek@gwyddion.net.
*
......@@ -1717,7 +1717,7 @@ sync_one_data_item(GwyContainer *source, GwyContainer *dest,
* them, %FALSE to copy only.
* @...: 0-terminated list of #GwyDataItem values defining the items to copy.
*
* Synchronizes auxiliary channel items between data containers.
* Synchronizes auxiliary image data items between data containers.
**/
void
gwy_app_sync_data_items(GwyContainer *source,
......@@ -1753,7 +1753,7 @@ gwy_app_sync_data_items(GwyContainer *source,
* @items: List of #GwyDataItem values defining the items to copy.
* @nitems: Number of items in @items.
*
* Synchronizes auxiliary channel items between data containers.
* Synchronizes auxiliary image data items between data containers.
*
* Since: 2.48
**/
......@@ -1778,6 +1778,152 @@ gwy_app_sync_data_itemsv(GwyContainer *source,
sync_one_data_item(source, dest, from_id, to_id, items[i], delete_too);
}
static void
sync_one_volume_item(GwyContainer *source, GwyContainer *dest,
gint from_id, gint to_id,
GwyDataItem what, gboolean delete_too)
{
gchar key_from[40];
gchar key_to[40];
const guchar *name;
GObject *obj;
switch (what) {
case GWY_DATA_ITEM_GRADIENT:
g_snprintf(key_from, sizeof(key_from),
BRICK_PREFIX "/%d/preview/palette", from_id);
g_snprintf(key_to, sizeof(key_to),
BRICK_PREFIX "/%d/preview/palette", to_id);
if (gwy_container_gis_string_by_name(source, key_from, &name))
gwy_container_set_string_by_name(dest, key_to, g_strdup(name));
else if (delete_too)
gwy_container_remove_by_name(dest, key_to);
break;
case GWY_DATA_ITEM_TITLE:
g_snprintf(key_from, sizeof(key_from),
BRICK_PREFIX "/%d/title", from_id);
g_snprintf(key_to, sizeof(key_to),
BRICK_PREFIX "/%d/title", to_id);
if (gwy_container_gis_string_by_name(source, key_from, &name))
gwy_container_set_string_by_name(dest, key_to, g_strdup(name));
else if (delete_too)
gwy_container_remove_by_name(dest, key_to);
break;
case GWY_DATA_ITEM_META:
g_snprintf(key_from, sizeof(key_from),
BRICK_PREFIX "/%d/meta", from_id);
g_snprintf(key_to, sizeof(key_to),
BRICK_PREFIX "/%d/meta", to_id);
if (gwy_container_gis_object_by_name(source, key_from, &obj)) {
obj = gwy_serializable_duplicate(obj);
gwy_container_set_object_by_name(dest, key_to, obj);
g_object_unref(obj);
}
else if (delete_too)
gwy_container_remove_by_name(dest, key_to);
break;
case GWY_DATA_ITEM_PREVIEW:
g_snprintf(key_from, sizeof(key_from),
BRICK_PREFIX "/%d/preview", from_id);
g_snprintf(key_to, sizeof(key_to),
BRICK_PREFIX "/%d/preview", to_id);
if (gwy_container_gis_object_by_name(source, key_from, &obj)) {
obj = gwy_serializable_duplicate(obj);
gwy_container_set_object_by_name(dest, key_to, obj);
g_object_unref(obj);
}
else if (delete_too)
gwy_container_remove_by_name(dest, key_to);
break;
default:
g_assert_not_reached();
break;
}
}
/**
* gwy_app_sync_volume_items:
* @source: Source container.
* @dest: Target container (may be identical to source).
* @from_id: Data number to copy items from.
* @to_id: Data number to copy items to.
* @delete_too: %TRUE to delete items in target if source does not contain
* them, %FALSE to copy only.
* @...: 0-terminated list of #GwyDataItem values defining the items to copy.
*
* Synchronizes auxiliary volume data items between data containers.
*
* Only %GWY_DATA_ITEM_GRADIENT, %GWY_DATA_ITEM_TITLE, %GWY_DATA_ITEM_META
* and %GWY_DATA_ITEM_PREVIEW are valid items for volume data.
*
* Since: 2.51
**/
void
gwy_app_sync_volume_items(GwyContainer *source,
GwyContainer *dest,
gint from_id,
gint to_id,
gboolean delete_too,
...)
{
GwyDataItem what;
va_list ap;
g_return_if_fail(GWY_IS_CONTAINER(source));
g_return_if_fail(GWY_IS_CONTAINER(dest));
g_return_if_fail(from_id >= 0 && to_id >= 0);
if (source == dest && from_id == to_id)
return;
va_start(ap, delete_too);
while ((what = va_arg(ap, GwyDataItem)))
sync_one_volume_item(source, dest, from_id, to_id, what, delete_too);
va_end(ap);
}
/**
* gwy_app_sync_volume_itemsv:
* @source: Source container.
* @dest: Target container (may be identical to source).
* @from_id: Data number to copy items from.
* @to_id: Data number to copy items to.
* @delete_too: %TRUE to delete items in target if source does not contain
* them, %FALSE to copy only.
* @items: List of #GwyDataItem values defining the items to copy.
* @nitems: Number of items in @items.
*
* Synchronizes auxiliary volume data items between data containers.
*
* Only %GWY_DATA_ITEM_GRADIENT, %GWY_DATA_ITEM_TITLE, %GWY_DATA_ITEM_META
* and %GWY_DATA_ITEM_PREVIEW are valid items for volume data.
*
* Since: 2.51
**/
void
gwy_app_sync_volume_itemsv(GwyContainer *source,
GwyContainer *dest,
gint from_id,
gint to_id,
gboolean delete_too,
const GwyDataItem *items,
guint nitems)
{
guint i;
g_return_if_fail(GWY_IS_CONTAINER(source));
g_return_if_fail(GWY_IS_CONTAINER(dest));
g_return_if_fail(from_id >= 0 && to_id >= 0);
if (source == dest && from_id == to_id)
return;
for (i = 0; i < nitems; i++)
sync_one_volume_item(source, dest, from_id, to_id, items[i], delete_too);
}
/**
* gwy_app_data_browser_copy_channel:
* @source: Source container.
......
/*
* $Id: data-browser.c 20678 2017-12-18 18:26:55Z yeti-dn $
* $Id: data-browser.c 21086 2018-05-08 15:43:06Z yeti-dn $
* Copyright (C) 2006-2016 David Necas (Yeti), Petr Klapetek, Chris Anderson
* E-mail: yeti@gwyddion.net, klapetek@gwyddion.net, sidewinderasu@gmail.com.
*
......@@ -1779,7 +1779,7 @@ gwy_app_data_proxy_item_changed(GwyContainer *data,
g_object_unref(data_view);
}
}
/* Prevent thumbnail update, it depends on the preview field */
/* Prevent thumbnail update; it depends on the preview field */
pageno = GWY_PAGE_NOPAGE;
break;
......@@ -1814,6 +1814,8 @@ gwy_app_data_proxy_item_changed(GwyContainer *data,
g_object_unref(data_view);
}
}
/* Prevent thumbnail update; it depends on the preview field */
pageno = GWY_PAGE_NOPAGE;
break;
case KEY_IS_TITLE:
......@@ -8398,9 +8400,10 @@ gwy_app_data_browser_remove_graph_watch(gulong id)
* @GWY_DATA_ITEM_REAL_SQUARE: Physical/pixel aspect ratio mode.
* @GWY_DATA_ITEM_SELECTIONS: Data selections.
* @GWY_DATA_ITEM_META: Metadata.
* @GWY_DATA_ITEM_CALDATA: Calibration and uncertainty data.
* @GWY_DATA_ITEM_CALDATA: Calibration and uncertainty data. (Since 2.23)
* @GWY_DATA_ITEM_PREVIEW: Volume data preview. (Since 2.51)
*
* Auxiliary channel data type.
* Type of auxiliary channel data.
**/
/* vim: set cin et ts=4 sw=4 cino=>1s,e0,n0,f0,{0,}0,^0,\:1s,=0,g1s,h0,t0,+1s,c3,(0,u0 : */
/*
* $Id: data-browser.h 20678 2017-12-18 18:26:55Z yeti-dn $
* $Id: data-browser.h 20848 2018-03-16 09:41:01Z yeti-dn $
* Copyright (C) 2006-2015 David Necas (Yeti), Petr Klapetek, Chris Anderson
* E-mail: yeti@gwyddion.net, klapetek@gwyddion.net, sidewinderasu@gmail.com.
*
......@@ -82,7 +82,8 @@ typedef enum {
GWY_DATA_ITEM_REAL_SQUARE,
GWY_DATA_ITEM_SELECTIONS,
GWY_DATA_ITEM_META,
GWY_DATA_ITEM_CALDATA
GWY_DATA_ITEM_CALDATA,
GWY_DATA_ITEM_PREVIEW,
} GwyDataItem;
typedef enum {
......@@ -179,6 +180,19 @@ void gwy_app_sync_data_itemsv (GwyContainer *source,
gboolean delete_too,
const GwyDataItem *items,
guint nitems);
void gwy_app_sync_volume_items (GwyContainer *source,
GwyContainer *dest,
gint from_id,
gint to_id,
gboolean delete_too,
...);
void gwy_app_sync_volume_itemsv (GwyContainer *source,
GwyContainer *dest,
gint from_id,
gint to_id,
gboolean delete_too,
const GwyDataItem *items,
guint nitems);
gint gwy_app_data_browser_copy_channel (GwyContainer *source,
gint id,
GwyContainer *dest);
......
/*
* $Id: gwyappfilechooser.c 20678 2017-12-18 18:26:55Z yeti-dn $
* $Id: gwyappfilechooser.c 20867 2018-03-20 10:34:18Z yeti-dn $
* Copyright (C) 2003-2017 David Necas (Yeti), Petr Klapetek.
* E-mail: yeti@gwyddion.net, klapetek@gwyddion.net.
*
......@@ -631,6 +631,9 @@ construct_glob_filter(GwyAppFileChooser *chooser, GtkBox *vbox)
gtk_box_pack_start(GTK_BOX(hbox), check, FALSE, FALSE, 4);
g_signal_connect(check, "toggled", G_CALLBACK(glob_case_changed), chooser);
chooser->glob_case_check = check;
if (chooser->glob->len)
glob_entry_updated(GTK_ENTRY(entry), chooser);
}
static void
......
/* This is a GENERATED file. */
/* Generated data (by glib-mkenums) */
/* This file is generated by glib-mkenums, do not modify it. This code is licensed under the same license as the containing project. Note that it links to GLib, so must comply with the LGPL linking clauses. */
#include "gwyapptypes.h"
#include "./data-browser.h"
GType
gwy_app_what_get_type(void)
{
......@@ -44,7 +42,6 @@ gwy_app_what_get_type(void)
}
return etype;
}
GType
gwy_app_page_get_type(void)
{
......@@ -64,7 +61,6 @@ gwy_app_page_get_type(void)
}
return etype;
}
GType
gwy_data_item_get_type(void)
{
......@@ -82,13 +78,13 @@ gwy_data_item_get_type(void)
{ GWY_DATA_ITEM_SELECTIONS, "GWY_DATA_ITEM_SELECTIONS", "selections" },
{ GWY_DATA_ITEM_META, "GWY_DATA_ITEM_META", "meta" },
{ GWY_DATA_ITEM_CALDATA, "GWY_DATA_ITEM_CALDATA", "caldata" },
{ GWY_DATA_ITEM_PREVIEW, "GWY_DATA_ITEM_PREVIEW", "preview" },
{ 0, NULL, NULL }
};
etype = g_enum_register_static("GwyDataItem", values);
}
return etype;
}
GType
gwy_visibility_reset_type_get_type(void)
{
......@@ -106,7 +102,6 @@ gwy_visibility_reset_type_get_type(void)
}
return etype;
}
GType
gwy_data_watch_event_type_get_type(void)
{
......@@ -123,9 +118,7 @@ gwy_data_watch_event_type_get_type(void)
}
return etype;
}
#include "./gwymoduleutils-file.h"
GType
gwy_text_header_error_get_type(void)
{
......@@ -147,9 +140,7 @@ gwy_text_header_error_get_type(void)
}
return etype;
}
#include "./gwymoduleutils.h"
GType
gwy_preview_surface_flags_get_type(void)
{
......@@ -165,9 +156,7 @@ gwy_preview_surface_flags_get_type(void)
}
return etype;
}
#include "./gwyplaintool.h"
GType
gwy_plain_tool_changed_get_type(void)
{
......@@ -186,9 +175,7 @@ gwy_plain_tool_changed_get_type(void)
}
return etype;
}
#include "./gwyresultsexport.h"
GType
gwy_results_export_style_get_type(void)
{
......@@ -205,9 +192,7 @@ gwy_results_export_style_get_type(void)
}
return etype;
}
#include "./gwytool.h"
GType
gwy_tool_response_type_get_type(void)
{
......@@ -223,9 +208,7 @@ gwy_tool_response_type_get_type(void)
}
return etype;
}
#include "./help.h"
GType
gwy_help_flags_get_type(void)
{
......@@ -241,9 +224,7 @@ gwy_help_flags_get_type(void)
}
return etype;
}
#include "./logging.h"
GType
gwy_app_logging_flags_get_type(void)
{
......@@ -259,9 +240,7 @@ gwy_app_logging_flags_get_type(void)
}
return etype;
}
#include "./menu.h"
GType
gwy_menu_sens_flags_get_type(void)
{
......@@ -288,9 +267,7 @@ gwy_menu_sens_flags_get_type(void)
}
return etype;
}
#include "./settings.h"
GType
gwy_app_settings_error_get_type(void)
{
......@@ -308,9 +285,7 @@ gwy_app_settings_error_get_type(void)
}
return etype;
}
#include "./validate.h"
GType
gwy_data_error_get_type(void)
{
......@@ -332,7 +307,6 @@ gwy_data_error_get_type(void)
}
return etype;
}
GType
gwy_data_validate_flags_get_type(void)
{
......@@ -352,6 +326,5 @@ gwy_data_validate_flags_get_type(void)
return etype;
}
/* Generated data ends here */
/* This is a GENERATED file. */
/* Generated data (by glib-mkenums) */
/* This file is generated by glib-mkenums, do not modify it. This code is licensed under the same license as the containing project. Note that it links to GLib, so must comply with the LGPL linking clauses. */
#ifndef __GWY_APP_TYPES_H__
#define __GWY_APP_TYPES_H__
......@@ -7,55 +7,38 @@
#include <glib-object.h>
G_BEGIN_DECLS
GType gwy_app_what_get_type(void) G_GNUC_CONST;
#define GWY_TYPE_APP_WHAT (gwy_app_what_get_type())
GType gwy_app_page_get_type(void) G_GNUC_CONST;
#define GWY_TYPE_APP_PAGE (gwy_app_page_get_type())
GType gwy_data_item_get_type(void) G_GNUC_CONST;
#define GWY_TYPE_DATA_ITEM (gwy_data_item_get_type())
GType gwy_visibility_reset_type_get_type(void) G_GNUC_CONST;
#define GWY_TYPE_VISIBILITY_RESET_TYPE (gwy_visibility_reset_type_get_type())
GType gwy_data_watch_event_type_get_type(void) G_GNUC_CONST;
#define GWY_TYPE_DATA_WATCH_EVENT_TYPE (gwy_data_watch_event_type_get_type())
GType gwy_text_header_error_get_type(void) G_GNUC_CONST;
#define GWY_TYPE_TEXT_HEADER_ERROR (gwy_text_header_error_get_type())
GType gwy_preview_surface_flags_get_type(void) G_GNUC_CONST;
#define GWY_TYPE_PREVIEW_SURFACE_FLAGS (gwy_preview_surface_flags_get_type())
GType gwy_plain_tool_changed_get_type(void) G_GNUC_CONST;
#define GWY_TYPE_PLAIN_TOOL_CHANGED (gwy_plain_tool_changed_get_type())
GType gwy_results_export_style_get_type(void) G_GNUC_CONST;
#define GWY_TYPE_RESULTS_EXPORT_STYLE (gwy_results_export_style_get_type())
GType gwy_tool_response_type_get_type(void) G_GNUC_CONST;
#define GWY_TYPE_TOOL_RESPONSE_TYPE (gwy_tool_response_type_get_type())
GType gwy_help_flags_get_type(void) G_GNUC_CONST;
#define GWY_TYPE_HELP_FLAGS (gwy_help_flags_get_type())
GType gwy_app_logging_flags_get_type(void) G_GNUC_CONST;
#define GWY_TYPE_APP_LOGGING_FLAGS (gwy_app_logging_flags_get_type())
GType gwy_menu_sens_flags_get_type(void) G_GNUC_CONST;
#define GWY_TYPE_MENU_SENS_FLAGS (gwy_menu_sens_flags_get_type())
GType gwy_app_settings_error_get_type(void) G_GNUC_CONST;
#define GWY_TYPE_APP_SETTINGS_ERROR (gwy_app_settings_error_get_type())
GType gwy_data_error_get_type(void) G_GNUC_CONST;
#define GWY_TYPE_DATA_ERROR (gwy_data_error_get_type())
GType gwy_data_validate_flags_get_type(void) G_GNUC_CONST;
#define GWY_TYPE_DATA_VALIDATE_FLAGS (gwy_data_validate_flags_get_type())
G_END_DECLS
#endif /* __GWY_APP_TYPES_H__ */
......
/*
* $Id: gwymoduleutils-file.c 20678 2017-12-18 18:26:55Z yeti-dn $
* $Id: gwymoduleutils-file.c 21151 2018-06-15 08:18:55Z yeti-dn $
* Copyright (C) 2007-2016 David Necas (Yeti), Petr Klapetek.
* E-mail: yeti@gwyddion.net, klapetek@gwyddion.net.
*
......@@ -1225,7 +1225,7 @@ add_import_log(GwyContainer *data,
* multiple prefixes by separating them with newline ("\n").
* @section_template: Section start template. It must contain the character
* "\x1a" in the place where the section name apprears.
* Example: "[Section \x1a]".
* For example, "[Section \x1a]".
* @endsection_template: Section end template. It may or may not contain the
* substitute character "\x1a" depending on whether the
* section end markers contain the section name. It is
......
/*
* $Id: gwymoduleutils.c 20678 2017-12-18 18:26:55Z yeti-dn $
* Copyright (C) 2007-2016 David Necas (Yeti), Petr Klapetek.
* $Id: gwymoduleutils.c 20833 2018-03-13 10:52:02Z yeti-dn $
* Copyright (C) 2007-2018 David Necas (Yeti), Petr Klapetek.
* E-mail: yeti@gwyddion.net, klapetek@gwyddion.net.
*
* This program is free software; you can redistribute it and/or modify
......@@ -203,6 +203,158 @@ gwy_save_auxiliary_with_callback(const gchar *title,
return FALSE;
}
/**
* gwy_module_data_load:
* @modname: Module name (determines the subdirectory).
* @filename: Name of the file to load. In GLib encoding, but it really should
* be just ASCII.
* @contents: Location to store the allocated file contents. Use g_free() to
* free it. It is set to %NULL when the file cannot be loaded.
* @length: Location to the length of the contents in bytes, or %NULL.
* @error: Location for error, or %NULL.
*
* Load module data file from the user directory.
*
* The function wraps g_file_get_contents(), forming the full file name
* automatically.
*
* The error can be from %G_FILE_ERROR domain. Usually, however, you only need
* the return value and consider the file simply not existing yet when the
* function fails.
*
* Returns: %TRUE if the file was loaded.
*
* Since: 2.51
**/
gboolean
gwy_module_data_load(const gchar *modname,
const gchar *filename,
gchar **contents,
gsize *length,
GError **error)
{
gchar *path;
gboolean ok;
path = g_build_filename(gwy_get_user_dir(), modname, filename, NULL);
/* Do not bother creating the directory in the load function. We only
* need it in the save function. */
ok = g_file_get_contents(path, contents, length, error);
g_free(path);
return ok;
}
static gboolean
ensure_module_directory(const gchar *userdir,
const gchar *modname,
GError **error)
{
gchar *path;
path = g_build_filename(userdir, modname, NULL);
if (g_file_test(path, G_FILE_TEST_IS_DIR))
return TRUE;
if (g_mkdir(path, 0700) == 0) {
g_free(path);
return TRUE;
}
g_set_error_literal(error, G_FILE_ERROR,
g_file_error_from_errno(errno),
g_strerror(errno));
g_free(path);
return FALSE;
}
/**
* gwy_module_data_save:
* @modname: Module name (determines the subdirectory).
* @filename: Name of the file to save. In GLib encoding, but it really should
* be just ASCII.
* @contents: File contents to write.
* @length: Length of @contents, or -1 if it is a NUL-terminated string.
* @error: Location for error, or %NULL.
*
* Saves module data file to the user directory.
*
* The function wraps g_file_set_contents(), forming the full file name
* automatically and handling subdirectory creation.
*
* The error can be from %G_FILE_ERROR domain.
*
* Returns: %TRUE if the file was saved.
*
* Since: 2.51
**/
gboolean
gwy_module_data_save(const gchar *modname,
const gchar *filename,
gchar *contents,
gssize length,
GError **error)
{
const gchar *userdir;
gchar *path;
gboolean ok;
userdir = gwy_get_user_dir();
if (!ensure_module_directory(userdir, modname, error))
return FALSE;
path = g_build_filename(userdir, modname, filename, NULL);
ok = g_file_set_contents(path, contents, length, error);
g_free(path);
return ok;
}
/**
* gwy_module_data_fopen:
* @modname: Module name (determines the subdirectory).
* @filename: Name of the file to save. In GLib encoding, but it really should
* be just ASCII.
* @mode: File open mode, as in fopen().
* @error: Location for error, or %NULL.
*
* Opens a module data file in the user directory.
*
* The function wraps gwy_fopen(), forming the full file name automatically and
* handling subdirectory creation.
*
* The error can be from %G_FILE_ERROR domain.
*
* Returns: A file handle if the file was opened as requested, %NULL on
* failure.
*
* Since: 2.51
**/
FILE*
gwy_module_data_fopen(const gchar *modname,
const gchar *filename,
const gchar *mode,
GError **error)
{
const gchar *userdir;
gchar *path;
FILE *fh;
userdir = gwy_get_user_dir();
if (!ensure_module_directory(userdir, modname, error))
return FALSE;
path = g_build_filename(userdir, modname, filename, NULL);
if (!(fh = gwy_fopen(path, mode))) {
g_set_error_literal(error, G_FILE_ERROR,
g_file_error_from_errno(errno),
g_strerror(errno));
}
g_free(path);
return fh;
}
/**
* gwy_set_data_preview_size:
* @data_view: A data view used for module preview.
......
/*
* $Id: gwymoduleutils.h 20678 2017-12-18 18:26:55Z yeti-dn $
* Copyright (C) 2007-2016 David Necas (Yeti), Petr Klapetek.
* $Id: gwymoduleutils.h 20833 2018-03-13 10:52:02Z yeti-dn $
* Copyright (C) 2007-2018 David Necas (Yeti), Petr Klapetek.
* E-mail: yeti@gwyddion.net, klapetek@gwyddion.net.
*
* This program is free software; you can redistribute it and/or modify
......@@ -22,6 +22,7 @@
#ifndef __GWY_MODULE_UTILS_H__
#define __GWY_MODULE_UTILS_H__
#include <stdio.h>
#include <gtk/gtkwindow.h>
#include <libprocess/surface.h>
#include <libgwydgets/gwydataview.h>
......@@ -53,6 +54,26 @@ gwy_save_auxiliary_with_callback(const gchar *title,
GwySaveAuxiliaryDestroy destroy,
gpointer user_data);
gboolean
gwy_module_data_load(const gchar *modname,
const gchar *filename,
gchar **contents,
gsize *length,
GError **error);
gboolean
gwy_module_data_save(const gchar *modname,
const gchar *filename,
gchar *contents,
gssize length,
GError **error);
FILE*
gwy_module_data_fopen(const gchar *modname,
const gchar *filename,
const gchar *mode,
GError **error);
void
gwy_set_data_preview_size(GwyDataView *data_view,
gint max_size);
......
/*
* $Id: gwyresultsexport.c 20677 2017-12-18 18:22:52Z yeti-dn $
* $Id: gwyresultsexport.c 20808 2018-03-05 10:08:24Z yeti-dn $
* Copyright (C) 2017 David Necas (Yeti).
* E-mail: yeti@gwyddion.net.
*
......@@ -294,7 +294,7 @@ gwy_results_export_new(GwyResultsReportType format)
ResultsExportPriv *priv;
GtkTooltips *tips;
rexport = g_object_newv(GWY_TYPE_RESULTS_EXPORT, 0, NULL);
rexport = g_object_new(GWY_TYPE_RESULTS_EXPORT, NULL);
priv = rexport->priv;
tips = gwy_app_get_tooltips();
......
/* This is a GENERATED file. */
/*< private_header >*/
#define RELEASEDATE 0x20180202u
#define RELEASEDATE 0x20180626u
/*
* $Id: resource-editor.c 20678 2017-12-18 18:26:55Z yeti-dn $
* $Id: resource-editor.c 21151 2018-06-15 08:18:55Z yeti-dn $
* Copyright (C) 2005 David Necas (Yeti), Petr Klapetek.
* E-mail: yeti@gwyddion.net, klapetek@gwyddion.net.
*
......@@ -22,7 +22,6 @@
#include "config.h"
#include <string.h>
#include <gtk/gtk.h>
#include <glib/gstdio.h>
#include <libgwyddion/gwymacros.h>
#include <app/menu.h>
#include <app/settings.h>
......@@ -326,7 +325,6 @@ gwy_resource_editor_destroy(GtkObject *object)
{
GwyResourceEditor *editor;
gwy_debug("");
editor = GWY_RESOURCE_EDITOR(object);
if (editor->edit_window)
......@@ -348,7 +346,6 @@ gwy_resource_editor_set_default(GwyResourceEditor *editor)
GwyResource *resource;
GwyInventory *inventory;
gwy_debug("");
resource = gwy_resource_editor_get_active(editor, &model, NULL,
"Set Default");
inventory = gwy_inventory_store_get_inventory(GWY_INVENTORY_STORE(model));
......@@ -397,47 +394,21 @@ gwy_resource_editor_copy(GwyResourceEditor *editor,
static void
gwy_resource_editor_delete(GwyResourceEditor *editor)
{
GtkTreeSelection *selection;
GtkTreeModel *model;
GtkTreeIter iter;
GwyResource *resource;
GwyInventory *inventory;
GtkTreePath *path;
const gchar *name;
gchar *filename;
int result;
gwy_debug("");
gwy_resource_editor_commit(editor);
/* Get selected resource, and the inventory it belongs to: */
resource = gwy_resource_editor_get_active(editor, &model, &iter, "Delete");
inventory = gwy_inventory_store_get_inventory(GWY_INVENTORY_STORE(model));
name = gwy_resource_get_name(resource);
/* Delete the resource file */
filename = gwy_resource_build_filename(resource);
result = g_remove(filename);
if (result) {
/* FIXME: GUIze this */
g_warning("Resource (%s) could not be deleted.", name);
g_free(filename);
return;
}
g_free(filename);
/* When currently edited resource is deleted, close editor window */
if (editor->edited_resource) {
if (gwy_strequal(editor->edited_resource->str, name))
if (editor->edited_resource
&& gwy_strequal(editor->edited_resource->str, name)) {
gtk_widget_destroy(editor->edit_window);
}
/* Delete the resource from the inventory */
path = gtk_tree_model_get_path(model, &iter);
gwy_inventory_delete_item(inventory, name);
selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(editor->treeview));
gtk_tree_selection_select_path(selection, path);
gtk_tree_path_free(path);
gwy_resource_delete(resource);
}
static void
......@@ -512,56 +483,35 @@ gwy_resource_editor_name_edited(GwyResourceEditor *editor,
const gchar *strpath,
const gchar *text)
{
GwyResource *resource, *item;
GwyResource *resource;
GwyInventory *inventory;
GtkTreeModel *model;
GtkTreePath *path;
GtkTreeIter iter;
const gchar *s;
gchar *oldname, *newname, *oldfilename, *newfilename;
gboolean is_being_edited;
gwy_debug("path: <%s>, text: <%s>", strpath, text);
newname = g_newa(gchar, strlen(text)+1);
strcpy(newname, text);
g_strstrip(newname);
gwy_debug("newname: <%s>", newname);
gwy_resource_editor_commit(editor);
model = gtk_tree_view_get_model(GTK_TREE_VIEW(editor->treeview));
inventory = gwy_inventory_store_get_inventory(GWY_INVENTORY_STORE(model));
if (gwy_inventory_get_item(inventory, text))
return;
path = gtk_tree_path_new_from_string(strpath);
gtk_tree_model_get_iter(model, &iter, path);
gtk_tree_path_free(path);
gtk_tree_model_get(model, &iter, 0, &resource, -1);
s = gwy_resource_get_name(resource);
oldname = g_newa(gchar, strlen(s)+1);
strcpy(oldname, s);
gwy_debug("oldname: <%s>", oldname);
if (gwy_strequal(newname, oldname))
return;
inventory = gwy_inventory_store_get_inventory(GWY_INVENTORY_STORE(model));
item = gwy_inventory_get_item(inventory, newname);
if (item)
return;
is_being_edited = (editor->edited_resource
&& gwy_strequal(gwy_resource_get_name(resource),
editor->edited_resource->str));
gwy_resource_editor_commit(editor);
oldfilename = gwy_resource_build_filename(resource);
gwy_inventory_rename_item(inventory, oldname, newname);
newfilename = gwy_resource_build_filename(resource);
if (g_rename(oldfilename, newfilename) != 0) {
/* FIXME: GUIze this */
g_warning("Cannot rename resource file: %s to %s",
oldfilename, newfilename);
gwy_inventory_rename_item(inventory, newname, oldname);
}
g_free(oldfilename);
g_free(newfilename);
gwy_resource_rename(resource, text);
if (editor->edited_resource
&& gwy_strequal(oldname, editor->edited_resource->str)) {
g_string_assign(editor->edited_resource, newname);
if (is_being_edited) {
g_string_assign(editor->edited_resource, text);
gwy_resource_editor_update_title(editor);
}
gwy_resource_tree_view_set_active(editor->treeview, newname);
gwy_resource_tree_view_set_active(editor->treeview, text);
}
/**
......@@ -790,7 +740,7 @@ gwy_resource_editor_get_edited(GwyResourceEditor *editor)
* @settings_prefix: Settings prefix for saved state, filled by
* gwy_resource_editor_class_setup().
* @construct_treeview: Method to create the resource list widget, it is
* of the gwy_gradients_tree_view_new() signature.
* of the gwy_gradient_tree_view_new() signature.
* There are currently some hardcoded assumptions about
* the tree view columns, so it cannot be completely
* arbitrary.
......
/*
* $Id: toolbox-editor.c 20774 2018-01-29 13:01:55Z yeti-dn $
* $Id: toolbox-editor.c 20972 2018-04-23 13:29:23Z yeti-dn $
* Copyright (C) 2016-2018 David Necas (Yeti).
* E-mail: yeti@gwyddion.net.
*
......@@ -1589,9 +1589,8 @@ add_toolbox_group(GwyToolboxEditor *editor)
else
i = 0;
gwy_clear(&gspec, 1);
gspec.name = g_strdup("");
gspec.id = 0;
gspec.translatable = FALSE;
if (!edit_group_dialogue(editor, &gspec, G_MAXUINT)) {
g_free(gspec.name);
return;
......@@ -1962,6 +1961,7 @@ create_gwy_icon_list(GtkWidget *widget)
GWY_STOCK_FIND_PEAKS,
GWY_STOCK_FIT_SHAPE,
GWY_STOCK_FIX_ZERO,
GWY_STOCK_FLIP_DIAGONALLY,
GWY_STOCK_FLIP_HORIZONTALLY,
GWY_STOCK_FLIP_VERTICALLY,
GWY_STOCK_FRACTAL,
......@@ -2100,6 +2100,7 @@ create_gwy_icon_list(GtkWidget *widget)
GWY_STOCK_SYNTHETIC_BROWNIAN_MOTION,
GWY_STOCK_SYNTHETIC_COLUMNAR,
GWY_STOCK_SYNTHETIC_DIFFUSION,
GWY_STOCK_SYNTHETIC_DISCS,
GWY_STOCK_SYNTHETIC_DOMAINS,
GWY_STOCK_SYNTHETIC_FIBRES,
GWY_STOCK_SYNTHETIC_LATTICE,
......@@ -2124,6 +2125,7 @@ create_gwy_icon_list(GtkWidget *widget)
GWY_STOCK_UNROTATE,
GWY_STOCK_VALUE_INVERT,
GWY_STOCK_VOLUME,
GWY_STOCK_VOLUME_ARITHMETIC,
GWY_STOCK_VOLUME_CALIBRATE,
GWY_STOCK_VOLUME_DIMENSIONS,
GWY_STOCK_VOLUME_FD,
......