Resolve multiple compiler errors and warnings found on current toolchains.
Changes include:
- explicit type casts for subtype/base assignments
- legacy prototype cleanup
- test source fixes
- gail and CUPS backend build fixes
Restores successful compilation on current Linux systems.
Replace "stat struct" with "GStatBuf" and "stat" with "g_stat" where
appropriate to fix cross-platform issues, specifically on Windows.
Code should be identical on *nix but fixes some serious issues
on Windows:
- Field widths of "struct stat" are not constant on Windows.
If the stat function does not match the stat struct used
it will cause overwrites and undefined behavior
- The Windows stat function needs a properly encoded filename.
In many places we pass an UTF-8 encoded value which breaks as soon
as non-ASCII characters are involved.
https://bugzilla.gnome.org/show_bug.cgi?id=787772
Ditch two items that were white and so weren’t visible on our standard
theme anyway, and use the new space to test extra grid-mode properties.
Note if we do this then, as before, set the ListStore on the CB before
before appending to it, that (at least in GTK+ 3) gave warnings like:
Gtk-CRITICAL **: gtk_menu_attach: assertion 'left_attach < right_attach' failed
I didn’t look into that yet, but it may indicate that attaching items
vs. recognising their spans don’t occur in the correct order. For the
purposes of testing this, I just create the CB after filling its model.
We need floating-point division… Otherwise, only fully-on inputs can
produce any output. This fixes some of the colours wrongly being black.
While here, remove the unused rowstride variable, to shush a warning.
Also remove mentions of the old text convenience API from the docs,
and point to GtkComboBoxText instead.
(cherry picked from commit e7f51ef6a411dc4c784c3edc67df294288de3f75)
GtkComboBox now sports a construct-only "has-entry" property which
decides if it uses a GtkEntry to allow additional user input. Also
it has a new "entry-text-column" to fetch strings for the entry
from the model.
This patch deprecates the GtkComboBoxEntry and updates the rest of GTK+
to use the new semantics on GtkComboBox instead.
(cherry picked from commit 9612c648176378bf237ad0e1a8c6c995b0ca7c61)
gtk_notebook_set_window_creation_hook has been removed in GTK+ 3,
deprecate it here. gtk_notebook_get/set_group has been deprecated
in favour of the new gtk_notebook_get/set_group_name.
http://bugzilla.gnome.org/show_bug.cgi?id=630521
These functions will be gone in Gtk 3.0 and be replaced by Cairo
functions.
Includes not disabling deprecated functions in old widgets that aren't
going to be ported.