Skip to content
Commits on Source (18)
......@@ -68,7 +68,7 @@ Niv Levy <nivl2000@gmail.com>
Vinicius Barboza <vinicius.barboza@lnnano.cnpem.br>
Otsu thresholding.
Jeffrey J. Schwartz <schwartz@physics.ucla.edu>
WinSTM file import.
WinSTM and Anasys XML file import.
Christian Bühler <christian.buehler@uni-ulm.de>
Pygwy volume data processing module type and other volume data processing
improvements.
......
# $Id: Makefile.am 20680 2017-12-18 18:29:14Z yeti-dn $
# $Id: Makefile.am 21345 2018-08-27 18:48:04Z yeti-dn $
SUBDIRS = \
m4 \
......@@ -8,6 +8,7 @@ SUBDIRS = \
libgwydgets \
libgwymodule \
app \
gwyddion \
modules \
plugins \
po \
......
......@@ -14,7 +14,7 @@
@SET_MAKE@
# $Id: Makefile.am 20680 2017-12-18 18:29:14Z yeti-dn $
# $Id: Makefile.am 21345 2018-08-27 18:48:04Z yeti-dn $
VPATH = @srcdir@
am__is_gnu_make = { \
......@@ -92,9 +92,9 @@ build_triplet = @build@
host_triplet = @host@
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
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 \
am__aclocal_m4_deps = $(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/gwy-version.m4 \
$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/libtool.m4 \
......@@ -288,9 +288,6 @@ EXR_LIBS = @EXR_LIBS@
FFTW3_CFLAGS = @FFTW3_CFLAGS@
FFTW3_LIBS = @FFTW3_LIBS@
FGREP = @FGREP@
GCONFTOOL = @GCONFTOOL@
GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@
GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GIO_CFLAGS = @GIO_CFLAGS@
GIO_LIBS = @GIO_LIBS@
......@@ -490,6 +487,7 @@ SUBDIRS = \
libgwydgets \
libgwymodule \
app \
gwyddion \
modules \
plugins \
po \
......
2.52 (2018-11-14)
Application:
- Translations updated: Czech, French, Russian.
Libraries:
- libgwyddion: System exp10() is used as backend for our pow10() function when
the latter (obsolete one) is not provided by the system.
- libgwyddion: gwy_math_find_minimum_1d() termination condition was improved.
- libgwyddion: Function for measuring string width in a fixed font was added.
- libgwyprocess: GwyDataField function for mean square value was added.
- libgwyprocess: Broken Laplace exterior in gwy_data_field_ext_convolve()
was fixed. Laplace interpolation producing constant values for data of
very small absolute magnitude was corrected.
- libgwyprocess: gwy_data_field_find_regularization_sigma_for_psf() was
improved.
- libgwyprocess: gwy_data_field_deconvolve_regularized() is a bit faster now.
- libgwyprocess: PSF reconstruction using least squares problem solution was
added, with the corresponding sigma optimisation function.
- libgwyprocess: Rare crash inside gwy_data_field_fill_grain() was fixed.
- libgwyprocess: Row corrections (most of Align Rows) are available as library
functions.
- libgwyprocess: Functions for measuring dispersion when data field is taken
as a distribution.
- libgwyprocess: Pixel/voxel size functions for all regular data objects were
added.
- libgwyprocess: Brick z-axis calibration copying function was added.
- libgwyprocess: gwy_someting_assign() convenience macros were added for all
basic data objects.
- libgwyprocess: Simpler brick functions working with entire XY planes and
Z profiles. Arguments keep_offsets are actually implemented now. Summary
functions working in the XZ plane were fixed.
- libgwyprocess: Function for taking data field absolute value was added.
- libgwyprocess: Histogram-like functions possibly trying to create DataLines
with negative real size in edge cases were fixed.
- libgwydgets: GwyDataWindow shows value under mouse pointer also in base
(unprefixed) units.
- libgwydgets, libgwyapp: Off-screen graph rendering uses screen's default
visual instead of best which might not work.
- libgwyapp: Items in data browser can be renamed by plain double-click.
- libgwyapp: gwy_rect_selection_labels_fill() shows consistent real dimensions
and gives consistently the same isel for entire field and no selection
present.
- libgwyapp: Inverted assertion in gwy_app_wait_set_enabled() causing a
Critical warning was corrected.
Modules:
- Anasys XML (new): Imports Analysis studio XML (.axd) files.
- AFM Workshop spectra (new): Imports AFM workshop single point spectra.
- Nanosystemz (new): Imports Nanosystemz profilometry data files.
- Volume plane level (new): Simple levelling of volume data planes.
- Volume outliers (new): Removal of outliers in volume data planes.
- Deconvolve (new): Simple regularised deconvolution.
- Transfer function guess: Windowing option was added. Zoomed central part of
TF can be displayed and extracted. A second guess method was added, least
squares problem solution. Sigma fitting was improved. Various GUI
improvements.
- Volume transfer function: Improvements from the image module were integrated.
Regularisation parameter can be estimated per plane.
- Extend: New extended image dimensions are displayed. Masks and
presentations are extended correctly.
- Dimensions and Units (image and volume): New units are remembered and unit
change is applied when function is re-run non-interactively.
- VTK export: Z-scaling can be specified manually.
- Crop: Selection dimensions are always ediable when a data window is active.
- Grain statistics: The grain statistics table can be exported.
- Pygwy: Missing reference in gwy_app_file_load() was corrected.
- Line correct: Marking of rows with inverted sign (Mark Inverted Rows) added.
- Volume and image MFM recalculation: Warnings upon pressing Reset were fixed.
They can modify an existing image/volume data.
- Surffile: Micron symbols written using old MS DOS code pages are recognised.
- Volume Cut'n'Slice: Multiple-plane selection actually extracts several
different planes now.
- ACF 2D, PSDF 2D: Lines selected in the dialogue for profiles are also
selected in the output image.
- Nanoscope: Reading of text files, broken in 2.51, was fixed.
- Volumize layers: Preview image has actually the same dimensions as brick
XY plane now.
- Statistical quantities: Entropy was removed as too slow (use the separate
Entropy function), scan line discrepancy was added.
- Nanonis: Vertical flipping can be controlled via a settings value.
- Cross-correlation: The OK button is insensitive when no image to correlate
with is selected, fixing a crash when it was run with no second image.
- Measure lattice: Vector a₁ being printed second time as a₂ in exported
reports was corrected.
Other:
- Compilation: False positives in tests for supported gcc warning options were
hopefully fixed.
- Python: Python scripts were changed to explicitly say python2 in the shbang
lines instead of python. Standalone gwy module disables progress bars by
default.
- GConf: The obsolete GConf-based thumbnailer support was removed and its
schemas are no longer installed.
- Source code: Source files for gwyddion, the program, were moved from app to
separate directory gwyddion.
2.51 (2018-06-26)
Application:
- Translations updated: Brazilian Portugese, Czech, French, Russian.
......@@ -82,7 +179,7 @@ Modules:
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.
- Statistical 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
......@@ -169,10 +266,10 @@ Modules:
- ACF 2D: Has a GUI now, supports masking, can pre-level the data, extract
radial ACF profiles and calculate some statistical parameters.
- Filters tool: Mean value filter uses circular kernel instead of square.
- Statistical Quantities, Statistical Functions and Row/Column Statistics
- Statistical quantities, Statistical functions and Row/Column statistics
tools: Apply button is insensitive when ther is no curve, some repeated
recalculations were fixed.
- Statistics Quantities: Quantities Sp, Sv and Sz were added.
- Statistical 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 and for vertical placement character.
......@@ -262,8 +359,8 @@ Modules:
- Volume swap axes (new): Reorganises data to change X, Y, Z axis roles.
- Fibre synthesis (new): Generates images from randomly placed fibres.
- Mask noisify (new): Adds salt and/or pepper noise to the mask.
- Statistical functions tool: Masked one-dimensional ACF, HHCF, PSDF, DA and
CDA are available now. Area scale graph was added.
- Statistical functions: Masked one-dimensional ACF, HHCF, PSDF, DA and CDA are
available now. Area scale graph was added.
- JPK: Crash when QI/force map loading was cancelled during ‘Scanning files’
was fixed.
- Dimensions and Units: A rarely occurring freeze was fixed.
......@@ -509,8 +606,8 @@ Modules:
- Fit sphere: Was removed, use new Fit shape module instead.
- Row/column statistics tool: Masking support was added. The misguided fixed
resolution option was removed.
- Statistical quantities tool: Automatic selection of units and precision for
the displayed quantities was improved.
- Statistical quantities: Automatic selection of units and precision for the
displayed quantities was improved.
- XYZize: XYZ log is created for the new XYZ data, not volume data log.
- Pygwy: Containers can be directly indexed both by strings and integers
(quarks). Overrides for Container methods get_value() and set_value() were
......@@ -533,7 +630,7 @@ Modules:
- Grain statistics: The values are displayed with more significant digits.
- Raw XYZ import: No longer loses the first data point in the file.
- Graph cut: The ‘cut all’ setting is remembered, some GUI improvements.
- Cross correlate: Introduced weighting function, result smoothing and
- Cross-correlation: Introduced weighting function, result smoothing and
extension and back-correction according to the results.
- Nanonis: Mask of invalid values is correctly flipped with the data now.
- JPK: Support for single point spectroscopy was added.
......@@ -1005,7 +1102,7 @@ Modules:
profile, Drift correction: It is possible to select a target graph for the
curves.
- Arithmetic: Data fields 2 to 8 are remembered between invocations.
- Calibrate, Merge, Immerse, Attach Presentation, Cross-correlate, FFT, Mark
- Calibrate, Merge, Immerse, Attach Presentation, Cross-correlation, FFT, Mark
With, Mask by Correlation, Neural network training: Second image is
remembered between invocations.
- Immerse: Detail positions are remembered.
......@@ -1261,7 +1358,7 @@ Modules:
images was corrected.
- Spectral synthesis: Critical message/crash, occurring when some files were
loaded but no channel was active while invoking the function, was fixed.
- Cross-correlation: now allowing use of multiple channels and output of
- Cross-correlation: Now allowing use of multiple channels and output of
all the results together.
Other:
......@@ -1896,7 +1993,7 @@ Modules:
- MapVue: Support for old OptiCode files was added.
- Profile: Modified to display calibration data if present.
- Read value: Modified to display calibration data if present.
- Statistics: Modified to display calibration data if present.
- Statistical quantities: Modified to display calibration data if present.
- Statistical functions: Modified to display calibration data if present.
- DOS spectrum: Calculates absolute value of (dI/dU)/(I/U) and does not
removing the contact potential.
......@@ -1958,7 +2055,7 @@ Modules:
- Spectral synthesis: Generated data can be added to an existing surface.
- Mask Editor tool: New editing tools were added: paintbrush, eraser,
and bucket filling and unfilling.
- Statistical functions tool: Radially averaged ACF was added.
- Statistical functions: Radially averaged ACF was added.
- Arithmetic: Has a preview, expressions can work with mask values, units of
the result can be specified, the number of fields was increased to 8.
- Threshold: Renamed to Limit Range in the menus; can cut off outliers given
......@@ -2294,7 +2391,8 @@ Modules:
(in 2.12 Save button did both actions and Copy did not do anything).
- Nanoscope: Physical y-size is recalculated to conserve the pixel
y-size/x-size ratio in all files now. This affects non-square images.
- Stats tool: Angles are exported in degrees as stated, instead of radians.
- Statistical quantities: Angles are exported in degrees as stated, instead of
radians.
- HDF4 file: PSI files are flipped vertically to follow the convention.
- All tools: Somewhat inconsistent conversion between pixel and real
coordinates were unified.
......@@ -2430,8 +2528,8 @@ Modules:
- RHK SPM32 (SM2): Support for spectra was added.
- MI file: Reading of ASCII image files was actually implemented.
- Plugin-proxy: Memory overflow in dump file reading was fixed.
- Surf: Added export to Surf files
- stpfile: Improved support for extended source modes.
- Surffile: Surf files can be exported.
- STP file: Improved support for extended source modes.
2.9 (2007-10-19)
......@@ -2656,7 +2754,7 @@ Modules:
properly.
- Color Range tool: It is possible to set default color mapping type applied
when none is specifically set. Manual range setting was enabled.
- Statistical functions tool: Radial PSDF was added.
- Statistical functions: Radial PSDF was added.
- Mask editor tool: New option to prevent merging of grains by growing mask.
- Read Value: Can shift data values to make the currently selected point lie
on the zero plane.
......@@ -2792,8 +2890,8 @@ Modules:
- Nanonis: Import of non-square images was hopefully fixed.
- Convolution filter: Minor user interface fixes.
- Edge: Laplacian no longer clears border lines of pixels of output.
- Statistical functions tool: The labels on x and y axes match how the
quantities are denoted in the user guide.
- Statistical functions: The labels on x and y axes match how the quantities
are denoted in the user guide.
Other:
- Unix compilation: Confusion between AM_FOO and FOO variables in makefiles was
......
......@@ -34,6 +34,7 @@ Subdir dependencies (fully resolved):
libgwydgets: libgwyddion libprocess libdraw
libgwymodule: libgwyddion libprocess libdraw libgwydgets
app: libgwyddion libprocess libdraw libgwydgets libgwymodule
gwyddion: libgwyddion libprocess libdraw libgwydgets libgwymodule app
modules: libgwyddion libprocess libdraw libgwydgets libgwymodule app
devel-docs: libgwyddion libprocess libdraw libgwydgets libgwymodule app
po: libdraw libgwydgets libgwymodule app modules
......@@ -46,7 +47,8 @@ Subdir contents:
libdraw: Gwyddion drawing library
libgwydgets: Gwyddion widget library
libgwymodule: Gwyddion module library
app: Gwyddion application library (libgwyapp), main application
app: Gwyddion application library
gwyddion: Main program (gwyddion)
modules: Standard modules (file, graph, layer, process, tool, ...)
plugins: Standard and sample plug-ins (file, process)
thumbnailer: Tool for creating thumbnails of SPM data
......
......@@ -2545,7 +2545,6 @@ AC_SUBST([am__tar])
AC_SUBST([am__untar])
]) # _AM_PROG_TAR
m4_include([m4/gconf-2.m4])
m4_include([m4/gettext.m4])
m4_include([m4/glibc21.m4])
m4_include([m4/gtk-doc.m4])
......
# $Id: Makefile.am 21207 2018-06-25 09:29:12Z yeti-dn $
# $Id: Makefile.am 21624 2018-11-13 13:48:03Z yeti-dn $
libgwyddion = $(top_builddir)/libgwyddion/libgwyddion2.la
libgwymodule = $(top_builddir)/libgwymodule/libgwymodule2.la
......@@ -7,8 +7,6 @@ libgwydraw = $(top_builddir)/libdraw/libgwydraw2.la
libgwydgets = $(top_builddir)/libgwydgets/libgwydgets2.la
libgwyapp2includedir = $(pkgincludedir)/app
uidatadir = $(pkgdatadir)/ui
if MODULE_DEPENDENCIES
libgwyapp_libadd = \
......@@ -47,23 +45,11 @@ libgwyapp2include_HEADERS = \
wait.h
noinst_HEADERS = \
mac_integration.h\
authors.h \
gwyappfilechooser.h \
gwyappinternal.h \
gwyddion.h \
release.h \
toolbox.h
uidata_DATA = toolbox.xml
gwyappinternal.h
bin_PROGRAMS = gwyddion
lib_LTLIBRARIES = libgwyapp2.la
BUILT_SOURCES = \
authors.h \
release.h
if OS_MSWIN
no_undefined = -no-undefined
export_symbols = -export-symbols libgwyapp2.def
......@@ -72,11 +58,10 @@ libgwyapp2_la_DEPENDENCIES = libgwyapp2.def
endif
# Must init
EXTRA_DIST = \
README.objdata \
toolbox.xml
EXTRA_DIST =
CLEANFILES = libgwyapp2.def
MAINTAINERCLEANFILES =
BUILT_SOURCES =
MKENUM_NAME = gwyapptypes
MKENUM_ID = GWY_APP_TYPES
......@@ -107,20 +92,16 @@ libgwyapp2.def: $(libgwyapp2_la_OBJECTS)
| awk -F' ' '($$2=="T" && $$3 ~ /^gwy_/){print " ",$$3}'; \
done | sort >>libgwyapp2.def
AM_CFLAGS = $(darwin_cflags) @GTK_MAC_CFLAGS@ @FFTW3_CFLAGS@ @UNIQUE_CFLAGS@ @COMMON_CFLAGS@ @GIO_CFLAGS@
AM_CPPFLAGS = -I$(top_srcdir)
AM_LDFLAGS = $(darwin_ldflags)
# In following order do:
# Any code change C: R++: A
# Any iface change C++: 0: A
# Adding ifaces C: R: A++
# Changing ifaces C: R: 0
libversion = -version-info 21:0:21
libversion = -version-info 21:1: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)
libgwyapp2_la_LIBADD = $(libgwyapp_libadd)
AM_CFLAGS = @COMMON_CFLAGS@ @GIO_CFLAGS@
AM_LDFLAGS = @GTKGLEXT_LIBS@ @GIO_LIBS@ @BASIC_LIBS@ $(win32_libs) -export-dynamic $(no_undefined) $(export_symbols) $(libversion) $(libgwyapp_libadd)
AM_CPPFLAGS = -DG_LOG_DOMAIN=\"GwyApp\" -I$(top_srcdir)
libgwyapp2_la_SOURCES = \
app.c \
......@@ -150,37 +131,5 @@ libgwyapp2_la_SOURCES = \
validate.c \
wait.c
gwyddion_SOURCES = \
about.c \
gwyddion.c \
mac_integration.c \
remote.c \
remote-unique.c \
remote-win32.c \
remote-x11.c \
splash.c \
tips.c \
toolbox.c \
toolbox-editor.c \
toolbox-spec.c
gwyddion_LDADD = @COMMON_LDFLAGS@ @GTK_MAC_LIBS@ @GTKGLEXT_LIBS@ @FFTW3_LIBS@ @UNIQUE_LIBS@ @GIO_LIBS@ @BASIC_LIBS@ $(LIBXMU) \
libgwyapp2.la \
$(libgwymodule) \
$(libgwydgets) \
$(libgwydraw) \
$(libgwyprocess) \
$(libgwyddion)
if MAINTAINER_MODE
authors.h: ${top_srcdir}/AUTHORS $(top_srcdir)/utils/gen-authors.py
$(AM_V_GEN)$(PYTHON) $(top_srcdir)/utils/gen-authors.py $(top_srcdir)/AUTHORS header >authors.h
release.h: ${top_srcdir}/NEWS Makefile $(top_builddir)/config.h
$(AM_V_GEN)echo '/* This is a 'GENERATED' file. */' >release.h
$(AM_V_at)echo '/*< private_header >*/' >>release.h
$(AM_V_at)sed -n 1p ${top_srcdir}/NEWS | sed -e 's/^.*(/#define RELEASEDATE 0x/' -e 's/)/u/' -e 's/-//g' >>release.h
endif
clean-local:
rm -f core.* *~
This diff is collapsed.
Data set on various gwyddion objects by main app (g_object_set_data()).
May change, namely many may get some "gwy-app-" prefix.
Toolbox (gwy_app_main_window_get()):
"accel_group": The toolbox's main accelerator group
Process menu:
"gwy-app-menu-repeat-last": Menu item representing repeat-last
"gwy-app-menu-reshow-last": Menu item representing reshow-last
`Recent Files' menu items:
"filename": The file name
Toolbar show/hide buttons:
"arrow": The arrow widget
"key": Settings key holding visibility for this toolbox
("/app/toolbox/visible/SOMETHING")
Data Containers:
"metadata-browser" If set, there is already a metadata browser active for
this data and the pointer is its window widget.
# $Id: README.objdata 20681 2017-12-18 18:37:24Z yeti-dn $
/*
* $Id: app.c 20678 2017-12-18 18:26:55Z yeti-dn $
* $Id: app.c 21435 2018-09-11 12:39:53Z yeti-dn $
* Copyright (C) 2003-2006,2013-2017 David Necas (Yeti), Petr Klapetek.
* E-mail: yeti@gwyddion.net, klapetek@gwyddion.net.
*
......@@ -241,20 +241,23 @@ gwy_app_main_window_get(void)
/**
* gwy_app_main_window_set:
* @window: A window.
* @window: A window, presumably the Gwyddion toolbox.
*
* Sets the main application window.
*
* Sets Gwyddion main application window (toolbox) for
* gwy_app_main_window_get().
* This function is probably only useful in Gwyddion itself and should be
* ignored.
*
* This function can be called only once and should be called at Gwyddion
* startup so, ignore it.
* It needs to be called exactly once at Gwyddion startup.
* It restores the toolbox position and makes gwy_app_main_window_get() work.
**/
void
gwy_app_main_window_set(GtkWidget *window)
{
g_return_if_fail(GTK_IS_WINDOW(window));
if (gwy_app_main_window && window != gwy_app_main_window) {
g_critical("Trying to change app main window");
g_critical("The main window was already set to %p.",
gwy_app_main_window);
return;
}
......@@ -1684,52 +1687,25 @@ change_brick_preview(GwyDataWindow *data_window)
return;
}
if (type == BRICK_PREVIEW_MEAN) {
gwy_brick_mean_plane(brick, preview,
0, 0, 0,
brick->xres, brick->yres, -1,
TRUE);
}
else if (type == BRICK_PREVIEW_MINIMUM) {
gwy_brick_min_plane(brick, preview,
0, 0, 0,
brick->xres, brick->yres, -1,
TRUE);
}
else if (type == BRICK_PREVIEW_MAXIMUM) {
gwy_brick_max_plane(brick, preview,
0, 0, 0,
brick->xres, brick->yres, -1,
TRUE);
}
else if (type == BRICK_PREVIEW_MINPOS) {
gwy_brick_minpos_plane(brick, preview,
0, 0, 0,
brick->xres, brick->yres, -1,
TRUE);
}
else if (type == BRICK_PREVIEW_MAXPOS) {
gwy_brick_maxpos_plane(brick, preview,
0, 0, 0,
brick->xres, brick->yres, -1,
TRUE);
}
else if (type == BRICK_PREVIEW_RMS) {
gwy_brick_rms_plane(brick, preview,
0, 0, 0,
brick->xres, brick->yres, -1,
TRUE);
}
if (type == BRICK_PREVIEW_MEAN)
gwy_brick_mean_xy_plane(brick, preview);
else if (type == BRICK_PREVIEW_MINIMUM)
gwy_brick_min_xy_plane(brick, preview);
else if (type == BRICK_PREVIEW_MAXIMUM)
gwy_brick_max_xy_plane(brick, preview);
else if (type == BRICK_PREVIEW_MINPOS)
gwy_brick_minpos_xy_plane(brick, preview);
else if (type == BRICK_PREVIEW_MAXPOS)
gwy_brick_maxpos_xy_plane(brick, preview);
else if (type == BRICK_PREVIEW_RMS)
gwy_brick_rms_xy_plane(brick, preview);
else if (type == BRICK_PREVIEW_CHANNEL) {
GQuark quark = gwy_app_get_data_key_for_id(cid);
GObject *field = gwy_container_get_object(cdata, quark);
gwy_serializable_clone(field, G_OBJECT(preview));
gwy_data_field_assign(preview, field);
}
else if (type == BRICK_PREVIEW_SECTION)
gwy_brick_extract_plane(brick, preview,
0, 0, level,
brick->xres, brick->yres, -1,
TRUE);
gwy_brick_extract_xy_plane(brick, preview, level);
else {
g_return_if_reached();
}
......
/*
* $Id: app.h 20678 2017-12-18 18:26:55Z yeti-dn $
* Copyright (C) 2003-2006 David Necas (Yeti), Petr Klapetek.
* $Id: app.h 21392 2018-09-05 07:53:07Z yeti-dn $
* Copyright (C) 2003-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
......@@ -38,6 +38,7 @@ void gwy_app_restore_window_position (GtkWindow *window,
const gchar *prefix,
gboolean grow_only);
GtkWidget* gwy_app_main_window_get (void);
void gwy_app_main_window_set (GtkWidget *window);
void gwy_app_data_view_change_mask_color(GwyDataView *data_view);
gboolean gwy_app_quit (void);
void gwy_app_init_widget_styles (void);
......
/*
* $Id: data-browser-aux.c 20848 2018-03-16 09:41:01Z yeti-dn $
* $Id: data-browser-aux.c 21430 2018-09-11 11:46:00Z yeti-dn $
* Copyright (C) 2006-2016 David Necas (Yeti), Petr Klapetek.
* E-mail: yeti@gwyddion.net, klapetek@gwyddion.net.
*
......@@ -2287,7 +2287,7 @@ _gwy_app_create_brick_preview_field(GwyBrick *brick)
GwyDataField *preview = gwy_data_field_new(xres, yres, xreal, yreal,
FALSE);
gwy_brick_mean_plane(brick, preview, 0, 0, 0, xres, yres, -1, FALSE);
gwy_brick_mean_xy_plane(brick, preview);
return preview;
}
......@@ -2626,9 +2626,9 @@ gwy_app_get_graph_thumbnail(GwyContainer *data,
if (!gtk_main_level())
return NULL;
visual = gdk_visual_get_best();
visual = gdk_visual_get_system();
g_return_val_if_fail(visual, NULL);
cmap = gdk_colormap_new(visual, FALSE);
cmap = gdk_colormap_get_system();
g_return_val_if_fail(cmap, NULL);
width = MAX(width, max_width);
......
This diff is collapsed.
/*
* $Id: file.c 20678 2017-12-18 18:26:55Z yeti-dn $
* $Id: file.c 21363 2018-08-28 14:39:00Z yeti-dn $
* Copyright (C) 2003-2006 David Necas (Yeti), Petr Klapetek.
* E-mail: yeti@gwyddion.net, klapetek@gwyddion.net.
*
......@@ -131,6 +131,8 @@ gwy_app_set_current_directory(const gchar *directory)
* load fails, an error dialog is presented.
*
* Returns: Container of the just loaded file on success, %NULL on failure.
* The caller does not own the reference, the container is only
* owned by the data browser.
**/
GwyContainer*
gwy_app_file_load(const gchar *filename_utf8,
......
/*
* $Id: gwyappinternal.h 20678 2017-12-18 18:26:55Z yeti-dn $
* Copyright (C) 2004-2016 David Necas (Yeti), Petr Klapetek.
* $Id: gwyappinternal.h 21392 2018-09-05 07:53:07Z yeti-dn $
* Copyright (C) 2004-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
......@@ -116,10 +116,6 @@ typedef struct {
gchar *message;
} GwyAppLogMessage;
/* XXX: Bad name. Cannot fix it because according to the rules it is now
* public API. */
void gwy_app_main_window_set (GtkWidget *window);
G_GNUC_INTERNAL
gint _gwy_app_get_n_recent_files (void);
......
/*
* $Id: gwymoduleutils-file.c 21151 2018-06-15 08:18:55Z yeti-dn $
* $Id: gwymoduleutils-file.c 21435 2018-09-11 12:39:53Z yeti-dn $
* Copyright (C) 2007-2016 David Necas (Yeti), Petr Klapetek.
* E-mail: yeti@gwyddion.net, klapetek@gwyddion.net.
*
......@@ -237,7 +237,6 @@ gwy_app_xyz_title_fall_back(GwyContainer *data,
guint
gwy_app_channel_remove_bad_data(GwyDataField *dfield, GwyDataField *mfield)
{
GwySIUnit *funit, *munit;
gdouble *m = gwy_data_field_get_data(mfield);
guint i, mcount, n;
......@@ -257,9 +256,8 @@ gwy_app_channel_remove_bad_data(GwyDataField *dfield, GwyDataField *mfield)
gwy_data_field_set_xreal(mfield, gwy_data_field_get_xreal(dfield));
gwy_data_field_set_yreal(mfield, gwy_data_field_get_yreal(dfield));
funit = gwy_data_field_get_si_unit_xy(dfield);
munit = gwy_data_field_get_si_unit_xy(mfield);
gwy_serializable_clone(G_OBJECT(funit), G_OBJECT(munit));
gwy_si_unit_assign(gwy_data_field_get_si_unit_xy(mfield),
gwy_data_field_get_si_unit_xy(dfield));
gwy_debug("mcount = %u", mcount);
......
/*
* $Id: gwymoduleutils.c 20833 2018-03-13 10:52:02Z yeti-dn $
* $Id: gwymoduleutils.c 21435 2018-09-11 12:39:53Z yeti-dn $
* Copyright (C) 2007-2018 David Necas (Yeti), Petr Klapetek.
* E-mail: yeti@gwyddion.net, klapetek@gwyddion.net.
*
......@@ -788,8 +788,8 @@ gwy_preview_surface_to_datafield(GwySurface *surface,
gwy_data_field_average_xyz(dfield, densitymap,
gwy_surface_get_data_const(surface), n);
gwy_serializable_clone(G_OBJECT(gwy_surface_get_si_unit_xy(surface)),
G_OBJECT(gwy_data_field_get_si_unit_xy(dfield)));
gwy_si_unit_assign(gwy_data_field_get_si_unit_xy(dfield),
gwy_surface_get_si_unit_xy(surface));
if (want_densitymap) {
gwy_data_field_copy(densitymap, dfield, FALSE);
......@@ -797,8 +797,8 @@ gwy_preview_surface_to_datafield(GwySurface *surface,
gwy_si_unit_set_from_string(gwy_data_field_get_si_unit_z(dfield), NULL);
}
else {
gwy_serializable_clone(G_OBJECT(gwy_surface_get_si_unit_z(surface)),
G_OBJECT(gwy_data_field_get_si_unit_z(dfield)));
gwy_si_unit_assign(gwy_data_field_get_si_unit_z(dfield),
gwy_surface_get_si_unit_z(surface));
}
}
......
/*
* $Id: gwyplaintool.c 20678 2017-12-18 18:26:55Z yeti-dn $
* Copyright (C) 2006,2014 David Necas (Yeti), Petr Klapetek.
* $Id: gwyplaintool.c 21343 2018-08-27 14:28:40Z yeti-dn $
* Copyright (C) 2006-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
......@@ -1223,17 +1223,27 @@ gwy_rect_selection_labels_fill(GwyRectSelectionLabels *rlabels,
sel[2] = gwy_data_field_get_xreal(dfield);
sel[3] = gwy_data_field_get_yreal(dfield);
isel[0] = isel[1] = 0;
isel[2] = xres;
isel[3] = yres;
isel[2] = xres-1;
isel[3] = yres-1;
}
sel[0] = gwy_data_field_jtor(dfield, isel[0]);
sel[1] = gwy_data_field_jtor(dfield, isel[1]);
sel[2] = gwy_data_field_jtor(dfield, isel[2]+1);
sel[3] = gwy_data_field_jtor(dfield, isel[3]+1);
/* Provide sorted real and pixel selection to the caller; but before we
* add offsets and convert to position & size. The documentation has
* always said min and max pixel coordinates, so we must have res-1 there
* for full-size selections. */
if (selreal)
gwy_assign(selreal, sel, 4);
if (selpix)
gwy_assign(selpix, isel, 4);
sel[2] -= sel[0];
sel[3] -= sel[1];
isel[2] -= isel[0] - 1;
isel[3] -= isel[1] - 1;
sel[0] += xoff;
sel[1] += yoff;
......@@ -1247,9 +1257,6 @@ gwy_rect_selection_labels_fill(GwyRectSelectionLabels *rlabels,
}
gwy_si_unit_value_format_free(vf);
isel[2] -= isel[0] - 1;
isel[3] -= isel[1] - 1;
gtk_spin_button_set_range(rlabels->pix[RLABEL_X], 0.0, xres - 1.0);
gtk_spin_button_set_range(rlabels->pix[RLABEL_W], 2.0, xres - isel[0]);
gtk_spin_button_set_range(rlabels->pix[RLABEL_Y], 0.0, yres - 1.0);
......
/*
* $Id: wait.c 20678 2017-12-18 18:26:55Z yeti-dn $
* Copyright (C) 2004-2017 David Necas (Yeti), Petr Klapetek.
* $Id: wait.c 21526 2018-10-28 09:01:13Z yeti-dn $
* Copyright (C) 2004-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
......@@ -155,8 +155,12 @@ gwy_app_wait_create_dialog(GtkWindow *window,
*
* This function lets the Gtk+ main loop to run.
*
* It must not be called again once the operation is cancelled, i.e. after
* any of the progress reporting functions return %FALSE.
*
* Returns: %TRUE if the operation can continue, %FALSE if user cancelled it
* meanwhile.
* meanwhile. You must always check the return value and cancel
* the operation if it is %FALSE.
**/
gboolean
gwy_app_wait_set_message(const gchar *message)
......@@ -198,8 +202,12 @@ gwy_app_wait_set_message(const gchar *message)
*
* This function lets the Gtk+ main loop to run.
*
* It must not be called again once the operation is cancelled, i.e. after
* any of the progress reporting functions return %FALSE.
*
* Returns: %TRUE if the operation can continue, %FALSE if user cancelled it
* meanwhile.
* meanwhile. You must always check the return value and cancel
* the operation if it is %FALSE.
**/
gboolean
gwy_app_wait_set_message_prefix(const gchar *prefix)
......@@ -235,8 +243,12 @@ gwy_app_wait_set_message_prefix(const gchar *prefix)
* fearing that the program will spend all time updating the GUI and no time in
* the calculation.
*
* It must not be called again once the operation is cancelled, i.e. after
* any of the progress reporting functions return %FALSE.
*
* Returns: %TRUE if the operation can continue, %FALSE if user cancelled it
* meanwhile.
* meanwhile. You must always check the return value and cancel
* the operation if it is %FALSE.
**/
gboolean
gwy_app_wait_set_fraction(gdouble fraction)
......@@ -402,8 +414,8 @@ gwy_app_wait_set_enabled(gboolean setting)
if (!wait_enabled == !setting)
return;
g_return_if_fail(dialog);
g_return_if_fail(cancelled);
g_return_if_fail(!dialog);
g_return_if_fail(!cancelled);
wait_enabled = !!setting;
}
......@@ -412,7 +424,7 @@ gwy_app_wait_set_enabled(gboolean setting)
*
* Checks if a progress dialog was cancelled.
*
* Calling this function is only meaningful between gwy_app_wait_cursor_start()
* Calling this function is only meaningful between gwy_app_wait_start()
* and gwy_app_wait_finish(). It returns %TRUE if the computation was
* cancelled by the user. This may be occasionaly useful in complex
* multi-level calculations. Usually, the return values of
......
/*
* $Id: wait.h 20678 2017-12-18 18:26:55Z yeti-dn $
* Copyright (C) 2004-2017 David Necas (Yeti), Petr Klapetek.
* $Id: wait.h 21407 2018-09-07 13:07:11Z yeti-dn $
* Copyright (C) 2004-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
......@@ -29,9 +29,9 @@ G_BEGIN_DECLS
void gwy_app_wait_start (GtkWindow *window,
const gchar *message);
void gwy_app_wait_finish (void);
gboolean gwy_app_wait_set_fraction (gdouble fraction);
gboolean gwy_app_wait_set_message (const gchar *message);
gboolean gwy_app_wait_set_message_prefix(const gchar *prefix);
gboolean gwy_app_wait_set_fraction (gdouble fraction) G_GNUC_WARN_UNUSED_RESULT;
gboolean gwy_app_wait_set_message (const gchar *message) G_GNUC_WARN_UNUSED_RESULT;
gboolean gwy_app_wait_set_message_prefix(const gchar *prefix) G_GNUC_WARN_UNUSED_RESULT;
void gwy_app_wait_cursor_start (GtkWindow *window);
void gwy_app_wait_cursor_finish (GtkWindow *window);
gboolean gwy_app_wait_get_enabled (void);
......