John Darrington [Sat, 3 Aug 2013 07:05:34 +0000 (09:05 +0200)]
Avoid deprecation warnings by use of gtk2 -> gtk3 wrapper macros.
Arguably this is somewhat kludgy. But it will reduce the number
of merge conflicts between master and gtk3 branches. After the
canonical branch has switched to gtk3, this commit can be reverted,
and the proper fixes applied.
Ben Pfaff [Fri, 2 Aug 2013 05:39:54 +0000 (22:39 -0700)]
pspp-sheet-view: Adapt to GTK+3 scrolling infrastructure.
Based on upstream GTK+3 changes to GtkTreeView.
There is something wrong, though, because column titles seem to have
disappeared, the display seems messed up on scrolling, and everything is
very slow for large files (the latter doesn't seem caused by this commit).
Ben Pfaff [Wed, 31 Jul 2013 05:17:33 +0000 (22:17 -0700)]
gtkxpaned: Fix bug introduced in earlier commit.
Commit 7bf0c4d57ce (gtkxpaned: Avoid deprecated gtk_widget_get_pointer().)
essentially replaced gtk_widget_get_pointer() by its implementation in
GTK+3, but it left out a part of the implementation that I didn't think
was needed. Without that part, though, dragging most of the handles fails
to properly track the mouse pointer. This commit fixes the problem.
Ben Pfaff [Tue, 30 Jul 2013 05:03:17 +0000 (22:03 -0700)]
gtkxpaned: Remove style code from gtk_xpaned_realize().
gtk_style_attach() is deprecated in GTK+3 and the migration guide says
that it is no longer needed. I guess it is possible that the
gtk_widget_set_style() call is somehow still needed, but I don't
understand the intent of that call and removing it seems to have no
visible effect.
John Darrington [Sun, 23 Jun 2013 10:07:56 +0000 (12:07 +0200)]
variable.c: New function var_set_width_and_formats
Added a new function to set the width and formats of a variable as
an atomic operation. This is necessary to allow values to re-interpreted
without going through an intermediate format and thereby perhaps loosing
information.
John Darrington [Sat, 22 Jun 2013 10:09:56 +0000 (12:09 +0200)]
Fix and simplify the code for converting variables between types
Before this commit, changing a variable from string to numeric or
vici-versa would cause all values of that variable to become SYSMIS.
This commit fixes this problem at least partially.
John Darrington [Sat, 22 Jun 2013 05:23:16 +0000 (07:23 +0200)]
dictionary.c: Added a WHAT argument to dict_var_changed callback
Defined some bitwise constants to indicate which aspect of a variable has
changed. Added an argument to the dict_var_changed callback taking an
argument which contains a combination of these types.
This is used in later commits to avoid the callback implementation having
to guess what exactly changed.
John Darrington [Sat, 22 Jun 2013 04:52:10 +0000 (06:52 +0200)]
variable.c: Add _quiet versions of the var_set_ methods and use in var_clone
var_clone doesn't need to provoke callbacks, since the new variable does not
(yet) have a dictionary hence the callbacks can do nothing. Also the callbacks
cause problems for later commits, since they themselves could call var_clone.
This change therefore defines _quiet versions of all the var_set methods, which
do not generate any callbacks, and uses those versions in the implementation
of var_clone.
Ben Pfaff [Thu, 13 Jun 2013 07:03:51 +0000 (00:03 -0700)]
INPUT PROGRAM: Use a separate dataset for the input program.
Without this change, INPUT PROGRAM uses the same dataset as the following
syntax. This usually is fine, but there's at least one case where it
doesn't work: if the INPUT PROGRAM defines a vector, then a following
proc_execute() without any intervening transformations causes
proc_execute() to follow a "fast path" where it skips running the procedure
but instead just does a few things, like clearing the set of vectors.
Unfortunately, this means that later when the input program is really run,
it doesn't have the vectors and accesses freed memory.
This commit switches to a different tactic. INPUT PROGRAM creates a
special session and dataset that are used only for the input program. This
keeps the dataset and the transformations used for the input program
separate from those used after the input program.
John Darrington [Tue, 28 May 2013 17:35:01 +0000 (19:35 +0200)]
PsppireOutputWindow: Draw the entire page instead of just the exposed area.
Gtk3 doesn't require (or provide the necessary information for) the drawn
widget to be cliped to the exposed area. So this change removes the clip
from the expose callback of the PsppireOutputWindow. It also removes some
functions which are now not necessary.