Compare commits
96 Commits
fix_gtklay
...
gtk-multih
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
75c92d9e3e | ||
|
|
9b6ddad17e | ||
|
|
dcd3ef4055 | ||
|
|
85bfb30534 | ||
|
|
1773bb92b5 | ||
|
|
3fc9d614f1 | ||
|
|
9f685de755 | ||
|
|
3851491d9a | ||
|
|
77972d13e9 | ||
|
|
d01a255508 | ||
|
|
6ab8b0bd94 | ||
|
|
caa10a8453 | ||
|
|
1f59549db6 | ||
|
|
3bf0667168 | ||
|
|
5558fb5ceb | ||
|
|
7c55cfdfd1 | ||
|
|
75a8bd5fa2 | ||
|
|
c7d1a2e836 | ||
|
|
bb18a4abd0 | ||
|
|
8baf9adaa0 | ||
|
|
a99d8aa2ae | ||
|
|
0fcfca698d | ||
|
|
f4425feb4c | ||
|
|
e338e7d304 | ||
|
|
b40f48e86e | ||
|
|
9bc498eb52 | ||
|
|
951dd5dce8 | ||
|
|
7182f8e51a | ||
|
|
e7eb55d954 | ||
|
|
b5a3e20cc7 | ||
|
|
9e14846cd6 | ||
|
|
3d41b6dc9b | ||
|
|
7064f497e1 | ||
|
|
6352ace501 | ||
|
|
40df0aeb9b | ||
|
|
4cbeb803b3 | ||
|
|
f99cca8b87 | ||
|
|
165583bfda | ||
|
|
3aca27e818 | ||
|
|
68cb350f9d | ||
|
|
b2b9cc6783 | ||
|
|
d9395c7ef9 | ||
|
|
9886d3abfa | ||
|
|
5940e5f836 | ||
|
|
e5c6f92bf6 | ||
|
|
7f7b6e30c4 | ||
|
|
9dd35b1f0e | ||
|
|
2ef7ef1b16 | ||
|
|
08b0b80362 | ||
|
|
061c766e2b | ||
|
|
bd92619e9d | ||
|
|
fcc780f378 | ||
|
|
a1525ddf07 | ||
|
|
9cde6f277f | ||
|
|
6fa05332de | ||
|
|
996e355971 | ||
|
|
024eb4a6e4 | ||
|
|
a880dd2679 | ||
|
|
4f43fcd1a6 | ||
|
|
70af5e16a1 | ||
|
|
5ca448422a | ||
|
|
873bdc26a6 | ||
|
|
5e8e3f407e | ||
|
|
8ce4276208 | ||
|
|
e47807fbe1 | ||
|
|
255695f76f | ||
|
|
21c08e6440 | ||
|
|
8320e60ebd | ||
|
|
d4497ca21e | ||
|
|
97f7b5c9b3 | ||
|
|
f6ce455ecf | ||
|
|
a6d425470a | ||
|
|
5be19317ae | ||
|
|
3f23a87d82 | ||
|
|
be4d275bed | ||
|
|
e2b1a43f10 | ||
|
|
041053cb97 | ||
|
|
84902b6fd8 | ||
|
|
d66df2f988 | ||
|
|
845b1f3211 | ||
|
|
8ba19314c6 | ||
|
|
c5faaf2132 | ||
|
|
a9cec4e3d0 | ||
|
|
cbdedb210d | ||
|
|
4e71d42920 | ||
|
|
7ef95bf051 | ||
|
|
73f340ea73 | ||
|
|
bb0b5342c9 | ||
|
|
24b845f8f6 | ||
|
|
f7d0a21a2b | ||
|
|
86f52bfd26 | ||
|
|
63f140c9c8 | ||
|
|
d47c6f30ff | ||
|
|
565b8c42d4 | ||
|
|
6768cfdf2f | ||
|
|
28314a4bf1 |
37
.cvsignore
Normal file
@@ -0,0 +1,37 @@
|
||||
*.lo
|
||||
config.log
|
||||
config.h
|
||||
config.h.in
|
||||
libtool
|
||||
config.status
|
||||
stamp-h
|
||||
stamp-h1
|
||||
Makefile
|
||||
Makefile.in
|
||||
aclocal.m4
|
||||
configure
|
||||
config.h.win32
|
||||
gtk-config-2.0
|
||||
config.cache
|
||||
ABOUT-NLS
|
||||
intl
|
||||
stamp-h.in
|
||||
gtk+.spec
|
||||
gtk+-2.0.pc
|
||||
gtk+-2.0-uninstalled.pc
|
||||
gtk+-linux-fb-2.0.pc
|
||||
gtk+-nanox-2.0.pc
|
||||
gtk+-x11-2.0.pc
|
||||
gdk-2.0.pc
|
||||
gdk-2.0-uninstalled.pc
|
||||
gdk-linux-fb-2.0.pc
|
||||
gdk-nanox-2.0.pc
|
||||
gdk-x11-2.0.pc
|
||||
gdk-pixbuf-2.0.pc
|
||||
gdk-pixbuf-2.0-uninstalled.pc
|
||||
gtk-zip.sh
|
||||
missing
|
||||
install-sh
|
||||
mkinstalldirs
|
||||
sgml
|
||||
autom4te.cache
|
||||
@@ -1,77 +0,0 @@
|
||||
stages:
|
||||
- build
|
||||
- docs
|
||||
|
||||
cache:
|
||||
paths:
|
||||
- _ccache/
|
||||
|
||||
fedora-distcheck:
|
||||
image: registry.gitlab.gnome.org/gnome/gtk/fedora-gtk3:v3
|
||||
variables:
|
||||
DO_DISTCHECK: "yes"
|
||||
when: manual
|
||||
stage: build
|
||||
script:
|
||||
- bash -x ./.gitlab-ci/test-docker-meson.sh
|
||||
|
||||
fedora-meson:
|
||||
image: registry.gitlab.gnome.org/gnome/gtk/fedora-gtk3:v3
|
||||
stage: build
|
||||
variables:
|
||||
EXTRA_MESON_FLAGS: "-Ddefault_library=both"
|
||||
script:
|
||||
- bash -x ./.gitlab-ci/test-docker-meson.sh
|
||||
artifacts:
|
||||
when: always
|
||||
name: "gtk3-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
|
||||
paths:
|
||||
- "_build/meson-logs"
|
||||
- "_build/testsuite/reftests/output"
|
||||
|
||||
debian-meson:
|
||||
image: registry.gitlab.gnome.org/gnome/gtk/debian-gtk3:v2
|
||||
stage: build
|
||||
variables:
|
||||
EXTRA_MESON_FLAGS: "-Ddefault_library=both"
|
||||
script:
|
||||
- bash -x ./.gitlab-ci/test-docker-meson.sh
|
||||
artifacts:
|
||||
when: always
|
||||
name: "gtk3-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
|
||||
paths:
|
||||
- "_build/meson-logs"
|
||||
- "_build/testsuite/reftests/output"
|
||||
|
||||
reference:
|
||||
image: registry.gitlab.gnome.org/gnome/gtk/fedora-gtk3:v3
|
||||
stage: docs
|
||||
variables:
|
||||
EXTRA_MESON_FLAGS: "--buildtype=release -Dgtk_doc=true -Dman=true"
|
||||
script:
|
||||
- bash -x ./.gitlab-ci/test-docker-meson.sh
|
||||
- ninja -C _build gdk3-doc gtk3-doc
|
||||
- tar -c -J -f gdk3-docs.tar.xz _build/docs/reference/gdk
|
||||
- tar -c -J -f gtk3-docs.tar.xz _build/docs/reference/gtk
|
||||
artifacts:
|
||||
paths:
|
||||
- gdk3-docs.tar.xz
|
||||
- gtk3-docs.tar.xz
|
||||
|
||||
msys2-mingw64-meson:
|
||||
variables:
|
||||
MSYSTEM: "MINGW64"
|
||||
CHERE_INVOKING: "yes"
|
||||
stage: build
|
||||
tags:
|
||||
- win32-ps
|
||||
script:
|
||||
- C:\msys64\usr\bin\pacman --noconfirm -Syyuu
|
||||
- C:\msys64\usr\bin\bash -lc "bash -x ./.gitlab-ci/test-msys2-meson.sh"
|
||||
artifacts:
|
||||
when: always
|
||||
name: "gtk3-${env:CI_JOB_NAME}-${env:CI_COMMIT_REF_NAME}"
|
||||
paths:
|
||||
- "_build/meson-logs"
|
||||
- "_build/gdk/libgdk-3-0.dll"
|
||||
- "_build/gtk/libgtk-3-0.dll"
|
||||
@@ -1,71 +0,0 @@
|
||||
FROM debian:bullseye
|
||||
|
||||
RUN apt-get update -qq && apt-get install --no-install-recommends -qq -y \
|
||||
adwaita-icon-theme \
|
||||
ccache \
|
||||
dconf-gsettings-backend \
|
||||
g++ \
|
||||
gcc \
|
||||
gettext \
|
||||
git \
|
||||
gobject-introspection \
|
||||
gvfs \
|
||||
hicolor-icon-theme \
|
||||
itstool \
|
||||
libatk-bridge2.0-dev \
|
||||
libatk1.0-dev \
|
||||
libc6-dev \
|
||||
libcairo2-dev \
|
||||
libcairo-gobject2 \
|
||||
libcolord-dev \
|
||||
libcups2-dev \
|
||||
libegl1-mesa-dev \
|
||||
libepoxy-dev \
|
||||
libfontconfig1-dev \
|
||||
libfreetype6-dev \
|
||||
libgdk-pixbuf2.0-dev \
|
||||
libgirepository1.0-dev \
|
||||
libglib2.0-dev \
|
||||
libharfbuzz-dev \
|
||||
libjson-glib-dev \
|
||||
libpango1.0-dev \
|
||||
librest-dev \
|
||||
librsvg2-common \
|
||||
libsoup2.4-dev \
|
||||
libwayland-dev \
|
||||
libx11-dev \
|
||||
libxcomposite-dev \
|
||||
libxcursor-dev \
|
||||
libxdamage-dev \
|
||||
libxext-dev \
|
||||
libxfixes-dev \
|
||||
libxi-dev \
|
||||
libxinerama-dev \
|
||||
libxkbcommon-dev \
|
||||
libxkbcommon-x11-dev \
|
||||
libxml2-dev \
|
||||
libxrandr-dev \
|
||||
locales \
|
||||
ninja-build \
|
||||
pkg-config \
|
||||
python3 \
|
||||
python3-pip \
|
||||
python3-setuptools \
|
||||
python3-wheel \
|
||||
shared-mime-info \
|
||||
wayland-protocols \
|
||||
xauth \
|
||||
xvfb \
|
||||
&& rm -rf /usr/share/doc/* /usr/share/man/*
|
||||
|
||||
# Locale for our build
|
||||
RUN locale-gen C.UTF-8 && /usr/sbin/update-locale LANG=C.UTF-8
|
||||
|
||||
ARG HOST_USER_ID=5555
|
||||
ENV HOST_USER_ID ${HOST_USER_ID}
|
||||
RUN useradd -u $HOST_USER_ID -ms /bin/bash user
|
||||
|
||||
USER user
|
||||
WORKDIR /home/user
|
||||
|
||||
ENV LANG=C.UTF-8 LANGUAGE=C.UTF-8 LC_ALL=C.UTF-8
|
||||
@@ -1,71 +0,0 @@
|
||||
FROM fedora:35
|
||||
|
||||
RUN dnf -y install \
|
||||
adwaita-icon-theme \
|
||||
atk-devel \
|
||||
at-spi2-atk-devel \
|
||||
avahi-gobject-devel \
|
||||
cairo-devel \
|
||||
cairo-gobject-devel \
|
||||
ccache \
|
||||
colord-devel \
|
||||
cups-devel \
|
||||
dbus-x11 \
|
||||
fribidi-devel \
|
||||
gcc \
|
||||
gcc-c++ \
|
||||
gdk-pixbuf2-devel \
|
||||
gdk-pixbuf2-modules \
|
||||
gettext \
|
||||
gettext-devel \
|
||||
git \
|
||||
glib2-devel \
|
||||
gobject-introspection-devel \
|
||||
graphene-devel \
|
||||
gtk-doc \
|
||||
hicolor-icon-theme \
|
||||
iso-codes \
|
||||
itstool \
|
||||
json-glib-devel \
|
||||
libcloudproviders-devel \
|
||||
libepoxy-devel \
|
||||
libmount-devel \
|
||||
librsvg2 \
|
||||
libXcomposite-devel \
|
||||
libXcursor-devel \
|
||||
libXcursor-devel \
|
||||
libXdamage-devel \
|
||||
libXfixes-devel \
|
||||
libXi-devel \
|
||||
libXinerama-devel \
|
||||
libxkbcommon-devel \
|
||||
libXrandr-devel \
|
||||
libXrender-devel \
|
||||
libXtst-devel \
|
||||
make \
|
||||
mesa-libEGL-devel \
|
||||
'pkgconfig(wayland-egl)' \
|
||||
meson \
|
||||
ninja-build \
|
||||
pango-devel \
|
||||
python3 \
|
||||
python3-pip \
|
||||
python3-wheel \
|
||||
redhat-rpm-config \
|
||||
rest-devel \
|
||||
sassc \
|
||||
vulkan-devel \
|
||||
wayland-devel \
|
||||
wayland-protocols-devel \
|
||||
xorg-x11-server-Xvfb \
|
||||
&& dnf clean all
|
||||
|
||||
ARG HOST_USER_ID=5555
|
||||
ENV HOST_USER_ID ${HOST_USER_ID}
|
||||
RUN useradd -u $HOST_USER_ID -ms /bin/bash user
|
||||
|
||||
USER user
|
||||
WORKDIR /home/user
|
||||
|
||||
ENV LANG C.utf8
|
||||
ENV PATH="/usr/lib64/ccache:${PATH}"
|
||||
@@ -1,135 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
read_arg() {
|
||||
# $1 = arg name
|
||||
# $2 = arg value
|
||||
# $3 = arg parameter
|
||||
local rematch='^[^=]*=(.*)$'
|
||||
if [[ $2 =~ $rematch ]]; then
|
||||
read "$1" <<< "${BASH_REMATCH[1]}"
|
||||
else
|
||||
read "$1" <<< "$3"
|
||||
# There is no way to shift our callers args, so
|
||||
# return 1 to indicate they should do it instead.
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
set -e
|
||||
|
||||
build=0
|
||||
run=0
|
||||
push=0
|
||||
list=0
|
||||
print_help=0
|
||||
no_login=0
|
||||
|
||||
while (($# > 0)); do
|
||||
case "${1%%=*}" in
|
||||
build) build=1;;
|
||||
run) run=1;;
|
||||
push) push=1;;
|
||||
list) list=1;;
|
||||
help) print_help=1;;
|
||||
--base|-b) read_arg base "$@" || shift;;
|
||||
--base-version) read_arg base_version "$@" || shift;;
|
||||
--no-login) no_login=1;;
|
||||
*) echo -e "\e[1;31mERROR\e[0m: Unknown option '$1'"; exit 1;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
if [ $print_help == 1 ]; then
|
||||
echo "$0 - Build and run Docker images"
|
||||
echo ""
|
||||
echo "Usage: $0 <command> [options] [basename]"
|
||||
echo ""
|
||||
echo "Available commands"
|
||||
echo ""
|
||||
echo " build --base=<BASENAME> - Build Docker image <BASENAME>.Dockerfile"
|
||||
echo " run --base=<BASENAME> - Run Docker image <BASENAME>"
|
||||
echo " push --base=<BASENAME> - Push Docker image <BASENAME> to the registry"
|
||||
echo " list - List available images"
|
||||
echo " help - This help message"
|
||||
echo ""
|
||||
exit 0
|
||||
fi
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
if [ $list == 1 ]; then
|
||||
echo "Available Docker images:"
|
||||
for f in *.Dockerfile; do
|
||||
filename=$( basename -- "$f" )
|
||||
basename="${filename%.*}"
|
||||
|
||||
echo -e " \e[1;39m$basename\e[0m"
|
||||
done
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# All commands after this require --base to be set
|
||||
if [ -z $base ]; then
|
||||
echo "Usage: $0 <command>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -f "$base.Dockerfile" ]; then
|
||||
echo -e "\e[1;31mERROR\e[0m: Dockerfile for '$base' not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z $base_version ]; then
|
||||
base_version="latest"
|
||||
else
|
||||
base_version="v$base_version"
|
||||
fi
|
||||
|
||||
if [ ! -x "$(command -v docker)" ] || [ docker --help |& grep -q podman ]; then
|
||||
# Docker is actually implemented by podman, and its OCI output
|
||||
# is incompatible with some of the dockerd instances on GitLab
|
||||
# CI runners.
|
||||
echo "Using: Podman"
|
||||
format="--format docker"
|
||||
CMD="podman"
|
||||
else
|
||||
echo "Using: Docker"
|
||||
format=""
|
||||
CMD="sudo socker"
|
||||
fi
|
||||
|
||||
REGISTRY="registry.gitlab.gnome.org"
|
||||
TAG="${REGISTRY}/gnome/gtk/${base}:${base_version}"
|
||||
|
||||
if [ $build == 1 ]; then
|
||||
echo -e "\e[1;32mBUILDING\e[0m: ${base} as ${TAG}"
|
||||
${CMD} build \
|
||||
${format} \
|
||||
--build-arg HOST_USER_ID="$UID" \
|
||||
--tag "${TAG}" \
|
||||
--file "${base}.Dockerfile" .
|
||||
exit $?
|
||||
fi
|
||||
|
||||
if [ $push == 1 ]; then
|
||||
echo -e "\e[1;32mPUSHING\e[0m: ${base} as ${TAG}"
|
||||
|
||||
if [ $no_login == 0 ]; then
|
||||
${CMD} login ${REGISTRY}
|
||||
fi
|
||||
|
||||
${CMD} push ${TAG}
|
||||
exit $?
|
||||
fi
|
||||
|
||||
if [ $run == 1 ]; then
|
||||
echo -e "\e[1;32mRUNNING\e[0m: ${base} as ${TAG}"
|
||||
${CMD} run \
|
||||
--rm \
|
||||
--volume "$(pwd)/..:/home/user/app" \
|
||||
--workdir "/home/user/app" \
|
||||
--tty \
|
||||
--interactive "${TAG}" \
|
||||
bash
|
||||
exit $?
|
||||
fi
|
||||
@@ -1,47 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
mkdir -p _ccache
|
||||
export CCACHE_BASEDIR="$(pwd)"
|
||||
export CCACHE_DIR="${CCACHE_BASEDIR}/_ccache"
|
||||
|
||||
export PATH="${HOME}/.local/bin:${PATH}"
|
||||
python3 -m pip install --user meson==0.60
|
||||
|
||||
meson \
|
||||
-Dinstalled_tests=true \
|
||||
-Dbroadway_backend=true \
|
||||
-Dx11_backend=true \
|
||||
-Dwayland_backend=true \
|
||||
-Dxinerama=yes \
|
||||
-Dprint_backends="file,lpr,test,cups" \
|
||||
${EXTRA_MESON_FLAGS:-} \
|
||||
_build
|
||||
|
||||
cd _build
|
||||
ninja
|
||||
|
||||
# Meson < 0.57 can't exclude suites in a test_setup() so we have to
|
||||
# explicitly leave out the failing and flaky suites.
|
||||
xvfb-run -a -s "-screen 0 1024x768x24" \
|
||||
meson test \
|
||||
--timeout-multiplier 4 \
|
||||
--print-errorlogs \
|
||||
--suite=gtk+-3.0 \
|
||||
--no-suite=flaky \
|
||||
--no-suite=failing
|
||||
|
||||
# We run the flaky and failing tests to get them reported in the CI logs,
|
||||
# but if they fail (which we expect they often will), that isn't an error.
|
||||
xvfb-run -a -s "-screen 0 1024x768x24" \
|
||||
meson test \
|
||||
--timeout-multiplier 4 \
|
||||
--print-errorlogs \
|
||||
--suite=flaky \
|
||||
--suite=failing \
|
||||
|| true
|
||||
|
||||
if [ -n "${DO_DISTCHECK-}" ]; then
|
||||
meson dist --no-tests
|
||||
fi
|
||||
@@ -1,51 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
if [[ "$MSYSTEM" == "MINGW32" ]]; then
|
||||
export MSYS2_ARCH="i686"
|
||||
else
|
||||
export MSYS2_ARCH="x86_64"
|
||||
fi
|
||||
|
||||
# Update everything
|
||||
pacman --noconfirm -Suy
|
||||
|
||||
# Install the required packages
|
||||
pacman --noconfirm -S --needed \
|
||||
mingw-w64-$MSYS2_ARCH-toolchain \
|
||||
mingw-w64-$MSYS2_ARCH-ccache \
|
||||
mingw-w64-$MSYS2_ARCH-pkg-config \
|
||||
mingw-w64-$MSYS2_ARCH-gobject-introspection \
|
||||
mingw-w64-$MSYS2_ARCH-adwaita-icon-theme \
|
||||
mingw-w64-$MSYS2_ARCH-atk \
|
||||
mingw-w64-$MSYS2_ARCH-cairo \
|
||||
mingw-w64-$MSYS2_ARCH-gdk-pixbuf2 \
|
||||
mingw-w64-$MSYS2_ARCH-glib2 \
|
||||
mingw-w64-$MSYS2_ARCH-json-glib \
|
||||
mingw-w64-$MSYS2_ARCH-libepoxy \
|
||||
mingw-w64-$MSYS2_ARCH-pango \
|
||||
mingw-w64-$MSYS2_ARCH-shared-mime-info \
|
||||
mingw-w64-$MSYS2_ARCH-meson \
|
||||
mingw-w64-$MSYS2_ARCH-ninja \
|
||||
mingw-w64-$MSYS2_ARCH-gtk-doc
|
||||
|
||||
# https://github.com/msys2/MINGW-packages/pull/6465
|
||||
pacman --noconfirm -S --needed mingw-w64-$MSYS2_ARCH-brotli
|
||||
|
||||
mkdir -p _ccache
|
||||
export CCACHE_BASEDIR="$(pwd)"
|
||||
export CCACHE_DIR="${CCACHE_BASEDIR}/_ccache"
|
||||
|
||||
# Build
|
||||
ccache --zero-stats
|
||||
ccache --show-stats
|
||||
|
||||
meson \
|
||||
-Dman=true \
|
||||
-Dbroadway_backend=true \
|
||||
_build
|
||||
|
||||
ninja -C _build
|
||||
|
||||
ccache --show-stats
|
||||
32
AUTHORS
Normal file
@@ -0,0 +1,32 @@
|
||||
Original Authors
|
||||
----------------
|
||||
Peter Mattis <petm@xcf.berkeley.edu>
|
||||
Spencer Kimball <spencer@xcf.berkeley.edu>
|
||||
Josh MacDonald <jmacd@xcf.berkeley.edu>
|
||||
|
||||
Please do not mail the original authors asking questions about this
|
||||
version of GTK+.
|
||||
|
||||
The GTK+ Team (in alphabetical order)
|
||||
-------------------------------------
|
||||
Shawn T. Amundson <amundson@gtk.org>
|
||||
Jerome Bolliet <bolliet@gtk.org>
|
||||
Damon Chaplin <damon@gtk.org>
|
||||
Tony Gale <gale@gtk.org>
|
||||
Jeff Garzik <jgarzik@gtk.org>
|
||||
Lars Hamann <lars@gtk.org>
|
||||
Raja R Harinath <harinath@gtk.org>
|
||||
Carsten Haitzler <raster@gtk.org>
|
||||
Tim Janik <timj@gtk.org>
|
||||
Stefan Jeske <stefan@gtk.org>
|
||||
Elliot Lee <sopwith@gtk.org>
|
||||
Raph Levien <raph@gtk.org>
|
||||
Ian Main <imain@gtk.org>
|
||||
Federico Mena <quartic@gtk.org>
|
||||
Paolo Molaro <lupus@gtk.org>
|
||||
Jay Painter <jpaint@gtk.org>
|
||||
Manish Singh <manish@gtk.org>
|
||||
Owen Taylor <otaylor@gtk.org>
|
||||
|
||||
There are many others who have contributed patches; we thank them,
|
||||
GTK+ is much better because of them.
|
||||
262
CONTRIBUTING.md
@@ -1,262 +0,0 @@
|
||||
# Contribution guidelines
|
||||
|
||||
Thank you for considering contributing to the GTK project!
|
||||
|
||||
These guidelines are meant for new contributors, regardless of their level
|
||||
of proficiency; following them allows the maintainers of the GTK project to
|
||||
more effectively evaluate your contribution, and provide prompt feedback to
|
||||
you. Additionally, by following these guidelines you clearly communicate
|
||||
that you respect the time and effort that the people developing GTK put into
|
||||
managing the project.
|
||||
|
||||
GTK is a complex free software GUI toolkit, and it would not exist without
|
||||
contributions from the free and open source software community. There are
|
||||
many things that we value:
|
||||
|
||||
- bug reporting and fixing
|
||||
- documentation and examples
|
||||
- tests
|
||||
- new features
|
||||
|
||||
Please, do not use the issue tracker for support questions. If you have
|
||||
questions on how to use GTK effectively, you can use:
|
||||
|
||||
- the `#gtk` IRC channel on irc.gnome.org
|
||||
- the [gtk tag on the GNOME Discourse instance](https://discourse.gnome.org/tag/gtk)
|
||||
|
||||
You can also look at the GTK tag on [Stack
|
||||
Overflow](https://stackoverflow.com/questions/tagged/gtk).
|
||||
|
||||
The issue tracker is meant to be used for actionable issues only.
|
||||
|
||||
## How to report bugs
|
||||
|
||||
### Security issues
|
||||
|
||||
You should not open a new issue for security related questions.
|
||||
|
||||
When in doubt, send an email to the [security](mailto:security@gnome.org)
|
||||
mailing list.
|
||||
|
||||
### Bug reports
|
||||
|
||||
If you're reporting a bug make sure to list:
|
||||
|
||||
0. which version of GTK are you using?
|
||||
0. which operating system are you using?
|
||||
0. the necessary steps to reproduce the issue
|
||||
0. the expected outcome
|
||||
0. a description of the behavior; screenshots are also welcome
|
||||
0. a small, self-contained example exhibiting the behavior; if this
|
||||
is not available, try reproducing the issue using the GTK examples
|
||||
or interactive tests
|
||||
|
||||
If the issue includes a crash, you should also include:
|
||||
|
||||
0. the eventual warnings printed on the terminal
|
||||
0. a backtrace, obtained with tools such as GDB or LLDB
|
||||
|
||||
It is fine to include screenshots of screen recordings to demonstrate
|
||||
an issue that is best to understand visually, but please don't just
|
||||
dump screen recordings without further details into issues. It is
|
||||
essential that the problem is described in enough detail to reproduce
|
||||
it without watching a video.
|
||||
|
||||
For small issues, such as:
|
||||
|
||||
- spelling/grammar fixes in the documentation
|
||||
- typo correction
|
||||
- comment clean ups
|
||||
- changes to metadata files (CI, `.gitignore`)
|
||||
- build system changes
|
||||
- source tree clean ups and reorganizations
|
||||
|
||||
You should directly open a merge request instead of filing a new issue.
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
Feature discussion can be open ended and require high bandwidth channels; if
|
||||
you are proposing a new feature on the issue tracker, make sure to make
|
||||
an actionable proposal, and list:
|
||||
|
||||
0. what you're trying to achieve
|
||||
0. prior art, in other toolkits or applications
|
||||
0. design and theming changes
|
||||
|
||||
If you're proposing the integration of new features it helps to have
|
||||
multiple applications using shared or similar code, especially if they have
|
||||
iterated over it various times.
|
||||
|
||||
Each feature should also come fully documented, and with tests.
|
||||
|
||||
## Your first contribution
|
||||
|
||||
### Prerequisites
|
||||
|
||||
If you want to contribute to the GTK project, you will need to have the
|
||||
development tools appropriate for your operating system, including:
|
||||
|
||||
- Python 3.x
|
||||
- Meson
|
||||
- Ninja
|
||||
- Gettext (19.7 or newer)
|
||||
- a [C99 compatible compiler](https://wiki.gnome.org/Projects/GLib/CompilerRequirements)
|
||||
|
||||
Up-to-date instructions about developing GNOME applications and libraries
|
||||
can be found on [the GNOME Developer Center](https://developer.gnome.org).
|
||||
|
||||
The GTK project uses GitLab for code hosting and for tracking issues. More
|
||||
information about using GitLab can be found [on the GNOME
|
||||
wiki](https://wiki.gnome.org/GitLab).
|
||||
|
||||
### Dependencies
|
||||
|
||||
In order to get GTK from Git installed on your system, you need to have the
|
||||
required versions of all the software dependencies required by GTK; typically,
|
||||
this means a recent version of GLib, Cairo, Pango, and ATK, as well as the
|
||||
platform-specific dependencies for the windowing system you are using (Wayland,
|
||||
X11, Windows, or macOS).
|
||||
|
||||
The core dependencies for GTK are:
|
||||
|
||||
- [GLib, GObject, and GIO](https://gitlab.gnome.org/GNOME/glib)
|
||||
- [Cairo](http://cairographics.org)
|
||||
- [Pango](https://gitlab.gnome.org/GNOME/pango)
|
||||
- [GdkPixbuf](https://gitlab.gnome.org/GNOME/gdk-pixbuf)
|
||||
- [Epoxy](https://github.com/anholt/libepoxy)
|
||||
- [ATK](https://gitlab.gnome.org/GNOME/atk)
|
||||
- [Graphene](https://github.com/ebassi/graphene)
|
||||
|
||||
GTK will attempt to download and build some of these dependencies if it
|
||||
cannot find them on your system.
|
||||
|
||||
Additionally, you may want to look at projects that create a development
|
||||
environment for you, like [jhbuild](https://wiki.gnome.org/HowDoI/Jhbuild)
|
||||
and [gvsbuild](https://github.com/wingtk/gvsbuild).
|
||||
|
||||
### Getting started
|
||||
|
||||
You should start by forking the GTK repository from the GitLab web UI, and
|
||||
cloning from your fork:
|
||||
|
||||
```sh
|
||||
$ git clone --branch=gtk-3-24 https://gitlab.gnome.org/yourusername/gtk.git gtk-3
|
||||
$ cd gtk-3
|
||||
```
|
||||
|
||||
**Note**: if you plan to push changes to back to the main repository and
|
||||
have a GNOME account, you can skip the fork, and use the following instead:
|
||||
|
||||
```sh
|
||||
$ git clone --branch=gtk-3-24 git@gitlab.gnome.org:GNOME/gtk.git gtk-3
|
||||
$ cd gtk-3
|
||||
```
|
||||
|
||||
To compile the Git version of GTK on your system, you will need to
|
||||
configure your build using Meson:
|
||||
|
||||
```sh
|
||||
$ meson setup _builddir .
|
||||
$ meson compile -C _builddir
|
||||
```
|
||||
|
||||
Typically, you should work on your own branch:
|
||||
|
||||
```sh
|
||||
$ git switch -C your-branch
|
||||
```
|
||||
|
||||
Once you've finished working on the bug fix or feature, push the branch
|
||||
to the Git repository and open a new merge request, to let the GTK
|
||||
maintainers review your contribution.
|
||||
|
||||
### Code reviews
|
||||
|
||||
Each contribution is reviewed by the core developers of the GTK project.
|
||||
|
||||
### Commit messages
|
||||
|
||||
The expected format for git commit messages is as follows:
|
||||
|
||||
```plain
|
||||
Short explanation of the commit
|
||||
|
||||
Longer explanation explaining exactly what's changed, whether any
|
||||
external or private interfaces changed, what bugs were fixed (with bug
|
||||
tracker reference if applicable) and so forth. Be concise but not too
|
||||
brief.
|
||||
|
||||
Closes #1234
|
||||
```
|
||||
|
||||
- Always add a brief description of the commit to the _first_ line of
|
||||
the commit and terminate by two newlines (it will work without the
|
||||
second newline, but that is not nice for the interfaces).
|
||||
|
||||
- First line (the brief description) must only be one sentence and
|
||||
should start with a capital letter unless it starts with a lowercase
|
||||
symbol or identifier. Don't use a trailing period either. Don't exceed
|
||||
72 characters.
|
||||
|
||||
- The main description (the body) is normal prose and should use normal
|
||||
punctuation and capital letters where appropriate. Consider the commit
|
||||
message as an email sent to the developers (or yourself, six months
|
||||
down the line) detailing **why** you changed something. There's no need
|
||||
to specify the **how**: the changes can be inlined.
|
||||
|
||||
- When committing code on behalf of others use the `--author` option, e.g.
|
||||
`git commit -a --author "Joe Coder <joe@coder.org>"` and `--signoff`.
|
||||
|
||||
- If your commit is addressing an issue, use the
|
||||
[GitLab syntax](https://docs.gitlab.com/ce/user/project/issues/automatic_issue_closing.html)
|
||||
to automatically close the issue when merging the commit with the upstream
|
||||
repository:
|
||||
|
||||
```plain
|
||||
Closes #1234
|
||||
Fixes #1234
|
||||
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1234
|
||||
```
|
||||
|
||||
- If you have a merge request with multiple commits and none of them
|
||||
completely fixes an issue, you should add a reference to the issue in
|
||||
the commit message, e.g. `Bug: #1234`, and use the automatic issue
|
||||
closing syntax in the description of the merge request.
|
||||
|
||||
### Commit access to the GTK repository
|
||||
|
||||
GTK is part of the GNOME infrastructure. At the current time, any
|
||||
person with write access to the GNOME repository can merge changes to
|
||||
GTK. This is a good thing, in that it encourages many people to work
|
||||
on GTK, and progress can be made quickly. However, GTK is a fairly
|
||||
large and complicated project on which many other things depend, so to
|
||||
avoid unnecessary breakage, and to take advantage of the knowledge
|
||||
about GTK that has been built up over the years, we'd like to ask
|
||||
people committing to GTK to follow a few rules:
|
||||
|
||||
0. Ask first. If your changes are major, or could possibly break existing
|
||||
code, you should always ask. If your change is minor and you've been
|
||||
working on GTK for a while it probably isn't necessary to ask. But when
|
||||
in doubt, ask. Even if your change is correct, somebody may know a
|
||||
better way to do things. If you are making changes to GTK, you should
|
||||
be subscribed to the [gtk-devel](https://mail.gnome.org/mailman/listinfo/gtk-devel-list)
|
||||
mailing list; this is a good place to ask about intended changes.
|
||||
The `#gtk` IRC channel on irc.gnome.org is also a good place to find GTK
|
||||
developers to discuss changes, but if you live outside of the EU/US time
|
||||
zones, an email to the gtk-devel mailing list is the most certain and
|
||||
preferred method.
|
||||
|
||||
0. Ask _first_.
|
||||
|
||||
0. Always write a meaningful commit message. Changes without a sufficient
|
||||
commit message will be reverted.
|
||||
|
||||
0. Never push to the `main` branch, or any stable branches, directly; you
|
||||
should always go through a merge request, to ensure that the code is
|
||||
tested on the CI infrastructure at the very least. A merge request is
|
||||
also the proper place to get a comprehensive code review from the core
|
||||
developers of GTK.
|
||||
|
||||
If you have been contributing to GTK for a while and you don't have commit
|
||||
access to the repository, you may ask to obtain it following the [GNOME account
|
||||
process](https://wiki.gnome.org/AccountsTeam/NewAccounts).
|
||||
19
COPYING
@@ -1,15 +1,15 @@
|
||||
GNU LIBRARY GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
GNU LIBRARY GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1991 Free Software Foundation, Inc.
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the library GPL. It is
|
||||
numbered 2 because it goes with version 2 of the ordinary GPL.]
|
||||
|
||||
Preamble
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
@@ -99,7 +99,7 @@ works together with the library.
|
||||
Note that it is possible for a library to be covered by the ordinary
|
||||
General Public License rather than by this special one.
|
||||
|
||||
GNU LIBRARY GENERAL PUBLIC LICENSE
|
||||
GNU LIBRARY GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library which
|
||||
@@ -411,7 +411,7 @@ decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
@@ -434,7 +434,7 @@ FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
@@ -463,8 +463,9 @@ convey the exclusion of warranty; and each file should have at least the
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
License along with this library; if not, write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
|
||||
896
ChangeLog
Normal file
@@ -0,0 +1,896 @@
|
||||
2002-07-16 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
* gdk/gdkpixbuf-drawable.c (rgb565lsb): Fixed the LSB -> MSB case.
|
||||
Fixes #79463.
|
||||
(rgb565msb): Fix the MSB -> MSB case. Fixes #79190.
|
||||
|
||||
Fri Apr 19 16:30:09 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeprivate.h, gtk/gtktreeview.c: rename
|
||||
last_single_clicked{,_2} to last_button_press{,_2}, as the latter
|
||||
is a more sane name.
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_button_press): use ->priv->anchor
|
||||
instead of ->priv->cursor, check for the anchor at another place, as
|
||||
you can go in edit mode without having an anchor.
|
||||
|
||||
2002-04-18 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkitemfactory.c:
|
||||
* gtk/gtkiconfactory.c:
|
||||
* gtk/gtkwidget.c:
|
||||
* gtk/gtkstyle.c:
|
||||
* gtk/gtkrc.c:
|
||||
* gtk/gtktreeviewcolumn.c:
|
||||
* gtk/gtkdialog.c:
|
||||
* gtk/gtktreemodel.c: s/<!>/<!-- -->/g throughout the
|
||||
documentation to bring the produced Docbook closer to XML.
|
||||
|
||||
2002-04-18 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gdk-pixbuf/Makefile.am (uninstall-libtool-import-lib)
|
||||
* gdk/Makefile.am (uninstall-libtool-import-lib): Fix typo,
|
||||
thanks to David Sterba for noticing.
|
||||
|
||||
* gtk/gtkmain.h
|
||||
* gtk/gtkmain.c (gtk_init_abi_check, gtk_init_check_abi_check): In
|
||||
GTK+ 2.0 the GtkWindow struct actually is the same size in gcc on
|
||||
Win32 whether compiled with -fnative-struct or not. Unfortunately
|
||||
this wan't noticed until now. So, from now on, check some other
|
||||
struct, too, for which the use of -fnative-struct still
|
||||
matters. GtkBox is one such.
|
||||
|
||||
Thu Apr 18 00:23:31 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreemodelsort.c
|
||||
(gtk_tree_model_sort_convert_path_to_child_path): so this function
|
||||
was completely broken. Fix it and improve readability.
|
||||
|
||||
2002-04-17 Anders Carlsson <andersca@gnu.org>
|
||||
|
||||
* tests/testtreeedit.c (button_press_event): Add a small
|
||||
test case.
|
||||
|
||||
Wed Apr 17 00:21:36 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreestore.c (gtk_tree_store_insert_before): fix docs
|
||||
|
||||
Tue Apr 16 17:28:21 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_real_collapse_row): check
|
||||
->priv->cursor and ->priv->anchor rowrefs before removing
|
||||
node->children from the rbtree. Also check the
|
||||
->priv->last_single_clicked and ->priv->last_single_clicked_2 rowrefs
|
||||
(I think I really need to rename those two someday).
|
||||
|
||||
Tue Apr 16 07:53:49 2002 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkmenu.c (gtk_menu_key_press): don't install/change accelerators
|
||||
from locked accel groups.
|
||||
|
||||
* gtk/gtkwidget.c (_gtk_widget_get_accel_path): export whether the
|
||||
accel path is from a locked accel group.
|
||||
|
||||
Mon Apr 15 15:41:56 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtkcontainer.c (gtk_container_focus): include internal
|
||||
children when doing focus.
|
||||
(gtk_container_get_all_children): new static function to include
|
||||
internal children when making a list of them.
|
||||
|
||||
Sun Apr 14 16:56:59 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeprivate.h: add _gtk_tree_view_column_get_editable_cell and
|
||||
_gtk_tree_view_column_get_neighbor_sizes
|
||||
|
||||
* gtk/gtktreeviewcolumn.c (struct _GtkTreeViewColumnCellInfo): add
|
||||
real_width field,
|
||||
(_gtk_tree_view_column_get_editable_cell): implement,
|
||||
(gtk_tree_view_column_cell_process_action): fill info->real_width
|
||||
(_gtk_tree_view_column_get_neighbor_sizes): implement
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_button_press): make the "editable
|
||||
widget" show up with the same size as the actual cell, so it doesnt
|
||||
cover the complete column if there are any other cells in that column.
|
||||
|
||||
2002-04-14 Abigail Brady <morwen@evilmagic.org>
|
||||
|
||||
* gtk/gtkfilesel.c: Fix typo in message.
|
||||
|
||||
2002-04-13 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gdk/gdkpixbuf-drawable.c (gdk_pixbuf_get_from_drawable): create
|
||||
the target pixbuf AFTER filling in width/height, so that
|
||||
passing in -1 for width/height will work.
|
||||
|
||||
Sat Apr 13 22:49:45 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
Fixes #75510
|
||||
|
||||
* gtk/gtktreeselection.c (gtk_tree_selection_get_selected): make this
|
||||
function work correctly and more sane
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_real_collapse_row): remove
|
||||
node->children from rbtree before emitting GtkTreeSelection::changed
|
||||
|
||||
Sat Apr 13 17:15:12 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_init): dont set
|
||||
the mode to GTK_CELL_RENDERER_MODE_EDITABLE by default,
|
||||
(gtk_cell_renderer_text_class_init): for some reason our default for
|
||||
editable was TRUE, of course this is FALSE.
|
||||
(gtk_cell_renderer_text_set_property): update mode when editable
|
||||
has been changed.
|
||||
|
||||
2002-04-12 jacob berkman <jacob@ximian.com>
|
||||
|
||||
* gdk/x11/xsettings-client.c (fetch_card8): fix cut-n-paste bug
|
||||
which breaks big-endian machines (fixes #73585)
|
||||
|
||||
2002-04-12 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* gtk/gtknotebook.c (gtk_notebook_real_remove): relocate the
|
||||
remove_weak_pointer to just before we free the page, to be sure
|
||||
it doesn't get re-added. #75282
|
||||
|
||||
Fri Apr 12 18:32:46 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_real_set_cursor): add
|
||||
clamp_node argument
|
||||
(toplevel): update usages of gtk_tree_view_real_set_cursor,
|
||||
(gtk_tree_view_focus_to_cursor): don't let
|
||||
gtk_tree_view_real_set_cursor clamp the node, so you won't get
|
||||
unexpected scrolling
|
||||
|
||||
2002-04-11 Michael Meeks <michael@ximian.com>
|
||||
|
||||
* gtk/gtklabel.c
|
||||
(gtk_label_parse_uline, gtk_label_set_text),
|
||||
(gtk_label_set_text_with_mnemonic): add freeze / thaws
|
||||
to stop deluge of 'notify' signals.
|
||||
|
||||
Sat Apr 6 06:57:00 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkmenushell.[ch] gtk/gtkmenuitem.c: Export
|
||||
private _gtk_menu_shell_activate() to encapsulate
|
||||
cut-and-paste code.
|
||||
|
||||
* gtk/gtkmenubar.c: Select the first item on the menu bar
|
||||
for F10 rather than acting as if the user pressed <Alt>F
|
||||
to select the file manager.
|
||||
|
||||
Tue Apr 9 19:01:28 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
Fix problems with HandleBox and focusing - #78232
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_translate_coordinates): Handle
|
||||
GtkHandleBox / GnomeDock style window heirarchy / widget
|
||||
heirarchy disconnects. :-(.
|
||||
|
||||
* gtk/gtkcontainer.c: Handle failures from
|
||||
gtk_widget_translate_coordinates (Focusing is not right, but at
|
||||
least it doesn't go into infinite loops.)
|
||||
|
||||
Tue Apr 9 18:34:58 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkcontainer.c (_gtk_container_queue_resize): Always
|
||||
set the ALLOC_NEEDED and REQUEST_NEEDED flags up the hierarchy,
|
||||
even if we aren't currently in a resize container... we need
|
||||
this to properly handle size changes to widgets that are
|
||||
being moved from one heirarchy to another. (#78226)
|
||||
|
||||
Tue Apr 9 21:41:24 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
Fixes #78110
|
||||
|
||||
* gtk/gtktreeselection.c (_gtk_tree_selection_internal_select_node):
|
||||
add override_browse_mode argument and implement,
|
||||
(gtk_tree_selection_unselect_path): always unselect the path,
|
||||
(toplevel): update uses of _gtk_tree_selection_internal_select_node
|
||||
|
||||
* gtk/gtktreeview.c: update uses of
|
||||
_gtk_tree_selection_internal_select_node
|
||||
|
||||
* gtk/gtktreeprivate.h (_gtk_tree_selection_internal_select_node):
|
||||
update prototype
|
||||
|
||||
Tue Apr 9 21:39:44 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
Fixes #77862
|
||||
|
||||
* gtk/gtktreeprivate.h: add _gtk_tree_view_column_has_editable_cell
|
||||
|
||||
* gtk/gtktreeviewcolumn.c (_gtk_tree_view_column_has_editable_cell):
|
||||
new function
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_button_press): send cell event
|
||||
on first click when cell isn't editable
|
||||
|
||||
Tue Apr 9 21:37:31 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreedatalist.c (_gtk_tree_data_list_check_type): add some
|
||||
types which were missing and useful to use (fixes #77870)
|
||||
|
||||
2002-04-09 Anders Carlsson <andersca@gnu.org>
|
||||
|
||||
* gtk/gtkfilesel.c (open_new_dir): Initialize error to NULL.
|
||||
|
||||
2002-04-08 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* tests/testgtk.c: really revert testgtk.c
|
||||
|
||||
Mon Apr 8 20:28:54 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeselection.c (gtk_tree_selection_select_path),
|
||||
(gtk_tree_selection_unselect_path),
|
||||
(gtk_tree_selection_path_is_selected): check the return value of
|
||||
_gtk_tree_view_find_node and return if it's TRUE. This makes those
|
||||
functions work somewhat saner on non-expanded trees.
|
||||
|
||||
Fri Apr 5 18:28:56 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeselection.c (gtk_tree_selection_set_mode): free
|
||||
anchor row reference after unselecting the selection (fixes #76272)
|
||||
|
||||
Fri Apr 5 18:27:48 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_real_expand_row): only return
|
||||
when we don't have to open all children (fixes #75736)
|
||||
|
||||
Fri Apr 5 18:24:24 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_clear): unref
|
||||
cellrenderer after clearing the attributes of the renderer (fixes
|
||||
#75592)
|
||||
|
||||
Fri Apr 5 05:55:14 2002 Jonathan Blandford <jrb@gnome.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_grab_focus): implement.
|
||||
(gtk_tree_view_move_cursor_up_down): check for focus
|
||||
(gtk_tree_view_move_cursor_page_up_down): ditto
|
||||
(gtk_tree_view_move_cursor_left_right): ditto
|
||||
(gtk_tree_view_move_cursor_start_end): ditto
|
||||
(gtk_tree_view_real_select_all): ditto
|
||||
(gtk_tree_view_real_unselect_all): ditto
|
||||
(gtk_tree_view_real_select_cursor_row): ditto
|
||||
(gtk_tree_view_real_toggle_cursor_row): ditto
|
||||
(gtk_tree_view_real_expand_collapse_cursor_row): ditto
|
||||
(gtk_tree_view_real_select_cursor_parent): ditto
|
||||
(gtk_tree_view_real_start_interactive_search): ditto
|
||||
|
||||
* gtk/gtktreeviewcolumn.c: grab focus
|
||||
|
||||
2002-04-05 Alex Larsson <alexl@redhat.com>
|
||||
|
||||
* gdk/linux-fb/gdkkeyboard-fb.c (write_string):
|
||||
Fix undefined variable typo.
|
||||
Patch from Simon Floery <simon.floery@gmx.at>
|
||||
|
||||
Fri Apr 5 01:06:15 2002 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gdk/x11/gdkwindow-x11.c (set_text_property): fix segfault
|
||||
upon NULL return from gdk_utf8_to_string_target().
|
||||
|
||||
* gdk/x11/gdkselection-x11.c (gdk_utf8_to_string_target): fix
|
||||
return value comment to mention NULL returns upon EMFILE.
|
||||
|
||||
Thu Apr 4 22:35:42 2002 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
* tests/testgtk.c (menu_items): revert accidentally commited
|
||||
change to testgtk.c
|
||||
|
||||
Thu Apr 4 22:28:08 2002 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
* gtk/gtkmenuitem.c (gtk_menu_item_paint): Fix problem with menu
|
||||
titles being clipped (#75948)
|
||||
|
||||
2002-04-04 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gdk/gdkrgb.c: Fix some bugs, and introduce a minor feature.
|
||||
|
||||
(gdk_rgb_convert_4_pack): New function, for 16-color (4 bits per
|
||||
pixel) static visuals (fixes #858).
|
||||
|
||||
(gdk_rgb_convert_gray4_pack, gdk_rgb_convert_gray4_d_pack): Fix
|
||||
same bugs in both functions: Odd start coordinate (partial byte)
|
||||
was not handled correctly. Also a partial final byte was not
|
||||
handled correctly.
|
||||
|
||||
(gdk_rgb_do_colormaps): Use G_N_ELEMENTS.
|
||||
(gdk_rgb_create_info): For pseudocolor visuals, use the 2x2x2
|
||||
colorcube only for depths 3 and 4. For static color, use it for
|
||||
depths 3..7 like before. (Depth 5..7 pseudocolor probably never
|
||||
occurs on X11. It doesn't normally occur on Win32 either, but
|
||||
there is experimental code in gdkvisual-win32.c to let the user
|
||||
restrict the size of palette used.)
|
||||
(gdk_rgb_init): Set gdk_rgb_verbose if the GDK_DEBUG_GDKRGB flag
|
||||
is set.
|
||||
(gdk_rgb_select_conv): Use gdk_rgb_convert_8 also for depths 5, 6
|
||||
and 7 (see above). Use gdk_rgb_convert_4_pack for 4 bits per pixel
|
||||
static color.
|
||||
|
||||
Tue Apr 2 11:10:13 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtkliststore.c (gtk_list_store_set_sort_func): set the
|
||||
sort_func correctly, 77030
|
||||
|
||||
Tue Apr 2 13:44:27 2002 Tim Janik <timj@gtk.org>
|
||||
|
||||
* configure.in: update version to 2.0.2, binary age 2, interface
|
||||
age 2.
|
||||
|
||||
* NEWS: updates for 2.0.2.
|
||||
|
||||
Mon Apr 1 22:20:24 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_move_cursor_page_up_down): add
|
||||
check for y > tree_view->priv->height (fixes #76974)
|
||||
|
||||
Mon Apr 1 22:19:39 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreemodelsort.c (gtk_tree_model_sort_sort_level): get
|
||||
the stamp changes right this time
|
||||
|
||||
Mon Apr 1 22:13:24 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreemodel.c (gtk_tree_row_reference_free): only
|
||||
disconnect the ref callbacks when model == proxy (Thanks go to
|
||||
Manuel Clos Crespo for the remote debugging)
|
||||
|
||||
Sat Mar 30 15:19:24 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreemodelsort.c: revert the latest stamp increment changes,
|
||||
as it broke stuff for trees
|
||||
|
||||
Fri Mar 29 18:15:12 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* ===== Released 2.0.1 ======
|
||||
|
||||
Fri Mar 29 18:09:18 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkaccelgroup.c (gtk_accel_group_query): Call
|
||||
gdk_keyval_to_lower() on the key passed in, since we
|
||||
lowercase all other key vals passed in, so querying
|
||||
keyvals will otherwise fail if the caller used
|
||||
an uppercase accelerators (#76899, Vitaly Tishkov)
|
||||
|
||||
Fri Mar 29 17:41:21 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkmain.c (load_modules): Fix screwup in handling
|
||||
of module path that was resulting in freed memory being
|
||||
accessed when both GTK_MODULES and a theme were set.
|
||||
(#76902, Johan Dahlin)
|
||||
|
||||
Fri Mar 29 17:57:36 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkiconfactory.c (get_default_icons): Fix wrong
|
||||
stock id's for ADD/REMOVE. (#76915, Vitaly Tishkov)
|
||||
|
||||
2002-03-29 Hans Breuer <hans@breuer.org>
|
||||
|
||||
* gtk/gtkmain.h : fix typo in gtk_init_check macro, which
|
||||
caused crashes if argc != 0
|
||||
|
||||
* gtk/stock-icons/makefile.msc : added new icons
|
||||
|
||||
Fri Mar 29 20:17:35 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreemodelsort.c (gtk_tree_model_sort_rows_reordered):
|
||||
remove call to gtk_tree_model_sort_increment_stamp
|
||||
(gtk_tree_model_sort_sort_level): always increment the stamp
|
||||
|
||||
Fri Mar 29 00:19:41 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* NEWS: Updates
|
||||
|
||||
* configure.in: Version 2.0.1, binary, interface age 1.
|
||||
|
||||
* configure.in (GDK_PIXBUF_VERSION): Up required versions
|
||||
of dependencies.
|
||||
|
||||
* gtk/gtkiconfactory.c gtk/stock-icons/Makefile.am:
|
||||
Add stock_add/remove_16.
|
||||
|
||||
Thu Mar 28 18:38:30 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtk[hv]paned.c (gtk_[hv]paned_size_allocate):
|
||||
Don't show the window unless the widget is mapped.
|
||||
(#76742, Dennis Björklund, Soeren Sandmann)
|
||||
|
||||
2002-03-29 Hans Breuer <hans@breuer.org>
|
||||
|
||||
Fixed dashed line issues (#74441) to an IMO reasonable extend.
|
||||
That is: use PS_USERSTYLE on WinNT (the next GDI limit appears
|
||||
to be with lines width > 50); Render horizontal and vertical
|
||||
dashed lines on Win9x 'by hand'. Dotted selection rectangles
|
||||
and Dia look nice ...
|
||||
|
||||
* gdk/win32/gdkprivate-win32.h : add pen_dashes pointer and
|
||||
num_pen_dashes to _GdkGCWin32
|
||||
* gdk/win32/gdkgc-win32.c : initialize pen_dashes and remove
|
||||
the guesses from dashes to windoze line styles.
|
||||
(predraw_set_forground) : always ExtCreatePen (PS_SOLID) on
|
||||
Win9x, which does not support PS_USERSTYLE.
|
||||
* gdk/win32/gdkdrawable-win32.c : new functions render_line_
|
||||
<horizontal|vertical>. Use them if not running on NT in
|
||||
gdk_win32_draw_<rectangle|segments|lines> ()
|
||||
|
||||
* gdk/win32/gdkkeys-win32.c (gdk_keyval_name) : return NULL
|
||||
for keyval == 0 to avoid to have zeros in all menu entries
|
||||
without accelerator.
|
||||
|
||||
2002-03-29 Jakub Steiner <jimmac@ximian.com>
|
||||
|
||||
* gtk/stock-icons/stock_add_24.png:
|
||||
* gtk/stock-icons/stock_add_16.png:
|
||||
* gtk/stock-icons/stock_remove_24.png:
|
||||
* gtk/stock-icons/stock_remove_16.png: use a simple '+' and '-',
|
||||
works better. the old box was too clumsy
|
||||
|
||||
Thu Mar 28 21:11:04 2002 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkfilesel.c (open_new_dir): when encountering non-UTF-8 file
|
||||
names, alert the user with g_message() instead of g_warning() and
|
||||
put out the actual conversion error.
|
||||
|
||||
2002-03-28 Dave Camp <dave@ximian.com>
|
||||
|
||||
* gtk/gtktreeview.c (install_scroll_sync_handler): Don't install
|
||||
the handler if the widget isn't realized.
|
||||
|
||||
2002-03-28 Jakub Steiner <jimmac@ximian.com>
|
||||
|
||||
* gtk/stock-icons/stock_font*:
|
||||
* gtk/stock-icons/stock_align*:
|
||||
* gtk/stock-icons/stock_text*: better solution to the dark theme
|
||||
problem. Also looks more pretty IMHO
|
||||
|
||||
2002-03-27 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* configure.in: Try to find libpng via pkg-config first,
|
||||
since libpng-1.2.2 will come with a .pc file.
|
||||
|
||||
Wed Mar 27 11:10:39 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtknotebook.c (gtk_notebook_real_remove): Set
|
||||
page->last_focus_child to NULL as well as removing the
|
||||
weak reference, to deal with reentrancy in set_focus_child().
|
||||
(#76634, Dennis Björklund)
|
||||
|
||||
2002-03-27 Murray Cumming <murrayc@usa.net>
|
||||
|
||||
* gtk/gtktreeview.c: Corrected registered return type of
|
||||
"move-cursor" signal. Had to add a marshaller to
|
||||
gtk/gtkmarshalers.list.
|
||||
|
||||
Tue Mar 26 14:46:50 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkmenu.c (gtk_menu_popup): Shuffle the ordering around
|
||||
some more (position before realizing) fixing problems with
|
||||
arrows popping up at the wrong time (#73386), hopefully not
|
||||
introducing other problems. (Reported by Ettore Perrazoli, others)
|
||||
|
||||
2002-03-26 Dave Camp <dave@ximian.com>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_button_press): Free the path
|
||||
after calling gtk_tree_view_row_activated() rather than before.
|
||||
|
||||
2002-03-25 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* gtk/gtkrc.c (gtk_rc_parse_font_name): free the style's
|
||||
font_description before assigning a new one.
|
||||
(gtk_rc_parse_stock): always unref the created icon_set. #76289
|
||||
|
||||
2002-03-25 Mark McLoughlin <mark@skynet.ie>
|
||||
|
||||
* gtk/gtkbindings.c: (gtk_binding_entry_add_signal),
|
||||
kill code duplicated in gtk_binding_entry_add_signall.
|
||||
|
||||
Sun Mar 24 10:32:38 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtktreemodel.c (gtk_tree_path_copy): Make path arg const, #75653
|
||||
|
||||
* gtk/gtkfontsel.c (gtk_font_selection_show_available_styles): fix
|
||||
a warning
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_button_press): remove the grab
|
||||
when we emit row_activated so that listeners of this signal can
|
||||
grab the mouse, #75629
|
||||
|
||||
2002-03-23 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gtk/gtktextlayout.c (gtk_text_layout_real_invalidate):
|
||||
invalidate the line containing start, even if the [start,end)
|
||||
range is empty (just invalidate [start,end], essentially).
|
||||
Partially fixes #72374
|
||||
|
||||
2002-03-23 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gtk/gtktextview.c (gtk_text_view_do_popup): end any selection in
|
||||
progress, patch from db@zigo.dhs.org, #74620
|
||||
|
||||
2002-03-23 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gtk/gtktextview.c (gtk_text_view_move_cursor_internal): extend
|
||||
selection for pageup/pagedown and ctrl+pageup/pagedown if
|
||||
shift is held. more of #53934
|
||||
|
||||
2002-03-23 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gtk/gtktextview.c (gtk_text_view_destroy_layout): disconnect
|
||||
layout handlers earlier in the function, to avoid possible
|
||||
reentrancy screwups
|
||||
(gtk_text_view_invalidate): Don't install idle handlers if
|
||||
layout == NULL, otherwise we get problems during finalization
|
||||
since clearing the buffer invalidates and puts the idle handlers
|
||||
back after we destroy the layout. #74660
|
||||
(gtk_text_view_ensure_layout): Install the validation handlers
|
||||
right after creating the layout.
|
||||
|
||||
* gtk/gtktexttagtable.c (foreach_unref): call
|
||||
_gtk_text_buffer_notify_will_remove_tag(), #75126
|
||||
|
||||
2002-03-22 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gdk/x11/gdkfont-x11.c (gdk_fontset_load): add more explanatory
|
||||
text to the error message about missing charsets, and use
|
||||
g_printerr() not g_warning() since this is typically not a
|
||||
programming error (we do not export any API to ask whether
|
||||
a font set will have missing charsets so apps realistically can't
|
||||
do anything other than try the gdk_fontset_load())
|
||||
|
||||
* gtk/gtktextview.c (gtk_text_view_key_press_event): return FALSE
|
||||
if the text view isn't editable and the user presses Return,
|
||||
so default buttons and such can be activated, #74937
|
||||
|
||||
* gtk/gtktextbuffer.c (paste_from_buffer): don't insert
|
||||
if the insertion point is not editable and the paste
|
||||
is interactive, #74125
|
||||
|
||||
* gtk/gtkwindow.c (gtk_window_move_resize): enhance the #if 0
|
||||
debug spew
|
||||
|
||||
* gtk/gtktextbuffer.c (cut_or_copy): only remove the previous
|
||||
cut/copied data right before replacing it, when we know we are
|
||||
going to replace it. Fixes #74049
|
||||
|
||||
2002-03-22 Richard Hult <rhult@codefactory.se>
|
||||
|
||||
* gdk/gdkevents.c (gdk_event_get_root_coords): Fix typo, where x
|
||||
value was assigned to both x and y.
|
||||
|
||||
Fri Mar 22 11:29:11 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
Partial fix for problem where keypad keys acted
|
||||
as shift-arrows in an entry rather than arrows (#74327)
|
||||
|
||||
* gtk/gtkkeyhash.c (_gtk_key_hash_lookup): Sort lookup
|
||||
results by number of modifiers in the entry. Fixes
|
||||
problem where if a key matched both modified and unmodified
|
||||
key bindings ... e.g., the distinguishing key binding
|
||||
was consumed, then it was random which was used.
|
||||
|
||||
* gtk/gtkbindings.c (gtk_binding_entries_sort_patterns):
|
||||
Catch the case where there are multiple entries from the
|
||||
same bindingset (with different modifiers), and use only
|
||||
the first entry, which, with the change in _gtk_key_hash_lookup()
|
||||
will be the preferred value.
|
||||
|
||||
Fri Mar 22 10:56:19 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkaccelmap.c (gtk_accel_map_save_fd): Fix memory
|
||||
leak. (#74400, Morten Welinder.)
|
||||
|
||||
* gtk/gtkaccelmap.c: Properly handle short returns from
|
||||
write() calls. (Handling EINTR isn't enough... that only
|
||||
handles the case where you were interrupted before you
|
||||
wrote a single byte.)
|
||||
|
||||
* gdk/linux-fb/gdkmouse-fb.c gdk/linux-fb/gdkkeyboard-fb.c:
|
||||
Robustify against short returns from write() calls.
|
||||
|
||||
Fri Mar 22 10:12:10 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtktextview.c (gtk_text_view_paint): Change
|
||||
G_BREAKPOINT() to g_assert_not_reached ().
|
||||
(#75865, Ashok Venkiteswaran)
|
||||
|
||||
2002-03-22 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gdk/win32/gdkgc-win32.c (gdk_win32_gc_set_dashes): Don't clear
|
||||
all of the pen_style, just the PS_STYLE_MASK. Seems to fix #74441,
|
||||
but that is just the special case of one-pixel wide one-pixel
|
||||
on-off dotted lines. To fully implement generic X11 style dashed
|
||||
lines a major rewrite would be needed.
|
||||
|
||||
2002-03-21 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkaccelgroup.c (gtk_accelerator_valid): Trivial typo
|
||||
fix. (Vitaly Tishkov, #75726)
|
||||
|
||||
Thu Mar 21 10:04:05 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkwindow.c (gdk_window_real_get_depth): Remove
|
||||
some left over debugging code with a G_BREAKPOINT()
|
||||
in it.
|
||||
|
||||
Wed Mar 20 19:33:31 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkcalendar.c (gtk_calendar_main_button): When
|
||||
changing months when the user clicks on a prev-month
|
||||
or next-month day, focus and select the new day.
|
||||
Ignore double clicks on prev-month, next-month days.
|
||||
(Based on suggestions from Andras Salamon, #74173)
|
||||
|
||||
* gtk/gtkcalendar.c: Implement the focused/unfocused
|
||||
selected color change.
|
||||
|
||||
2002-03-20 Alex Larsson <alexl@redhat.com>
|
||||
|
||||
Patches from Carlo E. Prelz <fluido@fluido.as>
|
||||
Now gtkfb at least compiles and mostly works. The keyboard
|
||||
stuff needs more loving.
|
||||
|
||||
* gdk/linux-fb/gdkkeyboard-fb.c (xlate_get_for_keyval,
|
||||
xlate_get_for_keycode, raw_get_for_keyval, raw_get_for_keycode):
|
||||
At least set the out parameters for these calls.
|
||||
|
||||
* gdk/linux-fb/gdkmain-fb.c:
|
||||
(gdk_pointer_grab_info_libgtk_only, gdk_keyboard_grab_info_libgtk_only):
|
||||
Implement new functions.
|
||||
|
||||
Wed Mar 20 19:00:03 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkentry.c (gtk_entry_set_text): Short-circuit
|
||||
the text to the exact same thing, so we don't
|
||||
unexpectedly change the selection or cursor position.
|
||||
(#74290, John Ellis.)
|
||||
|
||||
Thu Mar 21 00:05:14 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_get_background_area),
|
||||
(gtk_tree_view_get_cell_area): fix logic (fixes #74235, #73593)
|
||||
|
||||
Wed Mar 20 17:11:51 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkrc.c: Patch from Richard Hestilow to fix
|
||||
gtk-font-name changes for widgets that get the actual
|
||||
default style. (#73709)
|
||||
|
||||
Wed Mar 20 22:59:23 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtkrbtree.[ch]: add _gtk_rbtree_set_fixed_height()
|
||||
|
||||
* gtk/gtktreeprivate.h: add fixed_height_check field
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_init): initialize
|
||||
scroll_sync_timer and fixed_height_check
|
||||
(do_validate_rows): add fixed_height_check. If all validated rows
|
||||
in the first cycle have the same height, then we set that height for
|
||||
the entire tree. This is some sort of 'fake' optimization, but helps
|
||||
a lot for the common case. We keep validating the entire tree in
|
||||
the background though.
|
||||
(gtk_tree_view_set_model): reset fixed_height_check
|
||||
|
||||
Wed Mar 20 16:36:08 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/*.c: Patch from Erwann Chenede, #73900 fixing
|
||||
a lot of warnings with Forte CC, mostly implicit
|
||||
casts between void * and function pointers.
|
||||
|
||||
* gdk/gdkevents.c (gdk_event_get_state): GdkEventVisibility's
|
||||
state field is not a GdkModifierType. (Also #73900)
|
||||
|
||||
Wed Mar 20 12:35:22 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_grab_default): Remove
|
||||
leftover notification of has-default. (#75508, Jacob
|
||||
Berkman.)
|
||||
|
||||
Wed Mar 20 12:27:07 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkaccelgroup.c (gtk_accelerator_valid): Allow
|
||||
arrow keys as accelerators, as long as some modifier
|
||||
is pressed. (#75495)
|
||||
|
||||
* gtk/gtkaccelgroup.c (gtk_accelerator_valid): Fix
|
||||
incorrect example in the docs.
|
||||
|
||||
Wed Mar 20 12:06:30 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_set_child_visible):
|
||||
Fix segfault when widget->parent is NULL.
|
||||
(#75615, Alexey A. Malyshev)
|
||||
|
||||
Wed Mar 20 11:32:07 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkentry.c: Improve test to prevent infinite
|
||||
loop. (#74952, Thomas Leonard)
|
||||
|
||||
* gtk/gtkmenushell.c (gtk_real_menu_shell_cycle_focus):
|
||||
Fix warning when toplevel menu shell isn't a menu
|
||||
bar. (Thomas Leonard, #75602)
|
||||
|
||||
Wed Mar 20 11:00:59 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* configure.in: Use $PKG_CONFIG, not pkg-config.
|
||||
(LEE Sau Dan, #75572)
|
||||
|
||||
Wed Mar 20 10:55:56 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/x11/gdkevents-x11.c (gdk_event_translate): Fix assignment
|
||||
of time in scroll events. (Sven Neumann, #75574)
|
||||
|
||||
2002-03-20 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gdk/win32/gdkdnd-win32.c (gdk_drag_find_window): Use
|
||||
gdk_window_get_toplevel(), as it is the top-level windows that are
|
||||
registered for DND.
|
||||
|
||||
* gdk/win32/gdkwin32.h: Don't include gdkinternals.h.
|
||||
|
||||
2002-03-19 jacob berkman <jacob@ximian.com>
|
||||
|
||||
* gtk/gtkcombo.c (gtk_combo_find): fix infinite loop when
|
||||
gtk_combo_func() returns NULL (bug #75464)
|
||||
|
||||
2002-03-18 jacob berkman <jacob@ximian.com>
|
||||
|
||||
* gtk/gtkaspectframe.c (gtk_aspect_frame_class_init): set the
|
||||
correct min/max values for the ratio property (fixes #75331)
|
||||
|
||||
Mon Mar 18 11:55:03 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkimmulticontext.c (gtk_im_multicontext_get_slave):
|
||||
Patch from Yao Zhang fixing reference count leak.
|
||||
|
||||
* gtk/gtkentry.c (gtk_entry_key_release): if (entry->editable),
|
||||
not if (!entry->editable).
|
||||
|
||||
Mon Mar 18 11:09:17 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/x11/gdkwindow-x11.c (gdk_window_set_override_redirect):
|
||||
Fix backwards conditional. (#75019, Dan Winship.)
|
||||
|
||||
Sun Mar 17 01:11:16 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_size_request): use
|
||||
do_validate_rows instead of validate_rows_handler (fix by
|
||||
Mike Pieper, #74126)
|
||||
|
||||
Sat Mar 16 23:54:56 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gdk/x11/gdkwindow-x11.c (gdk_window_set_static_bit_gravity): just
|
||||
return when we have an input_only window (fix by Owen Taylor)
|
||||
|
||||
* gtk/gtktreeprivate.h (struct _GtkTreeViewPrivate): add
|
||||
scroll_sync_timer
|
||||
|
||||
* gtk/gtktreeview.c (install_scroll_sync_handler): new function,
|
||||
(scroll_sync_handler): ditto,
|
||||
(gtk_tree_view_unrealize): take scroll_sync_timer into account
|
||||
(gtk_tree_view_row_deleted): install scroll_sync_timer instead of
|
||||
calling top_row_to_dy/dy_to_top_row directly
|
||||
-- this greatly speeds up clearing the model (#73199)
|
||||
|
||||
* gtk/gtktreemodelsort.c
|
||||
(gtk_tree_model_sort_convert_path_to_child_path): fix up this function,
|
||||
for some reason I really screwed it up (fixes #74663)
|
||||
|
||||
2002-03-16 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* configure.in (GDK_PIXBUF_DEP_CFLAGS) (GDK_PIXBUF_XLIB_DEP_CFLAGS)
|
||||
(GDK_DEP_CFLAGS) (GTK_DEP_CFLAGS): include CFLAGS from gthread-2.0
|
||||
so that the libs work correctly in a threaded environment.
|
||||
|
||||
Fri Mar 15 12:51:42 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtktreeviewcolumn.c
|
||||
(gtk_tree_view_column_new_with_attributes): add example to docs,
|
||||
as people are seeming to have trouble with this function.
|
||||
|
||||
2002-03-15 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* configure.in: Set MATH_LIB to empty also on Win32.
|
||||
|
||||
Fri Mar 15 15:37:01 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/x11/gdkdrawable-x11.c (convert_to_format):
|
||||
Fix byte shift arithmetic for big-endian. (Tracked
|
||||
down with help from Tuomas Kuosmanen)
|
||||
|
||||
Fri Mar 15 11:28:41 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_insert_column_with_data_func):
|
||||
make args const, 74159
|
||||
(gtk_tree_view_insert_column_with_attributes): ditto
|
||||
|
||||
* gtk/gtktreeviewcolumn.c
|
||||
(gtk_tree_view_column_cell_process_action): remov unused variables.
|
||||
|
||||
Fri Mar 15 13:31:51 2002 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
* gtk/gtkmenu.c (gtk_menu_leave_notify): Fix test for "active
|
||||
submenu".
|
||||
|
||||
2002-03-15 Padraig O'Briain <padraig.obriain@sun.com>
|
||||
|
||||
* gdk/x11/gdkkeys-x11.c (update_keymaps): Fudge keymap to have lower
|
||||
upper case variants if there is only a single keysym per keycode and
|
||||
the key symbol has upper and lower case variants (#74512)
|
||||
|
||||
Thu Mar 14 17:09:52 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkwindow.c (gdk_window_process_all_updates): Fix rather
|
||||
improbable reentrancy problem if a window is destroyed
|
||||
while updates are being processed on another window. (Noticed
|
||||
by Michael Meeks, #74708)
|
||||
|
||||
2002-03-14 Vitaly Tishkov <tvv@sparc.spb.su>
|
||||
|
||||
* gtk/gtktreemodelsort.c
|
||||
typo in docs for gtk_tree_model_sort_convert_iter_to_child_iter() fixed
|
||||
|
||||
|
||||
Thu Mar 14 11:17:18 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkkeyhash.c (_gtk_key_hash_remove_entry): When
|
||||
removing keys from the key hash, reinsert the right list
|
||||
back into the hash. (Dave Camp, #74571)
|
||||
|
||||
Wed Mar 13 17:17:40 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkobject.h: Remove left-over GTK_OBJECT_CONNECTED
|
||||
macro that was defined in terms of the now-gone GTK_CONNECTED
|
||||
flag. (Seth Burgess, #74028)
|
||||
|
||||
Wed Mar 13 17:11:10 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkaccelgroup.c (accel_group_weak_ref_detach): Unset
|
||||
the acceleratable_groups qdata because qdata isn't removed
|
||||
on ->dispose but rather on ->finalize. (#74569, found
|
||||
by Matt Wilson.)
|
||||
|
||||
Tue Mar 12 23:14:23 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtktreeselection.c (gtk_tree_selection_unselect_iter): Fix
|
||||
cut-n-paste bug.
|
||||
|
||||
Sat Mar 9 18:23:25 2002 Richard Hestilow <hestilow@ximian.com>
|
||||
|
||||
* gtk/gtkimage.c (gtk_image_set_from_filename): Allow NULL
|
||||
filenames.
|
||||
|
||||
Tue Mar 12 10:50:09 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* modules/input/gtkimcontextxim.c (gtk_im_context_xim_filter_keypress):
|
||||
Fix incorrect return value, filter out returns of 0x7f for
|
||||
the delete key. (#74179, Kang Jeong-He)
|
||||
|
||||
Mon Mar 11 23:42:11 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtktreemodel.c (gtk_tree_model_foreach): fix totally broken
|
||||
foreach function.
|
||||
|
||||
2002-03-11 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkitemfactory.c (gtk_item_factory_add_foreign): Document
|
||||
gtk_{menu_item,widget}_set_accel_path() as the recommended API.
|
||||
(#69244)
|
||||
|
||||
2002-03-11 James Henstridge <james@daa.com.au>
|
||||
|
||||
* configure.in: set CCAS and CCASFLAGS to get automake 1.6
|
||||
compatibility without breaking things for people using 1.4.
|
||||
|
||||
Sun Mar 10 21:04:30 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_button_press): finally get the
|
||||
right behavior.
|
||||
|
||||
Mon Mar 11 01:25:14 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_button_press): compare path with
|
||||
cursor path and not with the selected iter in the 'decide to edit'
|
||||
check
|
||||
|
||||
4961
ChangeLog.pre-1-0
Normal file
9106
ChangeLog.pre-1-2
Normal file
28743
ChangeLog.pre-2-0
Normal file
896
ChangeLog.pre-2-10
Normal file
@@ -0,0 +1,896 @@
|
||||
2002-07-16 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
* gdk/gdkpixbuf-drawable.c (rgb565lsb): Fixed the LSB -> MSB case.
|
||||
Fixes #79463.
|
||||
(rgb565msb): Fix the MSB -> MSB case. Fixes #79190.
|
||||
|
||||
Fri Apr 19 16:30:09 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeprivate.h, gtk/gtktreeview.c: rename
|
||||
last_single_clicked{,_2} to last_button_press{,_2}, as the latter
|
||||
is a more sane name.
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_button_press): use ->priv->anchor
|
||||
instead of ->priv->cursor, check for the anchor at another place, as
|
||||
you can go in edit mode without having an anchor.
|
||||
|
||||
2002-04-18 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkitemfactory.c:
|
||||
* gtk/gtkiconfactory.c:
|
||||
* gtk/gtkwidget.c:
|
||||
* gtk/gtkstyle.c:
|
||||
* gtk/gtkrc.c:
|
||||
* gtk/gtktreeviewcolumn.c:
|
||||
* gtk/gtkdialog.c:
|
||||
* gtk/gtktreemodel.c: s/<!>/<!-- -->/g throughout the
|
||||
documentation to bring the produced Docbook closer to XML.
|
||||
|
||||
2002-04-18 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gdk-pixbuf/Makefile.am (uninstall-libtool-import-lib)
|
||||
* gdk/Makefile.am (uninstall-libtool-import-lib): Fix typo,
|
||||
thanks to David Sterba for noticing.
|
||||
|
||||
* gtk/gtkmain.h
|
||||
* gtk/gtkmain.c (gtk_init_abi_check, gtk_init_check_abi_check): In
|
||||
GTK+ 2.0 the GtkWindow struct actually is the same size in gcc on
|
||||
Win32 whether compiled with -fnative-struct or not. Unfortunately
|
||||
this wan't noticed until now. So, from now on, check some other
|
||||
struct, too, for which the use of -fnative-struct still
|
||||
matters. GtkBox is one such.
|
||||
|
||||
Thu Apr 18 00:23:31 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreemodelsort.c
|
||||
(gtk_tree_model_sort_convert_path_to_child_path): so this function
|
||||
was completely broken. Fix it and improve readability.
|
||||
|
||||
2002-04-17 Anders Carlsson <andersca@gnu.org>
|
||||
|
||||
* tests/testtreeedit.c (button_press_event): Add a small
|
||||
test case.
|
||||
|
||||
Wed Apr 17 00:21:36 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreestore.c (gtk_tree_store_insert_before): fix docs
|
||||
|
||||
Tue Apr 16 17:28:21 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_real_collapse_row): check
|
||||
->priv->cursor and ->priv->anchor rowrefs before removing
|
||||
node->children from the rbtree. Also check the
|
||||
->priv->last_single_clicked and ->priv->last_single_clicked_2 rowrefs
|
||||
(I think I really need to rename those two someday).
|
||||
|
||||
Tue Apr 16 07:53:49 2002 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkmenu.c (gtk_menu_key_press): don't install/change accelerators
|
||||
from locked accel groups.
|
||||
|
||||
* gtk/gtkwidget.c (_gtk_widget_get_accel_path): export whether the
|
||||
accel path is from a locked accel group.
|
||||
|
||||
Mon Apr 15 15:41:56 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtkcontainer.c (gtk_container_focus): include internal
|
||||
children when doing focus.
|
||||
(gtk_container_get_all_children): new static function to include
|
||||
internal children when making a list of them.
|
||||
|
||||
Sun Apr 14 16:56:59 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeprivate.h: add _gtk_tree_view_column_get_editable_cell and
|
||||
_gtk_tree_view_column_get_neighbor_sizes
|
||||
|
||||
* gtk/gtktreeviewcolumn.c (struct _GtkTreeViewColumnCellInfo): add
|
||||
real_width field,
|
||||
(_gtk_tree_view_column_get_editable_cell): implement,
|
||||
(gtk_tree_view_column_cell_process_action): fill info->real_width
|
||||
(_gtk_tree_view_column_get_neighbor_sizes): implement
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_button_press): make the "editable
|
||||
widget" show up with the same size as the actual cell, so it doesnt
|
||||
cover the complete column if there are any other cells in that column.
|
||||
|
||||
2002-04-14 Abigail Brady <morwen@evilmagic.org>
|
||||
|
||||
* gtk/gtkfilesel.c: Fix typo in message.
|
||||
|
||||
2002-04-13 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gdk/gdkpixbuf-drawable.c (gdk_pixbuf_get_from_drawable): create
|
||||
the target pixbuf AFTER filling in width/height, so that
|
||||
passing in -1 for width/height will work.
|
||||
|
||||
Sat Apr 13 22:49:45 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
Fixes #75510
|
||||
|
||||
* gtk/gtktreeselection.c (gtk_tree_selection_get_selected): make this
|
||||
function work correctly and more sane
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_real_collapse_row): remove
|
||||
node->children from rbtree before emitting GtkTreeSelection::changed
|
||||
|
||||
Sat Apr 13 17:15:12 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_init): dont set
|
||||
the mode to GTK_CELL_RENDERER_MODE_EDITABLE by default,
|
||||
(gtk_cell_renderer_text_class_init): for some reason our default for
|
||||
editable was TRUE, of course this is FALSE.
|
||||
(gtk_cell_renderer_text_set_property): update mode when editable
|
||||
has been changed.
|
||||
|
||||
2002-04-12 jacob berkman <jacob@ximian.com>
|
||||
|
||||
* gdk/x11/xsettings-client.c (fetch_card8): fix cut-n-paste bug
|
||||
which breaks big-endian machines (fixes #73585)
|
||||
|
||||
2002-04-12 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* gtk/gtknotebook.c (gtk_notebook_real_remove): relocate the
|
||||
remove_weak_pointer to just before we free the page, to be sure
|
||||
it doesn't get re-added. #75282
|
||||
|
||||
Fri Apr 12 18:32:46 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_real_set_cursor): add
|
||||
clamp_node argument
|
||||
(toplevel): update usages of gtk_tree_view_real_set_cursor,
|
||||
(gtk_tree_view_focus_to_cursor): don't let
|
||||
gtk_tree_view_real_set_cursor clamp the node, so you won't get
|
||||
unexpected scrolling
|
||||
|
||||
2002-04-11 Michael Meeks <michael@ximian.com>
|
||||
|
||||
* gtk/gtklabel.c
|
||||
(gtk_label_parse_uline, gtk_label_set_text),
|
||||
(gtk_label_set_text_with_mnemonic): add freeze / thaws
|
||||
to stop deluge of 'notify' signals.
|
||||
|
||||
Sat Apr 6 06:57:00 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkmenushell.[ch] gtk/gtkmenuitem.c: Export
|
||||
private _gtk_menu_shell_activate() to encapsulate
|
||||
cut-and-paste code.
|
||||
|
||||
* gtk/gtkmenubar.c: Select the first item on the menu bar
|
||||
for F10 rather than acting as if the user pressed <Alt>F
|
||||
to select the file manager.
|
||||
|
||||
Tue Apr 9 19:01:28 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
Fix problems with HandleBox and focusing - #78232
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_translate_coordinates): Handle
|
||||
GtkHandleBox / GnomeDock style window heirarchy / widget
|
||||
heirarchy disconnects. :-(.
|
||||
|
||||
* gtk/gtkcontainer.c: Handle failures from
|
||||
gtk_widget_translate_coordinates (Focusing is not right, but at
|
||||
least it doesn't go into infinite loops.)
|
||||
|
||||
Tue Apr 9 18:34:58 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkcontainer.c (_gtk_container_queue_resize): Always
|
||||
set the ALLOC_NEEDED and REQUEST_NEEDED flags up the hierarchy,
|
||||
even if we aren't currently in a resize container... we need
|
||||
this to properly handle size changes to widgets that are
|
||||
being moved from one heirarchy to another. (#78226)
|
||||
|
||||
Tue Apr 9 21:41:24 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
Fixes #78110
|
||||
|
||||
* gtk/gtktreeselection.c (_gtk_tree_selection_internal_select_node):
|
||||
add override_browse_mode argument and implement,
|
||||
(gtk_tree_selection_unselect_path): always unselect the path,
|
||||
(toplevel): update uses of _gtk_tree_selection_internal_select_node
|
||||
|
||||
* gtk/gtktreeview.c: update uses of
|
||||
_gtk_tree_selection_internal_select_node
|
||||
|
||||
* gtk/gtktreeprivate.h (_gtk_tree_selection_internal_select_node):
|
||||
update prototype
|
||||
|
||||
Tue Apr 9 21:39:44 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
Fixes #77862
|
||||
|
||||
* gtk/gtktreeprivate.h: add _gtk_tree_view_column_has_editable_cell
|
||||
|
||||
* gtk/gtktreeviewcolumn.c (_gtk_tree_view_column_has_editable_cell):
|
||||
new function
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_button_press): send cell event
|
||||
on first click when cell isn't editable
|
||||
|
||||
Tue Apr 9 21:37:31 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreedatalist.c (_gtk_tree_data_list_check_type): add some
|
||||
types which were missing and useful to use (fixes #77870)
|
||||
|
||||
2002-04-09 Anders Carlsson <andersca@gnu.org>
|
||||
|
||||
* gtk/gtkfilesel.c (open_new_dir): Initialize error to NULL.
|
||||
|
||||
2002-04-08 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* tests/testgtk.c: really revert testgtk.c
|
||||
|
||||
Mon Apr 8 20:28:54 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeselection.c (gtk_tree_selection_select_path),
|
||||
(gtk_tree_selection_unselect_path),
|
||||
(gtk_tree_selection_path_is_selected): check the return value of
|
||||
_gtk_tree_view_find_node and return if it's TRUE. This makes those
|
||||
functions work somewhat saner on non-expanded trees.
|
||||
|
||||
Fri Apr 5 18:28:56 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeselection.c (gtk_tree_selection_set_mode): free
|
||||
anchor row reference after unselecting the selection (fixes #76272)
|
||||
|
||||
Fri Apr 5 18:27:48 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_real_expand_row): only return
|
||||
when we don't have to open all children (fixes #75736)
|
||||
|
||||
Fri Apr 5 18:24:24 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_clear): unref
|
||||
cellrenderer after clearing the attributes of the renderer (fixes
|
||||
#75592)
|
||||
|
||||
Fri Apr 5 05:55:14 2002 Jonathan Blandford <jrb@gnome.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_grab_focus): implement.
|
||||
(gtk_tree_view_move_cursor_up_down): check for focus
|
||||
(gtk_tree_view_move_cursor_page_up_down): ditto
|
||||
(gtk_tree_view_move_cursor_left_right): ditto
|
||||
(gtk_tree_view_move_cursor_start_end): ditto
|
||||
(gtk_tree_view_real_select_all): ditto
|
||||
(gtk_tree_view_real_unselect_all): ditto
|
||||
(gtk_tree_view_real_select_cursor_row): ditto
|
||||
(gtk_tree_view_real_toggle_cursor_row): ditto
|
||||
(gtk_tree_view_real_expand_collapse_cursor_row): ditto
|
||||
(gtk_tree_view_real_select_cursor_parent): ditto
|
||||
(gtk_tree_view_real_start_interactive_search): ditto
|
||||
|
||||
* gtk/gtktreeviewcolumn.c: grab focus
|
||||
|
||||
2002-04-05 Alex Larsson <alexl@redhat.com>
|
||||
|
||||
* gdk/linux-fb/gdkkeyboard-fb.c (write_string):
|
||||
Fix undefined variable typo.
|
||||
Patch from Simon Floery <simon.floery@gmx.at>
|
||||
|
||||
Fri Apr 5 01:06:15 2002 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gdk/x11/gdkwindow-x11.c (set_text_property): fix segfault
|
||||
upon NULL return from gdk_utf8_to_string_target().
|
||||
|
||||
* gdk/x11/gdkselection-x11.c (gdk_utf8_to_string_target): fix
|
||||
return value comment to mention NULL returns upon EMFILE.
|
||||
|
||||
Thu Apr 4 22:35:42 2002 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
* tests/testgtk.c (menu_items): revert accidentally commited
|
||||
change to testgtk.c
|
||||
|
||||
Thu Apr 4 22:28:08 2002 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
* gtk/gtkmenuitem.c (gtk_menu_item_paint): Fix problem with menu
|
||||
titles being clipped (#75948)
|
||||
|
||||
2002-04-04 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gdk/gdkrgb.c: Fix some bugs, and introduce a minor feature.
|
||||
|
||||
(gdk_rgb_convert_4_pack): New function, for 16-color (4 bits per
|
||||
pixel) static visuals (fixes #858).
|
||||
|
||||
(gdk_rgb_convert_gray4_pack, gdk_rgb_convert_gray4_d_pack): Fix
|
||||
same bugs in both functions: Odd start coordinate (partial byte)
|
||||
was not handled correctly. Also a partial final byte was not
|
||||
handled correctly.
|
||||
|
||||
(gdk_rgb_do_colormaps): Use G_N_ELEMENTS.
|
||||
(gdk_rgb_create_info): For pseudocolor visuals, use the 2x2x2
|
||||
colorcube only for depths 3 and 4. For static color, use it for
|
||||
depths 3..7 like before. (Depth 5..7 pseudocolor probably never
|
||||
occurs on X11. It doesn't normally occur on Win32 either, but
|
||||
there is experimental code in gdkvisual-win32.c to let the user
|
||||
restrict the size of palette used.)
|
||||
(gdk_rgb_init): Set gdk_rgb_verbose if the GDK_DEBUG_GDKRGB flag
|
||||
is set.
|
||||
(gdk_rgb_select_conv): Use gdk_rgb_convert_8 also for depths 5, 6
|
||||
and 7 (see above). Use gdk_rgb_convert_4_pack for 4 bits per pixel
|
||||
static color.
|
||||
|
||||
Tue Apr 2 11:10:13 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtkliststore.c (gtk_list_store_set_sort_func): set the
|
||||
sort_func correctly, 77030
|
||||
|
||||
Tue Apr 2 13:44:27 2002 Tim Janik <timj@gtk.org>
|
||||
|
||||
* configure.in: update version to 2.0.2, binary age 2, interface
|
||||
age 2.
|
||||
|
||||
* NEWS: updates for 2.0.2.
|
||||
|
||||
Mon Apr 1 22:20:24 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_move_cursor_page_up_down): add
|
||||
check for y > tree_view->priv->height (fixes #76974)
|
||||
|
||||
Mon Apr 1 22:19:39 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreemodelsort.c (gtk_tree_model_sort_sort_level): get
|
||||
the stamp changes right this time
|
||||
|
||||
Mon Apr 1 22:13:24 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreemodel.c (gtk_tree_row_reference_free): only
|
||||
disconnect the ref callbacks when model == proxy (Thanks go to
|
||||
Manuel Clos Crespo for the remote debugging)
|
||||
|
||||
Sat Mar 30 15:19:24 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreemodelsort.c: revert the latest stamp increment changes,
|
||||
as it broke stuff for trees
|
||||
|
||||
Fri Mar 29 18:15:12 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* ===== Released 2.0.1 ======
|
||||
|
||||
Fri Mar 29 18:09:18 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkaccelgroup.c (gtk_accel_group_query): Call
|
||||
gdk_keyval_to_lower() on the key passed in, since we
|
||||
lowercase all other key vals passed in, so querying
|
||||
keyvals will otherwise fail if the caller used
|
||||
an uppercase accelerators (#76899, Vitaly Tishkov)
|
||||
|
||||
Fri Mar 29 17:41:21 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkmain.c (load_modules): Fix screwup in handling
|
||||
of module path that was resulting in freed memory being
|
||||
accessed when both GTK_MODULES and a theme were set.
|
||||
(#76902, Johan Dahlin)
|
||||
|
||||
Fri Mar 29 17:57:36 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkiconfactory.c (get_default_icons): Fix wrong
|
||||
stock id's for ADD/REMOVE. (#76915, Vitaly Tishkov)
|
||||
|
||||
2002-03-29 Hans Breuer <hans@breuer.org>
|
||||
|
||||
* gtk/gtkmain.h : fix typo in gtk_init_check macro, which
|
||||
caused crashes if argc != 0
|
||||
|
||||
* gtk/stock-icons/makefile.msc : added new icons
|
||||
|
||||
Fri Mar 29 20:17:35 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreemodelsort.c (gtk_tree_model_sort_rows_reordered):
|
||||
remove call to gtk_tree_model_sort_increment_stamp
|
||||
(gtk_tree_model_sort_sort_level): always increment the stamp
|
||||
|
||||
Fri Mar 29 00:19:41 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* NEWS: Updates
|
||||
|
||||
* configure.in: Version 2.0.1, binary, interface age 1.
|
||||
|
||||
* configure.in (GDK_PIXBUF_VERSION): Up required versions
|
||||
of dependencies.
|
||||
|
||||
* gtk/gtkiconfactory.c gtk/stock-icons/Makefile.am:
|
||||
Add stock_add/remove_16.
|
||||
|
||||
Thu Mar 28 18:38:30 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtk[hv]paned.c (gtk_[hv]paned_size_allocate):
|
||||
Don't show the window unless the widget is mapped.
|
||||
(#76742, Dennis Björklund, Soeren Sandmann)
|
||||
|
||||
2002-03-29 Hans Breuer <hans@breuer.org>
|
||||
|
||||
Fixed dashed line issues (#74441) to an IMO reasonable extend.
|
||||
That is: use PS_USERSTYLE on WinNT (the next GDI limit appears
|
||||
to be with lines width > 50); Render horizontal and vertical
|
||||
dashed lines on Win9x 'by hand'. Dotted selection rectangles
|
||||
and Dia look nice ...
|
||||
|
||||
* gdk/win32/gdkprivate-win32.h : add pen_dashes pointer and
|
||||
num_pen_dashes to _GdkGCWin32
|
||||
* gdk/win32/gdkgc-win32.c : initialize pen_dashes and remove
|
||||
the guesses from dashes to windoze line styles.
|
||||
(predraw_set_forground) : always ExtCreatePen (PS_SOLID) on
|
||||
Win9x, which does not support PS_USERSTYLE.
|
||||
* gdk/win32/gdkdrawable-win32.c : new functions render_line_
|
||||
<horizontal|vertical>. Use them if not running on NT in
|
||||
gdk_win32_draw_<rectangle|segments|lines> ()
|
||||
|
||||
* gdk/win32/gdkkeys-win32.c (gdk_keyval_name) : return NULL
|
||||
for keyval == 0 to avoid to have zeros in all menu entries
|
||||
without accelerator.
|
||||
|
||||
2002-03-29 Jakub Steiner <jimmac@ximian.com>
|
||||
|
||||
* gtk/stock-icons/stock_add_24.png:
|
||||
* gtk/stock-icons/stock_add_16.png:
|
||||
* gtk/stock-icons/stock_remove_24.png:
|
||||
* gtk/stock-icons/stock_remove_16.png: use a simple '+' and '-',
|
||||
works better. the old box was too clumsy
|
||||
|
||||
Thu Mar 28 21:11:04 2002 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkfilesel.c (open_new_dir): when encountering non-UTF-8 file
|
||||
names, alert the user with g_message() instead of g_warning() and
|
||||
put out the actual conversion error.
|
||||
|
||||
2002-03-28 Dave Camp <dave@ximian.com>
|
||||
|
||||
* gtk/gtktreeview.c (install_scroll_sync_handler): Don't install
|
||||
the handler if the widget isn't realized.
|
||||
|
||||
2002-03-28 Jakub Steiner <jimmac@ximian.com>
|
||||
|
||||
* gtk/stock-icons/stock_font*:
|
||||
* gtk/stock-icons/stock_align*:
|
||||
* gtk/stock-icons/stock_text*: better solution to the dark theme
|
||||
problem. Also looks more pretty IMHO
|
||||
|
||||
2002-03-27 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* configure.in: Try to find libpng via pkg-config first,
|
||||
since libpng-1.2.2 will come with a .pc file.
|
||||
|
||||
Wed Mar 27 11:10:39 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtknotebook.c (gtk_notebook_real_remove): Set
|
||||
page->last_focus_child to NULL as well as removing the
|
||||
weak reference, to deal with reentrancy in set_focus_child().
|
||||
(#76634, Dennis Björklund)
|
||||
|
||||
2002-03-27 Murray Cumming <murrayc@usa.net>
|
||||
|
||||
* gtk/gtktreeview.c: Corrected registered return type of
|
||||
"move-cursor" signal. Had to add a marshaller to
|
||||
gtk/gtkmarshalers.list.
|
||||
|
||||
Tue Mar 26 14:46:50 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkmenu.c (gtk_menu_popup): Shuffle the ordering around
|
||||
some more (position before realizing) fixing problems with
|
||||
arrows popping up at the wrong time (#73386), hopefully not
|
||||
introducing other problems. (Reported by Ettore Perrazoli, others)
|
||||
|
||||
2002-03-26 Dave Camp <dave@ximian.com>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_button_press): Free the path
|
||||
after calling gtk_tree_view_row_activated() rather than before.
|
||||
|
||||
2002-03-25 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* gtk/gtkrc.c (gtk_rc_parse_font_name): free the style's
|
||||
font_description before assigning a new one.
|
||||
(gtk_rc_parse_stock): always unref the created icon_set. #76289
|
||||
|
||||
2002-03-25 Mark McLoughlin <mark@skynet.ie>
|
||||
|
||||
* gtk/gtkbindings.c: (gtk_binding_entry_add_signal),
|
||||
kill code duplicated in gtk_binding_entry_add_signall.
|
||||
|
||||
Sun Mar 24 10:32:38 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtktreemodel.c (gtk_tree_path_copy): Make path arg const, #75653
|
||||
|
||||
* gtk/gtkfontsel.c (gtk_font_selection_show_available_styles): fix
|
||||
a warning
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_button_press): remove the grab
|
||||
when we emit row_activated so that listeners of this signal can
|
||||
grab the mouse, #75629
|
||||
|
||||
2002-03-23 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gtk/gtktextlayout.c (gtk_text_layout_real_invalidate):
|
||||
invalidate the line containing start, even if the [start,end)
|
||||
range is empty (just invalidate [start,end], essentially).
|
||||
Partially fixes #72374
|
||||
|
||||
2002-03-23 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gtk/gtktextview.c (gtk_text_view_do_popup): end any selection in
|
||||
progress, patch from db@zigo.dhs.org, #74620
|
||||
|
||||
2002-03-23 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gtk/gtktextview.c (gtk_text_view_move_cursor_internal): extend
|
||||
selection for pageup/pagedown and ctrl+pageup/pagedown if
|
||||
shift is held. more of #53934
|
||||
|
||||
2002-03-23 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gtk/gtktextview.c (gtk_text_view_destroy_layout): disconnect
|
||||
layout handlers earlier in the function, to avoid possible
|
||||
reentrancy screwups
|
||||
(gtk_text_view_invalidate): Don't install idle handlers if
|
||||
layout == NULL, otherwise we get problems during finalization
|
||||
since clearing the buffer invalidates and puts the idle handlers
|
||||
back after we destroy the layout. #74660
|
||||
(gtk_text_view_ensure_layout): Install the validation handlers
|
||||
right after creating the layout.
|
||||
|
||||
* gtk/gtktexttagtable.c (foreach_unref): call
|
||||
_gtk_text_buffer_notify_will_remove_tag(), #75126
|
||||
|
||||
2002-03-22 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gdk/x11/gdkfont-x11.c (gdk_fontset_load): add more explanatory
|
||||
text to the error message about missing charsets, and use
|
||||
g_printerr() not g_warning() since this is typically not a
|
||||
programming error (we do not export any API to ask whether
|
||||
a font set will have missing charsets so apps realistically can't
|
||||
do anything other than try the gdk_fontset_load())
|
||||
|
||||
* gtk/gtktextview.c (gtk_text_view_key_press_event): return FALSE
|
||||
if the text view isn't editable and the user presses Return,
|
||||
so default buttons and such can be activated, #74937
|
||||
|
||||
* gtk/gtktextbuffer.c (paste_from_buffer): don't insert
|
||||
if the insertion point is not editable and the paste
|
||||
is interactive, #74125
|
||||
|
||||
* gtk/gtkwindow.c (gtk_window_move_resize): enhance the #if 0
|
||||
debug spew
|
||||
|
||||
* gtk/gtktextbuffer.c (cut_or_copy): only remove the previous
|
||||
cut/copied data right before replacing it, when we know we are
|
||||
going to replace it. Fixes #74049
|
||||
|
||||
2002-03-22 Richard Hult <rhult@codefactory.se>
|
||||
|
||||
* gdk/gdkevents.c (gdk_event_get_root_coords): Fix typo, where x
|
||||
value was assigned to both x and y.
|
||||
|
||||
Fri Mar 22 11:29:11 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
Partial fix for problem where keypad keys acted
|
||||
as shift-arrows in an entry rather than arrows (#74327)
|
||||
|
||||
* gtk/gtkkeyhash.c (_gtk_key_hash_lookup): Sort lookup
|
||||
results by number of modifiers in the entry. Fixes
|
||||
problem where if a key matched both modified and unmodified
|
||||
key bindings ... e.g., the distinguishing key binding
|
||||
was consumed, then it was random which was used.
|
||||
|
||||
* gtk/gtkbindings.c (gtk_binding_entries_sort_patterns):
|
||||
Catch the case where there are multiple entries from the
|
||||
same bindingset (with different modifiers), and use only
|
||||
the first entry, which, with the change in _gtk_key_hash_lookup()
|
||||
will be the preferred value.
|
||||
|
||||
Fri Mar 22 10:56:19 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkaccelmap.c (gtk_accel_map_save_fd): Fix memory
|
||||
leak. (#74400, Morten Welinder.)
|
||||
|
||||
* gtk/gtkaccelmap.c: Properly handle short returns from
|
||||
write() calls. (Handling EINTR isn't enough... that only
|
||||
handles the case where you were interrupted before you
|
||||
wrote a single byte.)
|
||||
|
||||
* gdk/linux-fb/gdkmouse-fb.c gdk/linux-fb/gdkkeyboard-fb.c:
|
||||
Robustify against short returns from write() calls.
|
||||
|
||||
Fri Mar 22 10:12:10 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtktextview.c (gtk_text_view_paint): Change
|
||||
G_BREAKPOINT() to g_assert_not_reached ().
|
||||
(#75865, Ashok Venkiteswaran)
|
||||
|
||||
2002-03-22 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gdk/win32/gdkgc-win32.c (gdk_win32_gc_set_dashes): Don't clear
|
||||
all of the pen_style, just the PS_STYLE_MASK. Seems to fix #74441,
|
||||
but that is just the special case of one-pixel wide one-pixel
|
||||
on-off dotted lines. To fully implement generic X11 style dashed
|
||||
lines a major rewrite would be needed.
|
||||
|
||||
2002-03-21 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkaccelgroup.c (gtk_accelerator_valid): Trivial typo
|
||||
fix. (Vitaly Tishkov, #75726)
|
||||
|
||||
Thu Mar 21 10:04:05 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkwindow.c (gdk_window_real_get_depth): Remove
|
||||
some left over debugging code with a G_BREAKPOINT()
|
||||
in it.
|
||||
|
||||
Wed Mar 20 19:33:31 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkcalendar.c (gtk_calendar_main_button): When
|
||||
changing months when the user clicks on a prev-month
|
||||
or next-month day, focus and select the new day.
|
||||
Ignore double clicks on prev-month, next-month days.
|
||||
(Based on suggestions from Andras Salamon, #74173)
|
||||
|
||||
* gtk/gtkcalendar.c: Implement the focused/unfocused
|
||||
selected color change.
|
||||
|
||||
2002-03-20 Alex Larsson <alexl@redhat.com>
|
||||
|
||||
Patches from Carlo E. Prelz <fluido@fluido.as>
|
||||
Now gtkfb at least compiles and mostly works. The keyboard
|
||||
stuff needs more loving.
|
||||
|
||||
* gdk/linux-fb/gdkkeyboard-fb.c (xlate_get_for_keyval,
|
||||
xlate_get_for_keycode, raw_get_for_keyval, raw_get_for_keycode):
|
||||
At least set the out parameters for these calls.
|
||||
|
||||
* gdk/linux-fb/gdkmain-fb.c:
|
||||
(gdk_pointer_grab_info_libgtk_only, gdk_keyboard_grab_info_libgtk_only):
|
||||
Implement new functions.
|
||||
|
||||
Wed Mar 20 19:00:03 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkentry.c (gtk_entry_set_text): Short-circuit
|
||||
the text to the exact same thing, so we don't
|
||||
unexpectedly change the selection or cursor position.
|
||||
(#74290, John Ellis.)
|
||||
|
||||
Thu Mar 21 00:05:14 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_get_background_area),
|
||||
(gtk_tree_view_get_cell_area): fix logic (fixes #74235, #73593)
|
||||
|
||||
Wed Mar 20 17:11:51 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkrc.c: Patch from Richard Hestilow to fix
|
||||
gtk-font-name changes for widgets that get the actual
|
||||
default style. (#73709)
|
||||
|
||||
Wed Mar 20 22:59:23 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtkrbtree.[ch]: add _gtk_rbtree_set_fixed_height()
|
||||
|
||||
* gtk/gtktreeprivate.h: add fixed_height_check field
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_init): initialize
|
||||
scroll_sync_timer and fixed_height_check
|
||||
(do_validate_rows): add fixed_height_check. If all validated rows
|
||||
in the first cycle have the same height, then we set that height for
|
||||
the entire tree. This is some sort of 'fake' optimization, but helps
|
||||
a lot for the common case. We keep validating the entire tree in
|
||||
the background though.
|
||||
(gtk_tree_view_set_model): reset fixed_height_check
|
||||
|
||||
Wed Mar 20 16:36:08 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/*.c: Patch from Erwann Chenede, #73900 fixing
|
||||
a lot of warnings with Forte CC, mostly implicit
|
||||
casts between void * and function pointers.
|
||||
|
||||
* gdk/gdkevents.c (gdk_event_get_state): GdkEventVisibility's
|
||||
state field is not a GdkModifierType. (Also #73900)
|
||||
|
||||
Wed Mar 20 12:35:22 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_grab_default): Remove
|
||||
leftover notification of has-default. (#75508, Jacob
|
||||
Berkman.)
|
||||
|
||||
Wed Mar 20 12:27:07 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkaccelgroup.c (gtk_accelerator_valid): Allow
|
||||
arrow keys as accelerators, as long as some modifier
|
||||
is pressed. (#75495)
|
||||
|
||||
* gtk/gtkaccelgroup.c (gtk_accelerator_valid): Fix
|
||||
incorrect example in the docs.
|
||||
|
||||
Wed Mar 20 12:06:30 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_set_child_visible):
|
||||
Fix segfault when widget->parent is NULL.
|
||||
(#75615, Alexey A. Malyshev)
|
||||
|
||||
Wed Mar 20 11:32:07 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkentry.c: Improve test to prevent infinite
|
||||
loop. (#74952, Thomas Leonard)
|
||||
|
||||
* gtk/gtkmenushell.c (gtk_real_menu_shell_cycle_focus):
|
||||
Fix warning when toplevel menu shell isn't a menu
|
||||
bar. (Thomas Leonard, #75602)
|
||||
|
||||
Wed Mar 20 11:00:59 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* configure.in: Use $PKG_CONFIG, not pkg-config.
|
||||
(LEE Sau Dan, #75572)
|
||||
|
||||
Wed Mar 20 10:55:56 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/x11/gdkevents-x11.c (gdk_event_translate): Fix assignment
|
||||
of time in scroll events. (Sven Neumann, #75574)
|
||||
|
||||
2002-03-20 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gdk/win32/gdkdnd-win32.c (gdk_drag_find_window): Use
|
||||
gdk_window_get_toplevel(), as it is the top-level windows that are
|
||||
registered for DND.
|
||||
|
||||
* gdk/win32/gdkwin32.h: Don't include gdkinternals.h.
|
||||
|
||||
2002-03-19 jacob berkman <jacob@ximian.com>
|
||||
|
||||
* gtk/gtkcombo.c (gtk_combo_find): fix infinite loop when
|
||||
gtk_combo_func() returns NULL (bug #75464)
|
||||
|
||||
2002-03-18 jacob berkman <jacob@ximian.com>
|
||||
|
||||
* gtk/gtkaspectframe.c (gtk_aspect_frame_class_init): set the
|
||||
correct min/max values for the ratio property (fixes #75331)
|
||||
|
||||
Mon Mar 18 11:55:03 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkimmulticontext.c (gtk_im_multicontext_get_slave):
|
||||
Patch from Yao Zhang fixing reference count leak.
|
||||
|
||||
* gtk/gtkentry.c (gtk_entry_key_release): if (entry->editable),
|
||||
not if (!entry->editable).
|
||||
|
||||
Mon Mar 18 11:09:17 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/x11/gdkwindow-x11.c (gdk_window_set_override_redirect):
|
||||
Fix backwards conditional. (#75019, Dan Winship.)
|
||||
|
||||
Sun Mar 17 01:11:16 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_size_request): use
|
||||
do_validate_rows instead of validate_rows_handler (fix by
|
||||
Mike Pieper, #74126)
|
||||
|
||||
Sat Mar 16 23:54:56 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gdk/x11/gdkwindow-x11.c (gdk_window_set_static_bit_gravity): just
|
||||
return when we have an input_only window (fix by Owen Taylor)
|
||||
|
||||
* gtk/gtktreeprivate.h (struct _GtkTreeViewPrivate): add
|
||||
scroll_sync_timer
|
||||
|
||||
* gtk/gtktreeview.c (install_scroll_sync_handler): new function,
|
||||
(scroll_sync_handler): ditto,
|
||||
(gtk_tree_view_unrealize): take scroll_sync_timer into account
|
||||
(gtk_tree_view_row_deleted): install scroll_sync_timer instead of
|
||||
calling top_row_to_dy/dy_to_top_row directly
|
||||
-- this greatly speeds up clearing the model (#73199)
|
||||
|
||||
* gtk/gtktreemodelsort.c
|
||||
(gtk_tree_model_sort_convert_path_to_child_path): fix up this function,
|
||||
for some reason I really screwed it up (fixes #74663)
|
||||
|
||||
2002-03-16 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* configure.in (GDK_PIXBUF_DEP_CFLAGS) (GDK_PIXBUF_XLIB_DEP_CFLAGS)
|
||||
(GDK_DEP_CFLAGS) (GTK_DEP_CFLAGS): include CFLAGS from gthread-2.0
|
||||
so that the libs work correctly in a threaded environment.
|
||||
|
||||
Fri Mar 15 12:51:42 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtktreeviewcolumn.c
|
||||
(gtk_tree_view_column_new_with_attributes): add example to docs,
|
||||
as people are seeming to have trouble with this function.
|
||||
|
||||
2002-03-15 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* configure.in: Set MATH_LIB to empty also on Win32.
|
||||
|
||||
Fri Mar 15 15:37:01 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/x11/gdkdrawable-x11.c (convert_to_format):
|
||||
Fix byte shift arithmetic for big-endian. (Tracked
|
||||
down with help from Tuomas Kuosmanen)
|
||||
|
||||
Fri Mar 15 11:28:41 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_insert_column_with_data_func):
|
||||
make args const, 74159
|
||||
(gtk_tree_view_insert_column_with_attributes): ditto
|
||||
|
||||
* gtk/gtktreeviewcolumn.c
|
||||
(gtk_tree_view_column_cell_process_action): remov unused variables.
|
||||
|
||||
Fri Mar 15 13:31:51 2002 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
* gtk/gtkmenu.c (gtk_menu_leave_notify): Fix test for "active
|
||||
submenu".
|
||||
|
||||
2002-03-15 Padraig O'Briain <padraig.obriain@sun.com>
|
||||
|
||||
* gdk/x11/gdkkeys-x11.c (update_keymaps): Fudge keymap to have lower
|
||||
upper case variants if there is only a single keysym per keycode and
|
||||
the key symbol has upper and lower case variants (#74512)
|
||||
|
||||
Thu Mar 14 17:09:52 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkwindow.c (gdk_window_process_all_updates): Fix rather
|
||||
improbable reentrancy problem if a window is destroyed
|
||||
while updates are being processed on another window. (Noticed
|
||||
by Michael Meeks, #74708)
|
||||
|
||||
2002-03-14 Vitaly Tishkov <tvv@sparc.spb.su>
|
||||
|
||||
* gtk/gtktreemodelsort.c
|
||||
typo in docs for gtk_tree_model_sort_convert_iter_to_child_iter() fixed
|
||||
|
||||
|
||||
Thu Mar 14 11:17:18 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkkeyhash.c (_gtk_key_hash_remove_entry): When
|
||||
removing keys from the key hash, reinsert the right list
|
||||
back into the hash. (Dave Camp, #74571)
|
||||
|
||||
Wed Mar 13 17:17:40 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkobject.h: Remove left-over GTK_OBJECT_CONNECTED
|
||||
macro that was defined in terms of the now-gone GTK_CONNECTED
|
||||
flag. (Seth Burgess, #74028)
|
||||
|
||||
Wed Mar 13 17:11:10 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkaccelgroup.c (accel_group_weak_ref_detach): Unset
|
||||
the acceleratable_groups qdata because qdata isn't removed
|
||||
on ->dispose but rather on ->finalize. (#74569, found
|
||||
by Matt Wilson.)
|
||||
|
||||
Tue Mar 12 23:14:23 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtktreeselection.c (gtk_tree_selection_unselect_iter): Fix
|
||||
cut-n-paste bug.
|
||||
|
||||
Sat Mar 9 18:23:25 2002 Richard Hestilow <hestilow@ximian.com>
|
||||
|
||||
* gtk/gtkimage.c (gtk_image_set_from_filename): Allow NULL
|
||||
filenames.
|
||||
|
||||
Tue Mar 12 10:50:09 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* modules/input/gtkimcontextxim.c (gtk_im_context_xim_filter_keypress):
|
||||
Fix incorrect return value, filter out returns of 0x7f for
|
||||
the delete key. (#74179, Kang Jeong-He)
|
||||
|
||||
Mon Mar 11 23:42:11 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtktreemodel.c (gtk_tree_model_foreach): fix totally broken
|
||||
foreach function.
|
||||
|
||||
2002-03-11 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkitemfactory.c (gtk_item_factory_add_foreign): Document
|
||||
gtk_{menu_item,widget}_set_accel_path() as the recommended API.
|
||||
(#69244)
|
||||
|
||||
2002-03-11 James Henstridge <james@daa.com.au>
|
||||
|
||||
* configure.in: set CCAS and CCASFLAGS to get automake 1.6
|
||||
compatibility without breaking things for people using 1.4.
|
||||
|
||||
Sun Mar 10 21:04:30 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_button_press): finally get the
|
||||
right behavior.
|
||||
|
||||
Mon Mar 11 01:25:14 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_button_press): compare path with
|
||||
cursor path and not with the selected iter in the 'decide to edit'
|
||||
check
|
||||
|
||||
896
ChangeLog.pre-2-2
Normal file
@@ -0,0 +1,896 @@
|
||||
2002-07-16 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
* gdk/gdkpixbuf-drawable.c (rgb565lsb): Fixed the LSB -> MSB case.
|
||||
Fixes #79463.
|
||||
(rgb565msb): Fix the MSB -> MSB case. Fixes #79190.
|
||||
|
||||
Fri Apr 19 16:30:09 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeprivate.h, gtk/gtktreeview.c: rename
|
||||
last_single_clicked{,_2} to last_button_press{,_2}, as the latter
|
||||
is a more sane name.
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_button_press): use ->priv->anchor
|
||||
instead of ->priv->cursor, check for the anchor at another place, as
|
||||
you can go in edit mode without having an anchor.
|
||||
|
||||
2002-04-18 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkitemfactory.c:
|
||||
* gtk/gtkiconfactory.c:
|
||||
* gtk/gtkwidget.c:
|
||||
* gtk/gtkstyle.c:
|
||||
* gtk/gtkrc.c:
|
||||
* gtk/gtktreeviewcolumn.c:
|
||||
* gtk/gtkdialog.c:
|
||||
* gtk/gtktreemodel.c: s/<!>/<!-- -->/g throughout the
|
||||
documentation to bring the produced Docbook closer to XML.
|
||||
|
||||
2002-04-18 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gdk-pixbuf/Makefile.am (uninstall-libtool-import-lib)
|
||||
* gdk/Makefile.am (uninstall-libtool-import-lib): Fix typo,
|
||||
thanks to David Sterba for noticing.
|
||||
|
||||
* gtk/gtkmain.h
|
||||
* gtk/gtkmain.c (gtk_init_abi_check, gtk_init_check_abi_check): In
|
||||
GTK+ 2.0 the GtkWindow struct actually is the same size in gcc on
|
||||
Win32 whether compiled with -fnative-struct or not. Unfortunately
|
||||
this wan't noticed until now. So, from now on, check some other
|
||||
struct, too, for which the use of -fnative-struct still
|
||||
matters. GtkBox is one such.
|
||||
|
||||
Thu Apr 18 00:23:31 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreemodelsort.c
|
||||
(gtk_tree_model_sort_convert_path_to_child_path): so this function
|
||||
was completely broken. Fix it and improve readability.
|
||||
|
||||
2002-04-17 Anders Carlsson <andersca@gnu.org>
|
||||
|
||||
* tests/testtreeedit.c (button_press_event): Add a small
|
||||
test case.
|
||||
|
||||
Wed Apr 17 00:21:36 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreestore.c (gtk_tree_store_insert_before): fix docs
|
||||
|
||||
Tue Apr 16 17:28:21 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_real_collapse_row): check
|
||||
->priv->cursor and ->priv->anchor rowrefs before removing
|
||||
node->children from the rbtree. Also check the
|
||||
->priv->last_single_clicked and ->priv->last_single_clicked_2 rowrefs
|
||||
(I think I really need to rename those two someday).
|
||||
|
||||
Tue Apr 16 07:53:49 2002 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkmenu.c (gtk_menu_key_press): don't install/change accelerators
|
||||
from locked accel groups.
|
||||
|
||||
* gtk/gtkwidget.c (_gtk_widget_get_accel_path): export whether the
|
||||
accel path is from a locked accel group.
|
||||
|
||||
Mon Apr 15 15:41:56 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtkcontainer.c (gtk_container_focus): include internal
|
||||
children when doing focus.
|
||||
(gtk_container_get_all_children): new static function to include
|
||||
internal children when making a list of them.
|
||||
|
||||
Sun Apr 14 16:56:59 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeprivate.h: add _gtk_tree_view_column_get_editable_cell and
|
||||
_gtk_tree_view_column_get_neighbor_sizes
|
||||
|
||||
* gtk/gtktreeviewcolumn.c (struct _GtkTreeViewColumnCellInfo): add
|
||||
real_width field,
|
||||
(_gtk_tree_view_column_get_editable_cell): implement,
|
||||
(gtk_tree_view_column_cell_process_action): fill info->real_width
|
||||
(_gtk_tree_view_column_get_neighbor_sizes): implement
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_button_press): make the "editable
|
||||
widget" show up with the same size as the actual cell, so it doesnt
|
||||
cover the complete column if there are any other cells in that column.
|
||||
|
||||
2002-04-14 Abigail Brady <morwen@evilmagic.org>
|
||||
|
||||
* gtk/gtkfilesel.c: Fix typo in message.
|
||||
|
||||
2002-04-13 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gdk/gdkpixbuf-drawable.c (gdk_pixbuf_get_from_drawable): create
|
||||
the target pixbuf AFTER filling in width/height, so that
|
||||
passing in -1 for width/height will work.
|
||||
|
||||
Sat Apr 13 22:49:45 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
Fixes #75510
|
||||
|
||||
* gtk/gtktreeselection.c (gtk_tree_selection_get_selected): make this
|
||||
function work correctly and more sane
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_real_collapse_row): remove
|
||||
node->children from rbtree before emitting GtkTreeSelection::changed
|
||||
|
||||
Sat Apr 13 17:15:12 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_init): dont set
|
||||
the mode to GTK_CELL_RENDERER_MODE_EDITABLE by default,
|
||||
(gtk_cell_renderer_text_class_init): for some reason our default for
|
||||
editable was TRUE, of course this is FALSE.
|
||||
(gtk_cell_renderer_text_set_property): update mode when editable
|
||||
has been changed.
|
||||
|
||||
2002-04-12 jacob berkman <jacob@ximian.com>
|
||||
|
||||
* gdk/x11/xsettings-client.c (fetch_card8): fix cut-n-paste bug
|
||||
which breaks big-endian machines (fixes #73585)
|
||||
|
||||
2002-04-12 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* gtk/gtknotebook.c (gtk_notebook_real_remove): relocate the
|
||||
remove_weak_pointer to just before we free the page, to be sure
|
||||
it doesn't get re-added. #75282
|
||||
|
||||
Fri Apr 12 18:32:46 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_real_set_cursor): add
|
||||
clamp_node argument
|
||||
(toplevel): update usages of gtk_tree_view_real_set_cursor,
|
||||
(gtk_tree_view_focus_to_cursor): don't let
|
||||
gtk_tree_view_real_set_cursor clamp the node, so you won't get
|
||||
unexpected scrolling
|
||||
|
||||
2002-04-11 Michael Meeks <michael@ximian.com>
|
||||
|
||||
* gtk/gtklabel.c
|
||||
(gtk_label_parse_uline, gtk_label_set_text),
|
||||
(gtk_label_set_text_with_mnemonic): add freeze / thaws
|
||||
to stop deluge of 'notify' signals.
|
||||
|
||||
Sat Apr 6 06:57:00 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkmenushell.[ch] gtk/gtkmenuitem.c: Export
|
||||
private _gtk_menu_shell_activate() to encapsulate
|
||||
cut-and-paste code.
|
||||
|
||||
* gtk/gtkmenubar.c: Select the first item on the menu bar
|
||||
for F10 rather than acting as if the user pressed <Alt>F
|
||||
to select the file manager.
|
||||
|
||||
Tue Apr 9 19:01:28 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
Fix problems with HandleBox and focusing - #78232
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_translate_coordinates): Handle
|
||||
GtkHandleBox / GnomeDock style window heirarchy / widget
|
||||
heirarchy disconnects. :-(.
|
||||
|
||||
* gtk/gtkcontainer.c: Handle failures from
|
||||
gtk_widget_translate_coordinates (Focusing is not right, but at
|
||||
least it doesn't go into infinite loops.)
|
||||
|
||||
Tue Apr 9 18:34:58 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkcontainer.c (_gtk_container_queue_resize): Always
|
||||
set the ALLOC_NEEDED and REQUEST_NEEDED flags up the hierarchy,
|
||||
even if we aren't currently in a resize container... we need
|
||||
this to properly handle size changes to widgets that are
|
||||
being moved from one heirarchy to another. (#78226)
|
||||
|
||||
Tue Apr 9 21:41:24 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
Fixes #78110
|
||||
|
||||
* gtk/gtktreeselection.c (_gtk_tree_selection_internal_select_node):
|
||||
add override_browse_mode argument and implement,
|
||||
(gtk_tree_selection_unselect_path): always unselect the path,
|
||||
(toplevel): update uses of _gtk_tree_selection_internal_select_node
|
||||
|
||||
* gtk/gtktreeview.c: update uses of
|
||||
_gtk_tree_selection_internal_select_node
|
||||
|
||||
* gtk/gtktreeprivate.h (_gtk_tree_selection_internal_select_node):
|
||||
update prototype
|
||||
|
||||
Tue Apr 9 21:39:44 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
Fixes #77862
|
||||
|
||||
* gtk/gtktreeprivate.h: add _gtk_tree_view_column_has_editable_cell
|
||||
|
||||
* gtk/gtktreeviewcolumn.c (_gtk_tree_view_column_has_editable_cell):
|
||||
new function
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_button_press): send cell event
|
||||
on first click when cell isn't editable
|
||||
|
||||
Tue Apr 9 21:37:31 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreedatalist.c (_gtk_tree_data_list_check_type): add some
|
||||
types which were missing and useful to use (fixes #77870)
|
||||
|
||||
2002-04-09 Anders Carlsson <andersca@gnu.org>
|
||||
|
||||
* gtk/gtkfilesel.c (open_new_dir): Initialize error to NULL.
|
||||
|
||||
2002-04-08 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* tests/testgtk.c: really revert testgtk.c
|
||||
|
||||
Mon Apr 8 20:28:54 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeselection.c (gtk_tree_selection_select_path),
|
||||
(gtk_tree_selection_unselect_path),
|
||||
(gtk_tree_selection_path_is_selected): check the return value of
|
||||
_gtk_tree_view_find_node and return if it's TRUE. This makes those
|
||||
functions work somewhat saner on non-expanded trees.
|
||||
|
||||
Fri Apr 5 18:28:56 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeselection.c (gtk_tree_selection_set_mode): free
|
||||
anchor row reference after unselecting the selection (fixes #76272)
|
||||
|
||||
Fri Apr 5 18:27:48 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_real_expand_row): only return
|
||||
when we don't have to open all children (fixes #75736)
|
||||
|
||||
Fri Apr 5 18:24:24 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_clear): unref
|
||||
cellrenderer after clearing the attributes of the renderer (fixes
|
||||
#75592)
|
||||
|
||||
Fri Apr 5 05:55:14 2002 Jonathan Blandford <jrb@gnome.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_grab_focus): implement.
|
||||
(gtk_tree_view_move_cursor_up_down): check for focus
|
||||
(gtk_tree_view_move_cursor_page_up_down): ditto
|
||||
(gtk_tree_view_move_cursor_left_right): ditto
|
||||
(gtk_tree_view_move_cursor_start_end): ditto
|
||||
(gtk_tree_view_real_select_all): ditto
|
||||
(gtk_tree_view_real_unselect_all): ditto
|
||||
(gtk_tree_view_real_select_cursor_row): ditto
|
||||
(gtk_tree_view_real_toggle_cursor_row): ditto
|
||||
(gtk_tree_view_real_expand_collapse_cursor_row): ditto
|
||||
(gtk_tree_view_real_select_cursor_parent): ditto
|
||||
(gtk_tree_view_real_start_interactive_search): ditto
|
||||
|
||||
* gtk/gtktreeviewcolumn.c: grab focus
|
||||
|
||||
2002-04-05 Alex Larsson <alexl@redhat.com>
|
||||
|
||||
* gdk/linux-fb/gdkkeyboard-fb.c (write_string):
|
||||
Fix undefined variable typo.
|
||||
Patch from Simon Floery <simon.floery@gmx.at>
|
||||
|
||||
Fri Apr 5 01:06:15 2002 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gdk/x11/gdkwindow-x11.c (set_text_property): fix segfault
|
||||
upon NULL return from gdk_utf8_to_string_target().
|
||||
|
||||
* gdk/x11/gdkselection-x11.c (gdk_utf8_to_string_target): fix
|
||||
return value comment to mention NULL returns upon EMFILE.
|
||||
|
||||
Thu Apr 4 22:35:42 2002 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
* tests/testgtk.c (menu_items): revert accidentally commited
|
||||
change to testgtk.c
|
||||
|
||||
Thu Apr 4 22:28:08 2002 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
* gtk/gtkmenuitem.c (gtk_menu_item_paint): Fix problem with menu
|
||||
titles being clipped (#75948)
|
||||
|
||||
2002-04-04 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gdk/gdkrgb.c: Fix some bugs, and introduce a minor feature.
|
||||
|
||||
(gdk_rgb_convert_4_pack): New function, for 16-color (4 bits per
|
||||
pixel) static visuals (fixes #858).
|
||||
|
||||
(gdk_rgb_convert_gray4_pack, gdk_rgb_convert_gray4_d_pack): Fix
|
||||
same bugs in both functions: Odd start coordinate (partial byte)
|
||||
was not handled correctly. Also a partial final byte was not
|
||||
handled correctly.
|
||||
|
||||
(gdk_rgb_do_colormaps): Use G_N_ELEMENTS.
|
||||
(gdk_rgb_create_info): For pseudocolor visuals, use the 2x2x2
|
||||
colorcube only for depths 3 and 4. For static color, use it for
|
||||
depths 3..7 like before. (Depth 5..7 pseudocolor probably never
|
||||
occurs on X11. It doesn't normally occur on Win32 either, but
|
||||
there is experimental code in gdkvisual-win32.c to let the user
|
||||
restrict the size of palette used.)
|
||||
(gdk_rgb_init): Set gdk_rgb_verbose if the GDK_DEBUG_GDKRGB flag
|
||||
is set.
|
||||
(gdk_rgb_select_conv): Use gdk_rgb_convert_8 also for depths 5, 6
|
||||
and 7 (see above). Use gdk_rgb_convert_4_pack for 4 bits per pixel
|
||||
static color.
|
||||
|
||||
Tue Apr 2 11:10:13 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtkliststore.c (gtk_list_store_set_sort_func): set the
|
||||
sort_func correctly, 77030
|
||||
|
||||
Tue Apr 2 13:44:27 2002 Tim Janik <timj@gtk.org>
|
||||
|
||||
* configure.in: update version to 2.0.2, binary age 2, interface
|
||||
age 2.
|
||||
|
||||
* NEWS: updates for 2.0.2.
|
||||
|
||||
Mon Apr 1 22:20:24 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_move_cursor_page_up_down): add
|
||||
check for y > tree_view->priv->height (fixes #76974)
|
||||
|
||||
Mon Apr 1 22:19:39 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreemodelsort.c (gtk_tree_model_sort_sort_level): get
|
||||
the stamp changes right this time
|
||||
|
||||
Mon Apr 1 22:13:24 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreemodel.c (gtk_tree_row_reference_free): only
|
||||
disconnect the ref callbacks when model == proxy (Thanks go to
|
||||
Manuel Clos Crespo for the remote debugging)
|
||||
|
||||
Sat Mar 30 15:19:24 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreemodelsort.c: revert the latest stamp increment changes,
|
||||
as it broke stuff for trees
|
||||
|
||||
Fri Mar 29 18:15:12 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* ===== Released 2.0.1 ======
|
||||
|
||||
Fri Mar 29 18:09:18 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkaccelgroup.c (gtk_accel_group_query): Call
|
||||
gdk_keyval_to_lower() on the key passed in, since we
|
||||
lowercase all other key vals passed in, so querying
|
||||
keyvals will otherwise fail if the caller used
|
||||
an uppercase accelerators (#76899, Vitaly Tishkov)
|
||||
|
||||
Fri Mar 29 17:41:21 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkmain.c (load_modules): Fix screwup in handling
|
||||
of module path that was resulting in freed memory being
|
||||
accessed when both GTK_MODULES and a theme were set.
|
||||
(#76902, Johan Dahlin)
|
||||
|
||||
Fri Mar 29 17:57:36 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkiconfactory.c (get_default_icons): Fix wrong
|
||||
stock id's for ADD/REMOVE. (#76915, Vitaly Tishkov)
|
||||
|
||||
2002-03-29 Hans Breuer <hans@breuer.org>
|
||||
|
||||
* gtk/gtkmain.h : fix typo in gtk_init_check macro, which
|
||||
caused crashes if argc != 0
|
||||
|
||||
* gtk/stock-icons/makefile.msc : added new icons
|
||||
|
||||
Fri Mar 29 20:17:35 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreemodelsort.c (gtk_tree_model_sort_rows_reordered):
|
||||
remove call to gtk_tree_model_sort_increment_stamp
|
||||
(gtk_tree_model_sort_sort_level): always increment the stamp
|
||||
|
||||
Fri Mar 29 00:19:41 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* NEWS: Updates
|
||||
|
||||
* configure.in: Version 2.0.1, binary, interface age 1.
|
||||
|
||||
* configure.in (GDK_PIXBUF_VERSION): Up required versions
|
||||
of dependencies.
|
||||
|
||||
* gtk/gtkiconfactory.c gtk/stock-icons/Makefile.am:
|
||||
Add stock_add/remove_16.
|
||||
|
||||
Thu Mar 28 18:38:30 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtk[hv]paned.c (gtk_[hv]paned_size_allocate):
|
||||
Don't show the window unless the widget is mapped.
|
||||
(#76742, Dennis Björklund, Soeren Sandmann)
|
||||
|
||||
2002-03-29 Hans Breuer <hans@breuer.org>
|
||||
|
||||
Fixed dashed line issues (#74441) to an IMO reasonable extend.
|
||||
That is: use PS_USERSTYLE on WinNT (the next GDI limit appears
|
||||
to be with lines width > 50); Render horizontal and vertical
|
||||
dashed lines on Win9x 'by hand'. Dotted selection rectangles
|
||||
and Dia look nice ...
|
||||
|
||||
* gdk/win32/gdkprivate-win32.h : add pen_dashes pointer and
|
||||
num_pen_dashes to _GdkGCWin32
|
||||
* gdk/win32/gdkgc-win32.c : initialize pen_dashes and remove
|
||||
the guesses from dashes to windoze line styles.
|
||||
(predraw_set_forground) : always ExtCreatePen (PS_SOLID) on
|
||||
Win9x, which does not support PS_USERSTYLE.
|
||||
* gdk/win32/gdkdrawable-win32.c : new functions render_line_
|
||||
<horizontal|vertical>. Use them if not running on NT in
|
||||
gdk_win32_draw_<rectangle|segments|lines> ()
|
||||
|
||||
* gdk/win32/gdkkeys-win32.c (gdk_keyval_name) : return NULL
|
||||
for keyval == 0 to avoid to have zeros in all menu entries
|
||||
without accelerator.
|
||||
|
||||
2002-03-29 Jakub Steiner <jimmac@ximian.com>
|
||||
|
||||
* gtk/stock-icons/stock_add_24.png:
|
||||
* gtk/stock-icons/stock_add_16.png:
|
||||
* gtk/stock-icons/stock_remove_24.png:
|
||||
* gtk/stock-icons/stock_remove_16.png: use a simple '+' and '-',
|
||||
works better. the old box was too clumsy
|
||||
|
||||
Thu Mar 28 21:11:04 2002 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkfilesel.c (open_new_dir): when encountering non-UTF-8 file
|
||||
names, alert the user with g_message() instead of g_warning() and
|
||||
put out the actual conversion error.
|
||||
|
||||
2002-03-28 Dave Camp <dave@ximian.com>
|
||||
|
||||
* gtk/gtktreeview.c (install_scroll_sync_handler): Don't install
|
||||
the handler if the widget isn't realized.
|
||||
|
||||
2002-03-28 Jakub Steiner <jimmac@ximian.com>
|
||||
|
||||
* gtk/stock-icons/stock_font*:
|
||||
* gtk/stock-icons/stock_align*:
|
||||
* gtk/stock-icons/stock_text*: better solution to the dark theme
|
||||
problem. Also looks more pretty IMHO
|
||||
|
||||
2002-03-27 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* configure.in: Try to find libpng via pkg-config first,
|
||||
since libpng-1.2.2 will come with a .pc file.
|
||||
|
||||
Wed Mar 27 11:10:39 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtknotebook.c (gtk_notebook_real_remove): Set
|
||||
page->last_focus_child to NULL as well as removing the
|
||||
weak reference, to deal with reentrancy in set_focus_child().
|
||||
(#76634, Dennis Björklund)
|
||||
|
||||
2002-03-27 Murray Cumming <murrayc@usa.net>
|
||||
|
||||
* gtk/gtktreeview.c: Corrected registered return type of
|
||||
"move-cursor" signal. Had to add a marshaller to
|
||||
gtk/gtkmarshalers.list.
|
||||
|
||||
Tue Mar 26 14:46:50 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkmenu.c (gtk_menu_popup): Shuffle the ordering around
|
||||
some more (position before realizing) fixing problems with
|
||||
arrows popping up at the wrong time (#73386), hopefully not
|
||||
introducing other problems. (Reported by Ettore Perrazoli, others)
|
||||
|
||||
2002-03-26 Dave Camp <dave@ximian.com>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_button_press): Free the path
|
||||
after calling gtk_tree_view_row_activated() rather than before.
|
||||
|
||||
2002-03-25 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* gtk/gtkrc.c (gtk_rc_parse_font_name): free the style's
|
||||
font_description before assigning a new one.
|
||||
(gtk_rc_parse_stock): always unref the created icon_set. #76289
|
||||
|
||||
2002-03-25 Mark McLoughlin <mark@skynet.ie>
|
||||
|
||||
* gtk/gtkbindings.c: (gtk_binding_entry_add_signal),
|
||||
kill code duplicated in gtk_binding_entry_add_signall.
|
||||
|
||||
Sun Mar 24 10:32:38 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtktreemodel.c (gtk_tree_path_copy): Make path arg const, #75653
|
||||
|
||||
* gtk/gtkfontsel.c (gtk_font_selection_show_available_styles): fix
|
||||
a warning
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_button_press): remove the grab
|
||||
when we emit row_activated so that listeners of this signal can
|
||||
grab the mouse, #75629
|
||||
|
||||
2002-03-23 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gtk/gtktextlayout.c (gtk_text_layout_real_invalidate):
|
||||
invalidate the line containing start, even if the [start,end)
|
||||
range is empty (just invalidate [start,end], essentially).
|
||||
Partially fixes #72374
|
||||
|
||||
2002-03-23 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gtk/gtktextview.c (gtk_text_view_do_popup): end any selection in
|
||||
progress, patch from db@zigo.dhs.org, #74620
|
||||
|
||||
2002-03-23 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gtk/gtktextview.c (gtk_text_view_move_cursor_internal): extend
|
||||
selection for pageup/pagedown and ctrl+pageup/pagedown if
|
||||
shift is held. more of #53934
|
||||
|
||||
2002-03-23 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gtk/gtktextview.c (gtk_text_view_destroy_layout): disconnect
|
||||
layout handlers earlier in the function, to avoid possible
|
||||
reentrancy screwups
|
||||
(gtk_text_view_invalidate): Don't install idle handlers if
|
||||
layout == NULL, otherwise we get problems during finalization
|
||||
since clearing the buffer invalidates and puts the idle handlers
|
||||
back after we destroy the layout. #74660
|
||||
(gtk_text_view_ensure_layout): Install the validation handlers
|
||||
right after creating the layout.
|
||||
|
||||
* gtk/gtktexttagtable.c (foreach_unref): call
|
||||
_gtk_text_buffer_notify_will_remove_tag(), #75126
|
||||
|
||||
2002-03-22 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gdk/x11/gdkfont-x11.c (gdk_fontset_load): add more explanatory
|
||||
text to the error message about missing charsets, and use
|
||||
g_printerr() not g_warning() since this is typically not a
|
||||
programming error (we do not export any API to ask whether
|
||||
a font set will have missing charsets so apps realistically can't
|
||||
do anything other than try the gdk_fontset_load())
|
||||
|
||||
* gtk/gtktextview.c (gtk_text_view_key_press_event): return FALSE
|
||||
if the text view isn't editable and the user presses Return,
|
||||
so default buttons and such can be activated, #74937
|
||||
|
||||
* gtk/gtktextbuffer.c (paste_from_buffer): don't insert
|
||||
if the insertion point is not editable and the paste
|
||||
is interactive, #74125
|
||||
|
||||
* gtk/gtkwindow.c (gtk_window_move_resize): enhance the #if 0
|
||||
debug spew
|
||||
|
||||
* gtk/gtktextbuffer.c (cut_or_copy): only remove the previous
|
||||
cut/copied data right before replacing it, when we know we are
|
||||
going to replace it. Fixes #74049
|
||||
|
||||
2002-03-22 Richard Hult <rhult@codefactory.se>
|
||||
|
||||
* gdk/gdkevents.c (gdk_event_get_root_coords): Fix typo, where x
|
||||
value was assigned to both x and y.
|
||||
|
||||
Fri Mar 22 11:29:11 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
Partial fix for problem where keypad keys acted
|
||||
as shift-arrows in an entry rather than arrows (#74327)
|
||||
|
||||
* gtk/gtkkeyhash.c (_gtk_key_hash_lookup): Sort lookup
|
||||
results by number of modifiers in the entry. Fixes
|
||||
problem where if a key matched both modified and unmodified
|
||||
key bindings ... e.g., the distinguishing key binding
|
||||
was consumed, then it was random which was used.
|
||||
|
||||
* gtk/gtkbindings.c (gtk_binding_entries_sort_patterns):
|
||||
Catch the case where there are multiple entries from the
|
||||
same bindingset (with different modifiers), and use only
|
||||
the first entry, which, with the change in _gtk_key_hash_lookup()
|
||||
will be the preferred value.
|
||||
|
||||
Fri Mar 22 10:56:19 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkaccelmap.c (gtk_accel_map_save_fd): Fix memory
|
||||
leak. (#74400, Morten Welinder.)
|
||||
|
||||
* gtk/gtkaccelmap.c: Properly handle short returns from
|
||||
write() calls. (Handling EINTR isn't enough... that only
|
||||
handles the case where you were interrupted before you
|
||||
wrote a single byte.)
|
||||
|
||||
* gdk/linux-fb/gdkmouse-fb.c gdk/linux-fb/gdkkeyboard-fb.c:
|
||||
Robustify against short returns from write() calls.
|
||||
|
||||
Fri Mar 22 10:12:10 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtktextview.c (gtk_text_view_paint): Change
|
||||
G_BREAKPOINT() to g_assert_not_reached ().
|
||||
(#75865, Ashok Venkiteswaran)
|
||||
|
||||
2002-03-22 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gdk/win32/gdkgc-win32.c (gdk_win32_gc_set_dashes): Don't clear
|
||||
all of the pen_style, just the PS_STYLE_MASK. Seems to fix #74441,
|
||||
but that is just the special case of one-pixel wide one-pixel
|
||||
on-off dotted lines. To fully implement generic X11 style dashed
|
||||
lines a major rewrite would be needed.
|
||||
|
||||
2002-03-21 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkaccelgroup.c (gtk_accelerator_valid): Trivial typo
|
||||
fix. (Vitaly Tishkov, #75726)
|
||||
|
||||
Thu Mar 21 10:04:05 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkwindow.c (gdk_window_real_get_depth): Remove
|
||||
some left over debugging code with a G_BREAKPOINT()
|
||||
in it.
|
||||
|
||||
Wed Mar 20 19:33:31 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkcalendar.c (gtk_calendar_main_button): When
|
||||
changing months when the user clicks on a prev-month
|
||||
or next-month day, focus and select the new day.
|
||||
Ignore double clicks on prev-month, next-month days.
|
||||
(Based on suggestions from Andras Salamon, #74173)
|
||||
|
||||
* gtk/gtkcalendar.c: Implement the focused/unfocused
|
||||
selected color change.
|
||||
|
||||
2002-03-20 Alex Larsson <alexl@redhat.com>
|
||||
|
||||
Patches from Carlo E. Prelz <fluido@fluido.as>
|
||||
Now gtkfb at least compiles and mostly works. The keyboard
|
||||
stuff needs more loving.
|
||||
|
||||
* gdk/linux-fb/gdkkeyboard-fb.c (xlate_get_for_keyval,
|
||||
xlate_get_for_keycode, raw_get_for_keyval, raw_get_for_keycode):
|
||||
At least set the out parameters for these calls.
|
||||
|
||||
* gdk/linux-fb/gdkmain-fb.c:
|
||||
(gdk_pointer_grab_info_libgtk_only, gdk_keyboard_grab_info_libgtk_only):
|
||||
Implement new functions.
|
||||
|
||||
Wed Mar 20 19:00:03 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkentry.c (gtk_entry_set_text): Short-circuit
|
||||
the text to the exact same thing, so we don't
|
||||
unexpectedly change the selection or cursor position.
|
||||
(#74290, John Ellis.)
|
||||
|
||||
Thu Mar 21 00:05:14 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_get_background_area),
|
||||
(gtk_tree_view_get_cell_area): fix logic (fixes #74235, #73593)
|
||||
|
||||
Wed Mar 20 17:11:51 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkrc.c: Patch from Richard Hestilow to fix
|
||||
gtk-font-name changes for widgets that get the actual
|
||||
default style. (#73709)
|
||||
|
||||
Wed Mar 20 22:59:23 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtkrbtree.[ch]: add _gtk_rbtree_set_fixed_height()
|
||||
|
||||
* gtk/gtktreeprivate.h: add fixed_height_check field
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_init): initialize
|
||||
scroll_sync_timer and fixed_height_check
|
||||
(do_validate_rows): add fixed_height_check. If all validated rows
|
||||
in the first cycle have the same height, then we set that height for
|
||||
the entire tree. This is some sort of 'fake' optimization, but helps
|
||||
a lot for the common case. We keep validating the entire tree in
|
||||
the background though.
|
||||
(gtk_tree_view_set_model): reset fixed_height_check
|
||||
|
||||
Wed Mar 20 16:36:08 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/*.c: Patch from Erwann Chenede, #73900 fixing
|
||||
a lot of warnings with Forte CC, mostly implicit
|
||||
casts between void * and function pointers.
|
||||
|
||||
* gdk/gdkevents.c (gdk_event_get_state): GdkEventVisibility's
|
||||
state field is not a GdkModifierType. (Also #73900)
|
||||
|
||||
Wed Mar 20 12:35:22 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_grab_default): Remove
|
||||
leftover notification of has-default. (#75508, Jacob
|
||||
Berkman.)
|
||||
|
||||
Wed Mar 20 12:27:07 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkaccelgroup.c (gtk_accelerator_valid): Allow
|
||||
arrow keys as accelerators, as long as some modifier
|
||||
is pressed. (#75495)
|
||||
|
||||
* gtk/gtkaccelgroup.c (gtk_accelerator_valid): Fix
|
||||
incorrect example in the docs.
|
||||
|
||||
Wed Mar 20 12:06:30 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_set_child_visible):
|
||||
Fix segfault when widget->parent is NULL.
|
||||
(#75615, Alexey A. Malyshev)
|
||||
|
||||
Wed Mar 20 11:32:07 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkentry.c: Improve test to prevent infinite
|
||||
loop. (#74952, Thomas Leonard)
|
||||
|
||||
* gtk/gtkmenushell.c (gtk_real_menu_shell_cycle_focus):
|
||||
Fix warning when toplevel menu shell isn't a menu
|
||||
bar. (Thomas Leonard, #75602)
|
||||
|
||||
Wed Mar 20 11:00:59 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* configure.in: Use $PKG_CONFIG, not pkg-config.
|
||||
(LEE Sau Dan, #75572)
|
||||
|
||||
Wed Mar 20 10:55:56 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/x11/gdkevents-x11.c (gdk_event_translate): Fix assignment
|
||||
of time in scroll events. (Sven Neumann, #75574)
|
||||
|
||||
2002-03-20 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gdk/win32/gdkdnd-win32.c (gdk_drag_find_window): Use
|
||||
gdk_window_get_toplevel(), as it is the top-level windows that are
|
||||
registered for DND.
|
||||
|
||||
* gdk/win32/gdkwin32.h: Don't include gdkinternals.h.
|
||||
|
||||
2002-03-19 jacob berkman <jacob@ximian.com>
|
||||
|
||||
* gtk/gtkcombo.c (gtk_combo_find): fix infinite loop when
|
||||
gtk_combo_func() returns NULL (bug #75464)
|
||||
|
||||
2002-03-18 jacob berkman <jacob@ximian.com>
|
||||
|
||||
* gtk/gtkaspectframe.c (gtk_aspect_frame_class_init): set the
|
||||
correct min/max values for the ratio property (fixes #75331)
|
||||
|
||||
Mon Mar 18 11:55:03 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkimmulticontext.c (gtk_im_multicontext_get_slave):
|
||||
Patch from Yao Zhang fixing reference count leak.
|
||||
|
||||
* gtk/gtkentry.c (gtk_entry_key_release): if (entry->editable),
|
||||
not if (!entry->editable).
|
||||
|
||||
Mon Mar 18 11:09:17 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/x11/gdkwindow-x11.c (gdk_window_set_override_redirect):
|
||||
Fix backwards conditional. (#75019, Dan Winship.)
|
||||
|
||||
Sun Mar 17 01:11:16 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_size_request): use
|
||||
do_validate_rows instead of validate_rows_handler (fix by
|
||||
Mike Pieper, #74126)
|
||||
|
||||
Sat Mar 16 23:54:56 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gdk/x11/gdkwindow-x11.c (gdk_window_set_static_bit_gravity): just
|
||||
return when we have an input_only window (fix by Owen Taylor)
|
||||
|
||||
* gtk/gtktreeprivate.h (struct _GtkTreeViewPrivate): add
|
||||
scroll_sync_timer
|
||||
|
||||
* gtk/gtktreeview.c (install_scroll_sync_handler): new function,
|
||||
(scroll_sync_handler): ditto,
|
||||
(gtk_tree_view_unrealize): take scroll_sync_timer into account
|
||||
(gtk_tree_view_row_deleted): install scroll_sync_timer instead of
|
||||
calling top_row_to_dy/dy_to_top_row directly
|
||||
-- this greatly speeds up clearing the model (#73199)
|
||||
|
||||
* gtk/gtktreemodelsort.c
|
||||
(gtk_tree_model_sort_convert_path_to_child_path): fix up this function,
|
||||
for some reason I really screwed it up (fixes #74663)
|
||||
|
||||
2002-03-16 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* configure.in (GDK_PIXBUF_DEP_CFLAGS) (GDK_PIXBUF_XLIB_DEP_CFLAGS)
|
||||
(GDK_DEP_CFLAGS) (GTK_DEP_CFLAGS): include CFLAGS from gthread-2.0
|
||||
so that the libs work correctly in a threaded environment.
|
||||
|
||||
Fri Mar 15 12:51:42 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtktreeviewcolumn.c
|
||||
(gtk_tree_view_column_new_with_attributes): add example to docs,
|
||||
as people are seeming to have trouble with this function.
|
||||
|
||||
2002-03-15 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* configure.in: Set MATH_LIB to empty also on Win32.
|
||||
|
||||
Fri Mar 15 15:37:01 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/x11/gdkdrawable-x11.c (convert_to_format):
|
||||
Fix byte shift arithmetic for big-endian. (Tracked
|
||||
down with help from Tuomas Kuosmanen)
|
||||
|
||||
Fri Mar 15 11:28:41 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_insert_column_with_data_func):
|
||||
make args const, 74159
|
||||
(gtk_tree_view_insert_column_with_attributes): ditto
|
||||
|
||||
* gtk/gtktreeviewcolumn.c
|
||||
(gtk_tree_view_column_cell_process_action): remov unused variables.
|
||||
|
||||
Fri Mar 15 13:31:51 2002 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
* gtk/gtkmenu.c (gtk_menu_leave_notify): Fix test for "active
|
||||
submenu".
|
||||
|
||||
2002-03-15 Padraig O'Briain <padraig.obriain@sun.com>
|
||||
|
||||
* gdk/x11/gdkkeys-x11.c (update_keymaps): Fudge keymap to have lower
|
||||
upper case variants if there is only a single keysym per keycode and
|
||||
the key symbol has upper and lower case variants (#74512)
|
||||
|
||||
Thu Mar 14 17:09:52 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkwindow.c (gdk_window_process_all_updates): Fix rather
|
||||
improbable reentrancy problem if a window is destroyed
|
||||
while updates are being processed on another window. (Noticed
|
||||
by Michael Meeks, #74708)
|
||||
|
||||
2002-03-14 Vitaly Tishkov <tvv@sparc.spb.su>
|
||||
|
||||
* gtk/gtktreemodelsort.c
|
||||
typo in docs for gtk_tree_model_sort_convert_iter_to_child_iter() fixed
|
||||
|
||||
|
||||
Thu Mar 14 11:17:18 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkkeyhash.c (_gtk_key_hash_remove_entry): When
|
||||
removing keys from the key hash, reinsert the right list
|
||||
back into the hash. (Dave Camp, #74571)
|
||||
|
||||
Wed Mar 13 17:17:40 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkobject.h: Remove left-over GTK_OBJECT_CONNECTED
|
||||
macro that was defined in terms of the now-gone GTK_CONNECTED
|
||||
flag. (Seth Burgess, #74028)
|
||||
|
||||
Wed Mar 13 17:11:10 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkaccelgroup.c (accel_group_weak_ref_detach): Unset
|
||||
the acceleratable_groups qdata because qdata isn't removed
|
||||
on ->dispose but rather on ->finalize. (#74569, found
|
||||
by Matt Wilson.)
|
||||
|
||||
Tue Mar 12 23:14:23 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtktreeselection.c (gtk_tree_selection_unselect_iter): Fix
|
||||
cut-n-paste bug.
|
||||
|
||||
Sat Mar 9 18:23:25 2002 Richard Hestilow <hestilow@ximian.com>
|
||||
|
||||
* gtk/gtkimage.c (gtk_image_set_from_filename): Allow NULL
|
||||
filenames.
|
||||
|
||||
Tue Mar 12 10:50:09 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* modules/input/gtkimcontextxim.c (gtk_im_context_xim_filter_keypress):
|
||||
Fix incorrect return value, filter out returns of 0x7f for
|
||||
the delete key. (#74179, Kang Jeong-He)
|
||||
|
||||
Mon Mar 11 23:42:11 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtktreemodel.c (gtk_tree_model_foreach): fix totally broken
|
||||
foreach function.
|
||||
|
||||
2002-03-11 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkitemfactory.c (gtk_item_factory_add_foreign): Document
|
||||
gtk_{menu_item,widget}_set_accel_path() as the recommended API.
|
||||
(#69244)
|
||||
|
||||
2002-03-11 James Henstridge <james@daa.com.au>
|
||||
|
||||
* configure.in: set CCAS and CCASFLAGS to get automake 1.6
|
||||
compatibility without breaking things for people using 1.4.
|
||||
|
||||
Sun Mar 10 21:04:30 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_button_press): finally get the
|
||||
right behavior.
|
||||
|
||||
Mon Mar 11 01:25:14 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_button_press): compare path with
|
||||
cursor path and not with the selected iter in the 'decide to edit'
|
||||
check
|
||||
|
||||
896
ChangeLog.pre-2-4
Normal file
@@ -0,0 +1,896 @@
|
||||
2002-07-16 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
* gdk/gdkpixbuf-drawable.c (rgb565lsb): Fixed the LSB -> MSB case.
|
||||
Fixes #79463.
|
||||
(rgb565msb): Fix the MSB -> MSB case. Fixes #79190.
|
||||
|
||||
Fri Apr 19 16:30:09 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeprivate.h, gtk/gtktreeview.c: rename
|
||||
last_single_clicked{,_2} to last_button_press{,_2}, as the latter
|
||||
is a more sane name.
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_button_press): use ->priv->anchor
|
||||
instead of ->priv->cursor, check for the anchor at another place, as
|
||||
you can go in edit mode without having an anchor.
|
||||
|
||||
2002-04-18 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkitemfactory.c:
|
||||
* gtk/gtkiconfactory.c:
|
||||
* gtk/gtkwidget.c:
|
||||
* gtk/gtkstyle.c:
|
||||
* gtk/gtkrc.c:
|
||||
* gtk/gtktreeviewcolumn.c:
|
||||
* gtk/gtkdialog.c:
|
||||
* gtk/gtktreemodel.c: s/<!>/<!-- -->/g throughout the
|
||||
documentation to bring the produced Docbook closer to XML.
|
||||
|
||||
2002-04-18 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gdk-pixbuf/Makefile.am (uninstall-libtool-import-lib)
|
||||
* gdk/Makefile.am (uninstall-libtool-import-lib): Fix typo,
|
||||
thanks to David Sterba for noticing.
|
||||
|
||||
* gtk/gtkmain.h
|
||||
* gtk/gtkmain.c (gtk_init_abi_check, gtk_init_check_abi_check): In
|
||||
GTK+ 2.0 the GtkWindow struct actually is the same size in gcc on
|
||||
Win32 whether compiled with -fnative-struct or not. Unfortunately
|
||||
this wan't noticed until now. So, from now on, check some other
|
||||
struct, too, for which the use of -fnative-struct still
|
||||
matters. GtkBox is one such.
|
||||
|
||||
Thu Apr 18 00:23:31 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreemodelsort.c
|
||||
(gtk_tree_model_sort_convert_path_to_child_path): so this function
|
||||
was completely broken. Fix it and improve readability.
|
||||
|
||||
2002-04-17 Anders Carlsson <andersca@gnu.org>
|
||||
|
||||
* tests/testtreeedit.c (button_press_event): Add a small
|
||||
test case.
|
||||
|
||||
Wed Apr 17 00:21:36 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreestore.c (gtk_tree_store_insert_before): fix docs
|
||||
|
||||
Tue Apr 16 17:28:21 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_real_collapse_row): check
|
||||
->priv->cursor and ->priv->anchor rowrefs before removing
|
||||
node->children from the rbtree. Also check the
|
||||
->priv->last_single_clicked and ->priv->last_single_clicked_2 rowrefs
|
||||
(I think I really need to rename those two someday).
|
||||
|
||||
Tue Apr 16 07:53:49 2002 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkmenu.c (gtk_menu_key_press): don't install/change accelerators
|
||||
from locked accel groups.
|
||||
|
||||
* gtk/gtkwidget.c (_gtk_widget_get_accel_path): export whether the
|
||||
accel path is from a locked accel group.
|
||||
|
||||
Mon Apr 15 15:41:56 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtkcontainer.c (gtk_container_focus): include internal
|
||||
children when doing focus.
|
||||
(gtk_container_get_all_children): new static function to include
|
||||
internal children when making a list of them.
|
||||
|
||||
Sun Apr 14 16:56:59 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeprivate.h: add _gtk_tree_view_column_get_editable_cell and
|
||||
_gtk_tree_view_column_get_neighbor_sizes
|
||||
|
||||
* gtk/gtktreeviewcolumn.c (struct _GtkTreeViewColumnCellInfo): add
|
||||
real_width field,
|
||||
(_gtk_tree_view_column_get_editable_cell): implement,
|
||||
(gtk_tree_view_column_cell_process_action): fill info->real_width
|
||||
(_gtk_tree_view_column_get_neighbor_sizes): implement
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_button_press): make the "editable
|
||||
widget" show up with the same size as the actual cell, so it doesnt
|
||||
cover the complete column if there are any other cells in that column.
|
||||
|
||||
2002-04-14 Abigail Brady <morwen@evilmagic.org>
|
||||
|
||||
* gtk/gtkfilesel.c: Fix typo in message.
|
||||
|
||||
2002-04-13 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gdk/gdkpixbuf-drawable.c (gdk_pixbuf_get_from_drawable): create
|
||||
the target pixbuf AFTER filling in width/height, so that
|
||||
passing in -1 for width/height will work.
|
||||
|
||||
Sat Apr 13 22:49:45 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
Fixes #75510
|
||||
|
||||
* gtk/gtktreeselection.c (gtk_tree_selection_get_selected): make this
|
||||
function work correctly and more sane
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_real_collapse_row): remove
|
||||
node->children from rbtree before emitting GtkTreeSelection::changed
|
||||
|
||||
Sat Apr 13 17:15:12 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_init): dont set
|
||||
the mode to GTK_CELL_RENDERER_MODE_EDITABLE by default,
|
||||
(gtk_cell_renderer_text_class_init): for some reason our default for
|
||||
editable was TRUE, of course this is FALSE.
|
||||
(gtk_cell_renderer_text_set_property): update mode when editable
|
||||
has been changed.
|
||||
|
||||
2002-04-12 jacob berkman <jacob@ximian.com>
|
||||
|
||||
* gdk/x11/xsettings-client.c (fetch_card8): fix cut-n-paste bug
|
||||
which breaks big-endian machines (fixes #73585)
|
||||
|
||||
2002-04-12 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* gtk/gtknotebook.c (gtk_notebook_real_remove): relocate the
|
||||
remove_weak_pointer to just before we free the page, to be sure
|
||||
it doesn't get re-added. #75282
|
||||
|
||||
Fri Apr 12 18:32:46 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_real_set_cursor): add
|
||||
clamp_node argument
|
||||
(toplevel): update usages of gtk_tree_view_real_set_cursor,
|
||||
(gtk_tree_view_focus_to_cursor): don't let
|
||||
gtk_tree_view_real_set_cursor clamp the node, so you won't get
|
||||
unexpected scrolling
|
||||
|
||||
2002-04-11 Michael Meeks <michael@ximian.com>
|
||||
|
||||
* gtk/gtklabel.c
|
||||
(gtk_label_parse_uline, gtk_label_set_text),
|
||||
(gtk_label_set_text_with_mnemonic): add freeze / thaws
|
||||
to stop deluge of 'notify' signals.
|
||||
|
||||
Sat Apr 6 06:57:00 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkmenushell.[ch] gtk/gtkmenuitem.c: Export
|
||||
private _gtk_menu_shell_activate() to encapsulate
|
||||
cut-and-paste code.
|
||||
|
||||
* gtk/gtkmenubar.c: Select the first item on the menu bar
|
||||
for F10 rather than acting as if the user pressed <Alt>F
|
||||
to select the file manager.
|
||||
|
||||
Tue Apr 9 19:01:28 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
Fix problems with HandleBox and focusing - #78232
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_translate_coordinates): Handle
|
||||
GtkHandleBox / GnomeDock style window heirarchy / widget
|
||||
heirarchy disconnects. :-(.
|
||||
|
||||
* gtk/gtkcontainer.c: Handle failures from
|
||||
gtk_widget_translate_coordinates (Focusing is not right, but at
|
||||
least it doesn't go into infinite loops.)
|
||||
|
||||
Tue Apr 9 18:34:58 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkcontainer.c (_gtk_container_queue_resize): Always
|
||||
set the ALLOC_NEEDED and REQUEST_NEEDED flags up the hierarchy,
|
||||
even if we aren't currently in a resize container... we need
|
||||
this to properly handle size changes to widgets that are
|
||||
being moved from one heirarchy to another. (#78226)
|
||||
|
||||
Tue Apr 9 21:41:24 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
Fixes #78110
|
||||
|
||||
* gtk/gtktreeselection.c (_gtk_tree_selection_internal_select_node):
|
||||
add override_browse_mode argument and implement,
|
||||
(gtk_tree_selection_unselect_path): always unselect the path,
|
||||
(toplevel): update uses of _gtk_tree_selection_internal_select_node
|
||||
|
||||
* gtk/gtktreeview.c: update uses of
|
||||
_gtk_tree_selection_internal_select_node
|
||||
|
||||
* gtk/gtktreeprivate.h (_gtk_tree_selection_internal_select_node):
|
||||
update prototype
|
||||
|
||||
Tue Apr 9 21:39:44 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
Fixes #77862
|
||||
|
||||
* gtk/gtktreeprivate.h: add _gtk_tree_view_column_has_editable_cell
|
||||
|
||||
* gtk/gtktreeviewcolumn.c (_gtk_tree_view_column_has_editable_cell):
|
||||
new function
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_button_press): send cell event
|
||||
on first click when cell isn't editable
|
||||
|
||||
Tue Apr 9 21:37:31 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreedatalist.c (_gtk_tree_data_list_check_type): add some
|
||||
types which were missing and useful to use (fixes #77870)
|
||||
|
||||
2002-04-09 Anders Carlsson <andersca@gnu.org>
|
||||
|
||||
* gtk/gtkfilesel.c (open_new_dir): Initialize error to NULL.
|
||||
|
||||
2002-04-08 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* tests/testgtk.c: really revert testgtk.c
|
||||
|
||||
Mon Apr 8 20:28:54 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeselection.c (gtk_tree_selection_select_path),
|
||||
(gtk_tree_selection_unselect_path),
|
||||
(gtk_tree_selection_path_is_selected): check the return value of
|
||||
_gtk_tree_view_find_node and return if it's TRUE. This makes those
|
||||
functions work somewhat saner on non-expanded trees.
|
||||
|
||||
Fri Apr 5 18:28:56 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeselection.c (gtk_tree_selection_set_mode): free
|
||||
anchor row reference after unselecting the selection (fixes #76272)
|
||||
|
||||
Fri Apr 5 18:27:48 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_real_expand_row): only return
|
||||
when we don't have to open all children (fixes #75736)
|
||||
|
||||
Fri Apr 5 18:24:24 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_clear): unref
|
||||
cellrenderer after clearing the attributes of the renderer (fixes
|
||||
#75592)
|
||||
|
||||
Fri Apr 5 05:55:14 2002 Jonathan Blandford <jrb@gnome.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_grab_focus): implement.
|
||||
(gtk_tree_view_move_cursor_up_down): check for focus
|
||||
(gtk_tree_view_move_cursor_page_up_down): ditto
|
||||
(gtk_tree_view_move_cursor_left_right): ditto
|
||||
(gtk_tree_view_move_cursor_start_end): ditto
|
||||
(gtk_tree_view_real_select_all): ditto
|
||||
(gtk_tree_view_real_unselect_all): ditto
|
||||
(gtk_tree_view_real_select_cursor_row): ditto
|
||||
(gtk_tree_view_real_toggle_cursor_row): ditto
|
||||
(gtk_tree_view_real_expand_collapse_cursor_row): ditto
|
||||
(gtk_tree_view_real_select_cursor_parent): ditto
|
||||
(gtk_tree_view_real_start_interactive_search): ditto
|
||||
|
||||
* gtk/gtktreeviewcolumn.c: grab focus
|
||||
|
||||
2002-04-05 Alex Larsson <alexl@redhat.com>
|
||||
|
||||
* gdk/linux-fb/gdkkeyboard-fb.c (write_string):
|
||||
Fix undefined variable typo.
|
||||
Patch from Simon Floery <simon.floery@gmx.at>
|
||||
|
||||
Fri Apr 5 01:06:15 2002 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gdk/x11/gdkwindow-x11.c (set_text_property): fix segfault
|
||||
upon NULL return from gdk_utf8_to_string_target().
|
||||
|
||||
* gdk/x11/gdkselection-x11.c (gdk_utf8_to_string_target): fix
|
||||
return value comment to mention NULL returns upon EMFILE.
|
||||
|
||||
Thu Apr 4 22:35:42 2002 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
* tests/testgtk.c (menu_items): revert accidentally commited
|
||||
change to testgtk.c
|
||||
|
||||
Thu Apr 4 22:28:08 2002 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
* gtk/gtkmenuitem.c (gtk_menu_item_paint): Fix problem with menu
|
||||
titles being clipped (#75948)
|
||||
|
||||
2002-04-04 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gdk/gdkrgb.c: Fix some bugs, and introduce a minor feature.
|
||||
|
||||
(gdk_rgb_convert_4_pack): New function, for 16-color (4 bits per
|
||||
pixel) static visuals (fixes #858).
|
||||
|
||||
(gdk_rgb_convert_gray4_pack, gdk_rgb_convert_gray4_d_pack): Fix
|
||||
same bugs in both functions: Odd start coordinate (partial byte)
|
||||
was not handled correctly. Also a partial final byte was not
|
||||
handled correctly.
|
||||
|
||||
(gdk_rgb_do_colormaps): Use G_N_ELEMENTS.
|
||||
(gdk_rgb_create_info): For pseudocolor visuals, use the 2x2x2
|
||||
colorcube only for depths 3 and 4. For static color, use it for
|
||||
depths 3..7 like before. (Depth 5..7 pseudocolor probably never
|
||||
occurs on X11. It doesn't normally occur on Win32 either, but
|
||||
there is experimental code in gdkvisual-win32.c to let the user
|
||||
restrict the size of palette used.)
|
||||
(gdk_rgb_init): Set gdk_rgb_verbose if the GDK_DEBUG_GDKRGB flag
|
||||
is set.
|
||||
(gdk_rgb_select_conv): Use gdk_rgb_convert_8 also for depths 5, 6
|
||||
and 7 (see above). Use gdk_rgb_convert_4_pack for 4 bits per pixel
|
||||
static color.
|
||||
|
||||
Tue Apr 2 11:10:13 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtkliststore.c (gtk_list_store_set_sort_func): set the
|
||||
sort_func correctly, 77030
|
||||
|
||||
Tue Apr 2 13:44:27 2002 Tim Janik <timj@gtk.org>
|
||||
|
||||
* configure.in: update version to 2.0.2, binary age 2, interface
|
||||
age 2.
|
||||
|
||||
* NEWS: updates for 2.0.2.
|
||||
|
||||
Mon Apr 1 22:20:24 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_move_cursor_page_up_down): add
|
||||
check for y > tree_view->priv->height (fixes #76974)
|
||||
|
||||
Mon Apr 1 22:19:39 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreemodelsort.c (gtk_tree_model_sort_sort_level): get
|
||||
the stamp changes right this time
|
||||
|
||||
Mon Apr 1 22:13:24 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreemodel.c (gtk_tree_row_reference_free): only
|
||||
disconnect the ref callbacks when model == proxy (Thanks go to
|
||||
Manuel Clos Crespo for the remote debugging)
|
||||
|
||||
Sat Mar 30 15:19:24 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreemodelsort.c: revert the latest stamp increment changes,
|
||||
as it broke stuff for trees
|
||||
|
||||
Fri Mar 29 18:15:12 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* ===== Released 2.0.1 ======
|
||||
|
||||
Fri Mar 29 18:09:18 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkaccelgroup.c (gtk_accel_group_query): Call
|
||||
gdk_keyval_to_lower() on the key passed in, since we
|
||||
lowercase all other key vals passed in, so querying
|
||||
keyvals will otherwise fail if the caller used
|
||||
an uppercase accelerators (#76899, Vitaly Tishkov)
|
||||
|
||||
Fri Mar 29 17:41:21 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkmain.c (load_modules): Fix screwup in handling
|
||||
of module path that was resulting in freed memory being
|
||||
accessed when both GTK_MODULES and a theme were set.
|
||||
(#76902, Johan Dahlin)
|
||||
|
||||
Fri Mar 29 17:57:36 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkiconfactory.c (get_default_icons): Fix wrong
|
||||
stock id's for ADD/REMOVE. (#76915, Vitaly Tishkov)
|
||||
|
||||
2002-03-29 Hans Breuer <hans@breuer.org>
|
||||
|
||||
* gtk/gtkmain.h : fix typo in gtk_init_check macro, which
|
||||
caused crashes if argc != 0
|
||||
|
||||
* gtk/stock-icons/makefile.msc : added new icons
|
||||
|
||||
Fri Mar 29 20:17:35 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreemodelsort.c (gtk_tree_model_sort_rows_reordered):
|
||||
remove call to gtk_tree_model_sort_increment_stamp
|
||||
(gtk_tree_model_sort_sort_level): always increment the stamp
|
||||
|
||||
Fri Mar 29 00:19:41 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* NEWS: Updates
|
||||
|
||||
* configure.in: Version 2.0.1, binary, interface age 1.
|
||||
|
||||
* configure.in (GDK_PIXBUF_VERSION): Up required versions
|
||||
of dependencies.
|
||||
|
||||
* gtk/gtkiconfactory.c gtk/stock-icons/Makefile.am:
|
||||
Add stock_add/remove_16.
|
||||
|
||||
Thu Mar 28 18:38:30 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtk[hv]paned.c (gtk_[hv]paned_size_allocate):
|
||||
Don't show the window unless the widget is mapped.
|
||||
(#76742, Dennis Björklund, Soeren Sandmann)
|
||||
|
||||
2002-03-29 Hans Breuer <hans@breuer.org>
|
||||
|
||||
Fixed dashed line issues (#74441) to an IMO reasonable extend.
|
||||
That is: use PS_USERSTYLE on WinNT (the next GDI limit appears
|
||||
to be with lines width > 50); Render horizontal and vertical
|
||||
dashed lines on Win9x 'by hand'. Dotted selection rectangles
|
||||
and Dia look nice ...
|
||||
|
||||
* gdk/win32/gdkprivate-win32.h : add pen_dashes pointer and
|
||||
num_pen_dashes to _GdkGCWin32
|
||||
* gdk/win32/gdkgc-win32.c : initialize pen_dashes and remove
|
||||
the guesses from dashes to windoze line styles.
|
||||
(predraw_set_forground) : always ExtCreatePen (PS_SOLID) on
|
||||
Win9x, which does not support PS_USERSTYLE.
|
||||
* gdk/win32/gdkdrawable-win32.c : new functions render_line_
|
||||
<horizontal|vertical>. Use them if not running on NT in
|
||||
gdk_win32_draw_<rectangle|segments|lines> ()
|
||||
|
||||
* gdk/win32/gdkkeys-win32.c (gdk_keyval_name) : return NULL
|
||||
for keyval == 0 to avoid to have zeros in all menu entries
|
||||
without accelerator.
|
||||
|
||||
2002-03-29 Jakub Steiner <jimmac@ximian.com>
|
||||
|
||||
* gtk/stock-icons/stock_add_24.png:
|
||||
* gtk/stock-icons/stock_add_16.png:
|
||||
* gtk/stock-icons/stock_remove_24.png:
|
||||
* gtk/stock-icons/stock_remove_16.png: use a simple '+' and '-',
|
||||
works better. the old box was too clumsy
|
||||
|
||||
Thu Mar 28 21:11:04 2002 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkfilesel.c (open_new_dir): when encountering non-UTF-8 file
|
||||
names, alert the user with g_message() instead of g_warning() and
|
||||
put out the actual conversion error.
|
||||
|
||||
2002-03-28 Dave Camp <dave@ximian.com>
|
||||
|
||||
* gtk/gtktreeview.c (install_scroll_sync_handler): Don't install
|
||||
the handler if the widget isn't realized.
|
||||
|
||||
2002-03-28 Jakub Steiner <jimmac@ximian.com>
|
||||
|
||||
* gtk/stock-icons/stock_font*:
|
||||
* gtk/stock-icons/stock_align*:
|
||||
* gtk/stock-icons/stock_text*: better solution to the dark theme
|
||||
problem. Also looks more pretty IMHO
|
||||
|
||||
2002-03-27 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* configure.in: Try to find libpng via pkg-config first,
|
||||
since libpng-1.2.2 will come with a .pc file.
|
||||
|
||||
Wed Mar 27 11:10:39 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtknotebook.c (gtk_notebook_real_remove): Set
|
||||
page->last_focus_child to NULL as well as removing the
|
||||
weak reference, to deal with reentrancy in set_focus_child().
|
||||
(#76634, Dennis Björklund)
|
||||
|
||||
2002-03-27 Murray Cumming <murrayc@usa.net>
|
||||
|
||||
* gtk/gtktreeview.c: Corrected registered return type of
|
||||
"move-cursor" signal. Had to add a marshaller to
|
||||
gtk/gtkmarshalers.list.
|
||||
|
||||
Tue Mar 26 14:46:50 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkmenu.c (gtk_menu_popup): Shuffle the ordering around
|
||||
some more (position before realizing) fixing problems with
|
||||
arrows popping up at the wrong time (#73386), hopefully not
|
||||
introducing other problems. (Reported by Ettore Perrazoli, others)
|
||||
|
||||
2002-03-26 Dave Camp <dave@ximian.com>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_button_press): Free the path
|
||||
after calling gtk_tree_view_row_activated() rather than before.
|
||||
|
||||
2002-03-25 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* gtk/gtkrc.c (gtk_rc_parse_font_name): free the style's
|
||||
font_description before assigning a new one.
|
||||
(gtk_rc_parse_stock): always unref the created icon_set. #76289
|
||||
|
||||
2002-03-25 Mark McLoughlin <mark@skynet.ie>
|
||||
|
||||
* gtk/gtkbindings.c: (gtk_binding_entry_add_signal),
|
||||
kill code duplicated in gtk_binding_entry_add_signall.
|
||||
|
||||
Sun Mar 24 10:32:38 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtktreemodel.c (gtk_tree_path_copy): Make path arg const, #75653
|
||||
|
||||
* gtk/gtkfontsel.c (gtk_font_selection_show_available_styles): fix
|
||||
a warning
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_button_press): remove the grab
|
||||
when we emit row_activated so that listeners of this signal can
|
||||
grab the mouse, #75629
|
||||
|
||||
2002-03-23 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gtk/gtktextlayout.c (gtk_text_layout_real_invalidate):
|
||||
invalidate the line containing start, even if the [start,end)
|
||||
range is empty (just invalidate [start,end], essentially).
|
||||
Partially fixes #72374
|
||||
|
||||
2002-03-23 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gtk/gtktextview.c (gtk_text_view_do_popup): end any selection in
|
||||
progress, patch from db@zigo.dhs.org, #74620
|
||||
|
||||
2002-03-23 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gtk/gtktextview.c (gtk_text_view_move_cursor_internal): extend
|
||||
selection for pageup/pagedown and ctrl+pageup/pagedown if
|
||||
shift is held. more of #53934
|
||||
|
||||
2002-03-23 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gtk/gtktextview.c (gtk_text_view_destroy_layout): disconnect
|
||||
layout handlers earlier in the function, to avoid possible
|
||||
reentrancy screwups
|
||||
(gtk_text_view_invalidate): Don't install idle handlers if
|
||||
layout == NULL, otherwise we get problems during finalization
|
||||
since clearing the buffer invalidates and puts the idle handlers
|
||||
back after we destroy the layout. #74660
|
||||
(gtk_text_view_ensure_layout): Install the validation handlers
|
||||
right after creating the layout.
|
||||
|
||||
* gtk/gtktexttagtable.c (foreach_unref): call
|
||||
_gtk_text_buffer_notify_will_remove_tag(), #75126
|
||||
|
||||
2002-03-22 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gdk/x11/gdkfont-x11.c (gdk_fontset_load): add more explanatory
|
||||
text to the error message about missing charsets, and use
|
||||
g_printerr() not g_warning() since this is typically not a
|
||||
programming error (we do not export any API to ask whether
|
||||
a font set will have missing charsets so apps realistically can't
|
||||
do anything other than try the gdk_fontset_load())
|
||||
|
||||
* gtk/gtktextview.c (gtk_text_view_key_press_event): return FALSE
|
||||
if the text view isn't editable and the user presses Return,
|
||||
so default buttons and such can be activated, #74937
|
||||
|
||||
* gtk/gtktextbuffer.c (paste_from_buffer): don't insert
|
||||
if the insertion point is not editable and the paste
|
||||
is interactive, #74125
|
||||
|
||||
* gtk/gtkwindow.c (gtk_window_move_resize): enhance the #if 0
|
||||
debug spew
|
||||
|
||||
* gtk/gtktextbuffer.c (cut_or_copy): only remove the previous
|
||||
cut/copied data right before replacing it, when we know we are
|
||||
going to replace it. Fixes #74049
|
||||
|
||||
2002-03-22 Richard Hult <rhult@codefactory.se>
|
||||
|
||||
* gdk/gdkevents.c (gdk_event_get_root_coords): Fix typo, where x
|
||||
value was assigned to both x and y.
|
||||
|
||||
Fri Mar 22 11:29:11 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
Partial fix for problem where keypad keys acted
|
||||
as shift-arrows in an entry rather than arrows (#74327)
|
||||
|
||||
* gtk/gtkkeyhash.c (_gtk_key_hash_lookup): Sort lookup
|
||||
results by number of modifiers in the entry. Fixes
|
||||
problem where if a key matched both modified and unmodified
|
||||
key bindings ... e.g., the distinguishing key binding
|
||||
was consumed, then it was random which was used.
|
||||
|
||||
* gtk/gtkbindings.c (gtk_binding_entries_sort_patterns):
|
||||
Catch the case where there are multiple entries from the
|
||||
same bindingset (with different modifiers), and use only
|
||||
the first entry, which, with the change in _gtk_key_hash_lookup()
|
||||
will be the preferred value.
|
||||
|
||||
Fri Mar 22 10:56:19 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkaccelmap.c (gtk_accel_map_save_fd): Fix memory
|
||||
leak. (#74400, Morten Welinder.)
|
||||
|
||||
* gtk/gtkaccelmap.c: Properly handle short returns from
|
||||
write() calls. (Handling EINTR isn't enough... that only
|
||||
handles the case where you were interrupted before you
|
||||
wrote a single byte.)
|
||||
|
||||
* gdk/linux-fb/gdkmouse-fb.c gdk/linux-fb/gdkkeyboard-fb.c:
|
||||
Robustify against short returns from write() calls.
|
||||
|
||||
Fri Mar 22 10:12:10 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtktextview.c (gtk_text_view_paint): Change
|
||||
G_BREAKPOINT() to g_assert_not_reached ().
|
||||
(#75865, Ashok Venkiteswaran)
|
||||
|
||||
2002-03-22 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gdk/win32/gdkgc-win32.c (gdk_win32_gc_set_dashes): Don't clear
|
||||
all of the pen_style, just the PS_STYLE_MASK. Seems to fix #74441,
|
||||
but that is just the special case of one-pixel wide one-pixel
|
||||
on-off dotted lines. To fully implement generic X11 style dashed
|
||||
lines a major rewrite would be needed.
|
||||
|
||||
2002-03-21 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkaccelgroup.c (gtk_accelerator_valid): Trivial typo
|
||||
fix. (Vitaly Tishkov, #75726)
|
||||
|
||||
Thu Mar 21 10:04:05 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkwindow.c (gdk_window_real_get_depth): Remove
|
||||
some left over debugging code with a G_BREAKPOINT()
|
||||
in it.
|
||||
|
||||
Wed Mar 20 19:33:31 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkcalendar.c (gtk_calendar_main_button): When
|
||||
changing months when the user clicks on a prev-month
|
||||
or next-month day, focus and select the new day.
|
||||
Ignore double clicks on prev-month, next-month days.
|
||||
(Based on suggestions from Andras Salamon, #74173)
|
||||
|
||||
* gtk/gtkcalendar.c: Implement the focused/unfocused
|
||||
selected color change.
|
||||
|
||||
2002-03-20 Alex Larsson <alexl@redhat.com>
|
||||
|
||||
Patches from Carlo E. Prelz <fluido@fluido.as>
|
||||
Now gtkfb at least compiles and mostly works. The keyboard
|
||||
stuff needs more loving.
|
||||
|
||||
* gdk/linux-fb/gdkkeyboard-fb.c (xlate_get_for_keyval,
|
||||
xlate_get_for_keycode, raw_get_for_keyval, raw_get_for_keycode):
|
||||
At least set the out parameters for these calls.
|
||||
|
||||
* gdk/linux-fb/gdkmain-fb.c:
|
||||
(gdk_pointer_grab_info_libgtk_only, gdk_keyboard_grab_info_libgtk_only):
|
||||
Implement new functions.
|
||||
|
||||
Wed Mar 20 19:00:03 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkentry.c (gtk_entry_set_text): Short-circuit
|
||||
the text to the exact same thing, so we don't
|
||||
unexpectedly change the selection or cursor position.
|
||||
(#74290, John Ellis.)
|
||||
|
||||
Thu Mar 21 00:05:14 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_get_background_area),
|
||||
(gtk_tree_view_get_cell_area): fix logic (fixes #74235, #73593)
|
||||
|
||||
Wed Mar 20 17:11:51 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkrc.c: Patch from Richard Hestilow to fix
|
||||
gtk-font-name changes for widgets that get the actual
|
||||
default style. (#73709)
|
||||
|
||||
Wed Mar 20 22:59:23 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtkrbtree.[ch]: add _gtk_rbtree_set_fixed_height()
|
||||
|
||||
* gtk/gtktreeprivate.h: add fixed_height_check field
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_init): initialize
|
||||
scroll_sync_timer and fixed_height_check
|
||||
(do_validate_rows): add fixed_height_check. If all validated rows
|
||||
in the first cycle have the same height, then we set that height for
|
||||
the entire tree. This is some sort of 'fake' optimization, but helps
|
||||
a lot for the common case. We keep validating the entire tree in
|
||||
the background though.
|
||||
(gtk_tree_view_set_model): reset fixed_height_check
|
||||
|
||||
Wed Mar 20 16:36:08 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/*.c: Patch from Erwann Chenede, #73900 fixing
|
||||
a lot of warnings with Forte CC, mostly implicit
|
||||
casts between void * and function pointers.
|
||||
|
||||
* gdk/gdkevents.c (gdk_event_get_state): GdkEventVisibility's
|
||||
state field is not a GdkModifierType. (Also #73900)
|
||||
|
||||
Wed Mar 20 12:35:22 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_grab_default): Remove
|
||||
leftover notification of has-default. (#75508, Jacob
|
||||
Berkman.)
|
||||
|
||||
Wed Mar 20 12:27:07 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkaccelgroup.c (gtk_accelerator_valid): Allow
|
||||
arrow keys as accelerators, as long as some modifier
|
||||
is pressed. (#75495)
|
||||
|
||||
* gtk/gtkaccelgroup.c (gtk_accelerator_valid): Fix
|
||||
incorrect example in the docs.
|
||||
|
||||
Wed Mar 20 12:06:30 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_set_child_visible):
|
||||
Fix segfault when widget->parent is NULL.
|
||||
(#75615, Alexey A. Malyshev)
|
||||
|
||||
Wed Mar 20 11:32:07 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkentry.c: Improve test to prevent infinite
|
||||
loop. (#74952, Thomas Leonard)
|
||||
|
||||
* gtk/gtkmenushell.c (gtk_real_menu_shell_cycle_focus):
|
||||
Fix warning when toplevel menu shell isn't a menu
|
||||
bar. (Thomas Leonard, #75602)
|
||||
|
||||
Wed Mar 20 11:00:59 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* configure.in: Use $PKG_CONFIG, not pkg-config.
|
||||
(LEE Sau Dan, #75572)
|
||||
|
||||
Wed Mar 20 10:55:56 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/x11/gdkevents-x11.c (gdk_event_translate): Fix assignment
|
||||
of time in scroll events. (Sven Neumann, #75574)
|
||||
|
||||
2002-03-20 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gdk/win32/gdkdnd-win32.c (gdk_drag_find_window): Use
|
||||
gdk_window_get_toplevel(), as it is the top-level windows that are
|
||||
registered for DND.
|
||||
|
||||
* gdk/win32/gdkwin32.h: Don't include gdkinternals.h.
|
||||
|
||||
2002-03-19 jacob berkman <jacob@ximian.com>
|
||||
|
||||
* gtk/gtkcombo.c (gtk_combo_find): fix infinite loop when
|
||||
gtk_combo_func() returns NULL (bug #75464)
|
||||
|
||||
2002-03-18 jacob berkman <jacob@ximian.com>
|
||||
|
||||
* gtk/gtkaspectframe.c (gtk_aspect_frame_class_init): set the
|
||||
correct min/max values for the ratio property (fixes #75331)
|
||||
|
||||
Mon Mar 18 11:55:03 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkimmulticontext.c (gtk_im_multicontext_get_slave):
|
||||
Patch from Yao Zhang fixing reference count leak.
|
||||
|
||||
* gtk/gtkentry.c (gtk_entry_key_release): if (entry->editable),
|
||||
not if (!entry->editable).
|
||||
|
||||
Mon Mar 18 11:09:17 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/x11/gdkwindow-x11.c (gdk_window_set_override_redirect):
|
||||
Fix backwards conditional. (#75019, Dan Winship.)
|
||||
|
||||
Sun Mar 17 01:11:16 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_size_request): use
|
||||
do_validate_rows instead of validate_rows_handler (fix by
|
||||
Mike Pieper, #74126)
|
||||
|
||||
Sat Mar 16 23:54:56 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gdk/x11/gdkwindow-x11.c (gdk_window_set_static_bit_gravity): just
|
||||
return when we have an input_only window (fix by Owen Taylor)
|
||||
|
||||
* gtk/gtktreeprivate.h (struct _GtkTreeViewPrivate): add
|
||||
scroll_sync_timer
|
||||
|
||||
* gtk/gtktreeview.c (install_scroll_sync_handler): new function,
|
||||
(scroll_sync_handler): ditto,
|
||||
(gtk_tree_view_unrealize): take scroll_sync_timer into account
|
||||
(gtk_tree_view_row_deleted): install scroll_sync_timer instead of
|
||||
calling top_row_to_dy/dy_to_top_row directly
|
||||
-- this greatly speeds up clearing the model (#73199)
|
||||
|
||||
* gtk/gtktreemodelsort.c
|
||||
(gtk_tree_model_sort_convert_path_to_child_path): fix up this function,
|
||||
for some reason I really screwed it up (fixes #74663)
|
||||
|
||||
2002-03-16 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* configure.in (GDK_PIXBUF_DEP_CFLAGS) (GDK_PIXBUF_XLIB_DEP_CFLAGS)
|
||||
(GDK_DEP_CFLAGS) (GTK_DEP_CFLAGS): include CFLAGS from gthread-2.0
|
||||
so that the libs work correctly in a threaded environment.
|
||||
|
||||
Fri Mar 15 12:51:42 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtktreeviewcolumn.c
|
||||
(gtk_tree_view_column_new_with_attributes): add example to docs,
|
||||
as people are seeming to have trouble with this function.
|
||||
|
||||
2002-03-15 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* configure.in: Set MATH_LIB to empty also on Win32.
|
||||
|
||||
Fri Mar 15 15:37:01 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/x11/gdkdrawable-x11.c (convert_to_format):
|
||||
Fix byte shift arithmetic for big-endian. (Tracked
|
||||
down with help from Tuomas Kuosmanen)
|
||||
|
||||
Fri Mar 15 11:28:41 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_insert_column_with_data_func):
|
||||
make args const, 74159
|
||||
(gtk_tree_view_insert_column_with_attributes): ditto
|
||||
|
||||
* gtk/gtktreeviewcolumn.c
|
||||
(gtk_tree_view_column_cell_process_action): remov unused variables.
|
||||
|
||||
Fri Mar 15 13:31:51 2002 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
* gtk/gtkmenu.c (gtk_menu_leave_notify): Fix test for "active
|
||||
submenu".
|
||||
|
||||
2002-03-15 Padraig O'Briain <padraig.obriain@sun.com>
|
||||
|
||||
* gdk/x11/gdkkeys-x11.c (update_keymaps): Fudge keymap to have lower
|
||||
upper case variants if there is only a single keysym per keycode and
|
||||
the key symbol has upper and lower case variants (#74512)
|
||||
|
||||
Thu Mar 14 17:09:52 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkwindow.c (gdk_window_process_all_updates): Fix rather
|
||||
improbable reentrancy problem if a window is destroyed
|
||||
while updates are being processed on another window. (Noticed
|
||||
by Michael Meeks, #74708)
|
||||
|
||||
2002-03-14 Vitaly Tishkov <tvv@sparc.spb.su>
|
||||
|
||||
* gtk/gtktreemodelsort.c
|
||||
typo in docs for gtk_tree_model_sort_convert_iter_to_child_iter() fixed
|
||||
|
||||
|
||||
Thu Mar 14 11:17:18 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkkeyhash.c (_gtk_key_hash_remove_entry): When
|
||||
removing keys from the key hash, reinsert the right list
|
||||
back into the hash. (Dave Camp, #74571)
|
||||
|
||||
Wed Mar 13 17:17:40 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkobject.h: Remove left-over GTK_OBJECT_CONNECTED
|
||||
macro that was defined in terms of the now-gone GTK_CONNECTED
|
||||
flag. (Seth Burgess, #74028)
|
||||
|
||||
Wed Mar 13 17:11:10 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkaccelgroup.c (accel_group_weak_ref_detach): Unset
|
||||
the acceleratable_groups qdata because qdata isn't removed
|
||||
on ->dispose but rather on ->finalize. (#74569, found
|
||||
by Matt Wilson.)
|
||||
|
||||
Tue Mar 12 23:14:23 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtktreeselection.c (gtk_tree_selection_unselect_iter): Fix
|
||||
cut-n-paste bug.
|
||||
|
||||
Sat Mar 9 18:23:25 2002 Richard Hestilow <hestilow@ximian.com>
|
||||
|
||||
* gtk/gtkimage.c (gtk_image_set_from_filename): Allow NULL
|
||||
filenames.
|
||||
|
||||
Tue Mar 12 10:50:09 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* modules/input/gtkimcontextxim.c (gtk_im_context_xim_filter_keypress):
|
||||
Fix incorrect return value, filter out returns of 0x7f for
|
||||
the delete key. (#74179, Kang Jeong-He)
|
||||
|
||||
Mon Mar 11 23:42:11 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtktreemodel.c (gtk_tree_model_foreach): fix totally broken
|
||||
foreach function.
|
||||
|
||||
2002-03-11 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkitemfactory.c (gtk_item_factory_add_foreign): Document
|
||||
gtk_{menu_item,widget}_set_accel_path() as the recommended API.
|
||||
(#69244)
|
||||
|
||||
2002-03-11 James Henstridge <james@daa.com.au>
|
||||
|
||||
* configure.in: set CCAS and CCASFLAGS to get automake 1.6
|
||||
compatibility without breaking things for people using 1.4.
|
||||
|
||||
Sun Mar 10 21:04:30 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_button_press): finally get the
|
||||
right behavior.
|
||||
|
||||
Mon Mar 11 01:25:14 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_button_press): compare path with
|
||||
cursor path and not with the selected iter in the 'decide to edit'
|
||||
check
|
||||
|
||||
896
ChangeLog.pre-2-6
Normal file
@@ -0,0 +1,896 @@
|
||||
2002-07-16 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
* gdk/gdkpixbuf-drawable.c (rgb565lsb): Fixed the LSB -> MSB case.
|
||||
Fixes #79463.
|
||||
(rgb565msb): Fix the MSB -> MSB case. Fixes #79190.
|
||||
|
||||
Fri Apr 19 16:30:09 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeprivate.h, gtk/gtktreeview.c: rename
|
||||
last_single_clicked{,_2} to last_button_press{,_2}, as the latter
|
||||
is a more sane name.
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_button_press): use ->priv->anchor
|
||||
instead of ->priv->cursor, check for the anchor at another place, as
|
||||
you can go in edit mode without having an anchor.
|
||||
|
||||
2002-04-18 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkitemfactory.c:
|
||||
* gtk/gtkiconfactory.c:
|
||||
* gtk/gtkwidget.c:
|
||||
* gtk/gtkstyle.c:
|
||||
* gtk/gtkrc.c:
|
||||
* gtk/gtktreeviewcolumn.c:
|
||||
* gtk/gtkdialog.c:
|
||||
* gtk/gtktreemodel.c: s/<!>/<!-- -->/g throughout the
|
||||
documentation to bring the produced Docbook closer to XML.
|
||||
|
||||
2002-04-18 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gdk-pixbuf/Makefile.am (uninstall-libtool-import-lib)
|
||||
* gdk/Makefile.am (uninstall-libtool-import-lib): Fix typo,
|
||||
thanks to David Sterba for noticing.
|
||||
|
||||
* gtk/gtkmain.h
|
||||
* gtk/gtkmain.c (gtk_init_abi_check, gtk_init_check_abi_check): In
|
||||
GTK+ 2.0 the GtkWindow struct actually is the same size in gcc on
|
||||
Win32 whether compiled with -fnative-struct or not. Unfortunately
|
||||
this wan't noticed until now. So, from now on, check some other
|
||||
struct, too, for which the use of -fnative-struct still
|
||||
matters. GtkBox is one such.
|
||||
|
||||
Thu Apr 18 00:23:31 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreemodelsort.c
|
||||
(gtk_tree_model_sort_convert_path_to_child_path): so this function
|
||||
was completely broken. Fix it and improve readability.
|
||||
|
||||
2002-04-17 Anders Carlsson <andersca@gnu.org>
|
||||
|
||||
* tests/testtreeedit.c (button_press_event): Add a small
|
||||
test case.
|
||||
|
||||
Wed Apr 17 00:21:36 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreestore.c (gtk_tree_store_insert_before): fix docs
|
||||
|
||||
Tue Apr 16 17:28:21 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_real_collapse_row): check
|
||||
->priv->cursor and ->priv->anchor rowrefs before removing
|
||||
node->children from the rbtree. Also check the
|
||||
->priv->last_single_clicked and ->priv->last_single_clicked_2 rowrefs
|
||||
(I think I really need to rename those two someday).
|
||||
|
||||
Tue Apr 16 07:53:49 2002 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkmenu.c (gtk_menu_key_press): don't install/change accelerators
|
||||
from locked accel groups.
|
||||
|
||||
* gtk/gtkwidget.c (_gtk_widget_get_accel_path): export whether the
|
||||
accel path is from a locked accel group.
|
||||
|
||||
Mon Apr 15 15:41:56 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtkcontainer.c (gtk_container_focus): include internal
|
||||
children when doing focus.
|
||||
(gtk_container_get_all_children): new static function to include
|
||||
internal children when making a list of them.
|
||||
|
||||
Sun Apr 14 16:56:59 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeprivate.h: add _gtk_tree_view_column_get_editable_cell and
|
||||
_gtk_tree_view_column_get_neighbor_sizes
|
||||
|
||||
* gtk/gtktreeviewcolumn.c (struct _GtkTreeViewColumnCellInfo): add
|
||||
real_width field,
|
||||
(_gtk_tree_view_column_get_editable_cell): implement,
|
||||
(gtk_tree_view_column_cell_process_action): fill info->real_width
|
||||
(_gtk_tree_view_column_get_neighbor_sizes): implement
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_button_press): make the "editable
|
||||
widget" show up with the same size as the actual cell, so it doesnt
|
||||
cover the complete column if there are any other cells in that column.
|
||||
|
||||
2002-04-14 Abigail Brady <morwen@evilmagic.org>
|
||||
|
||||
* gtk/gtkfilesel.c: Fix typo in message.
|
||||
|
||||
2002-04-13 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gdk/gdkpixbuf-drawable.c (gdk_pixbuf_get_from_drawable): create
|
||||
the target pixbuf AFTER filling in width/height, so that
|
||||
passing in -1 for width/height will work.
|
||||
|
||||
Sat Apr 13 22:49:45 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
Fixes #75510
|
||||
|
||||
* gtk/gtktreeselection.c (gtk_tree_selection_get_selected): make this
|
||||
function work correctly and more sane
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_real_collapse_row): remove
|
||||
node->children from rbtree before emitting GtkTreeSelection::changed
|
||||
|
||||
Sat Apr 13 17:15:12 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_init): dont set
|
||||
the mode to GTK_CELL_RENDERER_MODE_EDITABLE by default,
|
||||
(gtk_cell_renderer_text_class_init): for some reason our default for
|
||||
editable was TRUE, of course this is FALSE.
|
||||
(gtk_cell_renderer_text_set_property): update mode when editable
|
||||
has been changed.
|
||||
|
||||
2002-04-12 jacob berkman <jacob@ximian.com>
|
||||
|
||||
* gdk/x11/xsettings-client.c (fetch_card8): fix cut-n-paste bug
|
||||
which breaks big-endian machines (fixes #73585)
|
||||
|
||||
2002-04-12 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* gtk/gtknotebook.c (gtk_notebook_real_remove): relocate the
|
||||
remove_weak_pointer to just before we free the page, to be sure
|
||||
it doesn't get re-added. #75282
|
||||
|
||||
Fri Apr 12 18:32:46 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_real_set_cursor): add
|
||||
clamp_node argument
|
||||
(toplevel): update usages of gtk_tree_view_real_set_cursor,
|
||||
(gtk_tree_view_focus_to_cursor): don't let
|
||||
gtk_tree_view_real_set_cursor clamp the node, so you won't get
|
||||
unexpected scrolling
|
||||
|
||||
2002-04-11 Michael Meeks <michael@ximian.com>
|
||||
|
||||
* gtk/gtklabel.c
|
||||
(gtk_label_parse_uline, gtk_label_set_text),
|
||||
(gtk_label_set_text_with_mnemonic): add freeze / thaws
|
||||
to stop deluge of 'notify' signals.
|
||||
|
||||
Sat Apr 6 06:57:00 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkmenushell.[ch] gtk/gtkmenuitem.c: Export
|
||||
private _gtk_menu_shell_activate() to encapsulate
|
||||
cut-and-paste code.
|
||||
|
||||
* gtk/gtkmenubar.c: Select the first item on the menu bar
|
||||
for F10 rather than acting as if the user pressed <Alt>F
|
||||
to select the file manager.
|
||||
|
||||
Tue Apr 9 19:01:28 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
Fix problems with HandleBox and focusing - #78232
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_translate_coordinates): Handle
|
||||
GtkHandleBox / GnomeDock style window heirarchy / widget
|
||||
heirarchy disconnects. :-(.
|
||||
|
||||
* gtk/gtkcontainer.c: Handle failures from
|
||||
gtk_widget_translate_coordinates (Focusing is not right, but at
|
||||
least it doesn't go into infinite loops.)
|
||||
|
||||
Tue Apr 9 18:34:58 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkcontainer.c (_gtk_container_queue_resize): Always
|
||||
set the ALLOC_NEEDED and REQUEST_NEEDED flags up the hierarchy,
|
||||
even if we aren't currently in a resize container... we need
|
||||
this to properly handle size changes to widgets that are
|
||||
being moved from one heirarchy to another. (#78226)
|
||||
|
||||
Tue Apr 9 21:41:24 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
Fixes #78110
|
||||
|
||||
* gtk/gtktreeselection.c (_gtk_tree_selection_internal_select_node):
|
||||
add override_browse_mode argument and implement,
|
||||
(gtk_tree_selection_unselect_path): always unselect the path,
|
||||
(toplevel): update uses of _gtk_tree_selection_internal_select_node
|
||||
|
||||
* gtk/gtktreeview.c: update uses of
|
||||
_gtk_tree_selection_internal_select_node
|
||||
|
||||
* gtk/gtktreeprivate.h (_gtk_tree_selection_internal_select_node):
|
||||
update prototype
|
||||
|
||||
Tue Apr 9 21:39:44 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
Fixes #77862
|
||||
|
||||
* gtk/gtktreeprivate.h: add _gtk_tree_view_column_has_editable_cell
|
||||
|
||||
* gtk/gtktreeviewcolumn.c (_gtk_tree_view_column_has_editable_cell):
|
||||
new function
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_button_press): send cell event
|
||||
on first click when cell isn't editable
|
||||
|
||||
Tue Apr 9 21:37:31 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreedatalist.c (_gtk_tree_data_list_check_type): add some
|
||||
types which were missing and useful to use (fixes #77870)
|
||||
|
||||
2002-04-09 Anders Carlsson <andersca@gnu.org>
|
||||
|
||||
* gtk/gtkfilesel.c (open_new_dir): Initialize error to NULL.
|
||||
|
||||
2002-04-08 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* tests/testgtk.c: really revert testgtk.c
|
||||
|
||||
Mon Apr 8 20:28:54 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeselection.c (gtk_tree_selection_select_path),
|
||||
(gtk_tree_selection_unselect_path),
|
||||
(gtk_tree_selection_path_is_selected): check the return value of
|
||||
_gtk_tree_view_find_node and return if it's TRUE. This makes those
|
||||
functions work somewhat saner on non-expanded trees.
|
||||
|
||||
Fri Apr 5 18:28:56 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeselection.c (gtk_tree_selection_set_mode): free
|
||||
anchor row reference after unselecting the selection (fixes #76272)
|
||||
|
||||
Fri Apr 5 18:27:48 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_real_expand_row): only return
|
||||
when we don't have to open all children (fixes #75736)
|
||||
|
||||
Fri Apr 5 18:24:24 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_clear): unref
|
||||
cellrenderer after clearing the attributes of the renderer (fixes
|
||||
#75592)
|
||||
|
||||
Fri Apr 5 05:55:14 2002 Jonathan Blandford <jrb@gnome.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_grab_focus): implement.
|
||||
(gtk_tree_view_move_cursor_up_down): check for focus
|
||||
(gtk_tree_view_move_cursor_page_up_down): ditto
|
||||
(gtk_tree_view_move_cursor_left_right): ditto
|
||||
(gtk_tree_view_move_cursor_start_end): ditto
|
||||
(gtk_tree_view_real_select_all): ditto
|
||||
(gtk_tree_view_real_unselect_all): ditto
|
||||
(gtk_tree_view_real_select_cursor_row): ditto
|
||||
(gtk_tree_view_real_toggle_cursor_row): ditto
|
||||
(gtk_tree_view_real_expand_collapse_cursor_row): ditto
|
||||
(gtk_tree_view_real_select_cursor_parent): ditto
|
||||
(gtk_tree_view_real_start_interactive_search): ditto
|
||||
|
||||
* gtk/gtktreeviewcolumn.c: grab focus
|
||||
|
||||
2002-04-05 Alex Larsson <alexl@redhat.com>
|
||||
|
||||
* gdk/linux-fb/gdkkeyboard-fb.c (write_string):
|
||||
Fix undefined variable typo.
|
||||
Patch from Simon Floery <simon.floery@gmx.at>
|
||||
|
||||
Fri Apr 5 01:06:15 2002 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gdk/x11/gdkwindow-x11.c (set_text_property): fix segfault
|
||||
upon NULL return from gdk_utf8_to_string_target().
|
||||
|
||||
* gdk/x11/gdkselection-x11.c (gdk_utf8_to_string_target): fix
|
||||
return value comment to mention NULL returns upon EMFILE.
|
||||
|
||||
Thu Apr 4 22:35:42 2002 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
* tests/testgtk.c (menu_items): revert accidentally commited
|
||||
change to testgtk.c
|
||||
|
||||
Thu Apr 4 22:28:08 2002 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
* gtk/gtkmenuitem.c (gtk_menu_item_paint): Fix problem with menu
|
||||
titles being clipped (#75948)
|
||||
|
||||
2002-04-04 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gdk/gdkrgb.c: Fix some bugs, and introduce a minor feature.
|
||||
|
||||
(gdk_rgb_convert_4_pack): New function, for 16-color (4 bits per
|
||||
pixel) static visuals (fixes #858).
|
||||
|
||||
(gdk_rgb_convert_gray4_pack, gdk_rgb_convert_gray4_d_pack): Fix
|
||||
same bugs in both functions: Odd start coordinate (partial byte)
|
||||
was not handled correctly. Also a partial final byte was not
|
||||
handled correctly.
|
||||
|
||||
(gdk_rgb_do_colormaps): Use G_N_ELEMENTS.
|
||||
(gdk_rgb_create_info): For pseudocolor visuals, use the 2x2x2
|
||||
colorcube only for depths 3 and 4. For static color, use it for
|
||||
depths 3..7 like before. (Depth 5..7 pseudocolor probably never
|
||||
occurs on X11. It doesn't normally occur on Win32 either, but
|
||||
there is experimental code in gdkvisual-win32.c to let the user
|
||||
restrict the size of palette used.)
|
||||
(gdk_rgb_init): Set gdk_rgb_verbose if the GDK_DEBUG_GDKRGB flag
|
||||
is set.
|
||||
(gdk_rgb_select_conv): Use gdk_rgb_convert_8 also for depths 5, 6
|
||||
and 7 (see above). Use gdk_rgb_convert_4_pack for 4 bits per pixel
|
||||
static color.
|
||||
|
||||
Tue Apr 2 11:10:13 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtkliststore.c (gtk_list_store_set_sort_func): set the
|
||||
sort_func correctly, 77030
|
||||
|
||||
Tue Apr 2 13:44:27 2002 Tim Janik <timj@gtk.org>
|
||||
|
||||
* configure.in: update version to 2.0.2, binary age 2, interface
|
||||
age 2.
|
||||
|
||||
* NEWS: updates for 2.0.2.
|
||||
|
||||
Mon Apr 1 22:20:24 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_move_cursor_page_up_down): add
|
||||
check for y > tree_view->priv->height (fixes #76974)
|
||||
|
||||
Mon Apr 1 22:19:39 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreemodelsort.c (gtk_tree_model_sort_sort_level): get
|
||||
the stamp changes right this time
|
||||
|
||||
Mon Apr 1 22:13:24 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreemodel.c (gtk_tree_row_reference_free): only
|
||||
disconnect the ref callbacks when model == proxy (Thanks go to
|
||||
Manuel Clos Crespo for the remote debugging)
|
||||
|
||||
Sat Mar 30 15:19:24 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreemodelsort.c: revert the latest stamp increment changes,
|
||||
as it broke stuff for trees
|
||||
|
||||
Fri Mar 29 18:15:12 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* ===== Released 2.0.1 ======
|
||||
|
||||
Fri Mar 29 18:09:18 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkaccelgroup.c (gtk_accel_group_query): Call
|
||||
gdk_keyval_to_lower() on the key passed in, since we
|
||||
lowercase all other key vals passed in, so querying
|
||||
keyvals will otherwise fail if the caller used
|
||||
an uppercase accelerators (#76899, Vitaly Tishkov)
|
||||
|
||||
Fri Mar 29 17:41:21 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkmain.c (load_modules): Fix screwup in handling
|
||||
of module path that was resulting in freed memory being
|
||||
accessed when both GTK_MODULES and a theme were set.
|
||||
(#76902, Johan Dahlin)
|
||||
|
||||
Fri Mar 29 17:57:36 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkiconfactory.c (get_default_icons): Fix wrong
|
||||
stock id's for ADD/REMOVE. (#76915, Vitaly Tishkov)
|
||||
|
||||
2002-03-29 Hans Breuer <hans@breuer.org>
|
||||
|
||||
* gtk/gtkmain.h : fix typo in gtk_init_check macro, which
|
||||
caused crashes if argc != 0
|
||||
|
||||
* gtk/stock-icons/makefile.msc : added new icons
|
||||
|
||||
Fri Mar 29 20:17:35 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreemodelsort.c (gtk_tree_model_sort_rows_reordered):
|
||||
remove call to gtk_tree_model_sort_increment_stamp
|
||||
(gtk_tree_model_sort_sort_level): always increment the stamp
|
||||
|
||||
Fri Mar 29 00:19:41 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* NEWS: Updates
|
||||
|
||||
* configure.in: Version 2.0.1, binary, interface age 1.
|
||||
|
||||
* configure.in (GDK_PIXBUF_VERSION): Up required versions
|
||||
of dependencies.
|
||||
|
||||
* gtk/gtkiconfactory.c gtk/stock-icons/Makefile.am:
|
||||
Add stock_add/remove_16.
|
||||
|
||||
Thu Mar 28 18:38:30 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtk[hv]paned.c (gtk_[hv]paned_size_allocate):
|
||||
Don't show the window unless the widget is mapped.
|
||||
(#76742, Dennis Björklund, Soeren Sandmann)
|
||||
|
||||
2002-03-29 Hans Breuer <hans@breuer.org>
|
||||
|
||||
Fixed dashed line issues (#74441) to an IMO reasonable extend.
|
||||
That is: use PS_USERSTYLE on WinNT (the next GDI limit appears
|
||||
to be with lines width > 50); Render horizontal and vertical
|
||||
dashed lines on Win9x 'by hand'. Dotted selection rectangles
|
||||
and Dia look nice ...
|
||||
|
||||
* gdk/win32/gdkprivate-win32.h : add pen_dashes pointer and
|
||||
num_pen_dashes to _GdkGCWin32
|
||||
* gdk/win32/gdkgc-win32.c : initialize pen_dashes and remove
|
||||
the guesses from dashes to windoze line styles.
|
||||
(predraw_set_forground) : always ExtCreatePen (PS_SOLID) on
|
||||
Win9x, which does not support PS_USERSTYLE.
|
||||
* gdk/win32/gdkdrawable-win32.c : new functions render_line_
|
||||
<horizontal|vertical>. Use them if not running on NT in
|
||||
gdk_win32_draw_<rectangle|segments|lines> ()
|
||||
|
||||
* gdk/win32/gdkkeys-win32.c (gdk_keyval_name) : return NULL
|
||||
for keyval == 0 to avoid to have zeros in all menu entries
|
||||
without accelerator.
|
||||
|
||||
2002-03-29 Jakub Steiner <jimmac@ximian.com>
|
||||
|
||||
* gtk/stock-icons/stock_add_24.png:
|
||||
* gtk/stock-icons/stock_add_16.png:
|
||||
* gtk/stock-icons/stock_remove_24.png:
|
||||
* gtk/stock-icons/stock_remove_16.png: use a simple '+' and '-',
|
||||
works better. the old box was too clumsy
|
||||
|
||||
Thu Mar 28 21:11:04 2002 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkfilesel.c (open_new_dir): when encountering non-UTF-8 file
|
||||
names, alert the user with g_message() instead of g_warning() and
|
||||
put out the actual conversion error.
|
||||
|
||||
2002-03-28 Dave Camp <dave@ximian.com>
|
||||
|
||||
* gtk/gtktreeview.c (install_scroll_sync_handler): Don't install
|
||||
the handler if the widget isn't realized.
|
||||
|
||||
2002-03-28 Jakub Steiner <jimmac@ximian.com>
|
||||
|
||||
* gtk/stock-icons/stock_font*:
|
||||
* gtk/stock-icons/stock_align*:
|
||||
* gtk/stock-icons/stock_text*: better solution to the dark theme
|
||||
problem. Also looks more pretty IMHO
|
||||
|
||||
2002-03-27 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* configure.in: Try to find libpng via pkg-config first,
|
||||
since libpng-1.2.2 will come with a .pc file.
|
||||
|
||||
Wed Mar 27 11:10:39 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtknotebook.c (gtk_notebook_real_remove): Set
|
||||
page->last_focus_child to NULL as well as removing the
|
||||
weak reference, to deal with reentrancy in set_focus_child().
|
||||
(#76634, Dennis Björklund)
|
||||
|
||||
2002-03-27 Murray Cumming <murrayc@usa.net>
|
||||
|
||||
* gtk/gtktreeview.c: Corrected registered return type of
|
||||
"move-cursor" signal. Had to add a marshaller to
|
||||
gtk/gtkmarshalers.list.
|
||||
|
||||
Tue Mar 26 14:46:50 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkmenu.c (gtk_menu_popup): Shuffle the ordering around
|
||||
some more (position before realizing) fixing problems with
|
||||
arrows popping up at the wrong time (#73386), hopefully not
|
||||
introducing other problems. (Reported by Ettore Perrazoli, others)
|
||||
|
||||
2002-03-26 Dave Camp <dave@ximian.com>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_button_press): Free the path
|
||||
after calling gtk_tree_view_row_activated() rather than before.
|
||||
|
||||
2002-03-25 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* gtk/gtkrc.c (gtk_rc_parse_font_name): free the style's
|
||||
font_description before assigning a new one.
|
||||
(gtk_rc_parse_stock): always unref the created icon_set. #76289
|
||||
|
||||
2002-03-25 Mark McLoughlin <mark@skynet.ie>
|
||||
|
||||
* gtk/gtkbindings.c: (gtk_binding_entry_add_signal),
|
||||
kill code duplicated in gtk_binding_entry_add_signall.
|
||||
|
||||
Sun Mar 24 10:32:38 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtktreemodel.c (gtk_tree_path_copy): Make path arg const, #75653
|
||||
|
||||
* gtk/gtkfontsel.c (gtk_font_selection_show_available_styles): fix
|
||||
a warning
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_button_press): remove the grab
|
||||
when we emit row_activated so that listeners of this signal can
|
||||
grab the mouse, #75629
|
||||
|
||||
2002-03-23 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gtk/gtktextlayout.c (gtk_text_layout_real_invalidate):
|
||||
invalidate the line containing start, even if the [start,end)
|
||||
range is empty (just invalidate [start,end], essentially).
|
||||
Partially fixes #72374
|
||||
|
||||
2002-03-23 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gtk/gtktextview.c (gtk_text_view_do_popup): end any selection in
|
||||
progress, patch from db@zigo.dhs.org, #74620
|
||||
|
||||
2002-03-23 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gtk/gtktextview.c (gtk_text_view_move_cursor_internal): extend
|
||||
selection for pageup/pagedown and ctrl+pageup/pagedown if
|
||||
shift is held. more of #53934
|
||||
|
||||
2002-03-23 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gtk/gtktextview.c (gtk_text_view_destroy_layout): disconnect
|
||||
layout handlers earlier in the function, to avoid possible
|
||||
reentrancy screwups
|
||||
(gtk_text_view_invalidate): Don't install idle handlers if
|
||||
layout == NULL, otherwise we get problems during finalization
|
||||
since clearing the buffer invalidates and puts the idle handlers
|
||||
back after we destroy the layout. #74660
|
||||
(gtk_text_view_ensure_layout): Install the validation handlers
|
||||
right after creating the layout.
|
||||
|
||||
* gtk/gtktexttagtable.c (foreach_unref): call
|
||||
_gtk_text_buffer_notify_will_remove_tag(), #75126
|
||||
|
||||
2002-03-22 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gdk/x11/gdkfont-x11.c (gdk_fontset_load): add more explanatory
|
||||
text to the error message about missing charsets, and use
|
||||
g_printerr() not g_warning() since this is typically not a
|
||||
programming error (we do not export any API to ask whether
|
||||
a font set will have missing charsets so apps realistically can't
|
||||
do anything other than try the gdk_fontset_load())
|
||||
|
||||
* gtk/gtktextview.c (gtk_text_view_key_press_event): return FALSE
|
||||
if the text view isn't editable and the user presses Return,
|
||||
so default buttons and such can be activated, #74937
|
||||
|
||||
* gtk/gtktextbuffer.c (paste_from_buffer): don't insert
|
||||
if the insertion point is not editable and the paste
|
||||
is interactive, #74125
|
||||
|
||||
* gtk/gtkwindow.c (gtk_window_move_resize): enhance the #if 0
|
||||
debug spew
|
||||
|
||||
* gtk/gtktextbuffer.c (cut_or_copy): only remove the previous
|
||||
cut/copied data right before replacing it, when we know we are
|
||||
going to replace it. Fixes #74049
|
||||
|
||||
2002-03-22 Richard Hult <rhult@codefactory.se>
|
||||
|
||||
* gdk/gdkevents.c (gdk_event_get_root_coords): Fix typo, where x
|
||||
value was assigned to both x and y.
|
||||
|
||||
Fri Mar 22 11:29:11 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
Partial fix for problem where keypad keys acted
|
||||
as shift-arrows in an entry rather than arrows (#74327)
|
||||
|
||||
* gtk/gtkkeyhash.c (_gtk_key_hash_lookup): Sort lookup
|
||||
results by number of modifiers in the entry. Fixes
|
||||
problem where if a key matched both modified and unmodified
|
||||
key bindings ... e.g., the distinguishing key binding
|
||||
was consumed, then it was random which was used.
|
||||
|
||||
* gtk/gtkbindings.c (gtk_binding_entries_sort_patterns):
|
||||
Catch the case where there are multiple entries from the
|
||||
same bindingset (with different modifiers), and use only
|
||||
the first entry, which, with the change in _gtk_key_hash_lookup()
|
||||
will be the preferred value.
|
||||
|
||||
Fri Mar 22 10:56:19 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkaccelmap.c (gtk_accel_map_save_fd): Fix memory
|
||||
leak. (#74400, Morten Welinder.)
|
||||
|
||||
* gtk/gtkaccelmap.c: Properly handle short returns from
|
||||
write() calls. (Handling EINTR isn't enough... that only
|
||||
handles the case where you were interrupted before you
|
||||
wrote a single byte.)
|
||||
|
||||
* gdk/linux-fb/gdkmouse-fb.c gdk/linux-fb/gdkkeyboard-fb.c:
|
||||
Robustify against short returns from write() calls.
|
||||
|
||||
Fri Mar 22 10:12:10 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtktextview.c (gtk_text_view_paint): Change
|
||||
G_BREAKPOINT() to g_assert_not_reached ().
|
||||
(#75865, Ashok Venkiteswaran)
|
||||
|
||||
2002-03-22 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gdk/win32/gdkgc-win32.c (gdk_win32_gc_set_dashes): Don't clear
|
||||
all of the pen_style, just the PS_STYLE_MASK. Seems to fix #74441,
|
||||
but that is just the special case of one-pixel wide one-pixel
|
||||
on-off dotted lines. To fully implement generic X11 style dashed
|
||||
lines a major rewrite would be needed.
|
||||
|
||||
2002-03-21 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkaccelgroup.c (gtk_accelerator_valid): Trivial typo
|
||||
fix. (Vitaly Tishkov, #75726)
|
||||
|
||||
Thu Mar 21 10:04:05 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkwindow.c (gdk_window_real_get_depth): Remove
|
||||
some left over debugging code with a G_BREAKPOINT()
|
||||
in it.
|
||||
|
||||
Wed Mar 20 19:33:31 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkcalendar.c (gtk_calendar_main_button): When
|
||||
changing months when the user clicks on a prev-month
|
||||
or next-month day, focus and select the new day.
|
||||
Ignore double clicks on prev-month, next-month days.
|
||||
(Based on suggestions from Andras Salamon, #74173)
|
||||
|
||||
* gtk/gtkcalendar.c: Implement the focused/unfocused
|
||||
selected color change.
|
||||
|
||||
2002-03-20 Alex Larsson <alexl@redhat.com>
|
||||
|
||||
Patches from Carlo E. Prelz <fluido@fluido.as>
|
||||
Now gtkfb at least compiles and mostly works. The keyboard
|
||||
stuff needs more loving.
|
||||
|
||||
* gdk/linux-fb/gdkkeyboard-fb.c (xlate_get_for_keyval,
|
||||
xlate_get_for_keycode, raw_get_for_keyval, raw_get_for_keycode):
|
||||
At least set the out parameters for these calls.
|
||||
|
||||
* gdk/linux-fb/gdkmain-fb.c:
|
||||
(gdk_pointer_grab_info_libgtk_only, gdk_keyboard_grab_info_libgtk_only):
|
||||
Implement new functions.
|
||||
|
||||
Wed Mar 20 19:00:03 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkentry.c (gtk_entry_set_text): Short-circuit
|
||||
the text to the exact same thing, so we don't
|
||||
unexpectedly change the selection or cursor position.
|
||||
(#74290, John Ellis.)
|
||||
|
||||
Thu Mar 21 00:05:14 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_get_background_area),
|
||||
(gtk_tree_view_get_cell_area): fix logic (fixes #74235, #73593)
|
||||
|
||||
Wed Mar 20 17:11:51 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkrc.c: Patch from Richard Hestilow to fix
|
||||
gtk-font-name changes for widgets that get the actual
|
||||
default style. (#73709)
|
||||
|
||||
Wed Mar 20 22:59:23 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtkrbtree.[ch]: add _gtk_rbtree_set_fixed_height()
|
||||
|
||||
* gtk/gtktreeprivate.h: add fixed_height_check field
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_init): initialize
|
||||
scroll_sync_timer and fixed_height_check
|
||||
(do_validate_rows): add fixed_height_check. If all validated rows
|
||||
in the first cycle have the same height, then we set that height for
|
||||
the entire tree. This is some sort of 'fake' optimization, but helps
|
||||
a lot for the common case. We keep validating the entire tree in
|
||||
the background though.
|
||||
(gtk_tree_view_set_model): reset fixed_height_check
|
||||
|
||||
Wed Mar 20 16:36:08 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/*.c: Patch from Erwann Chenede, #73900 fixing
|
||||
a lot of warnings with Forte CC, mostly implicit
|
||||
casts between void * and function pointers.
|
||||
|
||||
* gdk/gdkevents.c (gdk_event_get_state): GdkEventVisibility's
|
||||
state field is not a GdkModifierType. (Also #73900)
|
||||
|
||||
Wed Mar 20 12:35:22 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_grab_default): Remove
|
||||
leftover notification of has-default. (#75508, Jacob
|
||||
Berkman.)
|
||||
|
||||
Wed Mar 20 12:27:07 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkaccelgroup.c (gtk_accelerator_valid): Allow
|
||||
arrow keys as accelerators, as long as some modifier
|
||||
is pressed. (#75495)
|
||||
|
||||
* gtk/gtkaccelgroup.c (gtk_accelerator_valid): Fix
|
||||
incorrect example in the docs.
|
||||
|
||||
Wed Mar 20 12:06:30 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_set_child_visible):
|
||||
Fix segfault when widget->parent is NULL.
|
||||
(#75615, Alexey A. Malyshev)
|
||||
|
||||
Wed Mar 20 11:32:07 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkentry.c: Improve test to prevent infinite
|
||||
loop. (#74952, Thomas Leonard)
|
||||
|
||||
* gtk/gtkmenushell.c (gtk_real_menu_shell_cycle_focus):
|
||||
Fix warning when toplevel menu shell isn't a menu
|
||||
bar. (Thomas Leonard, #75602)
|
||||
|
||||
Wed Mar 20 11:00:59 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* configure.in: Use $PKG_CONFIG, not pkg-config.
|
||||
(LEE Sau Dan, #75572)
|
||||
|
||||
Wed Mar 20 10:55:56 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/x11/gdkevents-x11.c (gdk_event_translate): Fix assignment
|
||||
of time in scroll events. (Sven Neumann, #75574)
|
||||
|
||||
2002-03-20 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gdk/win32/gdkdnd-win32.c (gdk_drag_find_window): Use
|
||||
gdk_window_get_toplevel(), as it is the top-level windows that are
|
||||
registered for DND.
|
||||
|
||||
* gdk/win32/gdkwin32.h: Don't include gdkinternals.h.
|
||||
|
||||
2002-03-19 jacob berkman <jacob@ximian.com>
|
||||
|
||||
* gtk/gtkcombo.c (gtk_combo_find): fix infinite loop when
|
||||
gtk_combo_func() returns NULL (bug #75464)
|
||||
|
||||
2002-03-18 jacob berkman <jacob@ximian.com>
|
||||
|
||||
* gtk/gtkaspectframe.c (gtk_aspect_frame_class_init): set the
|
||||
correct min/max values for the ratio property (fixes #75331)
|
||||
|
||||
Mon Mar 18 11:55:03 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkimmulticontext.c (gtk_im_multicontext_get_slave):
|
||||
Patch from Yao Zhang fixing reference count leak.
|
||||
|
||||
* gtk/gtkentry.c (gtk_entry_key_release): if (entry->editable),
|
||||
not if (!entry->editable).
|
||||
|
||||
Mon Mar 18 11:09:17 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/x11/gdkwindow-x11.c (gdk_window_set_override_redirect):
|
||||
Fix backwards conditional. (#75019, Dan Winship.)
|
||||
|
||||
Sun Mar 17 01:11:16 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_size_request): use
|
||||
do_validate_rows instead of validate_rows_handler (fix by
|
||||
Mike Pieper, #74126)
|
||||
|
||||
Sat Mar 16 23:54:56 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gdk/x11/gdkwindow-x11.c (gdk_window_set_static_bit_gravity): just
|
||||
return when we have an input_only window (fix by Owen Taylor)
|
||||
|
||||
* gtk/gtktreeprivate.h (struct _GtkTreeViewPrivate): add
|
||||
scroll_sync_timer
|
||||
|
||||
* gtk/gtktreeview.c (install_scroll_sync_handler): new function,
|
||||
(scroll_sync_handler): ditto,
|
||||
(gtk_tree_view_unrealize): take scroll_sync_timer into account
|
||||
(gtk_tree_view_row_deleted): install scroll_sync_timer instead of
|
||||
calling top_row_to_dy/dy_to_top_row directly
|
||||
-- this greatly speeds up clearing the model (#73199)
|
||||
|
||||
* gtk/gtktreemodelsort.c
|
||||
(gtk_tree_model_sort_convert_path_to_child_path): fix up this function,
|
||||
for some reason I really screwed it up (fixes #74663)
|
||||
|
||||
2002-03-16 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* configure.in (GDK_PIXBUF_DEP_CFLAGS) (GDK_PIXBUF_XLIB_DEP_CFLAGS)
|
||||
(GDK_DEP_CFLAGS) (GTK_DEP_CFLAGS): include CFLAGS from gthread-2.0
|
||||
so that the libs work correctly in a threaded environment.
|
||||
|
||||
Fri Mar 15 12:51:42 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtktreeviewcolumn.c
|
||||
(gtk_tree_view_column_new_with_attributes): add example to docs,
|
||||
as people are seeming to have trouble with this function.
|
||||
|
||||
2002-03-15 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* configure.in: Set MATH_LIB to empty also on Win32.
|
||||
|
||||
Fri Mar 15 15:37:01 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/x11/gdkdrawable-x11.c (convert_to_format):
|
||||
Fix byte shift arithmetic for big-endian. (Tracked
|
||||
down with help from Tuomas Kuosmanen)
|
||||
|
||||
Fri Mar 15 11:28:41 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_insert_column_with_data_func):
|
||||
make args const, 74159
|
||||
(gtk_tree_view_insert_column_with_attributes): ditto
|
||||
|
||||
* gtk/gtktreeviewcolumn.c
|
||||
(gtk_tree_view_column_cell_process_action): remov unused variables.
|
||||
|
||||
Fri Mar 15 13:31:51 2002 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
* gtk/gtkmenu.c (gtk_menu_leave_notify): Fix test for "active
|
||||
submenu".
|
||||
|
||||
2002-03-15 Padraig O'Briain <padraig.obriain@sun.com>
|
||||
|
||||
* gdk/x11/gdkkeys-x11.c (update_keymaps): Fudge keymap to have lower
|
||||
upper case variants if there is only a single keysym per keycode and
|
||||
the key symbol has upper and lower case variants (#74512)
|
||||
|
||||
Thu Mar 14 17:09:52 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkwindow.c (gdk_window_process_all_updates): Fix rather
|
||||
improbable reentrancy problem if a window is destroyed
|
||||
while updates are being processed on another window. (Noticed
|
||||
by Michael Meeks, #74708)
|
||||
|
||||
2002-03-14 Vitaly Tishkov <tvv@sparc.spb.su>
|
||||
|
||||
* gtk/gtktreemodelsort.c
|
||||
typo in docs for gtk_tree_model_sort_convert_iter_to_child_iter() fixed
|
||||
|
||||
|
||||
Thu Mar 14 11:17:18 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkkeyhash.c (_gtk_key_hash_remove_entry): When
|
||||
removing keys from the key hash, reinsert the right list
|
||||
back into the hash. (Dave Camp, #74571)
|
||||
|
||||
Wed Mar 13 17:17:40 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkobject.h: Remove left-over GTK_OBJECT_CONNECTED
|
||||
macro that was defined in terms of the now-gone GTK_CONNECTED
|
||||
flag. (Seth Burgess, #74028)
|
||||
|
||||
Wed Mar 13 17:11:10 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkaccelgroup.c (accel_group_weak_ref_detach): Unset
|
||||
the acceleratable_groups qdata because qdata isn't removed
|
||||
on ->dispose but rather on ->finalize. (#74569, found
|
||||
by Matt Wilson.)
|
||||
|
||||
Tue Mar 12 23:14:23 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtktreeselection.c (gtk_tree_selection_unselect_iter): Fix
|
||||
cut-n-paste bug.
|
||||
|
||||
Sat Mar 9 18:23:25 2002 Richard Hestilow <hestilow@ximian.com>
|
||||
|
||||
* gtk/gtkimage.c (gtk_image_set_from_filename): Allow NULL
|
||||
filenames.
|
||||
|
||||
Tue Mar 12 10:50:09 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* modules/input/gtkimcontextxim.c (gtk_im_context_xim_filter_keypress):
|
||||
Fix incorrect return value, filter out returns of 0x7f for
|
||||
the delete key. (#74179, Kang Jeong-He)
|
||||
|
||||
Mon Mar 11 23:42:11 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtktreemodel.c (gtk_tree_model_foreach): fix totally broken
|
||||
foreach function.
|
||||
|
||||
2002-03-11 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkitemfactory.c (gtk_item_factory_add_foreign): Document
|
||||
gtk_{menu_item,widget}_set_accel_path() as the recommended API.
|
||||
(#69244)
|
||||
|
||||
2002-03-11 James Henstridge <james@daa.com.au>
|
||||
|
||||
* configure.in: set CCAS and CCASFLAGS to get automake 1.6
|
||||
compatibility without breaking things for people using 1.4.
|
||||
|
||||
Sun Mar 10 21:04:30 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_button_press): finally get the
|
||||
right behavior.
|
||||
|
||||
Mon Mar 11 01:25:14 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_button_press): compare path with
|
||||
cursor path and not with the selected iter in the 'decide to edit'
|
||||
check
|
||||
|
||||
896
ChangeLog.pre-2-8
Normal file
@@ -0,0 +1,896 @@
|
||||
2002-07-16 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
* gdk/gdkpixbuf-drawable.c (rgb565lsb): Fixed the LSB -> MSB case.
|
||||
Fixes #79463.
|
||||
(rgb565msb): Fix the MSB -> MSB case. Fixes #79190.
|
||||
|
||||
Fri Apr 19 16:30:09 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeprivate.h, gtk/gtktreeview.c: rename
|
||||
last_single_clicked{,_2} to last_button_press{,_2}, as the latter
|
||||
is a more sane name.
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_button_press): use ->priv->anchor
|
||||
instead of ->priv->cursor, check for the anchor at another place, as
|
||||
you can go in edit mode without having an anchor.
|
||||
|
||||
2002-04-18 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkitemfactory.c:
|
||||
* gtk/gtkiconfactory.c:
|
||||
* gtk/gtkwidget.c:
|
||||
* gtk/gtkstyle.c:
|
||||
* gtk/gtkrc.c:
|
||||
* gtk/gtktreeviewcolumn.c:
|
||||
* gtk/gtkdialog.c:
|
||||
* gtk/gtktreemodel.c: s/<!>/<!-- -->/g throughout the
|
||||
documentation to bring the produced Docbook closer to XML.
|
||||
|
||||
2002-04-18 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gdk-pixbuf/Makefile.am (uninstall-libtool-import-lib)
|
||||
* gdk/Makefile.am (uninstall-libtool-import-lib): Fix typo,
|
||||
thanks to David Sterba for noticing.
|
||||
|
||||
* gtk/gtkmain.h
|
||||
* gtk/gtkmain.c (gtk_init_abi_check, gtk_init_check_abi_check): In
|
||||
GTK+ 2.0 the GtkWindow struct actually is the same size in gcc on
|
||||
Win32 whether compiled with -fnative-struct or not. Unfortunately
|
||||
this wan't noticed until now. So, from now on, check some other
|
||||
struct, too, for which the use of -fnative-struct still
|
||||
matters. GtkBox is one such.
|
||||
|
||||
Thu Apr 18 00:23:31 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreemodelsort.c
|
||||
(gtk_tree_model_sort_convert_path_to_child_path): so this function
|
||||
was completely broken. Fix it and improve readability.
|
||||
|
||||
2002-04-17 Anders Carlsson <andersca@gnu.org>
|
||||
|
||||
* tests/testtreeedit.c (button_press_event): Add a small
|
||||
test case.
|
||||
|
||||
Wed Apr 17 00:21:36 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreestore.c (gtk_tree_store_insert_before): fix docs
|
||||
|
||||
Tue Apr 16 17:28:21 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_real_collapse_row): check
|
||||
->priv->cursor and ->priv->anchor rowrefs before removing
|
||||
node->children from the rbtree. Also check the
|
||||
->priv->last_single_clicked and ->priv->last_single_clicked_2 rowrefs
|
||||
(I think I really need to rename those two someday).
|
||||
|
||||
Tue Apr 16 07:53:49 2002 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkmenu.c (gtk_menu_key_press): don't install/change accelerators
|
||||
from locked accel groups.
|
||||
|
||||
* gtk/gtkwidget.c (_gtk_widget_get_accel_path): export whether the
|
||||
accel path is from a locked accel group.
|
||||
|
||||
Mon Apr 15 15:41:56 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtkcontainer.c (gtk_container_focus): include internal
|
||||
children when doing focus.
|
||||
(gtk_container_get_all_children): new static function to include
|
||||
internal children when making a list of them.
|
||||
|
||||
Sun Apr 14 16:56:59 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeprivate.h: add _gtk_tree_view_column_get_editable_cell and
|
||||
_gtk_tree_view_column_get_neighbor_sizes
|
||||
|
||||
* gtk/gtktreeviewcolumn.c (struct _GtkTreeViewColumnCellInfo): add
|
||||
real_width field,
|
||||
(_gtk_tree_view_column_get_editable_cell): implement,
|
||||
(gtk_tree_view_column_cell_process_action): fill info->real_width
|
||||
(_gtk_tree_view_column_get_neighbor_sizes): implement
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_button_press): make the "editable
|
||||
widget" show up with the same size as the actual cell, so it doesnt
|
||||
cover the complete column if there are any other cells in that column.
|
||||
|
||||
2002-04-14 Abigail Brady <morwen@evilmagic.org>
|
||||
|
||||
* gtk/gtkfilesel.c: Fix typo in message.
|
||||
|
||||
2002-04-13 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gdk/gdkpixbuf-drawable.c (gdk_pixbuf_get_from_drawable): create
|
||||
the target pixbuf AFTER filling in width/height, so that
|
||||
passing in -1 for width/height will work.
|
||||
|
||||
Sat Apr 13 22:49:45 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
Fixes #75510
|
||||
|
||||
* gtk/gtktreeselection.c (gtk_tree_selection_get_selected): make this
|
||||
function work correctly and more sane
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_real_collapse_row): remove
|
||||
node->children from rbtree before emitting GtkTreeSelection::changed
|
||||
|
||||
Sat Apr 13 17:15:12 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_init): dont set
|
||||
the mode to GTK_CELL_RENDERER_MODE_EDITABLE by default,
|
||||
(gtk_cell_renderer_text_class_init): for some reason our default for
|
||||
editable was TRUE, of course this is FALSE.
|
||||
(gtk_cell_renderer_text_set_property): update mode when editable
|
||||
has been changed.
|
||||
|
||||
2002-04-12 jacob berkman <jacob@ximian.com>
|
||||
|
||||
* gdk/x11/xsettings-client.c (fetch_card8): fix cut-n-paste bug
|
||||
which breaks big-endian machines (fixes #73585)
|
||||
|
||||
2002-04-12 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* gtk/gtknotebook.c (gtk_notebook_real_remove): relocate the
|
||||
remove_weak_pointer to just before we free the page, to be sure
|
||||
it doesn't get re-added. #75282
|
||||
|
||||
Fri Apr 12 18:32:46 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_real_set_cursor): add
|
||||
clamp_node argument
|
||||
(toplevel): update usages of gtk_tree_view_real_set_cursor,
|
||||
(gtk_tree_view_focus_to_cursor): don't let
|
||||
gtk_tree_view_real_set_cursor clamp the node, so you won't get
|
||||
unexpected scrolling
|
||||
|
||||
2002-04-11 Michael Meeks <michael@ximian.com>
|
||||
|
||||
* gtk/gtklabel.c
|
||||
(gtk_label_parse_uline, gtk_label_set_text),
|
||||
(gtk_label_set_text_with_mnemonic): add freeze / thaws
|
||||
to stop deluge of 'notify' signals.
|
||||
|
||||
Sat Apr 6 06:57:00 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkmenushell.[ch] gtk/gtkmenuitem.c: Export
|
||||
private _gtk_menu_shell_activate() to encapsulate
|
||||
cut-and-paste code.
|
||||
|
||||
* gtk/gtkmenubar.c: Select the first item on the menu bar
|
||||
for F10 rather than acting as if the user pressed <Alt>F
|
||||
to select the file manager.
|
||||
|
||||
Tue Apr 9 19:01:28 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
Fix problems with HandleBox and focusing - #78232
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_translate_coordinates): Handle
|
||||
GtkHandleBox / GnomeDock style window heirarchy / widget
|
||||
heirarchy disconnects. :-(.
|
||||
|
||||
* gtk/gtkcontainer.c: Handle failures from
|
||||
gtk_widget_translate_coordinates (Focusing is not right, but at
|
||||
least it doesn't go into infinite loops.)
|
||||
|
||||
Tue Apr 9 18:34:58 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkcontainer.c (_gtk_container_queue_resize): Always
|
||||
set the ALLOC_NEEDED and REQUEST_NEEDED flags up the hierarchy,
|
||||
even if we aren't currently in a resize container... we need
|
||||
this to properly handle size changes to widgets that are
|
||||
being moved from one heirarchy to another. (#78226)
|
||||
|
||||
Tue Apr 9 21:41:24 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
Fixes #78110
|
||||
|
||||
* gtk/gtktreeselection.c (_gtk_tree_selection_internal_select_node):
|
||||
add override_browse_mode argument and implement,
|
||||
(gtk_tree_selection_unselect_path): always unselect the path,
|
||||
(toplevel): update uses of _gtk_tree_selection_internal_select_node
|
||||
|
||||
* gtk/gtktreeview.c: update uses of
|
||||
_gtk_tree_selection_internal_select_node
|
||||
|
||||
* gtk/gtktreeprivate.h (_gtk_tree_selection_internal_select_node):
|
||||
update prototype
|
||||
|
||||
Tue Apr 9 21:39:44 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
Fixes #77862
|
||||
|
||||
* gtk/gtktreeprivate.h: add _gtk_tree_view_column_has_editable_cell
|
||||
|
||||
* gtk/gtktreeviewcolumn.c (_gtk_tree_view_column_has_editable_cell):
|
||||
new function
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_button_press): send cell event
|
||||
on first click when cell isn't editable
|
||||
|
||||
Tue Apr 9 21:37:31 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreedatalist.c (_gtk_tree_data_list_check_type): add some
|
||||
types which were missing and useful to use (fixes #77870)
|
||||
|
||||
2002-04-09 Anders Carlsson <andersca@gnu.org>
|
||||
|
||||
* gtk/gtkfilesel.c (open_new_dir): Initialize error to NULL.
|
||||
|
||||
2002-04-08 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* tests/testgtk.c: really revert testgtk.c
|
||||
|
||||
Mon Apr 8 20:28:54 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeselection.c (gtk_tree_selection_select_path),
|
||||
(gtk_tree_selection_unselect_path),
|
||||
(gtk_tree_selection_path_is_selected): check the return value of
|
||||
_gtk_tree_view_find_node and return if it's TRUE. This makes those
|
||||
functions work somewhat saner on non-expanded trees.
|
||||
|
||||
Fri Apr 5 18:28:56 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeselection.c (gtk_tree_selection_set_mode): free
|
||||
anchor row reference after unselecting the selection (fixes #76272)
|
||||
|
||||
Fri Apr 5 18:27:48 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_real_expand_row): only return
|
||||
when we don't have to open all children (fixes #75736)
|
||||
|
||||
Fri Apr 5 18:24:24 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_clear): unref
|
||||
cellrenderer after clearing the attributes of the renderer (fixes
|
||||
#75592)
|
||||
|
||||
Fri Apr 5 05:55:14 2002 Jonathan Blandford <jrb@gnome.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_grab_focus): implement.
|
||||
(gtk_tree_view_move_cursor_up_down): check for focus
|
||||
(gtk_tree_view_move_cursor_page_up_down): ditto
|
||||
(gtk_tree_view_move_cursor_left_right): ditto
|
||||
(gtk_tree_view_move_cursor_start_end): ditto
|
||||
(gtk_tree_view_real_select_all): ditto
|
||||
(gtk_tree_view_real_unselect_all): ditto
|
||||
(gtk_tree_view_real_select_cursor_row): ditto
|
||||
(gtk_tree_view_real_toggle_cursor_row): ditto
|
||||
(gtk_tree_view_real_expand_collapse_cursor_row): ditto
|
||||
(gtk_tree_view_real_select_cursor_parent): ditto
|
||||
(gtk_tree_view_real_start_interactive_search): ditto
|
||||
|
||||
* gtk/gtktreeviewcolumn.c: grab focus
|
||||
|
||||
2002-04-05 Alex Larsson <alexl@redhat.com>
|
||||
|
||||
* gdk/linux-fb/gdkkeyboard-fb.c (write_string):
|
||||
Fix undefined variable typo.
|
||||
Patch from Simon Floery <simon.floery@gmx.at>
|
||||
|
||||
Fri Apr 5 01:06:15 2002 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gdk/x11/gdkwindow-x11.c (set_text_property): fix segfault
|
||||
upon NULL return from gdk_utf8_to_string_target().
|
||||
|
||||
* gdk/x11/gdkselection-x11.c (gdk_utf8_to_string_target): fix
|
||||
return value comment to mention NULL returns upon EMFILE.
|
||||
|
||||
Thu Apr 4 22:35:42 2002 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
* tests/testgtk.c (menu_items): revert accidentally commited
|
||||
change to testgtk.c
|
||||
|
||||
Thu Apr 4 22:28:08 2002 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
* gtk/gtkmenuitem.c (gtk_menu_item_paint): Fix problem with menu
|
||||
titles being clipped (#75948)
|
||||
|
||||
2002-04-04 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gdk/gdkrgb.c: Fix some bugs, and introduce a minor feature.
|
||||
|
||||
(gdk_rgb_convert_4_pack): New function, for 16-color (4 bits per
|
||||
pixel) static visuals (fixes #858).
|
||||
|
||||
(gdk_rgb_convert_gray4_pack, gdk_rgb_convert_gray4_d_pack): Fix
|
||||
same bugs in both functions: Odd start coordinate (partial byte)
|
||||
was not handled correctly. Also a partial final byte was not
|
||||
handled correctly.
|
||||
|
||||
(gdk_rgb_do_colormaps): Use G_N_ELEMENTS.
|
||||
(gdk_rgb_create_info): For pseudocolor visuals, use the 2x2x2
|
||||
colorcube only for depths 3 and 4. For static color, use it for
|
||||
depths 3..7 like before. (Depth 5..7 pseudocolor probably never
|
||||
occurs on X11. It doesn't normally occur on Win32 either, but
|
||||
there is experimental code in gdkvisual-win32.c to let the user
|
||||
restrict the size of palette used.)
|
||||
(gdk_rgb_init): Set gdk_rgb_verbose if the GDK_DEBUG_GDKRGB flag
|
||||
is set.
|
||||
(gdk_rgb_select_conv): Use gdk_rgb_convert_8 also for depths 5, 6
|
||||
and 7 (see above). Use gdk_rgb_convert_4_pack for 4 bits per pixel
|
||||
static color.
|
||||
|
||||
Tue Apr 2 11:10:13 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtkliststore.c (gtk_list_store_set_sort_func): set the
|
||||
sort_func correctly, 77030
|
||||
|
||||
Tue Apr 2 13:44:27 2002 Tim Janik <timj@gtk.org>
|
||||
|
||||
* configure.in: update version to 2.0.2, binary age 2, interface
|
||||
age 2.
|
||||
|
||||
* NEWS: updates for 2.0.2.
|
||||
|
||||
Mon Apr 1 22:20:24 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_move_cursor_page_up_down): add
|
||||
check for y > tree_view->priv->height (fixes #76974)
|
||||
|
||||
Mon Apr 1 22:19:39 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreemodelsort.c (gtk_tree_model_sort_sort_level): get
|
||||
the stamp changes right this time
|
||||
|
||||
Mon Apr 1 22:13:24 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreemodel.c (gtk_tree_row_reference_free): only
|
||||
disconnect the ref callbacks when model == proxy (Thanks go to
|
||||
Manuel Clos Crespo for the remote debugging)
|
||||
|
||||
Sat Mar 30 15:19:24 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreemodelsort.c: revert the latest stamp increment changes,
|
||||
as it broke stuff for trees
|
||||
|
||||
Fri Mar 29 18:15:12 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* ===== Released 2.0.1 ======
|
||||
|
||||
Fri Mar 29 18:09:18 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkaccelgroup.c (gtk_accel_group_query): Call
|
||||
gdk_keyval_to_lower() on the key passed in, since we
|
||||
lowercase all other key vals passed in, so querying
|
||||
keyvals will otherwise fail if the caller used
|
||||
an uppercase accelerators (#76899, Vitaly Tishkov)
|
||||
|
||||
Fri Mar 29 17:41:21 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkmain.c (load_modules): Fix screwup in handling
|
||||
of module path that was resulting in freed memory being
|
||||
accessed when both GTK_MODULES and a theme were set.
|
||||
(#76902, Johan Dahlin)
|
||||
|
||||
Fri Mar 29 17:57:36 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkiconfactory.c (get_default_icons): Fix wrong
|
||||
stock id's for ADD/REMOVE. (#76915, Vitaly Tishkov)
|
||||
|
||||
2002-03-29 Hans Breuer <hans@breuer.org>
|
||||
|
||||
* gtk/gtkmain.h : fix typo in gtk_init_check macro, which
|
||||
caused crashes if argc != 0
|
||||
|
||||
* gtk/stock-icons/makefile.msc : added new icons
|
||||
|
||||
Fri Mar 29 20:17:35 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreemodelsort.c (gtk_tree_model_sort_rows_reordered):
|
||||
remove call to gtk_tree_model_sort_increment_stamp
|
||||
(gtk_tree_model_sort_sort_level): always increment the stamp
|
||||
|
||||
Fri Mar 29 00:19:41 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* NEWS: Updates
|
||||
|
||||
* configure.in: Version 2.0.1, binary, interface age 1.
|
||||
|
||||
* configure.in (GDK_PIXBUF_VERSION): Up required versions
|
||||
of dependencies.
|
||||
|
||||
* gtk/gtkiconfactory.c gtk/stock-icons/Makefile.am:
|
||||
Add stock_add/remove_16.
|
||||
|
||||
Thu Mar 28 18:38:30 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtk[hv]paned.c (gtk_[hv]paned_size_allocate):
|
||||
Don't show the window unless the widget is mapped.
|
||||
(#76742, Dennis Björklund, Soeren Sandmann)
|
||||
|
||||
2002-03-29 Hans Breuer <hans@breuer.org>
|
||||
|
||||
Fixed dashed line issues (#74441) to an IMO reasonable extend.
|
||||
That is: use PS_USERSTYLE on WinNT (the next GDI limit appears
|
||||
to be with lines width > 50); Render horizontal and vertical
|
||||
dashed lines on Win9x 'by hand'. Dotted selection rectangles
|
||||
and Dia look nice ...
|
||||
|
||||
* gdk/win32/gdkprivate-win32.h : add pen_dashes pointer and
|
||||
num_pen_dashes to _GdkGCWin32
|
||||
* gdk/win32/gdkgc-win32.c : initialize pen_dashes and remove
|
||||
the guesses from dashes to windoze line styles.
|
||||
(predraw_set_forground) : always ExtCreatePen (PS_SOLID) on
|
||||
Win9x, which does not support PS_USERSTYLE.
|
||||
* gdk/win32/gdkdrawable-win32.c : new functions render_line_
|
||||
<horizontal|vertical>. Use them if not running on NT in
|
||||
gdk_win32_draw_<rectangle|segments|lines> ()
|
||||
|
||||
* gdk/win32/gdkkeys-win32.c (gdk_keyval_name) : return NULL
|
||||
for keyval == 0 to avoid to have zeros in all menu entries
|
||||
without accelerator.
|
||||
|
||||
2002-03-29 Jakub Steiner <jimmac@ximian.com>
|
||||
|
||||
* gtk/stock-icons/stock_add_24.png:
|
||||
* gtk/stock-icons/stock_add_16.png:
|
||||
* gtk/stock-icons/stock_remove_24.png:
|
||||
* gtk/stock-icons/stock_remove_16.png: use a simple '+' and '-',
|
||||
works better. the old box was too clumsy
|
||||
|
||||
Thu Mar 28 21:11:04 2002 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkfilesel.c (open_new_dir): when encountering non-UTF-8 file
|
||||
names, alert the user with g_message() instead of g_warning() and
|
||||
put out the actual conversion error.
|
||||
|
||||
2002-03-28 Dave Camp <dave@ximian.com>
|
||||
|
||||
* gtk/gtktreeview.c (install_scroll_sync_handler): Don't install
|
||||
the handler if the widget isn't realized.
|
||||
|
||||
2002-03-28 Jakub Steiner <jimmac@ximian.com>
|
||||
|
||||
* gtk/stock-icons/stock_font*:
|
||||
* gtk/stock-icons/stock_align*:
|
||||
* gtk/stock-icons/stock_text*: better solution to the dark theme
|
||||
problem. Also looks more pretty IMHO
|
||||
|
||||
2002-03-27 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* configure.in: Try to find libpng via pkg-config first,
|
||||
since libpng-1.2.2 will come with a .pc file.
|
||||
|
||||
Wed Mar 27 11:10:39 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtknotebook.c (gtk_notebook_real_remove): Set
|
||||
page->last_focus_child to NULL as well as removing the
|
||||
weak reference, to deal with reentrancy in set_focus_child().
|
||||
(#76634, Dennis Björklund)
|
||||
|
||||
2002-03-27 Murray Cumming <murrayc@usa.net>
|
||||
|
||||
* gtk/gtktreeview.c: Corrected registered return type of
|
||||
"move-cursor" signal. Had to add a marshaller to
|
||||
gtk/gtkmarshalers.list.
|
||||
|
||||
Tue Mar 26 14:46:50 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkmenu.c (gtk_menu_popup): Shuffle the ordering around
|
||||
some more (position before realizing) fixing problems with
|
||||
arrows popping up at the wrong time (#73386), hopefully not
|
||||
introducing other problems. (Reported by Ettore Perrazoli, others)
|
||||
|
||||
2002-03-26 Dave Camp <dave@ximian.com>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_button_press): Free the path
|
||||
after calling gtk_tree_view_row_activated() rather than before.
|
||||
|
||||
2002-03-25 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* gtk/gtkrc.c (gtk_rc_parse_font_name): free the style's
|
||||
font_description before assigning a new one.
|
||||
(gtk_rc_parse_stock): always unref the created icon_set. #76289
|
||||
|
||||
2002-03-25 Mark McLoughlin <mark@skynet.ie>
|
||||
|
||||
* gtk/gtkbindings.c: (gtk_binding_entry_add_signal),
|
||||
kill code duplicated in gtk_binding_entry_add_signall.
|
||||
|
||||
Sun Mar 24 10:32:38 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtktreemodel.c (gtk_tree_path_copy): Make path arg const, #75653
|
||||
|
||||
* gtk/gtkfontsel.c (gtk_font_selection_show_available_styles): fix
|
||||
a warning
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_button_press): remove the grab
|
||||
when we emit row_activated so that listeners of this signal can
|
||||
grab the mouse, #75629
|
||||
|
||||
2002-03-23 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gtk/gtktextlayout.c (gtk_text_layout_real_invalidate):
|
||||
invalidate the line containing start, even if the [start,end)
|
||||
range is empty (just invalidate [start,end], essentially).
|
||||
Partially fixes #72374
|
||||
|
||||
2002-03-23 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gtk/gtktextview.c (gtk_text_view_do_popup): end any selection in
|
||||
progress, patch from db@zigo.dhs.org, #74620
|
||||
|
||||
2002-03-23 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gtk/gtktextview.c (gtk_text_view_move_cursor_internal): extend
|
||||
selection for pageup/pagedown and ctrl+pageup/pagedown if
|
||||
shift is held. more of #53934
|
||||
|
||||
2002-03-23 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gtk/gtktextview.c (gtk_text_view_destroy_layout): disconnect
|
||||
layout handlers earlier in the function, to avoid possible
|
||||
reentrancy screwups
|
||||
(gtk_text_view_invalidate): Don't install idle handlers if
|
||||
layout == NULL, otherwise we get problems during finalization
|
||||
since clearing the buffer invalidates and puts the idle handlers
|
||||
back after we destroy the layout. #74660
|
||||
(gtk_text_view_ensure_layout): Install the validation handlers
|
||||
right after creating the layout.
|
||||
|
||||
* gtk/gtktexttagtable.c (foreach_unref): call
|
||||
_gtk_text_buffer_notify_will_remove_tag(), #75126
|
||||
|
||||
2002-03-22 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gdk/x11/gdkfont-x11.c (gdk_fontset_load): add more explanatory
|
||||
text to the error message about missing charsets, and use
|
||||
g_printerr() not g_warning() since this is typically not a
|
||||
programming error (we do not export any API to ask whether
|
||||
a font set will have missing charsets so apps realistically can't
|
||||
do anything other than try the gdk_fontset_load())
|
||||
|
||||
* gtk/gtktextview.c (gtk_text_view_key_press_event): return FALSE
|
||||
if the text view isn't editable and the user presses Return,
|
||||
so default buttons and such can be activated, #74937
|
||||
|
||||
* gtk/gtktextbuffer.c (paste_from_buffer): don't insert
|
||||
if the insertion point is not editable and the paste
|
||||
is interactive, #74125
|
||||
|
||||
* gtk/gtkwindow.c (gtk_window_move_resize): enhance the #if 0
|
||||
debug spew
|
||||
|
||||
* gtk/gtktextbuffer.c (cut_or_copy): only remove the previous
|
||||
cut/copied data right before replacing it, when we know we are
|
||||
going to replace it. Fixes #74049
|
||||
|
||||
2002-03-22 Richard Hult <rhult@codefactory.se>
|
||||
|
||||
* gdk/gdkevents.c (gdk_event_get_root_coords): Fix typo, where x
|
||||
value was assigned to both x and y.
|
||||
|
||||
Fri Mar 22 11:29:11 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
Partial fix for problem where keypad keys acted
|
||||
as shift-arrows in an entry rather than arrows (#74327)
|
||||
|
||||
* gtk/gtkkeyhash.c (_gtk_key_hash_lookup): Sort lookup
|
||||
results by number of modifiers in the entry. Fixes
|
||||
problem where if a key matched both modified and unmodified
|
||||
key bindings ... e.g., the distinguishing key binding
|
||||
was consumed, then it was random which was used.
|
||||
|
||||
* gtk/gtkbindings.c (gtk_binding_entries_sort_patterns):
|
||||
Catch the case where there are multiple entries from the
|
||||
same bindingset (with different modifiers), and use only
|
||||
the first entry, which, with the change in _gtk_key_hash_lookup()
|
||||
will be the preferred value.
|
||||
|
||||
Fri Mar 22 10:56:19 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkaccelmap.c (gtk_accel_map_save_fd): Fix memory
|
||||
leak. (#74400, Morten Welinder.)
|
||||
|
||||
* gtk/gtkaccelmap.c: Properly handle short returns from
|
||||
write() calls. (Handling EINTR isn't enough... that only
|
||||
handles the case where you were interrupted before you
|
||||
wrote a single byte.)
|
||||
|
||||
* gdk/linux-fb/gdkmouse-fb.c gdk/linux-fb/gdkkeyboard-fb.c:
|
||||
Robustify against short returns from write() calls.
|
||||
|
||||
Fri Mar 22 10:12:10 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtktextview.c (gtk_text_view_paint): Change
|
||||
G_BREAKPOINT() to g_assert_not_reached ().
|
||||
(#75865, Ashok Venkiteswaran)
|
||||
|
||||
2002-03-22 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gdk/win32/gdkgc-win32.c (gdk_win32_gc_set_dashes): Don't clear
|
||||
all of the pen_style, just the PS_STYLE_MASK. Seems to fix #74441,
|
||||
but that is just the special case of one-pixel wide one-pixel
|
||||
on-off dotted lines. To fully implement generic X11 style dashed
|
||||
lines a major rewrite would be needed.
|
||||
|
||||
2002-03-21 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkaccelgroup.c (gtk_accelerator_valid): Trivial typo
|
||||
fix. (Vitaly Tishkov, #75726)
|
||||
|
||||
Thu Mar 21 10:04:05 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkwindow.c (gdk_window_real_get_depth): Remove
|
||||
some left over debugging code with a G_BREAKPOINT()
|
||||
in it.
|
||||
|
||||
Wed Mar 20 19:33:31 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkcalendar.c (gtk_calendar_main_button): When
|
||||
changing months when the user clicks on a prev-month
|
||||
or next-month day, focus and select the new day.
|
||||
Ignore double clicks on prev-month, next-month days.
|
||||
(Based on suggestions from Andras Salamon, #74173)
|
||||
|
||||
* gtk/gtkcalendar.c: Implement the focused/unfocused
|
||||
selected color change.
|
||||
|
||||
2002-03-20 Alex Larsson <alexl@redhat.com>
|
||||
|
||||
Patches from Carlo E. Prelz <fluido@fluido.as>
|
||||
Now gtkfb at least compiles and mostly works. The keyboard
|
||||
stuff needs more loving.
|
||||
|
||||
* gdk/linux-fb/gdkkeyboard-fb.c (xlate_get_for_keyval,
|
||||
xlate_get_for_keycode, raw_get_for_keyval, raw_get_for_keycode):
|
||||
At least set the out parameters for these calls.
|
||||
|
||||
* gdk/linux-fb/gdkmain-fb.c:
|
||||
(gdk_pointer_grab_info_libgtk_only, gdk_keyboard_grab_info_libgtk_only):
|
||||
Implement new functions.
|
||||
|
||||
Wed Mar 20 19:00:03 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkentry.c (gtk_entry_set_text): Short-circuit
|
||||
the text to the exact same thing, so we don't
|
||||
unexpectedly change the selection or cursor position.
|
||||
(#74290, John Ellis.)
|
||||
|
||||
Thu Mar 21 00:05:14 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_get_background_area),
|
||||
(gtk_tree_view_get_cell_area): fix logic (fixes #74235, #73593)
|
||||
|
||||
Wed Mar 20 17:11:51 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkrc.c: Patch from Richard Hestilow to fix
|
||||
gtk-font-name changes for widgets that get the actual
|
||||
default style. (#73709)
|
||||
|
||||
Wed Mar 20 22:59:23 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtkrbtree.[ch]: add _gtk_rbtree_set_fixed_height()
|
||||
|
||||
* gtk/gtktreeprivate.h: add fixed_height_check field
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_init): initialize
|
||||
scroll_sync_timer and fixed_height_check
|
||||
(do_validate_rows): add fixed_height_check. If all validated rows
|
||||
in the first cycle have the same height, then we set that height for
|
||||
the entire tree. This is some sort of 'fake' optimization, but helps
|
||||
a lot for the common case. We keep validating the entire tree in
|
||||
the background though.
|
||||
(gtk_tree_view_set_model): reset fixed_height_check
|
||||
|
||||
Wed Mar 20 16:36:08 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/*.c: Patch from Erwann Chenede, #73900 fixing
|
||||
a lot of warnings with Forte CC, mostly implicit
|
||||
casts between void * and function pointers.
|
||||
|
||||
* gdk/gdkevents.c (gdk_event_get_state): GdkEventVisibility's
|
||||
state field is not a GdkModifierType. (Also #73900)
|
||||
|
||||
Wed Mar 20 12:35:22 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_grab_default): Remove
|
||||
leftover notification of has-default. (#75508, Jacob
|
||||
Berkman.)
|
||||
|
||||
Wed Mar 20 12:27:07 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkaccelgroup.c (gtk_accelerator_valid): Allow
|
||||
arrow keys as accelerators, as long as some modifier
|
||||
is pressed. (#75495)
|
||||
|
||||
* gtk/gtkaccelgroup.c (gtk_accelerator_valid): Fix
|
||||
incorrect example in the docs.
|
||||
|
||||
Wed Mar 20 12:06:30 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_set_child_visible):
|
||||
Fix segfault when widget->parent is NULL.
|
||||
(#75615, Alexey A. Malyshev)
|
||||
|
||||
Wed Mar 20 11:32:07 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkentry.c: Improve test to prevent infinite
|
||||
loop. (#74952, Thomas Leonard)
|
||||
|
||||
* gtk/gtkmenushell.c (gtk_real_menu_shell_cycle_focus):
|
||||
Fix warning when toplevel menu shell isn't a menu
|
||||
bar. (Thomas Leonard, #75602)
|
||||
|
||||
Wed Mar 20 11:00:59 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* configure.in: Use $PKG_CONFIG, not pkg-config.
|
||||
(LEE Sau Dan, #75572)
|
||||
|
||||
Wed Mar 20 10:55:56 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/x11/gdkevents-x11.c (gdk_event_translate): Fix assignment
|
||||
of time in scroll events. (Sven Neumann, #75574)
|
||||
|
||||
2002-03-20 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* gdk/win32/gdkdnd-win32.c (gdk_drag_find_window): Use
|
||||
gdk_window_get_toplevel(), as it is the top-level windows that are
|
||||
registered for DND.
|
||||
|
||||
* gdk/win32/gdkwin32.h: Don't include gdkinternals.h.
|
||||
|
||||
2002-03-19 jacob berkman <jacob@ximian.com>
|
||||
|
||||
* gtk/gtkcombo.c (gtk_combo_find): fix infinite loop when
|
||||
gtk_combo_func() returns NULL (bug #75464)
|
||||
|
||||
2002-03-18 jacob berkman <jacob@ximian.com>
|
||||
|
||||
* gtk/gtkaspectframe.c (gtk_aspect_frame_class_init): set the
|
||||
correct min/max values for the ratio property (fixes #75331)
|
||||
|
||||
Mon Mar 18 11:55:03 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkimmulticontext.c (gtk_im_multicontext_get_slave):
|
||||
Patch from Yao Zhang fixing reference count leak.
|
||||
|
||||
* gtk/gtkentry.c (gtk_entry_key_release): if (entry->editable),
|
||||
not if (!entry->editable).
|
||||
|
||||
Mon Mar 18 11:09:17 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/x11/gdkwindow-x11.c (gdk_window_set_override_redirect):
|
||||
Fix backwards conditional. (#75019, Dan Winship.)
|
||||
|
||||
Sun Mar 17 01:11:16 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_size_request): use
|
||||
do_validate_rows instead of validate_rows_handler (fix by
|
||||
Mike Pieper, #74126)
|
||||
|
||||
Sat Mar 16 23:54:56 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gdk/x11/gdkwindow-x11.c (gdk_window_set_static_bit_gravity): just
|
||||
return when we have an input_only window (fix by Owen Taylor)
|
||||
|
||||
* gtk/gtktreeprivate.h (struct _GtkTreeViewPrivate): add
|
||||
scroll_sync_timer
|
||||
|
||||
* gtk/gtktreeview.c (install_scroll_sync_handler): new function,
|
||||
(scroll_sync_handler): ditto,
|
||||
(gtk_tree_view_unrealize): take scroll_sync_timer into account
|
||||
(gtk_tree_view_row_deleted): install scroll_sync_timer instead of
|
||||
calling top_row_to_dy/dy_to_top_row directly
|
||||
-- this greatly speeds up clearing the model (#73199)
|
||||
|
||||
* gtk/gtktreemodelsort.c
|
||||
(gtk_tree_model_sort_convert_path_to_child_path): fix up this function,
|
||||
for some reason I really screwed it up (fixes #74663)
|
||||
|
||||
2002-03-16 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* configure.in (GDK_PIXBUF_DEP_CFLAGS) (GDK_PIXBUF_XLIB_DEP_CFLAGS)
|
||||
(GDK_DEP_CFLAGS) (GTK_DEP_CFLAGS): include CFLAGS from gthread-2.0
|
||||
so that the libs work correctly in a threaded environment.
|
||||
|
||||
Fri Mar 15 12:51:42 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtktreeviewcolumn.c
|
||||
(gtk_tree_view_column_new_with_attributes): add example to docs,
|
||||
as people are seeming to have trouble with this function.
|
||||
|
||||
2002-03-15 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* configure.in: Set MATH_LIB to empty also on Win32.
|
||||
|
||||
Fri Mar 15 15:37:01 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/x11/gdkdrawable-x11.c (convert_to_format):
|
||||
Fix byte shift arithmetic for big-endian. (Tracked
|
||||
down with help from Tuomas Kuosmanen)
|
||||
|
||||
Fri Mar 15 11:28:41 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_insert_column_with_data_func):
|
||||
make args const, 74159
|
||||
(gtk_tree_view_insert_column_with_attributes): ditto
|
||||
|
||||
* gtk/gtktreeviewcolumn.c
|
||||
(gtk_tree_view_column_cell_process_action): remov unused variables.
|
||||
|
||||
Fri Mar 15 13:31:51 2002 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
* gtk/gtkmenu.c (gtk_menu_leave_notify): Fix test for "active
|
||||
submenu".
|
||||
|
||||
2002-03-15 Padraig O'Briain <padraig.obriain@sun.com>
|
||||
|
||||
* gdk/x11/gdkkeys-x11.c (update_keymaps): Fudge keymap to have lower
|
||||
upper case variants if there is only a single keysym per keycode and
|
||||
the key symbol has upper and lower case variants (#74512)
|
||||
|
||||
Thu Mar 14 17:09:52 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkwindow.c (gdk_window_process_all_updates): Fix rather
|
||||
improbable reentrancy problem if a window is destroyed
|
||||
while updates are being processed on another window. (Noticed
|
||||
by Michael Meeks, #74708)
|
||||
|
||||
2002-03-14 Vitaly Tishkov <tvv@sparc.spb.su>
|
||||
|
||||
* gtk/gtktreemodelsort.c
|
||||
typo in docs for gtk_tree_model_sort_convert_iter_to_child_iter() fixed
|
||||
|
||||
|
||||
Thu Mar 14 11:17:18 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkkeyhash.c (_gtk_key_hash_remove_entry): When
|
||||
removing keys from the key hash, reinsert the right list
|
||||
back into the hash. (Dave Camp, #74571)
|
||||
|
||||
Wed Mar 13 17:17:40 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkobject.h: Remove left-over GTK_OBJECT_CONNECTED
|
||||
macro that was defined in terms of the now-gone GTK_CONNECTED
|
||||
flag. (Seth Burgess, #74028)
|
||||
|
||||
Wed Mar 13 17:11:10 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkaccelgroup.c (accel_group_weak_ref_detach): Unset
|
||||
the acceleratable_groups qdata because qdata isn't removed
|
||||
on ->dispose but rather on ->finalize. (#74569, found
|
||||
by Matt Wilson.)
|
||||
|
||||
Tue Mar 12 23:14:23 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtktreeselection.c (gtk_tree_selection_unselect_iter): Fix
|
||||
cut-n-paste bug.
|
||||
|
||||
Sat Mar 9 18:23:25 2002 Richard Hestilow <hestilow@ximian.com>
|
||||
|
||||
* gtk/gtkimage.c (gtk_image_set_from_filename): Allow NULL
|
||||
filenames.
|
||||
|
||||
Tue Mar 12 10:50:09 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* modules/input/gtkimcontextxim.c (gtk_im_context_xim_filter_keypress):
|
||||
Fix incorrect return value, filter out returns of 0x7f for
|
||||
the delete key. (#74179, Kang Jeong-He)
|
||||
|
||||
Mon Mar 11 23:42:11 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtktreemodel.c (gtk_tree_model_foreach): fix totally broken
|
||||
foreach function.
|
||||
|
||||
2002-03-11 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtkitemfactory.c (gtk_item_factory_add_foreign): Document
|
||||
gtk_{menu_item,widget}_set_accel_path() as the recommended API.
|
||||
(#69244)
|
||||
|
||||
2002-03-11 James Henstridge <james@daa.com.au>
|
||||
|
||||
* configure.in: set CCAS and CCASFLAGS to get automake 1.6
|
||||
compatibility without breaking things for people using 1.4.
|
||||
|
||||
Sun Mar 10 21:04:30 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_button_press): finally get the
|
||||
right behavior.
|
||||
|
||||
Mon Mar 11 01:25:14 2002 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_button_press): compare path with
|
||||
cursor path and not with the selected iter in the 'decide to edit'
|
||||
check
|
||||
|
||||
55
HACKING
Normal file
@@ -0,0 +1,55 @@
|
||||
If you want to hack on the GTK+ project, you'll need to have
|
||||
the following packages installed:
|
||||
|
||||
- GNU autoconf 2.52
|
||||
- GNU automake 1.4
|
||||
- GNU libtool 1.4
|
||||
- indent (GNU indent 1.9.1 is known good)
|
||||
- GNU gettext 10.40
|
||||
|
||||
These should be available by ftp from ftp.gnu.org or any of the
|
||||
fine GNU mirrors. Beta software can be found at alpha.gnu.org.
|
||||
|
||||
In order to get CVS gtk+ installed on your system, you need to have
|
||||
the most recent CVS version of glib, pango, and atk installed as well.
|
||||
The installation process of these libraries is similar to that of gtk+, but
|
||||
needs to be fulfilled prior to installation of gtk+.
|
||||
|
||||
To compile a CVS version of gtk+ on your system, you will need to take
|
||||
several steps to setup the tree for compilation. You can do all these
|
||||
steps at once by running:
|
||||
|
||||
cvsroot/gtk+# ./autogen.sh
|
||||
|
||||
Basically this does the following for you:
|
||||
|
||||
cvsroot/gtk+# aclocal; automake; autoconf
|
||||
|
||||
The above commands create the "configure" script. Now you
|
||||
can run the configure script in cvsroot/gtk+ to create all
|
||||
the Makefiles.
|
||||
|
||||
Before running autogen.sh or configure, make sure you have libtool
|
||||
in your path.
|
||||
|
||||
Note that autogen.sh runs configure for you. If you wish to pass
|
||||
options like --prefix=/usr to configure you can give those options
|
||||
to autogen.sh and they will be passed on to configure.
|
||||
|
||||
If at all possible, please use CVS to get the latest development version of
|
||||
gtk+ and glib. You can do the following to get glib and gtk+ from cvs:
|
||||
|
||||
$ export CVSROOT=':pserver:anonymous@cvs.gnome.org:/cvs/gnome'
|
||||
$ cvs login
|
||||
(there is no password, just hit return)
|
||||
$ cvs -z3 checkout glib
|
||||
$ cvs -z3 checkout pango
|
||||
$ cvs -z3 checkout atk
|
||||
$ cvs -z3 checkout gtk+
|
||||
|
||||
For information about submitting patches and commiting changes
|
||||
to CVS, see the README and README.cvs-commits files. In particular,
|
||||
don't, under any circumstances, commit anything to CVS before
|
||||
reading and understanding README.cvs-commmits.
|
||||
|
||||
|
||||
41
INSTALL
Normal file
@@ -0,0 +1,41 @@
|
||||
Prerequisites
|
||||
=============
|
||||
|
||||
GTK+ requires the following packages:
|
||||
|
||||
- The GLib, Pango, and Atk libraries, available at the same location as GTK+
|
||||
|
||||
- The TIFF, PNG, and JPEG image loading libraries. You most
|
||||
likely have these installed on your system already. If not
|
||||
these libraries are available from:
|
||||
|
||||
http://www.libtiff.org/
|
||||
ftp://swrinde.nde.swri.edu/pub/png/src/
|
||||
ftp://ftp.uu.net/graphics/jpeg/
|
||||
|
||||
If these libraries are not available, the corresponding
|
||||
image loaders will simply not be built. However, this
|
||||
may cause applications using GTK+ not to function properly.
|
||||
|
||||
Simple install procedure
|
||||
========================
|
||||
|
||||
% gzip -cd gtk+-2.0.2.tar.gz | tar xvf - # unpack the sources
|
||||
% cd gtk+-2.0.2 # change to the toplevel directory
|
||||
% ./configure # run the `configure' script
|
||||
% make # build GTK
|
||||
[ Become root if necessary ]
|
||||
% make install # install GTK
|
||||
|
||||
The Details
|
||||
===========
|
||||
|
||||
Complete information about installing GTK+ and related libraries can be found
|
||||
in the file:
|
||||
|
||||
docs/reference/gtk/docs/reference/gtk/html/gtk-building.html
|
||||
|
||||
Or online at:
|
||||
|
||||
http://developer.gnome.org/doc/API/2.0/gtk/gtk-building.html
|
||||
|
||||
41
INSTALL.in
Normal file
@@ -0,0 +1,41 @@
|
||||
Prerequisites
|
||||
=============
|
||||
|
||||
GTK+ requires the following packages:
|
||||
|
||||
- The GLib, Pango, and Atk libraries, available at the same location as GTK+
|
||||
|
||||
- The TIFF, PNG, and JPEG image loading libraries. You most
|
||||
likely have these installed on your system already. If not
|
||||
these libraries are available from:
|
||||
|
||||
http://www.libtiff.org/
|
||||
ftp://swrinde.nde.swri.edu/pub/png/src/
|
||||
ftp://ftp.uu.net/graphics/jpeg/
|
||||
|
||||
If these libraries are not available, the corresponding
|
||||
image loaders will simply not be built. However, this
|
||||
may cause applications using GTK+ not to function properly.
|
||||
|
||||
Simple install procedure
|
||||
========================
|
||||
|
||||
% gzip -cd gtk+-@GTK_VERSION@.tar.gz | tar xvf - # unpack the sources
|
||||
% cd gtk+-@GTK_VERSION@ # change to the toplevel directory
|
||||
% ./configure # run the `configure' script
|
||||
% make # build GTK
|
||||
[ Become root if necessary ]
|
||||
% make install # install GTK
|
||||
|
||||
The Details
|
||||
===========
|
||||
|
||||
Complete information about installing GTK+ and related libraries can be found
|
||||
in the file:
|
||||
|
||||
docs/reference/gtk/docs/reference/gtk/html/gtk-building.html
|
||||
|
||||
Or online at:
|
||||
|
||||
http://developer.gnome.org/doc/API/2.0/gtk/gtk-building.html
|
||||
|
||||
41
INSTALL.md
@@ -1,41 +0,0 @@
|
||||
Prerequisites
|
||||
=============
|
||||
|
||||
GTK requires the following packages:
|
||||
|
||||
- Autotools or Meson
|
||||
|
||||
- The GLib, Pango, GdkPixbuf, ATK and cairo libraries, available at
|
||||
the same location as GTK.
|
||||
|
||||
- libepoxy, for cross-platform OpenGL support.
|
||||
It can be found here: https://github.com/anholt/libepoxy
|
||||
|
||||
- Each GDK backend has its own backend-specific requirements. For
|
||||
the X11 backend, X11 R6 and XInput version 2 (as well as a number
|
||||
of other extensions) are required. The Wayland backend requires
|
||||
(obviously) the Wayland libraries.
|
||||
|
||||
- gobject-introspection
|
||||
|
||||
Simple install procedure for Meson
|
||||
==================================
|
||||
|
||||
$ tar xf gtk+-3.24.46.tar.xz # unpack the sources
|
||||
$ cd gtk+-3.24.46 # change to the toplevel directory
|
||||
$ meson setup _build # configure GTK+
|
||||
$ meson compile -C _build # build GTK+
|
||||
[ Become root if necessary ]
|
||||
# meson install -C _build # install GTK+
|
||||
|
||||
The Details
|
||||
===========
|
||||
|
||||
Complete information about installing GTK+ and related libraries
|
||||
can be found in the file:
|
||||
|
||||
- [gtk-building.html](./docs/reference/gtk/html/gtk-building.html)
|
||||
|
||||
Or online at:
|
||||
|
||||
- http://developer-old.gnome.org/gtk/3.24/gtk-building.html
|
||||
211
Makefile.am
Normal file
@@ -0,0 +1,211 @@
|
||||
## Makefile.am for GTK+
|
||||
|
||||
SRC_SUBDIRS = gdk-pixbuf gdk gtk modules demos tests contrib
|
||||
SUBDIRS = po $(SRC_SUBDIRS) docs build m4macros
|
||||
|
||||
# require automake 1.4
|
||||
AUTOMAKE_OPTIONS = 1.4
|
||||
|
||||
EXTRA_DIST = \
|
||||
HACKING \
|
||||
gtk+.spec.in \
|
||||
makecopyright \
|
||||
NEWS.pre-1-0 \
|
||||
ChangeLog.pre-1-0 \
|
||||
ChangeLog.pre-1-2 \
|
||||
README.cvs-commits \
|
||||
README.win32 \
|
||||
README.nanox \
|
||||
config.h.win32 \
|
||||
gtk-zip.sh \
|
||||
sanitize-la.sh \
|
||||
po/README.tools \
|
||||
po/README.translators \
|
||||
po/desk.pl \
|
||||
po/makefile.mingw \
|
||||
po/update.pl \
|
||||
po/po2tbl.sed.in \
|
||||
examples/aspectframe/Makefile \
|
||||
examples/aspectframe/aspectframe.c \
|
||||
examples/Makefile \
|
||||
examples/README.1ST \
|
||||
examples/extract.awk \
|
||||
examples/extract.sh \
|
||||
examples/arrow/Makefile \
|
||||
examples/arrow/arrow.c \
|
||||
examples/base/Makefile \
|
||||
examples/base/base.c \
|
||||
examples/buttonbox/Makefile \
|
||||
examples/buttonbox/buttonbox.c \
|
||||
examples/buttons/Makefile \
|
||||
examples/buttons/buttons.c \
|
||||
examples/buttons/info.xpm \
|
||||
examples/calendar/Makefile \
|
||||
examples/calendar/calendar.c \
|
||||
examples/clist/Makefile \
|
||||
examples/clist/clist.c \
|
||||
examples/entry/Makefile \
|
||||
examples/entry/entry.c \
|
||||
examples/eventbox/Makefile \
|
||||
examples/eventbox/eventbox.c \
|
||||
examples/filesel/Makefile \
|
||||
examples/filesel/filesel.c \
|
||||
examples/gtkdial/Makefile \
|
||||
examples/gtkdial/dial_test.c \
|
||||
examples/gtkdial/gtkdial.c \
|
||||
examples/gtkdial/gtkdial.h \
|
||||
examples/helloworld/Makefile \
|
||||
examples/helloworld/helloworld.c \
|
||||
examples/helloworld2/Makefile \
|
||||
examples/helloworld2/helloworld2.c \
|
||||
examples/label/Makefile \
|
||||
examples/label/label.c \
|
||||
examples/list/Makefile \
|
||||
examples/list/list.c \
|
||||
examples/menu/Makefile \
|
||||
examples/menu/menu.c \
|
||||
examples/menu/itemfactory.c \
|
||||
examples/notebook/Makefile \
|
||||
examples/notebook/notebook.c \
|
||||
examples/packbox/Makefile \
|
||||
examples/packbox/packbox.c \
|
||||
examples/paned/Makefile \
|
||||
examples/paned/paned.c \
|
||||
examples/pixmap/Makefile \
|
||||
examples/pixmap/pixmap.c \
|
||||
examples/progressbar/Makefile \
|
||||
examples/progressbar/progressbar.c \
|
||||
examples/radiobuttons/Makefile \
|
||||
examples/radiobuttons/radiobuttons.c \
|
||||
examples/rangewidgets/Makefile \
|
||||
examples/rangewidgets/rangewidgets.c \
|
||||
examples/rulers/Makefile \
|
||||
examples/rulers/rulers.c \
|
||||
examples/scribble-simple/Makefile \
|
||||
examples/scribble-simple/scribble-simple.c \
|
||||
examples/scribble-xinput/Makefile \
|
||||
examples/scribble-xinput/scribble-xinput.c \
|
||||
examples/scrolledwin/Makefile \
|
||||
examples/scrolledwin/scrolledwin.c \
|
||||
examples/selection/Makefile \
|
||||
examples/selection/gettargets.c \
|
||||
examples/selection/setselection.c \
|
||||
examples/statusbar/Makefile \
|
||||
examples/statusbar/statusbar.c \
|
||||
examples/table/Makefile \
|
||||
examples/table/table.c \
|
||||
examples/text/Makefile \
|
||||
examples/text/text.c \
|
||||
examples/tictactoe/Makefile \
|
||||
examples/tictactoe/tictactoe.c \
|
||||
examples/tictactoe/tictactoe.h \
|
||||
examples/tictactoe/ttt_test.c \
|
||||
examples/tree/Makefile \
|
||||
examples/tree/tree.c \
|
||||
examples/wheelbarrow/Makefile \
|
||||
examples/wheelbarrow/wheelbarrow.c \
|
||||
examples/fixed/fixed.c \
|
||||
examples/fixed/Makefile \
|
||||
examples/frame/frame.c \
|
||||
examples/frame/Makefile \
|
||||
examples/spinbutton/spinbutton.c \
|
||||
examples/spinbutton/Makefile \
|
||||
examples/find-examples.sh
|
||||
|
||||
GDKTARGET=@gdktarget@
|
||||
|
||||
## Copy .pc files to target-specific names
|
||||
gtk+-$(GDKTARGET)-2.0.pc: gtk+-2.0.pc
|
||||
rm -f gtk+-$(GDKTARGET)-2.0.pc && \
|
||||
cp gtk+-2.0.pc gtk+-$(GDKTARGET)-2.0.pc
|
||||
|
||||
gdk-$(GDKTARGET)-2.0.pc: gdk-2.0.pc
|
||||
rm -f gdk-$(GDKTARGET)-2.0.pc && \
|
||||
cp gdk-2.0.pc gdk-$(GDKTARGET)-2.0.pc
|
||||
|
||||
gtk+-$(GDKTARGET)-2.0-uninstalled.pc: gtk+-2.0-uninstalled.pc
|
||||
rm -f gtk+-$(GDKTARGET)-2.0-uninstalled.pc && \
|
||||
cp gtk+-2.0-uninstalled.pc gtk+-$(GDKTARGET)-2.0-uninstalled.pc
|
||||
|
||||
gdk-$(GDKTARGET)-2.0-uninstalled.pc: gdk-2.0-uninstalled.pc
|
||||
rm -f gdk-$(GDKTARGET)-2.0-uninstalled.pc && \
|
||||
cp gdk-2.0-uninstalled.pc gdk-$(GDKTARGET)-2.0-uninstalled.pc
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA= gdk-pixbuf-2.0.pc gdk-$(GDKTARGET)-2.0.pc gtk+-$(GDKTARGET)-2.0.pc
|
||||
|
||||
DISTCLEANFILES = \
|
||||
gtk+-$(GDKTARGET)-2.0.pc \
|
||||
gdk-$(GDKTARGET)-2.0.pc \
|
||||
gtk+-$(GDKTARGET)-2.0-uninstalled.pc \
|
||||
gdk-$(GDKTARGET)-2.0-uninstalled.pc
|
||||
|
||||
## copy the default target for this platform to gdk-2.0.pc and gtk+-2.0.pc
|
||||
DEFAULT_GDKTARGET=x11
|
||||
install-data-hook:
|
||||
(cd $(DESTDIR)$(pkgconfigdir) && \
|
||||
test -f gdk-$(DEFAULT_GDKTARGET)-2.0.pc && \
|
||||
test -f gtk+-$(DEFAULT_GDKTARGET)-2.0.pc && \
|
||||
rm -f gdk-2.0.pc && cp -f gdk-$(DEFAULT_GDKTARGET)-2.0.pc gdk-2.0.pc && \
|
||||
rm -f gtk+-2.0.pc && cp -f gtk+-$(DEFAULT_GDKTARGET)-2.0.pc gtk+-2.0.pc) || \
|
||||
(cd $(DESTDIR)$(pkgconfigdir) && \
|
||||
rm -f gdk-2.0.pc && cp -f gdk-$(GDKTARGET)-2.0.pc gdk-2.0.pc && \
|
||||
rm -f gtk+-2.0.pc && cp -f gtk+-$(GDKTARGET)-2.0.pc gtk+-2.0.pc)
|
||||
|
||||
dist-hook: gtk+.spec
|
||||
if test -f $(srcdir)/INSTALL.in && test -f $(srcdir)/README.in ; then \
|
||||
CONFIG_FILES="INSTALL:$(srcdir)/INSTALL.in README:$(srcdir)/README.in" \
|
||||
CONFIG_HEADERS= \
|
||||
$(SHELL) config.status \
|
||||
&& cp INSTALL README $(distdir) ; \
|
||||
fi \
|
||||
&& cp gtk+.spec $(distdir)
|
||||
|
||||
.PHONY: files release sanity snapshot
|
||||
|
||||
files:
|
||||
@files=`ls $(DISTFILES) 2> /dev/null `; for p in $$files; do \
|
||||
echo $$p; \
|
||||
done
|
||||
@for subdir in $(SUBDIRS); do \
|
||||
files=`cd $$subdir; $(MAKE) files | grep -v "make\[[1-9]\]"`; \
|
||||
for file in $$files; do \
|
||||
echo $$subdir/$$file; \
|
||||
done; \
|
||||
done
|
||||
|
||||
release:
|
||||
rm -rf .deps */.deps
|
||||
$(MAKE) distcheck
|
||||
|
||||
sanity:
|
||||
./sanity_check $(VERSION)
|
||||
|
||||
|
||||
snapshot:
|
||||
$(MAKE) dist distdir=$(PACKAGE)-snap`date +"%Y%m%d"`
|
||||
|
||||
|
||||
# This is a version of the automake-1.4 distcheck rule modified
|
||||
# to pass --enable-gtk-doc to ./configure
|
||||
#
|
||||
mydistcheck: dist
|
||||
-rm -rf $(distdir)
|
||||
GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
|
||||
mkdir $(distdir)/=build
|
||||
mkdir $(distdir)/=inst
|
||||
dc_install_base=`cd $(distdir)/=inst && pwd`; \
|
||||
cd $(distdir)/=build \
|
||||
&& ../configure --srcdir=.. --prefix=$$dc_install_base --enable-gtk-doc \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dist
|
||||
-rm -rf $(distdir)
|
||||
@banner="$(distdir).tar.gz is ready for distribution"; \
|
||||
dashes=`echo "$$banner" | sed s/./=/g`; \
|
||||
echo "$$dashes"; \
|
||||
echo "$$banner"; \
|
||||
echo "$$dashes"
|
||||
124
NEWS.pre-1-0
Normal file
@@ -0,0 +1,124 @@
|
||||
|
||||
Overview of Changes in GTK+ 1.0.0:
|
||||
|
||||
* A few bug fixes.
|
||||
|
||||
Overview of Changes in GTK+ 0.99.10:
|
||||
|
||||
* Lots of bug fixes
|
||||
* Documentation improvements
|
||||
* Better looking handlebox
|
||||
* A few convenience functions
|
||||
|
||||
Overview of Changes in GTK+ 0.99.9:
|
||||
|
||||
* Added examples directory, even more examples soon
|
||||
* Added optional word wrap to gtktext
|
||||
* Changes to gtkhandlebox
|
||||
* Lots of bug fixes
|
||||
|
||||
Overview of Changes in GTK+ 0.99.8:
|
||||
|
||||
* Compilation and configuration fixes
|
||||
* DND Fixes
|
||||
* New test in testgtk: cursors
|
||||
* Tutorial updates/additions
|
||||
* Few more FAQ additions
|
||||
* More prep for 1.0
|
||||
|
||||
Overview of Changes in GTK+ 0.99.7:
|
||||
|
||||
* This release is mainly because 0.99.6 did not compile completely
|
||||
due to a missing file.
|
||||
* Fixes to Gtk's quit handlers.
|
||||
|
||||
Overview of Changes in GTK+ 0.99.6:
|
||||
|
||||
* Intermediate release to become 1.0.
|
||||
* More signedness corrections for handler functions in gtkmain.h.
|
||||
* Semantics of GtkWidget::delete_event changed.
|
||||
* Documentation updates.
|
||||
* Inclusion of Gtk tutorial.
|
||||
* Implementation of a new shutdown method for GtkObject's executed prior to
|
||||
actual destruction. WARNING: this breaks binary compatibility, programs using
|
||||
Gtk need to be recompiled.
|
||||
* Clean ups due to compiler warnings.
|
||||
* Various widget fixes.
|
||||
|
||||
Overview of Fixes in GTK+ 0.99.5:
|
||||
|
||||
* Signal signedness and naming corrections
|
||||
* rc/style fixes
|
||||
* text, entry widget fixes
|
||||
* gtkeditable fixes
|
||||
* scrollbar flickering fixed
|
||||
* check casts are more descriptive
|
||||
* DND fixes
|
||||
* FAQ updates
|
||||
* Bug fixes
|
||||
|
||||
Overview of Changes in GTK+ 0.99.4:
|
||||
|
||||
* Reference counting revolution integrated.
|
||||
Refer to docs/refcounting.txt on this issue.
|
||||
* Implementation of a decent debugging system, you would want
|
||||
to export GTK_DEBUG=objects if you are going to develop gtk applications,
|
||||
refer to docs/debugging.txt for further information.
|
||||
* Additions on the signal code for querying information about certain signals,
|
||||
and pending handlers of signals.
|
||||
* Support for user signals, and major changes to internal signal handler
|
||||
handling for proper signal removal and invokation of after signals.
|
||||
* Additional signals for various widgets e.g, GtkHandleBox::child_attached,
|
||||
GtkHandleBox::child_detached, GtkWidget::style_set, GtkWidget::parent_set.
|
||||
* GtkTooltips became a true descendant of GtkObject via derivation from
|
||||
GtkData and facilitates an extra tip string which can be used as e.g. an
|
||||
index into context help.
|
||||
* Split up of the widget/object flags into a private and a public portion,
|
||||
consult docs/widget_system.txt on this.
|
||||
* Support for hot keys on gtk programs via gtk_key_snooper_install().
|
||||
* Reimplementation of the *_interp functions as *_full functions to provide
|
||||
simple callback functions as well.
|
||||
* Idle functions are now prioritized.
|
||||
* Many enhancements to GtkNotebook.
|
||||
* New widget GtkSpinButton, check out testgtk.
|
||||
* New widget GtkTipsQuery for letting the user query tooltips of widgets.
|
||||
* Addition of GtkEditable base widget to encapsulate selection and
|
||||
clipboard handling. (GtkEntry and GtkText use this)
|
||||
* Text widget more complete.
|
||||
* Additions to GtkStatusBar to make it complete.
|
||||
* Gdk now supports regions.
|
||||
* Access masks for widget arguments (GTK_ARG_READABLE/GTK_ARG_WRITABLE).
|
||||
* Function replacements:
|
||||
g_string_hash() -> g_str_hash()
|
||||
g_string_equal() -> g_str_equal()
|
||||
gtk_tooltips_set_tips() -> gtk_tooltips_set_tip()
|
||||
* Support for quit handlers in gtk_main().
|
||||
* Motif window mangaer hints support.
|
||||
* Widget arguments are now flagged for readability/writability.
|
||||
* Additions to documentation.
|
||||
* Various FAQ updates. (FAQ now included)
|
||||
* Clean ups and many many bug fixes by a lot of people all over the place.
|
||||
* New, long and descriptive ChangeLog entries for bored readers ;)
|
||||
|
||||
Overview of Changes in GTK+ 0.99.3:
|
||||
|
||||
* Filesel enhancement / stability changes
|
||||
* New widget, gtkcombo
|
||||
* Widgets in the toolbar do not get the focus
|
||||
* New widget, gtkstatusbar (still in-progress)
|
||||
* g_string_equal renamed g_str_equal
|
||||
* g_string_hash renamed g_str_hash
|
||||
* new gtkbox functions to allow modification of the child
|
||||
linkage after the widget tree is setup
|
||||
* gtk_*_get_arg() and gtk_*_set_arg() fixes and implementations
|
||||
* DND changes/fixes
|
||||
* Entry widget now has set_max_length function
|
||||
* Handlebox widget changes/fixes
|
||||
* Some work on text widget (still in-progress)
|
||||
* Now the toolbar supports arbitrary widgets as well
|
||||
* CList has resizable columns again
|
||||
* CList now looks consistant with scrolled windows
|
||||
* Remove flickering from entry widget
|
||||
* Added switch_page signal to notebook widget
|
||||
* Documentation additions
|
||||
* Other bug fixes...
|
||||
163
README
Normal file
@@ -0,0 +1,163 @@
|
||||
General Information
|
||||
===================
|
||||
|
||||
This is GTK+ version 2.0.2. GTK+ is a multi-platform toolkit for
|
||||
creating graphical user interfaces. Offering a complete set of widgets,
|
||||
GTK+ is suitable for projects ranging from small one-off projects to
|
||||
complete application suites.
|
||||
|
||||
GTK+ is free software and part of the GNU Project. However, the
|
||||
licensing terms for GTK+, the GNU LGPL, allow it to be used by all
|
||||
developers, including those developing proprietary software, without any
|
||||
license fees or royalties.
|
||||
|
||||
The official ftp site is:
|
||||
ftp://ftp.gtk.org/pub/gtk
|
||||
|
||||
The official web site is:
|
||||
http://www.gtk.org/
|
||||
|
||||
Information about mailing lists can be found at
|
||||
http://www.gtk.org/mailinglists.html
|
||||
|
||||
Installation
|
||||
============
|
||||
|
||||
See the file 'INSTALL'
|
||||
|
||||
GTK+-2.0.0 Specific Notes
|
||||
=========================
|
||||
|
||||
* The default configuration of GTK+ has been stream-lined to reduce
|
||||
confusion on the part of new users or users coming from other
|
||||
environments. Users used to older versions of GTK+ may want to make
|
||||
some adjustments to the default configuration.
|
||||
|
||||
- Emacs keybindings such as Control-A and Control-E to move to the
|
||||
ends of lines are not enabled by default in the editing widgets. To
|
||||
turn on Emacs keybindings, add the line:
|
||||
|
||||
gtk-key-theme-name = "Emacs"
|
||||
|
||||
To your ~/.gtkrc-2.0
|
||||
|
||||
- Editing of menu accelerators by pressing an accelerator over the
|
||||
menu item is disabled by default. To enable, it, add:
|
||||
|
||||
gtk-can-change-accels = 1
|
||||
|
||||
to your ~/.gtkrc-2.0
|
||||
|
||||
- To improve useability for keyboard operation, GTK+ now selects the
|
||||
contents of an entry when tabbing into it or when it is focused on
|
||||
initial window map. To disable this behavior, add:
|
||||
|
||||
gtk-entry-select-on-focus = 0
|
||||
|
||||
to your ~/.gtkrc-2.0
|
||||
|
||||
* The GTK+ libraries use an '_' prefix to indicate private symbols that
|
||||
must not be used by applications. The intention was not to export
|
||||
symbols beginning with prefixes such as _gtk, _gdk, and _pango from
|
||||
the libraries at all, but due to a bug in libtool, they are actually
|
||||
exported at the moment on some platforms (including Linux).
|
||||
Applications that use these private symbols _will_ break when
|
||||
this bug is fixed.
|
||||
|
||||
* The Xft library that GTK+ uses to display anti-aliased fonts will
|
||||
undergo a major version revision in the next few months. To deal with
|
||||
this, by default, GTK+ and Pango are built so that applications will
|
||||
not have explicit dependencies on version 1 on Xft. To make sure that
|
||||
your application will be binary compatible with future versions of
|
||||
GTK+:
|
||||
|
||||
- Do not configure Pango or GTK+ with the --enable-static or
|
||||
--enable-explicit otions, since they will cause dependencies on
|
||||
Xft version 1.
|
||||
|
||||
- Do not use Xft directly in your applicatons.
|
||||
|
||||
* There is a bug in the Xft library in XFree86-4.1 and possibly previous
|
||||
versions that causes random crashes when using the Pango Xft
|
||||
backend. If you want to use Xft fonts, you should upgrade to
|
||||
XFree86-4.2.
|
||||
|
||||
* Xft support is not on by default. To turn it on set the environment
|
||||
variable GDK_USE_XFT to '1'
|
||||
|
||||
GDK_USE_XFT=1
|
||||
export GDK_USE_XFT
|
||||
|
||||
* The gdk_pixbuf_xlib library included in the contrib/ directory of GTK+
|
||||
is provided on a as-is basis and has not been tested at all. No
|
||||
guarantees about the degree of workingness or about future
|
||||
compatibility are provided.
|
||||
|
||||
* There are known problems with some of the image loaders in the
|
||||
gdk-pixbuf library included in GTK+ where corrupted images can cause
|
||||
crashes and conceivably worse problems. Until these problems are fixed
|
||||
(we hope to have this done for 2.0.1), gdk-pixbuf should not be used
|
||||
to load untrusted data.
|
||||
|
||||
* The assumption of GLib and GTK+ by default is that filenames on the
|
||||
filesystem are encoded in UTF-8 rather than the encoding of the locale;
|
||||
The GTK+ developers consider that having filenames whose interpretation
|
||||
depends on the current locale is fundamentally a bad idea.
|
||||
|
||||
If you have filenames encoded in the encoding of your locale, then
|
||||
you may want to set the G_BROKEN_FILENAMES environment variable:
|
||||
|
||||
G_BROKEN_FILENAMES=1
|
||||
export G_BROKEN_FILENAMES
|
||||
|
||||
Best integration of GTK+-2.0 with the environment is achieved by
|
||||
using a UTF-8 locale.
|
||||
|
||||
How to report bugs
|
||||
==================
|
||||
|
||||
Bugs should be reported to the GNOME bug tracking system.
|
||||
(http://bugzilla.gnome.org, product gtk+.) You will need to create an
|
||||
account for yourself.
|
||||
|
||||
In the bug report please include:
|
||||
|
||||
* Information about your system. For instance:
|
||||
|
||||
- What operating system and version
|
||||
- What version of X
|
||||
- For Linux, what version of the C library
|
||||
|
||||
And anything else you think is relevant.
|
||||
|
||||
* How to reproduce the bug.
|
||||
|
||||
If you can reproduce it with the testgtk program that is built in the
|
||||
gtk/ subdirectory, that will be most convenient. Otherwise, please
|
||||
include a short test program that exhibits the behavior. As a last
|
||||
resort, you can also provide a pointer to a larger piece of software
|
||||
that can be downloaded.
|
||||
|
||||
* If the bug was a crash, the exact text that was printed out when the
|
||||
crash occured.
|
||||
|
||||
* Further information such as stack traces may be useful, but is not
|
||||
necessary. If you do send a stack trace, and the error is an X error,
|
||||
it will be more useful if the stacktrace is produced running the test
|
||||
program with the --sync command line option.
|
||||
|
||||
Patches
|
||||
=======
|
||||
|
||||
Patches should also be submitted to bugzilla.gnome.org. If the patch
|
||||
fixes an existing bug, add the patch as an attachment to that bug
|
||||
report.
|
||||
|
||||
Otherwise, enter a new bug report that describes the patch, and attach
|
||||
the patch to that bug report.
|
||||
|
||||
Bug reports containing patches should include the PATCH keyword in their
|
||||
keyword fields. If the patch adds to or changes the GTK programming
|
||||
interface, the API keyword should also be included.
|
||||
|
||||
Patches should be in unified diff form. (The -u option to GNU diff.)
|
||||
54
README.cvs-commits
Normal file
@@ -0,0 +1,54 @@
|
||||
GTK+ is part of the GNOME CVS repository. At the current time, any
|
||||
person with write access to the GNOME repository, can make changes to
|
||||
GTK+. This is a good thing, in that it encourages many people to work
|
||||
on GTK+, and progress can be made quickly. However, GTK+ is a fairly
|
||||
large and complicated package that many other things depend on, so to
|
||||
avoid unnecessary breakage, and to take advantage of the knowledge
|
||||
about GTK+ that has been built up over the last 4 years, we'd like
|
||||
to ask people commiting to GTK+ to follow a few rules:
|
||||
|
||||
0) Ask first. If your changes are major, or could possibly break existing
|
||||
code, you should always ask. If your change is minor and you've
|
||||
been working on GTK+ for a while it probably isn't necessary
|
||||
to ask. But when in doubt, ask. Even if your change is correct,
|
||||
somebody may know a better way to do things.
|
||||
|
||||
If you are making changes to GTK+, you should be subscribed
|
||||
to gtk-devel-list@gnome.org. (Subscription address:
|
||||
gtk-devel-list-request@gnome.org.) This is a good place to ask
|
||||
about intended changes.
|
||||
|
||||
#gimp on byxnet (irc.gimp.org, irc2.gimp.org, irc3.gimp.org,
|
||||
irc.germany.gimp.org...)s also a good place to find GTK+ developers to
|
||||
discuss changes with, however, email to gtk-devel-list is the most
|
||||
certain and preferred method.
|
||||
|
||||
1) Ask _first_.
|
||||
|
||||
2) There must be a ChangeLog for every commit. (If you discover that
|
||||
you only committed half the files you meant to and need to fix that
|
||||
up, or something, you don't need a new ChangeLog entry. But in general,
|
||||
ChangeLog entries are mandatory.) Changes with out ChangeLog entries
|
||||
will be reverted.
|
||||
|
||||
3) There _must_ be a ChangeLog for every commit.
|
||||
|
||||
Notes:
|
||||
|
||||
* If you are going to be changing many files in an experimental fashion,
|
||||
it probably is a good idea to create a separate branch for your changes.
|
||||
|
||||
* The ChangeLog entries should preferrably match in date format
|
||||
with the existing entries. You can set how emacs does this
|
||||
by using customize mode:
|
||||
|
||||
- M-x customize
|
||||
- set Programming/Tools/ChangeLog/Add Log Time Format to
|
||||
'Old Format'
|
||||
|
||||
Or, set the add-log-time-format to 'current-time-string in
|
||||
your .emacs file.
|
||||
|
||||
Owen Taylor
|
||||
13 Aug 1998
|
||||
17 Apr 2001
|
||||
163
README.in
Normal file
@@ -0,0 +1,163 @@
|
||||
General Information
|
||||
===================
|
||||
|
||||
This is GTK+ version @GTK_VERSION@. GTK+ is a multi-platform toolkit for
|
||||
creating graphical user interfaces. Offering a complete set of widgets,
|
||||
GTK+ is suitable for projects ranging from small one-off projects to
|
||||
complete application suites.
|
||||
|
||||
GTK+ is free software and part of the GNU Project. However, the
|
||||
licensing terms for GTK+, the GNU LGPL, allow it to be used by all
|
||||
developers, including those developing proprietary software, without any
|
||||
license fees or royalties.
|
||||
|
||||
The official ftp site is:
|
||||
ftp://ftp.gtk.org/pub/gtk
|
||||
|
||||
The official web site is:
|
||||
http://www.gtk.org/
|
||||
|
||||
Information about mailing lists can be found at
|
||||
http://www.gtk.org/mailinglists.html
|
||||
|
||||
Installation
|
||||
============
|
||||
|
||||
See the file 'INSTALL'
|
||||
|
||||
GTK+-2.0.0 Specific Notes
|
||||
=========================
|
||||
|
||||
* The default configuration of GTK+ has been stream-lined to reduce
|
||||
confusion on the part of new users or users coming from other
|
||||
environments. Users used to older versions of GTK+ may want to make
|
||||
some adjustments to the default configuration.
|
||||
|
||||
- Emacs keybindings such as Control-A and Control-E to move to the
|
||||
ends of lines are not enabled by default in the editing widgets. To
|
||||
turn on Emacs keybindings, add the line:
|
||||
|
||||
gtk-key-theme-name = "Emacs"
|
||||
|
||||
To your ~/.gtkrc-2.0
|
||||
|
||||
- Editing of menu accelerators by pressing an accelerator over the
|
||||
menu item is disabled by default. To enable, it, add:
|
||||
|
||||
gtk-can-change-accels = 1
|
||||
|
||||
to your ~/.gtkrc-2.0
|
||||
|
||||
- To improve useability for keyboard operation, GTK+ now selects the
|
||||
contents of an entry when tabbing into it or when it is focused on
|
||||
initial window map. To disable this behavior, add:
|
||||
|
||||
gtk-entry-select-on-focus = 0
|
||||
|
||||
to your ~/.gtkrc-2.0
|
||||
|
||||
* The GTK+ libraries use an '_' prefix to indicate private symbols that
|
||||
must not be used by applications. The intention was not to export
|
||||
symbols beginning with prefixes such as _gtk, _gdk, and _pango from
|
||||
the libraries at all, but due to a bug in libtool, they are actually
|
||||
exported at the moment on some platforms (including Linux).
|
||||
Applications that use these private symbols _will_ break when
|
||||
this bug is fixed.
|
||||
|
||||
* The Xft library that GTK+ uses to display anti-aliased fonts will
|
||||
undergo a major version revision in the next few months. To deal with
|
||||
this, by default, GTK+ and Pango are built so that applications will
|
||||
not have explicit dependencies on version 1 on Xft. To make sure that
|
||||
your application will be binary compatible with future versions of
|
||||
GTK+:
|
||||
|
||||
- Do not configure Pango or GTK+ with the --enable-static or
|
||||
--enable-explicit otions, since they will cause dependencies on
|
||||
Xft version 1.
|
||||
|
||||
- Do not use Xft directly in your applicatons.
|
||||
|
||||
* There is a bug in the Xft library in XFree86-4.1 and possibly previous
|
||||
versions that causes random crashes when using the Pango Xft
|
||||
backend. If you want to use Xft fonts, you should upgrade to
|
||||
XFree86-4.2.
|
||||
|
||||
* Xft support is not on by default. To turn it on set the environment
|
||||
variable GDK_USE_XFT to '1'
|
||||
|
||||
GDK_USE_XFT=1
|
||||
export GDK_USE_XFT
|
||||
|
||||
* The gdk_pixbuf_xlib library included in the contrib/ directory of GTK+
|
||||
is provided on a as-is basis and has not been tested at all. No
|
||||
guarantees about the degree of workingness or about future
|
||||
compatibility are provided.
|
||||
|
||||
* There are known problems with some of the image loaders in the
|
||||
gdk-pixbuf library included in GTK+ where corrupted images can cause
|
||||
crashes and conceivably worse problems. Until these problems are fixed
|
||||
(we hope to have this done for 2.0.1), gdk-pixbuf should not be used
|
||||
to load untrusted data.
|
||||
|
||||
* The assumption of GLib and GTK+ by default is that filenames on the
|
||||
filesystem are encoded in UTF-8 rather than the encoding of the locale;
|
||||
The GTK+ developers consider that having filenames whose interpretation
|
||||
depends on the current locale is fundamentally a bad idea.
|
||||
|
||||
If you have filenames encoded in the encoding of your locale, then
|
||||
you may want to set the G_BROKEN_FILENAMES environment variable:
|
||||
|
||||
G_BROKEN_FILENAMES=1
|
||||
export G_BROKEN_FILENAMES
|
||||
|
||||
Best integration of GTK+-2.0 with the environment is achieved by
|
||||
using a UTF-8 locale.
|
||||
|
||||
How to report bugs
|
||||
==================
|
||||
|
||||
Bugs should be reported to the GNOME bug tracking system.
|
||||
(http://bugzilla.gnome.org, product gtk+.) You will need to create an
|
||||
account for yourself.
|
||||
|
||||
In the bug report please include:
|
||||
|
||||
* Information about your system. For instance:
|
||||
|
||||
- What operating system and version
|
||||
- What version of X
|
||||
- For Linux, what version of the C library
|
||||
|
||||
And anything else you think is relevant.
|
||||
|
||||
* How to reproduce the bug.
|
||||
|
||||
If you can reproduce it with the testgtk program that is built in the
|
||||
gtk/ subdirectory, that will be most convenient. Otherwise, please
|
||||
include a short test program that exhibits the behavior. As a last
|
||||
resort, you can also provide a pointer to a larger piece of software
|
||||
that can be downloaded.
|
||||
|
||||
* If the bug was a crash, the exact text that was printed out when the
|
||||
crash occured.
|
||||
|
||||
* Further information such as stack traces may be useful, but is not
|
||||
necessary. If you do send a stack trace, and the error is an X error,
|
||||
it will be more useful if the stacktrace is produced running the test
|
||||
program with the --sync command line option.
|
||||
|
||||
Patches
|
||||
=======
|
||||
|
||||
Patches should also be submitted to bugzilla.gnome.org. If the patch
|
||||
fixes an existing bug, add the patch as an attachment to that bug
|
||||
report.
|
||||
|
||||
Otherwise, enter a new bug report that describes the patch, and attach
|
||||
the patch to that bug report.
|
||||
|
||||
Bug reports containing patches should include the PATCH keyword in their
|
||||
keyword fields. If the patch adds to or changes the GTK programming
|
||||
interface, the API keyword should also be included.
|
||||
|
||||
Patches should be in unified diff form. (The -u option to GNU diff.)
|
||||
70
README.md
@@ -1,70 +0,0 @@
|
||||
General Information
|
||||
===================
|
||||
|
||||
GTK is a multi-platform toolkit for creating graphical user interfaces.
|
||||
Offering a complete set of widgets, GTK is suitable for projects ranging
|
||||
from small one-off projects to complete application suites.
|
||||
|
||||
GTK is free software and part of the GNU Project. However, the licensing
|
||||
terms for GTK, the GNU LGPL, allow it to be used by all developers,
|
||||
including those developing proprietary software, without any license fees or
|
||||
royalties.
|
||||
|
||||
The official download locations are:
|
||||
|
||||
- http://download.gnome.org/sources/gtk+
|
||||
|
||||
The official web site is:
|
||||
|
||||
- http://www.gtk.org/
|
||||
|
||||
Installation
|
||||
============
|
||||
|
||||
See the file [`INSTALL.md`](./INSTALL.md)
|
||||
|
||||
|
||||
How to report bugs
|
||||
==================
|
||||
|
||||
Bugs should be reported to the [GTK issue
|
||||
tracker](https://gitlab.gnome.org/GNOME/gtk/issues). You will need to create
|
||||
an account for yourself.
|
||||
|
||||
In the bug report please include:
|
||||
|
||||
* Information about your system. For instance:
|
||||
|
||||
- What operating system and version
|
||||
- For Linux, what version of the C library
|
||||
|
||||
And anything else you think is relevant.
|
||||
|
||||
* How to reproduce the bug.
|
||||
|
||||
If you can reproduce it with one of the test programs that are built
|
||||
in the tests/ subdirectory, that will be most convenient. Otherwise,
|
||||
please include a short test program that exhibits the behavior.
|
||||
As a last resort, you can also provide a pointer to a larger piece
|
||||
of software that can be downloaded.
|
||||
|
||||
* If the bug was a crash, the exact text that was printed out
|
||||
when the crash occurred.
|
||||
|
||||
* Further information such as stack traces may be useful, but
|
||||
is not necessary.
|
||||
|
||||
|
||||
Bug fixes and improvements
|
||||
==========================
|
||||
|
||||
Changes should be submitted as merge request to the GTK project. If a merge
|
||||
request fixes an issue, the description should mention the issue number.
|
||||
|
||||
Release notes
|
||||
=============
|
||||
|
||||
Release notes for releases of GTK 3.x are part of the migration
|
||||
guide in the GTK documentation. See
|
||||
|
||||
- https://developer-old.gnome.org/gtk3/3.24/gtk-migrating-3-x-to-y.html
|
||||
32
README.nanox
Normal file
@@ -0,0 +1,32 @@
|
||||
Gtk port to nano-X
|
||||
|
||||
STATUS
|
||||
|
||||
Once upon a time I got a few apps working, then started merging
|
||||
the new features added by Owen (32 bit sizes for windows and buffering).
|
||||
Since then I haven't found the time to work on it:-/
|
||||
|
||||
|
||||
TODO
|
||||
|
||||
Finish internal window manager abstraction or add proper support in nano-X.
|
||||
Fix event polling.
|
||||
Implement GdkImage, GdkRgb stuff.
|
||||
Put generic region code in generic gdk and/or use the region code from nano-X.
|
||||
Fix ugly automake stuff for make dist.
|
||||
|
||||
TODO in nano-X
|
||||
|
||||
We need to be able to clip and change the background of windows at runtime
|
||||
for apps to not look so ugly!
|
||||
Fonts: wait for better nano-X font implementation.
|
||||
Properties on windows.
|
||||
Provide a pango module.
|
||||
|
||||
If you want to work on this port or get additional informnation, get in
|
||||
touch with me.
|
||||
Configure gtk with the --with-gdktarget=nanox to compile with nano-X support.
|
||||
|
||||
Paolo Molaro
|
||||
lupus@linuxcare.com
|
||||
|
||||
95
README.win32
Normal file
@@ -0,0 +1,95 @@
|
||||
The Win32 port of GTK+ is a work in progress, and not as stable or
|
||||
correct as the Unix/X11 version. For more information about the Win32
|
||||
port, and prebuilt runtime and developer packages see
|
||||
http://www.gimp.org/win32/ .
|
||||
|
||||
There is a gtk-1-3-win32-production branch of GTK+ that was branched
|
||||
off from before the addition of the no-flicker and other recent
|
||||
functionality. That is what should be used by "production" code until
|
||||
this CVS HEAD (2.0) version is useable. (But note, the Win32 backend
|
||||
has never been claimed to be "production quality", although it works
|
||||
surprisingly well for the GIMP.)
|
||||
|
||||
Building GTK+ on Win32
|
||||
======================
|
||||
|
||||
There are two ways to build GTK+ for win32:
|
||||
|
||||
1) Use the autoconf-generated configure script, and the resulting
|
||||
Makefiles (which use libtool and gcc to do the compilation). I use
|
||||
this myself, but it might be hell to setup correctly.
|
||||
|
||||
Personally I run configure with:
|
||||
CC='gcc -mpentium -fnative-struct' CPPFLAGS='-I/target/include' CFLAGS=-O2 LDFLAGS='-L/target/lib' ./configure --disable-static --prefix=/target --with-gdktarget=win32 --with-wintab=/src/wtkit126 --with-ie55=/src/workshop/ie55_lib --host=i386-pc-mingw32 --enable-maintainer-mode
|
||||
|
||||
It might well be that in order for this to work, you will have to get
|
||||
a bleeding-edge version of libtool for Win32, run libtoolize yourself,
|
||||
and then run autoconf to generate the configure script.
|
||||
|
||||
2) Use the Microsoft compiler, cl and Make, nmake. Say nmake -f
|
||||
makefile.msc in gdk and gtk.
|
||||
|
||||
Alternative 1 also generates Microsoft import libraries (.lib), if you
|
||||
have lib.exe available. It might also work for cross-compilation from
|
||||
Unix.
|
||||
|
||||
There are hand-written makefiles for mingw (look for makefile.mingw in
|
||||
various directories), but those haven't been kept up-to-date, and
|
||||
probably won't work without editing. Sorry. If you make them work
|
||||
again, by all means do submit patches.
|
||||
|
||||
Note that I use method 1 myself. Hans Breuer has been taking care of
|
||||
the MSVC makefiles. At times, we disagree a bit about various issues,
|
||||
and the makefile.msc files might not produce identically named DLLs
|
||||
and import libraries as the "autoconfiscated" makefiles and libtool
|
||||
do.
|
||||
|
||||
Using GTK+ on Win32
|
||||
===================
|
||||
|
||||
To use GTK+ on Win32, you also need either one of the above mentioned
|
||||
compilers. Other compilers might work, but don't count on it. Look for
|
||||
prebuilt developer packages (DLLs, import libraries, headers) on the
|
||||
above website.
|
||||
|
||||
Multi-threaded use of GTK+ on Win32
|
||||
===================================
|
||||
|
||||
Multi-threaded GTK+ programs might work in special simple cases, but
|
||||
not in general. Sorry. If you have all GTK+ and GDK calls in the same
|
||||
thread, it might work. Otherwise, probably not at all. Possible ways
|
||||
to fix this are being investigated.
|
||||
|
||||
Wintab
|
||||
======
|
||||
|
||||
The tablet support uses the Wintab API. The Wintab development kit can
|
||||
be downloaded from http://www.pointing.com. Pass the --with-wintab
|
||||
flag to configure if you use that. If you use nmake and you don't care
|
||||
for Wintab, undefine HAVE_WINTAB in config.h.win32 and remove
|
||||
references to the wntab32x library from the makefile before building.
|
||||
|
||||
Libintl
|
||||
=======
|
||||
|
||||
GTK wants to be built with the GNU "intl" library for
|
||||
internationalisation (i18n). Get the version ported to Win32 (not a
|
||||
very big deal) from the web site mentioned above. The "intl" library
|
||||
as gets built as a DLL called libintl-1.dll. If you don't want any
|
||||
i18n stuff, undefine ENABLE_NLS, HAVE_GETTEXT and HAVE_LIBINTL in the
|
||||
config.h.win32 file, and remove references to the intl library from
|
||||
the makefiles.
|
||||
|
||||
ActiveIMM
|
||||
=========
|
||||
|
||||
If you want to build a GTK+ that supports ActiveIMM (the Input Method
|
||||
Manager for non-EastAsia locales that can be used on Win9x/NT4), you
|
||||
need the dimm.h header file. That is somewhat difficult to find, but
|
||||
http://msdn.microsoft.com/downloads/samples/internet/wizard/ seems to
|
||||
be a good place to look nowadays. If you use "autoconfiscated" build,
|
||||
pass the --with-ie55 flag to configure specifyin the location of the
|
||||
ie55_lib directory created by downloading the IE5.5 headers and libs
|
||||
from the above URL.
|
||||
|
||||
--Tor Lillqvist <tml@iki.fi>
|
||||
324
README.win32.md
@@ -1,324 +0,0 @@
|
||||
Notes on running GTK on Windows in general
|
||||
===
|
||||
The Win32 backend in GTK+ is not as stable or correct as the X11 one.
|
||||
|
||||
For prebuilt runtime and developer packages see
|
||||
http://ftp.gnome.org/pub/gnome/binaries/win32/
|
||||
|
||||
Notes on using OpenGL (GtkGLArea/GdkGLArea) on Win32
|
||||
===
|
||||
Note that on Windows, if one is running Nahimic 3 on a system with
|
||||
nVidia graphics, one needs to stop the "Nahimic service" or insert
|
||||
the GTK application into the Nahimic blacklist, as noted in
|
||||
https://www.nvidia.com/en-us/geforce/forums/game-ready-drivers/13/297952/nahimic-and-nvidia-drivers-conflict/2334568/
|
||||
if using programs that utilise GtkGLArea and/or GdkGLArea, or use
|
||||
GDK_GL=gles if you know that GLES support is enabled for the build.
|
||||
|
||||
This is a known issue, as the above link indicates, and affects quite
|
||||
a number of applications--sadly, since this issue lies within the
|
||||
nVidia graphics driver and/or the Nahimic 3 code, we are not able
|
||||
to rememdy this on the GTK side; the best bet before trying the above
|
||||
workarounds is to try to update your graphics drivers and Nahimic
|
||||
installation.
|
||||
|
||||
Building GTK+ on Win32
|
||||
===
|
||||
|
||||
First you obviously need developer packages for the compile-time
|
||||
dependencies: `GDK-Pixbuf`, `Pango`*, `HarfBuzz`**, `atk`, `cairo`* and `glib`.
|
||||
You will also need `libffi`, `gettext-runtime`, `libiconv` and PCRE (or PCRE2
|
||||
for glib-2.74.x and later) and `zlib` for GLib; Cairo with DirectWrite support
|
||||
and/or FontConfig support for best font shaping and display supportin Pango*;
|
||||
and `librsvg`, `libpng`, `libjpeg-turbo` and `libtiff` for loading the
|
||||
various icons via GDK-Pixbuf that are common to GTK. You will need a Rust
|
||||
installation with the appropriate toolchain installed as well, if building
|
||||
librsvg-2.42.x or later.
|
||||
|
||||
(MinGW users should also look at the following section on the dependencies
|
||||
that are required, either built from source or installed using `pacman`.
|
||||
|
||||
Notes on building with Visual Studio
|
||||
===
|
||||
|
||||
You may wish to build the dependencies from the sources (all are required
|
||||
for the best use experience unless noted).
|
||||
|
||||
For Visual Studio, it is possible to build the following with CMake:
|
||||
|
||||
* zlib
|
||||
* libpng
|
||||
* FreeType (used in FontConfig, optionally used in Cairo and HarfBuzz)
|
||||
* libexpat (used in FontConfig)
|
||||
* libxml2 (needed for GResource support during build time and librsvg/libcroco)
|
||||
* libbrotlidec (optional, used in FreeType, requires Visual Studio 2013 or later)
|
||||
* libjpeg-turbo (you also need NASM, unless building for ARM64)
|
||||
* libtiff (requires libjpeg-turbo and zlib)
|
||||
* HarfBuzz** (for pre-2.6.0, using Meson is recommended for 2.6.0 or later)
|
||||
* PCRE (for glib-2.72.x and earlier), or PCRE2 (for glib-2.74.x or later)
|
||||
|
||||
It is possible to build the following items using Meson:
|
||||
* HarfBuzz** (2.6.0 and later)
|
||||
* Cairo (1.17.x or later; for 1.16.x, you need mozilla-build to build from the MSVC Makefiles,
|
||||
building cairo-gobject is required)
|
||||
* FontConfig (needed if PangoFT2 is used. Note building Cairo with FontConfig is required,
|
||||
requires Visual Studio 2015 or later)
|
||||
* fribidi (required for Pango)
|
||||
* GLib, ATK, Pango, GDK-Pixbuf
|
||||
* gobject-introspection (recommended, if using language bindings or gedit is desired, requires GLib and libffi)
|
||||
* pixman (required for Cairo)
|
||||
* libepoxy***
|
||||
|
||||
For Visual Studio, Visual Studio projects or NMake Makefiles are provided with the following:
|
||||
* librsvg (runtime, 2.42.x or later require Visual Studio 2013 or later with a Rust
|
||||
MSVC toolchain installed; requires libxml2)
|
||||
* libcroco (required for librsvg-2.40.x or earlier, requires libxml2)
|
||||
* libbz2 (optional for FreeType)
|
||||
* nasm (needed for building libjpeg-turbo on x86/x64)
|
||||
* adwaita-icon-theme (run-time, after building GTK and librsvg)
|
||||
|
||||
NMake Makefiles are provided as an add-on with patches to build the sources,
|
||||
at https://github.com/fanc999/gtk-deps-msvc/, under $(dependency) / $(dep_version)
|
||||
* libiconv (used by gettext-runtime)
|
||||
* gettext-runtime (and gettext-tools; an alternative is to use proxy-intl during the GLib
|
||||
build, at the cost of not having translations being built, VS2015 or later is required for
|
||||
0.21.1 and later)
|
||||
* libffi (currently, manually adapting the pkg-config .pc.in template is needed; an older
|
||||
x86/x64 version can be built in-place if building GLib without libffi installed)
|
||||
|
||||
You also need a copy of stdint.h and inttypes.h from msinttypes for Visual Studio 2012
|
||||
or earlier (stdint.h is optional on VS2010 or later), as well as an implementation of
|
||||
stdbool.h.
|
||||
|
||||
Bleeding-edge versions of the dependencies may require Visual Studio 2015/2017 or later.
|
||||
|
||||
ARM64 builds are supported in addition to x86 and x64 builds, albeit without SIMD optimizations
|
||||
in pixman and libjpeg-turbo (SIMD support may need to be explicitly disabled). Please see
|
||||
the Meson documentation on how to set up a cross-build from an x86-based Windows system.
|
||||
Introspection support is not supported in this configuration.
|
||||
|
||||
Building just using Meson without the dependencies installed may work if the following
|
||||
conditions are met:
|
||||
|
||||
* Visual Studio 2017 15.9.x or later is installed
|
||||
* `git` is accessible in the `%PATH%`, to pull in the depedencies
|
||||
* The CMake-built dependencies should be pre-built.
|
||||
* Only building for x86/x64 is supported this way, ARM64 builds should at least have
|
||||
pixman and libffi prebuilt.
|
||||
* librsvg and adwaita-icon-theme must be built separately
|
||||
* gettext-runtime and libiconv must also be prebuilt if translations support is desired.
|
||||
|
||||
Notes on certain dependencies:
|
||||
---
|
||||
|
||||
* (*)DirectWrite support in Pango requires pango-1.50.12 or later with Cairo
|
||||
1.17.6 or later. Visual Studio 2015 or later is required to build Pango
|
||||
1.50.x or later.
|
||||
* (**)HarfBuzz is required if using Pango-1.44.x or later, or if building
|
||||
PangoFT2. If using Visual Studio 2013 or earlier, only HarfBuzz 2.4.0
|
||||
or earlier is supported. Visual Studio 2017 15.9.x or later is required
|
||||
for 3.3.0 or later. You may wish to build FreeType prior to building
|
||||
HarfBuzz, and then building FreeType again linking to HarfBuzz for a
|
||||
more comprehensive FreeType build. Font features support is only enabled
|
||||
if PangoFT2 is built or Pango-1.44.x and HarfBuzz 2.2.0 or later are installed.
|
||||
* (***)For building with GLES support (currently supported via libANGLE), you
|
||||
will need to obtain libANGLE from its latest GIT checkout or from QT 5.10.x.
|
||||
You will need to build libepoxy with EGL enabled using `-Degl=yes` when
|
||||
configuring the build.
|
||||
|
||||
Some outdated builds of the dependencies may be found at
|
||||
http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies .
|
||||
|
||||
For people compiling GTK+ with Visual C++, it is recommended that
|
||||
the same compiler is used for at least GDK-Pixbuf, Pango, atk and glib
|
||||
so that crashes and errors caused by different CRTs can be avoided.
|
||||
|
||||
For Visual Studio 2008 and 2010, a special setup making use of the Windows
|
||||
8.0 SDK is required, see at the bottom of this document for guidance.
|
||||
Interchanging between Visual Studio 2015, 2017, 2019 and 2022 builds
|
||||
should be fine as they use the same CRT (UCRT) DLLs.
|
||||
|
||||
The following describes how one can build GTK with MinGW or Visual Studio
|
||||
2008 or later using Meson.
|
||||
|
||||
Using Meson (for Visual Studio and MinGW builds)
|
||||
===
|
||||
|
||||
Meson can now be used to build GTK+-3.x with either MinGW or Visual Studio.
|
||||
You will need the following items in addition to all the dependencies
|
||||
listed above:
|
||||
|
||||
* Python 3.6.x or later (later Meson versions require Python 3.7.x)
|
||||
* Meson build system, 0.60.0 or later
|
||||
* Ninja (if not using the Visual Studio project generator for
|
||||
Visual Studio 2010 or later)
|
||||
* CMake (recommended for Visual Studio builds, used for dependency searching)
|
||||
* pkg-config (or some compatible tool, highly recommended)
|
||||
|
||||
For all Windows builds, note that unless `-Dbuiltin_immodules=no` is
|
||||
specified, the input modules (immodules) are built directly into the GTK
|
||||
DLL.
|
||||
|
||||
For building with Meson using Visual Studio, do the following:
|
||||
|
||||
* Create an empty build directory somewhere that is on the same drive
|
||||
as the source tree, and launch the Visual Studio command prompt that
|
||||
matches the build configuration (Visual Studio version and architecture),
|
||||
and run the following:
|
||||
|
||||
* Ensure that both the installation directory of Python 3.6+ and its script
|
||||
directory is in your `%PATH%`, as well as the Ninja, CMake and pkg-config
|
||||
executables (if used). If a pkg-config compatible drop-in replacement
|
||||
tool is being used, ensure that `PKG_CONFIG` is set to point to the
|
||||
executable of that tool as well.
|
||||
|
||||
* For non-GNOME dependencies (such as Cairo and Harfbuzz), where pkg-config
|
||||
files or CMake files may not be properly located, set `%INCLUDE%` and
|
||||
`%LIB%` to ensure that their header files and .lib files can be found
|
||||
respectively. The DLLs of those dependencies should also be in the
|
||||
`%PATH%` during the build as well, especially if introspection files ar
|
||||
to be built.
|
||||
|
||||
* For GNOME dependencies, the pkg-config files for those dependencies
|
||||
should be searchable by `pkg-config` (or a compatible tool). Verify
|
||||
this by running `$(PKG_CONFIG) --modversion <dependency>`.
|
||||
|
||||
* Run the following:
|
||||
`meson <path_to_directory_of_this_file> --buildtype=... --prefix=...,
|
||||
where `buildtype` can be:
|
||||
|
||||
* release
|
||||
* debugoptimized
|
||||
* debug
|
||||
* plain.
|
||||
|
||||
Please refer to the Meson documentation for more details. You may also
|
||||
wish to pass in `-Dbroadway_backend=true` if building the Broadway GDK
|
||||
backend is desired, and/or pass in `-Dbuiltin_immodules=no` to build the
|
||||
immodules as standalone DLLs that can be loaded by GTK dynamically. For
|
||||
Visual Studio 2010 or later builds, you may pass in --backend=vs to
|
||||
generate Visual Studio project files to be used to carry out the builds.
|
||||
|
||||
If you are building with Visual Studio 2008, note the following items as
|
||||
well:
|
||||
|
||||
* For x64 builds, the compiler may hang when building the certain
|
||||
files, due to optimization issues in the compiler. If this happens,
|
||||
use the Windows Task Manager and terminate all `cl.exe` processes,
|
||||
and the build will fail with the source files that did not finish
|
||||
compiling due to the hang. Look for them in build.ninja in the build
|
||||
directory, and change their compiler
|
||||
flag `/O2` to `/O1`, and the compilation and linking should proceed
|
||||
normally.
|
||||
|
||||
* At this time of writing, the following files are known to cause this
|
||||
hang:
|
||||
|
||||
* gtk\gtkfilechoosernativewin32.c
|
||||
* gtk\gtkfilesystemmodel.c
|
||||
* gtk\gtktextsegment.c
|
||||
* gtk\gtktextbtree.c
|
||||
* gtk\gtkrbtree.c
|
||||
* testsuite\gtk\treemodel.c
|
||||
* testsuite\gtk\textbuffer.c
|
||||
* testsuite\gtk\rbtree.c
|
||||
* testsuite\gtk\icontheme.c
|
||||
* Upon running install (via "ninja install"), it is likely that
|
||||
`gtk-query-immodules-3.0.exe` will fail to run as it cannot find
|
||||
`msvcr90.dll` or `msvcr90D.dll`. You can ignore this if you did not
|
||||
specify `-Dbuiltin_immodules=no` when configuring via Meson.
|
||||
If `-Dbuiltin_immodules=no` is specified, you need to run the
|
||||
following after embedding the manifests as outlined in the next
|
||||
point:
|
||||
`$(gtk_install_prefix)\bin\gtk-query-immodules-3.0.exe > $(gtk_install_prefix)\lib\gtk-3.0\3.0.0\immodules.cache`
|
||||
|
||||
* You will need to run the following upon completing install, from the
|
||||
build directory in the Visual Studio 2008/SDK 6.0 command prompt
|
||||
(third line is not needed unless `-Dbuiltin_immodules=no` is
|
||||
specified) so that the built binaries can run:
|
||||
```
|
||||
for /r %f in (*.dll.manifest) do if exist $(gtk_install_prefix)\bin\%~nf mt /manifest %f /outputresource:$(gtk_install_prefix)\bin\%~nf;2
|
||||
for /r %f in (*.exe.manifest) do if exist $(gtk_install_prefix)\bin\%~nf mt /manifest %f /outputresource:$(gtk_install_prefix)\bin\%~nf;1
|
||||
for /r %f in (*.dll.manifest) do if exist $(gtk_install_prefix)\lib\gtk-3.0\3.0.0\immodules\%~nf mt /manifest %f /outputresource:$(gtk_install_prefix)\lib\gtk-3.0\3.0.0\immodules\%~nf;2
|
||||
```
|
||||
|
||||
* The more modern visual style for the print dialog is not applied for
|
||||
Visual Studio 2008 builds. Any solutions to this is really
|
||||
appreciated.
|
||||
|
||||
Support for all pre-2012 Visual Studio builds
|
||||
---
|
||||
|
||||
This release of GTK+ requires at least the Windows 8.0 or later SDK in
|
||||
order to be built successfully using Visual Studio, which means that
|
||||
building with Visual Studio 2008 or 2010 is possible only with a special
|
||||
setup and must be done in the command line with Ninja, if using Meson.
|
||||
Please see
|
||||
https://devblogs.microsoft.com/cppblog/using-the-windows-software-development-kit-sdk-for-windows-8-consumer-preview-with-visual-studio-2010/
|
||||
for references; basically, assuming that your Windows 8.0 SDK is installed
|
||||
in `C:\Program Files (x86)\Windows Kits\8.0` (`$(WIN8SDKDIR)` in short),
|
||||
you need to ensure the following before invoking Meson to configure the build. Your project files or Visual Studio IDE must also be similarly
|
||||
configured (using the Windows 8.1 SDK is also possible for Visual Studio
|
||||
2008~2012, replacing `$(WIN8SDKDIR)` with `$(WIN81SDKDIR)`, which is in
|
||||
`C:\Program Files (x86)\Windows Kits\8.1` unless otherwise indicated):
|
||||
|
||||
* Your `%INCLUDE%` (i.e. "Additional Include Directories" in the IDE)
|
||||
must not include the Windows 7.0/7.1 SDK include directories,
|
||||
and `$(WIN8SDKDIR)\include\um`, `$(WIN8SDKDIR)\include\um\share` and
|
||||
`$(WIN8SDKDIR)\include\winrt` (in this order) must be before your stock
|
||||
Visual Studio 2008/2010 header directories. If you have the DirectX
|
||||
SDK (2010 June or earlier) installed, you should remove its include
|
||||
directory from your `%INCLUDE%` as well.
|
||||
* You must replace the Windows 7.0/7.1 SDK library directory in `%LIB%`
|
||||
(i.e. "Additional Library Paths" in the IDE) with the Windows 8.0/8.1
|
||||
SDK library directory, i.e. `$(WIN8SDKDIR)\lib\win8\um\[x86|x64]` or
|
||||
`$(WIN81SDKDIR)\lib\winv6.3\um\[x86|x64]`.
|
||||
If you have the DirectX SDK installed, you should remove its library
|
||||
directory from your `%LIB%` as well.
|
||||
* You must replace the Windows 7.0/7.1 SDK tools directory from your
|
||||
`%PATH%` ("Executables Directories" in the IDE) with the Windows 8.0
|
||||
SDK tools directory, i.e. `$(WIN8SDKDIR)\bin\[x86|x64]`. If you have
|
||||
the DirectX SDK installed, you should remove its utility directory from
|
||||
your `%PATH%` as well.
|
||||
|
||||
* The Windows 8.0/8.1 SDK headers may contain an `roapi.h` that cannot be
|
||||
used under plain C, so to remedy that, change the following lines
|
||||
(around lines 55-57):
|
||||
|
||||
```
|
||||
// RegisterActivationFactory/RevokeActivationFactory registration cookie
|
||||
typedef struct {} *RO_REGISTRATION_COOKIE;
|
||||
// RegisterActivationFactory/DllGetActivationFactory callback
|
||||
```
|
||||
|
||||
to
|
||||
|
||||
```
|
||||
// RegisterActivationFactory/RevokeActivationFactory registration cookie
|
||||
#ifdef __cplusplus
|
||||
typedef struct {} *RO_REGISTRATION_COOKIE;
|
||||
#else
|
||||
typedef struct _RO_REGISTRATION_COOKIE *RO_REGISTRATION_COOKIE; /* make this header includable in C files */
|
||||
#endif
|
||||
// RegisterActivationFactory/DllGetActivationFactory callback
|
||||
```
|
||||
|
||||
This follows what is done in the Windows 8.1 SDK, which contains an
|
||||
`roapi.h` that is usable under plain C. Please note that you might need
|
||||
to copy that file into a location that is in your `%INCLUDE%` which
|
||||
precedes the include path for the Windows 8.0 SDK headers, if you do not
|
||||
have administrative privileges.
|
||||
|
||||
Visual Studio 2008 hacks
|
||||
---
|
||||
(Please see the section on Meson builds which touch on this topic)
|
||||
|
||||
Multi-threaded use of GTK+ on Win32
|
||||
---
|
||||
|
||||
Multi-threaded GTK+ programs might work on Windows in special simple
|
||||
cases, but not in general. Sorry. If you have all GTK+ and GDK calls
|
||||
in the same thread, it might work. Otherwise, probably not at
|
||||
all. Possible ways to fix this are being investigated.
|
||||
|
||||
* Tor Lillqvist <tml@iki.fi>, <tml@novell.com>
|
||||
* Updated by Fan, Chun-wei <fanc999@yahoo.com.tw>
|
||||
200
TODO
Normal file
@@ -0,0 +1,200 @@
|
||||
|
||||
Outstanding items:
|
||||
|
||||
* focus handling for GtkOptionMenu (needs the previous)
|
||||
|
||||
* implement gtk_default_draw_oval and other missing things in gtkstyle.c.
|
||||
|
||||
* enforce invariants on *_RESIZE* and *_REDRAW* flags.
|
||||
|
||||
* GtkToolTips: allocate GtkTooltipsData from memchunks
|
||||
|
||||
* Make all widget attributes configurable after the widget is created (timj).
|
||||
|
||||
* Radio buttons need to display CAN/HAS_DEFAULT correctly, if draw_inidicator
|
||||
is TRUE. (Radio buttons do not need to CAN_DEFAULT! OWT)
|
||||
|
||||
* More dialogs: Print, maybe others...
|
||||
|
||||
* make the gtk_main callbacks consistent in their add/remove behaviour.
|
||||
|
||||
* Check return values on all calls to XIC[Get/Set]Values
|
||||
|
||||
* The "--geometry" option should be supported
|
||||
|
||||
- Having gdk_init() parse the geometry option. (putting it into
|
||||
GDK means you can use XParseGeometry() without wrapping it)
|
||||
|
||||
- Add a call gdk_get_geometry() that retrieves the results
|
||||
in a form like that returned by XParseGeometry()
|
||||
|
||||
- The application then can modify the results (as would gemvt)
|
||||
then call a routine gtk_window_set_geometry() on whatever
|
||||
it considers to be its main window.
|
||||
|
||||
- Then in some manner GtkWindow takes that into account when
|
||||
setting its hints. (Probably it uses the size and position
|
||||
as the current uposition and usize, and modulates that
|
||||
be the equivalents of the X flags
|
||||
|
||||
XValue, YValue, WidthValue, HeightValue, XNegative, or YNegative
|
||||
|
||||
( You'd have to extend gdk_window_set_hints to accept the
|
||||
window gravity option to get it right. )
|
||||
|
||||
* Allow moving the separator for paned widgets by dragging
|
||||
it directly instead of using the handle.
|
||||
|
||||
* Check into XAddConnectionWatch - is this needed for XIM?
|
||||
|
||||
* Places where a _full variant is needed:
|
||||
|
||||
gtk_init_add
|
||||
gtk_menu_popup
|
||||
gtk_toolbar_prepend_element
|
||||
gtk_toolbar_insert_element
|
||||
|
||||
* Try to rationally deal with someone else deleting one of our
|
||||
windows??? This would mean keeping track of our window heirarchy
|
||||
ourselves, for one thing, and will never be safe, because of
|
||||
race conditions.
|
||||
|
||||
* Should all the default handlers really return FALSE? This can
|
||||
cause confusing presses to be sent to containers that actually
|
||||
want to get events on themselves.
|
||||
|
||||
* The menu code should skip separators during keyboard navigation,
|
||||
whether they are sensitive or insensitive.
|
||||
|
||||
* OwnerButtonPressGrab needs to go!
|
||||
|
||||
Text/Edit widget:
|
||||
|
||||
Bugs:
|
||||
|
||||
- Really big font (150 pt), plus lots of editing caused segfault
|
||||
|
||||
Improvements:
|
||||
|
||||
- Unify the key binding support in some fashion between the
|
||||
Entry and Text widget widgets, use GtkBindings for this.
|
||||
|
||||
- Figure out a way not to recompute the geometry on insertions/deletions
|
||||
which are large, but not a significant fraction of the
|
||||
entire text. (e.g., compute the changes as when the widget
|
||||
is not frozen, but without the actual scrolling)
|
||||
|
||||
- Prune the line start cache. But since it is only 68 bytes
|
||||
per line, and it is a lot faster when lines are in the cache,
|
||||
it may be better not to, at least for now.
|
||||
|
||||
- Show the non-editable state by changing colors. (Use the
|
||||
style entries for insensitive?)
|
||||
|
||||
- Multibyte support for the Text widget.
|
||||
|
||||
- Unicode support to do the multi-byte right.
|
||||
|
||||
- Support an .inputrc. (The readline one doesn't really work,
|
||||
unless it is extended because it can't represent X keysyms,
|
||||
just terminal type input)
|
||||
|
||||
- A vi mode
|
||||
|
||||
- Word wrap, instead of line folding. (Should the continuation
|
||||
characters be shown?)
|
||||
|
||||
- Horizontal scrolling
|
||||
|
||||
- Disable pasting compound text
|
||||
|
||||
- When showing background pixmap (not editable) actually set
|
||||
the background pixmap as the windows bg pixmap, to improve
|
||||
appearance on exposes. But this would require using another
|
||||
window to get the origins.
|
||||
|
||||
- In word wrap mode, break:
|
||||
|
||||
aaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||||
|
||||
as:
|
||||
| Maximum column
|
||||
aaaaaaaaaaa bbbbbbbbbbb|
|
||||
bbbbbbbbbbbbbbbbbbbbbbb|
|
||||
bbbbbbbbb |
|
||||
|
||||
Instead of:
|
||||
|
|
||||
aaaaaaaaaaa |
|
||||
bbbbbbbbbbbbbbbbbbbbbbb|
|
||||
bbbbbbbbbbbbbbbbbbbb |
|
||||
|
||||
- Blinking cursor
|
||||
|
||||
- API's : gtk_text_clear, gtk_text_delete_lines (gint start, gint end),
|
||||
gtk_text_append/prepend, gtk_text_insert_at (gint row, gint column),
|
||||
some function to get the row/column from the x/y-coordinates of a
|
||||
mouse click, some function to get the word/line under the mouse pointer
|
||||
[ From: Stefan Jeske <jeske@braunschweig.netsurf.de> ]
|
||||
|
||||
- "changed" emitted when doing deletes on empty Text widget.
|
||||
|
||||
- Delete IC in editable->unrealize, not editable->finalize?
|
||||
|
||||
Themes
|
||||
======
|
||||
|
||||
- When a scale gets shown/hidden only queue a redraw on the
|
||||
non-window portion, not the whole area.
|
||||
|
||||
- In various places, to avoid shaping windows excessively,
|
||||
we set parent relative backgrounds. This is an ugly
|
||||
hack and needs a better solution. Plus, I don't think
|
||||
these parent-relative backgrounds always persist to
|
||||
when they are actually needed.
|
||||
|
||||
Such calls exist in: GtkButton, GtkHandeBox, GtkItem,
|
||||
GtkListItem, GtkMenu, GtkMenuItem, GtkMisc,
|
||||
GtkNoteBook, GtkOptionMenu, GtkPaned, GtkPreview,
|
||||
GtkSpinButton and GtkTreeItem.
|
||||
|
||||
- For menus and for GtkWindow's, the realize() function
|
||||
calls paint(), so that background pixmaps can be set
|
||||
ahead of time, and prevent flashing when the window is
|
||||
shown. This is an ugly hack and needs a better solution.
|
||||
|
||||
=======
|
||||
|
||||
Calendar Widget:
|
||||
|
||||
- The widget should be nicely resizeable vertical too.
|
||||
|
||||
- CALENDAR_MARGIN should be removed, uses INNER_BORDER and
|
||||
style->class->[xy]thickness insted.
|
||||
|
||||
- Flag to choose between using standard three letter abbreviated
|
||||
weekday name or just the first character from it. It looks like
|
||||
that is what most other calendar-widgets do.
|
||||
|
||||
- Arrows should resize with the header-font.
|
||||
|
||||
- The keyboard support has to be finished.
|
||||
|
||||
DND
|
||||
===
|
||||
|
||||
- Use a cursor instead of an ICON when over Motif windows,
|
||||
to get rid of the current junk that Motif leaves because
|
||||
of its XCopyArea stupidity for doing highlighting.
|
||||
|
||||
- Add a GTK_DRAG_VERIFY target flag and a "drag_data_verify"
|
||||
signal so that apps can easily check if a, say,
|
||||
text/uri-list URL looks OK during the drop.
|
||||
|
||||
- Check more for memory leaks.
|
||||
|
||||
- Drag and drop for Entry and Text widgets.
|
||||
|
||||
- Send synthetic motion events on structure changes so
|
||||
drag_enter/leave get sent properly. (See the popup
|
||||
in testdnd)
|
||||
739
TODO.xml
Normal file
@@ -0,0 +1,739 @@
|
||||
<!-- This is used to generate the online TODO list for GTK+ using
|
||||
the script docs/make-todo. Whenever a change to this file is
|
||||
committed to CVS,the file is run through make-todo and the online
|
||||
version updated. If you modify this file, you should check for
|
||||
parse errors by running:
|
||||
|
||||
$ docs/make-todo TODO.xml > /dev/null
|
||||
|
||||
before committing, or you may screw up the online version -->
|
||||
<todo logourl="gtk-logo-rgb.gif">
|
||||
<title>GTK+ TODO list</title>
|
||||
<section>
|
||||
<title>GDK</title>
|
||||
|
||||
<entry size="medium" status="90%" target="2.0">
|
||||
<title>Add backing store support</title>
|
||||
<description>
|
||||
<p>
|
||||
GTK+'s drawing model involves clearing to a background, and
|
||||
then drawing widgets on top of this. Without having
|
||||
backing-store support, this results in flickering in various
|
||||
situations. Backing store cannot be added widget-by-widget,
|
||||
because the drawing in a particular window is not confined
|
||||
to a single widget. Instead it needs to be added per GDK
|
||||
window.
|
||||
</p>
|
||||
<p>
|
||||
The way this is done is by having
|
||||
<tt>gdk_window_begin_paint()</tt>
|
||||
and <tt>gdk_window_end_paint()</tt> functions that
|
||||
redirect all drawing to a particular window to an offscreen
|
||||
pixmap, and then copy that offscreen pixmap back onto the
|
||||
screen when the paint operation is done. The implementation
|
||||
of this is mostly complete in the <tt>gtk-no-flicker</tt> branch of
|
||||
GTK+.
|
||||
</p>
|
||||
</description>
|
||||
<url>http://www.gtk.org/~otaylor/gtk/1.4/gdk-drawing.html</url>
|
||||
<contact>Owen Taylor <otaylor@redhat.com></contact>
|
||||
</entry>
|
||||
|
||||
<entry size="medium" status="90%" target="2.0">
|
||||
<title>32 Bit Coordinates</title>
|
||||
<description>
|
||||
<p>
|
||||
GTK+-1.2 and earlier share X's limitation on the
|
||||
size of coordinates and restrict all dimensions
|
||||
to 16 bit quantities. By clever use of X it is
|
||||
possible to lift this restriction and present a
|
||||
full 32-bit space to the user.
|
||||
</p>
|
||||
<p>
|
||||
There are some difficulties with performance in this
|
||||
approach - mostly because scrolling can involve mapping and
|
||||
unmapping lots of widgets, but in general, current
|
||||
trials in this area seem to work pretty well.
|
||||
</p>
|
||||
</description>
|
||||
<url>http://www.gtk.org/~otaylor/gtk/1.4/gdk-drawing.html</url>
|
||||
<contact>Owen Taylor <otaylor@redhat.com></contact>
|
||||
</entry>
|
||||
|
||||
<entry size="small" status="0%" target="2.0">
|
||||
<title>Customizable double-click timeout</title>
|
||||
<description>
|
||||
<p>
|
||||
The current fixed double-click timeout in GTK+
|
||||
is too small for some users. This needs to be
|
||||
customizable
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
<bugs>#3958</bugs>
|
||||
</entry>
|
||||
|
||||
<entry size="small" status="0%" target="2.0">
|
||||
<title>Make color handling more convenient</title>
|
||||
<description>
|
||||
<p>
|
||||
Add some color convenience functions; such as a way to get an
|
||||
allocated GdkColor from GdkRGB, and export functions from gtkstyle.c
|
||||
that lighten/darken a given color, and set a color from HSV in
|
||||
addition to RGB. Also, consider having static variables that contain
|
||||
preallocated common colors (gdk_blue, gdk_red, etc.), the problem
|
||||
being colormap issues.
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="small" status="0%" target="2.0">
|
||||
<title>Cursors</title>
|
||||
<description>
|
||||
<p>
|
||||
Two tasks: 1) move the cursors in the cursor font that people actually
|
||||
care about to the top of the gdkcursor.h header file, and put a nice
|
||||
list of the 15 cursors people actually care about in the docs 2) if
|
||||
the cursor font lacks some commonly-useful cursors (like magnifying
|
||||
glass), add these cursors to gdkcursor.h and then emulate them in
|
||||
gdk_cursor_new by transparently creating the cursor from a bitmap.
|
||||
The list of Qt cursors is worth http://doc.trolltech.com/qcursor.html
|
||||
looking at for this task.
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="medium" status="100%" target="2.0">
|
||||
<title>Make GdkRGB work on any visual</title>
|
||||
<description>
|
||||
<p>
|
||||
GdkRGB should be able to render to an arbitrary visual
|
||||
(i.e. the visual shouldn't be fixed at gdk_rgb_init()
|
||||
time). This will break gdk_rgb_gc_set_foreground() and
|
||||
friends, though.
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
</section> <!-- GDK -->
|
||||
|
||||
<section>
|
||||
<title>Internationalization</title>
|
||||
|
||||
<entry size="big" status="90%" target="2.0">
|
||||
<title>Integrate Pango</title>
|
||||
<description>
|
||||
<p>
|
||||
The purpose of the Pango project is to provide a system for
|
||||
layout and rendering of internationalized text. It handles
|
||||
most of the issues necessary to
|
||||
</p>
|
||||
</description>
|
||||
<url>http://www.pango.org</url>
|
||||
<contact>gtk-i18n-list@redhat.com</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="medium" status="90%" target="2.0">
|
||||
<title>Switch to using UTF-8</title>
|
||||
<description>
|
||||
<p>
|
||||
This is closely related to Pango integration. Pango deals
|
||||
with all strings in terms of UTF-8; by switching GTK+ over
|
||||
to UTF-8 we make it considerably simpler for developers to
|
||||
support multiple languages properly while still retaining
|
||||
a large degree of compatibility with existing programs.
|
||||
</p>
|
||||
<p>
|
||||
Some work has already been done on this as part of the Win32
|
||||
port, since the Win32 port is currently using UTF-8 for all
|
||||
strings. In general, this should be an easy job; the hardest
|
||||
parts are places like GtkFileSelection, cut and paste, and
|
||||
input method support where there is interaction between GTK+
|
||||
and the operating system.
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-i18n-list@redhat.com</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="big" status="60%" target="2.0">
|
||||
<title>Rewrite Input Method Support</title>
|
||||
<description>
|
||||
<p>
|
||||
Support for Input Methods is GTK+-1.2 is done via XIM, with
|
||||
supported styles being over-the-spot and the root-window
|
||||
styles. However, the over-the-spot style is not going to
|
||||
work well with the Pango integration, since it relies on the
|
||||
text rendering in the program being done in the standard
|
||||
Xlib style, so it will be necessary to also support
|
||||
on-the-spot input. On-the-spot input is done by supplying a
|
||||
set of callbacks that are invoked by the input methods.
|
||||
</p>
|
||||
<p>
|
||||
GTK+-2.0 will have a new system with loadable input method
|
||||
modules. These modules can either be implemented using XIM,
|
||||
or written from scratch.
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-i18n-list@redhat.com</contact>
|
||||
</entry>
|
||||
</section> <!-- i18n -->
|
||||
|
||||
<section>
|
||||
<title>GTK+ Core</title>
|
||||
|
||||
<entry size="big" status="60%" target="2.0">
|
||||
<title>GLib based object and type system</title>
|
||||
<description>
|
||||
<p>
|
||||
The GTK+ object system is already in use in quite a few different
|
||||
non-GUI applications; it would be desirable for these uses
|
||||
to have the object and type systems separated from the GUI portions
|
||||
of GTK+ and be generalized for non-GUI usage.
|
||||
</p>
|
||||
</description>
|
||||
<contact>Tim Janik <timj@gtk.org></contact>
|
||||
</entry>
|
||||
|
||||
<entry size="big" status="1%" target="2.0">
|
||||
<title>Overall callback improvements</title>
|
||||
<description>
|
||||
<p>
|
||||
The GTK+ type and signal systems need significant improvements to
|
||||
allow signal creation with default handlers from language bindings
|
||||
and to aid language bindings in deriving new objects.
|
||||
One aspect of this is the Closure support, recently suggested by
|
||||
Karl Nelson <kenelson@ece.ucdavis.edu>, but this also
|
||||
requires a GLib based type and parameter system (ties in with
|
||||
"GLib based object and type system").
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="big" status="0%" target="2.0">
|
||||
<title>State change notification</title>
|
||||
<description>
|
||||
<p>
|
||||
GTK+ objects emit various types of signals, some to perform
|
||||
arbitrary actions, some to allow customization from user code,
|
||||
and some signals are emitted to notify of certain changes
|
||||
of an object. For the latter, what really is required is a
|
||||
gneneric signal that can be used to monitor *any* kind of object
|
||||
changes. For that, all object changes need to be routed through
|
||||
a central point (otherwise the signal emissions are spread all
|
||||
over the object implementation), i.e. an object argument setter.
|
||||
The state change notification signal doesn't need to be emitted
|
||||
syncronously, in fact, it's probably most effective to always
|
||||
emit this asynchronously, so subsequent changes are accumulated.
|
||||
</p>
|
||||
</description>
|
||||
<contact>Tim Janik <timj@gtk.org></contact>
|
||||
</entry>
|
||||
|
||||
<entry size="big" status="5%" target="2.0">
|
||||
<title>Widget as sensitivity/grab state machine</title>
|
||||
<description>
|
||||
<p>
|
||||
Maintenance of pointer and keybnoard grabs is currently very
|
||||
tedious and error-prone, most widget's cook up their own stuff
|
||||
in this regard.
|
||||
By moving the general concept of "Grabs" to the GTK+ level as
|
||||
a widget state, and providing a new signal for alterations of
|
||||
a widget's state ("visible", "visible+insensitive",
|
||||
"visible+grab", "hidden", "hidden+insensitive", etc.), things
|
||||
can be unified and more stabelize. A couple of bugs, such as
|
||||
insensitive widgets still holding a grab, or buttons that
|
||||
still think they are depressed when hidden, will be squeezed
|
||||
automatically with that.
|
||||
</p>
|
||||
</description>
|
||||
<contact>Tim Janik <timj@gtk.org></contact>
|
||||
</entry>
|
||||
|
||||
<entry size="big" status="0%" target="2.0">
|
||||
<title>Allow argument customization</title>
|
||||
<description>
|
||||
<p>
|
||||
Many types of object arguments (expander style in the CList,
|
||||
default padding in button boxes, etc), conceptually go with
|
||||
the theme, or as user preferences; they should not be set by
|
||||
a particular program.
|
||||
</p>
|
||||
<p>
|
||||
There needs to be a mechanism for themes to be able to
|
||||
control these arguments from the RC file.
|
||||
</p>
|
||||
</description>
|
||||
</entry>
|
||||
|
||||
<entry size="medium" status="0%" target="2.0">
|
||||
<title>Allow global customization</title>
|
||||
<description>
|
||||
<p>
|
||||
There are a number of global parameters in GTK+ and GDK that should be
|
||||
customizable by the user, such as the double-click timeout,
|
||||
or whether widgets should be backing-stored by default.
|
||||
</p>
|
||||
<p>
|
||||
If we had argument customization from an RC file, it might
|
||||
be possible to do this simply with a global object with
|
||||
arguments for the various global parameters that was
|
||||
customized in the same fashion as object arguments.
|
||||
</p>
|
||||
</description>
|
||||
</entry>
|
||||
|
||||
<entry size="small" status="0%" target="2.0">
|
||||
<title>Gtk+ Modules installation directory</title>
|
||||
<description>
|
||||
<p>
|
||||
Gtk+ needs to support an extra lib/ directory, to search
|
||||
for dynamically loadable modules, it also needs to support
|
||||
an environment variable to specify module search paths.
|
||||
This has quite some cross-platform issues with the GModule
|
||||
code (especially on AIX).
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
|
||||
<entry size="small" status="20%" target="2.0">
|
||||
<title>Convenient widget setup</title>
|
||||
<description>
|
||||
<p>
|
||||
Make it simpler to set all the basic attributes of a widget. Might
|
||||
want set_tooltip(), set_accel(), set_color(FOREGROUND, color),
|
||||
set_min_size() (usize does this, but needs a rename), set_whatsthis(),
|
||||
etc. set_accel() may not work for all widgets, may need a convenience
|
||||
API for button and label accelerators specifically.
|
||||
</p>
|
||||
<p>
|
||||
The idea is that it should be easy, out of the box, to set up a widget
|
||||
with all the nice touches and features the widget really should
|
||||
have. Users shouldn't need to do their own convenience functions for
|
||||
this.
|
||||
</p>
|
||||
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="medium" status="0%" target="> 2.0">
|
||||
<title>Make selections/clipboard more convenient</title>
|
||||
<description>
|
||||
<p>
|
||||
Make GtkSelectionData more like the MIME blobs in Swing and Qt.
|
||||
Consider a GtkClipboard object to simplify cut-and-paste handling.
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
|
||||
<entry size="small" status="80%" target="2.0">
|
||||
<title>Stock label/icon system</title>
|
||||
<description>
|
||||
<p>
|
||||
A system like GnomeStock for getting a standard labels/icons
|
||||
for menus and toolbars. Should be extensible by themes, and
|
||||
by libgnomeui. Some work already done on this.
|
||||
</p>
|
||||
</description>
|
||||
<contact>hp@redhat.com</contact>
|
||||
</entry>
|
||||
|
||||
|
||||
<entry size="big" status="0%" target="> 2.0">
|
||||
<title>Session Management</title>
|
||||
<description>
|
||||
<p>
|
||||
Look in to session management. Consider whether to use
|
||||
X11R6 SM, or some custom spec shared with KDE. Create
|
||||
GTK+ API for this.
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="big" status="0%" target="> 2.0">
|
||||
<title>Online help enhancements</title>
|
||||
<description>
|
||||
<p>
|
||||
Look at a small "What's This" popup widget,
|
||||
and a What's This system in general (this part
|
||||
could maybe be done for 2.0). A more difficult, probably
|
||||
a post-2.0 task, is to integrate a very simple little
|
||||
help browser gizmo into GTK.
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
|
||||
<entry size="medium" status="0%" target="2.0">
|
||||
<title>GUI-editable means of user configuration</title>
|
||||
<description>
|
||||
<p>
|
||||
Need to be able to set double click time, whether cursors
|
||||
blink, etc., from a control panel type of deal.
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
</section> <!-- Core -->
|
||||
|
||||
<section>
|
||||
<title>GTK+ Widgets</title>
|
||||
|
||||
<entry size="small" status="100%" target="2.0">
|
||||
<title>Make GtkFrame use a label</title>
|
||||
<description>
|
||||
<p>
|
||||
The title of a frame should simply be another child widget
|
||||
which, by default, holds a label widget. This will important
|
||||
with Pango where proper text behavior will be more complex to
|
||||
implement, but is also useful for certain user-interface
|
||||
designs. (It can be useful, for example, to put a checkbutton
|
||||
in that slot.)
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="big" status="90%" target="2.0">
|
||||
<title>Replace GtkText Widget</title>
|
||||
<description>
|
||||
<p>
|
||||
The GtkText widget is badly in need of replacement, since it
|
||||
is buggy and insufficiently feature rich. This is being done
|
||||
using Havoc Pennington's port of the Tk Text widget.
|
||||
</p>
|
||||
<p>
|
||||
As part of this job <a href="http://www.pango.org">Pango</a>
|
||||
support is being added to the replacement. The structure of
|
||||
the Tk text widget port is suited to this as it works
|
||||
paragraph-by-paragraph, and Pango works at a sub-paragraph
|
||||
scale. The main remaining tasks here are to implement
|
||||
incremental reflow to make performance acceptable and to
|
||||
implement embedded pixmaps and widgets.
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="small" status="20%" target="2.0">
|
||||
<title>Improve Radio/Checkbutton Look</title>
|
||||
<description>
|
||||
<p>
|
||||
The default look for the radio and checkbuttons is both
|
||||
unattractive and not friendly to the user . Motif did not
|
||||
get this one right, and we should not keep on following the
|
||||
Motif look. The right thing here is probably to copy the
|
||||
Windows appearance for these controls fairly closely. This
|
||||
will fit in with well with the rest of the GTK+ look.
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="small" status="99%" target="2.0">
|
||||
<title>Improve Submenu Navigation</title>
|
||||
<description>
|
||||
<p>
|
||||
Navigating through a deep menu tree in GTK+ is currently
|
||||
quite tricky, because as soon as one leaves a menu item,
|
||||
the submenu disappears. The way that the Macintosh is
|
||||
reputed to handle this is that to pop down the current
|
||||
submenu, you have to leave the triangle defined by the
|
||||
upper left hand corner of the menu item and right
|
||||
side of the submenu.
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="small" status="0%" target="2.0 ?">
|
||||
<title>Improve Spinbutton Look</title>
|
||||
<description>
|
||||
<p>
|
||||
Spinbuttons currently appear to have lumpy boundaries,
|
||||
because sides of the arrows aren't at an angle that
|
||||
meshes well with the pixel grid. However, fixing this
|
||||
would require making the spinbuttons narrower and
|
||||
harder to hit. This points out a general problem with
|
||||
the spinbutton (and the arrows on the scrollbars) - the
|
||||
target area for clicks actually the bounding box of the
|
||||
arrows, but the user thinks that they must click on the
|
||||
arrows themselves. It would probably be more friendly
|
||||
to use a square button with an arrow drawn on top instead
|
||||
of a arrow-shaped button, the approach taken by most other
|
||||
windowing systems.
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="big" status="90%" target="2.0">
|
||||
<title>Supply horizontable/vertical wrapping boxes</title>
|
||||
<description>
|
||||
<p>
|
||||
An often requested feature are wrapping containers, at this
|
||||
point, gimp's development version already uses such widgets:
|
||||
horizontable/vertical wrap boxes, that need to go into 2.0
|
||||
proper at some point.
|
||||
</p>
|
||||
</description>
|
||||
<contact>Tim Janik <timj@gtk.org></contact>
|
||||
</entry>
|
||||
|
||||
<entry size="medium" status="90%" target="2.0">
|
||||
<title>Improved generic combo support</title>
|
||||
<description>
|
||||
<p>
|
||||
Gtk+'s combo box has several drawbacks in design and
|
||||
implementation. An new attempt at providing the combo box
|
||||
functionality with improved flexibility has been made with
|
||||
the GtkClueHunter widget, sitting in the CVS module "gle".
|
||||
</p>
|
||||
</description>
|
||||
<contact>Tim Janik <timj@gtk.org></contact>
|
||||
</entry>
|
||||
|
||||
<entry size="big" status="40%" target="2.0?">
|
||||
<title>Add unified set of List/Tree/Grid widgets</title>
|
||||
<description>
|
||||
<p>
|
||||
Currently, GTK+ has a large number of list and tree widgets
|
||||
(GtkList, GtkTree, GtkCList, GtkCTree), none of which are
|
||||
ideal. The GtkList and GtkTree widgets perform badly on large
|
||||
number of items. (GtkTree widget is also quite buggy.) GtkCList
|
||||
and GtkCTree mostly solve the size problem, but are quite
|
||||
complex and, despite that, not very flexible. They are limited to
|
||||
displaying pixmaps and text, and can neither support arbitrary
|
||||
widgets nor custom drawing functions.
|
||||
</p>
|
||||
<p>
|
||||
In addition to list and tree widgets, a closely related need
|
||||
is a sheet widget that displays a (possibly editable) 2-D grid.
|
||||
It would be desirable to have a complete set of widgets that
|
||||
could be presented as the one-true-solution for these needs.
|
||||
Model/View techniques could be used effectively to increase
|
||||
both the simplicity and power of the interfaces.
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="small" status="0%" target="2.0">
|
||||
<title>GtkImage</title>
|
||||
<description>
|
||||
<p>
|
||||
gdk-pixbuf is moving to become a GTK+ dependency, a new image-display
|
||||
widget is thus needed.
|
||||
</p>
|
||||
</description>
|
||||
<contact>hp@redhat.com</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="small" status="0%" target="2.0">
|
||||
<title>Attempt to fix GtkStatusbar</title>
|
||||
<description>
|
||||
<p>
|
||||
GtkStatusbar is too inconvenient to use.
|
||||
The only non-breakage-inducing fix we could
|
||||
come up with is to permit 0 as a context ID, so you
|
||||
don't have to use gtk_statusbar_get_context_id().
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="small" status="95%" target="2.0">
|
||||
<title>Decruft GtkProgress, GtkProgressbar</title>
|
||||
<description>
|
||||
<p>UPDATE: this is done, just need to apply the patch.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
This interface is just a disaster of overcomplexity;
|
||||
it should pretty much just be set_percentage(),
|
||||
pulse() (to move during activity mode), and set_text().
|
||||
There's no reason that there are two objects, should
|
||||
just be one interface. Almost all the functions
|
||||
that currently exist should be deprecated.
|
||||
</p>
|
||||
</description>
|
||||
<contact>hp@redhat.com</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="small" status="0%" target="2.0">
|
||||
<title>Entry validation hooks</title>
|
||||
<description>
|
||||
<p>
|
||||
Simple hooks for validation in a GtkEntry. Pretty much just a
|
||||
"validate" callback which takes a string (current entry contents) and
|
||||
returns either VALID, INVALID, or COULDBEVALID. Then the
|
||||
GtkEntry calls this function if it's set, and does the appropriate
|
||||
UI things. GTK should come with validators for int and float,
|
||||
see GtkSpinButton where these are already implemented.
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="big" status="0%" target="> 2.0">
|
||||
<title>pseudo-MDI Widget</title>
|
||||
<description>
|
||||
<p>
|
||||
Add a widget that lets you rearrange various views (similar to many
|
||||
IDEs, like Visual SlickEdit or JBuilder). Basically there should be a
|
||||
central slot and 4 slots around the sides; each slot holds one or more
|
||||
views. If two views are dropped in the same slot, then a notebook is
|
||||
created displaying both views. If a view is dropped outside the
|
||||
application window, it becomes a standalone window. It should be
|
||||
possible to restrict whether a view can be dropped on the sides,
|
||||
horizontal/vertical sides only, in the central content area, or in
|
||||
any of those places.
|
||||
</p>
|
||||
<p>
|
||||
(Havoc has a proposed interface for this, mail hp@redhat.com)
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="medium" status="0%" target="> 2.0">
|
||||
<title>Icon List Widget</title>
|
||||
<description>
|
||||
<p>
|
||||
A simple icon list widget, suitable for creating a file selector or
|
||||
the like.
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="medium" status="0%" target="> 2.0">
|
||||
<title>Dock widget</title>
|
||||
<description>
|
||||
<p>
|
||||
Add a widget like GnomeDock (perhaps based on GnomeDock)
|
||||
that allows people to put rearrangeable toolbars, menubars, etc.
|
||||
around a central content area. The widget should have hooks for
|
||||
saving the current positions of the various docked bars.
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="big" status="0%" target="> 2.0">
|
||||
<title>Canvas widget</title>
|
||||
<description>
|
||||
<p>
|
||||
Figure out how to get GnomeCanvas or a derived work into GTK+ itself.
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="medium" status="57%" target="2.0">
|
||||
<title>Menu scroll</title>
|
||||
<description>
|
||||
<p>
|
||||
When menus are bigger than the screen, allow scrolling
|
||||
as on the Mac.
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="medium" status="20%" target="2.0">
|
||||
<title>Toolbar/menubar wrap</title>
|
||||
<description>
|
||||
<p>
|
||||
When toolbars and menubars are too wide, do some sort of
|
||||
wrapping or drop-down deal. (See Windows/Mac apps for examples.)
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="small" status="0%" target="2.0">
|
||||
<title>Blink cursor in GtkEntry</title>
|
||||
<description>
|
||||
<p>
|
||||
Make the cursor optionally blink in GtkEntry. Beware, the entry code
|
||||
is somewhat in flux; mail Owen and ask.
|
||||
</p>
|
||||
</description>
|
||||
<contact>otaylor@redhat.com</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="small" status="100%" target="2.0">
|
||||
<title>Don't highlight first menu item when menus come up</title>
|
||||
<description>
|
||||
<p>
|
||||
Keep GtkMenu from prelighting the first menu item.
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="small" status="100%" target="2.0">
|
||||
<title>Integrate new color selector</title>
|
||||
<description>
|
||||
<p>
|
||||
There's a new color selector in CVS (module gnome-colorsel),
|
||||
it needs to be folded in to GTK and any remaining issues resolved.
|
||||
(This new selector is API-compatible with the old one, and
|
||||
still called GtkColorSelector).
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="medium" status="70%" target="2.0">
|
||||
<title>Write new font selector</title>
|
||||
<description>
|
||||
<p>
|
||||
Pango introduces a new font handling system,
|
||||
replacing the XLFD system. Need a font selector for this.
|
||||
The XLFD selector should probably remain, for apps where
|
||||
it makes sense (like gnome-terminal probably).
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="small" status="0%" target="2.0">
|
||||
<title>Stack Widget</title>
|
||||
<description>
|
||||
<p>
|
||||
Jonathan has a widget like a tabless/frameless notebook, used for
|
||||
something like the GNOME control center where you want to toggle which
|
||||
widget is visible to the user. Needs to be cleaned up and considered
|
||||
for GTK.
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org, jrb@redhat.com</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="small" status="0%" target="2.0">
|
||||
<title>Clean up GtkNotebook</title>
|
||||
<description>
|
||||
<p>
|
||||
GtkNotebook currently breaks GTK invariants about
|
||||
mapping/visibility/etc., needs fixing.
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
</section> <!-- GTK+ -->
|
||||
</todo>
|
||||
|
||||
83
acconfig.h
Normal file
@@ -0,0 +1,83 @@
|
||||
/* acconfig.h
|
||||
This file is in the public domain.
|
||||
|
||||
Descriptive text for the C preprocessor macros that
|
||||
the distributed Autoconf macros can define.
|
||||
No software package will use all of them; autoheader copies the ones
|
||||
your configure.in uses into your configuration header file templates.
|
||||
|
||||
The entries are in sort -df order: alphabetical, case insensitive,
|
||||
ignoring punctuation (such as underscores). Although this order
|
||||
can split up related entries, it makes it easier to check whether
|
||||
a given entry is in the file.
|
||||
|
||||
Leave the following blank line there!! Autoheader needs it. */
|
||||
|
||||
|
||||
/* Other stuff */
|
||||
#undef ENABLE_NLS
|
||||
#undef GTK_COMPILED_WITH_DEBUGGING
|
||||
|
||||
#undef HAVE_CATGETS
|
||||
#undef HAVE_DIMM_H
|
||||
#undef HAVE_GETTEXT
|
||||
#undef HAVE_IPC_H
|
||||
#undef HAVE_LC_MESSAGES
|
||||
#undef HAVE_PROGRESSIVE_JPEG
|
||||
#undef HAVE_PWD_H
|
||||
#undef HAVE_SHM_H
|
||||
#undef HAVE_STPCPY
|
||||
#undef HAVE_XSHM_H
|
||||
#undef HAVE_SHAPE_EXT
|
||||
#undef HAVE_SYS_SELECT_H
|
||||
#undef HAVE_SYS_TIME_H
|
||||
#undef HAVE_WINSOCK_H
|
||||
#undef HAVE_WINTAB
|
||||
#undef HAVE_XCONVERTCASE
|
||||
#undef HAVE_XFT
|
||||
|
||||
#undef HAVE_SIGSETJMP
|
||||
|
||||
#undef NO_FD_SET
|
||||
|
||||
#undef RESOURCE_BASE
|
||||
|
||||
#undef USE_GMODULE
|
||||
#undef USE_MMX
|
||||
|
||||
/* Define to use X11R6 additions to XIM */
|
||||
#undef USE_X11R6_XIM
|
||||
|
||||
/* Define to use XKB extension */
|
||||
#undef HAVE_XKB
|
||||
|
||||
/* Define to use shadowfb in the linux-fb port */
|
||||
#undef ENABLE_SHADOW_FB
|
||||
|
||||
/* Define to use a fb manager in the linux-fb port */
|
||||
#undef ENABLE_FB_MANAGER
|
||||
|
||||
#undef XINPUT_NONE
|
||||
#undef XINPUT_GXI
|
||||
#undef XINPUT_XFREE
|
||||
|
||||
/* Define as the return type of signal handlers (int or void). */
|
||||
#undef RETSIGTYPE
|
||||
|
||||
/* Most machines will be happy with int or void. IRIX requires '...' */
|
||||
#undef SIGNAL_ARG_TYPE
|
||||
|
||||
#undef HAS_SOLARIS_XINERAMA
|
||||
#undef HAS_XFREE_XINERAMA
|
||||
#undef HAS_XINERAMA
|
||||
|
||||
#undef GETTEXT_PACKAGE
|
||||
|
||||
/* #undef PACKAGE */
|
||||
/* #undef VERSION */
|
||||
|
||||
|
||||
/* Leave that blank line there!! Autoheader needs it.
|
||||
If you're adding to this file, keep in mind:
|
||||
The entries are in sort -df order: alphabetical, case insensitive,
|
||||
ignoring punctuation (such as underscores). */
|
||||
351
acinclude.m4
Normal file
@@ -0,0 +1,351 @@
|
||||
# autoconf 2.13 / 2.50 compatibility macro
|
||||
|
||||
# GLIB_AC_DIVERT_BEFORE_HELP(STUFF)
|
||||
# ---------------------------------
|
||||
# Put STUFF early enough so that they are available for $ac_help expansion.
|
||||
# Handle both classic (<= v2.13) and modern autoconf
|
||||
AC_DEFUN([GLIB_AC_DIVERT_BEFORE_HELP],
|
||||
[ifdef([m4_divert_text], [m4_divert_text([NOTICE],[$1])],
|
||||
[ifdef([AC_DIVERT], [AC_DIVERT([NOTICE],[$1])],
|
||||
[AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
|
||||
$1
|
||||
AC_DIVERT_POP()])])])
|
||||
|
||||
|
||||
# Macro to add for using GNU gettext.
|
||||
# Ulrich Drepper <drepper@cygnus.com>, 1995.
|
||||
#
|
||||
# Modified to never use included libintl.
|
||||
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
|
||||
#
|
||||
#
|
||||
# This file can be copied and used freely without restrictions. It can
|
||||
# be used in projects which are not available under the GNU Public License
|
||||
# but which still want to provide support for the GNU gettext functionality.
|
||||
# Please note that the actual code is *not* freely available.
|
||||
|
||||
# serial 5
|
||||
|
||||
AC_DEFUN(AM_GTK_WITH_NLS,
|
||||
[AC_MSG_CHECKING([whether NLS is requested])
|
||||
dnl Default is enabled NLS
|
||||
AC_ARG_ENABLE(nls,
|
||||
[ --disable-nls do not use Native Language Support],
|
||||
USE_NLS=$enableval, USE_NLS=yes)
|
||||
AC_MSG_RESULT($USE_NLS)
|
||||
AC_SUBST(USE_NLS)
|
||||
|
||||
USE_INCLUDED_LIBINTL=no
|
||||
|
||||
dnl If we use NLS figure out what method
|
||||
if test "$USE_NLS" = "yes"; then
|
||||
# AC_DEFINE(ENABLE_NLS)
|
||||
# AC_MSG_CHECKING([whether included gettext is requested])
|
||||
# AC_ARG_WITH(included-gettext,
|
||||
# [ --with-included-gettext use the GNU gettext library included here],
|
||||
# nls_cv_force_use_gnu_gettext=$withval,
|
||||
# nls_cv_force_use_gnu_gettext=no)
|
||||
# AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
|
||||
nls_cv_force_use_gnu_gettext="no"
|
||||
|
||||
nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
|
||||
if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
|
||||
dnl User does not insist on using GNU NLS library. Figure out what
|
||||
dnl to use. If gettext or catgets are available (in this order) we
|
||||
dnl use this. Else we have to fall back to GNU NLS library.
|
||||
dnl catgets is only used if permitted by option --with-catgets.
|
||||
nls_cv_header_intl=
|
||||
nls_cv_header_libgt=
|
||||
CATOBJEXT=NONE
|
||||
|
||||
AC_CHECK_HEADER(libintl.h,
|
||||
[AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
|
||||
[AC_TRY_LINK([#include <libintl.h>], [return (int) dgettext ("","")],
|
||||
gt_cv_func_dgettext_libc=yes, gt_cv_func_dgettext_libc=no)])
|
||||
|
||||
if test "$gt_cv_func_dgettext_libc" != "yes"; then
|
||||
AC_CHECK_LIB(intl, bindtextdomain,
|
||||
[AC_CACHE_CHECK([for dgettext in libintl],
|
||||
gt_cv_func_dgettext_libintl,
|
||||
[AC_CHECK_LIB(intl, dgettext,
|
||||
gt_cv_func_dgettext_libintl=yes,
|
||||
gt_cv_func_dgettext_libintl=no)],
|
||||
gt_cv_func_dgettext_libintl=no)])
|
||||
fi
|
||||
|
||||
if test "$gt_cv_func_dgettext_libintl" = "yes"; then
|
||||
LIBS="$LIBS -lintl";
|
||||
fi
|
||||
|
||||
if test "$gt_cv_func_dgettext_libc" = "yes" \
|
||||
|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
|
||||
AC_DEFINE(HAVE_GETTEXT)
|
||||
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
|
||||
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
|
||||
if test "$MSGFMT" != "no"; then
|
||||
AC_CHECK_FUNCS(dcgettext)
|
||||
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
|
||||
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
|
||||
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
|
||||
AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
|
||||
return _nl_msg_cat_cntr],
|
||||
[CATOBJEXT=.gmo
|
||||
DATADIRNAME=share],
|
||||
[CATOBJEXT=.mo
|
||||
DATADIRNAME=lib])
|
||||
INSTOBJEXT=.mo
|
||||
fi
|
||||
fi
|
||||
|
||||
# Added by Martin Baulig 12/15/98 for libc5 systems
|
||||
if test "$gt_cv_func_dgettext_libc" != "yes" \
|
||||
&& test "$gt_cv_func_dgettext_libintl" = "yes"; then
|
||||
INTLLIBS=-lintl
|
||||
LIBS=`echo $LIBS | sed -e 's/-lintl//'`
|
||||
fi
|
||||
])
|
||||
|
||||
if test "$CATOBJEXT" = "NONE"; then
|
||||
AC_MSG_CHECKING([whether catgets can be used])
|
||||
AC_ARG_WITH(catgets,
|
||||
[ --with-catgets use catgets functions if available],
|
||||
nls_cv_use_catgets=$withval, nls_cv_use_catgets=no)
|
||||
AC_MSG_RESULT($nls_cv_use_catgets)
|
||||
|
||||
if test "$nls_cv_use_catgets" = "yes"; then
|
||||
dnl No gettext in C library. Try catgets next.
|
||||
AC_CHECK_LIB(i, main)
|
||||
AC_CHECK_FUNC(catgets,
|
||||
[AC_DEFINE(HAVE_CATGETS)
|
||||
INTLOBJS="\$(CATOBJS)"
|
||||
AC_PATH_PROG(GENCAT, gencat, no)dnl
|
||||
# if test "$GENCAT" != "no"; then
|
||||
# AC_PATH_PROG(GMSGFMT, gmsgfmt, no)
|
||||
# if test "$GMSGFMT" = "no"; then
|
||||
# AM_PATH_PROG_WITH_TEST(GMSGFMT, msgfmt,
|
||||
# [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)
|
||||
# fi
|
||||
# AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
|
||||
# [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
|
||||
# USE_INCLUDED_LIBINTL=yes
|
||||
# CATOBJEXT=.cat
|
||||
# INSTOBJEXT=.cat
|
||||
# DATADIRNAME=lib
|
||||
# INTLDEPS='$(top_builddir)/intl/libintl.a'
|
||||
# INTLLIBS=$INTLDEPS
|
||||
# LIBS=`echo $LIBS | sed -e 's/-lintl//'`
|
||||
# nls_cv_header_intl=intl/libintl.h
|
||||
# nls_cv_header_libgt=intl/libgettext.h
|
||||
# fi
|
||||
])
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$CATOBJEXT" = "NONE"; then
|
||||
dnl Neither gettext nor catgets in included in the C library.
|
||||
dnl Fall back on GNU gettext library.
|
||||
nls_cv_use_gnu_gettext=yes
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$nls_cv_use_gnu_gettext" != "yes"; then
|
||||
AC_DEFINE(ENABLE_NLS)
|
||||
else
|
||||
# Unset this variable since we use the non-zero value as a flag.
|
||||
CATOBJEXT=
|
||||
# dnl Mark actions used to generate GNU NLS library.
|
||||
# INTLOBJS="\$(GETTOBJS)"
|
||||
# AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
|
||||
# [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt)
|
||||
# AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
|
||||
# AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
|
||||
# [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
|
||||
# AC_SUBST(MSGFMT)
|
||||
# USE_INCLUDED_LIBINTL=yes
|
||||
# CATOBJEXT=.gmo
|
||||
# INSTOBJEXT=.mo
|
||||
# DATADIRNAME=share
|
||||
# INTLDEPS='$(top_builddir)/intl/libintl.a'
|
||||
# INTLLIBS=$INTLDEPS
|
||||
# LIBS=`echo $LIBS | sed -e 's/-lintl//'`
|
||||
# nls_cv_header_intl=intl/libintl.h
|
||||
# nls_cv_header_libgt=intl/libgettext.h
|
||||
fi
|
||||
|
||||
dnl Test whether we really found GNU xgettext.
|
||||
if test "$XGETTEXT" != ":"; then
|
||||
dnl If it is no GNU xgettext we define it as : so that the
|
||||
dnl Makefiles still can work.
|
||||
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
|
||||
: ;
|
||||
else
|
||||
AC_MSG_RESULT(
|
||||
[found xgettext program is not GNU xgettext; ignore it])
|
||||
XGETTEXT=":"
|
||||
fi
|
||||
fi
|
||||
|
||||
# We need to process the po/ directory.
|
||||
POSUB=po
|
||||
else
|
||||
DATADIRNAME=share
|
||||
nls_cv_header_intl=intl/libintl.h
|
||||
nls_cv_header_libgt=intl/libgettext.h
|
||||
fi
|
||||
AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
|
||||
AC_OUTPUT_COMMANDS(
|
||||
[case "$CONFIG_FILES" in *po/Makefile.in*)
|
||||
sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
|
||||
esac])
|
||||
|
||||
|
||||
# # If this is used in GNU gettext we have to set USE_NLS to `yes'
|
||||
# # because some of the sources are only built for this goal.
|
||||
# if test "$PACKAGE" = gettext; then
|
||||
# USE_NLS=yes
|
||||
# USE_INCLUDED_LIBINTL=yes
|
||||
# fi
|
||||
|
||||
dnl These rules are solely for the distribution goal. While doing this
|
||||
dnl we only have to keep exactly one list of the available catalogs
|
||||
dnl in configure.in.
|
||||
for lang in $ALL_LINGUAS; do
|
||||
GMOFILES="$GMOFILES $lang.gmo"
|
||||
POFILES="$POFILES $lang.po"
|
||||
done
|
||||
|
||||
dnl Make all variables we use known to autoconf.
|
||||
AC_SUBST(USE_INCLUDED_LIBINTL)
|
||||
AC_SUBST(CATALOGS)
|
||||
AC_SUBST(CATOBJEXT)
|
||||
AC_SUBST(DATADIRNAME)
|
||||
AC_SUBST(GMOFILES)
|
||||
AC_SUBST(INSTOBJEXT)
|
||||
AC_SUBST(INTLDEPS)
|
||||
AC_SUBST(INTLLIBS)
|
||||
AC_SUBST(INTLOBJS)
|
||||
AC_SUBST(POFILES)
|
||||
AC_SUBST(POSUB)
|
||||
])
|
||||
|
||||
AC_DEFUN(AM_GTK_GNU_GETTEXT,
|
||||
[AC_REQUIRE([AC_PROG_MAKE_SET])dnl
|
||||
AC_REQUIRE([AC_PROG_CC])dnl
|
||||
AC_REQUIRE([AC_PROG_RANLIB])dnl
|
||||
AC_REQUIRE([AC_ISC_POSIX])dnl
|
||||
AC_REQUIRE([AC_HEADER_STDC])dnl
|
||||
AC_REQUIRE([AC_C_CONST])dnl
|
||||
AC_REQUIRE([AC_C_INLINE])dnl
|
||||
AC_REQUIRE([AC_TYPE_OFF_T])dnl
|
||||
AC_REQUIRE([AC_TYPE_SIZE_T])dnl
|
||||
AC_REQUIRE([AC_FUNC_ALLOCA])dnl
|
||||
AC_REQUIRE([AC_FUNC_MMAP])dnl
|
||||
|
||||
AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \
|
||||
unistd.h sys/param.h])
|
||||
AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
|
||||
strdup __argz_count __argz_stringify __argz_next])
|
||||
|
||||
if test "${ac_cv_func_stpcpy+set}" != "set"; then
|
||||
AC_CHECK_FUNCS(stpcpy)
|
||||
fi
|
||||
if test "${ac_cv_func_stpcpy}" = "yes"; then
|
||||
AC_DEFINE(HAVE_STPCPY)
|
||||
fi
|
||||
|
||||
AM_LC_MESSAGES
|
||||
AM_GTK_WITH_NLS
|
||||
|
||||
if test "x$CATOBJEXT" != "x"; then
|
||||
if test "x$ALL_LINGUAS" = "x"; then
|
||||
LINGUAS=
|
||||
else
|
||||
AC_MSG_CHECKING(for catalogs to be installed)
|
||||
NEW_LINGUAS=
|
||||
for lang in ${LINGUAS=$ALL_LINGUAS}; do
|
||||
case "$ALL_LINGUAS" in
|
||||
*$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
|
||||
esac
|
||||
done
|
||||
LINGUAS=$NEW_LINGUAS
|
||||
AC_MSG_RESULT($LINGUAS)
|
||||
fi
|
||||
|
||||
dnl Construct list of names of catalog files to be constructed.
|
||||
if test -n "$LINGUAS"; then
|
||||
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl The reference to <locale.h> in the installed <libintl.h> file
|
||||
dnl must be resolved because we cannot expect the users of this
|
||||
dnl to define HAVE_LOCALE_H.
|
||||
if test $ac_cv_header_locale_h = yes; then
|
||||
INCLUDE_LOCALE_H="#include <locale.h>"
|
||||
else
|
||||
INCLUDE_LOCALE_H="\
|
||||
/* The system does not provide the header <locale.h>. Take care yourself. */"
|
||||
fi
|
||||
AC_SUBST(INCLUDE_LOCALE_H)
|
||||
|
||||
dnl Determine which catalog format we have (if any is needed)
|
||||
dnl For now we know about two different formats:
|
||||
dnl Linux libc-5 and the normal X/Open format
|
||||
test -d intl || mkdir intl
|
||||
if test "$CATOBJEXT" = ".cat"; then
|
||||
AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen)
|
||||
|
||||
dnl Transform the SED scripts while copying because some dumb SEDs
|
||||
dnl cannot handle comments.
|
||||
sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed
|
||||
fi
|
||||
dnl po2tbl.sed is always needed.
|
||||
sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
|
||||
$srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed
|
||||
|
||||
dnl In the intl/Makefile.in we have a special dependency which makes
|
||||
dnl only sense for gettext. We comment this out for non-gettext
|
||||
dnl packages.
|
||||
if test "$PACKAGE" = "gettext"; then
|
||||
GT_NO="#NO#"
|
||||
GT_YES=
|
||||
else
|
||||
GT_NO=
|
||||
GT_YES="#YES#"
|
||||
fi
|
||||
AC_SUBST(GT_NO)
|
||||
AC_SUBST(GT_YES)
|
||||
|
||||
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
|
||||
dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
|
||||
dnl Try to locate is.
|
||||
MKINSTALLDIRS=
|
||||
if test -n "$ac_aux_dir"; then
|
||||
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
|
||||
fi
|
||||
if test -z "$MKINSTALLDIRS"; then
|
||||
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
|
||||
fi
|
||||
AC_SUBST(MKINSTALLDIRS)
|
||||
|
||||
dnl *** For now the libtool support in intl/Makefile is not for real.
|
||||
l=
|
||||
AC_SUBST(l)
|
||||
|
||||
dnl Generate list of files to be processed by xgettext which will
|
||||
dnl be included in po/Makefile.
|
||||
test -d po || mkdir po
|
||||
if test "x$srcdir" != "x."; then
|
||||
if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
|
||||
posrcprefix="$srcdir/"
|
||||
else
|
||||
posrcprefix="../$srcdir/"
|
||||
fi
|
||||
else
|
||||
posrcprefix="../"
|
||||
fi
|
||||
rm -f po/POTFILES
|
||||
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
|
||||
< $srcdir/po/POTFILES.in > po/POTFILES
|
||||
])
|
||||
|
||||
112
autogen.sh
Executable file
@@ -0,0 +1,112 @@
|
||||
#!/bin/sh
|
||||
# Run this to generate all the initial makefiles, etc.
|
||||
|
||||
srcdir=`dirname $0`
|
||||
test -z "$srcdir" && srcdir=.
|
||||
|
||||
ORIGDIR=`pwd`
|
||||
cd $srcdir
|
||||
PROJECT=Gtk+
|
||||
TEST_TYPE=-d
|
||||
FILE=gdk
|
||||
|
||||
DIE=0
|
||||
|
||||
have_libtool=false
|
||||
if libtool --version < /dev/null > /dev/null 2>&1 ; then
|
||||
libtool_version=`libtoolize --version | libtoolize --version | sed 's/^[^0-9]*\([0-9.][0-9.]*\).*/\1/'`
|
||||
case $libtool_version in
|
||||
1.4*)
|
||||
have_libtool=true
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if $have_libtool ; then : ; else
|
||||
echo
|
||||
echo "You must have libtool 1.4 installed to compile $PROJECT."
|
||||
echo "Install the appropriate package for your distribution,"
|
||||
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
|
||||
DIE=1
|
||||
fi
|
||||
|
||||
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "You must have autoconf installed to compile $PROJECT."
|
||||
echo "libtool the appropriate package for your distribution,"
|
||||
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
|
||||
DIE=1
|
||||
}
|
||||
|
||||
have_automake=false
|
||||
if automake --version < /dev/null > /dev/null 2>&1 ; then
|
||||
automake_version=`automake --version | grep 'automake (GNU automake)' | sed 's/^[^0-9]*\(.*\)/\1/'`
|
||||
case $automake_version in
|
||||
1.2*|1.3*|1.4)
|
||||
;;
|
||||
*)
|
||||
have_automake=true
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if $have_automake ; then : ; else
|
||||
echo
|
||||
echo "You must have automake 1.4-p1 installed to compile $PROJECT."
|
||||
echo "Get ftp://ftp.gnu.org/pub/gnu/automake/automake-1.4-p1.tar.gz"
|
||||
echo "(or a newer version if it is available)"
|
||||
DIE=1
|
||||
fi
|
||||
|
||||
if test "$DIE" -eq 1; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
test $TEST_TYPE $FILE || {
|
||||
echo "You must run this script in the top-level $PROJECT directory"
|
||||
exit 1
|
||||
}
|
||||
|
||||
if test -z "$AUTOGEN_SUBDIR_MODE"; then
|
||||
if test -z "$*"; then
|
||||
echo "I am going to run ./configure with no arguments - if you wish "
|
||||
echo "to pass any to it, please specify them on the $0 command line."
|
||||
fi
|
||||
fi
|
||||
|
||||
case $CC in
|
||||
*xlc | *xlc\ * | *lcc | *lcc\ *) am_opt=--include-deps;;
|
||||
esac
|
||||
|
||||
if test -z "$ACLOCAL_FLAGS"; then
|
||||
|
||||
acdir=`aclocal --print-ac-dir`
|
||||
m4list="glib-2.0.m4 glib-gettext.m4"
|
||||
|
||||
for file in $m4list
|
||||
do
|
||||
if [ ! -f "$acdir/$file" ]; then
|
||||
echo "WARNING: aclocal's directory is $acdir, but..."
|
||||
echo " no file $acdir/$file"
|
||||
echo " You may see fatal macro warnings below."
|
||||
echo " If these files are installed in /some/dir, set the ACLOCAL_FLAGS "
|
||||
echo " environment variable to \"-I /some/dir\", or install"
|
||||
echo " $acdir/$file."
|
||||
echo ""
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
aclocal $ACLOCAL_FLAGS
|
||||
|
||||
# optionally feature autoheader
|
||||
(autoheader --version) < /dev/null > /dev/null 2>&1 && autoheader
|
||||
|
||||
automake -a $am_opt
|
||||
autoconf
|
||||
cd $ORIGDIR
|
||||
|
||||
if test -z "$AUTOGEN_SUBDIR_MODE"; then
|
||||
$srcdir/configure --enable-maintainer-mode --enable-gtk-doc "$@"
|
||||
|
||||
echo
|
||||
echo "Now type 'make' to compile $PROJECT."
|
||||
fi
|
||||
@@ -1,45 +0,0 @@
|
||||
{
|
||||
"app-id": "org.gtk.WidgetFactory",
|
||||
"runtime": "org.gnome.Platform",
|
||||
"runtime-version": "master",
|
||||
"sdk": "org.gnome.Sdk",
|
||||
"command": "gtk3-widget-factory",
|
||||
"tags": ["devel", "development", "nightly"],
|
||||
"rename-desktop-file": "gtk3-widget-factory.desktop",
|
||||
"rename-icon": "gtk3-widget-factory",
|
||||
"finish-args": [
|
||||
"--device=dri",
|
||||
"--share=ipc",
|
||||
"--socket=x11",
|
||||
"--socket=wayland",
|
||||
"--talk-name=org.gtk.vfs", "--talk-name=org.gtk.vfs.*",
|
||||
"--talk-name=ca.desrt.conf", "--env=DCONF_USER_CONFIG_DIR=.config/dconf"
|
||||
],
|
||||
"cleanup": [
|
||||
"/include",
|
||||
"/lib/pkgconfig", "/share/pkgconfig",
|
||||
"/share/aclocal",
|
||||
"/man", "/share/man", "/share/gtk-doc",
|
||||
"*.la", ".a",
|
||||
"/lib/girepository-1.0",
|
||||
"/share/gir-1.0",
|
||||
"/share/doc"
|
||||
],
|
||||
"modules": [
|
||||
{
|
||||
"name": "gtk",
|
||||
"buildsystem": "autotools",
|
||||
"builddir": true,
|
||||
"config-opts": [
|
||||
"--libdir=/app/lib"
|
||||
],
|
||||
"sources": [
|
||||
{
|
||||
"type": "git",
|
||||
"branch": "gtk-3-24",
|
||||
"url": "https://gitlab.gnome.org/GNOME/gtk.git"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,58 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import os
|
||||
import shutil
|
||||
import sys
|
||||
import subprocess
|
||||
|
||||
if 'DESTDIR' not in os.environ:
|
||||
gtk_api_version = sys.argv[1]
|
||||
gtk_abi_version = sys.argv[2]
|
||||
gtk_bindir = sys.argv[3]
|
||||
gtk_libdir = sys.argv[4]
|
||||
gtk_datadir = sys.argv[5]
|
||||
gtk_query_immodules = os.path.join(gtk_bindir, 'gtk-query-immodules-' + gtk_api_version)
|
||||
gtk_update_icon_cache = os.path.join(gtk_bindir, 'gtk-update-icon-cache')
|
||||
|
||||
gtk_moduledir = os.path.join(gtk_libdir, 'gtk-' + gtk_api_version, gtk_abi_version)
|
||||
gtk_immodule_dir = os.path.join(gtk_moduledir, 'immodules')
|
||||
gtk_printmodule_dir = os.path.join(gtk_moduledir, 'printbackends')
|
||||
|
||||
if os.name == 'nt':
|
||||
for lib in ['gdk', 'gtk', 'gailutil']:
|
||||
# Make copy for MSVC-built .lib files, e.g. xxx-3.lib->xxx-3.0.lib
|
||||
installed_lib = os.path.join(gtk_libdir, lib + '-' + gtk_api_version.split('.')[0] + '.lib')
|
||||
installed_lib_dst = os.path.join(gtk_libdir, lib + '-' + gtk_api_version + '.lib')
|
||||
if os.path.isfile(installed_lib):
|
||||
shutil.copyfile(installed_lib, installed_lib_dst)
|
||||
|
||||
print('Compiling GSettings schemas...')
|
||||
glib_compile_schemas = subprocess.check_output(['pkg-config',
|
||||
'--variable=glib_compile_schemas',
|
||||
'gio-2.0']).strip()
|
||||
if not os.path.exists(glib_compile_schemas):
|
||||
# pkg-config variables only available since GLib 2.62.0.
|
||||
glib_compile_schemas = 'glib-compile-schemas'
|
||||
subprocess.call([glib_compile_schemas,
|
||||
os.path.join(gtk_datadir, 'glib-2.0', 'schemas')])
|
||||
|
||||
print('Updating icon cache...')
|
||||
subprocess.call([gtk_update_icon_cache, '-q', '-t' ,'-f',
|
||||
os.path.join(gtk_datadir, 'icons', 'hicolor')])
|
||||
|
||||
print('Updating module cache for input methods...')
|
||||
os.makedirs(gtk_immodule_dir, exist_ok=True)
|
||||
immodule_cache_file = open(os.path.join(gtk_moduledir, 'immodules.cache'), 'w')
|
||||
subprocess.call([gtk_query_immodules], stdout=immodule_cache_file)
|
||||
immodule_cache_file.close()
|
||||
|
||||
# Untested!
|
||||
print('Updating module cache for print backends...')
|
||||
os.makedirs(gtk_printmodule_dir, exist_ok=True)
|
||||
gio_querymodules = subprocess.check_output(['pkg-config',
|
||||
'--variable=gio_querymodules',
|
||||
'gio-2.0']).strip()
|
||||
if not os.path.exists(gio_querymodules):
|
||||
# pkg-config variables only available since GLib 2.62.0.
|
||||
gio_querymodules = 'gio-querymodules'
|
||||
subprocess.call([gio_querymodules, gtk_printmodule_dir])
|
||||
289
config.h.win32.in
Normal file
@@ -0,0 +1,289 @@
|
||||
/* config.h.win32.in. Merged from two versions generated by configure for gcc and MSVC. */
|
||||
/* config.h.in. Generated from configure.in by autoheader. */
|
||||
/* acconfig.h
|
||||
This file is in the public domain.
|
||||
|
||||
Descriptive text for the C preprocessor macros that
|
||||
the distributed Autoconf macros can define.
|
||||
No software package will use all of them; autoheader copies the ones
|
||||
your configure.in uses into your configuration header file templates.
|
||||
|
||||
The entries are in sort -df order: alphabetical, case insensitive,
|
||||
ignoring punctuation (such as underscores). Although this order
|
||||
can split up related entries, it makes it easier to check whether
|
||||
a given entry is in the file.
|
||||
|
||||
Leave the following blank line there!! Autoheader needs it. */
|
||||
|
||||
|
||||
/* Other stuff */
|
||||
#define ENABLE_NLS 1
|
||||
#define GTK_COMPILED_WITH_DEBUGGING "yes"
|
||||
|
||||
/* #undef HAVE_CATGETS */
|
||||
/* #undef HAVE_DIMM_H */
|
||||
#define HAVE_GETTEXT 1
|
||||
/* #undef HAVE_IPC_H */
|
||||
/* #undef HAVE_LC_MESSAGES */
|
||||
#define HAVE_PROGRESSIVE_JPEG 1
|
||||
/* #undef HAVE_PWD_H */
|
||||
/* #undef HAVE_SHM_H */
|
||||
/* #undef HAVE_STPCPY */
|
||||
/* #undef HAVE_XSHM_H */
|
||||
/* #undef HAVE_SHAPE_EXT */
|
||||
/* #undef HAVE_SYS_SELECT_H */
|
||||
#ifndef _MSC_VER
|
||||
#define HAVE_SYS_TIME_H 1
|
||||
#else /* _MSC_VER */
|
||||
/* #undef HAVE_SYS_TIME_H */
|
||||
#endif /* _MSC_VER */
|
||||
#define HAVE_WINSOCK_H 1
|
||||
#define HAVE_WINTAB 1
|
||||
/* #undef HAVE_XCONVERTCASE */
|
||||
/* #undef HAVE_XFT */
|
||||
|
||||
/* #undef HAVE_SIGSETJMP */
|
||||
|
||||
#define NO_FD_SET 1
|
||||
|
||||
/* #undef RESOURCE_BASE */
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#define USE_GMODULE 1
|
||||
#define USE_MMX 1
|
||||
#endif
|
||||
|
||||
/* Define to use X11R6 additions to XIM */
|
||||
/* #undef USE_X11R6_XIM */
|
||||
|
||||
/* Define to use XKB extension */
|
||||
/* #undef HAVE_XKB */
|
||||
|
||||
/* Define to use shadowfb in the linux-fb port */
|
||||
/* #undef ENABLE_SHADOW_FB */
|
||||
|
||||
/* Define to use a fb manager in the linux-fb port */
|
||||
/* #undef ENABLE_FB_MANAGER */
|
||||
|
||||
/* #undef XINPUT_NONE */
|
||||
/* #undef XINPUT_GXI */
|
||||
/* #undef XINPUT_XFREE */
|
||||
|
||||
/* Define as the return type of signal handlers (int or void). */
|
||||
#define RETSIGTYPE void
|
||||
|
||||
/* Most machines will be happy with int or void. IRIX requires '...' */
|
||||
/* #undef SIGNAL_ARG_TYPE */
|
||||
|
||||
#define GETTEXT_PACKAGE "@GETTEXT_PACKAGE@"
|
||||
|
||||
/* #undef PACKAGE */
|
||||
/* #undef VERSION */
|
||||
|
||||
|
||||
/* Leave that blank line there!! Autoheader needs it.
|
||||
If you're adding to this file, keep in mind:
|
||||
The entries are in sort -df order: alphabetical, case insensitive,
|
||||
ignoring punctuation (such as underscores). */
|
||||
|
||||
/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
|
||||
systems. This function is required for `alloca.c' support on those systems.
|
||||
*/
|
||||
/* #undef CRAY_STACKSEG_END */
|
||||
|
||||
/* Define if using `alloca.c'. */
|
||||
/* #undef C_ALLOCA */
|
||||
|
||||
/* always defined to indicate that i18n is enabled */
|
||||
#define ENABLE_NLS 1
|
||||
|
||||
/* Define if you have `alloca', as a function or macro. */
|
||||
#define HAVE_ALLOCA 1
|
||||
|
||||
/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
|
||||
/* #undef HAVE_ALLOCA_H */
|
||||
|
||||
/* Define if you have the <argz.h> header file. */
|
||||
/* #undef HAVE_ARGZ_H */
|
||||
|
||||
/* Define if you have the `bind_textdomain_codeset' function. */
|
||||
/* #undef HAVE_BIND_TEXTDOMAIN_CODESET */
|
||||
|
||||
/* Is the wctype implementation broken */
|
||||
/* #undef HAVE_BROKEN_WCTYPE */
|
||||
|
||||
/* Define if you have the `dcgettext' function. */
|
||||
#define HAVE_DCGETTEXT 1
|
||||
|
||||
/* Define if you have the <dlfcn.h> header file. */
|
||||
/* #undef HAVE_DLFCN_H */
|
||||
|
||||
/* Define if you have the `getcwd' function. */
|
||||
#define HAVE_GETCWD 1
|
||||
|
||||
/* Define if you have the `getpagesize' function. */
|
||||
#ifndef _MSC_VER
|
||||
#define HAVE_GETPAGESIZE 1
|
||||
#else /* _MSC_VER */
|
||||
/* #undef HAVE_GETPAGESIZE */
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
/* Define if you have the `getresuid' function. */
|
||||
/* #undef HAVE_GETRESUID */
|
||||
|
||||
/* Define if the GNU gettext() function is already present or preinstalled. */
|
||||
#define HAVE_GETTEXT 1
|
||||
|
||||
/* Define if you have the <inttypes.h> header file. */
|
||||
/* #undef HAVE_INTTYPES_H */
|
||||
|
||||
/* Define if your <locale.h> file defines LC_MESSAGES. */
|
||||
/* #undef HAVE_LC_MESSAGES */
|
||||
|
||||
/* Define if you have the <limits.h> header file. */
|
||||
#define HAVE_LIMITS_H 1
|
||||
|
||||
/* Define if you have the <locale.h> header file. */
|
||||
#define HAVE_LOCALE_H 1
|
||||
|
||||
/* Define if you have the `lstat' function. */
|
||||
/* #undef HAVE_LSTAT */
|
||||
|
||||
/* Define if you have the <malloc.h> header file. */
|
||||
#define HAVE_MALLOC_H 1
|
||||
|
||||
/* Define if you have the <memory.h> header file. */
|
||||
#define HAVE_MEMORY_H 1
|
||||
|
||||
/* Define if you have the `mkstemp' function. */
|
||||
/* #undef HAVE_MKSTEMP */
|
||||
|
||||
/* Define if you have a working `mmap' system call. */
|
||||
/* #undef HAVE_MMAP */
|
||||
|
||||
/* Define if you have the `munmap' function. */
|
||||
/* #undef HAVE_MUNMAP */
|
||||
|
||||
/* Define if you have the <nl_types.h> header file. */
|
||||
/* #undef HAVE_NL_TYPES_H */
|
||||
|
||||
/* Define if you have the `putenv' function. */
|
||||
#define HAVE_PUTENV 1
|
||||
|
||||
/* Define if you have the <pwd.h> header file. */
|
||||
/* #undef HAVE_PWD_H */
|
||||
|
||||
/* Define if you have the `setenv' function. */
|
||||
/* #undef HAVE_SETENV */
|
||||
|
||||
/* Define if you have the `setlocale' function. */
|
||||
#define HAVE_SETLOCALE 1
|
||||
|
||||
/* Define if you have the <stdint.h> header file. */
|
||||
#ifndef _MSC_VER
|
||||
#define HAVE_STDINT_H 1
|
||||
#else /* _MSC_VER */
|
||||
/* #undef HAVE_STDINT_H */
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
/* Define if you have the <stdlib.h> header file. */
|
||||
#define HAVE_STDLIB_H 1
|
||||
|
||||
/* Define if you have the `strcasecmp' function. */
|
||||
#ifndef _MSC_VER
|
||||
#define HAVE_STRCASECMP 1
|
||||
#else /* _MSC_VER */
|
||||
/* #undef HAVE_STRCASECMP */
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
/* Define if you have the `strchr' function. */
|
||||
#define HAVE_STRCHR 1
|
||||
|
||||
/* Define if you have the `strdup' function. */
|
||||
#define HAVE_STRDUP 1
|
||||
|
||||
/* Define if you have the <strings.h> header file. */
|
||||
/* #undef HAVE_STRINGS_H */
|
||||
|
||||
/* Define if you have the <string.h> header file. */
|
||||
#define HAVE_STRING_H 1
|
||||
|
||||
/* Define if you have the <sys/param.h> header file. */
|
||||
/* #undef HAVE_SYS_PARAM_H */
|
||||
|
||||
/* Define if you have the <sys/stat.h> header file. */
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
|
||||
/* Define if you have the <sys/time.h> header file. */
|
||||
#ifndef _MSC_VER
|
||||
#define HAVE_SYS_TIME_H 1
|
||||
#else /* _MSC_VER */
|
||||
/* #undef HAVE_SYS_TIME_H */
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
/* Define if you have the <sys/types.h> header file. */
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
|
||||
/* Define if you have <sys/wait.h> that is POSIX.1 compatible. */
|
||||
/* #undef HAVE_SYS_WAIT_H */
|
||||
|
||||
/* Define if you have the <unistd.h> header file. */
|
||||
#ifndef _MSC_VER
|
||||
#define HAVE_UNISTD_H 1
|
||||
#else /* _MSC_VER */
|
||||
/* #undef HAVE_UNISTD_H */
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
/* Have wchar.h include file */
|
||||
#define HAVE_WCHAR_H 1
|
||||
|
||||
/* Have wctype.h include file */
|
||||
#define HAVE_WCTYPE_H 1
|
||||
|
||||
/* Define if you have the <winsock.h> header file. */
|
||||
#define HAVE_WINSOCK_H 1
|
||||
|
||||
/* Define if you have the `__argz_count' function. */
|
||||
/* #undef HAVE___ARGZ_COUNT */
|
||||
|
||||
/* Define if you have the `__argz_next' function. */
|
||||
/* #undef HAVE___ARGZ_NEXT */
|
||||
|
||||
/* Define if you have the `__argz_stringify' function. */
|
||||
/* #undef HAVE___ARGZ_STRINGIFY */
|
||||
|
||||
/* Define as the return type of signal handlers (`int' or `void'). */
|
||||
#define RETSIGTYPE void
|
||||
|
||||
/* If using the C implementation of alloca, define if you know the
|
||||
direction of stack growth for your system; otherwise it will be
|
||||
automatically deduced at run-time.
|
||||
STACK_DIRECTION > 0 => grows toward higher addresses
|
||||
STACK_DIRECTION < 0 => grows toward lower addresses
|
||||
STACK_DIRECTION = 0 => direction of growth unknown */
|
||||
/* #undef STACK_DIRECTION */
|
||||
|
||||
/* Define if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
/* Define if the X Window System is missing or not being used. */
|
||||
/* #undef X_DISPLAY_MISSING */
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
/* #undef const */
|
||||
|
||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
||||
#define gid_t int
|
||||
|
||||
/* Define as `__inline' if that's what the C compiler calls it, or to nothing
|
||||
if it is not supported. */
|
||||
/* #undef inline */
|
||||
|
||||
/* Define to `long' if <sys/types.h> does not define. */
|
||||
/* #undef off_t */
|
||||
|
||||
/* Define to `unsigned' if <sys/types.h> does not define. */
|
||||
/* #undef size_t */
|
||||
|
||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
||||
#define uid_t int
|
||||
1548
configure.in
Normal file
2
contrib/.cvsignore
Normal file
@@ -0,0 +1,2 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
8
contrib/Makefile.am
Normal file
@@ -0,0 +1,8 @@
|
||||
|
||||
if USE_X11
|
||||
XDIRS=gdk-pixbuf-xlib
|
||||
else
|
||||
XDIRS=
|
||||
endif
|
||||
|
||||
SUBDIRS=$(XDIRS)
|
||||
7
contrib/gdk-pixbuf-xlib/.cvsignore
Normal file
@@ -0,0 +1,7 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
*.la
|
||||
*.lo
|
||||
.libs
|
||||
.deps
|
||||
gdk-pixbuf-xlib-2.0.pc
|
||||
86
contrib/gdk-pixbuf-xlib/ChangeLog
Normal file
@@ -0,0 +1,86 @@
|
||||
2002-01-25 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
Merge from gdk-pixbuf stable.
|
||||
|
||||
* gdk-pixbuf-xlib-drawable.c (rgb565msb): Fixed the endianness
|
||||
conversion --- swap the individual 16 bit values instead of taking
|
||||
everying as a 32 bit value.
|
||||
(rgb565lsb): Likewise.
|
||||
(rgb555lsb): Likewise.
|
||||
(rgb555msb): Likewise.
|
||||
|
||||
2001-11-26 Akira TAGOH <tagoh@redhat.com>
|
||||
|
||||
* Makefile.am (libgdk_pixbuf_xlib_1_3_la_LDFLAGS):
|
||||
Added -version-info.
|
||||
|
||||
2001-05-19 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* gdk-pixbuf-xlibrgb.c: docs
|
||||
|
||||
2001-06-04 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* gdk-pixbuf-xlibrgb.c (xlib_rgb_init): remove C++ comment,
|
||||
reported by Dan McNichol
|
||||
|
||||
Mon Jan 8 11:41:41 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* Makefile.am (INCLUDES): Add @x_cflags@ (#36310)
|
||||
|
||||
2001-01-02 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* gdk-pixbuf-xlib-2.0.pc.in (Description): fix up description a bit.
|
||||
|
||||
2000-10-06 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* gdk-pixbuf-xlib.c: Put display/screen here, instead of in
|
||||
the main gdk-pixbuf library as it was in 1.0; since the io-xpm
|
||||
loader doesn't use these variables anymore it should be OK
|
||||
|
||||
2000-09-26 Federico Mena Quintero <federico@helixcode.com>
|
||||
|
||||
* gdk-pixbuf/gdk-pixbuf-xlib-drawable.c
|
||||
(gdk_pixbuf_xlib_get_from_drawable): Do not use
|
||||
gdk_screen_{width,height}(). Thanks to John Harper for pointing
|
||||
this out.
|
||||
|
||||
2000-08-26 Federico Mena Quintero <federico@helixcode.com>
|
||||
|
||||
* gdk-pixbuf/gdk-pixbuf-xlibrgb.c: Added API reference docs.
|
||||
|
||||
2000-08-25 Federico Mena Quintero <federico@helixcode.com>
|
||||
|
||||
* gdk-pixbuf/gdk-pixbuf-xlib-drawable.c (handle_x_error): Return
|
||||
0.
|
||||
(xlib_window_is_viewable): Return FALSE in the last case.
|
||||
|
||||
* gdk-pixbuf/gdk-pixbuf-xlib-render.c: Updated the inline docs.
|
||||
|
||||
* gdk-pixbuf/gdk-pixbuf-xlib.c: Added API docs.
|
||||
|
||||
2000-08-25 John Harper <john@dcs.warwick.ac.uk>
|
||||
|
||||
Work to create an Xlib version of gdk-pixbuf (with the Xlib
|
||||
port of GdkRGB for rendering):
|
||||
|
||||
* configure.in: check for X libraries, set and substitute
|
||||
GDK_PIXBUF_XLIB_{LIBDIR,INCLUDEDIR,LIBS} variables
|
||||
|
||||
* gdk_pixbuf_xlibConf.sh.in: new file -- gnome-config details
|
||||
for the gdk-pixbuf-xlib library
|
||||
* Makefile.am: build and install gdk_pixbuf_xlibConf.sh
|
||||
|
||||
* gdk-pixbuf/gdk-pixbuf-xlib-render.c,
|
||||
gdk-pixbuf/gdk-pixbuf-xlib.c, gdk-pixbuf/gdk-pixbuf-xlib.h,
|
||||
gdk-pixbuf/gdk-pixbuf-xlib-private.h,
|
||||
gdk-pixbuf/gdk-pixbuf-xlib-drawable.c: new files, ported the
|
||||
GDK dependent parts of gdk-pixbuf to use Xlib. Functions that
|
||||
were called gdk_pixbuf_FOO are now gdk_pixbuf_xlib_FOO
|
||||
|
||||
* gdk-pixbuf/gdk-pixbuf-xlibrgb.c,
|
||||
gdk-pixbuf/gdk-pixbuf-xlibrgb.h: added Chris Blizzard's Xlib
|
||||
port of GdkRGB (from Mozilla CVS)
|
||||
|
||||
* gdk-pixbuf/Makefile.am: build a library libgdk_pixbuf_xlib.la
|
||||
including the non-GDK dependent objects from libgdk_pixbuf.la
|
||||
plus the Xlib ports and xlibrgb
|
||||
34
contrib/gdk-pixbuf-xlib/Makefile.am
Normal file
@@ -0,0 +1,34 @@
|
||||
lib_LTLIBRARIES=libgdk_pixbuf_xlib-2.0.la
|
||||
|
||||
INCLUDES = @STRIP_BEGIN@ \
|
||||
-I$(top_srcdir) -I$(top_builddir) \
|
||||
-I$(top_srcdir)/gdk-pixbuf \
|
||||
-I$(top_srcdir)/contrib \
|
||||
@GDK_PIXBUF_XLIB_DEP_CFLAGS@ \
|
||||
@STRIP_END@
|
||||
|
||||
LDADDS = @STRIP_BEGIN@ \
|
||||
@GDK_PIXBUF_XLIB_DEP_LIBS@ \
|
||||
@STRIP_END@
|
||||
|
||||
libgdk_pixbuf_xlib_2_0_la_LDFLAGS = \
|
||||
-export-dynamic \
|
||||
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
|
||||
|
||||
libgdk_pixbuf_xlib_2_0_la_SOURCES = \
|
||||
gdk-pixbuf-xlib-private.h \
|
||||
gdk-pixbuf-xlib.c \
|
||||
gdk-pixbuf-xlib-render.c \
|
||||
gdk-pixbuf-xlib-drawable.c \
|
||||
gdk-pixbuf-xlibrgb.c
|
||||
|
||||
libgdk_pixbuf_xlibincludedir=$(includedir)/gtk-2.0/gdk-pixbuf-xlib
|
||||
|
||||
libgdk_pixbuf_xlibinclude_HEADERS = \
|
||||
gdk-pixbuf-xlib.h \
|
||||
gdk-pixbuf-xlibrgb.h
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = gdk-pixbuf-xlib-2.0.pc
|
||||
|
||||
EXTRA_DIST = gdk-pixbuf-xlib-2.0.pc.in
|
||||
11
contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib-2.0.pc.in
Normal file
@@ -0,0 +1,11 @@
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@
|
||||
|
||||
Name: GdkPixbuf Xlib
|
||||
Description: GdkPixbuf rendering for Xlib
|
||||
Version: @VERSION@
|
||||
Requires: gobject-2.0,gmodule-2.0,gdk-pixbuf-2.0
|
||||
Libs: -L${libdir} -lgdk_pixbuf_xlib-@GTK_API_VERSION@
|
||||
Cflags: -I${includedir}
|
||||
1335
contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib-drawable.c
Normal file
30
contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib-private.h
Normal file
@@ -0,0 +1,30 @@
|
||||
/* GdkPixbuf library - Xlib header file
|
||||
*
|
||||
* Authors: John Harper <john@dcs.warwick.ac.uk>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef GDK_PIXBUF_XLIB_PRIVATE_H
|
||||
#define GDK_PIXBUF_XLIB_PRIVATE_H
|
||||
|
||||
#include "gdk-pixbuf-xlib.h"
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
extern Display *gdk_pixbuf_dpy;
|
||||
extern int gdk_pixbuf_screen;
|
||||
|
||||
#endif
|
||||
398
contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib-render.c
Normal file
@@ -0,0 +1,398 @@
|
||||
/* GdkPixbuf library - Rendering functions
|
||||
*
|
||||
* Copyright (C) 1999 The Free Software Foundation
|
||||
*
|
||||
* Author: Federico Mena-Quintero <federico@gimp.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* Trivially ported to Xlib(RGB) by John Harper. */
|
||||
|
||||
#include <config.h>
|
||||
#include "gdk-pixbuf-private.h"
|
||||
#include "gdk-pixbuf-xlib-private.h"
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* gdk_pixbuf_xlib_render_threshold_alpha:
|
||||
* @pixbuf: A pixbuf.
|
||||
* @bitmap: Bitmap where the bilevel mask will be painted to.
|
||||
* @src_x: Source X coordinate.
|
||||
* @src_y: source Y coordinate.
|
||||
* @dest_x: Destination X coordinate.
|
||||
* @dest_y: Destination Y coordinate.
|
||||
* @width: Width of region to threshold.
|
||||
* @height: Height of region to threshold.
|
||||
* @alpha_threshold: Opacity values below this will be painted as zero; all
|
||||
* other values will be painted as one.
|
||||
*
|
||||
* Takes the opacity values in a rectangular portion of a pixbuf and thresholds
|
||||
* them to produce a bi-level alpha mask that can be used as a clipping mask for
|
||||
* a drawable.
|
||||
*
|
||||
**/
|
||||
void
|
||||
gdk_pixbuf_xlib_render_threshold_alpha (GdkPixbuf *pixbuf, Pixmap bitmap,
|
||||
int src_x, int src_y,
|
||||
int dest_x, int dest_y,
|
||||
int width, int height,
|
||||
int alpha_threshold)
|
||||
{
|
||||
GC gc;
|
||||
XColor color;
|
||||
int x, y;
|
||||
guchar *p;
|
||||
int start, start_status;
|
||||
int status;
|
||||
XGCValues gcv;
|
||||
|
||||
g_return_if_fail (pixbuf != NULL);
|
||||
g_return_if_fail (pixbuf->colorspace == GDK_COLORSPACE_RGB);
|
||||
g_return_if_fail (pixbuf->n_channels == 3 || pixbuf->n_channels == 4);
|
||||
g_return_if_fail (pixbuf->bits_per_sample == 8);
|
||||
|
||||
g_return_if_fail (bitmap != 0);
|
||||
g_return_if_fail (width >= 0 && height >= 0);
|
||||
g_return_if_fail (src_x >= 0 && src_x + width <= pixbuf->width);
|
||||
g_return_if_fail (src_y >= 0 && src_y + height <= pixbuf->height);
|
||||
|
||||
g_return_if_fail (alpha_threshold >= 0 && alpha_threshold <= 255);
|
||||
|
||||
if (width == 0 || height == 0)
|
||||
return;
|
||||
|
||||
gc = XCreateGC (gdk_pixbuf_dpy, bitmap, 0, &gcv);
|
||||
|
||||
if (!pixbuf->has_alpha) {
|
||||
color.pixel = (alpha_threshold == 255) ? 0 : 1;
|
||||
XSetForeground (gdk_pixbuf_dpy, gc, color.pixel);
|
||||
XFillRectangle (gdk_pixbuf_dpy, bitmap, gc,
|
||||
dest_x, dest_y, width, height);
|
||||
XFreeGC (gdk_pixbuf_dpy, gc);
|
||||
return;
|
||||
}
|
||||
|
||||
color.pixel = 0;
|
||||
XSetForeground (gdk_pixbuf_dpy, gc, color.pixel);
|
||||
XFillRectangle (gdk_pixbuf_dpy, bitmap, gc,
|
||||
dest_x, dest_y, width, height);
|
||||
|
||||
color.pixel = 1;
|
||||
XSetForeground (gdk_pixbuf_dpy, gc, color.pixel);
|
||||
|
||||
for (y = 0; y < height; y++) {
|
||||
p = (pixbuf->pixels + (y + src_y) * pixbuf->rowstride + src_x * pixbuf->n_channels
|
||||
+ pixbuf->n_channels - 1);
|
||||
|
||||
start = 0;
|
||||
start_status = *p < alpha_threshold;
|
||||
|
||||
for (x = 0; x < width; x++) {
|
||||
status = *p < alpha_threshold;
|
||||
|
||||
if (status != start_status) {
|
||||
if (!start_status)
|
||||
XDrawLine (gdk_pixbuf_dpy, bitmap, gc,
|
||||
start + dest_x, y + dest_y,
|
||||
x - 1 + dest_x, y + dest_y);
|
||||
|
||||
start = x;
|
||||
start_status = status;
|
||||
}
|
||||
|
||||
p += pixbuf->n_channels;
|
||||
}
|
||||
|
||||
if (!start_status)
|
||||
XDrawLine (gdk_pixbuf_dpy, bitmap, gc,
|
||||
start + dest_x, y + dest_y,
|
||||
x - 1 + dest_x, y + dest_y);
|
||||
}
|
||||
|
||||
XFreeGC (gdk_pixbuf_dpy, gc);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Creates a buffer by stripping the alpha channel of a pixbuf */
|
||||
static guchar *
|
||||
remove_alpha (GdkPixbuf *pixbuf, int x, int y, int width, int height, int *rowstride)
|
||||
{
|
||||
guchar *buf;
|
||||
int xx, yy;
|
||||
guchar *src, *dest;
|
||||
|
||||
g_assert (pixbuf->n_channels == 4);
|
||||
g_assert (pixbuf->has_alpha);
|
||||
g_assert (width > 0 && height > 0);
|
||||
g_assert (x >= 0 && x + width <= pixbuf->width);
|
||||
g_assert (y >= 0 && y + height <= pixbuf->height);
|
||||
|
||||
*rowstride = 4 * ((width * 3 + 3) / 4);
|
||||
|
||||
buf = g_new (guchar, *rowstride * height);
|
||||
|
||||
for (yy = 0; yy < height; yy++) {
|
||||
src = pixbuf->pixels + pixbuf->rowstride * (yy + y) + x * pixbuf->n_channels;
|
||||
dest = buf + *rowstride * yy;
|
||||
|
||||
for (xx = 0; xx < width; xx++) {
|
||||
*dest++ = *src++;
|
||||
*dest++ = *src++;
|
||||
*dest++ = *src++;
|
||||
src++;
|
||||
}
|
||||
}
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_pixbuf_xlib_render_to_drawable:
|
||||
* @pixbuf: A pixbuf.
|
||||
* @drawable: Destination drawable.
|
||||
* @gc: GC used for rendering.
|
||||
* @src_x: Source X coordinate within pixbuf.
|
||||
* @src_y: Source Y coordinate within pixbuf.
|
||||
* @dest_x: Destination X coordinate within drawable.
|
||||
* @dest_y: Destination Y coordinate within drawable.
|
||||
* @width: Width of region to render, in pixels.
|
||||
* @height: Height of region to render, in pixels.
|
||||
* @dither: Dithering mode for XlibRGB.
|
||||
* @x_dither: X offset for dither.
|
||||
* @y_dither: Y offset for dither.
|
||||
*
|
||||
* Renders a rectangular portion of a pixbuf to a drawable while using the
|
||||
* specified GC. This is done using XlibRGB, so the specified drawable must
|
||||
* have the XlibRGB visual and colormap. Note that this function will ignore
|
||||
* the opacity information for images with an alpha channel; the GC must already
|
||||
* have the clipping mask set if you want transparent regions to show through.
|
||||
*
|
||||
* For an explanation of dither offsets, see the XlibRGB documentation. In
|
||||
* brief, the dither offset is important when re-rendering partial regions of an
|
||||
* image to a rendered version of the full image, or for when the offsets to a
|
||||
* base position change, as in scrolling. The dither matrix has to be shifted
|
||||
* for consistent visual results. If you do not have any of these cases, the
|
||||
* dither offsets can be both zero.
|
||||
**/
|
||||
void
|
||||
gdk_pixbuf_xlib_render_to_drawable (GdkPixbuf *pixbuf,
|
||||
Drawable drawable, GC gc,
|
||||
int src_x, int src_y,
|
||||
int dest_x, int dest_y,
|
||||
int width, int height,
|
||||
XlibRgbDither dither,
|
||||
int x_dither, int y_dither)
|
||||
{
|
||||
guchar *buf;
|
||||
int rowstride;
|
||||
|
||||
g_return_if_fail (pixbuf != NULL);
|
||||
g_return_if_fail (pixbuf->colorspace == GDK_COLORSPACE_RGB);
|
||||
g_return_if_fail (pixbuf->n_channels == 3 || pixbuf->n_channels == 4);
|
||||
g_return_if_fail (pixbuf->bits_per_sample == 8);
|
||||
|
||||
g_return_if_fail (drawable != 0);
|
||||
g_return_if_fail (gc != 0);
|
||||
|
||||
g_return_if_fail (width >= 0 && height >= 0);
|
||||
g_return_if_fail (src_x >= 0 && src_x + width <= pixbuf->width);
|
||||
g_return_if_fail (src_y >= 0 && src_y + height <= pixbuf->height);
|
||||
|
||||
if (width == 0 || height == 0)
|
||||
return;
|
||||
|
||||
/* This will have to be modified once we support other image types.
|
||||
* Also, GdkRGB does not have gdk_draw_rgb_32_image_dithalign(), so we
|
||||
* have to pack the buffer first. Sigh.
|
||||
*/
|
||||
|
||||
if (pixbuf->has_alpha)
|
||||
buf = remove_alpha (pixbuf, src_x, src_y, width, height, &rowstride);
|
||||
else {
|
||||
buf = pixbuf->pixels + src_y * pixbuf->rowstride + src_x * 3;
|
||||
rowstride = pixbuf->rowstride;
|
||||
}
|
||||
|
||||
xlib_draw_rgb_image_dithalign (drawable, gc,
|
||||
dest_x, dest_y,
|
||||
width, height,
|
||||
dither,
|
||||
buf, rowstride,
|
||||
x_dither, y_dither);
|
||||
|
||||
if (pixbuf->has_alpha)
|
||||
g_free (buf);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* gdk_pixbuf_xlib_render_to_drawable_alpha:
|
||||
* @pixbuf: A pixbuf.
|
||||
* @drawable: Destination drawable.
|
||||
* @src_x: Source X coordinate within pixbuf.
|
||||
* @src_y: Source Y coordinates within pixbuf.
|
||||
* @dest_x: Destination X coordinate within drawable.
|
||||
* @dest_y: Destination Y coordinate within drawable.
|
||||
* @width: Width of region to render, in pixels.
|
||||
* @height: Height of region to render, in pixels.
|
||||
* @alpha_mode: If the image does not have opacity information, this is ignored.
|
||||
* Otherwise, specifies how to handle transparency when rendering.
|
||||
* @alpha_threshold: If the image does have opacity information and @alpha_mode
|
||||
* is GDK_PIXBUF_ALPHA_BILEVEL, specifies the threshold value for opacity
|
||||
* values.
|
||||
* @dither: Dithering mode for XlibRGB.
|
||||
* @x_dither: X offset for dither.
|
||||
* @y_dither: Y offset for dither.
|
||||
*
|
||||
* Renders a rectangular portion of a pixbuf to a drawable. This is done using
|
||||
* XlibRGB, so the specified drawable must have the XlibRGB visual and colormap.
|
||||
*
|
||||
* When used with #GDK_PIXBUF_ALPHA_BILEVEL, this function has to create a bitmap
|
||||
* out of the thresholded alpha channel of the image and, it has to set this
|
||||
* bitmap as the clipping mask for the GC used for drawing. This can be a
|
||||
* significant performance penalty depending on the size and the complexity of
|
||||
* the alpha channel of the image. If performance is crucial, consider handling
|
||||
* the alpha channel yourself (possibly by caching it in your application) and
|
||||
* using gdk_pixbuf_xlib_render_to_drawable() or GdkRGB directly instead.
|
||||
**/
|
||||
void
|
||||
gdk_pixbuf_xlib_render_to_drawable_alpha (GdkPixbuf *pixbuf, Drawable drawable,
|
||||
int src_x, int src_y,
|
||||
int dest_x, int dest_y,
|
||||
int width, int height,
|
||||
GdkPixbufAlphaMode alpha_mode,
|
||||
int alpha_threshold,
|
||||
XlibRgbDither dither,
|
||||
int x_dither, int y_dither)
|
||||
{
|
||||
Pixmap bitmap = 0;
|
||||
GC gc;
|
||||
XGCValues gcv;
|
||||
|
||||
g_return_if_fail (pixbuf != NULL);
|
||||
g_return_if_fail (pixbuf->colorspace == GDK_COLORSPACE_RGB);
|
||||
g_return_if_fail (pixbuf->n_channels == 3 || pixbuf->n_channels == 4);
|
||||
g_return_if_fail (pixbuf->bits_per_sample == 8);
|
||||
|
||||
g_return_if_fail (drawable != 0);
|
||||
g_return_if_fail (width >= 0 && height >= 0);
|
||||
g_return_if_fail (src_x >= 0 && src_x + width <= pixbuf->width);
|
||||
g_return_if_fail (src_y >= 0 && src_y + height <= pixbuf->height);
|
||||
|
||||
if (width == 0 || height == 0)
|
||||
return;
|
||||
|
||||
gc = XCreateGC (gdk_pixbuf_dpy, drawable, 0, &gcv);
|
||||
|
||||
if (pixbuf->has_alpha) {
|
||||
/* Right now we only support GDK_PIXBUF_ALPHA_BILEVEL, so we
|
||||
* unconditionally create the clipping mask.
|
||||
*/
|
||||
|
||||
bitmap = XCreatePixmap (gdk_pixbuf_dpy,
|
||||
RootWindow (gdk_pixbuf_dpy,
|
||||
gdk_pixbuf_screen),
|
||||
width, height, 1);
|
||||
gdk_pixbuf_xlib_render_threshold_alpha (pixbuf, bitmap,
|
||||
src_x, src_y,
|
||||
0, 0,
|
||||
width, height,
|
||||
alpha_threshold);
|
||||
|
||||
XSetClipMask (gdk_pixbuf_dpy, gc, bitmap);
|
||||
XSetClipOrigin (gdk_pixbuf_dpy, gc, dest_x, dest_y);
|
||||
}
|
||||
|
||||
gdk_pixbuf_xlib_render_to_drawable (pixbuf, drawable, gc,
|
||||
src_x, src_y,
|
||||
dest_x, dest_y,
|
||||
width, height,
|
||||
dither,
|
||||
x_dither, y_dither);
|
||||
|
||||
if (bitmap)
|
||||
XFreePixmap (gdk_pixbuf_dpy, bitmap);
|
||||
|
||||
XFreeGC (gdk_pixbuf_dpy, gc);
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_pixbuf_xlib_render_pixmap_and_mask:
|
||||
* @pixbuf: A pixbuf.
|
||||
* @pixmap_return: Return value for the created pixmap.
|
||||
* @mask_return: Return value for the created mask.
|
||||
* @alpha_threshold: Threshold value for opacity values.
|
||||
*
|
||||
* Creates a pixmap and a mask bitmap which are returned in the @pixmap_return
|
||||
* and @mask_return arguments, respectively, and renders a pixbuf and its
|
||||
* corresponding tresholded alpha mask to them. This is merely a convenience
|
||||
* function; applications that need to render pixbufs with dither offsets or to
|
||||
* given drawables should use gdk_pixbuf_xlib_render_to_drawable_alpha() or
|
||||
* gdk_pixbuf_xlib_render_to_drawable(), and
|
||||
* gdk_pixbuf_xlib_render_threshold_alpha().
|
||||
*
|
||||
* If the pixbuf does not have an alpha channel, then *@mask_return will be set
|
||||
* to None.
|
||||
**/
|
||||
void
|
||||
gdk_pixbuf_xlib_render_pixmap_and_mask (GdkPixbuf *pixbuf,
|
||||
Pixmap *pixmap_return,
|
||||
Pixmap *mask_return,
|
||||
int alpha_threshold)
|
||||
{
|
||||
g_return_if_fail (pixbuf != NULL);
|
||||
|
||||
if (pixmap_return) {
|
||||
GC gc;
|
||||
XGCValues gcv;
|
||||
|
||||
*pixmap_return = XCreatePixmap (gdk_pixbuf_dpy,
|
||||
RootWindow (gdk_pixbuf_dpy,
|
||||
gdk_pixbuf_screen),
|
||||
pixbuf->width,
|
||||
pixbuf->height,
|
||||
xlib_rgb_get_depth ());
|
||||
gc = XCreateGC (gdk_pixbuf_dpy, *pixmap_return, 0, &gcv);
|
||||
gdk_pixbuf_xlib_render_to_drawable (pixbuf, *pixmap_return, gc,
|
||||
0, 0, 0, 0,
|
||||
pixbuf->width,
|
||||
pixbuf->height,
|
||||
XLIB_RGB_DITHER_NORMAL,
|
||||
0, 0);
|
||||
XFreeGC (gdk_pixbuf_dpy, gc);
|
||||
}
|
||||
|
||||
if (mask_return) {
|
||||
if (pixbuf->has_alpha) {
|
||||
*mask_return = XCreatePixmap (gdk_pixbuf_dpy,
|
||||
RootWindow (gdk_pixbuf_dpy,
|
||||
gdk_pixbuf_screen),
|
||||
pixbuf->width,
|
||||
pixbuf->height, 1);
|
||||
gdk_pixbuf_xlib_render_threshold_alpha (pixbuf,
|
||||
*mask_return,
|
||||
0, 0, 0, 0,
|
||||
pixbuf->width,
|
||||
pixbuf->height,
|
||||
alpha_threshold);
|
||||
} else
|
||||
*mask_return = 0;
|
||||
}
|
||||
}
|
||||
63
contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib.c
Normal file
@@ -0,0 +1,63 @@
|
||||
/* GdkPixbuf library - Initialization functions
|
||||
*
|
||||
* Author: John Harper <john@dcs.warwick.ac.uk>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include <gdk-pixbuf/gdk-pixbuf-private.h>
|
||||
#include "gdk-pixbuf-xlib-private.h"
|
||||
|
||||
Display *gdk_pixbuf_dpy = NULL;
|
||||
int gdk_pixbuf_screen = -1;
|
||||
|
||||
/**
|
||||
* gdk_pixbuf_xlib_init:
|
||||
* @display: X display to use.
|
||||
* @screen_num: Screen number.
|
||||
*
|
||||
* Initializes the gdk-pixbuf Xlib machinery by calling xlib_rgb_init(). This
|
||||
* function should be called near the beginning of your program, or before using
|
||||
* any of the gdk-pixbuf-xlib functions.
|
||||
**/
|
||||
void
|
||||
gdk_pixbuf_xlib_init (Display *display, int screen_num)
|
||||
{
|
||||
xlib_rgb_init (display, ScreenOfDisplay (display, screen_num));
|
||||
gdk_pixbuf_dpy = display;
|
||||
gdk_pixbuf_screen = screen_num;
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_pixbuf_xlib_init_with_depth:
|
||||
* @display: X display to use.
|
||||
* @screen_num: Screen number.
|
||||
* @prefDepth: Preferred depth for XlibRGB.
|
||||
*
|
||||
* Similar to gdk_pixbuf_xlib_init(), but also lets you specify the preferred
|
||||
* depth for XlibRGB if you do not want it to use the default depth it picks.
|
||||
**/
|
||||
void
|
||||
gdk_pixbuf_xlib_init_with_depth (Display *display,
|
||||
int screen_num, int prefDepth)
|
||||
{
|
||||
xlib_rgb_init_with_depth (display, ScreenOfDisplay (display, screen_num),
|
||||
prefDepth);
|
||||
gdk_pixbuf_dpy = display;
|
||||
gdk_pixbuf_screen = screen_num;
|
||||
}
|
||||
82
contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib.h
Normal file
@@ -0,0 +1,82 @@
|
||||
/* GdkPixbuf library - Xlib header file
|
||||
*
|
||||
* Authors: John Harper <john@dcs.warwick.ac.uk>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef GDK_PIXBUF_XLIB_H
|
||||
#define GDK_PIXBUF_XLIB_H
|
||||
|
||||
#include <gdk-pixbuf/gdk-pixbuf.h>
|
||||
#include <gdk-pixbuf-xlib/gdk-pixbuf-xlibrgb.h>
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
|
||||
|
||||
/* init */
|
||||
|
||||
void gdk_pixbuf_xlib_init (Display *display, int screen_num);
|
||||
|
||||
void gdk_pixbuf_xlib_init_with_depth (Display *display, int screen_num,
|
||||
int prefDepth);
|
||||
|
||||
|
||||
|
||||
/* render */
|
||||
|
||||
void gdk_pixbuf_xlib_render_threshold_alpha (GdkPixbuf *pixbuf, Pixmap bitmap,
|
||||
int src_x, int src_y,
|
||||
int dest_x, int dest_y,
|
||||
int width, int height,
|
||||
int alpha_threshold);
|
||||
|
||||
void gdk_pixbuf_xlib_render_to_drawable (GdkPixbuf *pixbuf,
|
||||
Drawable drawable, GC gc,
|
||||
int src_x, int src_y,
|
||||
int dest_x, int dest_y,
|
||||
int width, int height,
|
||||
XlibRgbDither dither,
|
||||
int x_dither, int y_dither);
|
||||
|
||||
|
||||
void gdk_pixbuf_xlib_render_to_drawable_alpha (GdkPixbuf *pixbuf,
|
||||
Drawable drawable,
|
||||
int src_x, int src_y,
|
||||
int dest_x, int dest_y,
|
||||
int width, int height,
|
||||
GdkPixbufAlphaMode alpha_mode,
|
||||
int alpha_threshold,
|
||||
XlibRgbDither dither,
|
||||
int x_dither, int y_dither);
|
||||
|
||||
void gdk_pixbuf_xlib_render_pixmap_and_mask (GdkPixbuf *pixbuf,
|
||||
Pixmap *pixmap_return,
|
||||
Pixmap *mask_return,
|
||||
int alpha_threshold);
|
||||
|
||||
|
||||
|
||||
/* drawable */
|
||||
|
||||
GdkPixbuf *gdk_pixbuf_xlib_get_from_drawable (GdkPixbuf *dest,
|
||||
Drawable src,
|
||||
Colormap cmap, Visual *visual,
|
||||
int src_x, int src_y,
|
||||
int dest_x, int dest_y,
|
||||
int width, int height);
|
||||
|
||||
#endif /* GDK_PIXBUF_XLIB_H */
|
||||
3724
contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlibrgb.c
Normal file
195
contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlibrgb.h
Normal file
@@ -0,0 +1,195 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.1 (the "MPL"); you may not use this file except in
|
||||
* compliance with the MPL. You may obtain a copy of the MPL at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the MPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the MPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* MPL.
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the
|
||||
* terms of the GNU Library General Public License (the "LGPL"), in
|
||||
* which case the provisions of the LGPL are applicable instead of
|
||||
* those above. If you wish to allow use of your version of this file
|
||||
* only under the terms of the LGPL and not to allow others to use
|
||||
* your version of this file under the MPL, indicate your decision by
|
||||
* deleting the provisions above and replace them with the notice and
|
||||
* other provisions required by the LGPL. If you do not delete the
|
||||
* provisions above, a recipient may use your version of this file
|
||||
* under either the MPL or the LGPL.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This code is derived from GdkRgb.
|
||||
* For more information on GdkRgb, see http://www.levien.com/gdkrgb/
|
||||
* Raph Levien <raph@acm.org>
|
||||
*/
|
||||
|
||||
/* Ported by Christopher Blizzard to Xlib. With permission from the
|
||||
* original authors of this file, the contents of this file are also
|
||||
* redistributable under the terms of the Mozilla Public license. For
|
||||
* information about the Mozilla Public License, please see the
|
||||
* license information at http://www.mozilla.org/MPL/
|
||||
*/
|
||||
|
||||
/* This code is copyright the following authors:
|
||||
* Raph Levien <raph@acm.org>
|
||||
* Manish Singh <manish@gtk.org>
|
||||
* Tim Janik <timj@gtk.org>
|
||||
* Peter Mattis <petm@xcf.berkeley.edu>
|
||||
* Spencer Kimball <spencer@xcf.berkeley.edu>
|
||||
* Josh MacDonald <jmacd@xcf.berkeley.edu>
|
||||
* Christopher Blizzard <blizzard@redhat.com>
|
||||
* Owen Taylor <otaylor@redhat.com>
|
||||
* Shawn T. Amundson <amundson@gtk.org>
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __XLIB_RGB_H__
|
||||
#define __XLIB_RGB_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
#include <X11/Xos.h>
|
||||
#include <X11/Intrinsic.h>
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
typedef struct _XlibRgbCmap XlibRgbCmap;
|
||||
|
||||
struct _XlibRgbCmap {
|
||||
unsigned int colors[256];
|
||||
unsigned char lut[256]; /* for 8-bit modes */
|
||||
};
|
||||
|
||||
void
|
||||
xlib_rgb_init (Display *display, Screen *screen);
|
||||
void
|
||||
xlib_rgb_init_with_depth (Display *display, Screen *screen, int prefDepth);
|
||||
|
||||
unsigned long
|
||||
xlib_rgb_xpixel_from_rgb (guint32 rgb);
|
||||
|
||||
void
|
||||
xlib_rgb_gc_set_foreground (GC gc, guint32 rgb);
|
||||
|
||||
void
|
||||
xlib_rgb_gc_set_background (GC gc, guint32 rgb);
|
||||
|
||||
typedef enum
|
||||
{
|
||||
XLIB_RGB_DITHER_NONE,
|
||||
XLIB_RGB_DITHER_NORMAL,
|
||||
XLIB_RGB_DITHER_MAX
|
||||
} XlibRgbDither;
|
||||
|
||||
void
|
||||
xlib_draw_rgb_image (Drawable drawable,
|
||||
GC gc,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height,
|
||||
XlibRgbDither dith,
|
||||
unsigned char *rgb_buf,
|
||||
int rowstride);
|
||||
|
||||
void
|
||||
xlib_draw_rgb_image_dithalign (Drawable drawable,
|
||||
GC gc,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height,
|
||||
XlibRgbDither dith,
|
||||
unsigned char *rgb_buf,
|
||||
int rowstride,
|
||||
int xdith,
|
||||
int ydith);
|
||||
|
||||
void
|
||||
xlib_draw_rgb_32_image (Drawable drawable,
|
||||
GC gc,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height,
|
||||
XlibRgbDither dith,
|
||||
unsigned char *buf,
|
||||
int rowstride);
|
||||
|
||||
void
|
||||
xlib_draw_gray_image (Drawable drawable,
|
||||
GC gc,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height,
|
||||
XlibRgbDither dith,
|
||||
unsigned char *buf,
|
||||
int rowstride);
|
||||
|
||||
XlibRgbCmap *
|
||||
xlib_rgb_cmap_new (guint32 *colors, int n_colors);
|
||||
|
||||
void
|
||||
xlib_rgb_cmap_free (XlibRgbCmap *cmap);
|
||||
|
||||
void
|
||||
xlib_draw_indexed_image (Drawable drawable,
|
||||
GC gc,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height,
|
||||
XlibRgbDither dith,
|
||||
unsigned char *buf,
|
||||
int rowstride,
|
||||
XlibRgbCmap *cmap);
|
||||
|
||||
/* Below are some functions which are primarily useful for debugging
|
||||
and experimentation. */
|
||||
Bool
|
||||
xlib_rgb_ditherable (void);
|
||||
|
||||
void
|
||||
xlib_rgb_set_verbose (Bool verbose);
|
||||
|
||||
/* experimental colormap stuff */
|
||||
void
|
||||
xlib_rgb_set_install (Bool install);
|
||||
|
||||
void
|
||||
xlib_rgb_set_min_colors (int min_colors);
|
||||
|
||||
Colormap
|
||||
xlib_rgb_get_cmap (void);
|
||||
|
||||
Visual *
|
||||
xlib_rgb_get_visual (void);
|
||||
|
||||
XVisualInfo *
|
||||
xlib_rgb_get_visual_info (void);
|
||||
|
||||
int
|
||||
xlib_rgb_get_depth (void);
|
||||
|
||||
Display *
|
||||
xlib_rgb_get_display (void);
|
||||
|
||||
Screen *
|
||||
xlib_rgb_get_screen (void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#endif /* __XLIB_RGB_H__ */
|
||||
18
debian/README.debian
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
libgtk1 for Debian
|
||||
----------------------
|
||||
|
||||
The GIMP Tool Kit (gtk) is a set of widgets to help you program
|
||||
programs for the X Windowing System easily and powerfully.
|
||||
|
||||
gtk is the moving force behind The GNU Image Manipulation Program (The
|
||||
GIMP) -- the number one freely-available image editing and creation
|
||||
program available.
|
||||
|
||||
gtk is rapidly under development, and the source tree has officially
|
||||
been separated from The GIMP now, as other teams of programmers
|
||||
are beginning to write software using its great widget set -- like
|
||||
GNOME, a desktop interface for X, and gzilla, a freely available
|
||||
web browser for X.
|
||||
|
||||
Ben Gertzfield <che@debian.org>, Mon, 29 Sep 1997 13:11:45 -0700
|
||||
|
||||
62
debian/build
vendored
Executable file
@@ -0,0 +1,62 @@
|
||||
#!/usr/bin/perl -w
|
||||
|
||||
# Adjust debian/changelog and build a new
|
||||
# Debian package of a CVS archive.
|
||||
|
||||
# Written 17 November 1998 by Ben Gertzfield
|
||||
# <che@debian.org>
|
||||
|
||||
# This work is released under the GNU
|
||||
# General Public License, version 2 or
|
||||
# later.
|
||||
|
||||
use strict;
|
||||
use diagnostics;
|
||||
use File::Copy;
|
||||
|
||||
my $maintainer = 'Ben Gertzfield <che@debian.org>';
|
||||
|
||||
my @date = localtime;
|
||||
|
||||
my $datestr = sprintf("%d%.2d%.2d", $date[5] + 1900, $date[4] + 1, $date[3]);
|
||||
my $revision = '01';
|
||||
|
||||
open (CHANGELOG, 'debian/changelog') or die "Couldn't open debian/changelog: $!\n";
|
||||
|
||||
$_ = <CHANGELOG>;
|
||||
chomp;
|
||||
|
||||
close CHANGELOG;
|
||||
|
||||
my ($package, $last_date, $last_revision) = /^(.*?) \((.*?)\.(.*)?\)/;
|
||||
|
||||
if ($last_date eq $datestr) {
|
||||
$revision = sprintf("%.2d", $last_revision + 1);
|
||||
}
|
||||
|
||||
my $new_version = "$datestr.$revision";
|
||||
|
||||
copy('debian/changelog', 'debian/changelog.old') or die "Couldn't copy debian/changelog to debian/changelog.old: $!\n";
|
||||
|
||||
open(NEWCHANGELOG, ">debian/changelog") or die "Couldn't open debian/changelog for writing: $!\n";
|
||||
|
||||
print NEWCHANGELOG "$package ($new_version) unstable; urgency=low\n\n * CVS snapshot build at " . scalar localtime() . "\n\n -- $maintainer " . `date -R` . "\n";
|
||||
|
||||
open(OLDCHANGELOG, "debian/changelog.old") or die "Couldn't open debian/changelog.old: $!\n";
|
||||
|
||||
while (<OLDCHANGELOG>) {
|
||||
print NEWCHANGELOG;
|
||||
}
|
||||
|
||||
close OLDCHANGELOG;
|
||||
close NEWCHANGELOG;
|
||||
|
||||
unlink('debian/changelog.old') or die "Couldn't unlink debian/changelog.old: $!\n";
|
||||
|
||||
open(NEWVERSION, '>debian/version') or die "Couldn't open debian/version for writing: $!\n";
|
||||
print NEWVERSION "$new_version\n";
|
||||
close NEWVERSION;
|
||||
|
||||
system('dpkg-buildpackage -b -rfakeroot -us -uc');
|
||||
unlink 'debian/version' or die "Couldn't unlink debian/version: $!\n";
|
||||
|
||||
10
debian/changelog
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
gtk+-cvs (19981116.01) unstable; urgency=low
|
||||
|
||||
* First test build from CVS
|
||||
|
||||
-- Ben Gertzfield <che@debian.org> Tue, 17 Nov 1998 12:02:13 -0800
|
||||
|
||||
Local variables:
|
||||
mode: debian-changelog
|
||||
add-log-mailing-address: "che@debian.org"
|
||||
End:
|
||||
81
debian/control
vendored
Normal file
@@ -0,0 +1,81 @@
|
||||
Source: gtk+-cvs
|
||||
Priority: extra
|
||||
Section: libs
|
||||
Maintainer: Ben Gertzfield <che@debian.org>
|
||||
Standards-Version: 2.4.0.0
|
||||
|
||||
Package: libgtk-cvs-1.1
|
||||
Architecture: any
|
||||
Section: libs
|
||||
Depends: ${shlibs:Depends}
|
||||
Conflicts: libgtk-dev (<< 1:1.0.2), libgtk1.1
|
||||
Description: CVS build of the GIMP Toolkit set of widgets for X
|
||||
**THIS IS NOT AN OFFICIAL DEBIAN PACKAGE! THIS IS AN AUTOMATED CVS
|
||||
BUILD OF THE GTK+ LIBRARIES! BEWARE! IT MAY NOT WORK!**
|
||||
.
|
||||
The GIMP Toolkit is a freely available set of widgets for X.
|
||||
GTK is easy to use, and has been implemented in such projects as
|
||||
The GNU Image Manipulation Program (The GIMP), GNOME, a GNU
|
||||
desktop set of utilities for X, and gzilla, a GNU web-browser.
|
||||
.
|
||||
This is the unstable 1.1 branch of GTK. It is not intended for use
|
||||
with stable projects!
|
||||
|
||||
Package: libgtk-cvs-dev
|
||||
Architecture: any
|
||||
Section: devel
|
||||
Depends: libgtk-cvs-1.1 (=${Source-Version}), libglib-cvs-dev
|
||||
Suggests: libgtk-cvs-doc
|
||||
Provides: libgtk1.1-dev
|
||||
Replaces: libgtk1.1-dev
|
||||
Conflicts: libgtk-dev, libgtk1 (<< 1:1.0.4), libgtk1.1-dev
|
||||
Description: CVS build of development files for the GIMP Toolkit
|
||||
**THIS IS NOT AN OFFICIAL DEBIAN PACKAGE! THIS IS AN AUTOMATED CVS
|
||||
BUILD OF THE GTK+ LIBRARIES! BEWARE! IT MAY NOT WORK!**
|
||||
.
|
||||
This package contains the header files and static libraries for the
|
||||
GIMP Toolkit set of widgets for X.
|
||||
.
|
||||
This is the unstable, 1.1 branch of GTK+. This is not intended for
|
||||
use with stable releases of programs!
|
||||
.
|
||||
Install this package if you wish to develop your own X programs using
|
||||
the GIMP Toolkit 1.1, or if you wish to compile your own plug-ins for
|
||||
The GIMP.
|
||||
|
||||
Package: libgtk-cvs-doc
|
||||
Architecture: all
|
||||
Section: doc
|
||||
Conflicts: libgtk-dev (<< 1:0.99.4), libgtk-doc, libgtk1.1-doc
|
||||
Description: CVS build of documentation for the GIMP Toolkit
|
||||
**THIS IS NOT AN OFFICIAL DEBIAN PACKAGE! THIS IS AN AUTOMATED CVS
|
||||
BUILD OF THE GTK+ LIBRARIES! BEWARE! IT MAY NOT WORK!**
|
||||
.
|
||||
This package contains lots of info-files, HTML docs, FAQs, and
|
||||
other handy documentation about the GIMP Toolkit set of widgets
|
||||
for X.
|
||||
.
|
||||
This package documents the unstable 1.1 release of the GIMP Toolkit.
|
||||
.
|
||||
Install this package if you want to have lots of info about the
|
||||
GIMP toolkit when you're programming.
|
||||
|
||||
Package: libgtk-cvs-dbg
|
||||
Architecture: any
|
||||
Section: devel
|
||||
Depends: libgtk-cvs-1.1 (= ${Source-Version}), libgtk-cvs-dev (= ${Source-Version})
|
||||
Suggests: libgtk-cvs-doc
|
||||
Conflicts: libgtk1.1-dbg
|
||||
Description: CVS build of debugging files for the GIMP Toolkit
|
||||
**THIS IS NOT AN OFFICIAL DEBIAN PACKAGE! THIS IS AN AUTOMATED CVS
|
||||
BUILD OF THE GTK+ LIBRARIES! BEWARE! IT MAY NOT WORK!**
|
||||
.
|
||||
This package contains the debugging static libraries for the
|
||||
GIMP Toolkit set of widgets for X.
|
||||
.
|
||||
This is the unstable, 1.1 branch of GTK+. This is not intended for
|
||||
use with stable releases of programs!
|
||||
.
|
||||
Install this package if you wish to debug your own X programs using
|
||||
the GIMP Toolkit 1.1, or if you wish to debug your own plug-ins for
|
||||
The GIMP.
|
||||
8
debian/copyright
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
This package was debianized by Ben Gertzfield <che@debian.org> on
|
||||
Tue, 17 Nov 1998 12:07:17 -0800
|
||||
|
||||
It was produced from the CVS repository at cvs.gimp.org.
|
||||
|
||||
It may be redistributed under the terms of the GNU LGPL, Version 2 or
|
||||
later, found on Debian systems in the file /usr/doc/copyright/LGPL.
|
||||
|
||||
9
debian/libgtk-cvs-dev.files
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
usr/lib/libgdk.so
|
||||
usr/lib/libgdk.a
|
||||
usr/lib/libgtk.so
|
||||
usr/lib/libgtk.a
|
||||
usr/include/gdk/
|
||||
usr/include/gtk/
|
||||
usr/bin/gtk-config
|
||||
usr/man/man1/gtk-config.1
|
||||
usr/share/aclocal/gtk.m4
|
||||
5
debian/libgtk-cvs-dev.postinst
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
#DEBHELPER#
|
||||
6
debian/libgtk-cvs-dev.prerm
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
install-info --quiet --remove gtk
|
||||
|
||||
#DEBHELPER#
|
||||
8
debian/libgtk-cvs-doc.files
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
usr/info/gdk.info
|
||||
usr/info/gtk.info
|
||||
usr/info/gtk.info-1
|
||||
usr/info/gtk.info-2
|
||||
usr/info/gtk.info-3
|
||||
usr/info/gtk.info-4
|
||||
usr/info/gtk.info-5
|
||||
|
||||
11
debian/libgtk-cvs-doc.postinst
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
install-info --quiet --description="The GIMP Toolkit." \
|
||||
--section "The GIMP" "The GIMP" /usr/info/gtk.info.gz
|
||||
|
||||
install-info --quiet --description="The GIMP Drawing Kit." \
|
||||
--section "The GIMP" "The GIMP" /usr/info/gdk.info.gz
|
||||
|
||||
#DEBHELPER#
|
||||
7
debian/libgtk-cvs-doc.prerm
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
install-info --quiet --remove gtk
|
||||
install-info --quiet --remove gdk
|
||||
|
||||
#DEBHELPER#
|
||||
7
debian/postinst
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
ldconfig
|
||||
|
||||
#DEBHELPER#
|
||||
160
debian/rules
vendored
Executable file
@@ -0,0 +1,160 @@
|
||||
#!/usr/bin/make -f
|
||||
|
||||
# debian/rules file for gtk+ Debian package
|
||||
# written April 1998 by Ben Gertzfield <che@debian.org
|
||||
|
||||
build: build-stamp
|
||||
build-stamp:
|
||||
dh_testdir
|
||||
./autogen.sh --prefix=/usr --with-xinput=xfree
|
||||
$(MAKE)
|
||||
cd docs && make distdocs
|
||||
cd ..
|
||||
touch build-stamp
|
||||
|
||||
build-dbg: build-dbg-stamp
|
||||
build-dbg-stamp:
|
||||
dh_testdir
|
||||
./configure --prefix=/usr --with-xinput=xfree --enable-debug=yes
|
||||
$(MAKE)
|
||||
touch build-dbg-stamp
|
||||
|
||||
clean:
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
rm -f build-stamp build-dbg-stamp install-stamp install-dbg-stamp
|
||||
# Add here commands to clean up after the build process.
|
||||
-$(MAKE) clean
|
||||
cd docs
|
||||
-$(MAKE) maintainer-clean
|
||||
cd ..
|
||||
-$(MAKE) distclean
|
||||
find . -name '*.o' -o -name '_libs' -o -name '*.lo' -o -name '*.a' -o -name '.deps' | xargs rm -rf
|
||||
dh_clean
|
||||
|
||||
clean-dbg:
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
rm -f build-stamp build-dbg-stamp install-stamp install-dbg-stamp
|
||||
# Add here commands to clean up after the build process.
|
||||
-$(MAKE) clean
|
||||
cd docs
|
||||
-$(MAKE) maintainer-clean
|
||||
cd ..
|
||||
-$(MAKE) distclean
|
||||
find . -name '*.o' -o -name '_libs' -o -name '*.lo' -o -name '*.a' -o -name '.deps' | xargs rm -rf
|
||||
dh_clean -k
|
||||
|
||||
install: install-stamp
|
||||
install-stamp: build
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_clean
|
||||
$(MAKE) prefix=`pwd`/debian/tmp/usr install
|
||||
touch install-stamp
|
||||
|
||||
install-dbg: install-dbg-stamp
|
||||
install-dbg-stamp: build-dbg
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_clean -k
|
||||
$(MAKE) prefix=`pwd`/debian/libgtk-cvs-dbg/usr install
|
||||
touch install-dbg-stamp
|
||||
|
||||
# Build architecture-independent files here.
|
||||
binary-indep: build install libgtk-cvs-doc
|
||||
# We have nothing to do by default.
|
||||
|
||||
# Build architecture-dependent files here.
|
||||
binary-arch: build install libgtk-cvs-dev libgtk-cvs-1.1 libgtk-cvs-dbg
|
||||
|
||||
libgtk-cvs-1.1: build
|
||||
dh_testdir -plibgtk-cvs-1.1
|
||||
dh_testroot -plibgtk-cvs-1.1
|
||||
dh_installdirs -plibgtk-cvs-1.1
|
||||
# Add here commands to install the files into debian/tmp
|
||||
rm -rf debian/tmp/usr/bin debian/tmp/usr/include debian/tmp/usr/info debian/tmp/usr/lib/glib debian/tmp/usr/share/aclocal debian/tmp/usr/man debian/tmp/usr/lib/*.la
|
||||
dh_installdocs -plibgtk-cvs-1.1
|
||||
dh_installchangelogs -plibgtk-cvs-1.1
|
||||
dh_strip -plibgtk-cvs-1.1
|
||||
dh_compress -plibgtk-cvs-1.1
|
||||
dh_fixperms -plibgtk-cvs-1.1
|
||||
dh_installdeb -plibgtk-cvs-1.1
|
||||
dh_shlibdeps -plibgtk-cvs-1.1
|
||||
dh_gencontrol -plibgtk-cvs-1.1
|
||||
dh_makeshlibs -plibgtk-cvs-1.1 -V 'libgtk-cvs-1.1 (='`cat debian/version`')'
|
||||
dh_md5sums -plibgtk-cvs-1.1
|
||||
dh_builddeb -plibgtk-cvs-1.1
|
||||
|
||||
libgtk-cvs-dev: build
|
||||
dh_testdir -plibgtk-cvs-dev
|
||||
dh_testroot -plibgtk-cvs-dev
|
||||
dh_clean -plibgtk-cvs-dev -k
|
||||
dh_installdirs -plibgtk-cvs-dev
|
||||
# Add here commands to install the files into debian/tmp
|
||||
dh_movefiles -plibgtk-cvs-dev
|
||||
cp gtk-config debian/tmp/usr/bin
|
||||
dh_installdocs -plibgtk-cvs-dev
|
||||
dh_installchangelogs -plibgtk-cvs-dev
|
||||
dh_strip -plibgtk-cvs-dev
|
||||
dh_compress -plibgtk-cvs-dev
|
||||
dh_fixperms -plibgtk-cvs-dev
|
||||
dh_installdeb -plibgtk-cvs-dev
|
||||
dh_shlibdeps -plibgtk-cvs-dev
|
||||
dh_gencontrol -plibgtk-cvs-dev
|
||||
dh_md5sums -plibgtk-cvs-dev
|
||||
dh_builddeb -plibgtk-cvs-dev
|
||||
|
||||
libgtk-cvs-doc:
|
||||
dh_testdir -plibgtk-cvs-doc
|
||||
dh_testroot -plibgtk-cvs-doc
|
||||
dh_clean -plibgtk-cvs-doc -k
|
||||
dh_installdirs -plibgtk-cvs-doc usr/doc/libgtk-cvs-doc/faq-html \
|
||||
usr/doc/libgtk-cvs-doc/tutorial-html usr/doc/libgtk-cvs-doc/italian-tutorial-html usr/doc/libgtk-cvs-doc/french-tutorial-html usr/doc/libgtk-cvs-doc/gdk-html
|
||||
dh_movefiles -plibgtk-cvs-doc
|
||||
cp docs/html/gtkfaq*.html debian/libgtk-cvs-doc/usr/doc/libgtk-cvs-doc/faq-html
|
||||
cp docs/html/gtk_tut-*.html debian/libgtk-cvs-doc/usr/doc/libgtk-cvs-doc/tutorial-html
|
||||
cp docs/html/*.gif debian/libgtk-cvs-doc/usr/doc/libgtk-cvs-doc/tutorial-html
|
||||
cp docs/html/gtk_tut.html debian/libgtk-cvs-doc/usr/doc/libgtk-cvs-doc/tutorial-html
|
||||
cp docs/html/gtk_tut_it*.html debian/libgtk-cvs-doc/usr/doc/libgtk-cvs-doc/italian-tutorial-html
|
||||
cp docs/html/*.gif debian/libgtk-cvs-doc/usr/doc/libgtk-cvs-doc/italian-tutorial-html
|
||||
cp docs/html/gtk_tut_fr*.html debian/libgtk-cvs-doc/usr/doc/libgtk-cvs-doc/french-tutorial-html
|
||||
cp docs/html/*.gif debian/libgtk-cvs-doc/usr/doc/libgtk-cvs-doc/french-tutorial-html
|
||||
cp docs/html/gdk* debian/libgtk-cvs-doc/usr/doc/libgtk-cvs-doc/gdk-html
|
||||
cp docs/text/*.txt debian/libgtk-cvs-doc/usr/doc/libgtk-cvs-doc/
|
||||
|
||||
dh_installdocs -plibgtk-cvs-doc docs/{debugging,developers,styles,text_widget,widget_system,gtk-config,refcounting}.txt TODO NEWS
|
||||
dh_installchangelogs -plibgtk-cvs-doc
|
||||
dh_strip -plibgtk-cvs-doc
|
||||
dh_compress -plibgtk-cvs-doc
|
||||
dh_fixperms -plibgtk-cvs-doc
|
||||
dh_installdeb -plibgtk-cvs-doc
|
||||
dh_shlibdeps -plibgtk-cvs-doc
|
||||
dh_gencontrol -plibgtk-cvs-doc
|
||||
dh_md5sums -plibgtk-cvs-doc
|
||||
dh_builddeb -plibgtk-cvs-doc
|
||||
|
||||
libgtk-cvs-dbg: clean-dbg install-dbg
|
||||
dh_testdir -plibgtk-cvs-dbg
|
||||
dh_testroot -plibgtk-cvs-dbg
|
||||
dh_installdirs -plibgtk-cvs-dbg
|
||||
# Add here commands to install the files into debian/libgtk-cvs-dbg
|
||||
rm -rf debian/libgtk-cvs-dbg/usr/bin debian/libgtk-cvs-dbg/usr/include debian/libgtk-cvs-dbg/usr/info debian/libgtk-cvs-dbg/usr/lib/glib debian/libgtk-cvs-dbg/usr/man debian/libgtk-cvs-dbg/usr/share debian/libgtk-cvs-dbg/usr/lib/*.{la,so*}
|
||||
for file in `find debian/libgtk-cvs-dbg/usr/lib -name '*.a'` ; do \
|
||||
mv $$file debian/libgtk-cvs-dbg/usr/lib/`basename $$file .a`_g.a; \
|
||||
done
|
||||
dh_installdocs -plibgtk-cvs-dbg
|
||||
dh_installchangelogs -plibgtk-cvs-dbg
|
||||
dh_compress -plibgtk-cvs-dbg
|
||||
dh_fixperms -plibgtk-cvs-dbg
|
||||
dh_installdeb -plibgtk-cvs-dbg
|
||||
dh_shlibdeps -plibgtk-cvs-dbg
|
||||
dh_gencontrol -plibgtk-cvs-dbg
|
||||
dh_md5sums -plibgtk-cvs-dbg
|
||||
dh_builddeb -plibgtk-cvs-dbg
|
||||
|
||||
source diff:
|
||||
@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
|
||||
|
||||
binary: binary-indep binary-arch
|
||||
.PHONY: build clean binary-indep binary-arch binary
|
||||
11
demos/.cvsignore
Normal file
@@ -0,0 +1,11 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
.libs
|
||||
.deps
|
||||
testanimation
|
||||
test-inline-pixbufs.h
|
||||
testpixbuf-drawable
|
||||
testpixbuf-scale
|
||||
testpixbuf-save
|
||||
testpixbuf
|
||||
pixbuf-demo
|
||||
73
demos/Makefile.am
Normal file
@@ -0,0 +1,73 @@
|
||||
## Makefile.am for gtk+/demos
|
||||
|
||||
SUBDIRS = gtk-demo
|
||||
|
||||
INCLUDES = @STRIP_BEGIN@ \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_builddir)/gdk \
|
||||
-DG_DISABLE_DEPRECATED \
|
||||
-DGDK_DISABLE_DEPRECATED \
|
||||
-DGDK_PIXBUF_DISABLE_DEPRECATED \
|
||||
-DGTK_DISABLE_DEPRECATED \
|
||||
@GTK_DEBUG_FLAGS@ \
|
||||
@GTK_DEP_CFLAGS@ \
|
||||
@STRIP_END@
|
||||
|
||||
DEPS = \
|
||||
$(top_builddir)/gdk-pixbuf/libgdk_pixbuf-$(GTK_API_VERSION).la \
|
||||
$(top_builddir)/gdk/@gdktargetlib@ \
|
||||
$(top_builddir)/gtk/@gtktargetlib@
|
||||
|
||||
LDADDS = @STRIP_BEGIN@ \
|
||||
$(top_builddir)/gdk-pixbuf/libgdk_pixbuf-$(GTK_API_VERSION).la \
|
||||
$(top_builddir)/gdk/@gdktargetlib@ \
|
||||
$(top_builddir)/gtk/@gtktargetlib@ \
|
||||
@STRIP_END@
|
||||
|
||||
noinst_PROGRAMS = \
|
||||
testpixbuf \
|
||||
testpixbuf-drawable \
|
||||
testanimation \
|
||||
testpixbuf-save \
|
||||
testpixbuf-scale \
|
||||
pixbuf-demo
|
||||
|
||||
test-inline-pixbufs.h: $(top_builddir)/gdk-pixbuf/gdk-pixbuf-csource$(EXEEXT) apple-red.png gnome-foot.png
|
||||
(topdir=`cd $(top_builddir) && pwd` ; curdir=`pwd` ; \
|
||||
cd $(srcdir) && \
|
||||
GDK_PIXBUF_MODULEDIR=$$topdir/gdk-pixbuf/.libs \
|
||||
$$topdir/gdk-pixbuf/gdk-pixbuf-csource --build-list \
|
||||
apple_red apple-red.png gnome_foot gnome-foot.png >$$curdir/test-inline-pixbufs.h)
|
||||
|
||||
testpixbuf_DEPENDENCIES = $(DEPS)
|
||||
testpixbuf_drawable_DEPENDENCIES = $(DEPS)
|
||||
testpixbuf_save_DEPENDENCIES = $(DEPS)
|
||||
testpixbuf_scale_DEPENDENCIES = $(DEPS)
|
||||
testanimation_DEPENDENCIES = $(DEPS)
|
||||
pixbuf_demo_DEPENDENCIES = $(DEPS)
|
||||
|
||||
testpixbuf_LDADD = $(LDADDS)
|
||||
testpixbuf_drawable_LDADD = $(LDADDS)
|
||||
testpixbuf_save_LDADD = $(LDADDS)
|
||||
testpixbuf_scale_LDADD = $(LDADDS)
|
||||
testanimation_LDADD = $(LDADDS)
|
||||
pixbuf_demo_LDADD = $(LDADDS)
|
||||
|
||||
testpixbuf_SOURCES = testpixbuf.c pixbuf-init.c
|
||||
$(testpixbuf_OBJECTS): test-inline-pixbufs.h
|
||||
testpixbuf_drawable_SOURCES = testpixbuf-drawable.c pixbuf-init.c
|
||||
testpixbuf_save_SOURCES = testpixbuf-save.c
|
||||
testpixbuf_scale_SOURCES = testpixbuf-scale.c pixbuf-init.c
|
||||
testanimation_SOURCES = testanimation.c pixbuf-init.c
|
||||
pixbuf_demo_SOURCES = pixbuf-demo.c pixbuf-init.c
|
||||
|
||||
EXTRA_DIST = \
|
||||
apple-red.png \
|
||||
background.jpg \
|
||||
gnome-applets.png \
|
||||
gnome-calendar.png \
|
||||
gnome-foot.png \
|
||||
gnome-gimp.png \
|
||||
gnome-gmush.png \
|
||||
gnome-gsame.png \
|
||||
gnu-keys.png
|
||||
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
BIN
demos/background.jpg
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
demos/gnome-applets.png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
demos/gnome-calendar.png
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
demos/gnome-foot.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
demos/gnome-gimp.png
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
demos/gnome-gmush.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
demos/gnome-gsame.png
Normal file
|
After Width: | Height: | Size: 4.2 KiB |
BIN
demos/gnu-keys.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
7
demos/gtk-demo/.cvsignore
Normal file
@@ -0,0 +1,7 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
.libs
|
||||
.deps
|
||||
gtk-demo
|
||||
demos.h
|
||||
|
||||
86
demos/gtk-demo/Makefile.am
Normal file
@@ -0,0 +1,86 @@
|
||||
## Makefile.am for gtk+/demos
|
||||
|
||||
democodedir=$(datadir)/gtk-2.0/demo
|
||||
|
||||
## These should be in the order you want them to appear in the
|
||||
## demo app, which means alphabetized by demo title, not filename
|
||||
demos = @STRIP_BEGIN@ \
|
||||
appwindow.c \
|
||||
button_box.c \
|
||||
colorsel.c \
|
||||
dialog.c \
|
||||
drawingarea.c \
|
||||
editable_cells.c \
|
||||
images.c \
|
||||
item_factory.c \
|
||||
list_store.c \
|
||||
menus.c \
|
||||
panes.c \
|
||||
pixbufs.c \
|
||||
sizegroup.c \
|
||||
stock_browser.c \
|
||||
textview.c \
|
||||
tree_store.c \
|
||||
multiscreen.c \
|
||||
multidisplay.c \
|
||||
virtualscreen.c \
|
||||
movedemo.c \
|
||||
@STRIP_END@
|
||||
|
||||
INCLUDES = @STRIP_BEGIN@ \
|
||||
-DDEMOCODEDIR="\"$(democodedir)\"" \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_builddir)/gdk \
|
||||
-DG_DISABLE_DEPRECATED \
|
||||
-DGDK_DISABLE_DEPRECATED \
|
||||
-DGDK_PIXBUF_DISABLE_DEPRECATED \
|
||||
-DGTK_DISABLE_DEPRECATED \
|
||||
@GTK_DEBUG_FLAGS@ \
|
||||
@GTK_DEP_CFLAGS@ \
|
||||
@STRIP_END@
|
||||
|
||||
DEPS = \
|
||||
$(top_builddir)/gdk-pixbuf/libgdk_pixbuf-$(GTK_API_VERSION).la \
|
||||
$(top_builddir)/gdk/@gdktargetlib@ \
|
||||
$(top_builddir)/gtk/@gtktargetlib@
|
||||
|
||||
LDADDS = @STRIP_BEGIN@ \
|
||||
$(top_builddir)/gdk-pixbuf/libgdk_pixbuf-$(GTK_API_VERSION).la \
|
||||
$(top_builddir)/gdk/@gdktargetlib@ \
|
||||
$(top_builddir)/gtk/@gtktargetlib@ \
|
||||
@STRIP_END@
|
||||
|
||||
bin_PROGRAMS = gtk-demo
|
||||
|
||||
BUILT_SOURCES = demos.h
|
||||
|
||||
EXTRA_DIST = \
|
||||
geninclude.pl \
|
||||
$(IMAGEFILES)
|
||||
|
||||
demos.h: $(demos) geninclude.pl
|
||||
(cd $(srcdir) && ./geninclude.pl $(demos) > demos.h)
|
||||
|
||||
gtk_demo_SOURCES = \
|
||||
$(demos) \
|
||||
demo-common.h \
|
||||
main.c \
|
||||
demos.h
|
||||
|
||||
gtk_demo_DEPENDENCIES = $(DEPS)
|
||||
gtk_demo_LDADD = $(LDADDS)
|
||||
|
||||
IMAGEFILES= alphatest.png \
|
||||
apple-red.png \
|
||||
background.jpg \
|
||||
floppybuddy.gif \
|
||||
gnome-applets.png \
|
||||
gnome-calendar.png \
|
||||
gnome-foot.png \
|
||||
gnome-gimp.png \
|
||||
gnome-gmush.png \
|
||||
gnome-gsame.png \
|
||||
gnu-keys.png \
|
||||
gtk-logo-rgb.gif
|
||||
|
||||
democode_DATA = $(demos) $(IMAGEFILES)
|
||||
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
@@ -1,544 +0,0 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
typedef GtkApplication DemoApplication;
|
||||
typedef GtkApplicationClass DemoApplicationClass;
|
||||
|
||||
G_DEFINE_TYPE (DemoApplication, demo_application, GTK_TYPE_APPLICATION)
|
||||
|
||||
typedef struct {
|
||||
GtkApplicationWindow parent_instance;
|
||||
|
||||
GtkWidget *message;
|
||||
GtkWidget *infobar;
|
||||
GtkWidget *status;
|
||||
GtkWidget *menutool;
|
||||
GMenuModel *toolmenu;
|
||||
GtkTextBuffer *buffer;
|
||||
|
||||
int width;
|
||||
int height;
|
||||
gboolean maximized;
|
||||
gboolean fullscreen;
|
||||
} DemoApplicationWindow;
|
||||
typedef GtkApplicationWindowClass DemoApplicationWindowClass;
|
||||
|
||||
G_DEFINE_TYPE (DemoApplicationWindow, demo_application_window, GTK_TYPE_APPLICATION_WINDOW)
|
||||
|
||||
static void create_window (GApplication *app, const char *contents);
|
||||
|
||||
static void
|
||||
show_action_dialog (GSimpleAction *action)
|
||||
{
|
||||
const gchar *name;
|
||||
GtkWidget *dialog;
|
||||
|
||||
name = g_action_get_name (G_ACTION (action));
|
||||
|
||||
dialog = gtk_message_dialog_new (NULL,
|
||||
GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||
GTK_MESSAGE_INFO,
|
||||
GTK_BUTTONS_CLOSE,
|
||||
"You activated action: \"%s\"",
|
||||
name);
|
||||
|
||||
g_signal_connect (dialog, "response",
|
||||
G_CALLBACK (gtk_widget_destroy), NULL);
|
||||
|
||||
gtk_widget_show (dialog);
|
||||
}
|
||||
|
||||
static void
|
||||
show_action_infobar (GSimpleAction *action,
|
||||
GVariant *parameter,
|
||||
gpointer data)
|
||||
{
|
||||
DemoApplicationWindow *window = data;
|
||||
gchar *text;
|
||||
const gchar *name;
|
||||
const gchar *value;
|
||||
|
||||
name = g_action_get_name (G_ACTION (action));
|
||||
value = g_variant_get_string (parameter, NULL);
|
||||
|
||||
text = g_strdup_printf ("You activated radio action: \"%s\".\n"
|
||||
"Current value: %s", name, value);
|
||||
gtk_label_set_text (GTK_LABEL (window->message), text);
|
||||
gtk_widget_show (window->infobar);
|
||||
g_free (text);
|
||||
}
|
||||
|
||||
static void
|
||||
activate_action (GSimpleAction *action,
|
||||
GVariant *parameter,
|
||||
gpointer user_data)
|
||||
{
|
||||
show_action_dialog (action);
|
||||
}
|
||||
|
||||
static void
|
||||
activate_new (GSimpleAction *action,
|
||||
GVariant *parameter,
|
||||
gpointer user_data)
|
||||
{
|
||||
GApplication *app = user_data;
|
||||
|
||||
create_window (app, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
open_response_cb (GtkNativeDialog *dialog,
|
||||
gint response_id,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkFileChooserNative *native = user_data;
|
||||
GApplication *app = g_object_get_data (G_OBJECT (native), "app");
|
||||
GtkWidget *message_dialog;
|
||||
GFile *file;
|
||||
char *contents;
|
||||
GError *error = NULL;
|
||||
|
||||
if (response_id == GTK_RESPONSE_ACCEPT)
|
||||
{
|
||||
file = gtk_file_chooser_get_file (GTK_FILE_CHOOSER (native));
|
||||
|
||||
if (g_file_load_contents (file, NULL, &contents, NULL, NULL, &error))
|
||||
{
|
||||
create_window (app, contents);
|
||||
g_free (contents);
|
||||
}
|
||||
else
|
||||
{
|
||||
message_dialog = gtk_message_dialog_new (NULL,
|
||||
GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||
GTK_MESSAGE_ERROR,
|
||||
GTK_BUTTONS_CLOSE,
|
||||
"Error loading file: \"%s\"",
|
||||
error->message);
|
||||
g_signal_connect (message_dialog, "response",
|
||||
G_CALLBACK (gtk_widget_destroy), NULL);
|
||||
gtk_widget_show (message_dialog);
|
||||
g_error_free (error);
|
||||
}
|
||||
}
|
||||
|
||||
gtk_native_dialog_destroy (GTK_NATIVE_DIALOG (native));
|
||||
g_object_unref (native);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
activate_open (GSimpleAction *action,
|
||||
GVariant *parameter,
|
||||
gpointer user_data)
|
||||
{
|
||||
GApplication *app = user_data;
|
||||
GtkFileChooserNative *native;
|
||||
|
||||
native = gtk_file_chooser_native_new ("Open File",
|
||||
NULL,
|
||||
GTK_FILE_CHOOSER_ACTION_OPEN,
|
||||
"_Open",
|
||||
"_Cancel");
|
||||
|
||||
g_object_set_data_full (G_OBJECT (native), "app", g_object_ref (app), g_object_unref);
|
||||
g_signal_connect (native,
|
||||
"response",
|
||||
G_CALLBACK (open_response_cb),
|
||||
native);
|
||||
|
||||
gtk_native_dialog_show (GTK_NATIVE_DIALOG (native));
|
||||
}
|
||||
|
||||
static void
|
||||
activate_toggle (GSimpleAction *action,
|
||||
GVariant *parameter,
|
||||
gpointer user_data)
|
||||
{
|
||||
GVariant *state;
|
||||
|
||||
show_action_dialog (action);
|
||||
|
||||
state = g_action_get_state (G_ACTION (action));
|
||||
g_action_change_state (G_ACTION (action), g_variant_new_boolean (!g_variant_get_boolean (state)));
|
||||
g_variant_unref (state);
|
||||
}
|
||||
|
||||
static void
|
||||
activate_radio (GSimpleAction *action,
|
||||
GVariant *parameter,
|
||||
gpointer user_data)
|
||||
{
|
||||
show_action_infobar (action, parameter, user_data);
|
||||
|
||||
g_action_change_state (G_ACTION (action), parameter);
|
||||
}
|
||||
|
||||
static void
|
||||
activate_about (GSimpleAction *action,
|
||||
GVariant *parameter,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkWidget *window = user_data;
|
||||
|
||||
const gchar *authors[] = {
|
||||
"Peter Mattis",
|
||||
"Spencer Kimball",
|
||||
"Josh MacDonald",
|
||||
"and many more...",
|
||||
NULL
|
||||
};
|
||||
|
||||
const gchar *documentors[] = {
|
||||
"Owen Taylor",
|
||||
"Tony Gale",
|
||||
"Matthias Clasen <mclasen@redhat.com>",
|
||||
"and many more...",
|
||||
NULL
|
||||
};
|
||||
|
||||
gtk_show_about_dialog (GTK_WINDOW (window),
|
||||
"program-name", "GTK+ Code Demos",
|
||||
"version", g_strdup_printf ("%s,\nRunning against GTK+ %d.%d.%d",
|
||||
PACKAGE_VERSION,
|
||||
gtk_get_major_version (),
|
||||
gtk_get_minor_version (),
|
||||
gtk_get_micro_version ()),
|
||||
"copyright", "(C) 1997-2013 The GTK+ Team",
|
||||
"license-type", GTK_LICENSE_LGPL_2_1,
|
||||
"website", "http://www.gtk.org",
|
||||
"comments", "Program to demonstrate GTK+ functions.",
|
||||
"authors", authors,
|
||||
"documenters", documentors,
|
||||
"logo-icon-name", "gtk3-demo",
|
||||
"title", "About GTK+ Code Demos",
|
||||
NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
activate_quit (GSimpleAction *action,
|
||||
GVariant *parameter,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkApplication *app = user_data;
|
||||
GtkWidget *win;
|
||||
GList *list, *next;
|
||||
|
||||
list = gtk_application_get_windows (app);
|
||||
while (list)
|
||||
{
|
||||
win = list->data;
|
||||
next = list->next;
|
||||
|
||||
gtk_widget_destroy (GTK_WIDGET (win));
|
||||
|
||||
list = next;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
update_statusbar (GtkTextBuffer *buffer,
|
||||
DemoApplicationWindow *window)
|
||||
{
|
||||
gchar *msg;
|
||||
gint row, col;
|
||||
gint count;
|
||||
GtkTextIter iter;
|
||||
|
||||
/* clear any previous message, underflow is allowed */
|
||||
gtk_statusbar_pop (GTK_STATUSBAR (window->status), 0);
|
||||
|
||||
count = gtk_text_buffer_get_char_count (buffer);
|
||||
|
||||
gtk_text_buffer_get_iter_at_mark (buffer,
|
||||
&iter,
|
||||
gtk_text_buffer_get_insert (buffer));
|
||||
|
||||
row = gtk_text_iter_get_line (&iter);
|
||||
col = gtk_text_iter_get_line_offset (&iter);
|
||||
|
||||
msg = g_strdup_printf ("Cursor at row %d column %d - %d chars in document",
|
||||
row, col, count);
|
||||
|
||||
gtk_statusbar_push (GTK_STATUSBAR (window->status), 0, msg);
|
||||
|
||||
g_free (msg);
|
||||
}
|
||||
|
||||
static void
|
||||
mark_set_callback (GtkTextBuffer *buffer,
|
||||
const GtkTextIter *new_location,
|
||||
GtkTextMark *mark,
|
||||
DemoApplicationWindow *window)
|
||||
{
|
||||
update_statusbar (buffer, window);
|
||||
}
|
||||
|
||||
static void
|
||||
change_theme_state (GSimpleAction *action,
|
||||
GVariant *state,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkSettings *settings = gtk_settings_get_default ();
|
||||
|
||||
g_object_set (G_OBJECT (settings),
|
||||
"gtk-application-prefer-dark-theme",
|
||||
g_variant_get_boolean (state),
|
||||
NULL);
|
||||
|
||||
g_simple_action_set_state (action, state);
|
||||
}
|
||||
|
||||
static void
|
||||
change_titlebar_state (GSimpleAction *action,
|
||||
GVariant *state,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkWindow *window = user_data;
|
||||
|
||||
gtk_window_set_hide_titlebar_when_maximized (GTK_WINDOW (window),
|
||||
g_variant_get_boolean (state));
|
||||
|
||||
g_simple_action_set_state (action, state);
|
||||
}
|
||||
|
||||
static void
|
||||
change_radio_state (GSimpleAction *action,
|
||||
GVariant *state,
|
||||
gpointer user_data)
|
||||
{
|
||||
g_simple_action_set_state (action, state);
|
||||
}
|
||||
|
||||
static GActionEntry app_entries[] = {
|
||||
{ "new", activate_new, NULL, NULL, NULL },
|
||||
{ "open", activate_open, NULL, NULL, NULL },
|
||||
{ "save", activate_action, NULL, NULL, NULL },
|
||||
{ "save-as", activate_action, NULL, NULL, NULL },
|
||||
{ "quit", activate_quit, NULL, NULL, NULL },
|
||||
{ "dark", activate_toggle, NULL, "false", change_theme_state }
|
||||
};
|
||||
|
||||
static GActionEntry win_entries[] = {
|
||||
{ "titlebar", activate_toggle, NULL, "false", change_titlebar_state },
|
||||
{ "shape", activate_radio, "s", "'oval'", change_radio_state },
|
||||
{ "bold", activate_toggle, NULL, "false", NULL },
|
||||
{ "about", activate_about, NULL, NULL, NULL },
|
||||
{ "file1", activate_action, NULL, NULL, NULL },
|
||||
{ "logo", activate_action, NULL, NULL, NULL }
|
||||
};
|
||||
|
||||
static void
|
||||
clicked_cb (GtkWidget *widget, DemoApplicationWindow *window)
|
||||
{
|
||||
gtk_widget_hide (window->infobar);
|
||||
}
|
||||
|
||||
static void
|
||||
startup (GApplication *app)
|
||||
{
|
||||
GtkBuilder *builder;
|
||||
GMenuModel *appmenu;
|
||||
GMenuModel *menubar;
|
||||
|
||||
G_APPLICATION_CLASS (demo_application_parent_class)->startup (app);
|
||||
|
||||
builder = gtk_builder_new ();
|
||||
gtk_builder_add_from_resource (builder, "/application_demo/menus.ui", NULL);
|
||||
|
||||
appmenu = (GMenuModel *)gtk_builder_get_object (builder, "appmenu");
|
||||
menubar = (GMenuModel *)gtk_builder_get_object (builder, "menubar");
|
||||
|
||||
gtk_application_set_app_menu (GTK_APPLICATION (app), appmenu);
|
||||
gtk_application_set_menubar (GTK_APPLICATION (app), menubar);
|
||||
|
||||
g_object_unref (builder);
|
||||
}
|
||||
|
||||
static void
|
||||
create_window (GApplication *app,
|
||||
const char *content)
|
||||
{
|
||||
DemoApplicationWindow *window;
|
||||
|
||||
window = (DemoApplicationWindow *)g_object_new (demo_application_window_get_type (),
|
||||
"application", app,
|
||||
NULL);
|
||||
if (content)
|
||||
gtk_text_buffer_set_text (window->buffer, content, -1);
|
||||
|
||||
gtk_window_present (GTK_WINDOW (window));
|
||||
}
|
||||
|
||||
static void
|
||||
activate (GApplication *app)
|
||||
{
|
||||
create_window (app, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
demo_application_init (DemoApplication *app)
|
||||
{
|
||||
GSettings *settings;
|
||||
GAction *action;
|
||||
|
||||
settings = g_settings_new ("org.gtk.Demo");
|
||||
|
||||
g_action_map_add_action_entries (G_ACTION_MAP (app),
|
||||
app_entries, G_N_ELEMENTS (app_entries),
|
||||
app);
|
||||
|
||||
action = g_settings_create_action (settings, "color");
|
||||
|
||||
g_action_map_add_action (G_ACTION_MAP (app), action);
|
||||
|
||||
g_object_unref (settings);
|
||||
}
|
||||
|
||||
static void
|
||||
demo_application_class_init (DemoApplicationClass *class)
|
||||
{
|
||||
GApplicationClass *app_class = G_APPLICATION_CLASS (class);
|
||||
|
||||
app_class->startup = startup;
|
||||
app_class->activate = activate;
|
||||
}
|
||||
|
||||
static void
|
||||
demo_application_window_store_state (DemoApplicationWindow *win)
|
||||
{
|
||||
GSettings *settings;
|
||||
|
||||
settings = g_settings_new ("org.gtk.Demo");
|
||||
g_settings_set (settings, "window-size", "(ii)", win->width, win->height);
|
||||
g_settings_set_boolean (settings, "maximized", win->maximized);
|
||||
g_settings_set_boolean (settings, "fullscreen", win->fullscreen);
|
||||
g_object_unref (settings);
|
||||
}
|
||||
|
||||
static void
|
||||
demo_application_window_load_state (DemoApplicationWindow *win)
|
||||
{
|
||||
GSettings *settings;
|
||||
|
||||
settings = g_settings_new ("org.gtk.Demo");
|
||||
g_settings_get (settings, "window-size", "(ii)", &win->width, &win->height);
|
||||
win->maximized = g_settings_get_boolean (settings, "maximized");
|
||||
win->fullscreen = g_settings_get_boolean (settings, "fullscreen");
|
||||
g_object_unref (settings);
|
||||
}
|
||||
|
||||
static void
|
||||
demo_application_window_init (DemoApplicationWindow *window)
|
||||
{
|
||||
GtkWidget *menu;
|
||||
|
||||
window->width = -1;
|
||||
window->height = -1;
|
||||
window->maximized = FALSE;
|
||||
window->fullscreen = FALSE;
|
||||
|
||||
gtk_widget_init_template (GTK_WIDGET (window));
|
||||
|
||||
menu = gtk_menu_new_from_model (window->toolmenu);
|
||||
gtk_menu_tool_button_set_menu (GTK_MENU_TOOL_BUTTON (window->menutool), menu);
|
||||
|
||||
g_action_map_add_action_entries (G_ACTION_MAP (window),
|
||||
win_entries, G_N_ELEMENTS (win_entries),
|
||||
window);
|
||||
}
|
||||
|
||||
static void
|
||||
demo_application_window_constructed (GObject *object)
|
||||
{
|
||||
DemoApplicationWindow *window = (DemoApplicationWindow *)object;
|
||||
|
||||
demo_application_window_load_state (window);
|
||||
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), window->width, window->height);
|
||||
|
||||
if (window->maximized)
|
||||
gtk_window_maximize (GTK_WINDOW (window));
|
||||
|
||||
if (window->fullscreen)
|
||||
gtk_window_fullscreen (GTK_WINDOW (window));
|
||||
|
||||
G_OBJECT_CLASS (demo_application_window_parent_class)->constructed (object);
|
||||
}
|
||||
|
||||
static void
|
||||
demo_application_window_size_allocate (GtkWidget *widget,
|
||||
GtkAllocation *allocation)
|
||||
{
|
||||
DemoApplicationWindow *window = (DemoApplicationWindow *)widget;
|
||||
|
||||
GTK_WIDGET_CLASS (demo_application_window_parent_class)->size_allocate (widget, allocation);
|
||||
|
||||
if (!window->maximized && !window->fullscreen)
|
||||
gtk_window_get_size (GTK_WINDOW (window), &window->width, &window->height);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
demo_application_window_state_event (GtkWidget *widget,
|
||||
GdkEventWindowState *event)
|
||||
{
|
||||
DemoApplicationWindow *window = (DemoApplicationWindow *)widget;
|
||||
gboolean res = GDK_EVENT_PROPAGATE;
|
||||
|
||||
if (GTK_WIDGET_CLASS (demo_application_window_parent_class)->window_state_event)
|
||||
res = GTK_WIDGET_CLASS (demo_application_window_parent_class)->window_state_event (widget, event);
|
||||
|
||||
window->maximized = (event->new_window_state & GDK_WINDOW_STATE_MAXIMIZED) != 0;
|
||||
window->fullscreen = (event->new_window_state & GDK_WINDOW_STATE_FULLSCREEN) != 0;
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
static void
|
||||
demo_application_window_destroy (GtkWidget *widget)
|
||||
{
|
||||
DemoApplicationWindow *window = (DemoApplicationWindow *)widget;
|
||||
|
||||
demo_application_window_store_state (window);
|
||||
|
||||
GTK_WIDGET_CLASS (demo_application_window_parent_class)->destroy (widget);
|
||||
}
|
||||
|
||||
static void
|
||||
demo_application_window_class_init (DemoApplicationWindowClass *class)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (class);
|
||||
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class);
|
||||
|
||||
object_class->constructed = demo_application_window_constructed;
|
||||
|
||||
widget_class->size_allocate = demo_application_window_size_allocate;
|
||||
widget_class->window_state_event = demo_application_window_state_event;
|
||||
widget_class->destroy = demo_application_window_destroy;
|
||||
|
||||
gtk_widget_class_set_template_from_resource (widget_class, "/application_demo/application.ui");
|
||||
gtk_widget_class_bind_template_child (widget_class, DemoApplicationWindow, message);
|
||||
gtk_widget_class_bind_template_child (widget_class, DemoApplicationWindow, infobar);
|
||||
gtk_widget_class_bind_template_child (widget_class, DemoApplicationWindow, status);
|
||||
gtk_widget_class_bind_template_child (widget_class, DemoApplicationWindow, buffer);
|
||||
gtk_widget_class_bind_template_child (widget_class, DemoApplicationWindow, menutool);
|
||||
gtk_widget_class_bind_template_child (widget_class, DemoApplicationWindow, toolmenu);
|
||||
gtk_widget_class_bind_template_callback (widget_class, clicked_cb);
|
||||
gtk_widget_class_bind_template_callback (widget_class, update_statusbar);
|
||||
gtk_widget_class_bind_template_callback (widget_class, mark_set_callback);
|
||||
}
|
||||
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
GtkApplication *app;
|
||||
|
||||
app = GTK_APPLICATION (g_object_new (demo_application_get_type (),
|
||||
"application-id", "org.gtk.Demo2",
|
||||
"flags", G_APPLICATION_HANDLES_OPEN,
|
||||
NULL));
|
||||
|
||||
return g_application_run (G_APPLICATION (app), 0, NULL);
|
||||
}
|
||||
@@ -1,123 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<interface>
|
||||
<template class="DemoApplicationWindow" parent="GtkApplicationWindow">
|
||||
<property name="title" translatable="yes">Application Class</property>
|
||||
<property name="default-width">200</property>
|
||||
<property name="default-height">200</property>
|
||||
<property name="icon-name">document-open</property>
|
||||
<child>
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">1</property>
|
||||
<child>
|
||||
<object class="GtkToolbar">
|
||||
<property name="visible">1</property>
|
||||
<property name="hexpand">1</property>
|
||||
<style>
|
||||
<class name="primary-toolbar"/>
|
||||
</style>
|
||||
<child>
|
||||
<object class="GtkMenuToolButton" id="menutool">
|
||||
<property name="visible">1</property>
|
||||
<property name="icon-name">document-open</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolButton">
|
||||
<property name="visible">1</property>
|
||||
<property name="icon-name">application-exit</property>
|
||||
<property name="action-name">app.quit</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparatorToolItem">
|
||||
<property name="visible">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolButton">
|
||||
<property name="visible">1</property>
|
||||
<property name="icon-name">applications-other</property>
|
||||
<property name="action-name">win.logo</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkInfoBar" id="infobar">
|
||||
<property name="no-show-all">1</property>
|
||||
<property name="hexpand">1</property>
|
||||
<child internal-child="content_area">
|
||||
<object class="GtkBox" id="content_area">
|
||||
<child>
|
||||
<object class="GtkLabel" id="message">
|
||||
<property name="visible">1</property>
|
||||
<property name="hexpand">1</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child internal-child="action_area">
|
||||
<object class="GtkBox">
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="visible">1</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="label" translatable="yes">_OK</property>
|
||||
<property name="use_underline">1</property>
|
||||
<signal name="clicked" handler="clicked_cb"/>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow">
|
||||
<property name="visible">1</property>
|
||||
<property name="shadow-type">in</property>
|
||||
<child>
|
||||
<object class="GtkTextView">
|
||||
<property name="visible">1</property>
|
||||
<property name="hexpand">1</property>
|
||||
<property name="vexpand">1</property>
|
||||
<property name="buffer">buffer</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkStatusbar" id="status">
|
||||
<property name="hexpand">1</property>
|
||||
<property name="visible">1</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</template>
|
||||
<menu id="toolmenu">
|
||||
<item>
|
||||
<attribute name="label">File1</attribute>
|
||||
<attribute name="action">win.file1</attribute>
|
||||
</item>
|
||||
</menu>
|
||||
<object class="GtkTextBuffer" id="buffer">
|
||||
<signal name="changed" handler="update_statusbar"/>
|
||||
<signal name="mark-set" handler="mark_set_callback"/>
|
||||
</object>
|
||||
</interface>
|
||||
@@ -1,95 +0,0 @@
|
||||
/* Application Class
|
||||
*
|
||||
* Demonstrates a simple application.
|
||||
*
|
||||
* This example uses GtkApplication, GtkApplicationWindow, GtkBuilder
|
||||
* as well as GMenu and GResource. Due to the way GtkApplication is structured,
|
||||
* it is run as a separate process.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
static gboolean name_seen;
|
||||
static GtkWidget *placeholder;
|
||||
|
||||
static void
|
||||
on_name_appeared (GDBusConnection *connection,
|
||||
const gchar *name,
|
||||
const gchar *name_owner,
|
||||
gpointer user_data)
|
||||
{
|
||||
name_seen = TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
on_name_vanished (GDBusConnection *connection,
|
||||
const gchar *name,
|
||||
gpointer user_data)
|
||||
{
|
||||
if (!name_seen)
|
||||
return;
|
||||
|
||||
if (placeholder)
|
||||
{
|
||||
gtk_widget_destroy (placeholder);
|
||||
g_object_unref (placeholder);
|
||||
placeholder = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
#define APP_EXTENSION ".exe"
|
||||
#else
|
||||
#define APP_EXTENSION
|
||||
#endif
|
||||
|
||||
GtkWidget *
|
||||
do_application_demo (GtkWidget *toplevel)
|
||||
{
|
||||
static guint watch = 0;
|
||||
|
||||
if (watch == 0)
|
||||
watch = g_bus_watch_name (G_BUS_TYPE_SESSION,
|
||||
"org.gtk.Demo2",
|
||||
0,
|
||||
on_name_appeared,
|
||||
on_name_vanished,
|
||||
NULL, NULL);
|
||||
|
||||
if (placeholder == NULL)
|
||||
{
|
||||
const gchar *command;
|
||||
GError *error = NULL;
|
||||
|
||||
if (g_file_test ("./gtk3-demo-application" APP_EXTENSION, G_FILE_TEST_IS_EXECUTABLE))
|
||||
command = "./gtk3-demo-application" APP_EXTENSION;
|
||||
else
|
||||
command = "gtk3-demo-application";
|
||||
|
||||
if (!g_spawn_command_line_async (command, &error))
|
||||
{
|
||||
g_warning ("%s", error->message);
|
||||
g_error_free (error);
|
||||
}
|
||||
|
||||
placeholder = gtk_label_new ("");
|
||||
g_object_ref_sink (placeholder);
|
||||
}
|
||||
else
|
||||
{
|
||||
g_dbus_connection_call_sync (g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL),
|
||||
"org.gtk.Demo2",
|
||||
"/org/gtk/Demo2",
|
||||
"org.gtk.Actions",
|
||||
"Activate",
|
||||
g_variant_new ("(sava{sv})", "quit", NULL, NULL),
|
||||
NULL,
|
||||
0,
|
||||
G_MAXINT,
|
||||
NULL, NULL);
|
||||
}
|
||||
|
||||
return placeholder;
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<!-- interface-requires gtk+ 3.10 -->
|
||||
<menu id="appmenu">
|
||||
<section>
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">About</attribute>
|
||||
<attribute name="action">app.about</attribute>
|
||||
</item>
|
||||
</section>
|
||||
<section>
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">_Quit</attribute>
|
||||
<attribute name="action">app.quit</attribute>
|
||||
<attribute name="accel"><Primary>q</attribute>
|
||||
</item>
|
||||
</section>
|
||||
</menu>
|
||||
</interface>
|
||||
354
demos/gtk-demo/appwindow.c
Normal file
@@ -0,0 +1,354 @@
|
||||
/* Application main window
|
||||
*
|
||||
* Demonstrates a typical application window, with menubar, toolbar, statusbar.
|
||||
*/
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include "demo-common.h"
|
||||
#include <stdio.h>
|
||||
|
||||
static void
|
||||
menuitem_cb (gpointer callback_data,
|
||||
guint callback_action,
|
||||
GtkWidget *widget)
|
||||
{
|
||||
GtkWidget *dialog;
|
||||
|
||||
dialog = gtk_message_dialog_new (GTK_WINDOW (callback_data),
|
||||
GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||
GTK_MESSAGE_INFO,
|
||||
GTK_BUTTONS_CLOSE,
|
||||
"You selected or toggled the menu item: \"%s\"",
|
||||
gtk_item_factory_path_from_widget (widget));
|
||||
|
||||
/* Close dialog on user response */
|
||||
g_signal_connect (G_OBJECT (dialog),
|
||||
"response",
|
||||
G_CALLBACK (gtk_widget_destroy),
|
||||
NULL);
|
||||
|
||||
gtk_widget_show (dialog);
|
||||
}
|
||||
|
||||
|
||||
static GtkItemFactoryEntry menu_items[] =
|
||||
{
|
||||
{ "/_File", NULL, 0, 0, "<Branch>" },
|
||||
{ "/File/_New", "<control>N", menuitem_cb, 0, "<StockItem>", GTK_STOCK_NEW },
|
||||
{ "/File/_Open", "<control>O", menuitem_cb, 0, "<StockItem>", GTK_STOCK_OPEN },
|
||||
{ "/File/_Save", "<control>S", menuitem_cb, 0, "<StockItem>", GTK_STOCK_SAVE },
|
||||
{ "/File/Save _As...", NULL, menuitem_cb, 0, "<StockItem>", GTK_STOCK_SAVE },
|
||||
{ "/File/sep1", NULL, menuitem_cb, 0, "<Separator>" },
|
||||
{ "/File/_Quit", "<control>Q", menuitem_cb, 0, "<StockItem>", GTK_STOCK_QUIT },
|
||||
|
||||
{ "/_Preferences", NULL, 0, 0, "<Branch>" },
|
||||
{ "/_Preferences/_Color", NULL, 0, 0, "<Branch>" },
|
||||
{ "/_Preferences/Color/_Red", NULL, menuitem_cb, 0, "<RadioItem>" },
|
||||
{ "/_Preferences/Color/_Green", NULL, menuitem_cb, 0, "/Preferences/Color/Red" },
|
||||
{ "/_Preferences/Color/_Blue", NULL, menuitem_cb, 0, "/Preferences/Color/Red" },
|
||||
{ "/_Preferences/_Shape", NULL, 0, 0, "<Branch>" },
|
||||
{ "/_Preferences/Shape/_Square", NULL, menuitem_cb, 0, "<RadioItem>" },
|
||||
{ "/_Preferences/Shape/_Rectangle", NULL, menuitem_cb, 0, "/Preferences/Shape/Square" },
|
||||
{ "/_Preferences/Shape/_Oval", NULL, menuitem_cb, 0, "/Preferences/Shape/Rectangle" },
|
||||
|
||||
/* If you wanted this to be right justified you would use "<LastBranch>", not "<Branch>".
|
||||
* Right justified help menu items are generally considered a bad idea now days.
|
||||
*/
|
||||
{ "/_Help", NULL, 0, 0, "<Branch>" },
|
||||
{ "/Help/_About", NULL, menuitem_cb, 0 },
|
||||
};
|
||||
|
||||
static void
|
||||
toolbar_cb (GtkWidget *button,
|
||||
gpointer data)
|
||||
{
|
||||
GtkWidget *dialog;
|
||||
|
||||
dialog = gtk_message_dialog_new (GTK_WINDOW (data),
|
||||
GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||
GTK_MESSAGE_INFO,
|
||||
GTK_BUTTONS_CLOSE,
|
||||
"You selected a toolbar button");
|
||||
|
||||
/* Close dialog on user response */
|
||||
g_signal_connect (G_OBJECT (dialog),
|
||||
"response",
|
||||
G_CALLBACK (gtk_widget_destroy),
|
||||
NULL);
|
||||
|
||||
gtk_widget_show (dialog);
|
||||
}
|
||||
|
||||
/* This function registers our custom toolbar icons, so they can be themed.
|
||||
*
|
||||
* It's totally optional to do this, you could just manually insert icons
|
||||
* and have them not be themeable, especially if you never expect people
|
||||
* to theme your app.
|
||||
*/
|
||||
static void
|
||||
register_stock_icons (void)
|
||||
{
|
||||
static gboolean registered = FALSE;
|
||||
|
||||
if (!registered)
|
||||
{
|
||||
GdkPixbuf *pixbuf;
|
||||
GtkIconFactory *factory;
|
||||
char *filename;
|
||||
|
||||
static GtkStockItem items[] = {
|
||||
{ "demo-gtk-logo",
|
||||
"_GTK!",
|
||||
0, 0, NULL }
|
||||
};
|
||||
|
||||
registered = TRUE;
|
||||
|
||||
/* Register our stock items */
|
||||
gtk_stock_add (items, G_N_ELEMENTS (items));
|
||||
|
||||
/* Add our custom icon factory to the list of defaults */
|
||||
factory = gtk_icon_factory_new ();
|
||||
gtk_icon_factory_add_default (factory);
|
||||
|
||||
/* demo_find_file() looks in the the current directory first,
|
||||
* so you can run gtk-demo without installing GTK, then looks
|
||||
* in the location where the file is installed.
|
||||
*/
|
||||
pixbuf = NULL;
|
||||
filename = demo_find_file ("gtk-logo-rgb.gif", NULL);
|
||||
if (filename)
|
||||
{
|
||||
pixbuf = gdk_pixbuf_new_from_file (filename, NULL);
|
||||
g_free (filename);
|
||||
}
|
||||
|
||||
/* Register icon to accompany stock item */
|
||||
if (pixbuf != NULL)
|
||||
{
|
||||
GtkIconSet *icon_set;
|
||||
GdkPixbuf *transparent;
|
||||
|
||||
/* The gtk-logo-rgb icon has a white background, make it transparent */
|
||||
transparent = gdk_pixbuf_add_alpha (pixbuf, TRUE, 0xff, 0xff, 0xff);
|
||||
|
||||
icon_set = gtk_icon_set_new_from_pixbuf (transparent);
|
||||
gtk_icon_factory_add (factory, "demo-gtk-logo", icon_set);
|
||||
gtk_icon_set_unref (icon_set);
|
||||
g_object_unref (G_OBJECT (pixbuf));
|
||||
g_object_unref (G_OBJECT (transparent));
|
||||
}
|
||||
else
|
||||
g_warning ("failed to load GTK logo for toolbar");
|
||||
|
||||
/* Drop our reference to the factory, GTK will hold a reference. */
|
||||
g_object_unref (G_OBJECT (factory));
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
update_statusbar (GtkTextBuffer *buffer,
|
||||
GtkStatusbar *statusbar)
|
||||
{
|
||||
gchar *msg;
|
||||
gint row, col;
|
||||
gint count;
|
||||
GtkTextIter iter;
|
||||
|
||||
gtk_statusbar_pop (statusbar, 0); /* clear any previous message, underflow is allowed */
|
||||
|
||||
count = gtk_text_buffer_get_char_count (buffer);
|
||||
|
||||
gtk_text_buffer_get_iter_at_mark (buffer,
|
||||
&iter,
|
||||
gtk_text_buffer_get_insert (buffer));
|
||||
|
||||
row = gtk_text_iter_get_line (&iter);
|
||||
col = gtk_text_iter_get_line_offset (&iter);
|
||||
|
||||
msg = g_strdup_printf ("Cursor at row %d column %d - %d chars in document",
|
||||
row, col, count);
|
||||
|
||||
gtk_statusbar_push (statusbar, 0, msg);
|
||||
|
||||
g_free (msg);
|
||||
}
|
||||
|
||||
static void
|
||||
mark_set_callback (GtkTextBuffer *buffer,
|
||||
const GtkTextIter *new_location,
|
||||
GtkTextMark *mark,
|
||||
gpointer data)
|
||||
{
|
||||
update_statusbar (buffer, GTK_STATUSBAR (data));
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_appwindow (GtkWidget *do_widget)
|
||||
{
|
||||
GtkWidget *window = get_cached_widget (do_widget, "do_appwindow");
|
||||
|
||||
if (!window)
|
||||
{
|
||||
GtkWidget *table;
|
||||
GtkWidget *toolbar;
|
||||
GtkWidget *statusbar;
|
||||
GtkWidget *contents;
|
||||
GtkWidget *sw;
|
||||
GtkTextBuffer *buffer;
|
||||
GtkAccelGroup *accel_group;
|
||||
GtkItemFactory *item_factory;
|
||||
|
||||
register_stock_icons ();
|
||||
|
||||
/* Create the toplevel window
|
||||
*/
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_screen (GTK_WINDOW (window),
|
||||
gtk_widget_get_screen (do_widget));
|
||||
cache_widget (window, "do_appwindow");
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Application Window");
|
||||
|
||||
/* NULL window variable when window is closed */
|
||||
g_signal_connect (G_OBJECT (window), "destroy",
|
||||
G_CALLBACK (remove_cached_widget),
|
||||
"do_appwindow");
|
||||
|
||||
table = gtk_table_new (1, 4, FALSE);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (window), table);
|
||||
|
||||
/* Create the menubar
|
||||
*/
|
||||
|
||||
accel_group = gtk_accel_group_new ();
|
||||
gtk_window_add_accel_group (GTK_WINDOW (window), accel_group);
|
||||
g_object_unref (accel_group);
|
||||
|
||||
item_factory = gtk_item_factory_new (GTK_TYPE_MENU_BAR, "<main>", accel_group);
|
||||
|
||||
/* Set up item factory to go away with the window */
|
||||
g_object_ref (item_factory);
|
||||
gtk_object_sink (GTK_OBJECT (item_factory));
|
||||
g_object_set_data_full (G_OBJECT (window),
|
||||
"<main>",
|
||||
item_factory,
|
||||
(GDestroyNotify) g_object_unref);
|
||||
|
||||
/* create menu items */
|
||||
gtk_item_factory_create_items (item_factory, G_N_ELEMENTS (menu_items),
|
||||
menu_items, window);
|
||||
|
||||
gtk_table_attach (GTK_TABLE (table),
|
||||
gtk_item_factory_get_widget (item_factory, "<main>"),
|
||||
/* X direction */ /* Y direction */
|
||||
0, 1, 0, 1,
|
||||
GTK_EXPAND | GTK_FILL, 0,
|
||||
0, 0);
|
||||
|
||||
/* Create the toolbar
|
||||
*/
|
||||
toolbar = gtk_toolbar_new ();
|
||||
|
||||
gtk_toolbar_insert_stock (GTK_TOOLBAR (toolbar),
|
||||
GTK_STOCK_OPEN,
|
||||
"This is a demo button with an 'open' icon",
|
||||
NULL,
|
||||
G_CALLBACK (toolbar_cb),
|
||||
window, /* user data for callback */
|
||||
-1); /* -1 means "append" */
|
||||
|
||||
gtk_toolbar_insert_stock (GTK_TOOLBAR (toolbar),
|
||||
GTK_STOCK_QUIT,
|
||||
"This is a demo button with a 'quit' icon",
|
||||
NULL,
|
||||
G_CALLBACK (toolbar_cb),
|
||||
window, /* user data for callback */
|
||||
-1); /* -1 means "append" */
|
||||
|
||||
gtk_toolbar_append_space (GTK_TOOLBAR (toolbar));
|
||||
|
||||
gtk_toolbar_insert_stock (GTK_TOOLBAR (toolbar),
|
||||
"demo-gtk-logo",
|
||||
"This is a demo button with a 'gtk' icon",
|
||||
NULL,
|
||||
G_CALLBACK (toolbar_cb),
|
||||
window, /* user data for callback */
|
||||
-1); /* -1 means "append" */
|
||||
|
||||
gtk_table_attach (GTK_TABLE (table),
|
||||
toolbar,
|
||||
/* X direction */ /* Y direction */
|
||||
0, 1, 1, 2,
|
||||
GTK_EXPAND | GTK_FILL, 0,
|
||||
0, 0);
|
||||
|
||||
/* Create document
|
||||
*/
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
|
||||
GTK_POLICY_AUTOMATIC,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
|
||||
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw),
|
||||
GTK_SHADOW_IN);
|
||||
|
||||
gtk_table_attach (GTK_TABLE (table),
|
||||
sw,
|
||||
/* X direction */ /* Y direction */
|
||||
0, 1, 2, 3,
|
||||
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL,
|
||||
0, 0);
|
||||
|
||||
gtk_window_set_default_size (GTK_WINDOW (window),
|
||||
200, 200);
|
||||
|
||||
contents = gtk_text_view_new ();
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (sw),
|
||||
contents);
|
||||
|
||||
/* Create statusbar */
|
||||
|
||||
statusbar = gtk_statusbar_new ();
|
||||
gtk_table_attach (GTK_TABLE (table),
|
||||
statusbar,
|
||||
/* X direction */ /* Y direction */
|
||||
0, 1, 3, 4,
|
||||
GTK_EXPAND | GTK_FILL, 0,
|
||||
0, 0);
|
||||
|
||||
/* Show text widget info in the statusbar */
|
||||
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (contents));
|
||||
|
||||
g_signal_connect_object (buffer,
|
||||
"changed",
|
||||
G_CALLBACK (update_statusbar),
|
||||
statusbar,
|
||||
0);
|
||||
|
||||
g_signal_connect_object (buffer,
|
||||
"mark_set", /* cursor moved */
|
||||
G_CALLBACK (mark_set_callback),
|
||||
statusbar,
|
||||
0);
|
||||
|
||||
update_statusbar (buffer, GTK_STATUSBAR (statusbar));
|
||||
}
|
||||
|
||||
if (!GTK_WIDGET_VISIBLE (window))
|
||||
{
|
||||
gtk_widget_show_all (window);
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_widget_destroy (window);
|
||||
window = NULL;
|
||||
}
|
||||
|
||||
return window;
|
||||
}
|
||||
|
||||
@@ -1,201 +0,0 @@
|
||||
/* Assistant
|
||||
*
|
||||
* Demonstrates a sample multi-step assistant. Assistants are used to divide
|
||||
* an operation into several simpler sequential steps, and to guide the user
|
||||
* through these steps.
|
||||
*/
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
static GtkWidget *assistant = NULL;
|
||||
static GtkWidget *progress_bar = NULL;
|
||||
|
||||
static gboolean
|
||||
apply_changes_gradually (gpointer data)
|
||||
{
|
||||
gdouble fraction;
|
||||
|
||||
/* Work, work, work... */
|
||||
fraction = gtk_progress_bar_get_fraction (GTK_PROGRESS_BAR (progress_bar));
|
||||
fraction += 0.05;
|
||||
|
||||
if (fraction < 1.0)
|
||||
{
|
||||
gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (progress_bar), fraction);
|
||||
return G_SOURCE_CONTINUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Close automatically once changes are fully applied. */
|
||||
gtk_widget_destroy (assistant);
|
||||
assistant = NULL;
|
||||
return G_SOURCE_REMOVE;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
on_assistant_apply (GtkWidget *widget, gpointer data)
|
||||
{
|
||||
/* Start a timer to simulate changes taking a few seconds to apply. */
|
||||
g_timeout_add (100, apply_changes_gradually, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
on_assistant_close_cancel (GtkWidget *widget, gpointer data)
|
||||
{
|
||||
GtkWidget **assistant = (GtkWidget **) data;
|
||||
|
||||
gtk_widget_destroy (*assistant);
|
||||
*assistant = NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
on_assistant_prepare (GtkWidget *widget, GtkWidget *page, gpointer data)
|
||||
{
|
||||
gint current_page, n_pages;
|
||||
gchar *title;
|
||||
|
||||
current_page = gtk_assistant_get_current_page (GTK_ASSISTANT (widget));
|
||||
n_pages = gtk_assistant_get_n_pages (GTK_ASSISTANT (widget));
|
||||
|
||||
title = g_strdup_printf ("Sample assistant (%d of %d)", current_page + 1, n_pages);
|
||||
gtk_window_set_title (GTK_WINDOW (widget), title);
|
||||
g_free (title);
|
||||
|
||||
/* The fourth page (counting from zero) is the progress page. The
|
||||
* user clicked Apply to get here so we tell the assistant to commit,
|
||||
* which means the changes up to this point are permanent and cannot
|
||||
* be cancelled or revisited. */
|
||||
if (current_page == 3)
|
||||
gtk_assistant_commit (GTK_ASSISTANT (widget));
|
||||
}
|
||||
|
||||
static void
|
||||
on_entry_changed (GtkWidget *widget, gpointer data)
|
||||
{
|
||||
GtkAssistant *assistant = GTK_ASSISTANT (data);
|
||||
GtkWidget *current_page;
|
||||
gint page_number;
|
||||
const gchar *text;
|
||||
|
||||
page_number = gtk_assistant_get_current_page (assistant);
|
||||
current_page = gtk_assistant_get_nth_page (assistant, page_number);
|
||||
text = gtk_entry_get_text (GTK_ENTRY (widget));
|
||||
|
||||
if (text && *text)
|
||||
gtk_assistant_set_page_complete (assistant, current_page, TRUE);
|
||||
else
|
||||
gtk_assistant_set_page_complete (assistant, current_page, FALSE);
|
||||
}
|
||||
|
||||
static void
|
||||
create_page1 (GtkWidget *assistant)
|
||||
{
|
||||
GtkWidget *box, *label, *entry;
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box), 12);
|
||||
|
||||
label = gtk_label_new ("You must fill out this entry to continue:");
|
||||
gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 0);
|
||||
|
||||
entry = gtk_entry_new ();
|
||||
gtk_entry_set_activates_default (GTK_ENTRY (entry), TRUE);
|
||||
gtk_widget_set_valign (entry, GTK_ALIGN_CENTER);
|
||||
gtk_box_pack_start (GTK_BOX (box), entry, TRUE, TRUE, 0);
|
||||
g_signal_connect (G_OBJECT (entry), "changed",
|
||||
G_CALLBACK (on_entry_changed), assistant);
|
||||
|
||||
gtk_widget_show_all (box);
|
||||
gtk_assistant_append_page (GTK_ASSISTANT (assistant), box);
|
||||
gtk_assistant_set_page_title (GTK_ASSISTANT (assistant), box, "Page 1");
|
||||
gtk_assistant_set_page_type (GTK_ASSISTANT (assistant), box, GTK_ASSISTANT_PAGE_INTRO);
|
||||
}
|
||||
|
||||
static void
|
||||
create_page2 (GtkWidget *assistant)
|
||||
{
|
||||
GtkWidget *box, *checkbutton;
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box), 12);
|
||||
|
||||
checkbutton = gtk_check_button_new_with_label ("This is optional data, you may continue "
|
||||
"even if you do not check this");
|
||||
gtk_box_pack_start (GTK_BOX (box), checkbutton, FALSE, FALSE, 0);
|
||||
|
||||
gtk_widget_show_all (box);
|
||||
gtk_assistant_append_page (GTK_ASSISTANT (assistant), box);
|
||||
gtk_assistant_set_page_complete (GTK_ASSISTANT (assistant), box, TRUE);
|
||||
gtk_assistant_set_page_title (GTK_ASSISTANT (assistant), box, "Page 2");
|
||||
}
|
||||
|
||||
static void
|
||||
create_page3 (GtkWidget *assistant)
|
||||
{
|
||||
GtkWidget *label;
|
||||
|
||||
label = gtk_label_new ("This is a confirmation page, press 'Apply' to apply changes");
|
||||
|
||||
gtk_widget_show (label);
|
||||
gtk_assistant_append_page (GTK_ASSISTANT (assistant), label);
|
||||
gtk_assistant_set_page_type (GTK_ASSISTANT (assistant), label, GTK_ASSISTANT_PAGE_CONFIRM);
|
||||
gtk_assistant_set_page_complete (GTK_ASSISTANT (assistant), label, TRUE);
|
||||
gtk_assistant_set_page_title (GTK_ASSISTANT (assistant), label, "Confirmation");
|
||||
}
|
||||
|
||||
static void
|
||||
create_page4 (GtkWidget *assistant)
|
||||
{
|
||||
progress_bar = gtk_progress_bar_new ();
|
||||
gtk_widget_set_halign (progress_bar, GTK_ALIGN_CENTER);
|
||||
gtk_widget_set_valign (progress_bar, GTK_ALIGN_CENTER);
|
||||
|
||||
gtk_widget_show (progress_bar);
|
||||
gtk_assistant_append_page (GTK_ASSISTANT (assistant), progress_bar);
|
||||
gtk_assistant_set_page_type (GTK_ASSISTANT (assistant), progress_bar, GTK_ASSISTANT_PAGE_PROGRESS);
|
||||
gtk_assistant_set_page_title (GTK_ASSISTANT (assistant), progress_bar, "Applying changes");
|
||||
|
||||
/* This prevents the assistant window from being
|
||||
* closed while we're "busy" applying changes.
|
||||
*/
|
||||
gtk_assistant_set_page_complete (GTK_ASSISTANT (assistant), progress_bar, FALSE);
|
||||
}
|
||||
|
||||
GtkWidget*
|
||||
do_assistant (GtkWidget *do_widget)
|
||||
{
|
||||
if (!assistant)
|
||||
{
|
||||
assistant = gtk_assistant_new ();
|
||||
|
||||
gtk_window_set_default_size (GTK_WINDOW (assistant), -1, 300);
|
||||
|
||||
gtk_window_set_screen (GTK_WINDOW (assistant),
|
||||
gtk_widget_get_screen (do_widget));
|
||||
|
||||
create_page1 (assistant);
|
||||
create_page2 (assistant);
|
||||
create_page3 (assistant);
|
||||
create_page4 (assistant);
|
||||
|
||||
g_signal_connect (G_OBJECT (assistant), "cancel",
|
||||
G_CALLBACK (on_assistant_close_cancel), &assistant);
|
||||
g_signal_connect (G_OBJECT (assistant), "close",
|
||||
G_CALLBACK (on_assistant_close_cancel), &assistant);
|
||||
g_signal_connect (G_OBJECT (assistant), "apply",
|
||||
G_CALLBACK (on_assistant_apply), NULL);
|
||||
g_signal_connect (G_OBJECT (assistant), "prepare",
|
||||
G_CALLBACK (on_assistant_prepare), NULL);
|
||||
}
|
||||
|
||||
if (!gtk_widget_get_visible (assistant))
|
||||
gtk_widget_show (assistant);
|
||||
else
|
||||
{
|
||||
gtk_widget_destroy (assistant);
|
||||
assistant = NULL;
|
||||
}
|
||||
|
||||
return assistant;
|
||||
}
|
||||
@@ -1,392 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.20"/>
|
||||
<object class="GtkWindow" id="window">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="resizable">False</property>
|
||||
<property name="title">CSS Blend Modes</property>
|
||||
<property name="default_width">400</property>
|
||||
<property name="default_height">300</property>
|
||||
<child>
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="border_width">12</property>
|
||||
<property name="row_spacing">12</property>
|
||||
<property name="column_spacing">12</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Blend mode:</property>
|
||||
<property name="xalign">0</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow" id="scrolledwindow">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="vexpand">True</property>
|
||||
<property name="shadow_type">in</property>
|
||||
<property name="min_content_width">150</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkStackSwitcher">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="stack">stack</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkStack" id="stack">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="vexpand">True</property>
|
||||
<property name="hhomogeneous">False</property>
|
||||
<property name="vhomogeneous">False</property>
|
||||
<property name="transition_type">crossfade</property>
|
||||
<child>
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="hexpand">False</property>
|
||||
<property name="vexpand">True</property>
|
||||
<property name="row_spacing">12</property>
|
||||
<property name="column_spacing">12</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Duck</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Background</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<style>
|
||||
<class name="duck"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<style>
|
||||
<class name="gradient"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">
|
||||
Blended picture</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="width">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">center</property>
|
||||
<style>
|
||||
<class name="blend0"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">3</property>
|
||||
<property name="width">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="name">page0</property>
|
||||
<property name="title" translatable="yes">Ducky</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="hexpand">False</property>
|
||||
<property name="vexpand">True</property>
|
||||
<property name="row_spacing">12</property>
|
||||
<property name="column_spacing">12</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Red</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Blue</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<style>
|
||||
<class name="red"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<style>
|
||||
<class name="blue"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">
|
||||
Blended picture</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="width">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">center</property>
|
||||
<style>
|
||||
<class name="blend1"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">3</property>
|
||||
<property name="width">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="name">page1</property>
|
||||
<property name="title" translatable="yes">Blends</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="vexpand">True</property>
|
||||
<property name="row_spacing">6</property>
|
||||
<property name="column_spacing">12</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<style>
|
||||
<class name="cyan"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<style>
|
||||
<class name="magenta"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<style>
|
||||
<class name="yellow"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">center</property>
|
||||
<style>
|
||||
<class name="blend2"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Cyan</property>
|
||||
<property name="xalign">0</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Magenta</property>
|
||||
<property name="xalign">0</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Yellow</property>
|
||||
<property name="xalign">0</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Blended picture</property>
|
||||
<property name="xalign">0</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
</attributes>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="name">page2</property>
|
||||
<property name="title" translatable="yes">CMYK</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child type="titlebar">
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
||||
|
Before Width: | Height: | Size: 788 B |
|
Before Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 10 KiB |
@@ -1,124 +0,0 @@
|
||||
/* Builder
|
||||
*
|
||||
* Demonstrates an interface loaded from a XML description.
|
||||
*/
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
static void
|
||||
quit_activate (GSimpleAction *action,
|
||||
GVariant *parameter,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkWidget *window = user_data;
|
||||
|
||||
gtk_widget_destroy (window);
|
||||
}
|
||||
|
||||
static void
|
||||
about_activate (GSimpleAction *action,
|
||||
GVariant *parameter,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkWidget *window = user_data;
|
||||
GtkBuilder *builder;
|
||||
GtkWidget *about_dlg;
|
||||
|
||||
builder = g_object_get_data (G_OBJECT (window), "builder");
|
||||
about_dlg = GTK_WIDGET (gtk_builder_get_object (builder, "aboutdialog1"));
|
||||
gtk_dialog_run (GTK_DIALOG (about_dlg));
|
||||
gtk_widget_hide (about_dlg);
|
||||
}
|
||||
|
||||
static void
|
||||
help_activate (GSimpleAction *action,
|
||||
GVariant *parameter,
|
||||
gpointer user_data)
|
||||
{
|
||||
g_print ("Help not available\n");
|
||||
}
|
||||
|
||||
static GActionEntry win_entries[] = {
|
||||
{ "quit", quit_activate, NULL, NULL, NULL },
|
||||
{ "about", about_activate, NULL, NULL, NULL },
|
||||
{ "help", help_activate, NULL, NULL, NULL }
|
||||
};
|
||||
|
||||
GtkWidget *
|
||||
do_builder (GtkWidget *do_widget)
|
||||
{
|
||||
static GtkWidget *window = NULL;
|
||||
GtkWidget *toolbar;
|
||||
GActionGroup *actions;
|
||||
GtkAccelGroup *accel_group;
|
||||
GtkWidget *item;
|
||||
|
||||
if (!window)
|
||||
{
|
||||
GtkBuilder *builder;
|
||||
|
||||
builder = gtk_builder_new_from_resource ("/builder/demo.ui");
|
||||
|
||||
gtk_builder_connect_signals (builder, NULL);
|
||||
window = GTK_WIDGET (gtk_builder_get_object (builder, "window1"));
|
||||
gtk_window_set_screen (GTK_WINDOW (window),
|
||||
gtk_widget_get_screen (do_widget));
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
toolbar = GTK_WIDGET (gtk_builder_get_object (builder, "toolbar1"));
|
||||
gtk_style_context_add_class (gtk_widget_get_style_context (toolbar),
|
||||
"primary-toolbar");
|
||||
actions = (GActionGroup*)g_simple_action_group_new ();
|
||||
g_action_map_add_action_entries (G_ACTION_MAP (actions),
|
||||
win_entries, G_N_ELEMENTS (win_entries),
|
||||
window);
|
||||
gtk_widget_insert_action_group (window, "win", actions);
|
||||
accel_group = gtk_accel_group_new ();
|
||||
gtk_window_add_accel_group (GTK_WINDOW (window), accel_group);
|
||||
|
||||
item = (GtkWidget*)gtk_builder_get_object (builder, "new_item");
|
||||
gtk_widget_add_accelerator (item, "activate", accel_group,
|
||||
GDK_KEY_n, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE);
|
||||
|
||||
item = (GtkWidget*)gtk_builder_get_object (builder, "open_item");
|
||||
gtk_widget_add_accelerator (item, "activate", accel_group,
|
||||
GDK_KEY_o, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE);
|
||||
|
||||
item = (GtkWidget*)gtk_builder_get_object (builder, "save_item");
|
||||
gtk_widget_add_accelerator (item, "activate", accel_group,
|
||||
GDK_KEY_s, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE);
|
||||
|
||||
item = (GtkWidget*)gtk_builder_get_object (builder, "quit_item");
|
||||
gtk_widget_add_accelerator (item, "activate", accel_group,
|
||||
GDK_KEY_q, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE);
|
||||
|
||||
item = (GtkWidget*)gtk_builder_get_object (builder, "copy_item");
|
||||
gtk_widget_add_accelerator (item, "activate", accel_group,
|
||||
GDK_KEY_c, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE);
|
||||
|
||||
item = (GtkWidget*)gtk_builder_get_object (builder, "cut_item");
|
||||
gtk_widget_add_accelerator (item, "activate", accel_group,
|
||||
GDK_KEY_x, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE);
|
||||
|
||||
item = (GtkWidget*)gtk_builder_get_object (builder, "paste_item");
|
||||
gtk_widget_add_accelerator (item, "activate", accel_group,
|
||||
GDK_KEY_v, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE);
|
||||
|
||||
item = (GtkWidget*)gtk_builder_get_object (builder, "help_item");
|
||||
gtk_widget_add_accelerator (item, "activate", accel_group,
|
||||
GDK_KEY_F1, 0, GTK_ACCEL_VISIBLE);
|
||||
|
||||
item = (GtkWidget*)gtk_builder_get_object (builder, "about_item");
|
||||
gtk_widget_add_accelerator (item, "activate", accel_group,
|
||||
GDK_KEY_F7, 0, GTK_ACCEL_VISIBLE);
|
||||
|
||||
g_object_set_data_full (G_OBJECT(window), "builder", builder, g_object_unref);
|
||||
}
|
||||
|
||||
if (!gtk_widget_get_visible (window))
|
||||
gtk_widget_show_all (window);
|
||||
else
|
||||
gtk_widget_destroy (window);
|
||||
|
||||
return window;
|
||||
}
|
||||
@@ -3,39 +3,39 @@
|
||||
* The Button Box widgets are used to arrange buttons with padding.
|
||||
*/
|
||||
|
||||
#include <glib/gi18n.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include <demo-common.h>
|
||||
|
||||
static GtkWidget *
|
||||
create_bbox (gint horizontal,
|
||||
char *title,
|
||||
gint spacing,
|
||||
gint layout)
|
||||
char *title,
|
||||
gint spacing,
|
||||
gint layout)
|
||||
{
|
||||
GtkWidget *frame;
|
||||
GtkWidget *bbox;
|
||||
GtkWidget *button;
|
||||
|
||||
|
||||
frame = gtk_frame_new (title);
|
||||
|
||||
if (horizontal)
|
||||
bbox = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL);
|
||||
bbox = gtk_hbutton_box_new ();
|
||||
else
|
||||
bbox = gtk_button_box_new (GTK_ORIENTATION_VERTICAL);
|
||||
bbox = gtk_vbutton_box_new ();
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (bbox), 5);
|
||||
gtk_container_add (GTK_CONTAINER (frame), bbox);
|
||||
|
||||
gtk_button_box_set_layout (GTK_BUTTON_BOX (bbox), layout);
|
||||
gtk_box_set_spacing (GTK_BOX (bbox), spacing);
|
||||
|
||||
button = gtk_button_new_with_label (_("OK"));
|
||||
|
||||
button = gtk_button_new_from_stock (GTK_STOCK_OK);
|
||||
gtk_container_add (GTK_CONTAINER (bbox), button);
|
||||
|
||||
button = gtk_button_new_with_label (_("Cancel"));
|
||||
|
||||
button = gtk_button_new_from_stock (GTK_STOCK_CANCEL);
|
||||
gtk_container_add (GTK_CONTAINER (bbox), button);
|
||||
|
||||
button = gtk_button_new_with_label (_("Help"));
|
||||
|
||||
button = gtk_button_new_from_stock (GTK_STOCK_HELP);
|
||||
gtk_container_add (GTK_CONTAINER (bbox), button);
|
||||
|
||||
return frame;
|
||||
@@ -44,94 +44,86 @@ create_bbox (gint horizontal,
|
||||
GtkWidget *
|
||||
do_button_box (GtkWidget *do_widget)
|
||||
{
|
||||
static GtkWidget *window = NULL;
|
||||
GtkWidget *window = get_cached_widget (do_widget, "do_button_box");
|
||||
GtkWidget *main_vbox;
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *hbox;
|
||||
GtkWidget *frame_horz;
|
||||
GtkWidget *frame_vert;
|
||||
|
||||
|
||||
if (!window)
|
||||
{
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_screen (GTK_WINDOW (window),
|
||||
gtk_widget_get_screen (do_widget));
|
||||
gtk_widget_get_screen (do_widget));
|
||||
cache_widget (window, "do_button_box");
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Button Boxes");
|
||||
|
||||
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed),
|
||||
&window);
|
||||
|
||||
G_CALLBACK (remove_cached_widget),
|
||||
"do_button_box");
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 10);
|
||||
|
||||
main_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
main_vbox = gtk_vbox_new (FALSE, 0);
|
||||
gtk_container_add (GTK_CONTAINER (window), main_vbox);
|
||||
|
||||
|
||||
frame_horz = gtk_frame_new ("Horizontal Button Boxes");
|
||||
gtk_box_pack_start (GTK_BOX (main_vbox), frame_horz, TRUE, TRUE, 10);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 10);
|
||||
gtk_container_add (GTK_CONTAINER (frame_horz), vbox);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox),
|
||||
create_bbox (TRUE, "Spread", 40, GTK_BUTTONBOX_SPREAD),
|
||||
TRUE, TRUE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox),
|
||||
create_bbox (TRUE, "Spread", 40, GTK_BUTTONBOX_SPREAD),
|
||||
TRUE, TRUE, 0);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox),
|
||||
create_bbox (TRUE, "Edge", 40, GTK_BUTTONBOX_EDGE),
|
||||
TRUE, TRUE, 5);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox),
|
||||
create_bbox (TRUE, "Start", 40, GTK_BUTTONBOX_START),
|
||||
TRUE, TRUE, 5);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox),
|
||||
create_bbox (TRUE, "End", 40, GTK_BUTTONBOX_END),
|
||||
TRUE, TRUE, 5);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox),
|
||||
create_bbox (TRUE, "Center", 40, GTK_BUTTONBOX_CENTER),
|
||||
TRUE, TRUE, 5);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox),
|
||||
create_bbox (TRUE, "Expand", 0, GTK_BUTTONBOX_EXPAND),
|
||||
TRUE, TRUE, 5);
|
||||
gtk_box_pack_start (GTK_BOX (vbox),
|
||||
create_bbox (TRUE, "Edge", 40, GTK_BUTTONBOX_EDGE),
|
||||
TRUE, TRUE, 5);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox),
|
||||
create_bbox (TRUE, "Start", 40, GTK_BUTTONBOX_START),
|
||||
TRUE, TRUE, 5);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox),
|
||||
create_bbox (TRUE, "End", 40, GTK_BUTTONBOX_END),
|
||||
TRUE, TRUE, 5);
|
||||
|
||||
frame_vert = gtk_frame_new ("Vertical Button Boxes");
|
||||
gtk_box_pack_start (GTK_BOX (main_vbox), frame_vert, TRUE, TRUE, 10);
|
||||
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 10);
|
||||
gtk_container_add (GTK_CONTAINER (frame_vert), hbox);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (hbox),
|
||||
create_bbox (FALSE, "Spread", 10, GTK_BUTTONBOX_SPREAD),
|
||||
TRUE, TRUE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (hbox),
|
||||
create_bbox (FALSE, "Spread", 30, GTK_BUTTONBOX_SPREAD),
|
||||
TRUE, TRUE, 0);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (hbox),
|
||||
create_bbox (FALSE, "Edge", 10, GTK_BUTTONBOX_EDGE),
|
||||
TRUE, TRUE, 5);
|
||||
gtk_box_pack_start (GTK_BOX (hbox),
|
||||
create_bbox (FALSE, "Edge", 30, GTK_BUTTONBOX_EDGE),
|
||||
TRUE, TRUE, 5);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (hbox),
|
||||
create_bbox (FALSE, "Start", 10, GTK_BUTTONBOX_START),
|
||||
TRUE, TRUE, 5);
|
||||
gtk_box_pack_start (GTK_BOX (hbox),
|
||||
create_bbox (FALSE, "Start", 30, GTK_BUTTONBOX_START),
|
||||
TRUE, TRUE, 5);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (hbox),
|
||||
create_bbox (FALSE, "End", 10, GTK_BUTTONBOX_END),
|
||||
TRUE, TRUE, 5);
|
||||
gtk_box_pack_start (GTK_BOX (hbox),
|
||||
create_bbox (FALSE, "Center", 10, GTK_BUTTONBOX_CENTER),
|
||||
TRUE, TRUE, 5);
|
||||
gtk_box_pack_start (GTK_BOX (hbox),
|
||||
create_bbox (FALSE, "Expand", 0, GTK_BUTTONBOX_EXPAND),
|
||||
TRUE, TRUE, 5);
|
||||
gtk_box_pack_start (GTK_BOX (hbox),
|
||||
create_bbox (FALSE, "End", 30, GTK_BUTTONBOX_END),
|
||||
TRUE, TRUE, 5);
|
||||
}
|
||||
|
||||
if (!gtk_widget_get_visible (window))
|
||||
gtk_widget_show_all (window);
|
||||
if (!GTK_WIDGET_VISIBLE (window))
|
||||
{
|
||||
gtk_widget_show_all (window);
|
||||
}
|
||||
else
|
||||
gtk_widget_destroy (window);
|
||||
{
|
||||
gtk_widget_destroy (window);
|
||||
window = NULL;
|
||||
}
|
||||
|
||||
return window;
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 1.1 KiB |
@@ -1,558 +0,0 @@
|
||||
/* Change Display
|
||||
*
|
||||
* Demonstrates migrating a window between different displays.
|
||||
* A display is a mouse and keyboard with some number of
|
||||
* associated monitors. The neat thing about having multiple
|
||||
* displays is that they can be on a completely separate
|
||||
* computers, as long as there is a network connection to the
|
||||
* computer where the application is running.
|
||||
*
|
||||
* Only some of the windowing systems where GTK+ runs have the
|
||||
* concept of multiple displays. (The X Window System is the
|
||||
* main example.) Other windowing systems can only handle one
|
||||
* keyboard and mouse, and combine all monitors into
|
||||
* a single display.
|
||||
*
|
||||
* This is a moderately complex example, and demonstrates:
|
||||
*
|
||||
* - Tracking the currently open displays
|
||||
*
|
||||
* - Changing the display for a window
|
||||
*
|
||||
* - Letting the user choose a window by clicking on it
|
||||
*
|
||||
* - Using GtkListStore and GtkTreeView
|
||||
*
|
||||
* - Using GtkDialog
|
||||
*/
|
||||
#include <string.h>
|
||||
#include <glib/gi18n.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
/* The ChangeDisplayInfo structure corresponds to a toplevel window and
|
||||
* holds pointers to widgets inside the toplevel window along with other
|
||||
* information about the contents of the window.
|
||||
* This is a common organizational structure in real applications.
|
||||
*/
|
||||
typedef struct _ChangeDisplayInfo ChangeDisplayInfo;
|
||||
|
||||
struct _ChangeDisplayInfo
|
||||
{
|
||||
GtkWidget *window;
|
||||
GtkSizeGroup *size_group;
|
||||
|
||||
GtkTreeModel *display_model;
|
||||
|
||||
GdkDisplay *current_display;
|
||||
};
|
||||
|
||||
/* These enumerations provide symbolic names for the columns
|
||||
* in the two GtkListStore models.
|
||||
*/
|
||||
enum
|
||||
{
|
||||
DISPLAY_COLUMN_NAME,
|
||||
DISPLAY_COLUMN_DISPLAY,
|
||||
DISPLAY_NUM_COLUMNS
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
SCREEN_COLUMN_NUMBER,
|
||||
SCREEN_COLUMN_SCREEN,
|
||||
SCREEN_NUM_COLUMNS
|
||||
};
|
||||
|
||||
/* Finds the toplevel window under the mouse pointer, if any.
|
||||
*/
|
||||
static GtkWidget *
|
||||
find_toplevel_at_pointer (GdkDisplay *display)
|
||||
{
|
||||
GdkWindow *pointer_window;
|
||||
GtkWidget *widget = NULL;
|
||||
|
||||
pointer_window = gdk_device_get_window_at_position (gtk_get_current_event_device (),
|
||||
NULL, NULL);
|
||||
|
||||
/* The user data field of a GdkWindow is used to store a pointer
|
||||
* to the widget that created it.
|
||||
*/
|
||||
if (pointer_window)
|
||||
{
|
||||
gpointer widget_ptr;
|
||||
gdk_window_get_user_data (pointer_window, &widget_ptr);
|
||||
widget = widget_ptr;
|
||||
}
|
||||
|
||||
return widget ? gtk_widget_get_toplevel (widget) : NULL;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
button_release_event_cb (GtkWidget *widget,
|
||||
GdkEventButton *event,
|
||||
gboolean *clicked)
|
||||
{
|
||||
*clicked = TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* Asks the user to click on a window, then waits for them click
|
||||
* the mouse. When the mouse is released, returns the toplevel
|
||||
* window under the pointer, or NULL, if there is none.
|
||||
*/
|
||||
static GtkWidget *
|
||||
query_for_toplevel (GdkScreen *screen,
|
||||
const char *prompt)
|
||||
{
|
||||
GdkDisplay *display = gdk_screen_get_display (screen);
|
||||
GtkWidget *popup, *label, *frame;
|
||||
GdkCursor *cursor;
|
||||
GtkWidget *toplevel = NULL;
|
||||
GdkDevice *device;
|
||||
|
||||
popup = gtk_window_new (GTK_WINDOW_POPUP);
|
||||
gtk_window_set_screen (GTK_WINDOW (popup), screen);
|
||||
gtk_window_set_modal (GTK_WINDOW (popup), TRUE);
|
||||
gtk_window_set_position (GTK_WINDOW (popup), GTK_WIN_POS_CENTER);
|
||||
|
||||
frame = gtk_frame_new (NULL);
|
||||
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_OUT);
|
||||
gtk_container_add (GTK_CONTAINER (popup), frame);
|
||||
|
||||
label = gtk_label_new (prompt);
|
||||
g_object_set (label, "margin", 10, NULL);
|
||||
gtk_container_add (GTK_CONTAINER (frame), label);
|
||||
|
||||
gtk_widget_show_all (popup);
|
||||
cursor = gdk_cursor_new_from_name (display, "crosshair");
|
||||
device = gtk_get_current_event_device ();
|
||||
|
||||
if (gdk_seat_grab (gdk_device_get_seat (device),
|
||||
gtk_widget_get_window (popup),
|
||||
GDK_SEAT_CAPABILITY_ALL_POINTING,
|
||||
FALSE, cursor, NULL, NULL, NULL) == GDK_GRAB_SUCCESS)
|
||||
{
|
||||
gboolean clicked = FALSE;
|
||||
|
||||
g_signal_connect (popup, "button-release-event",
|
||||
G_CALLBACK (button_release_event_cb), &clicked);
|
||||
|
||||
/* Process events until clicked is set by button_release_event_cb.
|
||||
* We pass in may_block=TRUE since we want to wait if there
|
||||
* are no events currently.
|
||||
*/
|
||||
while (!clicked)
|
||||
g_main_context_iteration (NULL, TRUE);
|
||||
|
||||
toplevel = find_toplevel_at_pointer (gdk_screen_get_display (screen));
|
||||
if (toplevel == popup)
|
||||
toplevel = NULL;
|
||||
}
|
||||
|
||||
g_object_unref (cursor);
|
||||
gtk_widget_destroy (popup);
|
||||
gdk_display_flush (display); /* Really release the grab */
|
||||
|
||||
return toplevel;
|
||||
}
|
||||
|
||||
/* Prompts the user for a toplevel window to move, and then moves
|
||||
* that window to the currently selected display
|
||||
*/
|
||||
static void
|
||||
query_change_display (ChangeDisplayInfo *info)
|
||||
{
|
||||
GdkScreen *screen = gtk_widget_get_screen (info->window);
|
||||
GtkWidget *toplevel;
|
||||
|
||||
toplevel = query_for_toplevel (screen,
|
||||
"Please select the toplevel\n"
|
||||
"to move to the new screen");
|
||||
|
||||
if (toplevel)
|
||||
gtk_window_set_screen (GTK_WINDOW (toplevel), gdk_display_get_default_screen (info->current_display));
|
||||
else
|
||||
gdk_display_beep (gdk_screen_get_display (screen));
|
||||
}
|
||||
|
||||
/* Called when the user clicks on a button in our dialog or
|
||||
* closes the dialog through the window manager. Unless the
|
||||
* "Change" button was clicked, we destroy the dialog.
|
||||
*/
|
||||
static void
|
||||
response_cb (GtkDialog *dialog,
|
||||
gint response_id,
|
||||
ChangeDisplayInfo *info)
|
||||
{
|
||||
if (response_id == GTK_RESPONSE_OK)
|
||||
query_change_display (info);
|
||||
else
|
||||
gtk_widget_destroy (GTK_WIDGET (dialog));
|
||||
}
|
||||
|
||||
/* Called when the user clicks on "Open..." in the display
|
||||
* frame. Prompts for a new display, and then opens a connection
|
||||
* to that display.
|
||||
*/
|
||||
static void
|
||||
open_display_cb (GtkWidget *button,
|
||||
ChangeDisplayInfo *info)
|
||||
{
|
||||
GtkWidget *content_area;
|
||||
GtkWidget *dialog;
|
||||
GtkWidget *display_entry;
|
||||
GtkWidget *dialog_label;
|
||||
gchar *new_screen_name = NULL;
|
||||
GdkDisplay *result = NULL;
|
||||
|
||||
dialog = gtk_dialog_new_with_buttons ("Open Display",
|
||||
GTK_WINDOW (info->window),
|
||||
GTK_DIALOG_MODAL,
|
||||
_("_Cancel"), GTK_RESPONSE_CANCEL,
|
||||
_("_OK"), GTK_RESPONSE_OK,
|
||||
NULL);
|
||||
|
||||
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
|
||||
display_entry = gtk_entry_new ();
|
||||
gtk_entry_set_activates_default (GTK_ENTRY (display_entry), TRUE);
|
||||
dialog_label =
|
||||
gtk_label_new ("Please enter the name of\nthe new display\n");
|
||||
|
||||
content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (content_area), dialog_label);
|
||||
gtk_container_add (GTK_CONTAINER (content_area), display_entry);
|
||||
|
||||
gtk_widget_grab_focus (display_entry);
|
||||
gtk_widget_show_all (gtk_bin_get_child (GTK_BIN (dialog)));
|
||||
|
||||
while (!result)
|
||||
{
|
||||
gint response_id = gtk_dialog_run (GTK_DIALOG (dialog));
|
||||
if (response_id != GTK_RESPONSE_OK)
|
||||
break;
|
||||
|
||||
new_screen_name = gtk_editable_get_chars (GTK_EDITABLE (display_entry),
|
||||
0, -1);
|
||||
|
||||
if (strcmp (new_screen_name, "") != 0)
|
||||
{
|
||||
result = gdk_display_open (new_screen_name);
|
||||
if (!result)
|
||||
{
|
||||
gchar *error_msg =
|
||||
g_strdup_printf ("Can't open display:\n\t%s\nplease try another one\n",
|
||||
new_screen_name);
|
||||
gtk_label_set_text (GTK_LABEL (dialog_label), error_msg);
|
||||
g_free (error_msg);
|
||||
}
|
||||
|
||||
g_free (new_screen_name);
|
||||
}
|
||||
}
|
||||
|
||||
gtk_widget_destroy (dialog);
|
||||
}
|
||||
|
||||
/* Called when the user clicks on the "Close" button in the
|
||||
* "Display" frame. Closes the selected display.
|
||||
*/
|
||||
static void
|
||||
close_display_cb (GtkWidget *button,
|
||||
ChangeDisplayInfo *info)
|
||||
{
|
||||
if (info->current_display)
|
||||
gdk_display_close (info->current_display);
|
||||
}
|
||||
|
||||
/* Called when the selected row in the display list changes.
|
||||
* Updates info->current_display, then refills the list of
|
||||
* screens.
|
||||
*/
|
||||
static void
|
||||
display_changed_cb (GtkTreeSelection *selection,
|
||||
ChangeDisplayInfo *info)
|
||||
{
|
||||
GtkTreeModel *model;
|
||||
GtkTreeIter iter;
|
||||
|
||||
if (info->current_display)
|
||||
g_object_unref (info->current_display);
|
||||
if (gtk_tree_selection_get_selected (selection, &model, &iter))
|
||||
gtk_tree_model_get (model, &iter,
|
||||
DISPLAY_COLUMN_DISPLAY, &info->current_display,
|
||||
-1);
|
||||
else
|
||||
info->current_display = NULL;
|
||||
}
|
||||
|
||||
/* This function is used both for creating the "Display" and
|
||||
* "Screen" frames, since they have a similar structure. The
|
||||
* caller hooks up the right context for the value returned
|
||||
* in tree_view, and packs any relevant buttons into button_vbox.
|
||||
*/
|
||||
static void
|
||||
create_frame (ChangeDisplayInfo *info,
|
||||
const char *title,
|
||||
GtkWidget **frame,
|
||||
GtkWidget **tree_view,
|
||||
GtkWidget **button_vbox)
|
||||
{
|
||||
GtkTreeSelection *selection;
|
||||
GtkWidget *scrollwin;
|
||||
GtkWidget *hbox;
|
||||
|
||||
*frame = gtk_frame_new (title);
|
||||
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 8);
|
||||
gtk_container_add (GTK_CONTAINER (*frame), hbox);
|
||||
|
||||
scrollwin = gtk_scrolled_window_new (NULL, NULL);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrollwin),
|
||||
GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
|
||||
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrollwin),
|
||||
GTK_SHADOW_IN);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), scrollwin, TRUE, TRUE, 0);
|
||||
|
||||
*tree_view = gtk_tree_view_new ();
|
||||
gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (*tree_view), FALSE);
|
||||
gtk_container_add (GTK_CONTAINER (scrollwin), *tree_view);
|
||||
|
||||
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (*tree_view));
|
||||
gtk_tree_selection_set_mode (selection, GTK_SELECTION_BROWSE);
|
||||
|
||||
*button_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), *button_vbox, FALSE, FALSE, 0);
|
||||
|
||||
if (!info->size_group)
|
||||
info->size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
|
||||
|
||||
gtk_size_group_add_widget (GTK_SIZE_GROUP (info->size_group), *button_vbox);
|
||||
}
|
||||
|
||||
/* If we have a stack of buttons, it often looks better if their contents
|
||||
* are left-aligned, rather than centered. This function creates a button
|
||||
* and left-aligns it contents.
|
||||
*/
|
||||
GtkWidget *
|
||||
left_align_button_new (const char *label)
|
||||
{
|
||||
GtkWidget *button = gtk_button_new_with_mnemonic (label);
|
||||
GtkWidget *child = gtk_bin_get_child (GTK_BIN (button));
|
||||
|
||||
gtk_widget_set_halign (child, GTK_ALIGN_START);
|
||||
gtk_widget_set_valign (child, GTK_ALIGN_CENTER);
|
||||
|
||||
return button;
|
||||
}
|
||||
|
||||
/* Creates the "Display" frame in the main window.
|
||||
*/
|
||||
GtkWidget *
|
||||
create_display_frame (ChangeDisplayInfo *info)
|
||||
{
|
||||
GtkWidget *frame;
|
||||
GtkWidget *tree_view;
|
||||
GtkWidget *button_vbox;
|
||||
GtkTreeViewColumn *column;
|
||||
GtkTreeSelection *selection;
|
||||
GtkWidget *button;
|
||||
|
||||
create_frame (info, "Display", &frame, &tree_view, &button_vbox);
|
||||
|
||||
button = left_align_button_new ("_Open...");
|
||||
g_signal_connect (button, "clicked", G_CALLBACK (open_display_cb), info);
|
||||
gtk_box_pack_start (GTK_BOX (button_vbox), button, FALSE, FALSE, 0);
|
||||
|
||||
button = left_align_button_new ("_Close");
|
||||
g_signal_connect (button, "clicked", G_CALLBACK (close_display_cb), info);
|
||||
gtk_box_pack_start (GTK_BOX (button_vbox), button, FALSE, FALSE, 0);
|
||||
|
||||
info->display_model = (GtkTreeModel *)gtk_list_store_new (DISPLAY_NUM_COLUMNS,
|
||||
G_TYPE_STRING,
|
||||
GDK_TYPE_DISPLAY);
|
||||
|
||||
gtk_tree_view_set_model (GTK_TREE_VIEW (tree_view), info->display_model);
|
||||
|
||||
column = gtk_tree_view_column_new_with_attributes ("Name",
|
||||
gtk_cell_renderer_text_new (),
|
||||
"text", DISPLAY_COLUMN_NAME,
|
||||
NULL);
|
||||
gtk_tree_view_append_column (GTK_TREE_VIEW (tree_view), column);
|
||||
|
||||
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tree_view));
|
||||
g_signal_connect (selection, "changed",
|
||||
G_CALLBACK (display_changed_cb), info);
|
||||
|
||||
return frame;
|
||||
}
|
||||
|
||||
/* Called when one of the currently open displays is closed.
|
||||
* Remove it from our list of displays.
|
||||
*/
|
||||
static void
|
||||
display_closed_cb (GdkDisplay *display,
|
||||
gboolean is_error,
|
||||
ChangeDisplayInfo *info)
|
||||
{
|
||||
GtkTreeIter iter;
|
||||
gboolean valid;
|
||||
|
||||
for (valid = gtk_tree_model_get_iter_first (info->display_model, &iter);
|
||||
valid;
|
||||
valid = gtk_tree_model_iter_next (info->display_model, &iter))
|
||||
{
|
||||
GdkDisplay *tmp_display;
|
||||
|
||||
gtk_tree_model_get (info->display_model, &iter,
|
||||
DISPLAY_COLUMN_DISPLAY, &tmp_display,
|
||||
-1);
|
||||
if (tmp_display == display)
|
||||
{
|
||||
gtk_list_store_remove (GTK_LIST_STORE (info->display_model), &iter);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Adds a new display to our list of displays, and connects
|
||||
* to the "closed" signal so that we can remove it from the
|
||||
* list of displays again.
|
||||
*/
|
||||
static void
|
||||
add_display (ChangeDisplayInfo *info,
|
||||
GdkDisplay *display)
|
||||
{
|
||||
const gchar *name = gdk_display_get_name (display);
|
||||
GtkTreeIter iter;
|
||||
|
||||
gtk_list_store_append (GTK_LIST_STORE (info->display_model), &iter);
|
||||
gtk_list_store_set (GTK_LIST_STORE (info->display_model), &iter,
|
||||
DISPLAY_COLUMN_NAME, name,
|
||||
DISPLAY_COLUMN_DISPLAY, display,
|
||||
-1);
|
||||
|
||||
g_signal_connect (display, "closed",
|
||||
G_CALLBACK (display_closed_cb), info);
|
||||
}
|
||||
|
||||
/* Called when a new display is opened
|
||||
*/
|
||||
static void
|
||||
display_opened_cb (GdkDisplayManager *manager,
|
||||
GdkDisplay *display,
|
||||
ChangeDisplayInfo *info)
|
||||
{
|
||||
add_display (info, display);
|
||||
}
|
||||
|
||||
/* Adds all currently open displays to our list of displays,
|
||||
* and set up a signal connection so that we'll be notified
|
||||
* when displays are opened in the future as well.
|
||||
*/
|
||||
static void
|
||||
initialize_displays (ChangeDisplayInfo *info)
|
||||
{
|
||||
GdkDisplayManager *manager = gdk_display_manager_get ();
|
||||
GSList *displays = gdk_display_manager_list_displays (manager);
|
||||
GSList *tmp_list;
|
||||
|
||||
for (tmp_list = displays; tmp_list; tmp_list = tmp_list->next)
|
||||
add_display (info, tmp_list->data);
|
||||
|
||||
g_slist_free (tmp_list);
|
||||
|
||||
g_signal_connect (manager, "display-opened",
|
||||
G_CALLBACK (display_opened_cb), info);
|
||||
}
|
||||
|
||||
/* Cleans up when the toplevel is destroyed; we remove the
|
||||
* connections we use to track currently open displays, then
|
||||
* free the ChangeDisplayInfo structure.
|
||||
*/
|
||||
static void
|
||||
destroy_info (ChangeDisplayInfo *info)
|
||||
{
|
||||
GdkDisplayManager *manager = gdk_display_manager_get ();
|
||||
GSList *displays = gdk_display_manager_list_displays (manager);
|
||||
GSList *tmp_list;
|
||||
|
||||
g_signal_handlers_disconnect_by_func (manager,
|
||||
display_opened_cb,
|
||||
info);
|
||||
|
||||
for (tmp_list = displays; tmp_list; tmp_list = tmp_list->next)
|
||||
g_signal_handlers_disconnect_by_func (tmp_list->data,
|
||||
display_closed_cb,
|
||||
info);
|
||||
|
||||
g_slist_free (tmp_list);
|
||||
|
||||
g_object_unref (info->size_group);
|
||||
g_object_unref (info->display_model);
|
||||
|
||||
if (info->current_display)
|
||||
g_object_unref (info->current_display);
|
||||
|
||||
g_free (info);
|
||||
}
|
||||
|
||||
static void
|
||||
destroy_cb (GObject *object,
|
||||
ChangeDisplayInfo **info)
|
||||
{
|
||||
destroy_info (*info);
|
||||
*info = NULL;
|
||||
}
|
||||
|
||||
/* Main entry point. If the dialog for this demo doesn't yet exist, creates
|
||||
* it. Otherwise, destroys it.
|
||||
*/
|
||||
GtkWidget *
|
||||
do_changedisplay (GtkWidget *do_widget)
|
||||
{
|
||||
static ChangeDisplayInfo *info = NULL;
|
||||
|
||||
if (!info)
|
||||
{
|
||||
GtkWidget *content_area;
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *frame;
|
||||
|
||||
info = g_new0 (ChangeDisplayInfo, 1);
|
||||
|
||||
info->window = gtk_dialog_new_with_buttons ("Change Display",
|
||||
GTK_WINDOW (do_widget),
|
||||
0,
|
||||
"Close", GTK_RESPONSE_CLOSE,
|
||||
"Change", GTK_RESPONSE_OK,
|
||||
NULL);
|
||||
|
||||
gtk_window_set_default_size (GTK_WINDOW (info->window), 300, 400);
|
||||
|
||||
g_signal_connect (info->window, "response",
|
||||
G_CALLBACK (response_cb), info);
|
||||
g_signal_connect (info->window, "destroy",
|
||||
G_CALLBACK (destroy_cb), &info);
|
||||
|
||||
content_area = gtk_dialog_get_content_area (GTK_DIALOG (info->window));
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
|
||||
gtk_box_pack_start (GTK_BOX (content_area), vbox, TRUE, TRUE, 0);
|
||||
|
||||
frame = create_display_frame (info);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE, 0);
|
||||
|
||||
initialize_displays (info);
|
||||
|
||||
gtk_widget_show_all (info->window);
|
||||
return info->window;
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_widget_destroy (info->window);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
@@ -1,331 +0,0 @@
|
||||
/* Clipboard
|
||||
*
|
||||
* GtkClipboard is used for clipboard handling. This demo shows how to
|
||||
* copy and paste text to and from the clipboard.
|
||||
*
|
||||
* It also shows how to transfer images via the clipboard or via
|
||||
* drag-and-drop, and how to make clipboard contents persist after
|
||||
* the application exits. Clipboard persistence requires a clipboard
|
||||
* manager to run.
|
||||
*/
|
||||
|
||||
#include <glib/gi18n.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include <string.h>
|
||||
|
||||
void
|
||||
copy_button_clicked (GtkWidget *button,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkWidget *entry;
|
||||
GtkClipboard *clipboard;
|
||||
|
||||
entry = GTK_WIDGET (user_data);
|
||||
|
||||
/* Get the clipboard object */
|
||||
clipboard = gtk_widget_get_clipboard (entry,
|
||||
GDK_SELECTION_CLIPBOARD);
|
||||
|
||||
/* Set clipboard text */
|
||||
gtk_clipboard_set_text (clipboard, gtk_entry_get_text (GTK_ENTRY (entry)), -1);
|
||||
}
|
||||
|
||||
void
|
||||
paste_received (GtkClipboard *clipboard,
|
||||
const gchar *text,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkWidget *entry;
|
||||
|
||||
entry = GTK_WIDGET (user_data);
|
||||
|
||||
/* Set the entry text */
|
||||
if(text)
|
||||
gtk_entry_set_text (GTK_ENTRY (entry), text);
|
||||
}
|
||||
|
||||
void
|
||||
paste_button_clicked (GtkWidget *button,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkWidget *entry;
|
||||
GtkClipboard *clipboard;
|
||||
|
||||
entry = GTK_WIDGET (user_data);
|
||||
|
||||
/* Get the clipboard object */
|
||||
clipboard = gtk_widget_get_clipboard (entry,
|
||||
GDK_SELECTION_CLIPBOARD);
|
||||
|
||||
/* Request the contents of the clipboard, contents_received will be
|
||||
called when we do get the contents.
|
||||
*/
|
||||
gtk_clipboard_request_text (clipboard,
|
||||
paste_received, entry);
|
||||
}
|
||||
|
||||
static GdkPixbuf *
|
||||
get_image_pixbuf (GtkImage *image)
|
||||
{
|
||||
const gchar *icon_name;
|
||||
GtkIconSize size;
|
||||
GtkIconTheme *icon_theme;
|
||||
int width;
|
||||
|
||||
switch (gtk_image_get_storage_type (image))
|
||||
{
|
||||
case GTK_IMAGE_PIXBUF:
|
||||
return g_object_ref (gtk_image_get_pixbuf (image));
|
||||
case GTK_IMAGE_ICON_NAME:
|
||||
gtk_image_get_icon_name (image, &icon_name, &size);
|
||||
icon_theme = gtk_icon_theme_get_for_screen (gtk_widget_get_screen (GTK_WIDGET (image)));
|
||||
gtk_icon_size_lookup (size, &width, NULL);
|
||||
return gtk_icon_theme_load_icon (icon_theme,
|
||||
icon_name,
|
||||
width,
|
||||
GTK_ICON_LOOKUP_GENERIC_FALLBACK,
|
||||
NULL);
|
||||
default:
|
||||
g_warning ("Image storage type %d not handled",
|
||||
gtk_image_get_storage_type (image));
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
drag_begin (GtkWidget *widget,
|
||||
GdkDragContext *context,
|
||||
gpointer data)
|
||||
{
|
||||
GdkPixbuf *pixbuf;
|
||||
|
||||
pixbuf = get_image_pixbuf (GTK_IMAGE (data));
|
||||
gtk_drag_set_icon_pixbuf (context, pixbuf, -2, -2);
|
||||
g_object_unref (pixbuf);
|
||||
}
|
||||
|
||||
void
|
||||
drag_data_get (GtkWidget *widget,
|
||||
GdkDragContext *context,
|
||||
GtkSelectionData *selection_data,
|
||||
guint info,
|
||||
guint time,
|
||||
gpointer data)
|
||||
{
|
||||
GdkPixbuf *pixbuf;
|
||||
|
||||
pixbuf = get_image_pixbuf (GTK_IMAGE (data));
|
||||
gtk_selection_data_set_pixbuf (selection_data, pixbuf);
|
||||
g_object_unref (pixbuf);
|
||||
}
|
||||
|
||||
static void
|
||||
drag_data_received (GtkWidget *widget,
|
||||
GdkDragContext *context,
|
||||
gint x,
|
||||
gint y,
|
||||
GtkSelectionData *selection_data,
|
||||
guint info,
|
||||
guint32 time,
|
||||
gpointer data)
|
||||
{
|
||||
GdkPixbuf *pixbuf;
|
||||
|
||||
if (gtk_selection_data_get_length (selection_data) > 0)
|
||||
{
|
||||
pixbuf = gtk_selection_data_get_pixbuf (selection_data);
|
||||
gtk_image_set_from_pixbuf (GTK_IMAGE (data), pixbuf);
|
||||
g_object_unref (pixbuf);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
copy_image (GtkMenuItem *item,
|
||||
gpointer data)
|
||||
{
|
||||
GtkClipboard *clipboard;
|
||||
GdkPixbuf *pixbuf;
|
||||
|
||||
clipboard = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD);
|
||||
pixbuf = get_image_pixbuf (GTK_IMAGE (data));
|
||||
|
||||
gtk_clipboard_set_image (clipboard, pixbuf);
|
||||
g_object_unref (pixbuf);
|
||||
}
|
||||
|
||||
static void
|
||||
paste_image (GtkMenuItem *item,
|
||||
gpointer data)
|
||||
{
|
||||
GtkClipboard *clipboard;
|
||||
GdkPixbuf *pixbuf;
|
||||
|
||||
clipboard = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD);
|
||||
pixbuf = gtk_clipboard_wait_for_image (clipboard);
|
||||
|
||||
if (pixbuf)
|
||||
{
|
||||
gtk_image_set_from_pixbuf (GTK_IMAGE (data), pixbuf);
|
||||
g_object_unref (pixbuf);
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
button_press (GtkWidget *widget,
|
||||
GdkEventButton *button,
|
||||
gpointer data)
|
||||
{
|
||||
GtkWidget *menu;
|
||||
GtkWidget *item;
|
||||
|
||||
if (button->button != GDK_BUTTON_SECONDARY)
|
||||
return FALSE;
|
||||
|
||||
menu = gtk_menu_new ();
|
||||
|
||||
item = gtk_menu_item_new_with_mnemonic (_("_Copy"));
|
||||
g_signal_connect (item, "activate", G_CALLBACK (copy_image), data);
|
||||
gtk_widget_show (item);
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
|
||||
|
||||
item = gtk_menu_item_new_with_mnemonic (_("_Paste"));
|
||||
g_signal_connect (item, "activate", G_CALLBACK (paste_image), data);
|
||||
gtk_widget_show (item);
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
|
||||
|
||||
gtk_menu_popup_at_pointer (GTK_MENU (menu), (GdkEvent *) button);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_clipboard (GtkWidget *do_widget)
|
||||
{
|
||||
static GtkWidget *window = NULL;
|
||||
|
||||
if (!window)
|
||||
{
|
||||
GtkWidget *vbox, *hbox;
|
||||
GtkWidget *label;
|
||||
GtkWidget *entry, *button;
|
||||
GtkWidget *ebox, *image;
|
||||
GtkClipboard *clipboard;
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_screen (GTK_WINDOW (window),
|
||||
gtk_widget_get_screen (do_widget));
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Clipboard");
|
||||
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
label = gtk_label_new ("\"Copy\" will copy the text\nin the entry to the clipboard");
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
|
||||
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 8);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||
|
||||
/* Create the first entry */
|
||||
entry = gtk_entry_new ();
|
||||
gtk_box_pack_start (GTK_BOX (hbox), entry, TRUE, TRUE, 0);
|
||||
|
||||
/* Create the button */
|
||||
button = gtk_button_new_with_mnemonic (_("_Copy"));
|
||||
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
|
||||
g_signal_connect (button, "clicked",
|
||||
G_CALLBACK (copy_button_clicked), entry);
|
||||
|
||||
label = gtk_label_new ("\"Paste\" will paste the text from the clipboard to the entry");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
|
||||
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 8);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||
|
||||
/* Create the second entry */
|
||||
entry = gtk_entry_new ();
|
||||
gtk_box_pack_start (GTK_BOX (hbox), entry, TRUE, TRUE, 0);
|
||||
|
||||
/* Create the button */
|
||||
button = gtk_button_new_with_mnemonic (_("_Paste"));
|
||||
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
|
||||
g_signal_connect (button, "clicked",
|
||||
G_CALLBACK (paste_button_clicked), entry);
|
||||
|
||||
label = gtk_label_new ("Images can be transferred via the clipboard, too");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
|
||||
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 8);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||
|
||||
/* Create the first image */
|
||||
image = gtk_image_new_from_icon_name ("dialog-warning",
|
||||
GTK_ICON_SIZE_BUTTON);
|
||||
ebox = gtk_event_box_new ();
|
||||
gtk_container_add (GTK_CONTAINER (ebox), image);
|
||||
gtk_container_add (GTK_CONTAINER (hbox), ebox);
|
||||
|
||||
/* make ebox a drag source */
|
||||
gtk_drag_source_set (ebox, GDK_BUTTON1_MASK, NULL, 0, GDK_ACTION_COPY);
|
||||
gtk_drag_source_add_image_targets (ebox);
|
||||
g_signal_connect (ebox, "drag-begin",
|
||||
G_CALLBACK (drag_begin), image);
|
||||
g_signal_connect (ebox, "drag-data-get",
|
||||
G_CALLBACK (drag_data_get), image);
|
||||
|
||||
/* accept drops on ebox */
|
||||
gtk_drag_dest_set (ebox, GTK_DEST_DEFAULT_ALL,
|
||||
NULL, 0, GDK_ACTION_COPY);
|
||||
gtk_drag_dest_add_image_targets (ebox);
|
||||
g_signal_connect (ebox, "drag-data-received",
|
||||
G_CALLBACK (drag_data_received), image);
|
||||
|
||||
/* context menu on ebox */
|
||||
g_signal_connect (ebox, "button-press-event",
|
||||
G_CALLBACK (button_press), image);
|
||||
|
||||
/* Create the second image */
|
||||
image = gtk_image_new_from_icon_name ("process-stop",
|
||||
GTK_ICON_SIZE_BUTTON);
|
||||
ebox = gtk_event_box_new ();
|
||||
gtk_container_add (GTK_CONTAINER (ebox), image);
|
||||
gtk_container_add (GTK_CONTAINER (hbox), ebox);
|
||||
|
||||
/* make ebox a drag source */
|
||||
gtk_drag_source_set (ebox, GDK_BUTTON1_MASK, NULL, 0, GDK_ACTION_COPY);
|
||||
gtk_drag_source_add_image_targets (ebox);
|
||||
g_signal_connect (ebox, "drag-begin",
|
||||
G_CALLBACK (drag_begin), image);
|
||||
g_signal_connect (ebox, "drag-data-get",
|
||||
G_CALLBACK (drag_data_get), image);
|
||||
|
||||
/* accept drops on ebox */
|
||||
gtk_drag_dest_set (ebox, GTK_DEST_DEFAULT_ALL,
|
||||
NULL, 0, GDK_ACTION_COPY);
|
||||
gtk_drag_dest_add_image_targets (ebox);
|
||||
g_signal_connect (ebox, "drag-data-received",
|
||||
G_CALLBACK (drag_data_received), image);
|
||||
|
||||
/* context menu on ebox */
|
||||
g_signal_connect (ebox, "button-press-event",
|
||||
G_CALLBACK (button_press), image);
|
||||
|
||||
/* tell the clipboard manager to make the data persistent */
|
||||
clipboard = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD);
|
||||
gtk_clipboard_set_can_store (clipboard, NULL, 0);
|
||||
}
|
||||
|
||||
if (!gtk_widget_get_visible (window))
|
||||
gtk_widget_show_all (window);
|
||||
else
|
||||
gtk_widget_destroy (window);
|
||||
|
||||
return window;
|
||||
}
|
||||
|
Before Width: | Height: | Size: 54 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |