Compare commits
18 Commits
wip/otte/c
...
3.0.3
Author | SHA1 | Date | |
---|---|---|---|
|
5b3d82176a | ||
|
565744d498 | ||
|
318dbe7524 | ||
|
80b6fd0978 | ||
|
da22745fa2 | ||
|
7abeab8490 | ||
|
be3fc28e66 | ||
|
647f8fb2fb | ||
|
c65309b673 | ||
|
6ff74f6e06 | ||
|
021ba76ceb | ||
|
1859972b3b | ||
|
f17bed1eac | ||
|
6accf7bf16 | ||
|
a5d5edace1 | ||
|
ed188c8b10 | ||
|
fa8bd08f5d | ||
|
8ee894ae46 |
@@ -1,43 +0,0 @@
|
|||||||
stages:
|
|
||||||
- build
|
|
||||||
- flatpak
|
|
||||||
|
|
||||||
gtk:
|
|
||||||
image: ebassi/gitlab-gtk:latest
|
|
||||||
stage: build
|
|
||||||
before_script:
|
|
||||||
- export CCACHE_DISABLE=true_
|
|
||||||
script:
|
|
||||||
- bash -x ./.gitlab-ci/test-docker.sh
|
|
||||||
cache:
|
|
||||||
paths:
|
|
||||||
- subprojects/gdk-pixbuf/
|
|
||||||
- subprojects/glib/
|
|
||||||
- subprojects/graphene/
|
|
||||||
- subprojects/libepoxy/
|
|
||||||
- subprojects/pango/
|
|
||||||
artifacts:
|
|
||||||
when: on_failure
|
|
||||||
name: "gtk-${CI_COMMIT_REF_NAME}"
|
|
||||||
paths:
|
|
||||||
- "${CI_PROJECT_DIR}/_build/meson-logs"
|
|
||||||
|
|
||||||
flatpak:demo:
|
|
||||||
image: registry.gitlab.com/alatiera/gnome-nightly-oci/gnome-master:latest
|
|
||||||
stage: flatpak
|
|
||||||
script:
|
|
||||||
- bash -x ./.gitlab-ci/flatpak-build.sh org.gtk.Demo
|
|
||||||
artifacts:
|
|
||||||
paths:
|
|
||||||
- org.gtk.Demo-dev.flatpak
|
|
||||||
expire_in: 1 day
|
|
||||||
|
|
||||||
flatpak:widget-factory:
|
|
||||||
image: registry.gitlab.com/alatiera/gnome-nightly-oci/gnome-master:latest
|
|
||||||
stage: flatpak
|
|
||||||
script:
|
|
||||||
- bash -x ./.gitlab-ci/flatpak-build.sh org.gtk.WidgetFactory
|
|
||||||
artifacts:
|
|
||||||
paths:
|
|
||||||
- org.gtk.WidgetFactory-dev.flatpak
|
|
||||||
expire_in: 1 day
|
|
@@ -1,79 +0,0 @@
|
|||||||
FROM fedora:27
|
|
||||||
|
|
||||||
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 \
|
|
||||||
desktop-file-utils \
|
|
||||||
elfutils-libelf-devel \
|
|
||||||
fribidi-devel \
|
|
||||||
gcc \
|
|
||||||
gcc-c++ \
|
|
||||||
gdk-pixbuf2-devel \
|
|
||||||
gdk-pixbuf2-modules \
|
|
||||||
gettext \
|
|
||||||
git \
|
|
||||||
glib2-devel \
|
|
||||||
glibc-devel \
|
|
||||||
glibc-headers \
|
|
||||||
gobject-introspection-devel \
|
|
||||||
graphene-devel \
|
|
||||||
gstreamer1-devel \
|
|
||||||
gstreamer1-plugins-good \
|
|
||||||
gstreamer1-plugins-bad-free-devel \
|
|
||||||
gstreamer1-plugins-base-devel \
|
|
||||||
iso-codes \
|
|
||||||
itstool \
|
|
||||||
json-glib-devel \
|
|
||||||
libattr-devel \
|
|
||||||
libepoxy-devel \
|
|
||||||
libffi-devel \
|
|
||||||
libmount-devel \
|
|
||||||
librsvg2 \
|
|
||||||
libselinux-devel \
|
|
||||||
libXcomposite-devel \
|
|
||||||
libXcursor-devel \
|
|
||||||
libXcursor-devel \
|
|
||||||
libXdamage-devel \
|
|
||||||
libXfixes-devel \
|
|
||||||
libXi-devel \
|
|
||||||
libXinerama-devel \
|
|
||||||
libxkbcommon-devel \
|
|
||||||
libXrandr-devel \
|
|
||||||
libXrender-devel \
|
|
||||||
libxslt \
|
|
||||||
mesa-dri-drivers \
|
|
||||||
mesa-libEGL-devel \
|
|
||||||
mesa-libwayland-egl-devel \
|
|
||||||
ninja-build \
|
|
||||||
pango-devel \
|
|
||||||
pcre-devel \
|
|
||||||
python3 \
|
|
||||||
python3-pip \
|
|
||||||
python3-wheel \
|
|
||||||
redhat-rpm-config \
|
|
||||||
sassc \
|
|
||||||
systemtap-sdt-devel \
|
|
||||||
vulkan-devel \
|
|
||||||
wayland-devel \
|
|
||||||
wayland-protocols-devel \
|
|
||||||
which \
|
|
||||||
xorg-x11-server-Xvfb \
|
|
||||||
&& dnf clean all
|
|
||||||
|
|
||||||
RUN pip3 install meson
|
|
||||||
|
|
||||||
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
|
|
@@ -1,44 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
appid=$1
|
|
||||||
|
|
||||||
builddir=app
|
|
||||||
repodir=repo
|
|
||||||
|
|
||||||
flatpak-builder \
|
|
||||||
--stop-at=gtk \
|
|
||||||
${builddir} \
|
|
||||||
build-aux/flatpak/${appid}.json
|
|
||||||
|
|
||||||
flatpak-builder \
|
|
||||||
--run ${builddir} build-aux/flatpak/${appid}.json \
|
|
||||||
meson \
|
|
||||||
--prefix /app \
|
|
||||||
--libdir /app/lib \
|
|
||||||
--buildtype debug \
|
|
||||||
-Dx11-backend=true \
|
|
||||||
-Dwayland-backend=true \
|
|
||||||
-Dprint-backends=file \
|
|
||||||
-Dbuild-tests=false \
|
|
||||||
-Dbuild-examples=false \
|
|
||||||
-Dintrospection=false \
|
|
||||||
-Ddemos=true \
|
|
||||||
_build .
|
|
||||||
|
|
||||||
flatpak-builder \
|
|
||||||
--run ${builddir} build-aux/flatpak/${appid}.json \
|
|
||||||
ninja -C _build install
|
|
||||||
|
|
||||||
flatpak-builder \
|
|
||||||
--finish-only \
|
|
||||||
--repo=${repodir} \
|
|
||||||
${builddir} \
|
|
||||||
build-aux/flatpak/${appid}.json
|
|
||||||
|
|
||||||
flatpak build-bundle \
|
|
||||||
${repodir} \
|
|
||||||
${appid}-dev.flatpak \
|
|
||||||
--runtime-repo=https://flathub.org/repo/flathub.flatpakrepo \
|
|
||||||
${appid}
|
|
@@ -1,11 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
TAG="ebassi/gitlab-gtk:latest"
|
|
||||||
|
|
||||||
sudo docker build --build-arg HOST_USER_ID="$UID" --tag "${TAG}" \
|
|
||||||
--file "Dockerfile" .
|
|
||||||
sudo docker run --rm --security-opt label=disable \
|
|
||||||
--volume "$(pwd)/..:/home/user/app" --workdir "/home/user/app" \
|
|
||||||
--tty --interactive "${TAG}" bash
|
|
@@ -1,23 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
srcdir=$(pwd)
|
|
||||||
|
|
||||||
meson \
|
|
||||||
-Dx11-backend=true \
|
|
||||||
-Dwayland-backend=true \
|
|
||||||
-Dbroadway-backend=true \
|
|
||||||
-Dvulkan=yes \
|
|
||||||
_build $srcdir
|
|
||||||
|
|
||||||
cd _build
|
|
||||||
|
|
||||||
ninja
|
|
||||||
|
|
||||||
xvfb-run -a -s "-screen 0 1024x768x24" \
|
|
||||||
meson test \
|
|
||||||
--print-errorlogs \
|
|
||||||
--suite=gtk+ \
|
|
||||||
--no-suite=gtk+:gsk \
|
|
||||||
--no-suite=gtk+:a11y
|
|
@@ -1,39 +0,0 @@
|
|||||||
## Steps to reproduce
|
|
||||||
|
|
||||||
1. ...
|
|
||||||
2. ...
|
|
||||||
3. ...
|
|
||||||
|
|
||||||
<!--
|
|
||||||
You should try and reproduce with the demos applications available
|
|
||||||
under the `demos` directory, or the test programs in the `tests` directory.
|
|
||||||
Alternatively, please attach a *small and self-contained* example that
|
|
||||||
exhibits the issue.
|
|
||||||
-->
|
|
||||||
|
|
||||||
## Current behavior
|
|
||||||
<!--
|
|
||||||
Please describe the current behaviour
|
|
||||||
-->
|
|
||||||
|
|
||||||
## Expected outcome
|
|
||||||
<!--
|
|
||||||
Please describe the expected outcome
|
|
||||||
-->
|
|
||||||
|
|
||||||
## Version information
|
|
||||||
<!--
|
|
||||||
- which version of GTK+ you are using
|
|
||||||
- what operating system and version
|
|
||||||
- for Linux, which distribution
|
|
||||||
- if you built GTK+ yourself, the list of options used to configure the build
|
|
||||||
-->
|
|
||||||
|
|
||||||
## Additional information
|
|
||||||
<!--
|
|
||||||
- If the bug was a crash, the exact text that was printed out
|
|
||||||
when the crash occurred.
|
|
||||||
- If the bug was a crash, attaching a stack trace obtained using
|
|
||||||
GDB is appreciated; follow the instructions on the wiki:
|
|
||||||
https://wiki.gnome.org/Community/GettingInTouch/Bugzilla/GettingTraces
|
|
||||||
-->
|
|
@@ -1,63 +0,0 @@
|
|||||||
If you want to hack on the GTK+ project, you'll 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
|
|
||||||
|
|
||||||
Up-to-date instructions about developing GNOME applications and libraries
|
|
||||||
can be found here:
|
|
||||||
|
|
||||||
* https://developer.gnome.org
|
|
||||||
|
|
||||||
Information about using GitLab with GNOME can be found here:
|
|
||||||
|
|
||||||
* https://wiki.gnome.org/GitLab
|
|
||||||
|
|
||||||
In order to get Git GTK+ installed on your system, you need to have the
|
|
||||||
required versions of all the GTK+ dependencies; 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).
|
|
||||||
|
|
||||||
You should start by forking the GTK repository from the GitLab web UI, and
|
|
||||||
cloning from your fork:
|
|
||||||
|
|
||||||
```ssh
|
|
||||||
$ git clone https://gitlab.gnome.org/yourusername/gtk.git
|
|
||||||
$ cd gtk
|
|
||||||
```
|
|
||||||
|
|
||||||
**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 git@gitlab.gnome.org:GNOME/gtk.git
|
|
||||||
$ cd gtk
|
|
||||||
```
|
|
||||||
|
|
||||||
To compile the Git version of GTK+ on your system, you will need to
|
|
||||||
configure your build using Meson:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
$ meson _builddir .
|
|
||||||
$ cd _builddir
|
|
||||||
$ ninja
|
|
||||||
```
|
|
||||||
|
|
||||||
**Note**: For information about submitting patches and pushing changes
|
|
||||||
to Git, see the `README.md` and `README.commits` files. In particular,
|
|
||||||
don't, under any circumstances, push anything to Git before reading and
|
|
||||||
understanding `README.commmits`.
|
|
||||||
|
|
||||||
Typically, you should work on your own branch:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
$ git checkout -b 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.
|
|
7
COPYING
@@ -2,7 +2,7 @@
|
|||||||
Version 2, June 1991
|
Version 2, June 1991
|
||||||
|
|
||||||
Copyright (C) 1991 Free Software Foundation, Inc.
|
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
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
of this license document, but changing it is not allowed.
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
@@ -463,8 +463,9 @@ convey the exclusion of warranty; and each file should have at least the
|
|||||||
Library General Public License for more details.
|
Library General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU Library General Public
|
You should have received a copy of the GNU Library General Public
|
||||||
License along with this library; if not, write to the Free Software
|
License along with this library; if not, write to the
|
||||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
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.
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
514
ChangeLog.gtk-async-file-chooser
Normal file
@@ -0,0 +1,514 @@
|
|||||||
|
2006-04-30 Kristian Rietveld <kris@imendio.com>
|
||||||
|
|
||||||
|
* gtk/gtkfilesystem.[ch] (gtk_file_info_render_icon): remove the
|
||||||
|
caching code,
|
||||||
|
(gtk_file_info_get_icon_name): new function,
|
||||||
|
(gtk_file_system_volume_get_icon_name): new function,
|
||||||
|
(gtk_file_system_volume_render_icon): refactor to use
|
||||||
|
get_icon_name() and render the icon on the fly.
|
||||||
|
|
||||||
|
* gtk/gtkfilesystemunix.c (gtk_file_system_unix_volume_render_icon),
|
||||||
|
(gtk_file_system_unix_volume_get_icon_name): reflect updates in
|
||||||
|
file system interface,
|
||||||
|
(get_fallback_icon): remove, along with icon caching code.
|
||||||
|
|
||||||
|
* gtk/gtk.symbols: updated.
|
||||||
|
|
||||||
|
2006-04-30 Kristian Rietveld <kris@imendio.com>
|
||||||
|
|
||||||
|
* gtk/gtkfilesystemmodel.c (got_root_folder_cb), (ref_path_cb),
|
||||||
|
(get_children_get_folder_cb): don't leak the handle,
|
||||||
|
(got_root_folder_cb), (get_children_get_folder_cb): emit
|
||||||
|
row-inserted for the newly added nodes.
|
||||||
|
|
||||||
|
2006-04-30 Kristian Rietveld <kris@imendio.com>
|
||||||
|
|
||||||
|
* gtk/gtkfilechooserdefault.c (file_list_drag_data_select_uris),
|
||||||
|
(file_list_drag_data_received_get_info_cb),
|
||||||
|
(file_list_drag_data_received_cb): refactor code for selecting
|
||||||
|
multiple uris into file_list_drag_data_select_uris().
|
||||||
|
|
||||||
|
2006-04-23 Kristian Rietveld <kris@imendio.com>
|
||||||
|
|
||||||
|
* gtk/gtkfilechooserbutton.c (dnd_select_folder_get_info_cb): don't
|
||||||
|
leak handle,
|
||||||
|
(change_icon_theme_get_info_cb), (set_info_get_info_cb),
|
||||||
|
(model_add_special_get_info_cb), (update_label_get_info_cb): ditto.
|
||||||
|
|
||||||
|
* gtk/gtkfilechooserdefault.c (shortcuts_reload_icons_get_info_cb):
|
||||||
|
don't leak the handle,
|
||||||
|
(get_file_info_finished), (edited_idle_create_folder_cb),
|
||||||
|
(file_list_drag_data_received_get_info_cb),
|
||||||
|
(show_and_select_paths_get_folder_cb),
|
||||||
|
(update_current_folder_get_info_cb), (add_shortcut_get_info_cb),
|
||||||
|
(confirmation_confirm_get_info_cb), (action_create_folder_cb),
|
||||||
|
(save_entry_get_info_cb), (shortcuts_activate_volume_mount_cb),
|
||||||
|
(shortcuts_activate_get_info_cb), (update_from_entry_get_info_cb):
|
||||||
|
ditto.
|
||||||
|
|
||||||
|
* gtk/gtkfilechooserentry.c (load_directory_get_folder_callback):
|
||||||
|
don't leak the handle.
|
||||||
|
|
||||||
|
* gtk/gtkpathbar.c (set_button_image_get_info_cb),
|
||||||
|
(gtk_path_bar_get_info_callback): don't leak the handle.
|
||||||
|
|
||||||
|
2006-04-23 Kristian Rietveld <kris@imendio.com>
|
||||||
|
|
||||||
|
Review.
|
||||||
|
|
||||||
|
* gtk/gtkfilechooserdefault.c (shortcuts_reload_icons_get_info_cb):
|
||||||
|
don't forget to unref data->impl at the end.
|
||||||
|
|
||||||
|
2006-04-23 Kristian Rietveld <kris@imendio.com>
|
||||||
|
|
||||||
|
Review, continued.
|
||||||
|
|
||||||
|
* gtk/gtkfilechooserdialog.c (response_cb): set response_requested
|
||||||
|
to FALSE after stopping emission of the response signal.
|
||||||
|
|
||||||
|
2006-03-16 Kristian Rietveld <kris@imendio.com>
|
||||||
|
|
||||||
|
More review work.
|
||||||
|
|
||||||
|
* gtk/gtkfilechooserprivate.h: remove idle_finished_loading_source
|
||||||
|
from GtkFileSystemModel.
|
||||||
|
|
||||||
|
* gtk/gtkfilesystemmodel.c (gtk_file_system_model_finalize): remove
|
||||||
|
idle_finished_loading_source,
|
||||||
|
(idle_finished_loading_cb), (queue_finished_loading): removed,
|
||||||
|
(got_root_folder_cb): save a list walk, immediately emit
|
||||||
|
finished-loading and don't queue it, since we are already in an
|
||||||
|
idle here, always list_children() so the children the folder already
|
||||||
|
has are returned,
|
||||||
|
(_gtk_file_system_model_new): handle the case where NULL is
|
||||||
|
returned by _get_folder(),
|
||||||
|
(_gtk_file_system_model_path_do): remove comment, and append the
|
||||||
|
new handle to the list, don't try to remove,
|
||||||
|
(get_children_get_folder_cb): save a list walk, remove the dummy
|
||||||
|
child if the _get_folder() call fails or is cancelled.
|
||||||
|
|
||||||
|
2006-03-14 Kristian Rietveld <kris@imendio.com>
|
||||||
|
|
||||||
|
More suggestions from Federico.
|
||||||
|
|
||||||
|
* gtk/gtkfilesystemunix.c (gtk_file_system_unix_create_folder):
|
||||||
|
remove check for filename_is_root(), since we never hit that code
|
||||||
|
and else mkdir will fail anyway,
|
||||||
|
(gtk_file_system_unix_create_folder): fixup parent folder refresh
|
||||||
|
code.
|
||||||
|
|
||||||
|
2006-03-14 Kristian Rietveld <kris@imendio.com>
|
||||||
|
|
||||||
|
* gtk/gtkfilesystemunix.c (read_hidden_file), (fill_in_hidden),
|
||||||
|
(get_is_hidden_for_file): factor out g_file_get_contents() code
|
||||||
|
in read_hidden_file(). (Federico Mena Quintero).
|
||||||
|
|
||||||
|
2006-03-14 Kristian Rietveld <kris@imendio.com>
|
||||||
|
|
||||||
|
Icon name code suggestions by Federico Mena Quintero.
|
||||||
|
|
||||||
|
* gtk/gtkfilesystemunix.c: add GTK_FILE_INFO_ICON to
|
||||||
|
STAT_NEEDED_MASK,
|
||||||
|
(get_fallback_icon_name), (get_fallback_icon),
|
||||||
|
(get_icon_name_for_directory), (get_special_icon_name): get rid
|
||||||
|
of strdups,
|
||||||
|
(get_icon_type_from_path): add a statbuf argument and use the
|
||||||
|
statbuf when folder_unix is NULL,
|
||||||
|
(create_file_info): adapt to work with above changes.
|
||||||
|
|
||||||
|
2006-03-14 Kristian Rietveld <kris@imendio.com>
|
||||||
|
|
||||||
|
* gtk/gtkfilesystemunix.c (gtk_file_system_unix_get_info): path
|
||||||
|
is NULL is an error here (gtk_file_system_get_info() already guards
|
||||||
|
path = NULL),
|
||||||
|
(gtk_file_system_unix_get_info): move basename creation to just
|
||||||
|
before create_file_info(). (Federico Mena Quintero).
|
||||||
|
|
||||||
|
2006-03-14 Kristian Rietveld <kris@imendio.com>
|
||||||
|
|
||||||
|
* gtk/gtkfilesystemunix.c (struct _GtkFileFolderUnix): add
|
||||||
|
load_folder_id field,
|
||||||
|
(load_folder): add thread enter/leave construct, set load_folder_id
|
||||||
|
to zero since we have the idle removed when we return,
|
||||||
|
(gtk_file_system_unix_get_folder): initialize load_folder_id to 0
|
||||||
|
and store the source id of the load_folder idle,
|
||||||
|
(gtk_file_folder_unix_finalize): remove the load_folder idle
|
||||||
|
if necessary. (Federico Mena Quintero).
|
||||||
|
|
||||||
|
2006-03-14 Kristian Rietveld <kris@imendio.com>
|
||||||
|
|
||||||
|
* gtk/gtkfilechooser.c (gtk_file_chooser_get_current_folder): return
|
||||||
|
NULL if there is no current folder path.
|
||||||
|
|
||||||
|
* gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_map): we
|
||||||
|
reload the current folder if there is one, else we continue the
|
||||||
|
still pending load.
|
||||||
|
|
||||||
|
2006-03-14 Kristian Rietveld <kris@imendio.com>
|
||||||
|
|
||||||
|
Couple of fixes from Markku Vire.
|
||||||
|
|
||||||
|
* gtk/gtkfilesystem.c (gtk_file_info_copy): also strdup icon_name
|
||||||
|
and display_key.
|
||||||
|
|
||||||
|
* gtk/gtkfilesystemunix.c (gtk_file_system_unix_create_folder):
|
||||||
|
initialize error to NULL,
|
||||||
|
(gtk_file_folder_unix_list_children): return an empty list for now if
|
||||||
|
we couldn't read the directory.
|
||||||
|
|
||||||
|
2005-12-23 Kristian Rietveld <kris@imendio.com>
|
||||||
|
|
||||||
|
* gtk/gtkfilechooserdefault.c (update_current_folder_get_info_cb),
|
||||||
|
(gtk_file_chooser_default_update_current_folder): set and unset
|
||||||
|
busy cursor while checking whether the given path is a folder.
|
||||||
|
|
||||||
|
2005-12-23 Kristian Rietveld <kris@imendio.com>
|
||||||
|
|
||||||
|
* gtk/gtkfilesystem.h: change the GtkFileInfo argument of the
|
||||||
|
GetInfoCallback to be const.
|
||||||
|
|
||||||
|
* gtk/gtkfilechooserbutton.c, gtk/gtkfilechooserdefault.c,
|
||||||
|
gtk/gtkpathbar.c: changes functions to reflect the above change.
|
||||||
|
|
||||||
|
2005-12-23 Kristian Rietveld <kris@imendio.com>
|
||||||
|
|
||||||
|
* gtk/gtkfilechooserdefault.c, gtk/gtkfilechooserprivate.h: keep track
|
||||||
|
of handles, cancel all pending operations on dispose.
|
||||||
|
|
||||||
|
2005-12-23 Kristian Rietveld <kris@imendio.com>
|
||||||
|
|
||||||
|
* gtk/gtkfilechooserprivate.h (struct _GtkFileSystemModel): add
|
||||||
|
pending_handles field,
|
||||||
|
(struct _FileModelNode): add load_pending flag.
|
||||||
|
|
||||||
|
* gtk/gtkfilesystemmodel.c (gtk_file_system_model_dispose): introduce,
|
||||||
|
cancel all pending operations here,
|
||||||
|
(got_root_folder_cb), (_gtk_file_system_model_new), (ref_path_cb),
|
||||||
|
(_gtk_file_system_model_path_do): keep track of all pending
|
||||||
|
operations, handle cancelled operations.
|
||||||
|
|
||||||
|
2005-12-23 Kristian Rietveld <kris@imendio.com>
|
||||||
|
|
||||||
|
* gtk/gtkfilechooserbutton.c (gtk_file_chooser_button_finalize),
|
||||||
|
(gtk_file_chooser_button_destroy): move all handle cancellations
|
||||||
|
and object unrefs to destroy.
|
||||||
|
|
||||||
|
* gtk/gtkpathbar.c (gtk_path_bar_finalize), (gtk_path_bar_dispose):
|
||||||
|
likewise.
|
||||||
|
|
||||||
|
* gtk/gtkfilechooserentry.c (gtk_file_chooser_entry_class_init):
|
||||||
|
add dispose,
|
||||||
|
(gtk_file_chooser_entry_dispose): cancel handles and unrefs
|
||||||
|
objects here instead of finalize.
|
||||||
|
|
||||||
|
2005-12-23 Kristian Rietveld <kris@imendio.com>
|
||||||
|
|
||||||
|
* gtk/gtkfilesystem.c (get_cached_icon): check if "name" is an
|
||||||
|
absolute path, if so load the icon from that file.
|
||||||
|
|
||||||
|
* gtk/gtkfilesystemunix.c (gtk_file_system_unix_get_folder): fix
|
||||||
|
the build.
|
||||||
|
|
||||||
|
2005-12-21 Kristian Rietveld <kris@imendio.com>
|
||||||
|
|
||||||
|
* gtk/gtkfilesystemunix.c (gtk_file_system_unix_get_folder): remove
|
||||||
|
the FIXME since it doesn't make sense, when we return a cached
|
||||||
|
folder we won't emit finished-loading either,
|
||||||
|
(gtk_file_system_unix_create_folder): remove unused variable,
|
||||||
|
(gtk_file_folder_unix_list_children): remove unused code,
|
||||||
|
(get_is_hidden_for_file): new function,
|
||||||
|
(create_file_info): also handle getting is_hidden when called
|
||||||
|
without a folder unix (from _system_get_info() for example).
|
||||||
|
|
||||||
|
2005-12-20 Kristian Rietveld <kris@imendio.com>
|
||||||
|
|
||||||
|
* gtk/gtkfilechooserdefault.c (check_is_folder): fully removed!
|
||||||
|
woo!,
|
||||||
|
(check_save_entry): add is_folder argument,
|
||||||
|
(gtk_file_chooser_default_get_paths): update check_save_entry() call,
|
||||||
|
(get_display_name_for_folder): removed,
|
||||||
|
(confirmation_confirm_get_info_cb): new function which will
|
||||||
|
handle the confirmation dialog now we have all information for it,
|
||||||
|
(should_respond_after_confirm_overwrite): replace the call to
|
||||||
|
get_display_name_for_folder() with an asynchronous solution,
|
||||||
|
(action_create_folder_cb): request dialog response on successfull
|
||||||
|
folder creation,
|
||||||
|
(gtk_file_chooser_default_should_respond): update call to
|
||||||
|
check_save_entry(); replace the check is folder call for "path"
|
||||||
|
by just using the is_folder return value from check_save_entry();
|
||||||
|
replaced the check is folder call for "parent_path" with an
|
||||||
|
asynchronous setup, remainder of that work is now done in
|
||||||
|
save_entry_get_info_cb(),
|
||||||
|
(save_entry_get_info_cb): new function.
|
||||||
|
|
||||||
|
* gtk/gtkfilechoosermebed.[ch]: add response-requested signal.
|
||||||
|
|
||||||
|
* gtk/gtkfilechooserdialog.c, gtk/gtkfilechooserprivate.h: handle
|
||||||
|
response_requested signal.
|
||||||
|
|
||||||
|
* gtk/gtkfilechooserentry.[ch]
|
||||||
|
(_gtk_file_chooser_entry_get_is_folder): new function.
|
||||||
|
|
||||||
|
2005-12-20 Kristian Rietveld <kris@imendio.com>
|
||||||
|
|
||||||
|
* gtk/gtkfilechooserdefault.c (ref_path_cb): when called with
|
||||||
|
!folder, check if node is the node we are looking for (can be
|
||||||
|
triggered when we call ref_path_cb ourselves after a find_child_node),
|
||||||
|
(_gtk_file_system_model_path_do): introduce parent_node field;
|
||||||
|
after finding a child node in a loaded parent node, don't forget
|
||||||
|
to call ref_path_cb,
|
||||||
|
(get_children_get_folder_cb): don't forget to set data->node->folder
|
||||||
|
to the newly acquired folder.
|
||||||
|
|
||||||
|
2005-12-20 Kristian Rietveld <kris@imendio.com>
|
||||||
|
|
||||||
|
* gtk/gtkfilechooserdefault.c (show_and_select_paths_get_folder_cb):
|
||||||
|
handle case where the folder we get already finished loading.
|
||||||
|
|
||||||
|
* gtk/gtkfilesystemmodel.c (ref_path_cb),
|
||||||
|
(_gtk_file_system_model_path_do): make this work.
|
||||||
|
|
||||||
|
2005-12-19 Kristian Rietveld <kris@imendio.com>
|
||||||
|
|
||||||
|
* gtk/gtkfilechooserdefault.c (shortcuts_update_count): modify
|
||||||
|
in such a way that it can also negatively update the count on
|
||||||
|
failures,
|
||||||
|
(get_file_info_finished): handle failures, update save folder
|
||||||
|
combo box on success,
|
||||||
|
(shortcuts_insert_path): change the boolean return value into a
|
||||||
|
void one, also refilter the model and update the save folder combo
|
||||||
|
box for the non-asynchronous case,
|
||||||
|
(shortcuts_append_home), (shortcuts_append_desktop),
|
||||||
|
(shortcuts_add_volumes), (shortcuts_add_current_folder),
|
||||||
|
(add_shortcuts_get_info_cb): adapt to shortcuts_insert_path() updates.
|
||||||
|
|
||||||
|
2005-12-19 Kristian Rietveld <kris@imendio.com>
|
||||||
|
|
||||||
|
* gtk/gtkpathbar.[ch]: add handle fields to ButtonData and
|
||||||
|
GtkPathBar; do correct handle bookkeeping.
|
||||||
|
|
||||||
|
* gtk/gtkfilesystemunix.c (load_folder),
|
||||||
|
(gtk_file_system_unix_get_folder),
|
||||||
|
(gtk_file_folder_unix_is_finished_loading): add is_finished_loading
|
||||||
|
field to GtkFileFolderUnix, which is set to true once we are
|
||||||
|
really finished with loading (previous assumption that we are
|
||||||
|
always finshed loading is not true anymore).
|
||||||
|
|
||||||
|
* gtk/gtkfilesystemmodel.c (got_root_folder_cb): if the folder is
|
||||||
|
finished loading, list the children and update the root level.
|
||||||
|
|
||||||
|
* gtk/gtkfilechooserdefault.c (update_current_folder_get_info_cb):
|
||||||
|
handle cancellation.
|
||||||
|
|
||||||
|
2005-12-16 Kristian Rietveld <kris@imendio.com>
|
||||||
|
|
||||||
|
* gtk/gtkfilesystemunix.c: always call the callback, even when
|
||||||
|
cancelled; ref handles passed to the callback queue functions;
|
||||||
|
don't set cancelled to TRUE in _cancel_operation(), since operations
|
||||||
|
in this backend are always completed,
|
||||||
|
(get_special_icon_name): don't strdup the value of
|
||||||
|
get_icon_name_for_directory() again.
|
||||||
|
|
||||||
|
* gtk/gtkfilechooserbutton.c: adapt to new cancellation policy;
|
||||||
|
reference all objects which are passed as callback arguments; in the
|
||||||
|
callback check if the handles match.
|
||||||
|
|
||||||
|
* gtk/gtkfilechooserentry.c: likewise.
|
||||||
|
|
||||||
|
* gtk/gtkfilechooserdefault.c: likewise. Also changed the shortcut
|
||||||
|
loading code to be more like the code in GtkFileChooserButton, where
|
||||||
|
we store all handles in the model and have model_row_free_data
|
||||||
|
cancel any pending operations,
|
||||||
|
(shortcuts_model_create): copy the error.
|
||||||
|
|
||||||
|
* gtk/gtkfilechooserprivate.h (struct _GtkFileChooserDefault): remove
|
||||||
|
loading_volumes and loading_bookmarks fields.
|
||||||
|
|
||||||
|
* gtk/gtkfilesystem.c (gtk_file_info_free): free icon_name here...
|
||||||
|
|
||||||
|
2005-12-13 Kristian Rietveld <kris@imendio.com>
|
||||||
|
|
||||||
|
* gtk/gtkfilechooserdefault.c (edited_idle_create_folder_cb): fix
|
||||||
|
thinko.
|
||||||
|
|
||||||
|
* gtk/gtkfilesystemunix.c (dispatch_create_folder_callback),
|
||||||
|
(queue_create_folder_callback): need to copy/free the path,
|
||||||
|
(gtk_file_system_unix_create_folder): put the "reget folder" hack
|
||||||
|
back in, though it's working different now.
|
||||||
|
|
||||||
|
2005-12-13 Kristian Rietveld <kris@imendio.com>
|
||||||
|
|
||||||
|
* gtk/gtkfilechooserbutton.c (gtk_file_chooser_button_finalize),
|
||||||
|
(dnd_select_folder_get_info_cb), (gtk_file_chooser_drag_data_received),
|
||||||
|
(change_icon_theme_get_info_cb), (change_icon_theme),
|
||||||
|
(model_add_special_get_info_cb), (model_add_special),
|
||||||
|
(update_label_get_info_cb), (update_label_and_image): cancel existing
|
||||||
|
operations, if any; added apprioriate fields to
|
||||||
|
GtkFileChooserButtonPrivate.
|
||||||
|
|
||||||
|
2005-12-13 Kristian Rietveld <kris@imendio.com>
|
||||||
|
|
||||||
|
* gtk/gtkfilechooserentry.c (gtk_file_chooser_entry_finalize): if
|
||||||
|
there's a folder loading, cancel the operation,
|
||||||
|
(load_directory_get_folder_callback): set the loading folder handle
|
||||||
|
to NULL,
|
||||||
|
(load_directory_callback): cancel any currently loading folders
|
||||||
|
before starting a new get folder operation.
|
||||||
|
|
||||||
|
2005-12-13 Kristian Rietveld <kris@imendio.com>
|
||||||
|
|
||||||
|
* gtk/gtkfilechooserdefault.c (shortcuts_insert_path): don't overwrite
|
||||||
|
data if it's already set (for example by the "is volume" case).
|
||||||
|
|
||||||
|
2005-12-13 Kristian Rietveld <kris@imendio.com>
|
||||||
|
|
||||||
|
* gtk/gtkfilechooserbutton.c (set_info_get_info_cb),
|
||||||
|
(set_info_for_path_at_iter): store a row reference in the temporary
|
||||||
|
data structure and not an iter,
|
||||||
|
(model_add_special), (model_update_current_folder),
|
||||||
|
(gtk_file_chooser_button_add_shorcut_folder): remove unused pixbuf
|
||||||
|
variable.
|
||||||
|
|
||||||
|
2005-12-13 Kristian Rietveld <kris@imendio.com>
|
||||||
|
|
||||||
|
* gtk/gtkfilechooserdefault.c (get_file_info_finished),
|
||||||
|
(shortcuts_insert_path): replace gtk_file_system_render_icon() call
|
||||||
|
with gtk_file_system_get_file_info(),
|
||||||
|
(gtk_file_chooser_default_add_shortcut_folder),
|
||||||
|
(gtk_file_chooser_default_remove_shortcut_folder): handle shortcuts
|
||||||
|
which are still loading.
|
||||||
|
|
||||||
|
* gtk/gtkfilechooserprivate.h: add shortcuts_loading field to
|
||||||
|
struct _GtkFileChooserDefault.
|
||||||
|
|
||||||
|
* gtk/gtkfilechooserbutton.c (set_info_get_info_cb),
|
||||||
|
(set_info_for_path_at_iter), (model_free_row_data): keep handle
|
||||||
|
and path together; now supports adding/removing shortcuts
|
||||||
|
which are still loading.
|
||||||
|
|
||||||
|
2005-12-13 Kristian Rietveld <kris@imendio.com>
|
||||||
|
|
||||||
|
* gtk/gtkfilesystem.c: make the cancelled field an GObject property.
|
||||||
|
|
||||||
|
2005-12-13 Kristian Rietveld <kris@imendio.com>
|
||||||
|
|
||||||
|
* gtk/gtkfilesystem.h: make the GError argument in the callbacks
|
||||||
|
const.
|
||||||
|
|
||||||
|
* gtk/gtkfilechooserbutton.c: update callbacks,
|
||||||
|
* gtk/gtkfilechooserentry.c: likewise,
|
||||||
|
* gtk/gtkfilechooserdefault.c: likewise,
|
||||||
|
* gtk/gtkfilesystemmodel.c: likewise,
|
||||||
|
* gtk/gtkpathbar.c: likewise.
|
||||||
|
|
||||||
|
* gtk/gtkfilechooserdefault.c (edited_idle_create_folder_cb): copy
|
||||||
|
the error which will be passed to error_creating_folder_dialog(),
|
||||||
|
(action_create_folder_cb): likewise,
|
||||||
|
(file_list_drag_data_received_get_info_cb): add forgotten GError
|
||||||
|
declaration.
|
||||||
|
|
||||||
|
2005-12-13 Kristian Rietveld <kris@imendio.com>
|
||||||
|
|
||||||
|
* gtk/gtkpathbar.c (get_button_image), (set_button_image),
|
||||||
|
(set_button_image_get_info_cb),
|
||||||
|
(gtk_path_bar_update_button_appearance): update to new icon
|
||||||
|
rendering call.
|
||||||
|
|
||||||
|
2005-12-09 Kristian Rietveld <kris@imendio.com>
|
||||||
|
|
||||||
|
* gtk/gtkfilechooserdefault.c (file_list_drag_data_received),
|
||||||
|
(gtk_file_chooser_default_add_shortcut_folder),
|
||||||
|
(shortcuts_activate_get_info_cb): replace synchronous check_is_folder
|
||||||
|
calls with an async gtk_file_system_get_info() solution.
|
||||||
|
|
||||||
|
2005-12-09 Kristian Rietveld <kris@imendio.com>
|
||||||
|
|
||||||
|
* gtk/gtkfilesystem.c (icon_cache_element_free), (icon_theme_changed),
|
||||||
|
(get_cached_icon), (gtk_file_info_render_icon): implement pixbuf
|
||||||
|
caching as found in the file system backends.
|
||||||
|
|
||||||
|
2005-12-09 Kristian Rietveld <kris@imendio.com>
|
||||||
|
|
||||||
|
* gtk/gtk.symbols: updated.
|
||||||
|
|
||||||
|
* gtk/gtkfilesystem.[ch] (struct GtkFileInfo): added icon_name field,
|
||||||
|
(enum GtkFileInfoType): added GTK_FILE_INFO_ICON,
|
||||||
|
(gtk_file_info_set_icon_name): new function,
|
||||||
|
(gtk_file_info_render_icon): new function,
|
||||||
|
(gtk_file_system_render_icon): removed.
|
||||||
|
|
||||||
|
* gtk/gtkfilesystemunix.c (gtk_file_system_unix_render_icon): removed,
|
||||||
|
(create_file_info): fill icon_name field if required,
|
||||||
|
(get_*_icon): modified to suit create_file_info() better.
|
||||||
|
|
||||||
|
* gtk/gtkfilechooserbutton.c: modified to use
|
||||||
|
gtk_file_info_render_icon() instead of gtk_file_system_render_icon().
|
||||||
|
|
||||||
|
* gtk/gtkfilechooserdefault.c: likewise.
|
||||||
|
|
||||||
|
2005-12-06 Kristian Rietveld <kris@imendio.com>
|
||||||
|
|
||||||
|
* gtk/gtkfilechooserdefault.c (get_file_info_finished),
|
||||||
|
(update_current_folder_get_info_cb): fix mem leaks.
|
||||||
|
|
||||||
|
* gtk/gtkfilesystemunix.c (gtk_file_system_unix_get_info): ditto.
|
||||||
|
|
||||||
|
* gtk/gtkpathbar.c (gtk_path_bar_set_path_finish): ditto.
|
||||||
|
|
||||||
|
2005-12-06 Kristian Rietveld <kris@imendio.com>
|
||||||
|
|
||||||
|
* gtk/gtkfilechooserbutton.c (dnd_select_folder_get_info_cb),
|
||||||
|
(gtk_file_chooser_button_drag_data_received): make asynchronous,
|
||||||
|
(update_label_and_image): remove unused variable.
|
||||||
|
|
||||||
|
* gtk/gtkfilechooserdefault.c
|
||||||
|
(gtk_file_chooser_default_update_current_folder): split in two
|
||||||
|
functions, so we can have the is_folder check back.
|
||||||
|
* gtk/gtkfilechooserprivate.h: add update_current_folder_handle
|
||||||
|
field.
|
||||||
|
|
||||||
|
2005-12-06 Kristian Rietveld <kris@imendio.com>
|
||||||
|
|
||||||
|
* gtk/gtkfilechooserdefault.c (show_and_select_paths): fixed a typo.
|
||||||
|
|
||||||
|
2005-12-05 Federico Mena Quintero <federico@ximian.com>
|
||||||
|
|
||||||
|
(merge from HEAD)
|
||||||
|
|
||||||
|
* gtk/gtkfilechooserdefault.c (trap_activate_cb): "event->state &
|
||||||
|
modifiers", not "event->state && modifiers". Patch by Sadrul
|
||||||
|
Habib Chowdhury <imadil@gmail.com>. Fixes bug #323073.
|
||||||
|
|
||||||
|
2005-12-06 Kristian Rietveld <kris@imendio.com>
|
||||||
|
|
||||||
|
Beginnings of an asynchronous file chooser.
|
||||||
|
|
||||||
|
* gtk/gtkfilechooserbutton.c: display name and the is folder property
|
||||||
|
are now asynchronously set using set_info_for_at_path_iter(), the
|
||||||
|
is folder property is now also stored in the tree model.
|
||||||
|
|
||||||
|
* gtk/gtkfilechooserdefault.c: lots of changes to the shortcuts
|
||||||
|
model code to make it operate asynchronously, check_is_folder() has
|
||||||
|
been "disabled" for now, all other synchronous calls were
|
||||||
|
replaced with asychronous ones.
|
||||||
|
|
||||||
|
* gtk/gtkfilechooserentry.c: update call to
|
||||||
|
gtk_file_system_get_folder().
|
||||||
|
|
||||||
|
* gtk/gtkfilechooserprivate.h: added two fields.
|
||||||
|
|
||||||
|
* gtk/gtkfilesystem.[ch]: for about 85% changed to the changes
|
||||||
|
outlined in the proposal discussed on gtk-devel-list.
|
||||||
|
|
||||||
|
* gtk/gtkfilesystemmodel.[ch]: updated all asynchronous calls,
|
||||||
|
_gtk_file_system_model_path_do() basically had to be rewritten
|
||||||
|
(and I still need to finish that).
|
||||||
|
|
||||||
|
* gtk/gtkfilesystemunix.c: changed to be compatible with the new
|
||||||
|
GtkFileSystem interface.
|
||||||
|
|
||||||
|
* gtk/gtkpathbar.c (button_clicked_cb): block/unblock the
|
||||||
|
button_clicked_cb callback around the call to
|
||||||
|
gtk_toggle_button_set_active(), avoids button_clicked_cb getting
|
||||||
|
called twice.
|
||||||
|
(_gtk_path_bar_set_path): refactored to be asynchronous.
|
500
ChangeLog.gtk-printing
Normal file
@@ -0,0 +1,500 @@
|
|||||||
|
2006-04-17 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
* docs/tools/widgets.c (get_all_widgets): Add print dialog
|
||||||
|
and page setup dialog.
|
||||||
|
|
||||||
|
2006-04-11 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkpapersize.c (gtk_paper_size_get_display_name):
|
||||||
|
Call gettext on the standard paper names.
|
||||||
|
|
||||||
|
2006-04-11 Alexander Larsson <alexl@redhat.com>
|
||||||
|
|
||||||
|
* gdk/gdk.symbols:
|
||||||
|
* gdk/win32/gdkevents-win32.c:
|
||||||
|
* gdk/win32/gdkwin32.h:
|
||||||
|
Add gdk_win32_set_modal_dialog_libgtk_only that we
|
||||||
|
need for handling the mainloop in the print dialogs.
|
||||||
|
|
||||||
|
* gtk/gtkprintoperation-win32.c:
|
||||||
|
Pump the gtk+ mainloop when needed in the print dialogs.
|
||||||
|
This means gtk+ windows will redraw while the print dialogs
|
||||||
|
are up.
|
||||||
|
|
||||||
|
2006-04-10 Alexander Larsson <alexl@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkprintoperation-win32.c:
|
||||||
|
Better size handling.
|
||||||
|
Save win32-specific settings in additions to the generic ones
|
||||||
|
if the generic one is lossy.
|
||||||
|
|
||||||
|
2006-04-10 Alexander Larsson <alexl@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkprintoperation-win32.c:
|
||||||
|
Finish implementing run_page_setup_dialog.
|
||||||
|
|
||||||
|
* gtk/gtkpagesetup.h:
|
||||||
|
* gtk/gtkpapersize.h:
|
||||||
|
* gtk/gtkprint-win32.h:
|
||||||
|
* gtk/gtkprintcontext.h:
|
||||||
|
* gtk/gtkprinter-private.h:
|
||||||
|
* gtk/gtkprintoperation-private.h:
|
||||||
|
* gtk/gtkprintoperation-unix.c:
|
||||||
|
* gtk/gtkprintoperation.h:
|
||||||
|
* gtk/gtkprintsettings.h:
|
||||||
|
s/EGG/GTK/
|
||||||
|
|
||||||
|
2006-04-09 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
* gtk+-unix-print-2.0.pc.in: Fix a typo (#337698)
|
||||||
|
|
||||||
|
2006-04-07 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
* gtk/paper_names_offsets.c:
|
||||||
|
* gtk/gen-paper-names.c: Correct the suffix/duplicate optimizations.
|
||||||
|
|
||||||
|
2006-04-07 Alexander Larsson <alexl@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkprintoperation-win32.c:
|
||||||
|
Initial work on gtk_print_run_page_setup_dialog.
|
||||||
|
Not reading margins yet.
|
||||||
|
|
||||||
|
2006-04-07 Alexander Larsson <alexl@redhat.com>
|
||||||
|
|
||||||
|
* gtk/Makefile.am:
|
||||||
|
Link to winspool
|
||||||
|
|
||||||
|
* gtk/gtk.symbols:
|
||||||
|
* gtk/gtkprintoperation-private.h:
|
||||||
|
* gtk/gtkprintoperation-unix.c:
|
||||||
|
* gtk/gtkprintoperation.[ch]:
|
||||||
|
Add gtk_print_operation_get_status_string() and status
|
||||||
|
string to _gtk_print_operation_set_status.
|
||||||
|
Rename GTK_PRINT_STATUS_PROCESSING to GTK_PRINT_STATUS_PRINTING.
|
||||||
|
|
||||||
|
* gtk/gtkprintoperation-win32.c:
|
||||||
|
Poll for status updates
|
||||||
|
|
||||||
|
* modules/printbackends/cups/gtkprintbackendcups.c:
|
||||||
|
Rename GTK_PRINT_STATUS_PROCESSING to GTK_PRINT_STATUS_PRINTING.
|
||||||
|
|
||||||
|
* tests/print-editor.c:
|
||||||
|
Show print status string
|
||||||
|
|
||||||
|
2006-04-06 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
* gtk/paper_names_offsets.c:
|
||||||
|
* gtk/gtkpapersize.c: Save 4K of .data by converting
|
||||||
|
the array of paper names to offsets.
|
||||||
|
|
||||||
|
* gtk/gen-paper-names.c: Utility used to create
|
||||||
|
paper_names_offsets.c from paper_names.c.
|
||||||
|
|
||||||
|
* gtk/Makefile.am: Necessary glue.
|
||||||
|
|
||||||
|
2006-04-06 Alexander Larsson <alexl@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkprintoperation-win32.c:
|
||||||
|
Use glib base64 code.
|
||||||
|
Set up manual_* vars fully.
|
||||||
|
|
||||||
|
2006-04-06 Alexander Larsson <alexl@redhat.com>
|
||||||
|
|
||||||
|
* gtk/Makefile.am:
|
||||||
|
Add -lcomdlg32 on win32
|
||||||
|
|
||||||
|
* gtk/gtkprint-win32.h:
|
||||||
|
Move WINVER define to .c files
|
||||||
|
|
||||||
|
* gtk/gtk.symbols:
|
||||||
|
* gtk/gtkprintoperation-win32.c:
|
||||||
|
Add empty gtk_print_run_page_setup win implementation
|
||||||
|
Move WINVER define to this file
|
||||||
|
|
||||||
|
* modules/Makefile.am:
|
||||||
|
Only build print backends on unix
|
||||||
|
|
||||||
|
2006-04-05 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkprintunixdialog.c:
|
||||||
|
* gtk/gtkprintoperation-unix.c: Use GTK_RESPONSE_CANCEL/OK
|
||||||
|
instead of GTK_RESPONSE_REJECT/ACCEPT, to make Esc close
|
||||||
|
the dialog, and to not use values which are documented
|
||||||
|
as reserved for apps.
|
||||||
|
|
||||||
|
2006-04-05 Alexander Larsson <alexl@redhat.com>
|
||||||
|
|
||||||
|
* modules/printbackends/lpr/gtkprintbackendlpr.c:
|
||||||
|
Don't hardcode lpr command, expose full commandline.
|
||||||
|
|
||||||
|
2006-04-05 Alexander Larsson <alexl@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkpagesetupunixdialog.c:
|
||||||
|
* gtk/gtkprintunixdialog.c:
|
||||||
|
Don't check for printer changes after dialog is dead.
|
||||||
|
|
||||||
|
* gtk/gtkprintbackend.c: (gtk_print_backend_load_modules):
|
||||||
|
Strip whitespace from backend strings
|
||||||
|
|
||||||
|
* gtk/gtkprintbackend.h:
|
||||||
|
Add private printer functions
|
||||||
|
|
||||||
|
* gtk/gtkprinter-private.h:
|
||||||
|
Move GtkPrinterPrivate into gtkprinter.c
|
||||||
|
|
||||||
|
* gtk/gtkprinter.[ch]:
|
||||||
|
Move GtkPrinterPrivate into gtkprinter.c
|
||||||
|
Add new construct properties.
|
||||||
|
Add setter functions.
|
||||||
|
|
||||||
|
* modules/printbackends/cups/gtkprintbackendcups.c:
|
||||||
|
* modules/printbackends/cups/gtkprintercups.[ch]:
|
||||||
|
Update to new APIs.
|
||||||
|
|
||||||
|
* modules/printbackends/lpr/Makefile.am:
|
||||||
|
* modules/printbackends/lpr/gtkprintbackendlpr.c:
|
||||||
|
* modules/printbackends/lpr/gtkprinterlpr.[ch]
|
||||||
|
Update to new APIs.
|
||||||
|
Remove GtkPrinterLPR.
|
||||||
|
Read/Save command line option in settings
|
||||||
|
|
||||||
|
* modules/printbackends/pdf/Makefile.am:
|
||||||
|
* modules/printbackends/pdf/gtkprintbackendpdf.c:
|
||||||
|
* modules/printbackends/pdf/gtkprinterpdf.[ch]:
|
||||||
|
Update to new APIs.
|
||||||
|
Remove GtkPrinterPDF.
|
||||||
|
|
||||||
|
2006-04-04 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkprintoperation.h: Add missing standard
|
||||||
|
GObject macros. (#337277, Yevgen Muntyan)
|
||||||
|
|
||||||
|
2006-04-04 Alexander Larsson <alexl@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkprinteroption.[ch]:
|
||||||
|
Add gtk_printer_option_has_choice.
|
||||||
|
|
||||||
|
* gtk/gtkprintunixdialog.c:
|
||||||
|
* modules/printbackends/cups/gtkprintbackendcups.c:
|
||||||
|
Add support for "print at time".
|
||||||
|
|
||||||
|
2006-04-04 Alexander Larsson <alexl@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkpapersize.c:
|
||||||
|
Handle ppd names with ".Transverse" suffix
|
||||||
|
Don't force width < height
|
||||||
|
|
||||||
|
* gtk/gtkprinteroption.c:
|
||||||
|
Make sure that value is never NULL.
|
||||||
|
|
||||||
|
* modules/printbackends/cups/gtkprintbackendcups.c:
|
||||||
|
Add some HP whitelist names
|
||||||
|
Remove spew from ignored options.
|
||||||
|
|
||||||
|
2006-04-03 Alexander Larsson <alexl@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkpagesetupunixdialog.c:
|
||||||
|
Fix warnings
|
||||||
|
|
||||||
|
* gtk/gtkprinter-private.h:
|
||||||
|
* gtk/gtkprinter.[ch]:
|
||||||
|
Add gtk_printer_is_default.
|
||||||
|
|
||||||
|
* gtk/gtkprintunixdialog.c:
|
||||||
|
Use gtk_printer_is_default.
|
||||||
|
|
||||||
|
* modules/printbackends/cups/gtkprintbackendcups.c:
|
||||||
|
Get default printer info
|
||||||
|
|
||||||
|
* modules/printbackends/pdf/gtkprintbackendpdf.c:
|
||||||
|
Fix warning.
|
||||||
|
|
||||||
|
2006-04-03 Alexander Larsson <alexl@redhat.com>
|
||||||
|
|
||||||
|
* modules/printbackends/pdf/gtkprintbackendpdf.c:
|
||||||
|
* modules/printbackends/pdf/gtkprinterpdf.[ch]:
|
||||||
|
Correctly read/write/use the output filename setting.
|
||||||
|
|
||||||
|
2006-04-03 Alexander Larsson <alexl@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkpagesetupunixdialog.c:
|
||||||
|
Disable margin from printers if there are no printers.
|
||||||
|
|
||||||
|
* gtk/gtkpapersize.c:
|
||||||
|
Fix build.
|
||||||
|
|
||||||
|
2006-04-01 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtk.symbols: protect unix-only symbols by
|
||||||
|
G_OS_UNIX (#336819, Yevgen Muntyan)
|
||||||
|
|
||||||
|
* gtk/gtkpapersize.c: Win32 fixes. (#336806, Yevgen Muntyan)
|
||||||
|
|
||||||
|
2006-03-30 Alexander Larsson <alexl@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtk.symbols:
|
||||||
|
Update
|
||||||
|
|
||||||
|
* gtk/gtkprintbackend.[ch]:
|
||||||
|
Add dnotify to gtk_print_backend_print_stream
|
||||||
|
|
||||||
|
* gtk/gtkprinter-private.h:
|
||||||
|
Declare gtk_print_job_set_status
|
||||||
|
|
||||||
|
* gtk/gtkprinter.[ch]:
|
||||||
|
Remove gtk_printer_prepare_job.
|
||||||
|
|
||||||
|
* gtk/gtkprintjob.[ch]:
|
||||||
|
Now you create print job directly with gtk_print_job_new() and
|
||||||
|
they'll be prepared automatically.
|
||||||
|
Add status_changed signal and get_status.
|
||||||
|
Add gtk_print_job_set_source_file to allow sending a file.
|
||||||
|
|
||||||
|
* gtk/gtkprintoperation-private.h:
|
||||||
|
Add destroy notify for platform_data.
|
||||||
|
Declare _gtk_print_operation_set_status.
|
||||||
|
|
||||||
|
* gtk/gtkprintoperation-unix.c:
|
||||||
|
Hook up status change handling.
|
||||||
|
Use the new way to get a print job.
|
||||||
|
|
||||||
|
* gtk/gtkprintoperation.[ch]:
|
||||||
|
Add status_changed signal and get_status/is_finished.
|
||||||
|
|
||||||
|
|
||||||
|
* modules/printbackends/cups/gtkprintbackendcups.c:
|
||||||
|
* modules/printbackends/lpr/gtkprintbackendlpr.c:
|
||||||
|
* modules/printbackends/pdf/gtkprintbackendpdf.c:
|
||||||
|
Update to use new APIs and set status on the job.
|
||||||
|
Cups polls for the status.
|
||||||
|
|
||||||
|
* tests/print-editor.c:
|
||||||
|
Track the print operations in the status bar.
|
||||||
|
|
||||||
|
2006-03-30 Alexander Larsson <alexl@redhat.com>
|
||||||
|
|
||||||
|
* gtk/Makefile.am:
|
||||||
|
* gtk/gtkprintbackend.c:
|
||||||
|
Default to "pdf,cups" if we found cups, and
|
||||||
|
"pdf,lpr" otherwise.
|
||||||
|
|
||||||
|
2006-03-29 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
* modules/printbackends/Makefile.am:
|
||||||
|
* configure.in: Don't build the cups backend
|
||||||
|
if cups is not there.
|
||||||
|
|
||||||
|
2006-03-29 Alexander Larsson <alexl@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtk.symbols:
|
||||||
|
gtk_printer_prep_job -> gtk_printer_prepare_job
|
||||||
|
gtk_print_job_prep -> gtk_print_job_prepare
|
||||||
|
|
||||||
|
* gtk/gtkprintbackend.h:
|
||||||
|
* gtk/gtkprinter-private.h:
|
||||||
|
* gtk/gtkprinter.[ch]:
|
||||||
|
Add print_job argument to printer_prepare_for_print
|
||||||
|
gtk_printer_prep_job -> gtk_printer_prepare_job
|
||||||
|
|
||||||
|
* gtk/gtkprintjob.[ch]:
|
||||||
|
Add manual rendering settings to GtkPrintJob.
|
||||||
|
gtk_print_job_prep -> gtk_print_job_prepare
|
||||||
|
|
||||||
|
* gtk/gtkprintoperation-private.h:
|
||||||
|
* gtk/gtkprintoperation-unix.c:
|
||||||
|
* gtk/gtkprintoperation.c:
|
||||||
|
Get more manual_* settings working.
|
||||||
|
Run mainloop after each printed page.
|
||||||
|
|
||||||
|
* gtk/gtkprintunixdialog.c:
|
||||||
|
Save page ranges.
|
||||||
|
|
||||||
|
* modules/printbackends/cups/gtkprintbackendcups.c:
|
||||||
|
* modules/printbackends/lpr/gtkprintbackendlpr.c:
|
||||||
|
* modules/printbackends/pdf/gtkprintbackendpdf.c:
|
||||||
|
Now put the manual_* settings inside the PrintJob in
|
||||||
|
prepare_for_print.
|
||||||
|
|
||||||
|
2006-03-29 Alexander Larsson <alexl@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkprintunixdialog.c:
|
||||||
|
Make sure we remember the format-for printer.
|
||||||
|
Also, use it as the default if set.
|
||||||
|
|
||||||
|
2006-03-28 Alexander Larsson <alexl@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkprintunixdialog.c:
|
||||||
|
Remove unnecessary padding under list.
|
||||||
|
|
||||||
|
2006-03-28 Alexander Larsson <alexl@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkpagesetupunixdialog.c:
|
||||||
|
* gtk/gtkprintunixdialog.c:
|
||||||
|
More HIGy layout.
|
||||||
|
|
||||||
|
2006-03-28 Alexander Larsson <alexl@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkpagesetupunixdialog.c:
|
||||||
|
HIG conformance of spacing and titles.
|
||||||
|
|
||||||
|
* gtk/gtkprintunixdialog.c:
|
||||||
|
Use standard constructor form print button too.
|
||||||
|
|
||||||
|
2006-03-27 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
* modules/printbackends/*/Makefile.am: Fix
|
||||||
|
a problem with builddir != srcdir builds.
|
||||||
|
(#335915, Yevgen Muntyan)
|
||||||
|
|
||||||
|
2006-03-27 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkprintbackend.c: Simply the syntax
|
||||||
|
of the setting to "cups,pdf", and get rid
|
||||||
|
of the GScanner used to parse it.
|
||||||
|
|
||||||
|
2006-03-27 Alexander Larsson <alexl@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkprintunixdialog.c:
|
||||||
|
Reorder print list so status is at the end.
|
||||||
|
Ellipsize the status column.
|
||||||
|
|
||||||
|
2006-03-27 Alexander Larsson <alexl@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkpagesetupunixdialog.c:
|
||||||
|
Handle removed printers and status-changed.
|
||||||
|
Handle NULL printer location.
|
||||||
|
|
||||||
|
2006-03-27 Alexander Larsson <alexl@redhat.com>
|
||||||
|
|
||||||
|
* gtk/Makefile.am:
|
||||||
|
* gtk/stock-icons/24/gtk-orientation-landscape.png:
|
||||||
|
* gtk/stock-icons/24/gtk-orientation-portrait.png:
|
||||||
|
* gtk/stock-icons/24/gtk-orientation-reverse-landscape.png:
|
||||||
|
* gtk/gtkiconfactory.c: (get_default_icons):
|
||||||
|
* gtk/gtkstock.h:
|
||||||
|
Add orientation stock icons.
|
||||||
|
|
||||||
|
* gtk/gtkpagesetupunixdialog.c:
|
||||||
|
Use the orientation icons.
|
||||||
|
|
||||||
|
2006-03-27 Alexander Larsson <alexl@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkpagesetupunixdialog.c:
|
||||||
|
* gtk/gtkprintjob.c:
|
||||||
|
* gtk/gtkprintoperation-unix.c:
|
||||||
|
* gtk/gtkprintunixdialog.c:
|
||||||
|
s/impl/dialog/
|
||||||
|
Don't prefix static functions with _
|
||||||
|
|
||||||
|
2006-03-26 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkprintunixdialog.c: Don't use _(""). (#335898,
|
||||||
|
Christian Persch)
|
||||||
|
|
||||||
|
* modules/printbackends/*: Don't use G_DEFINE_TYPE
|
||||||
|
in modules.
|
||||||
|
|
||||||
|
* gtk/gtkprintbackend.c: Remove an unused static function.
|
||||||
|
|
||||||
|
2006-03-25 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtk.symbols: Add printing symbols
|
||||||
|
|
||||||
|
* gtk/gtkpapersize.[hc]:
|
||||||
|
* gtk/gtkpage*.[hc]:
|
||||||
|
* gtk/gtkprint*.[hc]: Add aliasing, #include cleanups.
|
||||||
|
|
||||||
|
* gtk/gtkprintcontext.h:
|
||||||
|
* gtk/gtkprintoperation.h:
|
||||||
|
* gtk/gtkprintsettings.h: Make get_type function const.
|
||||||
|
|
||||||
|
* modules/printbackends/pdf/gtkprintbackendpdf.c: Remove
|
||||||
|
C99ism.
|
||||||
|
|
||||||
|
* modules/printbackends/cups/gtkcupsutils.c: Use unsigned
|
||||||
|
integers for bitfields.
|
||||||
|
|
||||||
|
2006-03-24 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtknotebook.c: Fix docs
|
||||||
|
|
||||||
|
* gtk/Makefile.am (EXTRA_DIST): Add the stock icons here.
|
||||||
|
|
||||||
|
* gdk/directfb/Makefile.am (EXTRA_DIST): Remove ChangeLog,
|
||||||
|
to make make dist happier.
|
||||||
|
|
||||||
|
2006-03-24 Alexander Larsson <alexl@redhat.com>
|
||||||
|
|
||||||
|
* configure.in:
|
||||||
|
* gtk/gtkprintbackend.c:
|
||||||
|
* modules/printbackends/Makefile.am:
|
||||||
|
* modules/printbackends/cups/Makefile.am:
|
||||||
|
* modules/printbackends/lpr/Makefile.am:
|
||||||
|
* modules/printbackends/lpr/gtkprintbackendlpr.[ch]:
|
||||||
|
* modules/printbackends/lpr/gtkprinterlpr.[ch]:
|
||||||
|
* modules/printbackends/pdf/Makefile.am:
|
||||||
|
* modules/printbackends/pdf/gtkprintbackendpdf.[ch]:
|
||||||
|
* modules/printbackends/pdf/gtkprinterpdf.[ch]:
|
||||||
|
Import pdf and lpr backend
|
||||||
|
|
||||||
|
2006-03-24 Alexander Larsson <alexl@redhat.com>
|
||||||
|
|
||||||
|
Import print-operation into gtk+
|
||||||
|
|
||||||
|
* .cvsignore:
|
||||||
|
* Makefile.am:
|
||||||
|
* gtk+-unix-print-2.0.pc.in:
|
||||||
|
Add gtk+-unix-print-2.0.pc
|
||||||
|
|
||||||
|
* configure.in:
|
||||||
|
Look for cups
|
||||||
|
Look for various _NL_* extensions
|
||||||
|
Output new makefiles and .pc.in
|
||||||
|
|
||||||
|
* gtk/Makefile.am:
|
||||||
|
Add new files
|
||||||
|
|
||||||
|
* gtk/gtk.h:
|
||||||
|
Include gtkprintoperation.h
|
||||||
|
|
||||||
|
* gtk/gtkenums.h:
|
||||||
|
Add printing enums
|
||||||
|
|
||||||
|
* gtk/gtkmarshalers.list:
|
||||||
|
Add required new marshallers
|
||||||
|
|
||||||
|
* gtk/gtkpagesetup.[ch]:
|
||||||
|
* gtk/gtkpagesetupunixdialog.[ch]:
|
||||||
|
* gtk/gtkpagesetupunixdialog.h:
|
||||||
|
* gtk/gtkpapersize.[ch]:
|
||||||
|
* gtk/gtkprint-win32.[ch]:
|
||||||
|
* gtk/gtkprintbackend.[ch]:
|
||||||
|
* gtk/gtkprintcontext.[ch]:
|
||||||
|
* gtk/gtkprinter-private.h:
|
||||||
|
* gtk/gtkprinter.[ch]:
|
||||||
|
* gtk/gtkprinteroption.[ch]:
|
||||||
|
* gtk/gtkprinteroptionset.[ch]:
|
||||||
|
* gtk/gtkprinteroptionwidget.[ch]:
|
||||||
|
* gtk/gtkprintjob.[ch]:
|
||||||
|
* gtk/gtkprintoperation-private.h:
|
||||||
|
* gtk/gtkprintoperation-unix.c:
|
||||||
|
* gtk/gtkprintoperation-win32.c:
|
||||||
|
* gtk/gtkprintoperation.[ch]:
|
||||||
|
* gtk/gtkprintsettings.[ch]:
|
||||||
|
* gtk/gtkprintunixdialog.[ch]:
|
||||||
|
* gtk/paper_names.c:
|
||||||
|
Generic printing support
|
||||||
|
|
||||||
|
* modules/Makefile.am:
|
||||||
|
* modules/printbackends/Makefile.am:
|
||||||
|
* modules/printbackends/cups/Makefile.am:
|
||||||
|
* modules/printbackends/cups/gtkcupsutils.[ch]:
|
||||||
|
* modules/printbackends/cups/gtkprintbackendcups.[ch]:
|
||||||
|
* modules/printbackends/cups/gtkprintercups.[ch]:
|
||||||
|
Cups backend
|
||||||
|
|
||||||
|
* tests/.cvsignore:
|
||||||
|
* tests/Makefile.am:
|
||||||
|
* tests/print-editor.c:
|
||||||
|
Add printing test app
|
||||||
|
|
4961
ChangeLog.pre-1-0
Normal file
9106
ChangeLog.pre-1-2
Normal file
28743
ChangeLog.pre-2-0
Normal file
9300
ChangeLog.pre-2-10
Normal file
8912
ChangeLog.pre-2-12
Normal file
9588
ChangeLog.pre-2-14
Normal file
3959
ChangeLog.pre-2-16
Normal file
7358
ChangeLog.pre-2-2
Normal file
11857
ChangeLog.pre-2-4
Normal file
7235
ChangeLog.pre-2-6
Normal file
5381
ChangeLog.pre-2-8
Normal file
64
HACKING
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
If you want to hack on the GTK+ project, you'll need to have
|
||||||
|
the following packages installed:
|
||||||
|
|
||||||
|
- GNU autoconf 2.62
|
||||||
|
- GNU automake 1.11
|
||||||
|
- GNU libtool 2.2
|
||||||
|
- 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.
|
||||||
|
|
||||||
|
Up-to-date instructions about developing GNOME applications and libraries
|
||||||
|
can be found here:
|
||||||
|
|
||||||
|
http://library.gnome.org/devel/
|
||||||
|
|
||||||
|
Information about using git with GNOME can be found here:
|
||||||
|
|
||||||
|
http://live.gnome.org/Git
|
||||||
|
|
||||||
|
In order to get GIT GTK+ installed on your system, you need to have
|
||||||
|
the most recent GIT versions 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+.
|
||||||
|
|
||||||
|
If at all possible, please use GIT to get the latest development version of
|
||||||
|
gtk+ and glib. You can do the following to get glib and gtk+ from GIT:
|
||||||
|
|
||||||
|
$ git clone git://git.gnome.org/glib
|
||||||
|
$ git clone git://git.gnome.org/pango
|
||||||
|
$ git clone git://git.gnome.org/atk
|
||||||
|
$ git clone git://git.gnome.org/gtk+
|
||||||
|
|
||||||
|
Note: if you plan to push changes to back to the master repository and
|
||||||
|
have a gnome account, you want to use the following instead:
|
||||||
|
|
||||||
|
$ git clone ssh://<username>@git.gnome.org/git/gtk+
|
||||||
|
|
||||||
|
To compile the GIT 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:
|
||||||
|
|
||||||
|
gtk+$ ./autogen.sh
|
||||||
|
|
||||||
|
Basically this does the following for you:
|
||||||
|
|
||||||
|
gtk+$ aclocal; automake; autoconf
|
||||||
|
|
||||||
|
The above commands create the `configure' script. Now you
|
||||||
|
run the `configure' script in `gtk+/' to create all Makefiles.
|
||||||
|
More information about that in `INSTALL'.
|
||||||
|
|
||||||
|
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'.
|
||||||
|
|
||||||
|
For information about submitting patches and pushing changes
|
||||||
|
to GIT, see the `README' and `README.commits' files. In particular,
|
||||||
|
don't, under any circumstances, push anything to GIT before
|
||||||
|
reading and understanding `README.commmits'.
|
34
INSTALL.in
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
Prerequisites
|
||||||
|
=============
|
||||||
|
|
||||||
|
GTK+ requires the following packages:
|
||||||
|
|
||||||
|
- The GLib, Pango, GdkPixbuf, ATK and cairo libraries, available at
|
||||||
|
the same location as GTK+. GTK+ @GTK_VERSION@ requires at least
|
||||||
|
GLib @GLIB_REQUIRED_VERSION@, Pango @PANGO_REQUIRED_VERSION@,
|
||||||
|
GdkPixbuf @GDK_PIXBUF_REQUIRED_VERSION@, ATK @ATK_REQUIRED_VERSION@
|
||||||
|
and cairo @CAIRO_REQUIRED_VERSION@.
|
||||||
|
|
||||||
|
- gobject-introspection @INTROSPECTION_REQUIRED_VERSION@ or newer.
|
||||||
|
|
||||||
|
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/html/gtk-building.html
|
||||||
|
|
||||||
|
Or online at:
|
||||||
|
|
||||||
|
http://library.gnome.org/devel/gtk/stable/gtk-building.html
|
12
MAINTAINERS
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
Matthias Clasen
|
||||||
|
E-mail: mclasen@redhat.com
|
||||||
|
Userid: matthiasc
|
||||||
|
|
||||||
|
Tim Janik
|
||||||
|
E-mail: timj@gtk.org
|
||||||
|
Userid: timj
|
||||||
|
|
||||||
|
Note that a lot of people are contributing to GTK+, and some parts of it
|
||||||
|
are technically maintained by other people. The people listed above are
|
||||||
|
meant as contacts for administrative questions such as cvs accounts. Other
|
||||||
|
questions are best directed to the mailing list gtk-devel-list@gnome.org.
|
160
Makefile.am
Normal file
@@ -0,0 +1,160 @@
|
|||||||
|
## Makefile.am for GTK+
|
||||||
|
include $(top_srcdir)/Makefile.decl
|
||||||
|
|
||||||
|
SRC_SUBDIRS = gdk gtk modules demos tests perf examples
|
||||||
|
SUBDIRS = po po-properties $(SRC_SUBDIRS) docs m4macros build
|
||||||
|
|
||||||
|
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
|
||||||
|
|
||||||
|
EXTRA_DIST += \
|
||||||
|
autogen.sh \
|
||||||
|
HACKING \
|
||||||
|
makecopyright \
|
||||||
|
NEWS.pre-1-0 \
|
||||||
|
ChangeLog.pre-1-0 \
|
||||||
|
ChangeLog.pre-1-2 \
|
||||||
|
ChangeLog.pre-2-0 \
|
||||||
|
ChangeLog.pre-2-2 \
|
||||||
|
ChangeLog.pre-2-4 \
|
||||||
|
ChangeLog.pre-2-6 \
|
||||||
|
ChangeLog.pre-2-8 \
|
||||||
|
ChangeLog.pre-2-10 \
|
||||||
|
ChangeLog.pre-2-12 \
|
||||||
|
ChangeLog.pre-2-14 \
|
||||||
|
ChangeLog.pre-2-16 \
|
||||||
|
ChangeLog.gtk-async-file-chooser \
|
||||||
|
ChangeLog.gtk-printing \
|
||||||
|
README.commits \
|
||||||
|
README.win32 \
|
||||||
|
config.h.win32 \
|
||||||
|
makefile.msc \
|
||||||
|
gtk-zip.sh.in \
|
||||||
|
sanitize-la.sh \
|
||||||
|
po/README.translators \
|
||||||
|
po/po2tbl.sed.in
|
||||||
|
|
||||||
|
MAINTAINERCLEANFILES = \
|
||||||
|
$(srcdir)/INSTALL \
|
||||||
|
$(srcdir)/README \
|
||||||
|
$(srcdir)/aclocal.m4 \
|
||||||
|
$(srcdir)/autoscan.log \
|
||||||
|
$(srcdir)/compile \
|
||||||
|
$(srcdir)/config.guess \
|
||||||
|
$(srcdir)/config.h.in \
|
||||||
|
$(srcdir)/config.sub \
|
||||||
|
$(srcdir)/configure.scan \
|
||||||
|
$(srcdir)/depcomp \
|
||||||
|
$(srcdir)/install-sh \
|
||||||
|
$(srcdir)/ltmain.sh \
|
||||||
|
$(srcdir)/missing \
|
||||||
|
$(srcdir)/omf.make \
|
||||||
|
$(srcdir)/xmldocs.make \
|
||||||
|
$(srcdir)/gtk-doc.make \
|
||||||
|
$(srcdir)/ChangeLog \
|
||||||
|
`find "$(srcdir)" -type f -name Makefile.in -print`
|
||||||
|
|
||||||
|
|
||||||
|
## Copy .pc files to target-specific names
|
||||||
|
gtk+-x11-3.0.pc gtk+-win32-3.0.pc gtk+-quartz-3.0.pc: gtk+-3.0.pc
|
||||||
|
rm -f $@ && \
|
||||||
|
cp gtk+-3.0.pc $@
|
||||||
|
|
||||||
|
gdk-x11-3.0.pc gdk-win32-3.0.pc gdk-quartz-3.0.pc: gdk-3.0.pc
|
||||||
|
rm -f $@ && \
|
||||||
|
cp gdk-3.0.pc $@
|
||||||
|
|
||||||
|
gtk+-*-3.0-uninstalled.pc: gtk+-3.0-uninstalled.pc
|
||||||
|
rm -f $@ && \
|
||||||
|
cp gtk+-3.0-uninstalled.pc $@
|
||||||
|
|
||||||
|
pkgconfigdir = $(libdir)/pkgconfig
|
||||||
|
pkgconfig_DATA = gdk-3.0.pc gtk+-3.0.pc gail-3.0.pc
|
||||||
|
|
||||||
|
pkgconfig_DATA += ${GDK_BACKENDS:%=gtk+-%-3.0.pc}
|
||||||
|
pkgconfig_DATA += ${GDK_BACKENDS:%=gdk-%-3.0.pc}
|
||||||
|
|
||||||
|
if OS_UNIX
|
||||||
|
pkgconfig_DATA += gtk+-unix-print-3.0.pc
|
||||||
|
endif
|
||||||
|
|
||||||
|
DISTCLEANFILES = \
|
||||||
|
gtk+-unix-print-3.0.pc \
|
||||||
|
gtk+-3.0.pc \
|
||||||
|
gtk+-x11-3.0.pc \
|
||||||
|
gdk-3.0.pc \
|
||||||
|
gdk-x11-3.0.pc \
|
||||||
|
gail-3.0.pc \
|
||||||
|
gtk+-3.0-uninstalled.pc \
|
||||||
|
gail-3.0-uninstalled.pc \
|
||||||
|
config.lt
|
||||||
|
|
||||||
|
distclean-local:
|
||||||
|
if test "$(srcdir)" = "."; then :; else \
|
||||||
|
rm -f ChangeLog; \
|
||||||
|
fi
|
||||||
|
|
||||||
|
ChangeLog:
|
||||||
|
$(AM_V_GEN) if test -d "$(srcdir)/.git"; then \
|
||||||
|
(GIT_DIR=$(top_srcdir)/.git ./missing --run git log GTK_2_16_0^^.. --stat) | fmt --split-only > $@.tmp \
|
||||||
|
&& mv -f $@.tmp $@ \
|
||||||
|
|| ($(RM) $@.tmp; \
|
||||||
|
echo Failed to generate ChangeLog, your ChangeLog may be outdated >&2; \
|
||||||
|
(test -f $@ || echo git-log is required to generate this file >> $@)); \
|
||||||
|
else \
|
||||||
|
test -f $@ || \
|
||||||
|
(echo A git checkout and git-log is required to generate ChangeLog >&2 && \
|
||||||
|
echo A git checkout and git-log is required to generate this file >> $@); \
|
||||||
|
fi
|
||||||
|
|
||||||
|
uninstall-local:
|
||||||
|
rm -f $(DESTDIR)$(pkgconfigdir)/gtk+-3.0.pc
|
||||||
|
|
||||||
|
dist-hook:
|
||||||
|
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
|
||||||
|
|
||||||
|
.PHONY: files release sanity snapshot ChangeLog
|
||||||
|
|
||||||
|
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"`
|
||||||
|
|
||||||
|
DISTCHECK_CONFIGURE_FLAGS = \
|
||||||
|
--enable-gtk-doc \
|
||||||
|
--enable-man \
|
||||||
|
--disable-rebuilds \
|
||||||
|
--enable-introspection
|
||||||
|
|
||||||
|
GITIGNOREFILES = \
|
||||||
|
po-properties/Makefile.in.in \
|
||||||
|
po-properties/Makefile.in \
|
||||||
|
po-properties/Makefile \
|
||||||
|
po-properties/*.gmo \
|
||||||
|
po-properties/*.mo \
|
||||||
|
po-properties/POTFILES \
|
||||||
|
po-properties/stamp-it \
|
||||||
|
po-properties/.intltool-merge-cache
|
||||||
|
|
||||||
|
-include $(top_srcdir)/git.mk
|
92
Makefile.decl
Normal file
@@ -0,0 +1,92 @@
|
|||||||
|
# GTK+ - The GIMP Toolkit
|
||||||
|
|
||||||
|
GTESTER = gtester # in $PATH for non-GLIB packages
|
||||||
|
GTESTER_REPORT = gtester-report # in $PATH for non-GLIB packages
|
||||||
|
|
||||||
|
# initialize variables for unconditional += appending
|
||||||
|
EXTRA_DIST =
|
||||||
|
TEST_PROGS =
|
||||||
|
|
||||||
|
### testing rules
|
||||||
|
|
||||||
|
# Xvfb based test rules
|
||||||
|
XVFB = Xvfb -ac -noreset -screen 0 800x600x16
|
||||||
|
XIDS = 101 102 103 104 105 106 107 197 199 211 223 227 293 307 308 309 310 311 \
|
||||||
|
491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 \
|
||||||
|
991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 \
|
||||||
|
1008 1009 4703 4721 4723 4729 4733 4751 9973 9974 9975 9976 9977 9978 9979 \
|
||||||
|
9980 9981 9982 9983 9984 9985 9986 9987 9988 9989 9990 9991 9992 9993 9994 \
|
||||||
|
9995 9996 9997 9998 9999
|
||||||
|
|
||||||
|
if USE_X11
|
||||||
|
SKIP_GDKTARGET = \
|
||||||
|
false
|
||||||
|
else
|
||||||
|
SKIP_GDKTARGET = \
|
||||||
|
echo "Gtk+Tests:INFO: Skipping GUI tests for non-X11 target."
|
||||||
|
endif
|
||||||
|
|
||||||
|
XVFB_START = \
|
||||||
|
${XVFB} -help 2>/dev/null 1>&2 \
|
||||||
|
&& XID=`for id in $(XIDS) ; do test -e /tmp/.X$$id-lock || { echo $$id; exit 0; }; done; exit 1` \
|
||||||
|
&& { ${XVFB} :$$XID -screen 0 800x600x16 -nolisten tcp -auth /dev/null >/dev/null 2>&1 & \
|
||||||
|
trap "kill -15 $$! " 0 HUP INT QUIT TRAP USR1 PIPE TERM ; } \
|
||||||
|
|| { echo "Gtk+Tests:ERROR: Failed to start Xvfb environment for X11 target tests."; exit 1; } \
|
||||||
|
&& DISPLAY=:$$XID && export DISPLAY
|
||||||
|
# call as: $(XVFB_START) && someprogram
|
||||||
|
|
||||||
|
# test: run all tests in cwd and subdirs
|
||||||
|
test: test-cwd test-recurse
|
||||||
|
# test-cwd: run tests in cwd
|
||||||
|
test-cwd: ${TEST_PROGS}
|
||||||
|
@$(SKIP_GDKTARGET) || test -z "${TEST_PROGS}" || { \
|
||||||
|
$(XVFB_START) && { set -e; $(TESTS_ENVIRONMENT) ${GTESTER} --verbose ${TEST_PROGS}; }; \
|
||||||
|
}
|
||||||
|
# test-recurse: run tests in subdirs
|
||||||
|
test-recurse:
|
||||||
|
@ for subdir in $(SUBDIRS) ; do \
|
||||||
|
test "$$subdir" = "." -o "$$subdir" = "po" -o "$$subdir" = "po-properties" || \
|
||||||
|
( cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) test ) || exit $? ; \
|
||||||
|
done
|
||||||
|
# test-report: run tests in subdirs and generate report
|
||||||
|
# perf-report: run tests in subdirs with -m perf and generate report
|
||||||
|
# full-report: like test-report: with -m perf and -m slow
|
||||||
|
test-report perf-report full-report: ${TEST_PROGS}
|
||||||
|
@ ignore_logdir=true ; \
|
||||||
|
if test -z "$$GTESTER_LOGDIR" ; then \
|
||||||
|
GTESTER_LOGDIR=`mktemp -d "\`pwd\`/.testlogs-XXXXXX"`; export GTESTER_LOGDIR ; \
|
||||||
|
ignore_logdir=false ; \
|
||||||
|
fi ; \
|
||||||
|
for subdir in $(SUBDIRS) ; do \
|
||||||
|
test "$$subdir" = "." -o "$$subdir" = "po" -o "$$subdir" = "po-properties" || \
|
||||||
|
( cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $@ ) || exit $? ; \
|
||||||
|
done ; \
|
||||||
|
$(SKIP_GDKTARGET) || test -z "${TEST_PROGS}" || { \
|
||||||
|
case $@ in \
|
||||||
|
test-report) test_options="-k";; \
|
||||||
|
perf-report) test_options="-k -m=perf";; \
|
||||||
|
full-report) test_options="-k -m=perf -m=slow";; \
|
||||||
|
esac ; \
|
||||||
|
$(XVFB_START) && { \
|
||||||
|
set -e; \
|
||||||
|
if test -z "$$GTESTER_LOGDIR" ; then \
|
||||||
|
${GTESTER} --verbose $$test_options -o test-report.xml ${TEST_PROGS} ; \
|
||||||
|
elif test -n "${TEST_PROGS}" ; then \
|
||||||
|
${GTESTER} --verbose $$test_options -o `mktemp "$$GTESTER_LOGDIR/log-XXXXXX"` ${TEST_PROGS} ; \
|
||||||
|
fi ; \
|
||||||
|
}; \
|
||||||
|
}; \
|
||||||
|
$$ignore_logdir || { \
|
||||||
|
echo '<?xml version="1.0"?>' > $@.xml ; \
|
||||||
|
echo '<report-collection>' >> $@.xml ; \
|
||||||
|
for lf in `ls -L "$$GTESTER_LOGDIR"/.` ; do \
|
||||||
|
sed '1,1s/^<?xml\b[^>?]*?>//' <"$$GTESTER_LOGDIR"/"$$lf" >> $@.xml ; \
|
||||||
|
done ; \
|
||||||
|
echo >> $@.xml ; \
|
||||||
|
echo '</report-collection>' >> $@.xml ; \
|
||||||
|
rm -rf "$$GTESTER_LOGDIR"/ ; \
|
||||||
|
${GTESTER_REPORT} --version 2>/dev/null 1>&2 ; test "$$?" != 0 || ${GTESTER_REPORT} $@.xml >$@.html ; \
|
||||||
|
}
|
||||||
|
.PHONY: test test-cwd test-recurse test-report perf-report full-report
|
||||||
|
# run make test-cwd as part of make check
|
||||||
|
check-local: test-cwd
|
903
NEWS.pre-2.0
@@ -1,903 +0,0 @@
|
|||||||
Overview of Changes in GTK+ 2.0.0
|
|
||||||
=================================
|
|
||||||
|
|
||||||
* GtkTreeView fixes [Jonathan Blandford, Kristian Rietveld, Darin Adler]
|
|
||||||
* Build fixes [Anders Carlsson, Tor Lillqvist, Manish Singh]
|
|
||||||
* Bug fixes. [Thomas Leonard, Owen Taylor]
|
|
||||||
|
|
||||||
Overview of Changes in GTK+ 2.0.0 rc1
|
|
||||||
=====================================
|
|
||||||
|
|
||||||
* GtkTreeView fixes [Kristian Rietveld, Jonathan Blandford, Richard Hult]
|
|
||||||
* Text widget fixes [Havoc Pennington]
|
|
||||||
* Efficiency fixes when using Xft [Owen Taylor]
|
|
||||||
* Key handling fixes and other fixes for Win32 [Hans Breuer, Tor Lillqvist]
|
|
||||||
* Try to fix key handling without XKEYBOARD extension [Owen]
|
|
||||||
* Documentation fixes and improvements
|
|
||||||
[Matthias Clasen, Alexey Malyshev, Akira Tagoh, Vitaly Tishkov]
|
|
||||||
* Widget drawing improvements [Soeren Sandmann]
|
|
||||||
* Allow cycling between multiple menu bars with <Control>Tab [Owen]
|
|
||||||
* Try to build libraries with only shared library dependencies on Xft to
|
|
||||||
deal with transition to Xft2 [Owen]
|
|
||||||
* Portability fixes [Owen, Miroslaw Dobrzanski-Neumann]
|
|
||||||
* Don't use red as the default cursor color [Owen]
|
|
||||||
* Bug fixes, bug fixes, bug fixes.
|
|
||||||
|
|
||||||
Other contributors: Darin Adler, Jacob Berkman, Kevin Breit, Hans Breuer,
|
|
||||||
Anders Carlsson, Damon Chaplin, Finlay Dobbie, Jody Goldberg,
|
|
||||||
Andreas J. Guelzow, Scott Guilbeaux, Vlad Harchev, James Henstridge,
|
|
||||||
Tim Janik, Satyajit Kanungo, Charles Kerr, Sergey Kuzminov, Miles Lane,
|
|
||||||
Alexander Larsson, Paolo Maggi, Skip Montaro, Jan Mynarik, Sven Neumann,
|
|
||||||
Padraig O'Briain, Narayani Pattipati, Mark Patton, Havoc Pennington,
|
|
||||||
Ettore Perazzoli, Guillermo S. Romero, Manish Singh, Morten Welinder
|
|
||||||
|
|
||||||
Overview of Changes in GTK+ 1.3.15
|
|
||||||
==================================
|
|
||||||
|
|
||||||
* New stock and improved icon images
|
|
||||||
[Tuomas Kuosmanen, Jakub Steiner, Anders Carlsson]
|
|
||||||
* Widget drawing improvements for check and radio buttons,
|
|
||||||
spinbuttons [Soeren Sandmann]
|
|
||||||
* Clean up module search path algorithm, use GTK_PATH [Owen Taylor]
|
|
||||||
* Add GtkSetting for font name. [Richard Hestilow]
|
|
||||||
* Much improved key matching code, accelerators work independent
|
|
||||||
of group [Owen]
|
|
||||||
* Make mnemonics work for embedded GtkPlug widgets [Owen]
|
|
||||||
* Keynav improvements for GtkTreeView [Kristian Rietveld]
|
|
||||||
* Fix gtk_tree_view_scroll_to_cell() [Jonathan Blandford]
|
|
||||||
* Rename gtk_tree_view_get_iter_root() and gtk_tree_path_new_root()
|
|
||||||
to gtk_tree_view_get_iter_first() and gtk_tree_path_new_first(),
|
|
||||||
add compatibility macros.
|
|
||||||
* GtkTreeView bug fixes [Kristian, Anders, Damon Chaplin]
|
|
||||||
* GtkTextView bug fixes [Havoc Pennington]
|
|
||||||
* Pad class structures for future binary compatibility [Owen]
|
|
||||||
* Tutorial improvements [Sven Neumann, Matthias Clasen]
|
|
||||||
* Fixes for MULTIPLE selection target [Gregory Merchan, Owen]
|
|
||||||
* Fix problems with initial widget size [Owen]
|
|
||||||
* AIX compilation fixes [Miroslaw Dobrzanski-Neumann]
|
|
||||||
* Win32 fixes [Hans Breuer, Tor Lillqvist]
|
|
||||||
* Miscellaneous bug fixes
|
|
||||||
|
|
||||||
Other contributors: David L. Cooper, Eric Fischer, Jody Goldberg,
|
|
||||||
Satajyit Kanungo, Thomas Leonard, Mark Patton, Manish Singh,
|
|
||||||
Nicolas Setton
|
|
||||||
|
|
||||||
Overview of Changes in GTK+ 1.3.14
|
|
||||||
==================================
|
|
||||||
|
|
||||||
* Keyboard focus improvements [Owen Taylor]
|
|
||||||
* Code cleanup [Matthias Clasen, Manish Singh, Darin Adler]
|
|
||||||
* Fix accidentally exported variables [Mark McLoughlin]
|
|
||||||
* GtkTreeView fixes [Jonathan Blandford, Kristian Rietveld, John Harper, Darin]
|
|
||||||
* Default to yellow tooltips [Owen]
|
|
||||||
* RC file fixes for reloading, priorities [Owen, Matthias]
|
|
||||||
* GtkMenu behavior improvements and bug fixes [Owen, Arnaud Charlet]
|
|
||||||
* GtkTextView fixes [Havoc Pennington, Daniel Elstner, Dennis Bjorklund]
|
|
||||||
* Improve keynav for paned widgets, tooltips, spin buttons, notebooks,
|
|
||||||
scrolled windows [Soeren Sandmann, Padraig, Owen]
|
|
||||||
* Add Emacs/Default key themes [Owen]
|
|
||||||
* Win32 fixes [Hans Breuer, Tor Lillqvist]
|
|
||||||
* Ethiopic input methods [Daniel Yacob]
|
|
||||||
* Opaque paned window resizing [Soeren]
|
|
||||||
* Tweak table expansion behavior [Tim Janik]
|
|
||||||
* Fix GtkCalendar focus drawing [Bill Haneman]
|
|
||||||
* Allow themeable cursor thickness [Bill]
|
|
||||||
* Start of fixing of tutorial for GTK+-2.0 [Matthias]
|
|
||||||
* Add a ::adjust-bounds signal to GtkRange to allow spreadsheet style
|
|
||||||
scrollbars. [Jody Goldberg]
|
|
||||||
* Add the ability to turn on multiple selection for GtkFileSel [Manish]
|
|
||||||
* Bug fixes
|
|
||||||
|
|
||||||
Other contributors: Jacob Berkman, Padraig O'Briain, Anders Carlsson,
|
|
||||||
Johan Dahlin, Richard Hult, Stefan Kost, Alex Larsson, Thomas Leonard,
|
|
||||||
Paolo Maggi, Alexey Malyshev, Federico Mena Quintero, Skip Montaro,
|
|
||||||
Sven Neumann, Havoc Pennington, Laszlo Peter, Christian Rose, Joe Shaw,
|
|
||||||
Kevin Vandersloot, Morten Welinder, Peter Williams
|
|
||||||
|
|
||||||
Overview of Changes in GTK+ 1.3.13
|
|
||||||
==================================
|
|
||||||
|
|
||||||
* Tree view fixes. [Kristian Rietveld, Jonathan Blandford, Anders Carlsson]
|
|
||||||
* Tree view support for low-vision themes [Bill Haneman]
|
|
||||||
* Text view bug fixes. [Havoc Pennington]
|
|
||||||
* Win32 fixes and improvements. [Tor Lillqvist, Hans Breuer,
|
|
||||||
Archaeopteryx Software]
|
|
||||||
* Documentation improvements [Matthias Clasen, Havoc Pennington]
|
|
||||||
* Accelerate alpha compositing using RENDER extension if present,
|
|
||||||
and optimize the non-RENDER case a lot. [Owen Taylor]
|
|
||||||
* Add support for "optional keybindings" (action signal returns FALSE) [Owen]
|
|
||||||
* Fixed the infamous changing directory deletes filename bug
|
|
||||||
[Owen and a cast of thousands]
|
|
||||||
* Add mouse cursor hiding for text widgets [Anders Carlsson]
|
|
||||||
* Simple Hangul input module [Yusuke Tabata]
|
|
||||||
* Removed the scary startup warning.
|
|
||||||
* GdkPixbuf pixel handling fixes [Owen, Michael Hore, Jim Cape]
|
|
||||||
* Converted GtkFileSelection and GtkFontSelection to use GtKTreeView widgets
|
|
||||||
instead of the deprecated GtkCList [Owen]
|
|
||||||
* gtkhsv.h was installed by mistake, fixed that. [reported by Ross Burton]
|
|
||||||
* gdk_pixbuf_render_to_drawable() now also handles alpha pixbufs.
|
|
||||||
* Made Gtkimage draw GtkPixmap, GtkImage, GdkPixbuf insensitive, prelighted,
|
|
||||||
etc. [Havoc, Owen]
|
|
||||||
* Marked gtk_item_factory_path_from_widget() G_CONST_RETURN. [Matt Wilson]
|
|
||||||
* gtk_image_menu_item_new_from_stock() now falls back to
|
|
||||||
new_with_mnemonic, for consistency with gtk_button_new_from_stock()
|
|
||||||
[Havoc Pennington]
|
|
||||||
* GdkModifierType is now consistently used for modifier mask parameters
|
|
||||||
[Mark Patton]
|
|
||||||
* gtk_widget_set_accel_path() is now publically exported.
|
|
||||||
|
|
||||||
Other contributors: Darin Adler, Jeffrey Baker, Damon Chaplin, Brian Cameron,
|
|
||||||
Murray Cumming, James Henstridge, Jacob Berkman, Arnaud Charlet, Jeff Franks,
|
|
||||||
Jeff Garzik, Jody Goldberg, Diego Gonzalez, Melvin Hadasht, Raja Harinath,
|
|
||||||
Tim Janik, Mike Kestner, Mathieu Lacage, Alex Larsson, Ryan Lovett,
|
|
||||||
Mark McLoughlin, Sven Neumann, Padraig O'Briain, Xavier Ordoquy, Chris Phelps,
|
|
||||||
Detlef Reichl, Guillermo S. Romero, Federico Mena Quintero, Manish Singh,
|
|
||||||
HideToshi Tajima, Vitaly Tishkov, Jon Trowbridge, Sergey Vlasov.
|
|
||||||
|
|
||||||
Overview of Changes in GTK+ 1.3.12
|
|
||||||
==================================
|
|
||||||
|
|
||||||
* Fix problems with PNG saving [Michael Natterer]
|
|
||||||
* Cleanups of deprecated usages [Sebastian Wilhelmi]
|
|
||||||
* Win32 fixes [Tor Lillqvist]
|
|
||||||
* Documentation improvements [Matthias Clasen, Havoc Pennington,
|
|
||||||
Vitaly Tishkov]
|
|
||||||
* Frame buffer port fixes [Manish Singh]
|
|
||||||
* GtkTextView bug fixes [Havoc Pennington, Chris Phelps]
|
|
||||||
* Menu behavior improvements [Kristian Rietveld]
|
|
||||||
* Make focus line width configurable, focus color work on
|
|
||||||
dark themes. [Bill Haneman, Owen Taylor]
|
|
||||||
* Add state argument to gtk_paint_focus() [Bill]
|
|
||||||
* Added incremental revalidation to tree view, for better apparent speed
|
|
||||||
[Jonathan Blandford]
|
|
||||||
* Remove useless gtk_tree_view_column_cell_event() [Jonathan]
|
|
||||||
* Display XIM status in a separate window [HideToshi Tajima]
|
|
||||||
* Add GDK_DEBUG=nograbs to disable pointer, keyboard grabs [Jacob Berkman]
|
|
||||||
* Add menu of Unicode control characters to GtkEntry, GtkTextView
|
|
||||||
[Dov Grobgeld, Havoc]
|
|
||||||
* Pass key releases along to input methods [Owen]
|
|
||||||
* Many bug fixes
|
|
||||||
|
|
||||||
Other contributors: Darin Adler, Fabrice Bellet, Chris Blizzard,
|
|
||||||
Hans Breuer, Anders Carlsson, Damon Chaplin, Murray Cumming, Jeff Franks,
|
|
||||||
James Henstridge, Tim Janik, Alex Larsson, George Lebl, Kjartan, Maraas,
|
|
||||||
Sven Neumann, Seth Nickell, Padraig O'Briain, Soeren Sandmann, Manish Singh,
|
|
||||||
Matt Wilson
|
|
||||||
|
|
||||||
Overview of Changes in GTK+ 1.3.11
|
|
||||||
==================================
|
|
||||||
|
|
||||||
* Massive rework of accelerator API and implementation (Tim Janik)
|
|
||||||
* Major fixes to resizing and redrawing to eliminate hysteresis
|
|
||||||
and optimize. (Owen Taylor, Soeren Sandmann)
|
|
||||||
* Make many widgets NO_WINDOW to improve appearance and reduce
|
|
||||||
drawing overhead (Owen)
|
|
||||||
* Text view fixes (Havoc Pennington)
|
|
||||||
* Make child widgets in GtkTextView work (Havoc)
|
|
||||||
* GtkTreeModelSort fixage (Jonathan Blandford, Kristian Rietveld)
|
|
||||||
* Clean up GtkTreeView drag and drop support (Owen)
|
|
||||||
* Misc tree view fixes and improvements (Jonathan, Kristian, Anders, Matt Wilson)
|
|
||||||
* Add gtk_window_get/set_focus(), gtk_window_set_default() as public
|
|
||||||
functions (Owen, Damian Ivereigh)
|
|
||||||
* Fixes to GtkPlug/GtkSocket (Michael Meeks, Owen)
|
|
||||||
* Change button ordering in standard dialogs to correspond to
|
|
||||||
GNOME usability project proposal (Gregory Merchan)
|
|
||||||
* Add support for context sensitivity in input methods (Owen)
|
|
||||||
* Hook up gtk_im_context_set_use_preedit() (Hidetoshi Tajima)
|
|
||||||
* Fix gdk_window_scroll() and other aspects of big windows (Owen)
|
|
||||||
* Remove need for X connection for class initialization (Jacob Berkman)
|
|
||||||
* Propagate key events to parents of focused widget (Owen)
|
|
||||||
* Don't export normal GTK+ marshalers, export deprecated compat marshalers (Owen)
|
|
||||||
* Many Win32 Fixes and improvements (Hans Breuer, Tor Lillqvist)
|
|
||||||
* Bug and documentation fixing (Matthias Clasen, Anders Carlsson,
|
|
||||||
Jacob Berkman, others.)
|
|
||||||
|
|
||||||
Other Contributors:
|
|
||||||
Darin Adler, Marius Andreiana, Erwann Chenede, Murray Cumming, Janet Davis,
|
|
||||||
Daniel Egger, Daniel Elstner, Jeff Franks, Alex Larsson, George Lebl,
|
|
||||||
Sergey Kuzminov, Eric Lemings, Arkadiusz Miskiewicz, Padraig O'Briain, Sven Neumann,
|
|
||||||
Kristian Rietveld, Nicolas Setton, Manish Singh, Vitaly Tishkov, Sebastian Wilhelmi,
|
|
||||||
Michael Natterer
|
|
||||||
|
|
||||||
Overview of Changes in GTK+ 1.3.10
|
|
||||||
==================================
|
|
||||||
|
|
||||||
* GtkTextView fixes [Havoc Pennington]
|
|
||||||
* GtkTreeView fixes and improvements [Jonathan Blandford, Kristian,
|
|
||||||
Manish Singh, Joshua Pritikin, Oleg Maiboroda, James Henstridge]
|
|
||||||
* gtkdemo improvements [Kristian Rietveld]
|
|
||||||
* Drag and drop fixes to generic code and widgets
|
|
||||||
[Owen Taylor, Damian Ivereigh]
|
|
||||||
* Documentation improvement [Havoc Pennington, Matthias Clasen]
|
|
||||||
* Spelling fixes [Jacob Berkman]
|
|
||||||
* Move signals to the GtkEditable interface [Kristian]
|
|
||||||
* Further stock image improvements [Jakub Steiner]
|
|
||||||
* Support text chunks for the PGN loader, add gdk_pixbuf_get_option()
|
|
||||||
[Sven Neumann]
|
|
||||||
* Rename gdk_pixbuf_new_from_stream back to new_from_inline [Owen]
|
|
||||||
* Automatically call setlocale(), unless explicitly disabled [Owen]
|
|
||||||
* Property addition to various widgets [Michael Meeks, Owen]
|
|
||||||
* Support building with automake-1.4 [James]
|
|
||||||
* Make GtkRadioButton groups act as a single focus point [Owen]
|
|
||||||
* Move gdk_window_lookup etc. to be cross-platform [Matthias]
|
|
||||||
* Draw spinbuttons variably sized [Kristian]
|
|
||||||
* Separate GdkAtom out from X atoms for compatibility with future
|
|
||||||
multihead changes [Owen]
|
|
||||||
* Require gdk_threads_init() to be explicitly called instead
|
|
||||||
of piggybacking off of g_thread_init(). [Owen]
|
|
||||||
* Improvements to text-view/label/entry popup menus [Damian, Jacob, Owen]
|
|
||||||
* Bug fixes and cleanup [Matthias, others]
|
|
||||||
|
|
||||||
Other Contributors:
|
|
||||||
Mark McLoughin, Mikael Hermansson, Soeren Sandmann, Anders Carlsson,
|
|
||||||
Tim Janik, Murray Cumming, Hidetoshi Tajima, Padraig O'Briain,
|
|
||||||
Hans Breuer, Vitaly Tishkov, Dov Grobgeld
|
|
||||||
|
|
||||||
|
|
||||||
Overview of Changes in GTK+ 1.3.9
|
|
||||||
=================================
|
|
||||||
|
|
||||||
* Add editable text cells to GtkTreeView.
|
|
||||||
Keynav, drawing fixes in GtkTreeView [Jonathan Blandford]
|
|
||||||
* Text widget no longer always has a \n in it. [Havoc Pennington]
|
|
||||||
* Text widget bug fixes [Havoc, Dov Grobgeld, Hidetoshi Tajima]
|
|
||||||
* Allow -1 for width/height in gdk_pixbuf_render_*(). [Matthias Clasen]
|
|
||||||
* Minor fix for major resizing problems in recent releases [Owen Taylor]
|
|
||||||
* Restore ability to set _set properties to TRUE for
|
|
||||||
GtkCellRendererText, GtkTextTag [Owen]
|
|
||||||
* Cursor drawing improvements [Owen]
|
|
||||||
* Win32 fixes [Hans Breuer]
|
|
||||||
* Mark various functions as deprecated or private.
|
|
||||||
* Misc bug fixes, portability fixes, and cleanups.
|
|
||||||
|
|
||||||
Other Contributors:
|
|
||||||
Vitaly Tishkov, Christian Rose, Frank Belew, Jeff Franks, Sven Neumann,
|
|
||||||
Kristian Rietveld, Vitaly Tishkov, Joshua N. Pritikin, Matt Wilson,
|
|
||||||
James Henstridge, Detlef Reichl
|
|
||||||
|
|
||||||
Overview of Changes in GTK+ 1.3.8
|
|
||||||
=================================
|
|
||||||
|
|
||||||
* GtkTreeView and GtkTreeModel API cleanups/improvements [Jrb]
|
|
||||||
* GtkOptionMenu scrollwheel support [Alex]
|
|
||||||
* GtkModule search paths [Owen]
|
|
||||||
* Documenatation updates [Havoc,Jrb]
|
|
||||||
* Major Gdk cleanup [Owen]
|
|
||||||
* Miscellaneous other fixes/cleanups
|
|
||||||
|
|
||||||
Other Contributors:
|
|
||||||
Joshua N Pritikin, Padraig O'Briain, Jakub Steiner, Matthias Clasen,
|
|
||||||
Matt Wilson, James Henstridge
|
|
||||||
|
|
||||||
Overview of Changes in GTK+ 1.3.7
|
|
||||||
=================================
|
|
||||||
|
|
||||||
* Many Pixbuf (loader) improvements [Matthias Clasen, Soeren Sandmann]
|
|
||||||
* Added publically installed utility gdk-pixbuf-csource to generate
|
|
||||||
inlined pixbufs in C source code [Tim Janik]
|
|
||||||
* Optional movement of button children on press [Soeren, Owen Taylor]
|
|
||||||
* Interactive searching in GtkTreeView [Kristian Rietveld]
|
|
||||||
* Sorting/ordering improvements for GtkTreeView [Kris, Jonathan Blandford]
|
|
||||||
* Animation of expander motion for GtkTreeView [Anders Carlsson]
|
|
||||||
* Lots of misc GtkTreeView fixes and improvements [Jonathan]
|
|
||||||
* New/improved stock icons [Jakub Steiner]
|
|
||||||
* Code and API rework for window resizing [Havoc Pennington]
|
|
||||||
* Converted accel groups to GObject [James Henstridge]
|
|
||||||
* More property support improvements
|
|
||||||
* Add facility for "secondary" buttons in
|
|
||||||
GtkButtonBox/GtkDialog [Gregory Merchan]
|
|
||||||
* Disentangled child visability from MAPPED state [Owen]
|
|
||||||
* Plug/Socket improvements and port to the XEMBED protocol [Owen]
|
|
||||||
* Added priorities for styles in RC files,
|
|
||||||
support multiple parse contents [Owen]
|
|
||||||
* Made GdkVisual and GdkDevice GObjects [Alexander Larsson]
|
|
||||||
* Key binding improvements [Havoc]
|
|
||||||
* Added GtkWidget::event-after signal since normal event handling
|
|
||||||
is now aborted as soon as a handler returned TRUE [Tim]
|
|
||||||
* Dnd fixes and improved icon support [Owen]
|
|
||||||
* Removed GtkPacker widget
|
|
||||||
* Fixing missing paired getters/setters [Kris]
|
|
||||||
* Nuked remaining GtkArg cruft, implemented container/child properties [Tim]
|
|
||||||
* Added window grab groups [Owen]
|
|
||||||
* Many frame buffer improvements [Alex]
|
|
||||||
* Win32 fixes and improvements [Hans Breuer]
|
|
||||||
* Warning fixes [Darin Adler]
|
|
||||||
* Miscellaneous bug and API fixes [Matthias et. al]
|
|
||||||
|
|
||||||
Other Contributors:
|
|
||||||
Joshua N Pritikin, Hidetoshi Tajima, Manish Singh, ERDI Gergo, Jens Finke,
|
|
||||||
Chema Celorio, Lee Mallabone, Vitaly Tishkov, Sebastian Wilhelmi,
|
|
||||||
Nicola Girardi, Sven Neumann, Padraig O'Briain, Michael Natterer,
|
|
||||||
Suresh Chandrasekharan, Jonas Borgström, Jay Cox, Michael Meeks,
|
|
||||||
Mathias Hasselmann, Peter Williams, Thomas Broyer, Kjartan Maraas,
|
|
||||||
Joel Becker, Jeff Franks, Brian Cameron, Skip Montanaro
|
|
||||||
|
|
||||||
Overview of Changes in GTK+ 1.3.6
|
|
||||||
=================================
|
|
||||||
|
|
||||||
* Properly renders strikethrough text
|
|
||||||
* win32 fixes
|
|
||||||
* Added "scale" property to GtkTextTag and GtkCellRendererText to do
|
|
||||||
relative font scaling
|
|
||||||
* Added "format_value" signal to GtkScale to reformat value text
|
|
||||||
* framebuffer fixes
|
|
||||||
* Property support added to lots of widgets
|
|
||||||
* Many GtkTreeView new features and API/implementation fixes
|
|
||||||
* Lots of new_with_mnemonic() convenience functions
|
|
||||||
* Change GtkImageMenuItem API to be more consistent/useful
|
|
||||||
* Added lots of new stock items/icons
|
|
||||||
* Rewrote GtkRange/GtkScale/GtkScrollbar, includes support for
|
|
||||||
enabling/disabling extra scrollbar stepper arrows in gtkrc so NeXT
|
|
||||||
themes won't need broken hacks
|
|
||||||
* Convenience API for GtkRange similar to the one added to GtkSpinButton
|
|
||||||
a while back
|
|
||||||
* Make menubar/toolbar work properly with xthickness/ythickness of 1 or 0,
|
|
||||||
and move some attributes from program settings to user settings.
|
|
||||||
Allows nice 1-pixel-bevel themes.
|
|
||||||
* Moved ::focus virtual function from GtkContainer to GtkWidget
|
|
||||||
* Plenty of bug fixes
|
|
||||||
|
|
||||||
Overview of Changes in GTK+ 1.3.5
|
|
||||||
=================================
|
|
||||||
|
|
||||||
* New default theme based on Raleigh theme for 1.2.x.
|
|
||||||
* Dependency on the ATK library added as a step to
|
|
||||||
providing accessibility-enabling interfaces
|
|
||||||
* XEMBED-based GtkPlug/GtkSocket now basically works.
|
|
||||||
* Drag and drop of column headers in GtkTreeView
|
|
||||||
* GtkColorSelector work: hooks for saving and propagating palette, UI tweaks,
|
|
||||||
and API sanitation
|
|
||||||
* Key binding fixes
|
|
||||||
* Configurable padding/spacing in a lot of places
|
|
||||||
* Invisible text in GtkTextView fixed
|
|
||||||
* SHM segments now created with a mode of 0600
|
|
||||||
* Bug fixes
|
|
||||||
|
|
||||||
Overview of Changes in GTK+ 1.3.4
|
|
||||||
=================================
|
|
||||||
|
|
||||||
* Win32 fixes
|
|
||||||
* GtkTreeView improvements and fixes
|
|
||||||
* Fix glib-2.0.m4
|
|
||||||
* Miscellaneous bug fixes
|
|
||||||
|
|
||||||
Overview of Changes in GTK+ 1.3.3
|
|
||||||
=================================
|
|
||||||
|
|
||||||
[ 5600 lines of ChangeLog ]
|
|
||||||
|
|
||||||
* API cleanups
|
|
||||||
* Win32 work (Tor, Hans Breuer)
|
|
||||||
* Focus improvements (Owen)
|
|
||||||
* Frame buffer improvements (Alex)
|
|
||||||
* Work on GtkTextView (Havoc)
|
|
||||||
* Much work on GtkTreeView (Jonathan)
|
|
||||||
* Selectable labels (Havoc)
|
|
||||||
* Converted many arguments to properties (Lee Mallabone, John Margaglione)
|
|
||||||
* Add exact regions to GdkExposeEvent, propagate it. (Alex)
|
|
||||||
* Added ability to have resize grips in status bars (etc.) using
|
|
||||||
_NET_WM_MOVERESIZE protocol. (Havoc)
|
|
||||||
* Added mnemnonic mechanism to make setting underline accelerators
|
|
||||||
much easier. (Alex)
|
|
||||||
* Add per-style property mechanism to allow themes to change
|
|
||||||
geometry parameters. (Tim)
|
|
||||||
* Added global settings mechanisms for settings such as double-click
|
|
||||||
time. (Tim, Owen)
|
|
||||||
* Various support functions for new and old WM properties (Havoc, Alex)
|
|
||||||
* Add TRUE-stops-returns for boolean-returning signals (Ron Steinke)
|
|
||||||
|
|
||||||
Overview of Changes in GTK+ 1.3.2
|
|
||||||
=================================
|
|
||||||
|
|
||||||
GTK Core:
|
|
||||||
|
|
||||||
* New stock-icon and stock-item system. Use themeable pixbufs in
|
|
||||||
dialogs, buttons, etc. [Havoc]
|
|
||||||
* Theme engines reworked to use derivation and new object system. [Owen]
|
|
||||||
* Added GtkClipboard object for simple selection handling. [Owen]
|
|
||||||
* Make GtkEditable an interface, move implementation to GtkOldEditable for
|
|
||||||
compat. [Owen]
|
|
||||||
* Better handling of default directionality. [Robert]
|
|
||||||
* Use GSignal as backend for GtkSignal and other GObject stuff. [Tim]
|
|
||||||
* Move theme engines to GTypePlugin. [Owen]
|
|
||||||
|
|
||||||
GDK:
|
|
||||||
|
|
||||||
* Beginning of implementation of client parts of new window manager spec. [Owen]
|
|
||||||
* Make gdk_drawable_get_image() work with backing store. [Havoc]
|
|
||||||
|
|
||||||
Widgets:
|
|
||||||
|
|
||||||
* New text widget [Havoc]
|
|
||||||
- Adjustable tab handling.
|
|
||||||
- Ability to have scrolling side areas in new text widget for tabs/line numbers.
|
|
||||||
- Many cleanups and small improvements.
|
|
||||||
* Improvements to submenu navigation [Nils Barth/David Santiago] and
|
|
||||||
scrolling menus. [Alex]
|
|
||||||
* Simplification of progress bar API. [Havoc]
|
|
||||||
* Make GtkImage a generic image-display widget. [Havoc]
|
|
||||||
* New GtkTreeView tree widget. Model/view architecture, flexible rendering,
|
|
||||||
large datasets, etc. [Jonathan]
|
|
||||||
* New GtkMessageBox widget for message display. [Havoc]
|
|
||||||
* Allow labels to have contents set from XML-like markup language. [Havoc]
|
|
||||||
* Make dialogs derive from GtkDialog and use stock buttons. [Havoc]
|
|
||||||
|
|
||||||
Internationalization:
|
|
||||||
|
|
||||||
* Proper character set conversion for clipboard/selection. [Owen]
|
|
||||||
* New input method system via loadable modules; support on-the-spot
|
|
||||||
preedit in GtkEntry and new text widget; allow switching input methods
|
|
||||||
on the fly; include modules for XIM and demo Cyrillic-transliteration
|
|
||||||
module. [Owen]
|
|
||||||
* VIQR, Thai, and Inuktitut input methods. [Robert]
|
|
||||||
* Convert po files to UTF-8. [Robert]
|
|
||||||
|
|
||||||
gdk-pixbuf:
|
|
||||||
|
|
||||||
* Full-alpha compositing for gdk-pixbuf on drawable. [Havoc]
|
|
||||||
* Add simple saving to gdk-pixbuf. [David Welton/Havoc]
|
|
||||||
* Add improved error handling with GError to gdk-pixbuf. [Havoc]
|
|
||||||
|
|
||||||
Ports:
|
|
||||||
|
|
||||||
* Much work on Win32 Port. [Tor/Hans]
|
|
||||||
* Much work on Linux-FB Port. [Elliot/Alex]
|
|
||||||
|
|
||||||
Misc:
|
|
||||||
|
|
||||||
* Start of new gtk-demo demo program. [Owen/Jonathan]
|
|
||||||
* Bug fixes and more bug fixes.
|
|
||||||
|
|
||||||
|
|
||||||
Overview of Changes in GTK+ 1.3.1:
|
|
||||||
|
|
||||||
* GTK+ now uses the Pango library for text manipulation. All
|
|
||||||
strings in GTK+ now are in Unicode, languages written
|
|
||||||
from right-to-left, and complex-text languages are now supported.
|
|
||||||
* The gdk-pixbuf library for image loading and manipulation is
|
|
||||||
has been integrated with GTK+.
|
|
||||||
* The GTK+ object system has mostly been moved to GLib, separating
|
|
||||||
it from the GUI code. Many significant enhancements have been
|
|
||||||
made as part of this.
|
|
||||||
* A new text widget is now included. This started as a port
|
|
||||||
of the Tk text widget, and includes such features of the Tk
|
|
||||||
text widget as tags, marks, and unicode text support. It
|
|
||||||
has been enhanced to support model-view operation and the
|
|
||||||
full power of Pango.
|
|
||||||
* The GDK library has been extensively revised to support multiple
|
|
||||||
windowing systems. The only fully functional backend in 1.3.1
|
|
||||||
is the X11 backend, however, ports to Win32, Linux-framebuffer,
|
|
||||||
Nano-X, BeOS, and MacOS exist in various states of completion,
|
|
||||||
and at least some of these will be finished and integrated in
|
|
||||||
before the final GTK+-2.0 release.
|
|
||||||
* 32-bit coordinates are now supported throughout GDK and GTK+
|
|
||||||
(they are emulated where not supported by the windowing system.)
|
|
||||||
* Many minor bug fixes and enhancements. Incompatible changes
|
|
||||||
are documented in docs/Changes-2.0.txt
|
|
||||||
|
|
||||||
Overview of Changes in GTK+ 1.2.8:
|
|
||||||
|
|
||||||
* GNU Make 3.79 bug workaround
|
|
||||||
* FAQ and tutorial updates and improvements
|
|
||||||
* Miscellaneous bug fixes: CList, Calendar, rc-files, FontSelection
|
|
||||||
|
|
||||||
Overview of Changes in GTK+ 1.2.7:
|
|
||||||
|
|
||||||
* More header cleanups.
|
|
||||||
* Fixed activation bug for insensitive widgets.
|
|
||||||
* Locale fixes to RC file parsing code.
|
|
||||||
* Miscellaneous bugfixes for Item Factory, CList, CTree, X Selections,
|
|
||||||
HScale, VScale, Pixmap, Viewport, OptionMenu, Entry and Notebook.
|
|
||||||
* Upgrade to libtool 1.3.4.
|
|
||||||
|
|
||||||
Overview of Changes in GTK+ 1.2.6:
|
|
||||||
|
|
||||||
* container queue_resize fixes
|
|
||||||
* gtk[vh]scale: minor fixups
|
|
||||||
* rename idle to idle_id in testgtk to avoid conflicts with
|
|
||||||
broken libs
|
|
||||||
* More consistent naming of gtkrc files
|
|
||||||
* Added language support: ro, uk
|
|
||||||
|
|
||||||
Overview of Changes in GTK+ 1.2.5:
|
|
||||||
|
|
||||||
* more GtkCTree and GtkWindow bug fixes.
|
|
||||||
* more redraw/resize queue fixes, better expose event
|
|
||||||
discarding code.
|
|
||||||
* more miscellaneous bugs fixed
|
|
||||||
* new configure.in option --disable-rebuilds to completely disable
|
|
||||||
rebuilds of autogenerated sources.
|
|
||||||
* check for 5.002 now, to avoid failing autogeneration build rules due
|
|
||||||
to old perl versions.
|
|
||||||
* fonts (and fontsets) are cached now.
|
|
||||||
* more autogeneration make rules and dependency fixups, we should be
|
|
||||||
save with autogeneration up to make -j12 now ;)
|
|
||||||
* new window position GTK_WIN_POS_CENTER_ALWAYS, which will recenter the
|
|
||||||
GtkWindow on every size change.
|
|
||||||
* major rework of window manager hints handling code, fixed a bunch of
|
|
||||||
races with the new resizing code.
|
|
||||||
* the new wm hints and resizing code is absolutely perfect and bug free now,
|
|
||||||
it only lacks testing ;)
|
|
||||||
* fixed up various rc style memory problems.
|
|
||||||
* gtk_widget_modify_style() now properly changes the style of realized widgets
|
|
||||||
and references the style passed into it. if people worked around this bug,
|
|
||||||
this will introduce a slight memory leak in their code.
|
|
||||||
The code should typically look like:
|
|
||||||
GtkRcStyle *rc_style = gtk_rc_style_new ();
|
|
||||||
[...]
|
|
||||||
gtk_widget_modify_style (widget, rc_style);
|
|
||||||
gtk_rc_style_unref (rc_style);
|
|
||||||
* fix problems with positioning menus offscreen.
|
|
||||||
* GtkText fixes for some crashes and drawing errors.
|
|
||||||
* Better handling for unexpected window destroys in GDK and GTK+.
|
|
||||||
This should make it possible to use a GtkPlug and catch the
|
|
||||||
case where its parent socket is randomly killed.
|
|
||||||
* FAQ updates.
|
|
||||||
* FileSelection i18n patches, RadioButton fixups.
|
|
||||||
* many translation improvements.
|
|
||||||
* miscellaneous other bugs fixed.
|
|
||||||
|
|
||||||
Overview of Changes in GTK+ 1.2.4:
|
|
||||||
|
|
||||||
* DnD improvements (drags can be canceled with Esc now).
|
|
||||||
* suppressed configure event reordering in Gdk.
|
|
||||||
* rewrite of Gtk's configure event handling.
|
|
||||||
* major improvements for the object argument system (Elena Devdariani).
|
|
||||||
* major bugfixes for threading, GtkNotebook, GtkItemFactory, GtkCList and
|
|
||||||
GtkCTree.
|
|
||||||
* tutorial/FAQ updates, new file generation.txt on autogenerated sources.
|
|
||||||
* configure's --with-glib= is "officially" unsupported.
|
|
||||||
* upgrade to libtool 1.3.3.
|
|
||||||
* various buglets fixed.
|
|
||||||
|
|
||||||
Overview of Changes in GTK+ 1.2.3:
|
|
||||||
|
|
||||||
* Upgrade to libtool 1.3
|
|
||||||
* Check for dgettext (for systems with old versions of GNU Gettext)
|
|
||||||
* Many bug fixes (see ChangeLog for details)
|
|
||||||
|
|
||||||
Overview of Changes in GTK+ 1.2.2:
|
|
||||||
|
|
||||||
* Improved Dnd behaviour with Motif applications.
|
|
||||||
* Bug fixes for the Gtk selection code.
|
|
||||||
* Minor bug fixes to the Gdk Atom cache and Dnd code (with --display option).
|
|
||||||
* Bug fixes and leak plugs for the Gdk IM code.
|
|
||||||
* Added gtk_object_get() facility to retrieve object arguments easily.
|
|
||||||
The var args list expects ("arg-name", &value) pairs.
|
|
||||||
* Fixed mapping for GdkInputCondition<->GIOCondition, this should fix
|
|
||||||
problems where closed pipes were no longer signaling GDK_INPUT_READ on
|
|
||||||
systems with a native poll().
|
|
||||||
* Some cleanups to GtkLabel's memory allocation code (shouldn't leak memory
|
|
||||||
anymore).
|
|
||||||
* We don't attempt to lookup xpm color "None" anymore, this should prevent
|
|
||||||
eXodus (commercial X windows server) from popping up a color dialog every
|
|
||||||
time a transparent pixmap is created.
|
|
||||||
* Fixed bug where Gtk timeout/idle handlers would execute without the global
|
|
||||||
Gdk lock being held.
|
|
||||||
* Other minor bug fixes.
|
|
||||||
|
|
||||||
Overview of Changes in GTK+ 1.2.1:
|
|
||||||
|
|
||||||
* Many Bug fixes have been applied to the menu and accelerator code.
|
|
||||||
* GtkItemFactory can "adopt" foreign menu items now and manage their
|
|
||||||
accelerator installation. This is often required to get GtkItemFactory
|
|
||||||
like accelerator propagation between different windows with the same
|
|
||||||
menu hierarchy and for centralized parsing and saving of accelerators.
|
|
||||||
* GtkCList/GtkCTree buttons should always display correctly now.
|
|
||||||
* Miscellaneous other bug fixes.
|
|
||||||
|
|
||||||
What's New in GTK+ 1.2.0 (since 1.0.x):
|
|
||||||
|
|
||||||
* New widgets: GtkFontSelector, GtkPacker, GtkItemFactory, GtkCTree,
|
|
||||||
GtkInvisible, GtkCalendar, GtkLayout, GtkPlug, GtkSocket
|
|
||||||
* Many new features and robustness for existing widgets
|
|
||||||
* Theme support
|
|
||||||
* New DND implementation
|
|
||||||
* Internationalization of standard dialogs
|
|
||||||
* New key binding system
|
|
||||||
* Tearoff menus and menu accelerators
|
|
||||||
* Wide character support for entry and text
|
|
||||||
* Resizing code has been overhauled
|
|
||||||
* Queued redraws of partial areas
|
|
||||||
* Far better support for object arguments
|
|
||||||
* Speed optimizations
|
|
||||||
* Runtime loading of dynamic modules
|
|
||||||
* Support for GLib log domains
|
|
||||||
* Tutorial improvements
|
|
||||||
* A bug fix or two
|
|
||||||
|
|
||||||
Overview of Changes in GTK+ 1.1.16:
|
|
||||||
|
|
||||||
* Major fixes and improvements for handlebox
|
|
||||||
* A change to the way widget->requisition works. Now,
|
|
||||||
widget->requisition is always what the widget requested,
|
|
||||||
unmodified by the usize. See Changes-1.2.txt for details.
|
|
||||||
This correct various bugs with gtk_widget_set_usize().
|
|
||||||
* Fixes for XIM on X11R5 systems
|
|
||||||
* Don't allow cut-and-paste of text in password-style entries
|
|
||||||
* --enable-debug is now on by default for the development release.
|
|
||||||
(When compiling for "production", use --enable-debug=minimum)
|
|
||||||
* Handle systems where Helvetica is not present more gracefully
|
|
||||||
* Fixes for memory leaks
|
|
||||||
* CList and CTree fixes
|
|
||||||
* Bug fixes for drawing problems.
|
|
||||||
* Miscellaneous bug fixes to GtkLabel, GtkCList, GtkCTree,
|
|
||||||
GtkColorsel, Focusing, DND
|
|
||||||
* Tutorial improvements
|
|
||||||
|
|
||||||
Overview of Changes in GTK+ 1.1.15:
|
|
||||||
|
|
||||||
* Tutorial Updates
|
|
||||||
* Added --libs gthread to gtk-config
|
|
||||||
* Bug fixes
|
|
||||||
|
|
||||||
What is new in GTK+ 1.1.14:
|
|
||||||
|
|
||||||
* Additions to docs/Changes-1.2.txt
|
|
||||||
* Just warn when loading theme engine fails
|
|
||||||
* CLAMP GtkScale digits to a meaningful range
|
|
||||||
* GTK_LOCALDIR is now defined in a better fashion
|
|
||||||
* New functions (feature freeze, we know...):
|
|
||||||
gtk_menu_set_title()
|
|
||||||
gtk_toggle_button_get_active()
|
|
||||||
* Some locale fixups in gtkrc code
|
|
||||||
* Fixes to make gtk_radio_button_set_group() keep only
|
|
||||||
one radio button in the group active
|
|
||||||
* Foreign windows are now always treated as viewable; this fixes
|
|
||||||
a problem where updating didn't occur properly in GtkPlug
|
|
||||||
* DND fixes for 64 bit architectures, and for specifying operations
|
|
||||||
with modifier keys.
|
|
||||||
* Major revisions to GtkLayout: avoid having to create window
|
|
||||||
for NO_WINDOW children, adjust allocations of children as
|
|
||||||
scrolled so queued draws work, and a resize is queued instead
|
|
||||||
of allocating directly in a put() or move()
|
|
||||||
|
|
||||||
What is new in GTK+ 1.1.13:
|
|
||||||
|
|
||||||
* Dnd and selection bug fixes and memory purification.
|
|
||||||
* Widget sensitivity fixups.
|
|
||||||
* Tooltips windows are now named "gtk-tooltips" so rc file rules
|
|
||||||
can match tooltips windows. Fixed interaction of tooltips and NO_WINDOW
|
|
||||||
widgets.
|
|
||||||
* Spin buttons now update their values upon value retrieval.
|
|
||||||
* Overhaul of the resizing vs. redrawing logic to reduce redrawing needs
|
|
||||||
a lot. Gtk makes full use of the draw_area coalescing code now, which
|
|
||||||
got minorly improved as well.
|
|
||||||
* Containers map their Gdk windows after their children now to reduce
|
|
||||||
expose event generation.
|
|
||||||
* Gdk event queue fixups, this solves the double-click problems people were
|
|
||||||
recently having.
|
|
||||||
* Account for the fact that GSource's are only properly reentrant from
|
|
||||||
within dispatch(), thus we don't do Gdk event processing from within
|
|
||||||
check() or prepare() anymore.
|
|
||||||
* Rc files feature a bg_pixmap value of "<none>" now.
|
|
||||||
* Improved session management support in Gdk.
|
|
||||||
* Automatic disabling of NLS if no gettext is found should work now.
|
|
||||||
* Removed deprecated functions, docs/Changes-1.2.txt gives an overview.
|
|
||||||
* Gtk+ development now requires GNU autoconf 2.13, GNU automake 1.4
|
|
||||||
and GNU libtool 1.2d.
|
|
||||||
* More bug fixes all over the place.
|
|
||||||
|
|
||||||
What is new in GTK+ 1.1.12:
|
|
||||||
|
|
||||||
* Korean translation added
|
|
||||||
* Fixed memory leaks
|
|
||||||
* A few other bug fixes
|
|
||||||
|
|
||||||
What is new in GTK+ 1.1.11:
|
|
||||||
|
|
||||||
* Dutch, Japanese, Swedish, Polish, and Norwegian translations
|
|
||||||
* Removed deprecated _interp variants: gtk_container_foreach_interp,
|
|
||||||
gtk_idle_add_interp, gtk_timeout_add_interp, gtk_signal_connect_interp
|
|
||||||
* Lots of cast corrections
|
|
||||||
* Many fixes
|
|
||||||
|
|
||||||
What is new in GTK+ 1.1.9:
|
|
||||||
|
|
||||||
* Check for broken glibc 2.0 mb functions and avoid them
|
|
||||||
* Label and Entry display fixes
|
|
||||||
* Move main thread back to GDK, for locking when translating events
|
|
||||||
* Bug fixes
|
|
||||||
|
|
||||||
What is new in GTK+ 1.1.8:
|
|
||||||
|
|
||||||
* Added support for gettext and the localization of the standard
|
|
||||||
dialogs.
|
|
||||||
* Added line-wrapping for the label, and JUSTIFY_FILL
|
|
||||||
* Support reordering via drag and drop in CList and CTree.
|
|
||||||
* Replaced GtkDrawWindow widget with a GTK_USER_DRAW flag
|
|
||||||
* Extended gtkpaned API to support minimum sizes and proportional
|
|
||||||
resizing.
|
|
||||||
* Changed the handling of shared memory segments so as to
|
|
||||||
remove the need for GTK+ to set up signal handlers.
|
|
||||||
* Re-implemented event loop in terms of the event loop
|
|
||||||
that has been added to GLib 1.1.8
|
|
||||||
* Added 'grab_focus' signal to allow keyboard accelerators
|
|
||||||
for entries.
|
|
||||||
* Load locale specific RC files if present.
|
|
||||||
* Bug fixes.
|
|
||||||
|
|
||||||
What is new in GTK+ 1.1.7:
|
|
||||||
|
|
||||||
* Fixed memory mis-allocation in default files code
|
|
||||||
* Various event handling fixes
|
|
||||||
* Wide character support for entry and text
|
|
||||||
* Destroy widgets _after_ propagating unrealize signals through
|
|
||||||
widget hierarchy
|
|
||||||
* Only build XIM-support if available
|
|
||||||
* Tutorial and examples updates
|
|
||||||
* Added gtk_drag_source_unset()
|
|
||||||
|
|
||||||
What is new in GTK+ 1.1.6:
|
|
||||||
|
|
||||||
* The signal system now features emission hooks with special semantics,
|
|
||||||
refer to the ChangeLog for this.
|
|
||||||
* Minor? speedups and memory reductions to the emission handling of the
|
|
||||||
signal system.
|
|
||||||
* _interp() function variants are deprecated now. the corresponding *_full()
|
|
||||||
variants are provided for a long time now.
|
|
||||||
* Dnd abort timeout increased to 10 minutes.
|
|
||||||
* GtkScrolledWindow inherits from GtkBin now.
|
|
||||||
* GTK_POLICY_NEVER is implemented for scrolled windows now.
|
|
||||||
* Lots of API clean ups.
|
|
||||||
* Incremental freezing abilities.
|
|
||||||
* Integrated widgets from the GNOME tree: GtkLayout, GtkPlug and GtkSocket.
|
|
||||||
* New window functions for transient relationship, default size, and
|
|
||||||
geometry hints
|
|
||||||
* Default rc files are now read in (<sysconfdir/etc/gtkrc and ~/.gtkrc)
|
|
||||||
GTK_RC_FILES environment variable and functions are provided to configure
|
|
||||||
this behavior
|
|
||||||
* Read doc/Changes-1.2.txt to properly adapt your code.
|
|
||||||
* Bug Fixes.
|
|
||||||
|
|
||||||
What is new in GTK+ 1.1.5:
|
|
||||||
|
|
||||||
* Theme integration
|
|
||||||
* Widget style modification is now handled through GtkRcStyles
|
|
||||||
* GtkPixmaps now grey out pixmaps when insensitive
|
|
||||||
* Notebook enhancements
|
|
||||||
* Shadow configurability for menubars and handleboxes
|
|
||||||
* DND enhancements
|
|
||||||
* gtkfilesel now supports automounters better
|
|
||||||
* Implementation of expose compression
|
|
||||||
* Queued redraws of partial areas
|
|
||||||
* Scrolledwindow (+Viewport) source incompatibilities, children that are added
|
|
||||||
to a scrolled window don't get an automatic viewport anymore. a convenience
|
|
||||||
function gtk_scrolled_window_add_with_viewport() is supplied for this task
|
|
||||||
* Deprecated functions will now issue a message, informing the programmer about
|
|
||||||
the use of this function. These functions will get removed in future versions
|
|
||||||
* Non-functional functions got removed entirely
|
|
||||||
* gtk_widget_new() and gtk_object_new() will now auto-construct new objects.
|
|
||||||
A new function gtk_object_default_construct() is provided now which should
|
|
||||||
be called after every gtk_type_new() to perform the auto-construction
|
|
||||||
* Improved argument support of several widgets
|
|
||||||
* Bug Fixes
|
|
||||||
|
|
||||||
What is new in GTK+ 1.1.3:
|
|
||||||
|
|
||||||
* GtkCList/GtkCTree now have the ability to:
|
|
||||||
- hide/show individual columns
|
|
||||||
- disable/enable column resizing
|
|
||||||
- set min and max for column widths
|
|
||||||
- set expander style of the ctree
|
|
||||||
- set/get row and cell styles
|
|
||||||
- set spacing between tree expander and cell contents in ctree
|
|
||||||
- toggle auto_resize for columns
|
|
||||||
* Must enhanced DND support, removed old DND code
|
|
||||||
* Idle functions are now implemented via GHook, giving a slight speed
|
|
||||||
improvement
|
|
||||||
* An environment variable GTK_MODULES which takes a colon separated
|
|
||||||
list of module names GTK+ will now automatically load at gtk_init() startup
|
|
||||||
* GtkFontSel now has support for an extra 'base' filter
|
|
||||||
* New function gdk_window_set_root_origin to get the real geometry taking
|
|
||||||
into account window manager offsets
|
|
||||||
* New function gtk_text_set_line_wrap to toggle line wrapping
|
|
||||||
* New function gtk_widget_add_events which safely adds additional
|
|
||||||
events to a widget's event mask
|
|
||||||
* New function gdk_event_get_time to get the timestamp from a generic
|
|
||||||
event
|
|
||||||
* New widget GtkCalendar
|
|
||||||
* New widget GtkInvisible - InputOnly offscreen windows used for reliable
|
|
||||||
pointer grabs and selection handling in DND code
|
|
||||||
* New functions gtk_object_remove_no_notify[_by_id] to remove a certain
|
|
||||||
data portion without invocation of its destroy notifier
|
|
||||||
* gtk_spin_button_construct is now deprecated, use gtk_spin_button_configure
|
|
||||||
instead
|
|
||||||
* gtk_clist_set_border is now deprecated, use gtk_clist_set_shadow_type
|
|
||||||
instead
|
|
||||||
* Removed functions gtk_object_set_data_destroy[_by_id]
|
|
||||||
* Documentation additions/updates
|
|
||||||
* HTML and plain text files are now included in the distribution
|
|
||||||
* Bug fixes, typeness corrections, and general fixups
|
|
||||||
|
|
||||||
What is new in GTK+ 1.1.2:
|
|
||||||
|
|
||||||
* Gtk+ is now featuring runtime loading of dynamic modules via the
|
|
||||||
--gtk-modules= command line switch. such modules have to export a
|
|
||||||
G_MODULE_EXPORT void gtk_module_init (gint *argc, gchar ***argv);
|
|
||||||
function which will be invoked to initialize the module. since such
|
|
||||||
modules may create new widget types, they are always resident.
|
|
||||||
* The tutorial has been updated again.
|
|
||||||
* Changes to menus including tearoff menus and accelerators.
|
|
||||||
* Better support for modal dialogs.
|
|
||||||
* Removed CAN_FOCUS by default from scrollbars and button children of toolbar.
|
|
||||||
* More improvements and fixes for GtkCList and GtkCTree (i.e. row sorting).
|
|
||||||
* GtkCTree rows can be unselectable now.
|
|
||||||
* The GtkCTree API has undergone major renames (see ChangeLog entry from Lars
|
|
||||||
Hamann on Tue Aug 18 00:29:13 1998).
|
|
||||||
* A bunch of varargs functions changed to get va_lists working on systems that
|
|
||||||
implement va_lists as arrays.
|
|
||||||
* Improvements to the gdkrgb code.
|
|
||||||
* Improvements to Gdk color handling so we greatly reduce server traffic and
|
|
||||||
don't leak colors anymore.
|
|
||||||
* Improved internal widget tree iterators (the GtkContainer::foreach signal
|
|
||||||
vanished because of this).
|
|
||||||
* Option menus can have the keyboard focus now.
|
|
||||||
* More fixups to the text widget.
|
|
||||||
* GtkFileSelection should behave much more nicely in combination with AFS now.
|
|
||||||
* Support for label underlining.
|
|
||||||
* Support for GLib 1.1.3 log domains.
|
|
||||||
* Documentation improvements.
|
|
||||||
* Configuration fixes on various platforms.
|
|
||||||
* Miscellaneous fixes to XInput support.
|
|
||||||
* Build with shared library dependencies on Linux
|
|
||||||
* Fix for a major bug in the type systems memory allocation code that could
|
|
||||||
cause random crashes.
|
|
||||||
* Libtool update to version 1.2b.
|
|
||||||
* Lots of bugfixes and cleanups again ;)
|
|
||||||
|
|
||||||
|
|
||||||
What is new in GTK+ 1.1.1:
|
|
||||||
|
|
||||||
* Tutorial updates and additions.
|
|
||||||
* Key binding support for GtkListItems and GtkList.
|
|
||||||
* Extended selection mode and autoscrolling for GtkLists.
|
|
||||||
* A GtkCtree now operates on GtkCTreeNode* structures rather than GList*.
|
|
||||||
* GtkCTreeNodes can now be created from GNode trees.
|
|
||||||
* Bug fixes for GtkNotebook, GtkCList, GtkCombo and GdkWindow reparentation.
|
|
||||||
|
|
||||||
|
|
||||||
What is new in GTK+ 1.1.0:
|
|
||||||
|
|
||||||
* New widget GtkFontSelector.
|
|
||||||
* New featureful progress bar.
|
|
||||||
* New container widget GtkPacker.
|
|
||||||
* New object GtkItemFactory, GtkMenuFactory is deprecated.
|
|
||||||
* New key binding system, configurable via rcfiles, similar to styles.
|
|
||||||
* New widget GtkCTree with drag selections and keyboard movement and
|
|
||||||
and horizontal scrolling. Features also implemented for GtkCList.
|
|
||||||
* Significant speedups to widget creation and destruction through caching
|
|
||||||
colormap and visual queries to the XServer.
|
|
||||||
* Speedups for type creation and especially gtk_type_is_a() checks.
|
|
||||||
* Speedups in signal lookup, creation and emissions and connection handling.
|
|
||||||
* Minor speedups with object data allocation and destruction.
|
|
||||||
* Additions to the signal handling API (e.g. *_emitv).
|
|
||||||
* Support for rc-file reparsing.
|
|
||||||
* Resizing logic is now implemented on container widget basis, rather than
|
|
||||||
for toplevel GtkWindows only.
|
|
||||||
* Buttons support relief styles now.
|
|
||||||
* Some widgets are now allocated through memchunks to behave more memory wise.
|
|
||||||
* Newly included file gtkfeatures.h which defines compatibility macros to
|
|
||||||
test for certain API features upon program compilation.
|
|
||||||
* Child arguments support for container widgets.
|
|
||||||
* Far better support for object arguments, revamp of the underlying
|
|
||||||
mechanism for speed and reusability. Child/object arguments don't
|
|
||||||
need to be preceded by the "GtkType::" portion anymore.
|
|
||||||
* Removed GtkAcceleratorTable in favour of GtkAccelGroup, accelerator display
|
|
||||||
is now performed by a new widget GtkAccelLabel.
|
|
||||||
* Overhaul of the resizing code. Resizing behaviour can now be specified
|
|
||||||
on GtkContainer basis, so the underlying algorithm isn't only available
|
|
||||||
for GtkWindows.
|
|
||||||
* GtkTables are now fully resizable.
|
|
||||||
* The GtkType system now supports an additional base class initialization
|
|
||||||
function.
|
|
||||||
* GtkStyles and key bindings can now be looked up depending on the base
|
|
||||||
types of a widget, through a new keyword `class' in rc files.
|
|
||||||
* GtkButton derives from GtkBin (finally).
|
|
||||||
* More descriptive error messages on rc parsing.
|
|
||||||
* Runtime information is available to query enum/flag definition values.
|
|
||||||
* Upgrade to libtool-1.2
|
|
||||||
* Legions of bug fixes, memory leaks, segfaults, of-by-something errors...
|
|
||||||
including those that already went into the 1.0.x branch.
|
|
||||||
* A big bunch of features and cosmetic fixups that just got lost in
|
|
||||||
the masses of changesonfigure problem when cross-compiling
|
|
6951
NEWS.pre-3.0
46
README.in
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
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'
|
||||||
|
|
||||||
|
|
||||||
|
Release notes for 3.0
|
||||||
|
=====================
|
||||||
|
|
||||||
|
* GTK+ 3 is a major new version of GTK+, which is parallel installable
|
||||||
|
with GTK+ 2.x. For information about porting applications from GTK+ 2.x
|
||||||
|
to GTK+ 3, see the file:
|
||||||
|
|
||||||
|
docs/reference/gtk/html/migrating.html
|
||||||
|
|
||||||
|
Or online at:
|
||||||
|
|
||||||
|
http://library.gnome.org/devel/gtk/3.0/migrating.html
|
||||||
|
|
||||||
|
* Note that the library sonames in this release have been changed from
|
||||||
|
libgtk-3.0 and libgdk-3.0 to libgtk-3 and libgdk-3, to prevent the
|
||||||
|
library versions from going backwards, compared to the 2.90/91/99
|
||||||
|
releases. Applications will have to be recompiled.
|
154
README.md
@@ -1,154 +0,0 @@
|
|||||||
GTK+ — The GTK toolkit
|
|
||||||
======================
|
|
||||||
|
|
||||||
[](https://gitlab.gnome.org/GNOME/gtk/pipelines)
|
|
||||||
|
|
||||||
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 location
|
|
||||||
|
|
||||||
- https://download.gnome.org/sources/gtk+
|
|
||||||
|
|
||||||
The official web site
|
|
||||||
|
|
||||||
- https://www.gtk.org
|
|
||||||
|
|
||||||
The official developers blog
|
|
||||||
|
|
||||||
- https://blog.gtk.org
|
|
||||||
|
|
||||||
Information about mailing lists can be found at
|
|
||||||
|
|
||||||
- http://www.gtk.org/mailing-lists.php
|
|
||||||
|
|
||||||
Building and installing
|
|
||||||
-----------------------
|
|
||||||
|
|
||||||
In order to build GTK+ you will need:
|
|
||||||
|
|
||||||
- [a C99 compatible compiler](https://wiki.gnome.org/Projects/GLib/CompilerRequirements)
|
|
||||||
- [Python 3](https://www.python.org/)
|
|
||||||
- [Meson](http://mesonbuild.com)
|
|
||||||
- [Ninja](https://ninja-build.org)
|
|
||||||
|
|
||||||
You will also need various dependencies, based on the platform you are
|
|
||||||
building for:
|
|
||||||
|
|
||||||
- [GLib](https://download.gnome.org/sources/glib)
|
|
||||||
- [GdkPixbuf](https://download.gnome.org/sources/gdk-pixbuf)
|
|
||||||
- [GObject-Introspection](https://download.gnome.org/sources/gobject-introspection)
|
|
||||||
- [Cairo](https://www.cairographics.org)
|
|
||||||
- [Pango](https://download.gnome.org/sources/pango)
|
|
||||||
- [Epoxy](https://github.com/anholt/libepoxy)
|
|
||||||
- [Graphene](https://github.com/ebassi/graphene)
|
|
||||||
- [ATK](https://download.gnome.org/sources/atk)
|
|
||||||
- [Xkb-common](https://github.com/xkbcommon/libxkbcommon)
|
|
||||||
|
|
||||||
If you are building the X11 backend, you will also need:
|
|
||||||
|
|
||||||
- Xlib, and the following X extensions:
|
|
||||||
- xrandr
|
|
||||||
- xrender
|
|
||||||
- xi
|
|
||||||
- xext
|
|
||||||
- xfixes
|
|
||||||
- xcursor
|
|
||||||
- xdamage
|
|
||||||
- xcomposite
|
|
||||||
- [atk-bridge-2.0](https://download.gnome.org/sources/at-spi2-atk)
|
|
||||||
|
|
||||||
If you are building the Wayland backend, you will also need:
|
|
||||||
|
|
||||||
- Wayland-client
|
|
||||||
- Wayland-protocols
|
|
||||||
- Wayland-cursor
|
|
||||||
- Wayland-EGL
|
|
||||||
|
|
||||||
Once you have all the necessary dependencies, you can build GTK+ by using
|
|
||||||
Meson:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
$ meson _build .
|
|
||||||
$ cd _build
|
|
||||||
$ ninja
|
|
||||||
```
|
|
||||||
|
|
||||||
You can run the test suite using:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
$ meson test
|
|
||||||
```
|
|
||||||
|
|
||||||
And, finally, you can install GTK+ using:
|
|
||||||
|
|
||||||
```
|
|
||||||
$ sudo ninja install
|
|
||||||
```
|
|
||||||
|
|
||||||
Complete information about installing GTK+ and related libraries
|
|
||||||
can be found in the file:
|
|
||||||
|
|
||||||
```
|
|
||||||
docs/reference/gtk/html/gtk-building.html
|
|
||||||
```
|
|
||||||
|
|
||||||
Or [online](https://developer.gnome.org/gtk4/stable/gtk-building.html)
|
|
||||||
|
|
||||||
How to report bugs
|
|
||||||
------------------
|
|
||||||
|
|
||||||
Bugs should be reported on the [issues page](https://gitlab.gnome.org/GNOME/gtk/issues/new).
|
|
||||||
|
|
||||||
In the bug report please include:
|
|
||||||
|
|
||||||
* Information about your system. For instance:
|
|
||||||
|
|
||||||
- which version of GTK+ you are using
|
|
||||||
- what operating system and version
|
|
||||||
- for Linux, which distribution
|
|
||||||
- if you built GTK+, the list of options used to configure the build
|
|
||||||
|
|
||||||
And anything else you think is relevant.
|
|
||||||
|
|
||||||
* How to reproduce the bug.
|
|
||||||
|
|
||||||
If you can reproduce it with one of the demo applications that are
|
|
||||||
built in the demos/ subdirectory, on 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.
|
|
||||||
|
|
||||||
Release notes
|
|
||||||
-------------
|
|
||||||
|
|
||||||
The release notes for GTK+ are part of the migration guide in the API
|
|
||||||
reference. See:
|
|
||||||
|
|
||||||
- [3.x release notes](https://developer.gnome.org/gtk3/unstable/gtk-migrating-2-to-3.html)
|
|
||||||
- [4.x release notes](https://developer.gnome.org/gtk4/unstable/gtk-migrating-3-to-4.html)
|
|
||||||
|
|
||||||
Licensing terms
|
|
||||||
---------------
|
|
||||||
|
|
||||||
GTK+ is released under the terms of the GNU Lesser General Public License,
|
|
||||||
version 2.1 or, at your option, any later version, as published by the Free
|
|
||||||
Software Foundation.
|
|
||||||
|
|
||||||
Please, see the `COPYING` file for further information.
|
|
184
README.win32
Normal file
@@ -0,0 +1,184 @@
|
|||||||
|
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/
|
||||||
|
|
||||||
|
Building GTK+ on Win32
|
||||||
|
======================
|
||||||
|
|
||||||
|
First you obviously need developer packages for the compile-time
|
||||||
|
dependencies: Pango, atk, glib, gettext-runtime, libiconv, libpng,
|
||||||
|
zlib, libtiff at least. See
|
||||||
|
http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies .
|
||||||
|
|
||||||
|
After installing the dependencies, there are two ways to build GTK+
|
||||||
|
for win32.
|
||||||
|
|
||||||
|
1) GNU tools, ./configure && make install
|
||||||
|
-----------------------------------------
|
||||||
|
|
||||||
|
This requires you have mingw and MSYS.
|
||||||
|
|
||||||
|
Use the configure script, and the resulting Makefiles (which use
|
||||||
|
libtool and gcc to do the compilation). I use this myself, but it can
|
||||||
|
be hard to setup correctly.
|
||||||
|
|
||||||
|
The full script I run to build GTK+ 2.16 unpacked from a source
|
||||||
|
distribution is as below. This is from bulding GTK+ 2.16.5. I don't
|
||||||
|
use any script like this to build the development branch, as I don't
|
||||||
|
distribute any binaries from development branches.
|
||||||
|
|
||||||
|
# This is a shell script that calls functions and scripts from
|
||||||
|
# tml@iki.fi's personal work env<6E>ronment. It is not expected to be
|
||||||
|
# usable unmodified by others, and is included only for reference.
|
||||||
|
|
||||||
|
MOD=gtk+
|
||||||
|
VER=2.16.5
|
||||||
|
REV=1
|
||||||
|
ARCH=win32
|
||||||
|
|
||||||
|
THIS=${MOD}_${VER}-${REV}_${ARCH}
|
||||||
|
|
||||||
|
RUNZIP=${MOD}_${VER}-${REV}_${ARCH}.zip
|
||||||
|
DEVZIP=${MOD}-dev_${VER}-${REV}_${ARCH}.zip
|
||||||
|
|
||||||
|
HEX=`echo $THIS | md5sum | cut -d' ' -f1`
|
||||||
|
TARGET=c:/devel/target/$HEX
|
||||||
|
|
||||||
|
usedev
|
||||||
|
usemsvs6
|
||||||
|
|
||||||
|
(
|
||||||
|
|
||||||
|
set -x
|
||||||
|
|
||||||
|
DEPS=`latest --arch=${ARCH} glib atk cairo pango libpng zlib libtiff jpeg`
|
||||||
|
PROXY_LIBINTL=`latest --arch=${ARCH} proxy-libintl`
|
||||||
|
|
||||||
|
PKG_CONFIG_PATH=
|
||||||
|
for D in $DEPS; do
|
||||||
|
PATH=/devel/dist/${ARCH}/$D/bin:$PATH
|
||||||
|
[ -d /devel/dist/${ARCH}/$D/lib/pkgconfig ] && PKG_CONFIG_PATH=/devel/dist/${ARCH}/$D/lib/pkgconfig:$PKG_CONFIG_PATH
|
||||||
|
done
|
||||||
|
|
||||||
|
LIBPNG=`latest --arch=${ARCH} libpng`
|
||||||
|
ZLIB=`latest --arch=${ARCH} zlib`
|
||||||
|
LIBTIFF=`latest --arch=${ARCH} libtiff`
|
||||||
|
JPEG=`latest --arch=${ARCH} jpeg`
|
||||||
|
|
||||||
|
patch -p0 <<'EOF'
|
||||||
|
EOF
|
||||||
|
|
||||||
|
lt_cv_deplibs_check_method='pass_all' \
|
||||||
|
CC='gcc -mtune=pentium3 -mthreads' \
|
||||||
|
CPPFLAGS="-I/devel/dist/${ARCH}/${LIBPNG}/include \
|
||||||
|
-I/devel/dist/${ARCH}/${ZLIB}/include \
|
||||||
|
-I/devel/dist/${ARCH}/${LIBTIFF}/include \
|
||||||
|
-I/devel/dist/${ARCH}/${JPEG}/include \
|
||||||
|
-I/devel/dist/${ARCH}/${PROXY_LIBINTL}/include" \
|
||||||
|
LDFLAGS="-L/devel/dist/${ARCH}/${LIBPNG}/lib \
|
||||||
|
-L/devel/dist/${ARCH}/${ZLIB}/lib \
|
||||||
|
-L/devel/dist/${ARCH}/${LIBTIFF}/lib \
|
||||||
|
-L/devel/dist/${ARCH}/${JPEG}/lib \
|
||||||
|
-L/devel/dist/${ARCH}/${PROXY_LIBINTL}/lib -Wl,--exclude-libs=libintl.a \
|
||||||
|
-Wl,--enable-auto-image-base" \
|
||||||
|
LIBS=-lintl \
|
||||||
|
CFLAGS=-O2 \
|
||||||
|
./configure \
|
||||||
|
--enable-win32-backend \
|
||||||
|
--disable-gdiplus \
|
||||||
|
--with-included-immodules \
|
||||||
|
--without-libjasper \
|
||||||
|
--enable-debug=yes \
|
||||||
|
--enable-explicit-deps=no \
|
||||||
|
--disable-gtk-doc \
|
||||||
|
--disable-static \
|
||||||
|
--prefix=$TARGET &&
|
||||||
|
|
||||||
|
libtoolcacheize &&
|
||||||
|
rm gtk/gtk.def &&
|
||||||
|
(PATH="$PWD/gdk-pixbuf/.libs:/devel/target/$HEX/bin:$PATH" make -j3 install || (rm .libtool-cache* && PATH="/devel/target/$HEX/bin:$PATH" make -j3 install)) &&
|
||||||
|
|
||||||
|
PATH="/devel/target/$HEX/bin:$PATH" gdk-pixbuf-query-loaders >/devel/target/$HEX/etc/gtk-2.0/gdk-pixbuf.loaders &&
|
||||||
|
|
||||||
|
grep -v -E 'Automatically generated|Created by|LoaderDir =' <$TARGET/etc/gtk-2.0/gdk-pixbuf.loaders >$TARGET/etc/gtk-2.0/gdk-pixbuf.loaders.temp &&
|
||||||
|
mv $TARGET/etc/gtk-2.0/gdk-pixbuf.loaders.temp $TARGET/etc/gtk-2.0/gdk-pixbuf.loaders &&
|
||||||
|
grep -v -E 'Automatically generated|Created by|ModulesPath =' <$TARGET/etc/gtk-2.0/gtk.immodules >$TARGET/etc/gtk-2.0/gtk.immodules.temp &&
|
||||||
|
mv $TARGET/etc/gtk-2.0/gtk.immodules.temp $TARGET/etc/gtk-2.0/gtk.immodules &&
|
||||||
|
|
||||||
|
./gtk-zip.sh &&
|
||||||
|
|
||||||
|
mv /tmp/${MOD}-${VER}.zip /tmp/$RUNZIP &&
|
||||||
|
mv /tmp/${MOD}-dev-${VER}.zip /tmp/$DEVZIP
|
||||||
|
|
||||||
|
) 2>&1 | tee /devel/src/tml/packaging/$THIS.log
|
||||||
|
|
||||||
|
(cd /devel && zip /tmp/$DEVZIP src/tml/packaging/$THIS.{sh,log}) &&
|
||||||
|
manifestify /tmp/$RUNZIP /tmp/$DEVZIP
|
||||||
|
|
||||||
|
You should not just copy the above blindly. There are some things in
|
||||||
|
the script that are very specific to *my* build setup on *my* current
|
||||||
|
machine. For instance the "latest" command, the "usedev" and
|
||||||
|
"usemsvs6" shell functions, the /devel/dist folder. The above script
|
||||||
|
is really just meant for reference, to give an idea. You really need
|
||||||
|
to understand what things like PKG_CONFIG_PATH are and set them up
|
||||||
|
properly after installing the dependencies before building GTK+.
|
||||||
|
|
||||||
|
As you see above, after running configure, one can just say "make
|
||||||
|
install", like on Unix. A post-build fix is needed, running
|
||||||
|
gdk-pixbuf-query-loaders once more to get a correct gdk-pixbuf.loaders
|
||||||
|
file.
|
||||||
|
|
||||||
|
For a 64-bit build you need to remove the gtk/gtk.def file and let it
|
||||||
|
be regenerated by the makefilery. This is because the 64-bit GTK dll
|
||||||
|
has a slightly different list of exported function names. This is on
|
||||||
|
purpose and not a bug. The API is the same at the source level, and
|
||||||
|
the same #defines of some function names to actually have a _utf8
|
||||||
|
suffix is used (just to keep the header simpler). But the
|
||||||
|
corresponding non-suffixed function to maintain ABI stability are not
|
||||||
|
needed in the 64-bit case (because there are no older EXEs around that
|
||||||
|
would require such for ABI stability).
|
||||||
|
|
||||||
|
|
||||||
|
2) Microsoft's tools
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
Use the Microsoft compiler, cl and Make, nmake. Say nmake -f
|
||||||
|
makefile.msc in gdk and gtk. Be prepared to manually edit various
|
||||||
|
makefile.msc files, and the makefile snippets in build/win32.
|
||||||
|
|
||||||
|
Alternative 1 also generates Microsoft import libraries (.lib), if you
|
||||||
|
have lib.exe available. It might also work for cross-compilation from
|
||||||
|
Unix.
|
||||||
|
|
||||||
|
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 for
|
||||||
|
instance the makefile.msc files might not produce identically named
|
||||||
|
DLLs and import libraries as the "autoconfiscated" makefiles and
|
||||||
|
libtool do. If this bothers you, you will have to fix the makefiles.
|
||||||
|
|
||||||
|
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 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.
|
||||||
|
|
||||||
|
Wintab
|
||||||
|
======
|
||||||
|
|
||||||
|
The tablet support uses the Wintab API. The Wintab development kit is
|
||||||
|
no longer required. The wintab.h header file is bundled with GTK+
|
||||||
|
sources. Unfortunately it seems that only Wacom tablets come with
|
||||||
|
support for the Wintab API nowadays.
|
||||||
|
|
||||||
|
--Tor Lillqvist <tml@iki.fi>, <tml@novell.com>
|
79
acinclude.m4
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
# 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()])])])
|
||||||
|
|
||||||
|
# GTK_ADD_LIB(VAR,LIBNAME)
|
||||||
|
# ---------------------------------
|
||||||
|
# Helper macro to add a -lBlah to a variable, avoiding repeats
|
||||||
|
# Note that this needs to be quoted when used in an enclosing macro
|
||||||
|
AC_DEFUN([GTK_ADD_LIB],
|
||||||
|
[ case "$$1 " in
|
||||||
|
*-l$2[[\ \ ]]*) ;;
|
||||||
|
*) $1="-l$2 $$1" ;;
|
||||||
|
esac
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
|
# Checks the location of the XML Catalog
|
||||||
|
# Usage:
|
||||||
|
# JH_PATH_XML_CATALOG([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
||||||
|
# Defines XMLCATALOG and XML_CATALOG_FILE substitutions
|
||||||
|
AC_DEFUN([JH_PATH_XML_CATALOG],
|
||||||
|
[
|
||||||
|
# check for the presence of the XML catalog
|
||||||
|
AC_ARG_WITH([xml-catalog],
|
||||||
|
AC_HELP_STRING([--with-xml-catalog=CATALOG],
|
||||||
|
[path to xml catalog to use]),,
|
||||||
|
[with_xml_catalog=/etc/xml/catalog])
|
||||||
|
jh_found_xmlcatalog=true
|
||||||
|
XML_CATALOG_FILE="$with_xml_catalog"
|
||||||
|
AC_SUBST([XML_CATALOG_FILE])
|
||||||
|
AC_MSG_CHECKING([for XML catalog ($XML_CATALOG_FILE)])
|
||||||
|
if test -f "$XML_CATALOG_FILE"; then
|
||||||
|
AC_MSG_RESULT([found])
|
||||||
|
else
|
||||||
|
jh_found_xmlcatalog=false
|
||||||
|
AC_MSG_RESULT([not found])
|
||||||
|
fi
|
||||||
|
|
||||||
|
# check for the xmlcatalog program
|
||||||
|
AC_PATH_PROG(XMLCATALOG, xmlcatalog, no)
|
||||||
|
if test "x$XMLCATALOG" = xno; then
|
||||||
|
jh_found_xmlcatalog=false
|
||||||
|
fi
|
||||||
|
|
||||||
|
if $jh_found_xmlcatalog; then
|
||||||
|
ifelse([$1],,[:],[$1])
|
||||||
|
else
|
||||||
|
ifelse([$2],,[AC_MSG_ERROR([could not find XML catalog])],[$2])
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
|
||||||
|
# Checks if a particular URI appears in the XML catalog
|
||||||
|
# Usage:
|
||||||
|
# JH_CHECK_XML_CATALOG(URI, [FRIENDLY-NAME], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
||||||
|
AC_DEFUN([JH_CHECK_XML_CATALOG],
|
||||||
|
[
|
||||||
|
AC_REQUIRE([JH_PATH_XML_CATALOG],[JH_PATH_XML_CATALOG(,[:])])dnl
|
||||||
|
AC_MSG_CHECKING([for ifelse([$2],,[$1],[$2]) in XML catalog])
|
||||||
|
if $jh_found_xmlcatalog && \
|
||||||
|
AC_RUN_LOG([$XMLCATALOG --noout "$XML_CATALOG_FILE" "$1" >&2]); then
|
||||||
|
AC_MSG_RESULT([found])
|
||||||
|
ifelse([$3],,,[$3
|
||||||
|
])dnl
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT([not found])
|
||||||
|
ifelse([$4],,
|
||||||
|
[AC_MSG_ERROR([could not find ifelse([$2],,[$1],[$2]) in XML catalog])],
|
||||||
|
[$4])
|
||||||
|
fi
|
||||||
|
])
|
32
autogen.sh
Executable file
@@ -0,0 +1,32 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Run this to generate all the initial makefiles, etc.
|
||||||
|
|
||||||
|
test -n "$srcdir" || srcdir=`dirname "$0"`
|
||||||
|
test -n "$srcdir" || srcdir=.
|
||||||
|
|
||||||
|
olddir=`pwd`
|
||||||
|
cd "$srcdir"
|
||||||
|
|
||||||
|
GTKDOCIZE=`which gtkdocize`
|
||||||
|
if test -z $GTKDOCIZE; then
|
||||||
|
echo "*** No GTK-Doc found, please install it ***"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
gtkdocize || exit $?
|
||||||
|
fi
|
||||||
|
|
||||||
|
# README and INSTALL are required by automake, but may be deleted by clean
|
||||||
|
# up rules. to get automake to work, simply touch these here, they will be
|
||||||
|
# regenerated from their corresponding *.in files by ./configure anyway.
|
||||||
|
touch README INSTALL
|
||||||
|
|
||||||
|
AUTORECONF=`which autoreconf`
|
||||||
|
if test -z $AUTORECONF; then
|
||||||
|
echo "*** No autoreconf found, please install it ***"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
autoreconf --force --install --verbose || exit $?
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd "$olddir"
|
||||||
|
test -n "$NOCONFIGURE" || "$srcdir/configure" "$@"
|
@@ -1,59 +0,0 @@
|
|||||||
{
|
|
||||||
"app-id": "org.gtk.Demo",
|
|
||||||
"runtime": "org.gnome.Platform",
|
|
||||||
"runtime-version": "master",
|
|
||||||
"sdk": "org.gnome.Sdk",
|
|
||||||
"command": "gtk4-demo",
|
|
||||||
"tags": ["devel", "development", "nightly"],
|
|
||||||
"rename-desktop-file": "gtk4-demo.desktop",
|
|
||||||
"rename-icon": "gtk4-demo",
|
|
||||||
"desktop-file-name-prefix": "(Development) ",
|
|
||||||
"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": "graphene",
|
|
||||||
"buildsystem": "meson",
|
|
||||||
"builddir": true,
|
|
||||||
"config-opts": [
|
|
||||||
"--libdir=/app/lib"
|
|
||||||
],
|
|
||||||
"sources": [
|
|
||||||
{
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/ebassi/graphene.git"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "gtk",
|
|
||||||
"buildsystem": "meson",
|
|
||||||
"builddir": true,
|
|
||||||
"config-opts": [
|
|
||||||
"--libdir=/app/lib"
|
|
||||||
],
|
|
||||||
"sources": [
|
|
||||||
{
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://gitlab.gnome.org/GNOME/gtk.git"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
@@ -1,59 +0,0 @@
|
|||||||
{
|
|
||||||
"app-id": "org.gtk.WidgetFactory",
|
|
||||||
"runtime": "org.gnome.Platform",
|
|
||||||
"runtime-version": "master",
|
|
||||||
"sdk": "org.gnome.Sdk",
|
|
||||||
"command": "gtk4-widget-factory",
|
|
||||||
"tags": ["devel", "development", "nightly"],
|
|
||||||
"rename-desktop-file": "gtk4-widget-factory.desktop",
|
|
||||||
"rename-icon": "gtk4-widget-factory",
|
|
||||||
"desktop-file-name-prefix": "(Development) ",
|
|
||||||
"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": "graphene",
|
|
||||||
"buildsystem": "meson",
|
|
||||||
"builddir": true,
|
|
||||||
"config-opts": [
|
|
||||||
"--libdir=/app/lib"
|
|
||||||
],
|
|
||||||
"sources": [
|
|
||||||
{
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/ebassi/graphene.git"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "gtk",
|
|
||||||
"buildsystem": "meson",
|
|
||||||
"builddir": true,
|
|
||||||
"config-opts": [
|
|
||||||
"--libdir=/app/lib"
|
|
||||||
],
|
|
||||||
"sources": [
|
|
||||||
{
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://gitlab.gnome.org/GNOME/gtk.git"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
@@ -1,26 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
gtk_api_version=$1
|
|
||||||
gtk_abi_version=$2
|
|
||||||
gtk_libdir=$3
|
|
||||||
gtk_datadir=$4
|
|
||||||
|
|
||||||
# Package managers set this so we don't need to run
|
|
||||||
if [ -z "$DESTDIR" ]; then
|
|
||||||
echo Compiling GSettings schemas...
|
|
||||||
glib-compile-schemas ${gtk_datadir}/glib-2.0/schemas
|
|
||||||
|
|
||||||
echo Updating desktop database...
|
|
||||||
update-desktop-database -q ${gtk_datadir}/applications
|
|
||||||
|
|
||||||
echo Updating icon cache...
|
|
||||||
gtk-update-icon-cache -q -t -f ${gtk_datadir}/icons/hicolor
|
|
||||||
|
|
||||||
echo Updating module cache for print backends...
|
|
||||||
mkdir -p ${gtk_libdir}/gtk-4.0/4.0.0/printbackends
|
|
||||||
gio-querymodules ${gtk_libdir}/gtk-4.0/4.0.0/printbackends
|
|
||||||
|
|
||||||
echo Updating module cache for input methods...
|
|
||||||
mkdir -p ${gtk_libdir}/gtk-4.0/4.0.0/immodules
|
|
||||||
gio-querymodules ${gtk_libdir}/gtk-4.0/4.0.0/immodules
|
|
||||||
fi
|
|
4
build/Makefile.am
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
include $(top_srcdir)/Makefile.decl
|
||||||
|
|
||||||
|
SUBDIRS = \
|
||||||
|
win32
|
4
build/win32/Makefile.am
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
include $(top_srcdir)/Makefile.decl
|
||||||
|
|
||||||
|
SUBDIRS = \
|
||||||
|
vs9
|
13
build/win32/vs9/Makefile.am
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
include $(top_srcdir)/Makefile.decl
|
||||||
|
|
||||||
|
EXTRA_DIST += \
|
||||||
|
README.txt \
|
||||||
|
gtk+.sln \
|
||||||
|
gtk+.vsprops \
|
||||||
|
gdk-win32.vcproj \
|
||||||
|
gdk.vcproj \
|
||||||
|
gdk.vcprojin \
|
||||||
|
gtk.vcproj \
|
||||||
|
gtk.vcprojin \
|
||||||
|
gtk-demo.vcproj \
|
||||||
|
install.vcproj
|
23
build/win32/vs9/README.txt
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
Note that all this is rather experimental.
|
||||||
|
|
||||||
|
This VS9 solution and the projects it includes are intented to be used
|
||||||
|
in a GTK+ source tree unpacked from a tarball. In a git checkout you
|
||||||
|
first need to use some Unix-like environment or manual work to expand
|
||||||
|
the files needed, like config.h.win32.in into config.h.win32 and the
|
||||||
|
.vcprojin files here into corresponding actual .vcproj files.
|
||||||
|
|
||||||
|
You will need the parts from below in the GTK+ stack: gdk-pixbuf, pango,
|
||||||
|
atk and glib. External dependencies are at least zlib, libpng,
|
||||||
|
proxy-libintl, fontconfig, freetype, expat. See the corresponding
|
||||||
|
README.txt file in glib for details where to unpack them.
|
||||||
|
|
||||||
|
The "install" project will copy build results and headers into their
|
||||||
|
appropriate location under <root>\vs9\<PlatformName>. For instance,
|
||||||
|
built DLLs go into <root>\vs9\<PlatformName>\bin, built LIBs into
|
||||||
|
<root>\vs9\<PlatformName>\lib and GTK+ headers into
|
||||||
|
<root>\vs9\<PlatformName>\include\gtk-3.0. This is then from where
|
||||||
|
project files higher in the stack are supposed to look for them, not
|
||||||
|
from a specific GLib source tree.
|
||||||
|
|
||||||
|
--Tor Lillqvist <tml@iki.fi>
|
||||||
|
--Updated by Chun-wei Fan <fanc999 --at-- yahoo --dot-- com --dot-- tw>
|
147
build/win32/vs9/gdk-win32.vcproj
Normal file
@@ -0,0 +1,147 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<VisualStudioProject
|
||||||
|
ProjectType="Visual C++"
|
||||||
|
Version="9.00"
|
||||||
|
Name="gdk-win32"
|
||||||
|
ProjectGUID="{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FA}"
|
||||||
|
RootNamespace="gdkwin32"
|
||||||
|
Keyword="Win32Proj"
|
||||||
|
TargetFrameworkVersion="0"
|
||||||
|
>
|
||||||
|
<Platforms>
|
||||||
|
<Platform
|
||||||
|
Name="Win32"
|
||||||
|
/>
|
||||||
|
<Platform
|
||||||
|
Name="x64"
|
||||||
|
/>
|
||||||
|
</Platforms>
|
||||||
|
<ToolFiles>
|
||||||
|
</ToolFiles>
|
||||||
|
<Configurations>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
InheritedPropertySheets=".\gtk+.vsprops"
|
||||||
|
ConfigurationType="4"
|
||||||
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="..\..\..\gdk;..\..\..\gdk\win32"
|
||||||
|
PreprocessorDefinitions="_DEBUG;$(GdkDefines);INSIDE_GDK_WIN32"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="2"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
DebugInformationFormat="4"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release|Win32"
|
||||||
|
InheritedPropertySheets=".\gtk+.vsprops"
|
||||||
|
ConfigurationType="4"
|
||||||
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories="..\..\..\gdk;..\..\..\gdk\win32"
|
||||||
|
PreprocessorDefinitions="$(GdkDefines);INSIDE_GDK_WIN32"
|
||||||
|
RuntimeLibrary="2"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug|x64"
|
||||||
|
InheritedPropertySheets=".\gtk+.vsprops"
|
||||||
|
ConfigurationType="4"
|
||||||
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="..\..\..\gdk;..\..\..\gdk\win32"
|
||||||
|
PreprocessorDefinitions="_DEBUG;$(GdkDefines);INSIDE_GDK_WIN32"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="3"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release|x64"
|
||||||
|
InheritedPropertySheets=".\gtk+.vsprops"
|
||||||
|
ConfigurationType="4"
|
||||||
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories="..\..\..\gdk;..\..\..\gdk\win32"
|
||||||
|
PreprocessorDefinitions="$(GdkDefines);INSIDE_GDK_WIN32"
|
||||||
|
RuntimeLibrary="2"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
</Configurations>
|
||||||
|
<References>
|
||||||
|
</References>
|
||||||
|
<Files>
|
||||||
|
<Filter
|
||||||
|
Name="Header Files"
|
||||||
|
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||||
|
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||||
|
>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Resource Files"
|
||||||
|
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
|
||||||
|
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||||
|
>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Source Files"
|
||||||
|
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||||
|
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||||
|
>
|
||||||
|
<File RelativePath="..\..\..\gdk\win32\gdkcursor-win32.c" />
|
||||||
|
<File RelativePath="..\..\..\gdk\win32\gdkdevice-win32.c" />
|
||||||
|
<File RelativePath="..\..\..\gdk\win32\gdkdevice-wintab.c" />
|
||||||
|
<File RelativePath="..\..\..\gdk\win32\gdkdevicemanager-win32.c" />
|
||||||
|
<File RelativePath="..\..\..\gdk\win32\gdkdisplay-win32.c" />
|
||||||
|
<File RelativePath="..\..\..\gdk\win32\gdkdnd-win32.c" />
|
||||||
|
<File RelativePath="..\..\..\gdk\win32\gdkevents-win32.c" />
|
||||||
|
<File RelativePath="..\..\..\gdk\win32\gdkgeometry-win32.c" />
|
||||||
|
<File RelativePath="..\..\..\gdk\win32\gdkglobals-win32.c" />
|
||||||
|
<File RelativePath="..\..\..\gdk\win32\gdkinput.c" />
|
||||||
|
<File RelativePath="..\..\..\gdk\win32\gdkkeys-win32.c" />
|
||||||
|
<File RelativePath="..\..\..\gdk\win32\gdkmain-win32.c" />
|
||||||
|
<File RelativePath="..\..\..\gdk\win32\gdkproperty-win32.c" />
|
||||||
|
<File RelativePath="..\..\..\gdk\win32\gdkscreen-win32.c" />
|
||||||
|
<File RelativePath="..\..\..\gdk\win32\gdkselection-win32.c" />
|
||||||
|
<File RelativePath="..\..\..\gdk\win32\gdktestutils-win32.c" />
|
||||||
|
<File RelativePath="..\..\..\gdk\win32\gdkvisual-win32.c" />
|
||||||
|
<File RelativePath="..\..\..\gdk\win32\gdkdisplaymanager-win32.c" />
|
||||||
|
<File RelativePath="..\..\..\gdk\win32\gdkwin32id.c" />
|
||||||
|
<File RelativePath="..\..\..\gdk\win32\gdkwindow-win32.c" />
|
||||||
|
</Filter>
|
||||||
|
</Files>
|
||||||
|
</VisualStudioProject>
|
222
build/win32/vs9/gdk.vcprojin
Normal file
@@ -0,0 +1,222 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<VisualStudioProject
|
||||||
|
ProjectType="Visual C++"
|
||||||
|
Version="9.00"
|
||||||
|
Name="gdk"
|
||||||
|
ProjectGUID="{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7}"
|
||||||
|
RootNamespace="gdk"
|
||||||
|
Keyword="Win32Proj"
|
||||||
|
TargetFrameworkVersion="0"
|
||||||
|
>
|
||||||
|
<Platforms>
|
||||||
|
<Platform
|
||||||
|
Name="Win32"
|
||||||
|
/>
|
||||||
|
<Platform
|
||||||
|
Name="x64"
|
||||||
|
/>
|
||||||
|
</Platforms>
|
||||||
|
<ToolFiles>
|
||||||
|
</ToolFiles>
|
||||||
|
<Configurations>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
InheritedPropertySheets=".\gtk+.vsprops"
|
||||||
|
ConfigurationType="2"
|
||||||
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="..\..\..\gdk;..\..\..\gdk\win32"
|
||||||
|
PreprocessorDefinitions="_DEBUG;$(GdkDefines)"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="2"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
DebugInformationFormat="4"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="imm32.lib"
|
||||||
|
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)-win32$(GtkDllSuffix).dll"
|
||||||
|
LinkIncremental="2"
|
||||||
|
ModuleDefinitionFile="$(IntDir)\gdk.def"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
SubSystem="2"
|
||||||
|
ImportLibrary="$(TargetDir)$(ProjectName)-win32-$(GtkApiVersion).lib"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release|Win32"
|
||||||
|
InheritedPropertySheets=".\gtk+.vsprops"
|
||||||
|
ConfigurationType="2"
|
||||||
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories="..\..\..\gdk;..\..\..\gdk\win32"
|
||||||
|
PreprocessorDefinitions="$(GdkDefines)"
|
||||||
|
RuntimeLibrary="2"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="imm32.lib"
|
||||||
|
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)-win32$(GtkDllSuffix).dll"
|
||||||
|
LinkIncremental="2"
|
||||||
|
ModuleDefinitionFile="$(IntDir)\gdk.def"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
SubSystem="2"
|
||||||
|
OptimizeReferences="2"
|
||||||
|
EnableCOMDATFolding="2"
|
||||||
|
ImportLibrary="$(TargetDir)$(ProjectName)-win32-$(GtkApiVersion).lib"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug|x64"
|
||||||
|
InheritedPropertySheets=".\gtk+.vsprops"
|
||||||
|
ConfigurationType="2"
|
||||||
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="..\..\..\gdk;..\..\..\gdk\win32"
|
||||||
|
PreprocessorDefinitions="_DEBUG;$(GdkDefines)"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="3"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="imm32.lib"
|
||||||
|
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)-win32$(GtkDllSuffix).dll"
|
||||||
|
LinkIncremental="2"
|
||||||
|
ModuleDefinitionFile="$(IntDir)\gdk.def"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
SubSystem="2"
|
||||||
|
ImportLibrary="$(TargetDir)$(ProjectName)-win32-$(GtkApiVersion).lib"
|
||||||
|
TargetMachine="17"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release|x64"
|
||||||
|
InheritedPropertySheets=".\gtk+.vsprops"
|
||||||
|
ConfigurationType="2"
|
||||||
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories="..\..\..\gdk;..\..\..\gdk\win32"
|
||||||
|
PreprocessorDefinitions="$(GdkDefines)"
|
||||||
|
RuntimeLibrary="2"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="imm32.lib"
|
||||||
|
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)-win32$(GtkDllSuffix).dll"
|
||||||
|
LinkIncremental="2"
|
||||||
|
ModuleDefinitionFile="$(IntDir)\gdk.def"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
SubSystem="2"
|
||||||
|
OptimizeReferences="2"
|
||||||
|
EnableCOMDATFolding="2"
|
||||||
|
ImportLibrary="$(TargetDir)$(ProjectName)-win32-$(GtkApiVersion).lib"
|
||||||
|
TargetMachine="17"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
</Configurations>
|
||||||
|
<References>
|
||||||
|
</References>
|
||||||
|
<Files>
|
||||||
|
<Filter
|
||||||
|
Name="Header Files"
|
||||||
|
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||||
|
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||||
|
>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Resource Files"
|
||||||
|
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
|
||||||
|
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\gdk\gdk.symbols"
|
||||||
|
>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
Description="Generating gdk.def"
|
||||||
|
CommandLine="$(GtkGenerateGdkDef)"
|
||||||
|
Outputs="$(IntDir)\gdk.def"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|x64"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
Description="Generating gdk.def"
|
||||||
|
CommandLine="$(GtkGenerateGdkDef)"
|
||||||
|
Outputs="$(IntDir)\gdk.def"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
Description="Generating gdk.def"
|
||||||
|
CommandLine="$(GtkGenerateGdkDef)"
|
||||||
|
Outputs="$(IntDir)\gdk.def"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|x64"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
Description="Generating gdk.def"
|
||||||
|
CommandLine="$(GtkGenerateGdkDef)"
|
||||||
|
Outputs="$(IntDir)\gdk.def"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
<File RelativePath="..\..\..\gdk\win32\rc\gdk.rc" />
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Source Files"
|
||||||
|
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||||
|
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||||
|
>
|
||||||
|
#include "libgdk.sourcefiles"
|
||||||
|
<File RelativePath="..\..\..\gdk\gdkkeynames.c" />
|
||||||
|
</Filter>
|
||||||
|
</Files>
|
||||||
|
</VisualStudioProject>
|
80
build/win32/vs9/gtk+.sln
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
Microsoft Visual Studio Solution File, Format Version 10.00
|
||||||
|
# Visual Studio 2008
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gdk-win32", "gdk-win32.vcproj", "{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FA}"
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gdk", "gdk.vcproj", "{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7}"
|
||||||
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FA} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FA}
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk", "gtk.vcproj", "{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5}"
|
||||||
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7}
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk-demo", "gtk-demo.vcproj", "{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FC}"
|
||||||
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7}
|
||||||
|
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5}
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "install", "install.vcproj", "{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}"
|
||||||
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7}
|
||||||
|
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5}
|
||||||
|
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FC} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FC}
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Win32 = Debug|Win32
|
||||||
|
Debug|x64 = Debug|x64
|
||||||
|
Release|Win32 = Release|Win32
|
||||||
|
Release|x64 = Release|x64
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7}.Release|x64.Build.0 = Release|x64
|
||||||
|
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FA}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FA}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FA}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FA}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FA}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FA}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FA}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FA}.Release|x64.Build.0 = Release|x64
|
||||||
|
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5}.Release|x64.Build.0 = Release|x64
|
||||||
|
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}.Release|x64.Build.0 = Release|x64
|
||||||
|
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FC}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FC}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FC}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FC}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FC}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FC}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FC}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FC}.Release|x64.Build.0 = Release|x64
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
362
build/win32/vs9/gtk+.vsprops
Normal file
@@ -0,0 +1,362 @@
|
|||||||
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
|
<VisualStudioPropertySheet
|
||||||
|
ProjectType="Visual C++"
|
||||||
|
Version="8.00"
|
||||||
|
Name="gtk+props"
|
||||||
|
OutputDirectory="$(SolutionDir)$(ConfigurationName)\$(PlatformName)\bin"
|
||||||
|
IntermediateDirectory="$(SolutionDir)$(ConfigurationName)\$(PlatformName)\obj"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories="..\..\..;$(GlibEtcInstallRoot)\lib\glib-2.0\include;$(GlibEtcInstallRoot)\include\glib-2.0;$(GlibEtcInstallRoot)\include;$(GlibEtcInstallRoot)\include\cairo;$(GlibEtcInstallRoot)\include\atk-1.0;$(GlibEtcInstallRoot)\include\pango-1.0;$(GlibEtcInstallRoot)\include\GdkPixbuf-2.0"
|
||||||
|
PreprocessorDefinitions="HAVE_CONFIG_H;G_DISABLE_DEPRECATED;G_DISABLE_SINGLE_INCLUDES;ATK_DISABLE_SINGLE_INCLUDES;GDK_PIXBUF_DISABLE_SINGLE_INCLUDES;GTK_DISABLE_SINGLE_INCLUDES"
|
||||||
|
ForcedIncludeFiles="msvc_recommended_pragmas.h"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="gdk_pixbuf-2.0.lib pangocairo-1.0.lib pango-1.0.lib cairo.lib gio-2.0.lib gmodule-2.0.lib gobject-2.0.lib glib-2.0.lib intl.lib"
|
||||||
|
AdditionalLibraryDirectories="$(GlibEtcInstallRoot)\lib"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
CommandLine="
|
||||||
|
if exist ..\..\..\config.h goto DONE_CONFIG_H

|
||||||
|
copy ..\..\..\config.h.win32 ..\..\..\config.h

|
||||||
|
:DONE_CONFIG_H

|
||||||
|
|
||||||
|
copy ..\..\..\gdk\gdkconfig.h.win32 ..\..\..\gdk\gdkconfig.h

|
||||||
|
"
|
||||||
|
/>
|
||||||
|
<UserMacro
|
||||||
|
Name="GtkApiVersion"
|
||||||
|
Value="3.0"
|
||||||
|
/>
|
||||||
|
<UserMacro
|
||||||
|
Name="GtkBinaryVersion"
|
||||||
|
Value="2.10.0"
|
||||||
|
/>
|
||||||
|
<UserMacro
|
||||||
|
Name="GtkDummyPrefix"
|
||||||
|
Value="/dummy"
|
||||||
|
/>
|
||||||
|
<UserMacro
|
||||||
|
Name="GtkPrefixDefine"
|
||||||
|
Value="GTK_PREFIX=\"$(GtkDummyPrefix)\""
|
||||||
|
/>
|
||||||
|
<UserMacro
|
||||||
|
Name="GdkDefines"
|
||||||
|
Value="GDK_COMPILATION;G_LOG_DOMAIN=\"Gdk\""
|
||||||
|
/>
|
||||||
|
<UserMacro
|
||||||
|
Name="GtkIncludedImmodulesDefines"
|
||||||
|
Value="INCLUDE_IM_am_et;INCLUDE_IM_cedilla;INCLUDE_IM_cyrillic_translit;INCLUDE_IM_ime;INCLUDE_IM_inuktitut;INCLUDE_IM_ipa;INCLUDE_IM_multipress;INCLUDE_IM_thai;INCLUDE_IM_ti_er;INCLUDE_IM_ti_et;INCLUDE_IM_viqr"
|
||||||
|
/>
|
||||||
|
<UserMacro
|
||||||
|
Name="GtkDefines"
|
||||||
|
Value="GTK_COMPILATION;G_LOG_DOMAIN=\"Gtk\";GTK_HOST=\"i686-pc-vs9\";GTK_PRINT_BACKENDS=\"file\";GTK_PRINT_PREVIEW_COMMAND=\"undefined-gtk-print-preview-command\";$(GtkIncludedImmodulesDefines);GTK_LIBDIR=\"$(GtkDummyPrefix)/lib\";GTK_DATADIR=\"$(GtkDummyPrefix)/share\"GTK_DATA_PREFIX=\"$(GtkDummyPrefix)\";GTK_SYSCONFDIR=\"$(GtkDummyPrefix)/etc\";MULTIPRESS_CONFDIR=\"$(GtkDummyPrefix)/etc/gtk-$(GtkApiVersion)\";MULTIPRESS_LOCALEDIR=\"$(GtkDummyPrefix)/share/locale\";GTK_VERSION=\"$(GtkVersion)/etc\";GTK_BINARY_VERSION=\"$(GtkBinaryVersion)/etc\";GDK_DISABLE_DEPRECATED"
|
||||||
|
/>
|
||||||
|
<UserMacro
|
||||||
|
Name="GtkDoInstall"
|
||||||
|
Value="
|
||||||
|
echo on

|
||||||
|
mkdir $(OutDir)\bin

|
||||||
|
copy $(ConfigurationName)\$(PlatformName)\bin\*.dll $(OutDir)\bin

|
||||||
|
|
||||||
|
mkdir $(OutDir)\bin\gtk3-demo

|
||||||
|
copy $(ConfigurationName)\$(PlatformName)\bin\*.exe $(OutDir)\bin\gtk3-demo

|
||||||
|
copy ..\..\..\demos\gtk-demo\*.c $(OutDir)\bin\gtk3-demo

|
||||||
|
copy ..\..\..\demos\gtk-demo\*.h $(OutDir)\bin\gtk3-demo

|
||||||
|
copy ..\..\..\demos\gtk-demo\*.ui $(OutDir)\bin\gtk3-demo

|
||||||
|
copy ..\..\..\demos\gtk-demo\*.jpg $(OutDir)\bin\gtk3-demo

|
||||||
|
copy ..\..\..\demos\gtk-demo\*.png $(OutDir)\bin\gtk3-demo

|
||||||
|
copy ..\..\..\demos\gtk-demo\*.gif $(OutDir)\bin\gtk3-demo

|
||||||
|
|
||||||
|
mkdir $(OutDir)\lib

|
||||||
|
copy $(ConfigurationName)\$(PlatformName)\bin\*-$(GtkApiVersion).lib $(OutDir)\lib

|
||||||
|
|
||||||
|
mkdir $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||||
|
copy ..\..\..\gdk\gdk.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||||
|
copy ..\..\..\gdk\gdkapplaunchcontext.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||||
|
copy ..\..\..\gdk\gdkcairo.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||||
|
copy ..\..\..\gdk\gdkcolor.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||||
|
copy ..\..\..\gdk\gdkcursor.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||||
|
copy ..\..\..\gdk\gdkdevice.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||||
|
copy ..\..\..\gdk\gdkdevicemanager.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||||
|
copy ..\..\..\gdk\gdkdisplay.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||||
|
copy ..\..\..\gdk\gdkdisplaymanager.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||||
|
copy ..\..\..\gdk\gdkdnd.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||||
|
copy ..\..\..\gdk\gdkenumtypes.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||||
|
copy ..\..\..\gdk\gdkevents.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||||
|
copy ..\..\..\gdk\gdkkeys.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||||
|
copy ..\..\..\gdk\gdkkeysyms.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||||
|
copy ..\..\..\gdk\gdkmain.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||||
|
copy ..\..\..\gdk\gdkpango.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||||
|
copy ..\..\..\gdk\gdkpixbuf.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||||
|
copy ..\..\..\gdk\gdkprivate.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||||
|
copy ..\..\..\gdk\gdkproperty.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||||
|
copy ..\..\..\gdk\gdkrectangle.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||||
|
copy ..\..\..\gdk\gdkrgba.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||||
|
copy ..\..\..\gdk\gdkscreen.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||||
|
copy ..\..\..\gdk\gdkselection.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||||
|
copy ..\..\..\gdk\gdktestutils.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||||
|
copy ..\..\..\gdk\gdkthreads.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||||
|
copy ..\..\..\gdk\gdktypes.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||||
|
copy ..\..\..\gdk\gdkvisual.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||||
|
copy ..\..\..\gdk\win32\gdkwin32.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||||
|
copy ..\..\..\gdk\gdkwindow.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||||
|
|
||||||
|
mkdir $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtk.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkaboutdialog.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkaccelgroup.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkaccelgroupprivate.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkaccellabel.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkaccelmap.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkaccessible.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkaction.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkactiongroup.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkactivatable.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkadjustment.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkalignment.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkappchooser.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkappchooserbutton.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkappchooserdialog.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkappchooserwidget.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkapplication.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkarrow.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkaspectframe.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkassistant.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkbbox.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkbin.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkbindings.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkbox.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkborder.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkbuildable.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkbuilder.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkbutton.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkcalendar.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkcellarea.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkcellareabox.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkcellareacontext.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkcelleditable.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkcelllayout.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkcellrenderer.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkcellrendereraccel.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkcellrenderercombo.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkcellrendererpixbuf.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkcellrendererprogress.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkcellrendererspin.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkcellrendererspinner.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkcellrenderertext.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkcellrenderertoggle.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkcellview.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkcheckbutton.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkcheckmenuitem.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkclipboard.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkcolorbutton.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkcolorsel.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkcolorseldialog.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkcombobox.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkcomboboxtext.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkcontainer.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkcssprovider.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkdebug.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkdialog.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkdnd.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkdrawingarea.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkeditable.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkentry.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkentrybuffer.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkentrycompletion.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkenums.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkeventbox.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkexpander.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkfilechooser.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkfilechooserbutton.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkfilechooserdialog.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkfilechooserwidget.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkfilefilter.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkfixed.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkfontbutton.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkfontsel.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkframe.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkgradient.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkgrid.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkhandlebox.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkhbbox.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkhbox.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkhpaned.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkhscale.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkhscrollbar.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkhseparator.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkhsv.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkiconfactory.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkicontheme.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkiconview.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkimage.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkimagemenuitem.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkimcontext.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkimcontextsimple.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkimmodule.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkimmulticontext.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkinfobar.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkinvisible.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtklabel.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtklayout.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtklinkbutton.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkliststore.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkmain.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkmenu.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkmenubar.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkmenuitem.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkmenushell.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkmenutoolbutton.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkmessagedialog.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkmisc.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkmodules.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkmountoperation.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtknotebook.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtknumerableicon.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkoffscreenwindow.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkorientable.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkpagesetup.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkpaned.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkpapersize.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkplug.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkprintcontext.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkprintoperation.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkprintoperationpreview.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkprintsettings.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkprivate.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkprogressbar.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkradioaction.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkradiobutton.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkradiomenuitem.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkradiotoolbutton.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkrange.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkrc.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkrecentaction.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkrecentchooser.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkrecentchooserdialog.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkrecentchoosermenu.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkrecentchooserwidget.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkrecentfilter.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkrecentmanager.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkscale.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkscalebutton.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkscrollable.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkscrollbar.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkscrolledwindow.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkselection.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkseparator.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkseparatormenuitem.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkseparatortoolitem.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtksettings.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkshow.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtksizegroup.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtksizerequest.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtksocket.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkspinbutton.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkspinner.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkstatusbar.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkstatusicon.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkstock.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkstyle.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkstylecontext.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkstyleproperties.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkstyleprovider.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkswitch.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtksymboliccolor.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtktable.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtktearoffmenuitem.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtktestutils.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtktextattributes.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtktextbuffer.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtktextbufferrichtext.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtktextchild.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtktextdisplay.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtktextiter.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtktextlayout.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtktextmark.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtktexttag.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtktexttagtable.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtktextview.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkthemingengine.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtktoggleaction.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtktogglebutton.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtktoggletoolbutton.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtktoolbar.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtktoolbutton.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtktoolitem.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtktoolitemgroup.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtktoolpalette.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtktoolshell.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtktooltip.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtktreednd.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtktreemodel.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtktreemodelfilter.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtktreemodelsort.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtktreeselection.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtktreesortable.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtktreestore.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtktreeview.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtktreeviewcolumn.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtktypebuiltins.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkuimanager.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkvbbox.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkvbox.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkversion.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkviewport.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkvolumebutton.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkvpaned.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkvscale.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkvscrollbar.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkvseparator.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkwidget.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkwidgetpath.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
copy ..\..\..\gtk\gtkwindow.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||||
|
|
||||||
|
copy ..\..\..\gdk\gdkconfig.h $(OutDir)\include\gtk-3.0\gdk

|
||||||
|
|
||||||
|
copy $(ConfigurationName)\$(PlatformName)\bin\*-$(GtkApiVersion).lib $(OutDir)\lib

|
||||||
|
"
|
||||||
|
/>
|
||||||
|
<UserMacro
|
||||||
|
Name="GtkGenerateGdkDef"
|
||||||
|
Value="echo EXPORTS >"$(IntDir)\gdk.def" && cl /EP -DGDK_WINDOWING_WIN32 -DALL_FILES -DG_GNUC_CONST= ..\..\..\gdk\gdk.symbols >>"$(IntDir)\gdk.def""
|
||||||
|
/>
|
||||||
|
<UserMacro
|
||||||
|
Name="GtkGenerateGtkDef"
|
||||||
|
Value="echo EXPORTS >"$(IntDir)\gtk.def" && cl /EP -DGDK_WINDOWING_WIN32 -DINCLUDE_VARIABLES -DG_OS_WIN32 -DALL_FILES -DG_GNUC_MALLOC= -DG_GNUC_CONST= -DG_GNUC_NULL_TERMINATED= -DG_GNUC_PRINTF=;G_GNUC_PRINTF ..\..\..\gtk\gtk.symbols >>"$(IntDir)\gtk.def""
|
||||||
|
/>
|
||||||
|
<UserMacro
|
||||||
|
Name="GtkLibtoolCompatibleDllPrefix"
|
||||||
|
Value="lib"
|
||||||
|
/>
|
||||||
|
<UserMacro
|
||||||
|
Name="GtkLibtoolCompatibleDllSuffix"
|
||||||
|
Value="-$(GtkApiVersion)-0"
|
||||||
|
/>
|
||||||
|
<UserMacro
|
||||||
|
Name="GtkSeparateVS9DllPrefix"
|
||||||
|
Value=""
|
||||||
|
/>
|
||||||
|
<UserMacro
|
||||||
|
Name="GtkSeparateVS9DllSuffix"
|
||||||
|
Value="-3-vs9"
|
||||||
|
/>
|
||||||
|
<!-- Change these two to GtkLibtoolCompatibleDllPrefix and
|
||||||
|
GtkLibtoolCompatibleDllSuffix if that is what you want -->
|
||||||
|
<UserMacro
|
||||||
|
Name="GtkDllPrefix"
|
||||||
|
Value="$(GtkSeparateVS9DllPrefix)"
|
||||||
|
/>
|
||||||
|
<UserMacro
|
||||||
|
Name="GtkDllSuffix"
|
||||||
|
Value="$(GtkSeparateVS9DllSuffix)"
|
||||||
|
/>
|
||||||
|
<UserMacro
|
||||||
|
Name="GlibEtcInstallRoot"
|
||||||
|
Value="..\..\..\..\..\vs9\$(PlatformName)"
|
||||||
|
/>
|
||||||
|
</VisualStudioPropertySheet>
|
212
build/win32/vs9/gtk-demo.vcproj
Normal file
@@ -0,0 +1,212 @@
|
|||||||
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
|
<VisualStudioProject
|
||||||
|
ProjectType="Visual C++"
|
||||||
|
Version="9.00"
|
||||||
|
Name="gtk-demo"
|
||||||
|
ProjectGUID="{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FC}"
|
||||||
|
RootNamespace="gtkdemo"
|
||||||
|
Keyword="Win32Proj"
|
||||||
|
TargetFrameworkVersion="131072"
|
||||||
|
>
|
||||||
|
<Platforms>
|
||||||
|
<Platform
|
||||||
|
Name="Win32"
|
||||||
|
/>
|
||||||
|
<Platform
|
||||||
|
Name="x64"
|
||||||
|
/>
|
||||||
|
</Platforms>
|
||||||
|
<ToolFiles>
|
||||||
|
</ToolFiles>
|
||||||
|
<Configurations>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
ConfigurationType="1"
|
||||||
|
InheritedPropertySheets=".\gtk+.vsprops"
|
||||||
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="..\..\..\gdk;..\..\..\gtk"
|
||||||
|
PreprocessorDefinitions="_DEBUG;$(GtkPrefixDefine)"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="2"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
DebugInformationFormat="4"
|
||||||
|
CompileAs="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies=""
|
||||||
|
LinkIncremental="2"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
SubSystem="1"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug|x64"
|
||||||
|
ConfigurationType="1"
|
||||||
|
InheritedPropertySheets=".\gtk+.vsprops"
|
||||||
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="..\..\..\gdk;..\..\..\gtk"
|
||||||
|
PreprocessorDefinitions="_DEBUG;$(GtkPrefixDefine)"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="3"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
CompileAs="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies=""
|
||||||
|
LinkIncremental="2"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
SubSystem="1"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
|
TargetMachine="17"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release|Win32"
|
||||||
|
ConfigurationType="1"
|
||||||
|
InheritedPropertySheets=".\gtk+.vsprops"
|
||||||
|
CharacterSet="2"
|
||||||
|
WholeProgramOptimization="1"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories="..\..\..\gdk;..\..\..\gtk"
|
||||||
|
PreprocessorDefinitions="$(GtkPrefixDefine)"
|
||||||
|
RuntimeLibrary="2"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
CompileAs="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies=""
|
||||||
|
LinkIncremental="1"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
SubSystem="1"
|
||||||
|
OptimizeReferences="2"
|
||||||
|
EnableCOMDATFolding="2"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release|x64"
|
||||||
|
ConfigurationType="1"
|
||||||
|
InheritedPropertySheets=".\gtk+.vsprops"
|
||||||
|
CharacterSet="2"
|
||||||
|
WholeProgramOptimization="1"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories="..\..\..\gdk;..\..\..\gtk"
|
||||||
|
PreprocessorDefinitions="$(GtkPrefixDefine)"
|
||||||
|
RuntimeLibrary="2"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
CompileAs="1"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies=""
|
||||||
|
LinkIncremental="1"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
SubSystem="1"
|
||||||
|
OptimizeReferences="2"
|
||||||
|
EnableCOMDATFolding="2"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
|
TargetMachine="17"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
</Configurations>
|
||||||
|
<References>
|
||||||
|
</References>
|
||||||
|
<Files>
|
||||||
|
<Filter
|
||||||
|
Name="Source Files"
|
||||||
|
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||||
|
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||||
|
>
|
||||||
|
<File RelativePath="..\..\..\demos\gtk-demo\appwindow.c" />
|
||||||
|
<File RelativePath="..\..\..\demos\gtk-demo\assistant.c" />
|
||||||
|
<File RelativePath="..\..\..\demos\gtk-demo\builder.c" />
|
||||||
|
<File RelativePath="..\..\..\demos\gtk-demo\button_box.c" />
|
||||||
|
<File RelativePath="..\..\..\demos\gtk-demo\changedisplay.c" />
|
||||||
|
<File RelativePath="..\..\..\demos\gtk-demo\clipboard.c" />
|
||||||
|
<File RelativePath="..\..\..\demos\gtk-demo\colorsel.c" />
|
||||||
|
<File RelativePath="..\..\..\demos\gtk-demo\combobox.c" />
|
||||||
|
<File RelativePath="..\..\..\demos\gtk-demo\dialog.c" />
|
||||||
|
<File RelativePath="..\..\..\demos\gtk-demo\drawingarea.c" />
|
||||||
|
<File RelativePath="..\..\..\demos\gtk-demo\editable_cells.c" />
|
||||||
|
<File RelativePath="..\..\..\demos\gtk-demo\entry_buffer.c" />
|
||||||
|
<File RelativePath="..\..\..\demos\gtk-demo\entry_completion.c" />
|
||||||
|
<File RelativePath="..\..\..\demos\gtk-demo\expander.c" />
|
||||||
|
<File RelativePath="..\..\..\demos\gtk-demo\hypertext.c" />
|
||||||
|
<File RelativePath="..\..\..\demos\gtk-demo\iconview.c" />
|
||||||
|
<File RelativePath="..\..\..\demos\gtk-demo\iconview_edit.c" />
|
||||||
|
<File RelativePath="..\..\..\demos\gtk-demo\images.c" />
|
||||||
|
<File RelativePath="..\..\..\demos\gtk-demo\infobar.c" />
|
||||||
|
<File RelativePath="..\..\..\demos\gtk-demo\links.c" />
|
||||||
|
<File RelativePath="..\..\..\demos\gtk-demo\list_store.c" />
|
||||||
|
<File RelativePath="..\..\..\demos\gtk-demo\main.c" />
|
||||||
|
<File RelativePath="..\..\..\demos\gtk-demo\menus.c" />
|
||||||
|
<File RelativePath="..\..\..\demos\gtk-demo\offscreen_window.c" />
|
||||||
|
<File RelativePath="..\..\..\demos\gtk-demo\offscreen_window2.c" />
|
||||||
|
<File RelativePath="..\..\..\demos\gtk-demo\panes.c" />
|
||||||
|
<File RelativePath="..\..\..\demos\gtk-demo\pickers.c" />
|
||||||
|
<File RelativePath="..\..\..\demos\gtk-demo\pixbufs.c" />
|
||||||
|
<File RelativePath="..\..\..\demos\gtk-demo\printing.c" />
|
||||||
|
<File RelativePath="..\..\..\demos\gtk-demo\rotated_text.c" />
|
||||||
|
<File RelativePath="..\..\..\demos\gtk-demo\search_entry.c" />
|
||||||
|
<File RelativePath="..\..\..\demos\gtk-demo\sizegroup.c" />
|
||||||
|
<File RelativePath="..\..\..\demos\gtk-demo\spinner.c" />
|
||||||
|
<File RelativePath="..\..\..\demos\gtk-demo\stock_browser.c" />
|
||||||
|
<File RelativePath="..\..\..\demos\gtk-demo\textscroll.c" />
|
||||||
|
<File RelativePath="..\..\..\demos\gtk-demo\textview.c" />
|
||||||
|
<File RelativePath="..\..\..\demos\gtk-demo\toolpalette.c" />
|
||||||
|
<File RelativePath="..\..\..\demos\gtk-demo\tree_store.c" />
|
||||||
|
<File RelativePath="..\..\..\demos\gtk-demo\ui_manager.c" />
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Header Files"
|
||||||
|
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||||
|
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||||
|
>
|
||||||
|
</Filter>
|
||||||
|
</Files>
|
||||||
|
<Globals>
|
||||||
|
</Globals>
|
||||||
|
</VisualStudioProject>
|
236
build/win32/vs9/gtk.vcprojin
Normal file
@@ -0,0 +1,236 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<VisualStudioProject
|
||||||
|
ProjectType="Visual C++"
|
||||||
|
Version="9.00"
|
||||||
|
Name="gtk"
|
||||||
|
ProjectGUID="{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5}"
|
||||||
|
RootNamespace="gtk"
|
||||||
|
Keyword="Win32Proj"
|
||||||
|
TargetFrameworkVersion="0"
|
||||||
|
>
|
||||||
|
<Platforms>
|
||||||
|
<Platform
|
||||||
|
Name="Win32"
|
||||||
|
/>
|
||||||
|
<Platform
|
||||||
|
Name="x64"
|
||||||
|
/>
|
||||||
|
</Platforms>
|
||||||
|
<ToolFiles>
|
||||||
|
</ToolFiles>
|
||||||
|
<Configurations>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
InheritedPropertySheets=".\gtk+.vsprops"
|
||||||
|
ConfigurationType="2"
|
||||||
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="..\..\..\gdk;..\..\..\gtk"
|
||||||
|
PreprocessorDefinitions="_DEBUG;$(GtkDefines)"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="2"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
DebugInformationFormat="4"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="atk-1.0.lib pangowin32-1.0.lib imm32.lib winspool.lib comctl32.lib"
|
||||||
|
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)-win32$(GtkDllSuffix).dll"
|
||||||
|
LinkIncremental="2"
|
||||||
|
ModuleDefinitionFile="$(IntDir)\gtk.def"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
SubSystem="2"
|
||||||
|
ImportLibrary="$(TargetDir)$(ProjectName)-win32-$(GtkApiVersion).lib"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release|Win32"
|
||||||
|
InheritedPropertySheets=".\gtk+.vsprops"
|
||||||
|
ConfigurationType="2"
|
||||||
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories="..\..\..\gdk;..\..\..\gdk\win32"
|
||||||
|
PreprocessorDefinitions="$(GtkDefines)"
|
||||||
|
RuntimeLibrary="2"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="atk-1.0.lib pangowin32-1.0.lib imm32.lib winspool.lib comctl32.lib"
|
||||||
|
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)-win32$(GtkDllSuffix).dll"
|
||||||
|
LinkIncremental="2"
|
||||||
|
ModuleDefinitionFile="$(IntDir)\gtk.def"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
SubSystem="2"
|
||||||
|
OptimizeReferences="2"
|
||||||
|
EnableCOMDATFolding="2"
|
||||||
|
ImportLibrary="$(TargetDir)$(ProjectName)-win32-$(GtkApiVersion).lib"
|
||||||
|
TargetMachine="1"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug|x64"
|
||||||
|
InheritedPropertySheets=".\gtk+.vsprops"
|
||||||
|
ConfigurationType="2"
|
||||||
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="..\..\..\gdk;..\..\..\gdk\win32"
|
||||||
|
PreprocessorDefinitions="_DEBUG;$(GtkDefines)"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="3"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="atk-1.0.lib pangowin32-1.0.lib imm32.lib winspool.lib comctl32.lib"
|
||||||
|
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)-win32$(GtkDllSuffix).dll"
|
||||||
|
LinkIncremental="2"
|
||||||
|
ModuleDefinitionFile="$(IntDir)\gtk.def"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
SubSystem="2"
|
||||||
|
ImportLibrary="$(TargetDir)$(ProjectName)-win32-$(GtkApiVersion).lib"
|
||||||
|
TargetMachine="17"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release|x64"
|
||||||
|
InheritedPropertySheets=".\gtk+.vsprops"
|
||||||
|
ConfigurationType="2"
|
||||||
|
CharacterSet="2"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories="..\..\..\gdk;..\..\..\gdk\win32"
|
||||||
|
PreprocessorDefinitions="$(GtkDefines)"
|
||||||
|
RuntimeLibrary="2"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
DebugInformationFormat="3"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLinkerTool"
|
||||||
|
AdditionalDependencies="atk-1.0.lib pangowin32-1.0.lib imm32.lib winspool.lib comctl32.lib"
|
||||||
|
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)-win32$(GtkDllSuffix).dll"
|
||||||
|
LinkIncremental="2"
|
||||||
|
ModuleDefinitionFile="$(IntDir)\gtk.def"
|
||||||
|
GenerateDebugInformation="true"
|
||||||
|
SubSystem="2"
|
||||||
|
OptimizeReferences="2"
|
||||||
|
EnableCOMDATFolding="2"
|
||||||
|
ImportLibrary="$(TargetDir)$(ProjectName)-win32-$(GtkApiVersion).lib"
|
||||||
|
TargetMachine="17"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
</Configurations>
|
||||||
|
<References>
|
||||||
|
</References>
|
||||||
|
<Files>
|
||||||
|
<Filter
|
||||||
|
Name="Header Files"
|
||||||
|
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||||
|
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||||
|
>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Resource Files"
|
||||||
|
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
|
||||||
|
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\..\gdk\gtk.symbols"
|
||||||
|
>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
Description="Generating gtk.def"
|
||||||
|
CommandLine="$(GtkGenerateGtkDef)"
|
||||||
|
Outputs="$(IntDir)\gtk.def"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|x64"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
Description="Generating gtk.def"
|
||||||
|
CommandLine="$(GtkGenerateGtkDef)"
|
||||||
|
Outputs="$(IntDir)\gtk.def"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
Description="Generating gtk.def"
|
||||||
|
CommandLine="$(GtkGenerateGtkDef)"
|
||||||
|
Outputs="$(IntDir)\gtk.def"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|x64"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
Description="Generating gtk.def"
|
||||||
|
CommandLine="$(GtkGenerateGtkDef)"
|
||||||
|
Outputs="$(IntDir)\gtk.def"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
<File RelativePath="..\..\..\gtk\gtk-win32.rc" />
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Source Files"
|
||||||
|
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||||
|
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||||
|
>
|
||||||
|
#include "libgtk.sourcefiles"
|
||||||
|
<File RelativePath="..\..\..\modules\input\gtkimcontextime.c" />
|
||||||
|
<File RelativePath="..\..\..\modules\input\gtkimcontextmultipress.c" />
|
||||||
|
<File RelativePath="..\..\..\modules\input\gtkimcontextthai.c" />
|
||||||
|
<File RelativePath="..\..\..\modules\input\imam-et.c" />
|
||||||
|
<File RelativePath="..\..\..\modules\input\imcedilla.c" />
|
||||||
|
<File RelativePath="..\..\..\modules\input\imcyrillic-translit.c" />
|
||||||
|
<File RelativePath="..\..\..\modules\input\imime.c" />
|
||||||
|
<File RelativePath="..\..\..\modules\input\iminuktitut.c" />
|
||||||
|
<File RelativePath="..\..\..\modules\input\imipa.c" />
|
||||||
|
<File RelativePath="..\..\..\modules\input\immultipress.c" />
|
||||||
|
<File RelativePath="..\..\..\modules\input\imthai.c" />
|
||||||
|
<File RelativePath="..\..\..\modules\input\imti-er.c" />
|
||||||
|
<File RelativePath="..\..\..\modules\input\imti-et.c" />
|
||||||
|
<File RelativePath="..\..\..\modules\input\imviqr.c" />
|
||||||
|
<File RelativePath="..\..\..\modules\input\thai-charprop.c" />
|
||||||
|
</Filter>
|
||||||
|
</Files>
|
||||||
|
</VisualStudioProject>
|
78
build/win32/vs9/install.vcproj
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
|
<VisualStudioProject
|
||||||
|
ProjectType="Visual C++"
|
||||||
|
Version="9.00"
|
||||||
|
Name="install"
|
||||||
|
ProjectGUID="{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}"
|
||||||
|
RootNamespace="install"
|
||||||
|
Keyword="Win32Proj"
|
||||||
|
TargetFrameworkVersion="131072"
|
||||||
|
>
|
||||||
|
<Platforms>
|
||||||
|
<Platform
|
||||||
|
Name="Win32"
|
||||||
|
/>
|
||||||
|
<Platform
|
||||||
|
Name="x64"
|
||||||
|
/>
|
||||||
|
</Platforms>
|
||||||
|
<ToolFiles>
|
||||||
|
</ToolFiles>
|
||||||
|
<Configurations>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
InheritedPropertySheets=".\gtk+.vsprops"
|
||||||
|
OutputDirectory="$(GlibEtcInstallRoot)"
|
||||||
|
|
||||||
|
ConfigurationType="10"
|
||||||
|
CharacterSet="2"
|
||||||
|
DeleteExtensionsOnClean=""
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
CommandLine="$(GtkDoInstall)"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Debug|x64"
|
||||||
|
InheritedPropertySheets=".\gtk+.vsprops"
|
||||||
|
OutputDirectory="$(GlibEtcInstallRoot)"
|
||||||
|
ConfigurationType="10"
|
||||||
|
CharacterSet="2"
|
||||||
|
DeleteExtensionsOnClean=""
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
CommandLine="$(GtkDoInstall)"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release|Win32"
|
||||||
|
InheritedPropertySheets=".\gtk+.vsprops"
|
||||||
|
OutputDirectory="$(GlibEtcInstallRoot)"
|
||||||
|
ConfigurationType="10"
|
||||||
|
CharacterSet="2"
|
||||||
|
WholeProgramOptimization="1"
|
||||||
|
DeleteExtensionsOnClean=""
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
CommandLine="$(GtkDoInstall)"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="Release|x64"
|
||||||
|
InheritedPropertySheets=".\gtk+.vsprops"
|
||||||
|
OutputDirectory="$(GlibEtcInstallRoot)"
|
||||||
|
ConfigurationType="10"
|
||||||
|
CharacterSet="2"
|
||||||
|
WholeProgramOptimization="1"
|
||||||
|
DeleteExtensionsOnClean=""
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
CommandLine="$(GtkDoInstall)"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
|
</Configurations>
|
||||||
|
</VisualStudioProject>
|
303
config.h.meson
@@ -1,303 +0,0 @@
|
|||||||
/* config.h.in. Generated from configure.ac by autoheader. */
|
|
||||||
|
|
||||||
/* always defined to indicate that i18n is enabled */
|
|
||||||
#define ENABLE_NLS 1
|
|
||||||
|
|
||||||
/* The prefix for our gettext translation domains. */
|
|
||||||
#mesondefine GETTEXT_PACKAGE
|
|
||||||
|
|
||||||
/* Disable deprecation warnings from glib */
|
|
||||||
#mesondefine GLIB_DISABLE_DEPRECATION_WARNINGS
|
|
||||||
|
|
||||||
/* Define the location where the catalogs will be installed */
|
|
||||||
#mesondefine GTK_LOCALEDIR
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `bind_textdomain_codeset' function. */
|
|
||||||
#mesondefine HAVE_BIND_TEXTDOMAIN_CODESET
|
|
||||||
|
|
||||||
/* Have the cloudproviders library */
|
|
||||||
#mesondefine HAVE_CLOUDPROVIDERS
|
|
||||||
|
|
||||||
/* define if we have colord */
|
|
||||||
#mesondefine HAVE_COLORD
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <crt_externs.h> header file. */
|
|
||||||
#mesondefine HAVE_CRT_EXTERNS_H
|
|
||||||
|
|
||||||
/* Define to 1 if CUPS 1.6 API is available */
|
|
||||||
#mesondefine HAVE_CUPS_API_1_6
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `dcgettext' function. */
|
|
||||||
#mesondefine HAVE_DCGETTEXT
|
|
||||||
|
|
||||||
/* Define to 1 if you have the declaration of `isinf', and to 0 if you don't.
|
|
||||||
*/
|
|
||||||
#mesondefine HAVE_DECL_ISINF
|
|
||||||
|
|
||||||
/* Define to 1 if you have the declaration of `isnan', and to 0 if you don't.
|
|
||||||
*/
|
|
||||||
#mesondefine HAVE_DECL_ISNAN
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
|
||||||
#mesondefine HAVE_DLFCN_H
|
|
||||||
|
|
||||||
/* Have the ffmpeg library */
|
|
||||||
#mesondefine HAVE_FFMPEG
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <ftw.h> header file. */
|
|
||||||
#mesondefine HAVE_FTW_H
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `getpagesize' function. */
|
|
||||||
#mesondefine HAVE_GETPAGESIZE
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `getresuid' function. */
|
|
||||||
#mesondefine HAVE_GETRESUID
|
|
||||||
|
|
||||||
/* Define if gio-unix is available */
|
|
||||||
#mesondefine HAVE_GIO_UNIX
|
|
||||||
|
|
||||||
/* Define if GStreamer support is available */
|
|
||||||
#mesondefine HAVE_GSTREAMER
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `httpGetAuthString' function. */
|
|
||||||
#mesondefine HAVE_HTTPGETAUTHSTRING
|
|
||||||
|
|
||||||
/* Define if cups http_t authstring field is accessible */
|
|
||||||
#mesondefine HAVE_HTTP_AUTHSTRING
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
|
||||||
#mesondefine HAVE_INTTYPES_H
|
|
||||||
|
|
||||||
/* Define to 1 if the system has the type `IPrintDialogCallback'. */
|
|
||||||
#mesondefine HAVE_IPRINTDIALOGCALLBACK
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <locale.h> header file. */
|
|
||||||
#mesondefine HAVE_LOCALE_H
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `lstat' function. */
|
|
||||||
#mesondefine HAVE_LSTAT
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `mallinfo' function. */
|
|
||||||
#mesondefine HAVE_MALLINFO
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <memory.h> header file. */
|
|
||||||
#mesondefine HAVE_MEMORY_H
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `mkstemp' function. */
|
|
||||||
#mesondefine HAVE_MKSTEMP
|
|
||||||
|
|
||||||
/* Define to 1 if you have a working `mmap' system call. */
|
|
||||||
#mesondefine HAVE_MMAP
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `nearbyint' function. */
|
|
||||||
#mesondefine HAVE_NEARBYINT
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `posix_fallocate' function. */
|
|
||||||
#mesondefine HAVE_POSIX_FALLOCATE
|
|
||||||
|
|
||||||
/* Have the Xrandr extension library */
|
|
||||||
#mesondefine HAVE_RANDR
|
|
||||||
|
|
||||||
/* Have the Xrandr 1.5 extension library */
|
|
||||||
#mesondefine HAVE_RANDR15
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `rint' function. */
|
|
||||||
#mesondefine HAVE_RINT
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `round' function. */
|
|
||||||
#mesondefine HAVE_ROUND
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `sincos' function. */
|
|
||||||
#mesondefine HAVE_SINCOS
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `log2` function */
|
|
||||||
#mesondefine HAVE_LOG2
|
|
||||||
|
|
||||||
/* Define to 1 if you ahve the `exp2` function */
|
|
||||||
#mesondefine HAVE_EXP2
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <stdint.h> header file. */
|
|
||||||
#mesondefine HAVE_STDINT_H
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
|
||||||
#mesondefine HAVE_STDLIB_H
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <strings.h> header file. */
|
|
||||||
#mesondefine HAVE_STRINGS_H
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <string.h> header file. */
|
|
||||||
#mesondefine HAVE_STRING_H
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <sys/mman.h> header file. */
|
|
||||||
#mesondefine HAVE_SYS_MMAN_H
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <sys/param.h> header file. */
|
|
||||||
#mesondefine HAVE_SYS_PARAM_H
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
|
||||||
#mesondefine HAVE_SYS_STAT_H
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <sys/time.h> header file. */
|
|
||||||
#mesondefine HAVE_SYS_TIME_H
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
|
||||||
#mesondefine HAVE_SYS_TYPES_H
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <unistd.h> header file. */
|
|
||||||
#mesondefine HAVE_UNISTD_H
|
|
||||||
|
|
||||||
/* Have the XCOMPOSITE X extension */
|
|
||||||
#mesondefine HAVE_XCOMPOSITE
|
|
||||||
|
|
||||||
/* Have the Xcursor library */
|
|
||||||
#mesondefine HAVE_XCURSOR
|
|
||||||
|
|
||||||
/* Have the XDAMAGE X extension */
|
|
||||||
#mesondefine HAVE_XDAMAGE
|
|
||||||
|
|
||||||
/* Have the XFIXES X extension */
|
|
||||||
#mesondefine HAVE_XFIXES
|
|
||||||
|
|
||||||
/* Define to 1 if XFree Xinerama is available */
|
|
||||||
#mesondefine HAVE_XFREE_XINERAMA
|
|
||||||
|
|
||||||
/* Have XGenericEvent */
|
|
||||||
#mesondefine HAVE_XGENERICEVENTS
|
|
||||||
|
|
||||||
/* Define to use XKB extension */
|
|
||||||
#mesondefine HAVE_XKB
|
|
||||||
|
|
||||||
/* Have the SYNC extension library */
|
|
||||||
#mesondefine HAVE_XSYNC
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `_lock_file' function */
|
|
||||||
#mesondefine HAVE__LOCK_FILE
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `flockfile' function */
|
|
||||||
#mesondefine HAVE_FLOCKFILE
|
|
||||||
|
|
||||||
/* Define if _NL_MEASUREMENT_MEASUREMENT is available */
|
|
||||||
#mesondefine HAVE__NL_MEASUREMENT_MEASUREMENT
|
|
||||||
|
|
||||||
/* Define if _NL_PAPER_HEIGHT is available */
|
|
||||||
#mesondefine HAVE__NL_PAPER_HEIGHT
|
|
||||||
|
|
||||||
/* Define if _NL_PAPER_WIDTH is available */
|
|
||||||
#mesondefine HAVE__NL_PAPER_WIDTH
|
|
||||||
|
|
||||||
/* Define if _NL_TIME_FIRST_WEEKDAY is available */
|
|
||||||
#mesondefine HAVE__NL_TIME_FIRST_WEEKDAY
|
|
||||||
|
|
||||||
/* Define to the sub-directory where libtool stores uninstalled libraries. */
|
|
||||||
#mesondefine LT_OBJDIR
|
|
||||||
|
|
||||||
/* Define if <X11/extensions/XIproto.h> needed for xReply */
|
|
||||||
#mesondefine NEED_XIPROTO_H_FOR_XREPLY
|
|
||||||
|
|
||||||
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
|
|
||||||
#mesondefine NO_MINUS_C_MINUS_O
|
|
||||||
|
|
||||||
/* Define to the address where bug reports for this package should be sent. */
|
|
||||||
#mesondefine PACKAGE_BUGREPORT
|
|
||||||
|
|
||||||
/* Define to the full name of this package. */
|
|
||||||
#mesondefine PACKAGE_NAME
|
|
||||||
|
|
||||||
/* Define to the full name and version of this package. */
|
|
||||||
#mesondefine PACKAGE_STRING
|
|
||||||
|
|
||||||
/* Define to the one symbol short name of this package. */
|
|
||||||
#mesondefine PACKAGE_TARNAME
|
|
||||||
|
|
||||||
/* Define to the home page for this package. */
|
|
||||||
#mesondefine PACKAGE_URL
|
|
||||||
|
|
||||||
/* Define to the version of this package. */
|
|
||||||
#mesondefine PACKAGE_VERSION
|
|
||||||
|
|
||||||
/* Use NSBundle functions to determine load paths for libraries, translations,
|
|
||||||
etc. */
|
|
||||||
#mesondefine QUARTZ_RELOCATION
|
|
||||||
|
|
||||||
/* Define to 1 if you have the ANSI C header files. */
|
|
||||||
#mesondefine STDC_HEADERS
|
|
||||||
|
|
||||||
/* Enable extensions on AIX 3, Interix. */
|
|
||||||
#ifndef _ALL_SOURCE
|
|
||||||
# undef _ALL_SOURCE
|
|
||||||
#endif
|
|
||||||
/* Enable GNU extensions on systems that have them. */
|
|
||||||
#ifndef _GNU_SOURCE
|
|
||||||
# undef _GNU_SOURCE
|
|
||||||
#endif
|
|
||||||
/* Enable threading extensions on Solaris. */
|
|
||||||
#ifndef _POSIX_PTHREAD_SEMANTICS
|
|
||||||
# undef _POSIX_PTHREAD_SEMANTICS
|
|
||||||
#endif
|
|
||||||
/* Enable extensions on HP NonStop. */
|
|
||||||
#ifndef _TANDEM_SOURCE
|
|
||||||
# undef _TANDEM_SOURCE
|
|
||||||
#endif
|
|
||||||
/* Enable general extensions on Solaris. */
|
|
||||||
#ifndef __EXTENSIONS__
|
|
||||||
# undef __EXTENSIONS__
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/* Define to 1 if XInput 2.0 is available */
|
|
||||||
#mesondefine XINPUT_2
|
|
||||||
|
|
||||||
/* Define to 1 if XInput 2.2 is available */
|
|
||||||
#mesondefine XINPUT_2_2
|
|
||||||
|
|
||||||
/* Define to 1 if the X Window System is missing or not being used. */
|
|
||||||
#mesondefine X_DISPLAY_MISSING
|
|
||||||
|
|
||||||
/* Enable large inode numbers on Mac OS X 10.5. */
|
|
||||||
#ifndef _DARWIN_USE_64_BIT_INODE
|
|
||||||
# define _DARWIN_USE_64_BIT_INODE 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Number of bits in a file offset, on hosts where this is settable. */
|
|
||||||
#mesondefine _FILE_OFFSET_BITS
|
|
||||||
|
|
||||||
/* defines how to decorate public symbols while building */
|
|
||||||
#mesondefine _GDK_EXTERN
|
|
||||||
|
|
||||||
/* Define for large files, on AIX-style hosts. */
|
|
||||||
#mesondefine _LARGE_FILES
|
|
||||||
|
|
||||||
/* Define to 1 if on MINIX. */
|
|
||||||
#mesondefine _MINIX
|
|
||||||
|
|
||||||
/* Define to 2 if the system does not provide POSIX.1 features except with
|
|
||||||
this defined. */
|
|
||||||
#mesondefine _POSIX_1_SOURCE
|
|
||||||
|
|
||||||
/* Define to 1 if you need to in order for `stat' and other things to work. */
|
|
||||||
#mesondefine _POSIX_SOURCE
|
|
||||||
|
|
||||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
|
||||||
#mesondefine gid_t
|
|
||||||
|
|
||||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
|
||||||
#mesondefine uid_t
|
|
||||||
|
|
||||||
/* Define to 1 if linux/memfd.h exists */
|
|
||||||
#mesondefine HAVE_LINUX_MEMFD_H
|
|
||||||
|
|
||||||
#mesondefine GTK_SYSCONFDIR
|
|
||||||
|
|
||||||
#mesondefine GTK_LOCALEDIR
|
|
||||||
|
|
||||||
#mesondefine GTK_DATADIR
|
|
||||||
|
|
||||||
#mesondefine GTK_LIBDIR
|
|
||||||
|
|
||||||
#mesondefine GTK_PRINT_BACKENDS
|
|
||||||
|
|
||||||
#mesondefine HAVE_HARFBUZZ
|
|
||||||
|
|
||||||
#mesondefine HAVE_PANGOFT
|
|
||||||
|
|
||||||
#mesondefine ISO_CODES_PREFIX
|
|
308
config.h.win32.in
Normal file
@@ -0,0 +1,308 @@
|
|||||||
|
/* config.h.win32.in. Merged from two versions generated by configure for gcc and MSVC. */
|
||||||
|
/* config.h. Generated from config.h.in by configure. */
|
||||||
|
/* config.h.in. Generated from configure.in by autoheader. */
|
||||||
|
|
||||||
|
/* always defined to indicate that i18n is enabled */
|
||||||
|
#define ENABLE_NLS 1
|
||||||
|
|
||||||
|
/* Define if gio can sniff image data */
|
||||||
|
/* #undef GDK_PIXBUF_USE_GIO_MIME */
|
||||||
|
|
||||||
|
/* The prefix for our gettext translation domains. */
|
||||||
|
#define GETTEXT_PACKAGE "@GETTEXT_PACKAGE@"
|
||||||
|
|
||||||
|
/* Define if debugging is enabled */
|
||||||
|
#define GTK_COMPILED_WITH_DEBUGGING "yes"
|
||||||
|
|
||||||
|
/* Define the location where the catalogs will be installed */
|
||||||
|
#define GTK_LOCALEDIR "NONE/share/locale"
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `bind_textdomain_codeset' function. */
|
||||||
|
#define HAVE_BIND_TEXTDOMAIN_CODESET 1
|
||||||
|
|
||||||
|
/* Is the wctype implementation broken */
|
||||||
|
/* #undef HAVE_BROKEN_WCTYPE */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <crt_externs.h> header file. */
|
||||||
|
/* #undef HAVE_CRT_EXTERNS_H */
|
||||||
|
|
||||||
|
/* Define to 1 if CUPS 1.2 API is available */
|
||||||
|
/* #undef HAVE_CUPS_API_1_2 */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `dcgettext' function. */
|
||||||
|
#define HAVE_DCGETTEXT 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||||
|
/* #undef HAVE_DLFCN_H */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `flockfile' function. */
|
||||||
|
/* #undef HAVE_FLOCKFILE */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <ftw.h> header file. */
|
||||||
|
/* #undef HAVE_FTW_H */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `getc_unlocked' function. */
|
||||||
|
/* #undef HAVE_GETC_UNLOCKED */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `getpagesize' function. */
|
||||||
|
#ifndef _MSC_VER
|
||||||
|
#define HAVE_GETPAGESIZE 1
|
||||||
|
#else
|
||||||
|
/* #undef HAVE_GETPAGESIZE */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `getresuid' function. */
|
||||||
|
/* #undef HAVE_GETRESUID */
|
||||||
|
|
||||||
|
/* Define if the GNU gettext() function is already present or preinstalled. */
|
||||||
|
#define HAVE_GETTEXT 1
|
||||||
|
|
||||||
|
/* Have GNU ftw */
|
||||||
|
/* #undef HAVE_GNU_FTW */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `httpGetAuthString' function. */
|
||||||
|
/* #undef HAVE_HTTPGETAUTHSTRING */
|
||||||
|
|
||||||
|
/* Define if cups http_t authstring field is accessible */
|
||||||
|
/* #undef HAVE_HTTP_AUTHSTRING */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||||
|
#ifndef _MSC_VER
|
||||||
|
#define HAVE_INTTYPES_H 1
|
||||||
|
#else
|
||||||
|
/* #undef HAVE_INTTYPES_H */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Define to 1 if ipc.h is available */
|
||||||
|
/* #undef HAVE_IPC_H */
|
||||||
|
|
||||||
|
/* Define if your <locale.h> file defines LC_MESSAGES. */
|
||||||
|
/* #undef HAVE_LC_MESSAGES */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <locale.h> header file. */
|
||||||
|
#define HAVE_LOCALE_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `localtime_r' function. */
|
||||||
|
/* #undef HAVE_LOCALTIME_R */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `lstat' function. */
|
||||||
|
/* #undef HAVE_LSTAT */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `mallinfo' function. */
|
||||||
|
/* #undef HAVE_MALLINFO */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <memory.h> header file. */
|
||||||
|
#define HAVE_MEMORY_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `mkstemp' function. */
|
||||||
|
/* #undef HAVE_MKSTEMP */
|
||||||
|
|
||||||
|
/* Define to 1 if you have a working `mmap' system call. */
|
||||||
|
/* #undef HAVE_MMAP */
|
||||||
|
|
||||||
|
/* Define to 1 if libpapi available */
|
||||||
|
/* #undef HAVE_PAPI */
|
||||||
|
|
||||||
|
/* Define to 1 is libjpeg supports progressive JPEG */
|
||||||
|
/* #undef HAVE_PROGRESSIVE_JPEG */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <pwd.h> header file. */
|
||||||
|
/* #undef HAVE_PWD_H */
|
||||||
|
|
||||||
|
/* Have the Xrandr extension library */
|
||||||
|
/* #undef HAVE_RANDR */
|
||||||
|
|
||||||
|
/* Define to 1 if shm.h is available */
|
||||||
|
/* #undef HAVE_SHM_H */
|
||||||
|
|
||||||
|
/* Define to 1 if sigsetjmp is available */
|
||||||
|
/* #undef HAVE_SIGSETJMP */
|
||||||
|
|
||||||
|
/* Have the sockaddr_un.sun_len member */
|
||||||
|
/* #undef HAVE_SOCKADDR_UN_SUN_LEN */
|
||||||
|
|
||||||
|
/* Define to 1 if solaris xinerama is available */
|
||||||
|
/* #undef HAVE_SOLARIS_XINERAMA */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <stdint.h> header file. */
|
||||||
|
#ifndef _MSC_VER
|
||||||
|
#define HAVE_STDINT_H 1
|
||||||
|
#else
|
||||||
|
/* #undef HAVE_STDINT_H */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||||
|
#define HAVE_STDLIB_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <strings.h> header file. */
|
||||||
|
#define HAVE_STRINGS_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <string.h> header file. */
|
||||||
|
#define HAVE_STRING_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if sys/select.h is available */
|
||||||
|
/* #undef HAVE_SYS_SELECT_H */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||||
|
#define HAVE_SYS_STAT_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if sys/sysinfo.h is available */
|
||||||
|
/* #undef HAVE_SYS_SYSINFO_H */
|
||||||
|
|
||||||
|
/* Define to 1 if sys/systeminfo.h is available */
|
||||||
|
/* #undef HAVE_SYS_SYSTEMINFO_H */
|
||||||
|
|
||||||
|
/* Define to 1 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
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||||
|
#define HAVE_SYS_TYPES_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
|
||||||
|
/* #undef HAVE_SYS_WAIT_H */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <unistd.h> header file. */
|
||||||
|
#ifndef _MSC_VER
|
||||||
|
#define HAVE_UNISTD_H 1
|
||||||
|
#else
|
||||||
|
/* #undef HAVE_UNISTD_H */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Have uxtheme.h include file */
|
||||||
|
#define HAVE_UXTHEME_H 1
|
||||||
|
|
||||||
|
/* Have wchar.h include file */
|
||||||
|
#define HAVE_WCHAR_H 1
|
||||||
|
|
||||||
|
/* Have wctype.h include file */
|
||||||
|
#define HAVE_WCTYPE_H 1
|
||||||
|
|
||||||
|
/* Define if we have X11R6 */
|
||||||
|
/* #undef HAVE_X11R6 */
|
||||||
|
|
||||||
|
/* Have the XCOMPOSITE X extension */
|
||||||
|
/* #undef HAVE_XCOMPOSITE */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `XConvertCase' function. */
|
||||||
|
/* #undef HAVE_XCONVERTCASE */
|
||||||
|
|
||||||
|
/* Have the Xcursor library */
|
||||||
|
/* #undef HAVE_XCURSOR */
|
||||||
|
|
||||||
|
/* Have the XDAMAGE X extension */
|
||||||
|
/* #undef HAVE_XDAMAGE */
|
||||||
|
|
||||||
|
/* Have the XFIXES X extension */
|
||||||
|
/* #undef HAVE_XFIXES */
|
||||||
|
|
||||||
|
/* Define to 1 if XFree Xinerama is available */
|
||||||
|
/* #undef HAVE_XFREE_XINERAMA */
|
||||||
|
|
||||||
|
/* Define to 1 if xinerama is available */
|
||||||
|
/* #undef HAVE_XINERAMA */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `XInternAtoms' function. */
|
||||||
|
/* #undef HAVE_XINTERNATOMS */
|
||||||
|
|
||||||
|
/* Define to use XKB extension */
|
||||||
|
/* #undef HAVE_XKB */
|
||||||
|
|
||||||
|
/* Define to 1 if xshm.h is available */
|
||||||
|
/* #undef HAVE_XSHM_H */
|
||||||
|
|
||||||
|
/* Have the SYNC extension library */
|
||||||
|
/* #undef HAVE_XSYNC */
|
||||||
|
|
||||||
|
/* Define if _NL_MEASUREMENT_MEASUREMENT is available */
|
||||||
|
/* #undef HAVE__NL_MEASUREMENT_MEASUREMENT */
|
||||||
|
|
||||||
|
/* Define if _NL_PAPER_HEIGHT is available */
|
||||||
|
/* #undef HAVE__NL_PAPER_HEIGHT */
|
||||||
|
|
||||||
|
/* Define if _NL_PAPER_WIDTH is available */
|
||||||
|
/* #undef HAVE__NL_PAPER_WIDTH */
|
||||||
|
|
||||||
|
/* Define if _NL_TIME_FIRST_WEEKDAY is available */
|
||||||
|
/* #undef HAVE__NL_TIME_FIRST_WEEKDAY */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `_NSGetEnviron' function. */
|
||||||
|
/* #undef HAVE__NSGETENVIRON */
|
||||||
|
|
||||||
|
/* Define to the sub-directory in which libtool stores uninstalled libraries.
|
||||||
|
*/
|
||||||
|
#define LT_OBJDIR ".libs/"
|
||||||
|
|
||||||
|
/* Define if <X11/extensions/XIproto.h> needed for xReply */
|
||||||
|
/* #undef NEED_XIPROTO_H_FOR_XREPLY */
|
||||||
|
|
||||||
|
/* Define to 1 if fd_set is not available */
|
||||||
|
#define NO_FD_SET 1
|
||||||
|
|
||||||
|
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
|
||||||
|
#ifndef _MSC_VER
|
||||||
|
/* #undef NO_MINUS_C_MINUS_O */
|
||||||
|
#else
|
||||||
|
#define NO_MINUS_C_MINUS_O 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Define to the address where bug reports for this package should be sent. */
|
||||||
|
#define PACKAGE_BUGREPORT "http://bugzilla.gnome.org/enter_bug.cgi?product=gtk%2B"
|
||||||
|
|
||||||
|
/* Define to the full name of this package. */
|
||||||
|
#define PACKAGE_NAME "gtk+"
|
||||||
|
|
||||||
|
/* Define to the full name and version of this package. */
|
||||||
|
#define PACKAGE_STRING "gtk+ @GTK_MAJOR_VERSION@.@GTK_MINOR_VERSION@.@GTK_MICRO_VERSION@"
|
||||||
|
|
||||||
|
/* Define to the one symbol short name of this package. */
|
||||||
|
#define PACKAGE_TARNAME "gtk+"
|
||||||
|
|
||||||
|
/* Define to the version of this package. */
|
||||||
|
#define PACKAGE_VERSION "@GTK_MAJOR_VERSION@.@GTK_MINOR_VERSION@.@GTK_MICRO_VERSION@"
|
||||||
|
|
||||||
|
/* Define as the return type of signal handlers (`int' or `void'). */
|
||||||
|
#define RETSIGTYPE void
|
||||||
|
|
||||||
|
/* Define to 1 if you have the ANSI C header files. */
|
||||||
|
#define STDC_HEADERS 1
|
||||||
|
|
||||||
|
/* Define to 1 if gmodule works and should be used */
|
||||||
|
#define USE_GMODULE 1
|
||||||
|
|
||||||
|
/* Whether to load modules via .la files rather than directly */
|
||||||
|
/* #undef USE_LA_MODULES */
|
||||||
|
|
||||||
|
/* Define to 1 if XXM is available and should be used */
|
||||||
|
#ifndef _MSC_VER
|
||||||
|
# define USE_MMX 1
|
||||||
|
#else
|
||||||
|
# undef USE_MMX
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Define to 1 if no XInput should be used */
|
||||||
|
/* #undef XINPUT_NONE */
|
||||||
|
|
||||||
|
/* Define to 1 if XFree XInput should be used */
|
||||||
|
/* #undef XINPUT_XFREE */
|
||||||
|
|
||||||
|
/* Define to 1 if the X Window System is missing or not being used. */
|
||||||
|
/* #undef X_DISPLAY_MISSING */
|
||||||
|
|
||||||
|
/* Number of bits in a file offset, on hosts where this is settable. */
|
||||||
|
/* #undef _FILE_OFFSET_BITS */
|
||||||
|
|
||||||
|
/* Define for large files, on AIX-style hosts. */
|
||||||
|
/* #undef _LARGE_FILES */
|
||||||
|
|
||||||
|
/* 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 to `int' if <sys/types.h> doesn't define. */
|
||||||
|
#define uid_t int
|
1684
configure.ac
Normal file
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
|
59
demos/Makefile.am
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
## Makefile.am for gtk+/demos
|
||||||
|
include $(top_srcdir)/Makefile.decl
|
||||||
|
|
||||||
|
SUBDIRS = gtk-demo
|
||||||
|
|
||||||
|
INCLUDES = \
|
||||||
|
-I$(top_srcdir) \
|
||||||
|
-I$(top_builddir)/gdk \
|
||||||
|
-DGDK_DISABLE_DEPRECATED \
|
||||||
|
-DGTK_DISABLE_DEPRECATED \
|
||||||
|
$(GTK_DEBUG_FLAGS) \
|
||||||
|
$(GTK_DEP_CFLAGS)
|
||||||
|
|
||||||
|
DEPS = \
|
||||||
|
$(top_builddir)/gtk/libgtk-3.la
|
||||||
|
|
||||||
|
LDADDS = \
|
||||||
|
$(top_builddir)/gtk/libgtk-3.la \
|
||||||
|
$(top_builddir)/gdk/libgdk-3.la \
|
||||||
|
$(GTK_DEP_LIBS) \
|
||||||
|
$(MATH_LIB)
|
||||||
|
|
||||||
|
noinst_PROGRAMS = \
|
||||||
|
testanimation \
|
||||||
|
testpixbuf-color \
|
||||||
|
testpixbuf-save \
|
||||||
|
testpixbuf-scale \
|
||||||
|
pixbuf-demo
|
||||||
|
|
||||||
|
testpixbuf_save_DEPENDENCIES = $(DEPS)
|
||||||
|
testpixbuf_color_DEPENDENCIES = $(DEPS)
|
||||||
|
testpixbuf_scale_DEPENDENCIES = $(DEPS)
|
||||||
|
testanimation_DEPENDENCIES = $(DEPS)
|
||||||
|
pixbuf_demo_DEPENDENCIES = $(DEPS)
|
||||||
|
|
||||||
|
testpixbuf_save_LDADD = $(LDADDS)
|
||||||
|
testpixbuf_color_LDADD = $(LDADDS)
|
||||||
|
testpixbuf_scale_LDADD = $(LDADDS)
|
||||||
|
testanimation_LDADD = $(LDADDS)
|
||||||
|
pixbuf_demo_LDADD = $(LDADDS)
|
||||||
|
|
||||||
|
testpixbuf_save_SOURCES = testpixbuf-save.c
|
||||||
|
testpixbuf_color_SOURCES = testpixbuf-color.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
|
||||||
|
|
||||||
|
-include $(top_srcdir)/git.mk
|
BIN
demos/apple-red.png
Normal file
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 |
106
demos/gtk-demo/Makefile.am
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
## Makefile.am for gtk+/demos
|
||||||
|
include $(top_srcdir)/Makefile.decl
|
||||||
|
|
||||||
|
democodedir=$(datadir)/gtk-$(GTK_API_VERSION)/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 = \
|
||||||
|
appwindow.c \
|
||||||
|
assistant.c \
|
||||||
|
builder.c \
|
||||||
|
button_box.c \
|
||||||
|
changedisplay.c \
|
||||||
|
clipboard.c \
|
||||||
|
colorsel.c \
|
||||||
|
combobox.c \
|
||||||
|
dialog.c \
|
||||||
|
drawingarea.c \
|
||||||
|
editable_cells.c \
|
||||||
|
entry_buffer.c \
|
||||||
|
entry_completion.c \
|
||||||
|
expander.c \
|
||||||
|
hypertext.c \
|
||||||
|
iconview.c \
|
||||||
|
iconview_edit.c \
|
||||||
|
images.c \
|
||||||
|
infobar.c \
|
||||||
|
links.c \
|
||||||
|
list_store.c \
|
||||||
|
menus.c \
|
||||||
|
offscreen_window.c \
|
||||||
|
offscreen_window2.c \
|
||||||
|
panes.c \
|
||||||
|
pickers.c \
|
||||||
|
pixbufs.c \
|
||||||
|
printing.c \
|
||||||
|
rotated_text.c \
|
||||||
|
search_entry.c \
|
||||||
|
sizegroup.c \
|
||||||
|
spinner.c \
|
||||||
|
stock_browser.c \
|
||||||
|
textview.c \
|
||||||
|
textscroll.c \
|
||||||
|
toolpalette.c \
|
||||||
|
tree_store.c \
|
||||||
|
ui_manager.c
|
||||||
|
|
||||||
|
INCLUDES = \
|
||||||
|
-DDEMOCODEDIR="\"$(democodedir)\"" \
|
||||||
|
-I$(top_srcdir) \
|
||||||
|
-I$(top_builddir)/gdk \
|
||||||
|
-DGDK_DISABLE_DEPRECATED \
|
||||||
|
-DGTK_DISABLE_DEPRECATED \
|
||||||
|
$(GTK_DEBUG_FLAGS) \
|
||||||
|
$(GTK_DEP_CFLAGS)
|
||||||
|
|
||||||
|
DEPS = \
|
||||||
|
$(top_builddir)/gtk/libgtk-3.la
|
||||||
|
|
||||||
|
LDADDS = \
|
||||||
|
$(top_builddir)/gtk/libgtk-3.la \
|
||||||
|
$(top_builddir)/gdk/libgdk-3.la \
|
||||||
|
$(GTK_DEP_LIBS) \
|
||||||
|
-lm
|
||||||
|
|
||||||
|
bin_PROGRAMS = gtk3-demo
|
||||||
|
|
||||||
|
BUILT_SOURCES = demos.h
|
||||||
|
|
||||||
|
EXTRA_DIST += \
|
||||||
|
$(IMAGEFILES) \
|
||||||
|
demo.ui
|
||||||
|
|
||||||
|
demos.h: @REBUILD@ $(demos) geninclude.pl
|
||||||
|
(here=`pwd` ; cd $(srcdir) && $(PERL) $$here/geninclude.pl $(demos)) > demos.h
|
||||||
|
|
||||||
|
gtk3_demo_SOURCES = \
|
||||||
|
$(demos) \
|
||||||
|
demo-common.h \
|
||||||
|
main.c \
|
||||||
|
demos.h
|
||||||
|
|
||||||
|
gtk3_demo_DEPENDENCIES = $(DEPS)
|
||||||
|
gtk3_demo_LDADD = $(LDADDS)
|
||||||
|
gtk3_demo_LDFLAGS = -export-dynamic
|
||||||
|
|
||||||
|
IMAGEFILES= alphatest.png \
|
||||||
|
apple-red.png \
|
||||||
|
background.jpg \
|
||||||
|
floppybuddy.gif \
|
||||||
|
gnome-applets.png \
|
||||||
|
gnome-calendar.png \
|
||||||
|
gnome-fs-directory.png \
|
||||||
|
gnome-fs-regular.png \
|
||||||
|
gnome-foot.png \
|
||||||
|
gnome-gimp.png \
|
||||||
|
gnome-gmush.png \
|
||||||
|
gnome-gsame.png \
|
||||||
|
gnu-keys.png \
|
||||||
|
gtk-logo-rgb.gif
|
||||||
|
|
||||||
|
democode_DATA = $(demos) $(IMAGEFILES) demo.ui
|
||||||
|
|
||||||
|
DISTCLEANFILES = demos.h
|
||||||
|
|
||||||
|
-include $(top_srcdir)/git.mk
|
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.7 KiB |
@@ -1,546 +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", "gtk4-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_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[] = {
|
|
||||||
{ "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,
|
|
||||||
const GtkAllocation *allocation,
|
|
||||||
int baseline)
|
|
||||||
{
|
|
||||||
DemoApplicationWindow *window = (DemoApplicationWindow *)widget;
|
|
||||||
|
|
||||||
GTK_WIDGET_CLASS (demo_application_window_parent_class)->size_allocate (widget, allocation,
|
|
||||||
baseline);
|
|
||||||
|
|
||||||
if (!window->maximized && !window->fullscreen)
|
|
||||||
gtk_window_get_size (GTK_WINDOW (window), &window->width, &window->height);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
surface_state_changed (GtkWidget *widget)
|
|
||||||
{
|
|
||||||
DemoApplicationWindow *window = (DemoApplicationWindow *)widget;
|
|
||||||
GdkSurfaceState new_state;
|
|
||||||
|
|
||||||
new_state = gdk_surface_get_state (gtk_widget_get_surface (widget));
|
|
||||||
window->maximized = (new_state & GDK_SURFACE_STATE_MAXIMIZED) != 0;
|
|
||||||
window->fullscreen = (new_state & GDK_SURFACE_STATE_FULLSCREEN) != 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
demo_application_window_realize (GtkWidget *widget)
|
|
||||||
{
|
|
||||||
GTK_WIDGET_CLASS (demo_application_window_parent_class)->realize (widget);
|
|
||||||
|
|
||||||
g_signal_connect_swapped (gtk_widget_get_surface (widget), "notify::state",
|
|
||||||
G_CALLBACK (surface_state_changed), widget);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
demo_application_window_unrealize (GtkWidget *widget)
|
|
||||||
{
|
|
||||||
g_signal_handlers_disconnect_by_func (gtk_widget_get_surface (widget),
|
|
||||||
surface_state_changed, widget);
|
|
||||||
|
|
||||||
GTK_WIDGET_CLASS (demo_application_window_parent_class)->unrealize (widget);
|
|
||||||
}
|
|
||||||
|
|
||||||
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->realize = demo_application_window_realize;
|
|
||||||
widget_class->unrealize = demo_application_window_unrealize;
|
|
||||||
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,112 +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">
|
|
||||||
<child>
|
|
||||||
<object class="GtkToolbar">
|
|
||||||
<property name="hexpand">1</property>
|
|
||||||
<style>
|
|
||||||
<class name="primary-toolbar"/>
|
|
||||||
</style>
|
|
||||||
<child>
|
|
||||||
<object class="GtkMenuToolButton" id="menutool">
|
|
||||||
<property name="icon-name">document-open</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkToolButton">
|
|
||||||
<property name="icon-name">application-exit</property>
|
|
||||||
<property name="action-name">app.quit</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkSeparatorToolItem">
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkToolButton">
|
|
||||||
<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="visible">0</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="hexpand">1</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child internal-child="action_area">
|
|
||||||
<object class="GtkBox">
|
|
||||||
<child>
|
|
||||||
<object class="GtkButton">
|
|
||||||
<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="shadow-type">in</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkTextView">
|
|
||||||
<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>
|
|
||||||
</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 ("./gtk4-demo-application" APP_EXTENSION, G_FILE_TEST_IS_EXECUTABLE))
|
|
||||||
command = "./gtk4-demo-application" APP_EXTENSION;
|
|
||||||
else
|
|
||||||
command = "gtk4-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>
|
|
572
demos/gtk-demo/appwindow.c
Normal file
@@ -0,0 +1,572 @@
|
|||||||
|
/* Application main window
|
||||||
|
*
|
||||||
|
* Demonstrates a typical application window with menubar, toolbar, statusbar.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <gtk/gtk.h>
|
||||||
|
#include "config.h"
|
||||||
|
#include "demo-common.h"
|
||||||
|
|
||||||
|
static GtkWidget *window = NULL;
|
||||||
|
static GtkWidget *infobar = NULL;
|
||||||
|
static GtkWidget *messagelabel = NULL;
|
||||||
|
|
||||||
|
static void
|
||||||
|
activate_action (GtkAction *action)
|
||||||
|
{
|
||||||
|
const gchar *name = gtk_action_get_name (action);
|
||||||
|
const gchar *typename = G_OBJECT_TYPE_NAME (action);
|
||||||
|
|
||||||
|
GtkWidget *dialog;
|
||||||
|
|
||||||
|
if (g_str_equal (name, "DarkTheme"))
|
||||||
|
{
|
||||||
|
gboolean value = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
|
||||||
|
GtkSettings *settings = gtk_settings_get_default ();
|
||||||
|
|
||||||
|
g_object_set (G_OBJECT (settings),
|
||||||
|
"gtk-application-prefer-dark-theme", value,
|
||||||
|
NULL);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
dialog = gtk_message_dialog_new (GTK_WINDOW (window),
|
||||||
|
GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||||
|
GTK_MESSAGE_INFO,
|
||||||
|
GTK_BUTTONS_CLOSE,
|
||||||
|
"You activated action: \"%s\" of type \"%s\"",
|
||||||
|
name, typename);
|
||||||
|
|
||||||
|
/* Close dialog on user response */
|
||||||
|
g_signal_connect (dialog,
|
||||||
|
"response",
|
||||||
|
G_CALLBACK (gtk_widget_destroy),
|
||||||
|
NULL);
|
||||||
|
|
||||||
|
gtk_widget_show (dialog);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
activate_radio_action (GtkAction *action, GtkRadioAction *current)
|
||||||
|
{
|
||||||
|
const gchar *name = gtk_action_get_name (GTK_ACTION (current));
|
||||||
|
const gchar *typename = G_OBJECT_TYPE_NAME (GTK_ACTION (current));
|
||||||
|
gboolean active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (current));
|
||||||
|
gint value = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (current));
|
||||||
|
|
||||||
|
if (active)
|
||||||
|
{
|
||||||
|
gchar *text;
|
||||||
|
|
||||||
|
text = g_strdup_printf ("You activated radio action: \"%s\" of type \"%s\".\n"
|
||||||
|
"Current value: %d",
|
||||||
|
name, typename, value);
|
||||||
|
gtk_label_set_text (GTK_LABEL (messagelabel), text);
|
||||||
|
gtk_info_bar_set_message_type (GTK_INFO_BAR (infobar), (GtkMessageType)value);
|
||||||
|
gtk_widget_show (infobar);
|
||||||
|
g_free (text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
about_cb (GtkAction *action,
|
||||||
|
GtkWidget *window)
|
||||||
|
{
|
||||||
|
GdkPixbuf *pixbuf, *transparent;
|
||||||
|
gchar *filename;
|
||||||
|
|
||||||
|
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
|
||||||
|
};
|
||||||
|
|
||||||
|
pixbuf = NULL;
|
||||||
|
transparent = NULL;
|
||||||
|
filename = demo_find_file ("gtk-logo-rgb.gif", NULL);
|
||||||
|
if (filename)
|
||||||
|
{
|
||||||
|
pixbuf = gdk_pixbuf_new_from_file (filename, NULL);
|
||||||
|
g_free (filename);
|
||||||
|
transparent = gdk_pixbuf_add_alpha (pixbuf, TRUE, 0xff, 0xff, 0xff);
|
||||||
|
g_object_unref (pixbuf);
|
||||||
|
}
|
||||||
|
|
||||||
|
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-2009 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", transparent,
|
||||||
|
"title", "About GTK+ Code Demos",
|
||||||
|
NULL);
|
||||||
|
|
||||||
|
g_object_unref (transparent);
|
||||||
|
}
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
GtkAction action;
|
||||||
|
} ToolMenuAction;
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
GtkActionClass parent_class;
|
||||||
|
} ToolMenuActionClass;
|
||||||
|
|
||||||
|
G_DEFINE_TYPE(ToolMenuAction, tool_menu_action, GTK_TYPE_ACTION)
|
||||||
|
|
||||||
|
static void
|
||||||
|
tool_menu_action_class_init (ToolMenuActionClass *class)
|
||||||
|
{
|
||||||
|
GTK_ACTION_CLASS (class)->toolbar_item_type = GTK_TYPE_MENU_TOOL_BUTTON;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
tool_menu_action_init (ToolMenuAction *action)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
static GtkActionEntry entries[] = {
|
||||||
|
{ "FileMenu", NULL, "_File" }, /* name, stock id, label */
|
||||||
|
{ "OpenMenu", NULL, "_Open" }, /* name, stock id, label */
|
||||||
|
{ "PreferencesMenu", NULL, "_Preferences" }, /* name, stock id, label */
|
||||||
|
{ "ColorMenu", NULL, "_Color" }, /* name, stock id, label */
|
||||||
|
{ "ShapeMenu", NULL, "_Shape" }, /* name, stock id, label */
|
||||||
|
{ "HelpMenu", NULL, "_Help" }, /* name, stock id, label */
|
||||||
|
{ "New", GTK_STOCK_NEW, /* name, stock id */
|
||||||
|
"_New", "<control>N", /* label, accelerator */
|
||||||
|
"Create a new file", /* tooltip */
|
||||||
|
G_CALLBACK (activate_action) },
|
||||||
|
{ "File1", NULL, /* name, stock id */
|
||||||
|
"File1", NULL, /* label, accelerator */
|
||||||
|
"Open first file", /* tooltip */
|
||||||
|
G_CALLBACK (activate_action) },
|
||||||
|
{ "Save", GTK_STOCK_SAVE, /* name, stock id */
|
||||||
|
"_Save","<control>S", /* label, accelerator */
|
||||||
|
"Save current file", /* tooltip */
|
||||||
|
G_CALLBACK (activate_action) },
|
||||||
|
{ "SaveAs", GTK_STOCK_SAVE, /* name, stock id */
|
||||||
|
"Save _As...", NULL, /* label, accelerator */
|
||||||
|
"Save to a file", /* tooltip */
|
||||||
|
G_CALLBACK (activate_action) },
|
||||||
|
{ "Quit", GTK_STOCK_QUIT, /* name, stock id */
|
||||||
|
"_Quit", "<control>Q", /* label, accelerator */
|
||||||
|
"Quit", /* tooltip */
|
||||||
|
G_CALLBACK (activate_action) },
|
||||||
|
{ "About", NULL, /* name, stock id */
|
||||||
|
"_About", "<control>A", /* label, accelerator */
|
||||||
|
"About", /* tooltip */
|
||||||
|
G_CALLBACK (about_cb) },
|
||||||
|
{ "Logo", "demo-gtk-logo", /* name, stock id */
|
||||||
|
NULL, NULL, /* label, accelerator */
|
||||||
|
"GTK+", /* tooltip */
|
||||||
|
G_CALLBACK (activate_action) },
|
||||||
|
};
|
||||||
|
static guint n_entries = G_N_ELEMENTS (entries);
|
||||||
|
|
||||||
|
|
||||||
|
static GtkToggleActionEntry toggle_entries[] = {
|
||||||
|
{ "Bold", GTK_STOCK_BOLD, /* name, stock id */
|
||||||
|
"_Bold", "<control>B", /* label, accelerator */
|
||||||
|
"Bold", /* tooltip */
|
||||||
|
G_CALLBACK (activate_action),
|
||||||
|
TRUE }, /* is_active */
|
||||||
|
{ "DarkTheme", NULL, /* name, stock id */
|
||||||
|
"_Prefer Dark Theme", NULL, /* label, accelerator */
|
||||||
|
"Prefer Dark Theme", /* tooltip */
|
||||||
|
G_CALLBACK (activate_action),
|
||||||
|
FALSE }, /* is_active */
|
||||||
|
};
|
||||||
|
static guint n_toggle_entries = G_N_ELEMENTS (toggle_entries);
|
||||||
|
|
||||||
|
enum {
|
||||||
|
COLOR_RED,
|
||||||
|
COLOR_GREEN,
|
||||||
|
COLOR_BLUE
|
||||||
|
};
|
||||||
|
|
||||||
|
static GtkRadioActionEntry color_entries[] = {
|
||||||
|
{ "Red", NULL, /* name, stock id */
|
||||||
|
"_Red", "<control>R", /* label, accelerator */
|
||||||
|
"Blood", COLOR_RED }, /* tooltip, value */
|
||||||
|
{ "Green", NULL, /* name, stock id */
|
||||||
|
"_Green", "<control>G", /* label, accelerator */
|
||||||
|
"Grass", COLOR_GREEN }, /* tooltip, value */
|
||||||
|
{ "Blue", NULL, /* name, stock id */
|
||||||
|
"_Blue", "<control>B", /* label, accelerator */
|
||||||
|
"Sky", COLOR_BLUE }, /* tooltip, value */
|
||||||
|
};
|
||||||
|
static guint n_color_entries = G_N_ELEMENTS (color_entries);
|
||||||
|
|
||||||
|
enum {
|
||||||
|
SHAPE_SQUARE,
|
||||||
|
SHAPE_RECTANGLE,
|
||||||
|
SHAPE_OVAL
|
||||||
|
};
|
||||||
|
|
||||||
|
static GtkRadioActionEntry shape_entries[] = {
|
||||||
|
{ "Square", NULL, /* name, stock id */
|
||||||
|
"_Square", "<control>S", /* label, accelerator */
|
||||||
|
"Square", SHAPE_SQUARE }, /* tooltip, value */
|
||||||
|
{ "Rectangle", NULL, /* name, stock id */
|
||||||
|
"_Rectangle", "<control>R", /* label, accelerator */
|
||||||
|
"Rectangle", SHAPE_RECTANGLE }, /* tooltip, value */
|
||||||
|
{ "Oval", NULL, /* name, stock id */
|
||||||
|
"_Oval", "<control>O", /* label, accelerator */
|
||||||
|
"Egg", SHAPE_OVAL }, /* tooltip, value */
|
||||||
|
};
|
||||||
|
static guint n_shape_entries = G_N_ELEMENTS (shape_entries);
|
||||||
|
|
||||||
|
static const gchar *ui_info =
|
||||||
|
"<ui>"
|
||||||
|
" <menubar name='MenuBar'>"
|
||||||
|
" <menu action='FileMenu'>"
|
||||||
|
" <menuitem action='New'/>"
|
||||||
|
" <menuitem action='Open'/>"
|
||||||
|
" <menuitem action='Save'/>"
|
||||||
|
" <menuitem action='SaveAs'/>"
|
||||||
|
" <separator/>"
|
||||||
|
" <menuitem action='Quit'/>"
|
||||||
|
" </menu>"
|
||||||
|
" <menu action='PreferencesMenu'>"
|
||||||
|
" <menuitem action='DarkTheme'/>"
|
||||||
|
" <menu action='ColorMenu'>"
|
||||||
|
" <menuitem action='Red'/>"
|
||||||
|
" <menuitem action='Green'/>"
|
||||||
|
" <menuitem action='Blue'/>"
|
||||||
|
" </menu>"
|
||||||
|
" <menu action='ShapeMenu'>"
|
||||||
|
" <menuitem action='Square'/>"
|
||||||
|
" <menuitem action='Rectangle'/>"
|
||||||
|
" <menuitem action='Oval'/>"
|
||||||
|
" </menu>"
|
||||||
|
" <menuitem action='Bold'/>"
|
||||||
|
" </menu>"
|
||||||
|
" <menu action='HelpMenu'>"
|
||||||
|
" <menuitem action='About'/>"
|
||||||
|
" </menu>"
|
||||||
|
" </menubar>"
|
||||||
|
" <toolbar name='ToolBar'>"
|
||||||
|
" <toolitem action='Open'>"
|
||||||
|
" <menu action='OpenMenu'>"
|
||||||
|
" <menuitem action='File1'/>"
|
||||||
|
" </menu>"
|
||||||
|
" </toolitem>"
|
||||||
|
" <toolitem action='Quit'/>"
|
||||||
|
" <separator action='Sep1'/>"
|
||||||
|
" <toolitem action='Logo'/>"
|
||||||
|
" </toolbar>"
|
||||||
|
"</ui>";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* 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 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 (pixbuf);
|
||||||
|
g_object_unref (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 (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)
|
||||||
|
{
|
||||||
|
if (!window)
|
||||||
|
{
|
||||||
|
GtkWidget *table;
|
||||||
|
GtkWidget *statusbar;
|
||||||
|
GtkWidget *contents;
|
||||||
|
GtkWidget *sw;
|
||||||
|
GtkWidget *bar;
|
||||||
|
GtkTextBuffer *buffer;
|
||||||
|
GtkActionGroup *action_group;
|
||||||
|
GtkAction *open_action;
|
||||||
|
GtkUIManager *merge;
|
||||||
|
GError *error = NULL;
|
||||||
|
|
||||||
|
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));
|
||||||
|
gtk_window_set_title (GTK_WINDOW (window), "Application Window");
|
||||||
|
gtk_window_set_icon_name (GTK_WINDOW (window), "document-open");
|
||||||
|
|
||||||
|
/* NULL window variable when window is closed */
|
||||||
|
g_signal_connect (window, "destroy",
|
||||||
|
G_CALLBACK (gtk_widget_destroyed),
|
||||||
|
&window);
|
||||||
|
|
||||||
|
table = gtk_table_new (1, 5, FALSE);
|
||||||
|
|
||||||
|
gtk_container_add (GTK_CONTAINER (window), table);
|
||||||
|
|
||||||
|
/* Create the menubar and toolbar
|
||||||
|
*/
|
||||||
|
|
||||||
|
action_group = gtk_action_group_new ("AppWindowActions");
|
||||||
|
open_action = g_object_new (tool_menu_action_get_type (),
|
||||||
|
"name", "Open",
|
||||||
|
"label", "_Open",
|
||||||
|
"tooltip", "Open a file",
|
||||||
|
"stock-id", GTK_STOCK_OPEN,
|
||||||
|
NULL);
|
||||||
|
gtk_action_group_add_action (action_group, open_action);
|
||||||
|
g_object_unref (open_action);
|
||||||
|
gtk_action_group_add_actions (action_group,
|
||||||
|
entries, n_entries,
|
||||||
|
window);
|
||||||
|
gtk_action_group_add_toggle_actions (action_group,
|
||||||
|
toggle_entries, n_toggle_entries,
|
||||||
|
NULL);
|
||||||
|
gtk_action_group_add_radio_actions (action_group,
|
||||||
|
color_entries, n_color_entries,
|
||||||
|
COLOR_RED,
|
||||||
|
G_CALLBACK (activate_radio_action),
|
||||||
|
NULL);
|
||||||
|
gtk_action_group_add_radio_actions (action_group,
|
||||||
|
shape_entries, n_shape_entries,
|
||||||
|
SHAPE_SQUARE,
|
||||||
|
G_CALLBACK (activate_radio_action),
|
||||||
|
NULL);
|
||||||
|
|
||||||
|
merge = gtk_ui_manager_new ();
|
||||||
|
g_object_set_data_full (G_OBJECT (window), "ui-manager", merge,
|
||||||
|
g_object_unref);
|
||||||
|
gtk_ui_manager_insert_action_group (merge, action_group, 0);
|
||||||
|
gtk_window_add_accel_group (GTK_WINDOW (window),
|
||||||
|
gtk_ui_manager_get_accel_group (merge));
|
||||||
|
|
||||||
|
if (!gtk_ui_manager_add_ui_from_string (merge, ui_info, -1, &error))
|
||||||
|
{
|
||||||
|
g_message ("building menus failed: %s", error->message);
|
||||||
|
g_error_free (error);
|
||||||
|
}
|
||||||
|
|
||||||
|
bar = gtk_ui_manager_get_widget (merge, "/MenuBar");
|
||||||
|
gtk_widget_show (bar);
|
||||||
|
gtk_table_attach (GTK_TABLE (table),
|
||||||
|
bar,
|
||||||
|
/* X direction */ /* Y direction */
|
||||||
|
0, 1, 0, 1,
|
||||||
|
GTK_EXPAND | GTK_FILL, 0,
|
||||||
|
0, 0);
|
||||||
|
|
||||||
|
bar = gtk_ui_manager_get_widget (merge, "/ToolBar");
|
||||||
|
gtk_widget_show (bar);
|
||||||
|
gtk_table_attach (GTK_TABLE (table),
|
||||||
|
bar,
|
||||||
|
/* X direction */ /* Y direction */
|
||||||
|
0, 1, 1, 2,
|
||||||
|
GTK_EXPAND | GTK_FILL, 0,
|
||||||
|
0, 0);
|
||||||
|
|
||||||
|
/* Create document
|
||||||
|
*/
|
||||||
|
|
||||||
|
infobar = gtk_info_bar_new ();
|
||||||
|
gtk_widget_set_no_show_all (infobar, TRUE);
|
||||||
|
messagelabel = gtk_label_new ("");
|
||||||
|
gtk_widget_show (messagelabel);
|
||||||
|
gtk_box_pack_start (GTK_BOX (gtk_info_bar_get_content_area (GTK_INFO_BAR (infobar))),
|
||||||
|
messagelabel,
|
||||||
|
TRUE, TRUE, 0);
|
||||||
|
gtk_info_bar_add_button (GTK_INFO_BAR (infobar),
|
||||||
|
GTK_STOCK_OK, GTK_RESPONSE_OK);
|
||||||
|
g_signal_connect (infobar, "response",
|
||||||
|
G_CALLBACK (gtk_widget_hide), NULL);
|
||||||
|
|
||||||
|
gtk_table_attach (GTK_TABLE (table),
|
||||||
|
infobar,
|
||||||
|
/* X direction */ /* Y direction */
|
||||||
|
0, 1, 2, 3,
|
||||||
|
GTK_EXPAND | GTK_FILL, 0,
|
||||||
|
0, 0);
|
||||||
|
|
||||||
|
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, 3, 4,
|
||||||
|
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_widget_grab_focus (contents);
|
||||||
|
|
||||||
|
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, 4, 5,
|
||||||
|
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_get_visible (window))
|
||||||
|
{
|
||||||
|
gtk_widget_show_all (window);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
gtk_widget_destroy (window);
|
||||||
|
window = NULL;
|
||||||
|
infobar = NULL;
|
||||||
|
messagelabel = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return window;
|
||||||
|
}
|
||||||
|
|
@@ -1,11 +1,12 @@
|
|||||||
/* Assistant
|
/* Assistant
|
||||||
*
|
*
|
||||||
* Demonstrates a sample multi-step assistant. Assistants are used to divide
|
* Demonstrates a sample multistep assistant. Assistants are used to divide
|
||||||
* an operation into several simpler sequential steps, and to guide the user
|
* an operation into several simpler sequential steps, and to guide the user
|
||||||
* through these steps.
|
* through these steps.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
|
#include "demo-common.h"
|
||||||
|
|
||||||
static GtkWidget *assistant = NULL;
|
static GtkWidget *assistant = NULL;
|
||||||
static GtkWidget *progress_bar = NULL;
|
static GtkWidget *progress_bar = NULL;
|
||||||
@@ -22,14 +23,13 @@ apply_changes_gradually (gpointer data)
|
|||||||
if (fraction < 1.0)
|
if (fraction < 1.0)
|
||||||
{
|
{
|
||||||
gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (progress_bar), fraction);
|
gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (progress_bar), fraction);
|
||||||
return G_SOURCE_CONTINUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Close automatically once changes are fully applied. */
|
/* Close automatically once changes are fully applied. */
|
||||||
gtk_widget_destroy (assistant);
|
gtk_widget_destroy (assistant);
|
||||||
assistant = NULL;
|
return FALSE;
|
||||||
return G_SOURCE_REMOVE;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -92,44 +92,57 @@ static void
|
|||||||
create_page1 (GtkWidget *assistant)
|
create_page1 (GtkWidget *assistant)
|
||||||
{
|
{
|
||||||
GtkWidget *box, *label, *entry;
|
GtkWidget *box, *label, *entry;
|
||||||
|
GdkPixbuf *pixbuf;
|
||||||
|
|
||||||
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
|
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:");
|
label = gtk_label_new ("You must fill out this entry to continue:");
|
||||||
gtk_box_pack_start (GTK_BOX (box), label);
|
gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 0);
|
||||||
|
|
||||||
entry = gtk_entry_new ();
|
entry = gtk_entry_new ();
|
||||||
gtk_entry_set_activates_default (GTK_ENTRY (entry), TRUE);
|
gtk_box_pack_start (GTK_BOX (box), entry, TRUE, TRUE, 0);
|
||||||
gtk_widget_set_valign (entry, GTK_ALIGN_CENTER);
|
|
||||||
gtk_box_pack_start (GTK_BOX (box), entry);
|
|
||||||
g_signal_connect (G_OBJECT (entry), "changed",
|
g_signal_connect (G_OBJECT (entry), "changed",
|
||||||
G_CALLBACK (on_entry_changed), assistant);
|
G_CALLBACK (on_entry_changed), assistant);
|
||||||
|
|
||||||
|
gtk_widget_show_all (box);
|
||||||
gtk_assistant_append_page (GTK_ASSISTANT (assistant), box);
|
gtk_assistant_append_page (GTK_ASSISTANT (assistant), box);
|
||||||
gtk_assistant_set_page_title (GTK_ASSISTANT (assistant), box, "Page 1");
|
gtk_assistant_set_page_title (GTK_ASSISTANT (assistant), box, "Page 1");
|
||||||
gtk_assistant_set_page_type (GTK_ASSISTANT (assistant), box, GTK_ASSISTANT_PAGE_INTRO);
|
gtk_assistant_set_page_type (GTK_ASSISTANT (assistant), box, GTK_ASSISTANT_PAGE_INTRO);
|
||||||
|
|
||||||
|
pixbuf = gtk_widget_render_icon_pixbuf (assistant, GTK_STOCK_DIALOG_INFO, GTK_ICON_SIZE_DIALOG);
|
||||||
|
gtk_assistant_set_page_header_image (GTK_ASSISTANT (assistant), box, pixbuf);
|
||||||
|
g_object_unref (pixbuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
create_page2 (GtkWidget *assistant)
|
create_page2 (GtkWidget *assistant)
|
||||||
{
|
{
|
||||||
GtkWidget *box, *checkbutton;
|
GtkWidget *box, *checkbutton;
|
||||||
|
GdkPixbuf *pixbuf;
|
||||||
|
|
||||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
|
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 "
|
checkbutton = gtk_check_button_new_with_label ("This is optional data, you may continue "
|
||||||
"even if you do not check this");
|
"even if you do not check this");
|
||||||
gtk_box_pack_start (GTK_BOX (box), checkbutton);
|
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_append_page (GTK_ASSISTANT (assistant), box);
|
||||||
gtk_assistant_set_page_complete (GTK_ASSISTANT (assistant), box, TRUE);
|
gtk_assistant_set_page_complete (GTK_ASSISTANT (assistant), box, TRUE);
|
||||||
gtk_assistant_set_page_title (GTK_ASSISTANT (assistant), box, "Page 2");
|
gtk_assistant_set_page_title (GTK_ASSISTANT (assistant), box, "Page 2");
|
||||||
|
|
||||||
|
pixbuf = gtk_widget_render_icon_pixbuf (assistant, GTK_STOCK_DIALOG_INFO, GTK_ICON_SIZE_DIALOG);
|
||||||
|
gtk_assistant_set_page_header_image (GTK_ASSISTANT (assistant), box, pixbuf);
|
||||||
|
g_object_unref (pixbuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
create_page3 (GtkWidget *assistant)
|
create_page3 (GtkWidget *assistant)
|
||||||
{
|
{
|
||||||
GtkWidget *label;
|
GtkWidget *label;
|
||||||
|
GdkPixbuf *pixbuf;
|
||||||
|
|
||||||
label = gtk_label_new ("This is a confirmation page, press 'Apply' to apply changes");
|
label = gtk_label_new ("This is a confirmation page, press 'Apply' to apply changes");
|
||||||
|
|
||||||
@@ -138,27 +151,30 @@ create_page3 (GtkWidget *assistant)
|
|||||||
gtk_assistant_set_page_type (GTK_ASSISTANT (assistant), label, GTK_ASSISTANT_PAGE_CONFIRM);
|
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_complete (GTK_ASSISTANT (assistant), label, TRUE);
|
||||||
gtk_assistant_set_page_title (GTK_ASSISTANT (assistant), label, "Confirmation");
|
gtk_assistant_set_page_title (GTK_ASSISTANT (assistant), label, "Confirmation");
|
||||||
|
|
||||||
|
pixbuf = gtk_widget_render_icon_pixbuf (assistant, GTK_STOCK_DIALOG_INFO, GTK_ICON_SIZE_DIALOG);
|
||||||
|
gtk_assistant_set_page_header_image (GTK_ASSISTANT (assistant), label, pixbuf);
|
||||||
|
g_object_unref (pixbuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
create_page4 (GtkWidget *assistant)
|
create_page4 (GtkWidget *assistant)
|
||||||
{
|
{
|
||||||
progress_bar = gtk_progress_bar_new ();
|
GtkWidget *page;
|
||||||
gtk_widget_set_halign (progress_bar, GTK_ALIGN_FILL);
|
|
||||||
gtk_widget_set_valign (progress_bar, GTK_ALIGN_CENTER);
|
|
||||||
gtk_widget_set_hexpand (progress_bar, TRUE);
|
|
||||||
gtk_widget_set_margin_start (progress_bar, 40);
|
|
||||||
gtk_widget_set_margin_end (progress_bar, 40);
|
|
||||||
|
|
||||||
gtk_widget_show (progress_bar);
|
page = gtk_alignment_new (0.5, 0.5, 0.5, 0.0);
|
||||||
gtk_assistant_append_page (GTK_ASSISTANT (assistant), progress_bar);
|
|
||||||
gtk_assistant_set_page_type (GTK_ASSISTANT (assistant), progress_bar, GTK_ASSISTANT_PAGE_PROGRESS);
|
progress_bar = gtk_progress_bar_new ();
|
||||||
gtk_assistant_set_page_title (GTK_ASSISTANT (assistant), progress_bar, "Applying changes");
|
gtk_container_add (GTK_CONTAINER (page), progress_bar);
|
||||||
|
|
||||||
|
gtk_widget_show_all (page);
|
||||||
|
gtk_assistant_append_page (GTK_ASSISTANT (assistant), page);
|
||||||
|
gtk_assistant_set_page_type (GTK_ASSISTANT (assistant), page, GTK_ASSISTANT_PAGE_PROGRESS);
|
||||||
|
gtk_assistant_set_page_title (GTK_ASSISTANT (assistant), page, "Applying changes");
|
||||||
|
|
||||||
/* This prevents the assistant window from being
|
/* This prevents the assistant window from being
|
||||||
* closed while we're "busy" applying changes.
|
* closed while we're "busy" applying changes. */
|
||||||
*/
|
gtk_assistant_set_page_complete (GTK_ASSISTANT (assistant), page, FALSE);
|
||||||
gtk_assistant_set_page_complete (GTK_ASSISTANT (assistant), progress_bar, FALSE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GtkWidget*
|
GtkWidget*
|
||||||
@@ -170,8 +186,8 @@ do_assistant (GtkWidget *do_widget)
|
|||||||
|
|
||||||
gtk_window_set_default_size (GTK_WINDOW (assistant), -1, 300);
|
gtk_window_set_default_size (GTK_WINDOW (assistant), -1, 300);
|
||||||
|
|
||||||
gtk_window_set_display (GTK_WINDOW (assistant),
|
gtk_window_set_screen (GTK_WINDOW (assistant),
|
||||||
gtk_widget_get_display (do_widget));
|
gtk_widget_get_screen (do_widget));
|
||||||
|
|
||||||
create_page1 (assistant);
|
create_page1 (assistant);
|
||||||
create_page2 (assistant);
|
create_page2 (assistant);
|
||||||
|
@@ -1,332 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<interface>
|
|
||||||
<requires lib="gtk+" version="3.20"/>
|
|
||||||
<object class="GtkWindow" id="window">
|
|
||||||
<property name="resizable">0</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="row-spacing">12</property>
|
|
||||||
<property name="column-spacing">12</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel">
|
|
||||||
<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="can-focus">1</property>
|
|
||||||
<property name="vexpand">1</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="halign">center</property>
|
|
||||||
<property name="hexpand">1</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="hexpand">1</property>
|
|
||||||
<property name="vexpand">1</property>
|
|
||||||
<property name="hhomogeneous">0</property>
|
|
||||||
<property name="vhomogeneous">0</property>
|
|
||||||
<property name="transition-type">crossfade</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkGrid">
|
|
||||||
<property name="halign">center</property>
|
|
||||||
<property name="valign">center</property>
|
|
||||||
<property name="vexpand">1</property>
|
|
||||||
<property name="row-spacing">12</property>
|
|
||||||
<property name="column-spacing">12</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel">
|
|
||||||
<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="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">
|
|
||||||
<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">
|
|
||||||
<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="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="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="halign">center</property>
|
|
||||||
<property name="valign">center</property>
|
|
||||||
<property name="vexpand">1</property>
|
|
||||||
<property name="row-spacing">12</property>
|
|
||||||
<property name="column-spacing">12</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel">
|
|
||||||
<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="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">
|
|
||||||
<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">
|
|
||||||
<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="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="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="halign">center</property>
|
|
||||||
<property name="valign">center</property>
|
|
||||||
<property name="hexpand">1</property>
|
|
||||||
<property name="vexpand">1</property>
|
|
||||||
<property name="row-spacing">6</property>
|
|
||||||
<property name="column-spacing">12</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkImage">
|
|
||||||
<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">
|
|
||||||
<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">
|
|
||||||
<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="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="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="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="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="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">
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
</interface>
|
|
Before Width: | Height: | Size: 788 B |
Before Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 10 KiB |
@@ -4,121 +4,65 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
|
#include "demo-common.h"
|
||||||
|
|
||||||
static void
|
static GtkBuilder *builder;
|
||||||
quit_activate (GSimpleAction *action,
|
|
||||||
GVariant *parameter,
|
G_MODULE_EXPORT void
|
||||||
gpointer user_data)
|
quit_activate (GtkAction *action)
|
||||||
{
|
{
|
||||||
GtkWidget *window = user_data;
|
GtkWidget *window;
|
||||||
|
|
||||||
|
window = GTK_WIDGET (gtk_builder_get_object (builder, "window1"));
|
||||||
gtk_widget_destroy (window);
|
gtk_widget_destroy (window);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
G_MODULE_EXPORT void
|
||||||
about_activate (GSimpleAction *action,
|
about_activate (GtkAction *action)
|
||||||
GVariant *parameter,
|
|
||||||
gpointer user_data)
|
|
||||||
{
|
{
|
||||||
GtkWidget *window = user_data;
|
|
||||||
GtkBuilder *builder;
|
|
||||||
GtkWidget *about_dlg;
|
GtkWidget *about_dlg;
|
||||||
|
|
||||||
builder = g_object_get_data (G_OBJECT (window), "builder");
|
|
||||||
about_dlg = GTK_WIDGET (gtk_builder_get_object (builder, "aboutdialog1"));
|
about_dlg = GTK_WIDGET (gtk_builder_get_object (builder, "aboutdialog1"));
|
||||||
gtk_dialog_run (GTK_DIALOG (about_dlg));
|
gtk_dialog_run (GTK_DIALOG (about_dlg));
|
||||||
gtk_widget_hide (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 *
|
GtkWidget *
|
||||||
do_builder (GtkWidget *do_widget)
|
do_builder (GtkWidget *do_widget)
|
||||||
{
|
{
|
||||||
static GtkWidget *window = NULL;
|
static GtkWidget *window = NULL;
|
||||||
GtkWidget *toolbar;
|
GError *err = NULL;
|
||||||
GActionGroup *actions;
|
gchar *filename;
|
||||||
GtkAccelGroup *accel_group;
|
|
||||||
GtkWidget *item;
|
|
||||||
|
|
||||||
if (!window)
|
if (!window)
|
||||||
{
|
{
|
||||||
GtkBuilder *builder;
|
builder = gtk_builder_new ();
|
||||||
|
filename = demo_find_file ("demo.ui", NULL);
|
||||||
builder = gtk_builder_new_from_resource ("/builder/demo.ui");
|
gtk_builder_add_from_file (builder, filename, &err);
|
||||||
|
g_free (filename);
|
||||||
|
if (err)
|
||||||
|
{
|
||||||
|
g_error ("ERROR: %s\n", err->message);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
gtk_builder_connect_signals (builder, NULL);
|
gtk_builder_connect_signals (builder, NULL);
|
||||||
window = GTK_WIDGET (gtk_builder_get_object (builder, "window1"));
|
window = GTK_WIDGET (gtk_builder_get_object (builder, "window1"));
|
||||||
gtk_window_set_display (GTK_WINDOW (window),
|
gtk_window_set_screen (GTK_WINDOW (window),
|
||||||
gtk_widget_get_display (do_widget));
|
gtk_widget_get_screen (do_widget));
|
||||||
g_signal_connect (window, "destroy",
|
g_signal_connect (window, "destroy",
|
||||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
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))
|
if (!gtk_widget_get_visible (window))
|
||||||
gtk_widget_show (window);
|
{
|
||||||
|
gtk_widget_show_all (window);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
gtk_widget_destroy (window);
|
gtk_widget_destroy (window);
|
||||||
|
window = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return window;
|
return window;
|
||||||
}
|
}
|
||||||
|
@@ -3,7 +3,6 @@
|
|||||||
* The Button Box widgets are used to arrange buttons with padding.
|
* The Button Box widgets are used to arrange buttons with padding.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <glib/gi18n.h>
|
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
static GtkWidget *
|
static GtkWidget *
|
||||||
@@ -23,20 +22,19 @@ create_bbox (gint horizontal,
|
|||||||
else
|
else
|
||||||
bbox = gtk_button_box_new (GTK_ORIENTATION_VERTICAL);
|
bbox = gtk_button_box_new (GTK_ORIENTATION_VERTICAL);
|
||||||
|
|
||||||
g_object_set (bbox, "margin", 5, NULL);
|
gtk_container_set_border_width (GTK_CONTAINER (bbox), 5);
|
||||||
|
|
||||||
gtk_container_add (GTK_CONTAINER (frame), bbox);
|
gtk_container_add (GTK_CONTAINER (frame), bbox);
|
||||||
|
|
||||||
gtk_button_box_set_layout (GTK_BUTTON_BOX (bbox), layout);
|
gtk_button_box_set_layout (GTK_BUTTON_BOX (bbox), layout);
|
||||||
gtk_box_set_spacing (GTK_BOX (bbox), spacing);
|
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);
|
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);
|
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);
|
gtk_container_add (GTK_CONTAINER (bbox), button);
|
||||||
|
|
||||||
return frame;
|
return frame;
|
||||||
@@ -55,73 +53,75 @@ do_button_box (GtkWidget *do_widget)
|
|||||||
if (!window)
|
if (!window)
|
||||||
{
|
{
|
||||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||||
gtk_window_set_display (GTK_WINDOW (window),
|
gtk_window_set_screen (GTK_WINDOW (window),
|
||||||
gtk_widget_get_display (do_widget));
|
gtk_widget_get_screen (do_widget));
|
||||||
gtk_window_set_title (GTK_WINDOW (window), "Button Boxes");
|
gtk_window_set_title (GTK_WINDOW (window), "Button Boxes");
|
||||||
|
|
||||||
g_signal_connect (window, "destroy",
|
g_signal_connect (window, "destroy",
|
||||||
G_CALLBACK (gtk_widget_destroyed),
|
G_CALLBACK (gtk_widget_destroyed),
|
||||||
&window);
|
&window);
|
||||||
|
|
||||||
|
gtk_container_set_border_width (GTK_CONTAINER (window), 10);
|
||||||
|
|
||||||
main_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
main_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||||
g_object_set (main_vbox, "margin", 10, NULL);
|
|
||||||
gtk_container_add (GTK_CONTAINER (window), main_vbox);
|
gtk_container_add (GTK_CONTAINER (window), main_vbox);
|
||||||
|
|
||||||
frame_horz = gtk_frame_new ("Horizontal Button Boxes");
|
frame_horz = gtk_frame_new ("Horizontal Button Boxes");
|
||||||
gtk_widget_set_margin_top (frame_horz, 10);
|
gtk_box_pack_start (GTK_BOX (main_vbox), frame_horz, TRUE, TRUE, 10);
|
||||||
gtk_widget_set_margin_bottom (frame_horz, 10);
|
|
||||||
gtk_box_pack_start (GTK_BOX (main_vbox), frame_horz);
|
|
||||||
|
|
||||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 10);
|
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||||
g_object_set (vbox, "margin", 10, NULL);
|
gtk_container_set_border_width (GTK_CONTAINER (vbox), 10);
|
||||||
gtk_container_add (GTK_CONTAINER (frame_horz), vbox);
|
gtk_container_add (GTK_CONTAINER (frame_horz), vbox);
|
||||||
|
|
||||||
gtk_box_pack_start (GTK_BOX (vbox),
|
gtk_box_pack_start (GTK_BOX (vbox),
|
||||||
create_bbox (TRUE, "Spread", 40, GTK_BUTTONBOX_SPREAD));
|
create_bbox (TRUE, "Spread", 40, GTK_BUTTONBOX_SPREAD),
|
||||||
|
TRUE, TRUE, 0);
|
||||||
|
|
||||||
gtk_box_pack_start (GTK_BOX (vbox),
|
gtk_box_pack_start (GTK_BOX (vbox),
|
||||||
create_bbox (TRUE, "Edge", 40, GTK_BUTTONBOX_EDGE));
|
create_bbox (TRUE, "Edge", 40, GTK_BUTTONBOX_EDGE),
|
||||||
|
TRUE, TRUE, 5);
|
||||||
|
|
||||||
gtk_box_pack_start (GTK_BOX (vbox),
|
gtk_box_pack_start (GTK_BOX (vbox),
|
||||||
create_bbox (TRUE, "Start", 40, GTK_BUTTONBOX_START));
|
create_bbox (TRUE, "Start", 40, GTK_BUTTONBOX_START),
|
||||||
|
TRUE, TRUE, 5);
|
||||||
|
|
||||||
gtk_box_pack_start (GTK_BOX (vbox),
|
gtk_box_pack_start (GTK_BOX (vbox),
|
||||||
create_bbox (TRUE, "End", 40, GTK_BUTTONBOX_END));
|
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));
|
|
||||||
|
|
||||||
gtk_box_pack_start (GTK_BOX (vbox),
|
|
||||||
create_bbox (TRUE, "Expand", 0, GTK_BUTTONBOX_EXPAND));
|
|
||||||
|
|
||||||
frame_vert = gtk_frame_new ("Vertical Button Boxes");
|
frame_vert = gtk_frame_new ("Vertical Button Boxes");
|
||||||
gtk_box_pack_start (GTK_BOX (main_vbox), frame_vert);
|
gtk_box_pack_start (GTK_BOX (main_vbox), frame_vert, TRUE, TRUE, 10);
|
||||||
|
|
||||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||||
g_object_set (hbox, "margin", 10, NULL);
|
gtk_container_set_border_width (GTK_CONTAINER (hbox), 10);
|
||||||
gtk_container_add (GTK_CONTAINER (frame_vert), hbox);
|
gtk_container_add (GTK_CONTAINER (frame_vert), hbox);
|
||||||
|
|
||||||
gtk_box_pack_start (GTK_BOX (hbox),
|
gtk_box_pack_start (GTK_BOX (hbox),
|
||||||
create_bbox (FALSE, "Spread", 10, GTK_BUTTONBOX_SPREAD));
|
create_bbox (FALSE, "Spread", 30, GTK_BUTTONBOX_SPREAD),
|
||||||
|
TRUE, TRUE, 0);
|
||||||
|
|
||||||
gtk_box_pack_start (GTK_BOX (hbox),
|
gtk_box_pack_start (GTK_BOX (hbox),
|
||||||
create_bbox (FALSE, "Edge", 10, GTK_BUTTONBOX_EDGE));
|
create_bbox (FALSE, "Edge", 30, GTK_BUTTONBOX_EDGE),
|
||||||
|
TRUE, TRUE, 5);
|
||||||
|
|
||||||
gtk_box_pack_start (GTK_BOX (hbox),
|
gtk_box_pack_start (GTK_BOX (hbox),
|
||||||
create_bbox (FALSE, "Start", 10, GTK_BUTTONBOX_START));
|
create_bbox (FALSE, "Start", 30, GTK_BUTTONBOX_START),
|
||||||
|
TRUE, TRUE, 5);
|
||||||
|
|
||||||
gtk_box_pack_start (GTK_BOX (hbox),
|
gtk_box_pack_start (GTK_BOX (hbox),
|
||||||
create_bbox (FALSE, "End", 10, GTK_BUTTONBOX_END));
|
create_bbox (FALSE, "End", 30, GTK_BUTTONBOX_END),
|
||||||
gtk_box_pack_start (GTK_BOX (hbox),
|
TRUE, TRUE, 5);
|
||||||
create_bbox (FALSE, "Center", 10, GTK_BUTTONBOX_CENTER));
|
|
||||||
gtk_box_pack_start (GTK_BOX (hbox),
|
|
||||||
create_bbox (FALSE, "Expand", 0, GTK_BUTTONBOX_EXPAND));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!gtk_widget_get_visible (window))
|
if (!gtk_widget_get_visible (window))
|
||||||
gtk_widget_show (window);
|
{
|
||||||
|
gtk_widget_show_all (window);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
gtk_widget_destroy (window);
|
gtk_widget_destroy (window);
|
||||||
|
window = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
return window;
|
return window;
|
||||||
}
|
}
|
||||||
|
Before Width: | Height: | Size: 1.1 KiB |
@@ -1,23 +1,24 @@
|
|||||||
/* Change Display
|
/* Change Display
|
||||||
*
|
*
|
||||||
* Demonstrates migrating a window between different displays.
|
* Demonstrates migrating a window between different displays and
|
||||||
* A display is a mouse and keyboard with some number of
|
* screens. A display is a mouse and keyboard with some number of
|
||||||
* associated monitors. The neat thing about having multiple
|
* associated monitors. A screen is a set of monitors grouped
|
||||||
* displays is that they can be on a completely separate
|
* into a single physical work area. 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
|
* computers, as long as there is a network connection to the
|
||||||
* computer where the application is running.
|
* computer where the application is running.
|
||||||
*
|
*
|
||||||
* Only some of the windowing systems where GTK+ runs have the
|
* Only some of the windowing systems where GTK+ runs have the
|
||||||
* concept of multiple displays. (The X Window System is the
|
* concept of multiple displays and screens. (The X Window System
|
||||||
* main example.) Other windowing systems can only handle one
|
* is the main example.) Other windowing systems can only
|
||||||
* keyboard and mouse, and combine all monitors into
|
* handle one keyboard and mouse, and combine all monitors into
|
||||||
* a single display.
|
* a single screen.
|
||||||
*
|
*
|
||||||
* This is a moderately complex example, and demonstrates:
|
* This is a moderately complex example, and demonstrates:
|
||||||
*
|
*
|
||||||
* - Tracking the currently open displays
|
* - Tracking the currently open displays and screens
|
||||||
*
|
*
|
||||||
* - Changing the display for a window
|
* - Changing the screen for a window
|
||||||
*
|
*
|
||||||
* - Letting the user choose a window by clicking on it
|
* - Letting the user choose a window by clicking on it
|
||||||
*
|
*
|
||||||
@@ -26,8 +27,11 @@
|
|||||||
* - Using GtkDialog
|
* - Using GtkDialog
|
||||||
*/
|
*/
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <glib/gi18n.h>
|
|
||||||
|
#undef GDK_DISABLE_DEPRECATED
|
||||||
|
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
|
#include "demo-common.h"
|
||||||
|
|
||||||
/* The ChangeDisplayInfo structure corresponds to a toplevel window and
|
/* The ChangeDisplayInfo structure corresponds to a toplevel window and
|
||||||
* holds pointers to widgets inside the toplevel window along with other
|
* holds pointers to widgets inside the toplevel window along with other
|
||||||
@@ -42,8 +46,11 @@ struct _ChangeDisplayInfo
|
|||||||
GtkSizeGroup *size_group;
|
GtkSizeGroup *size_group;
|
||||||
|
|
||||||
GtkTreeModel *display_model;
|
GtkTreeModel *display_model;
|
||||||
|
GtkTreeModel *screen_model;
|
||||||
|
GtkTreeSelection *screen_selection;
|
||||||
|
|
||||||
GdkDisplay *current_display;
|
GdkDisplay *current_display;
|
||||||
|
GdkScreen *current_screen;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* These enumerations provide symbolic names for the columns
|
/* These enumerations provide symbolic names for the columns
|
||||||
@@ -68,19 +75,18 @@ enum
|
|||||||
static GtkWidget *
|
static GtkWidget *
|
||||||
find_toplevel_at_pointer (GdkDisplay *display)
|
find_toplevel_at_pointer (GdkDisplay *display)
|
||||||
{
|
{
|
||||||
GdkSurface *pointer_window;
|
GdkWindow *pointer_window;
|
||||||
GtkWidget *widget = NULL;
|
GtkWidget *widget = NULL;
|
||||||
|
|
||||||
pointer_window = gdk_device_get_surface_at_position (gtk_get_current_event_device (),
|
pointer_window = gdk_display_get_window_at_pointer (display, NULL, NULL);
|
||||||
NULL, NULL);
|
|
||||||
|
|
||||||
/* The user data field of a GdkSurface is used to store a pointer
|
/* The user data field of a GdkWindow is used to store a pointer
|
||||||
* to the widget that created it.
|
* to the widget that created it.
|
||||||
*/
|
*/
|
||||||
if (pointer_window)
|
if (pointer_window)
|
||||||
{
|
{
|
||||||
gpointer widget_ptr;
|
gpointer widget_ptr;
|
||||||
gdk_surface_get_user_data (pointer_window, &widget_ptr);
|
gdk_window_get_user_data (pointer_window, &widget_ptr);
|
||||||
widget = widget_ptr;
|
widget = widget_ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -88,11 +94,10 @@ find_toplevel_at_pointer (GdkDisplay *display)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
release_event_cb (GtkWidget *widget,
|
button_release_event_cb (GtkWidget *widget,
|
||||||
GdkEvent *event,
|
GdkEventButton *event,
|
||||||
gboolean *clicked)
|
gboolean *clicked)
|
||||||
{
|
{
|
||||||
if (gdk_event_get_event_type (event) == GDK_BUTTON_RELEASE)
|
|
||||||
*clicked = TRUE;
|
*clicked = TRUE;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@@ -102,16 +107,16 @@ release_event_cb (GtkWidget *widget,
|
|||||||
* window under the pointer, or NULL, if there is none.
|
* window under the pointer, or NULL, if there is none.
|
||||||
*/
|
*/
|
||||||
static GtkWidget *
|
static GtkWidget *
|
||||||
query_for_toplevel (GdkDisplay *display,
|
query_for_toplevel (GdkScreen *screen,
|
||||||
const char *prompt)
|
const char *prompt)
|
||||||
{
|
{
|
||||||
|
GdkDisplay *display = gdk_screen_get_display (screen);
|
||||||
GtkWidget *popup, *label, *frame;
|
GtkWidget *popup, *label, *frame;
|
||||||
GdkCursor *cursor;
|
GdkCursor *cursor;
|
||||||
GtkWidget *toplevel = NULL;
|
GtkWidget *toplevel = NULL;
|
||||||
GdkDevice *device;
|
|
||||||
|
|
||||||
popup = gtk_window_new (GTK_WINDOW_POPUP);
|
popup = gtk_window_new (GTK_WINDOW_POPUP);
|
||||||
gtk_window_set_display (GTK_WINDOW (popup), display);
|
gtk_window_set_screen (GTK_WINDOW (popup), screen);
|
||||||
gtk_window_set_modal (GTK_WINDOW (popup), TRUE);
|
gtk_window_set_modal (GTK_WINDOW (popup), TRUE);
|
||||||
gtk_window_set_position (GTK_WINDOW (popup), GTK_WIN_POS_CENTER);
|
gtk_window_set_position (GTK_WINDOW (popup), GTK_WIN_POS_CENTER);
|
||||||
|
|
||||||
@@ -120,37 +125,38 @@ query_for_toplevel (GdkDisplay *display,
|
|||||||
gtk_container_add (GTK_CONTAINER (popup), frame);
|
gtk_container_add (GTK_CONTAINER (popup), frame);
|
||||||
|
|
||||||
label = gtk_label_new (prompt);
|
label = gtk_label_new (prompt);
|
||||||
g_object_set (label, "margin", 10, NULL);
|
gtk_misc_set_padding (GTK_MISC (label), 10, 10);
|
||||||
gtk_container_add (GTK_CONTAINER (frame), label);
|
gtk_container_add (GTK_CONTAINER (frame), label);
|
||||||
|
|
||||||
gtk_widget_show (popup);
|
gtk_widget_show_all (popup);
|
||||||
cursor = gdk_cursor_new_from_name ("crosshair", NULL);
|
cursor = gdk_cursor_new_for_display (display, GDK_CROSSHAIR);
|
||||||
device = gtk_get_current_event_device ();
|
|
||||||
|
|
||||||
if (gdk_seat_grab (gdk_device_get_seat (device),
|
if (gdk_pointer_grab (gtk_widget_get_window (popup), FALSE,
|
||||||
gtk_widget_get_surface (popup),
|
GDK_BUTTON_RELEASE_MASK,
|
||||||
GDK_SEAT_CAPABILITY_ALL_POINTING,
|
NULL,
|
||||||
FALSE, cursor, NULL, NULL, NULL) == GDK_GRAB_SUCCESS)
|
cursor,
|
||||||
|
GDK_CURRENT_TIME) == GDK_GRAB_SUCCESS)
|
||||||
{
|
{
|
||||||
gboolean clicked = FALSE;
|
gboolean clicked = FALSE;
|
||||||
|
|
||||||
g_signal_connect (popup, "event",
|
g_signal_connect (popup, "button-release-event",
|
||||||
G_CALLBACK (release_event_cb), &clicked);
|
G_CALLBACK (button_release_event_cb), &clicked);
|
||||||
|
|
||||||
/* Process events until clicked is set by our button release event handler.
|
/* Process events until clicked is set by button_release_event_cb.
|
||||||
* We pass in may_block=TRUE since we want to wait if there
|
* We pass in may_block=TRUE since we want to wait if there
|
||||||
* are no events currently.
|
* are no events currently.
|
||||||
*/
|
*/
|
||||||
while (!clicked)
|
while (!clicked)
|
||||||
g_main_context_iteration (NULL, TRUE);
|
g_main_context_iteration (NULL, TRUE);
|
||||||
|
|
||||||
toplevel = find_toplevel_at_pointer (display);
|
toplevel = find_toplevel_at_pointer (gdk_screen_get_display (screen));
|
||||||
if (toplevel == popup)
|
if (toplevel == popup)
|
||||||
toplevel = NULL;
|
toplevel = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_object_unref (cursor);
|
g_object_unref (cursor);
|
||||||
gtk_widget_destroy (popup);
|
gtk_widget_destroy (popup);
|
||||||
|
gdk_flush (); /* Really release the grab */
|
||||||
|
|
||||||
return toplevel;
|
return toplevel;
|
||||||
}
|
}
|
||||||
@@ -161,17 +167,46 @@ query_for_toplevel (GdkDisplay *display,
|
|||||||
static void
|
static void
|
||||||
query_change_display (ChangeDisplayInfo *info)
|
query_change_display (ChangeDisplayInfo *info)
|
||||||
{
|
{
|
||||||
GdkDisplay *display = gtk_widget_get_display (info->window);
|
GdkScreen *screen = gtk_widget_get_screen (info->window);
|
||||||
GtkWidget *toplevel;
|
GtkWidget *toplevel;
|
||||||
|
|
||||||
toplevel = query_for_toplevel (display,
|
toplevel = query_for_toplevel (screen,
|
||||||
"Please select the toplevel\n"
|
"Please select the toplevel\n"
|
||||||
"to move to the new display");
|
"to move to the new screen");
|
||||||
|
|
||||||
if (toplevel)
|
if (toplevel)
|
||||||
gtk_window_set_display (GTK_WINDOW (toplevel), info->current_display);
|
gtk_window_set_screen (GTK_WINDOW (toplevel), info->current_screen);
|
||||||
else
|
else
|
||||||
gdk_display_beep (display);
|
gdk_display_beep (gdk_screen_get_display (screen));
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Fills in the screen list based on the current display
|
||||||
|
*/
|
||||||
|
static void
|
||||||
|
fill_screens (ChangeDisplayInfo *info)
|
||||||
|
{
|
||||||
|
gtk_list_store_clear (GTK_LIST_STORE (info->screen_model));
|
||||||
|
|
||||||
|
if (info->current_display)
|
||||||
|
{
|
||||||
|
gint n_screens = gdk_display_get_n_screens (info->current_display);
|
||||||
|
gint i;
|
||||||
|
|
||||||
|
for (i = 0; i < n_screens; i++)
|
||||||
|
{
|
||||||
|
GdkScreen *screen = gdk_display_get_screen (info->current_display, i);
|
||||||
|
GtkTreeIter iter;
|
||||||
|
|
||||||
|
gtk_list_store_append (GTK_LIST_STORE (info->screen_model), &iter);
|
||||||
|
gtk_list_store_set (GTK_LIST_STORE (info->screen_model), &iter,
|
||||||
|
SCREEN_COLUMN_NUMBER, i,
|
||||||
|
SCREEN_COLUMN_SCREEN, screen,
|
||||||
|
-1);
|
||||||
|
|
||||||
|
if (i == 0)
|
||||||
|
gtk_tree_selection_select_iter (info->screen_selection, &iter);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Called when the user clicks on a button in our dialog or
|
/* Called when the user clicks on a button in our dialog or
|
||||||
@@ -207,8 +242,8 @@ open_display_cb (GtkWidget *button,
|
|||||||
dialog = gtk_dialog_new_with_buttons ("Open Display",
|
dialog = gtk_dialog_new_with_buttons ("Open Display",
|
||||||
GTK_WINDOW (info->window),
|
GTK_WINDOW (info->window),
|
||||||
GTK_DIALOG_MODAL,
|
GTK_DIALOG_MODAL,
|
||||||
_("_Cancel"), GTK_RESPONSE_CANCEL,
|
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
|
||||||
_("_OK"), GTK_RESPONSE_OK,
|
GTK_STOCK_OK, GTK_RESPONSE_OK,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
|
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
|
||||||
@@ -223,6 +258,7 @@ open_display_cb (GtkWidget *button,
|
|||||||
gtk_container_add (GTK_CONTAINER (content_area), display_entry);
|
gtk_container_add (GTK_CONTAINER (content_area), display_entry);
|
||||||
|
|
||||||
gtk_widget_grab_focus (display_entry);
|
gtk_widget_grab_focus (display_entry);
|
||||||
|
gtk_widget_show_all (gtk_bin_get_child (GTK_BIN (dialog)));
|
||||||
|
|
||||||
while (!result)
|
while (!result)
|
||||||
{
|
{
|
||||||
@@ -282,6 +318,28 @@ display_changed_cb (GtkTreeSelection *selection,
|
|||||||
-1);
|
-1);
|
||||||
else
|
else
|
||||||
info->current_display = NULL;
|
info->current_display = NULL;
|
||||||
|
|
||||||
|
fill_screens (info);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Called when the selected row in the sceen list changes.
|
||||||
|
* Updates info->current_screen.
|
||||||
|
*/
|
||||||
|
static void
|
||||||
|
screen_changed_cb (GtkTreeSelection *selection,
|
||||||
|
ChangeDisplayInfo *info)
|
||||||
|
{
|
||||||
|
GtkTreeModel *model;
|
||||||
|
GtkTreeIter iter;
|
||||||
|
|
||||||
|
if (info->current_screen)
|
||||||
|
g_object_unref (info->current_screen);
|
||||||
|
if (gtk_tree_selection_get_selected (selection, &model, &iter))
|
||||||
|
gtk_tree_model_get (model, &iter,
|
||||||
|
SCREEN_COLUMN_SCREEN, &info->current_screen,
|
||||||
|
-1);
|
||||||
|
else
|
||||||
|
info->current_screen = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This function is used both for creating the "Display" and
|
/* This function is used both for creating the "Display" and
|
||||||
@@ -303,7 +361,7 @@ create_frame (ChangeDisplayInfo *info,
|
|||||||
*frame = gtk_frame_new (title);
|
*frame = gtk_frame_new (title);
|
||||||
|
|
||||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
|
||||||
g_object_set (hbox, "margin", 8, NULL);
|
gtk_container_set_border_width (GTK_CONTAINER (hbox), 8);
|
||||||
gtk_container_add (GTK_CONTAINER (*frame), hbox);
|
gtk_container_add (GTK_CONTAINER (*frame), hbox);
|
||||||
|
|
||||||
scrollwin = gtk_scrolled_window_new (NULL, NULL);
|
scrollwin = gtk_scrolled_window_new (NULL, NULL);
|
||||||
@@ -311,7 +369,7 @@ create_frame (ChangeDisplayInfo *info,
|
|||||||
GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
|
GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
|
||||||
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrollwin),
|
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrollwin),
|
||||||
GTK_SHADOW_IN);
|
GTK_SHADOW_IN);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), scrollwin);
|
gtk_box_pack_start (GTK_BOX (hbox), scrollwin, TRUE, TRUE, 0);
|
||||||
|
|
||||||
*tree_view = gtk_tree_view_new ();
|
*tree_view = gtk_tree_view_new ();
|
||||||
gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (*tree_view), FALSE);
|
gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (*tree_view), FALSE);
|
||||||
@@ -321,7 +379,7 @@ create_frame (ChangeDisplayInfo *info,
|
|||||||
gtk_tree_selection_set_mode (selection, GTK_SELECTION_BROWSE);
|
gtk_tree_selection_set_mode (selection, GTK_SELECTION_BROWSE);
|
||||||
|
|
||||||
*button_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
|
*button_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), *button_vbox);
|
gtk_box_pack_start (GTK_BOX (hbox), *button_vbox, FALSE, FALSE, 0);
|
||||||
|
|
||||||
if (!info->size_group)
|
if (!info->size_group)
|
||||||
info->size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
|
info->size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
|
||||||
@@ -339,8 +397,7 @@ left_align_button_new (const char *label)
|
|||||||
GtkWidget *button = gtk_button_new_with_mnemonic (label);
|
GtkWidget *button = gtk_button_new_with_mnemonic (label);
|
||||||
GtkWidget *child = gtk_bin_get_child (GTK_BIN (button));
|
GtkWidget *child = gtk_bin_get_child (GTK_BIN (button));
|
||||||
|
|
||||||
gtk_widget_set_halign (child, GTK_ALIGN_START);
|
gtk_misc_set_alignment (GTK_MISC (child), 0., 0.5);
|
||||||
gtk_widget_set_valign (child, GTK_ALIGN_CENTER);
|
|
||||||
|
|
||||||
return button;
|
return button;
|
||||||
}
|
}
|
||||||
@@ -361,11 +418,11 @@ create_display_frame (ChangeDisplayInfo *info)
|
|||||||
|
|
||||||
button = left_align_button_new ("_Open...");
|
button = left_align_button_new ("_Open...");
|
||||||
g_signal_connect (button, "clicked", G_CALLBACK (open_display_cb), info);
|
g_signal_connect (button, "clicked", G_CALLBACK (open_display_cb), info);
|
||||||
gtk_box_pack_start (GTK_BOX (button_vbox), button);
|
gtk_box_pack_start (GTK_BOX (button_vbox), button, FALSE, FALSE, 0);
|
||||||
|
|
||||||
button = left_align_button_new ("_Close");
|
button = left_align_button_new ("_Close");
|
||||||
g_signal_connect (button, "clicked", G_CALLBACK (close_display_cb), info);
|
g_signal_connect (button, "clicked", G_CALLBACK (close_display_cb), info);
|
||||||
gtk_box_pack_start (GTK_BOX (button_vbox), button);
|
gtk_box_pack_start (GTK_BOX (button_vbox), button, FALSE, FALSE, 0);
|
||||||
|
|
||||||
info->display_model = (GtkTreeModel *)gtk_list_store_new (DISPLAY_NUM_COLUMNS,
|
info->display_model = (GtkTreeModel *)gtk_list_store_new (DISPLAY_NUM_COLUMNS,
|
||||||
G_TYPE_STRING,
|
G_TYPE_STRING,
|
||||||
@@ -386,6 +443,37 @@ create_display_frame (ChangeDisplayInfo *info)
|
|||||||
return frame;
|
return frame;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Creates the "Screen" frame in the main window.
|
||||||
|
*/
|
||||||
|
GtkWidget *
|
||||||
|
create_screen_frame (ChangeDisplayInfo *info)
|
||||||
|
{
|
||||||
|
GtkWidget *frame;
|
||||||
|
GtkWidget *tree_view;
|
||||||
|
GtkWidget *button_vbox;
|
||||||
|
GtkTreeViewColumn *column;
|
||||||
|
|
||||||
|
create_frame (info, "Screen", &frame, &tree_view, &button_vbox);
|
||||||
|
|
||||||
|
info->screen_model = (GtkTreeModel *)gtk_list_store_new (SCREEN_NUM_COLUMNS,
|
||||||
|
G_TYPE_INT,
|
||||||
|
GDK_TYPE_SCREEN);
|
||||||
|
|
||||||
|
gtk_tree_view_set_model (GTK_TREE_VIEW (tree_view), info->screen_model);
|
||||||
|
|
||||||
|
column = gtk_tree_view_column_new_with_attributes ("Number",
|
||||||
|
gtk_cell_renderer_text_new (),
|
||||||
|
"text", SCREEN_COLUMN_NUMBER,
|
||||||
|
NULL);
|
||||||
|
gtk_tree_view_append_column (GTK_TREE_VIEW (tree_view), column);
|
||||||
|
|
||||||
|
info->screen_selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tree_view));
|
||||||
|
g_signal_connect (info->screen_selection, "changed",
|
||||||
|
G_CALLBACK (screen_changed_cb), info);
|
||||||
|
|
||||||
|
return frame;
|
||||||
|
}
|
||||||
|
|
||||||
/* Called when one of the currently open displays is closed.
|
/* Called when one of the currently open displays is closed.
|
||||||
* Remove it from our list of displays.
|
* Remove it from our list of displays.
|
||||||
*/
|
*/
|
||||||
@@ -489,9 +577,12 @@ destroy_info (ChangeDisplayInfo *info)
|
|||||||
|
|
||||||
g_object_unref (info->size_group);
|
g_object_unref (info->size_group);
|
||||||
g_object_unref (info->display_model);
|
g_object_unref (info->display_model);
|
||||||
|
g_object_unref (info->screen_model);
|
||||||
|
|
||||||
if (info->current_display)
|
if (info->current_display)
|
||||||
g_object_unref (info->current_display);
|
g_object_unref (info->current_display);
|
||||||
|
if (info->current_screen)
|
||||||
|
g_object_unref (info->current_screen);
|
||||||
|
|
||||||
g_free (info);
|
g_free (info);
|
||||||
}
|
}
|
||||||
@@ -520,10 +611,10 @@ do_changedisplay (GtkWidget *do_widget)
|
|||||||
|
|
||||||
info = g_new0 (ChangeDisplayInfo, 1);
|
info = g_new0 (ChangeDisplayInfo, 1);
|
||||||
|
|
||||||
info->window = gtk_dialog_new_with_buttons ("Change Display",
|
info->window = gtk_dialog_new_with_buttons ("Change Screen or display",
|
||||||
GTK_WINDOW (do_widget),
|
GTK_WINDOW (do_widget),
|
||||||
0,
|
0,
|
||||||
"Close", GTK_RESPONSE_CLOSE,
|
GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
|
||||||
"Change", GTK_RESPONSE_OK,
|
"Change", GTK_RESPONSE_OK,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
@@ -537,15 +628,18 @@ do_changedisplay (GtkWidget *do_widget)
|
|||||||
content_area = gtk_dialog_get_content_area (GTK_DIALOG (info->window));
|
content_area = gtk_dialog_get_content_area (GTK_DIALOG (info->window));
|
||||||
|
|
||||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
|
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
|
||||||
g_object_set (vbox, "margin", 8, NULL);
|
gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
|
||||||
gtk_box_pack_start (GTK_BOX (content_area), vbox);
|
gtk_box_pack_start (GTK_BOX (content_area), vbox, TRUE, TRUE, 0);
|
||||||
|
|
||||||
frame = create_display_frame (info);
|
frame = create_display_frame (info);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), frame);
|
gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE, 0);
|
||||||
|
|
||||||
|
frame = create_screen_frame (info);
|
||||||
|
gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE, 0);
|
||||||
|
|
||||||
initialize_displays (info);
|
initialize_displays (info);
|
||||||
|
|
||||||
gtk_widget_show (info->window);
|
gtk_widget_show_all (info->window);
|
||||||
return info->window;
|
return info->window;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/* Clipboard
|
/* Clipboard
|
||||||
*
|
*
|
||||||
* GdkClipboard is used for clipboard handling. This demo shows how to
|
* GtkClipboard is used for clipboard handling. This demo shows how to
|
||||||
* copy and paste text to and from the clipboard.
|
* copy and paste text to and from the clipboard.
|
||||||
*
|
*
|
||||||
* It also shows how to transfer images via the clipboard or via
|
* It also shows how to transfer images via the clipboard or via
|
||||||
@@ -9,7 +9,6 @@
|
|||||||
* manager to run.
|
* manager to run.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <glib/gi18n.h>
|
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
@@ -20,59 +19,30 @@ copy_button_clicked (GtkWidget *button,
|
|||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
GtkWidget *entry;
|
GtkWidget *entry;
|
||||||
GdkClipboard *clipboard;
|
GtkClipboard *clipboard;
|
||||||
|
|
||||||
entry = GTK_WIDGET (user_data);
|
entry = GTK_WIDGET (user_data);
|
||||||
|
|
||||||
/* Get the clipboard object */
|
/* Get the clipboard object */
|
||||||
clipboard = gtk_widget_get_clipboard (entry);
|
clipboard = gtk_widget_get_clipboard (entry,
|
||||||
|
GDK_SELECTION_CLIPBOARD);
|
||||||
|
|
||||||
/* Set clipboard text */
|
/* Set clipboard text */
|
||||||
gdk_clipboard_set_text (clipboard, gtk_entry_get_text (GTK_ENTRY (entry)));
|
gtk_clipboard_set_text (clipboard, gtk_entry_get_text (GTK_ENTRY (entry)), -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
paste_received (GObject *source_object,
|
paste_received (GtkClipboard *clipboard,
|
||||||
GAsyncResult *result,
|
const gchar *text,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
GdkClipboard *clipboard;
|
|
||||||
GtkWidget *entry;
|
GtkWidget *entry;
|
||||||
char *text;
|
|
||||||
GError *error = NULL;
|
|
||||||
|
|
||||||
clipboard = GDK_CLIPBOARD (source_object);
|
|
||||||
entry = GTK_WIDGET (user_data);
|
entry = GTK_WIDGET (user_data);
|
||||||
|
|
||||||
/* Get the resulting text of the read operation */
|
|
||||||
text = gdk_clipboard_read_text_finish (clipboard, result, &error);
|
|
||||||
|
|
||||||
if (text)
|
|
||||||
{
|
|
||||||
/* Set the entry text */
|
/* Set the entry text */
|
||||||
|
if(text)
|
||||||
gtk_entry_set_text (GTK_ENTRY (entry), text);
|
gtk_entry_set_text (GTK_ENTRY (entry), text);
|
||||||
g_free (text);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
GtkWidget *dialog;
|
|
||||||
|
|
||||||
/* Show an error about why pasting failed.
|
|
||||||
* Usually you probably want to ignore such failures,
|
|
||||||
* but for demonstration purposes, we show the error.
|
|
||||||
*/
|
|
||||||
dialog = gtk_message_dialog_new (GTK_WINDOW (window),
|
|
||||||
GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_MODAL,
|
|
||||||
GTK_MESSAGE_ERROR,
|
|
||||||
GTK_BUTTONS_CLOSE,
|
|
||||||
"Could not paste text: %s",
|
|
||||||
error->message);
|
|
||||||
g_signal_connect (dialog, "response",
|
|
||||||
G_CALLBACK (gtk_widget_destroy), NULL);
|
|
||||||
gtk_widget_show (dialog);
|
|
||||||
|
|
||||||
g_error_free (error);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -80,37 +50,35 @@ paste_button_clicked (GtkWidget *button,
|
|||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
GtkWidget *entry;
|
GtkWidget *entry;
|
||||||
GdkClipboard *clipboard;
|
GtkClipboard *clipboard;
|
||||||
|
|
||||||
entry = GTK_WIDGET (user_data);
|
entry = GTK_WIDGET (user_data);
|
||||||
|
|
||||||
/* Get the clipboard object */
|
/* Get the clipboard object */
|
||||||
clipboard = gtk_widget_get_clipboard (entry);
|
clipboard = gtk_widget_get_clipboard (entry,
|
||||||
|
GDK_SELECTION_CLIPBOARD);
|
||||||
|
|
||||||
/* Request the contents of the clipboard, contents_received will be
|
/* Request the contents of the clipboard, contents_received will be
|
||||||
called when we do get the contents.
|
called when we do get the contents.
|
||||||
*/
|
*/
|
||||||
gdk_clipboard_read_text_async (clipboard, NULL, paste_received, entry);
|
gtk_clipboard_request_text (clipboard,
|
||||||
|
paste_received, entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
static GdkPaintable *
|
static GdkPixbuf *
|
||||||
get_image_paintable (GtkImage *image)
|
get_image_pixbuf (GtkImage *image)
|
||||||
{
|
{
|
||||||
const gchar *icon_name;
|
gchar *stock_id;
|
||||||
GtkIconTheme *icon_theme;
|
GtkIconSize size;
|
||||||
GtkIconInfo *icon_info;
|
|
||||||
|
|
||||||
switch (gtk_image_get_storage_type (image))
|
switch (gtk_image_get_storage_type (image))
|
||||||
{
|
{
|
||||||
case GTK_IMAGE_PAINTABLE:
|
case GTK_IMAGE_PIXBUF:
|
||||||
return g_object_ref (gtk_image_get_paintable (image));
|
return g_object_ref (gtk_image_get_pixbuf (image));
|
||||||
case GTK_IMAGE_ICON_NAME:
|
case GTK_IMAGE_STOCK:
|
||||||
icon_name = gtk_image_get_icon_name (image);
|
gtk_image_get_stock (image, &stock_id, &size);
|
||||||
icon_theme = gtk_icon_theme_get_for_display (gtk_widget_get_display (GTK_WIDGET (image)));
|
return gtk_widget_render_icon_pixbuf (GTK_WIDGET (image),
|
||||||
icon_info = gtk_icon_theme_lookup_icon (icon_theme, icon_name, 48, GTK_ICON_LOOKUP_GENERIC_FALLBACK);
|
stock_id, size);
|
||||||
if (icon_info == NULL)
|
|
||||||
return NULL;
|
|
||||||
return GDK_PAINTABLE (gtk_icon_info_load_texture (icon_info));
|
|
||||||
default:
|
default:
|
||||||
g_warning ("Image storage type %d not handled",
|
g_warning ("Image storage type %d not handled",
|
||||||
gtk_image_get_storage_type (image));
|
gtk_image_get_storage_type (image));
|
||||||
@@ -123,14 +91,11 @@ drag_begin (GtkWidget *widget,
|
|||||||
GdkDragContext *context,
|
GdkDragContext *context,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
GdkPaintable *paintable;
|
GdkPixbuf *pixbuf;
|
||||||
|
|
||||||
paintable = get_image_paintable (GTK_IMAGE (widget));
|
pixbuf = get_image_pixbuf (GTK_IMAGE (data));
|
||||||
if (paintable)
|
gtk_drag_set_icon_pixbuf (context, pixbuf, -2, -2);
|
||||||
{
|
g_object_unref (pixbuf);
|
||||||
gtk_drag_set_icon_paintable (context, paintable, -2, -2);
|
|
||||||
g_object_unref (paintable);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -141,27 +106,30 @@ drag_data_get (GtkWidget *widget,
|
|||||||
guint time,
|
guint time,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
GdkPaintable *paintable;
|
GdkPixbuf *pixbuf;
|
||||||
|
|
||||||
paintable = get_image_paintable (GTK_IMAGE (widget));
|
pixbuf = get_image_pixbuf (GTK_IMAGE (data));
|
||||||
if (GDK_IS_TEXTURE (paintable))
|
gtk_selection_data_set_pixbuf (selection_data, pixbuf);
|
||||||
gtk_selection_data_set_texture (selection_data, GDK_TEXTURE (paintable));
|
g_object_unref (pixbuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
drag_data_received (GtkWidget *widget,
|
drag_data_received (GtkWidget *widget,
|
||||||
GdkDragContext *context,
|
GdkDragContext *context,
|
||||||
|
gint x,
|
||||||
|
gint y,
|
||||||
GtkSelectionData *selection_data,
|
GtkSelectionData *selection_data,
|
||||||
|
guint info,
|
||||||
guint32 time,
|
guint32 time,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
|
GdkPixbuf *pixbuf;
|
||||||
|
|
||||||
if (gtk_selection_data_get_length (selection_data) > 0)
|
if (gtk_selection_data_get_length (selection_data) > 0)
|
||||||
{
|
{
|
||||||
GdkTexture *texture;
|
pixbuf = gtk_selection_data_get_pixbuf (selection_data);
|
||||||
|
gtk_image_set_from_pixbuf (GTK_IMAGE (data), pixbuf);
|
||||||
texture = gtk_selection_data_get_texture (selection_data);
|
g_object_unref (pixbuf);
|
||||||
gtk_image_set_from_paintable (GTK_IMAGE (data), GDK_PAINTABLE (texture));
|
|
||||||
g_object_unref (texture);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -169,70 +137,58 @@ static void
|
|||||||
copy_image (GtkMenuItem *item,
|
copy_image (GtkMenuItem *item,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
GdkClipboard *clipboard;
|
GtkClipboard *clipboard;
|
||||||
GdkPaintable *paintable;
|
GdkPixbuf *pixbuf;
|
||||||
|
|
||||||
clipboard = gtk_widget_get_clipboard (GTK_WIDGET (data));
|
clipboard = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD);
|
||||||
paintable = get_image_paintable (GTK_IMAGE (data));
|
pixbuf = get_image_pixbuf (GTK_IMAGE (data));
|
||||||
|
|
||||||
if (GDK_IS_TEXTURE (paintable))
|
gtk_clipboard_set_image (clipboard, pixbuf);
|
||||||
gdk_clipboard_set_texture (clipboard, GDK_TEXTURE (paintable));
|
g_object_unref (pixbuf);
|
||||||
|
|
||||||
if (paintable)
|
|
||||||
g_object_unref (paintable);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
paste_image_received (GObject *source,
|
|
||||||
GAsyncResult *result,
|
|
||||||
gpointer data)
|
|
||||||
{
|
|
||||||
GdkTexture *texture;
|
|
||||||
|
|
||||||
texture = gdk_clipboard_read_texture_finish (GDK_CLIPBOARD (source), result, NULL);
|
|
||||||
if (texture == NULL)
|
|
||||||
return;
|
|
||||||
|
|
||||||
gtk_image_set_from_paintable (GTK_IMAGE (data), GDK_PAINTABLE (texture));
|
|
||||||
g_object_unref (texture);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
paste_image (GtkMenuItem *item,
|
paste_image (GtkMenuItem *item,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
GdkClipboard *clipboard;
|
GtkClipboard *clipboard;
|
||||||
|
GdkPixbuf *pixbuf;
|
||||||
|
|
||||||
clipboard = gtk_widget_get_clipboard (GTK_WIDGET (data));
|
clipboard = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD);
|
||||||
gdk_clipboard_read_texture_async (clipboard,
|
pixbuf = gtk_clipboard_wait_for_image (clipboard);
|
||||||
NULL,
|
|
||||||
paste_image_received,
|
if (pixbuf)
|
||||||
data);
|
{
|
||||||
|
gtk_image_set_from_pixbuf (GTK_IMAGE (data), pixbuf);
|
||||||
|
g_object_unref (pixbuf);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static gboolean
|
||||||
pressed_cb (GtkGesture *gesture,
|
button_press (GtkWidget *widget,
|
||||||
int n_press,
|
GdkEventButton *button,
|
||||||
double x,
|
gpointer data)
|
||||||
double y,
|
|
||||||
GtkWidget *image)
|
|
||||||
{
|
{
|
||||||
GtkWidget *menu;
|
GtkWidget *menu;
|
||||||
GtkWidget *item;
|
GtkWidget *item;
|
||||||
|
|
||||||
|
if (button->button != 3)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
menu = gtk_menu_new ();
|
menu = gtk_menu_new ();
|
||||||
|
|
||||||
item = gtk_menu_item_new_with_mnemonic (_("_Copy"));
|
item = gtk_image_menu_item_new_from_stock (GTK_STOCK_COPY, NULL);
|
||||||
g_signal_connect (item, "activate", G_CALLBACK (copy_image), image);
|
g_signal_connect (item, "activate", G_CALLBACK (copy_image), data);
|
||||||
gtk_widget_show (item);
|
gtk_widget_show (item);
|
||||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
|
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
|
||||||
|
|
||||||
item = gtk_menu_item_new_with_mnemonic (_("_Paste"));
|
item = gtk_image_menu_item_new_from_stock (GTK_STOCK_PASTE, NULL);
|
||||||
g_signal_connect (item, "activate", G_CALLBACK (paste_image), image);
|
g_signal_connect (item, "activate", G_CALLBACK (paste_image), data);
|
||||||
gtk_widget_show (item);
|
gtk_widget_show (item);
|
||||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
|
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
|
||||||
|
|
||||||
gtk_menu_popup_at_pointer (GTK_MENU (menu), NULL);
|
gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL, 3, button->time);
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
@@ -243,119 +199,128 @@ do_clipboard (GtkWidget *do_widget)
|
|||||||
GtkWidget *vbox, *hbox;
|
GtkWidget *vbox, *hbox;
|
||||||
GtkWidget *label;
|
GtkWidget *label;
|
||||||
GtkWidget *entry, *button;
|
GtkWidget *entry, *button;
|
||||||
GtkWidget *image;
|
GtkWidget *ebox, *image;
|
||||||
GtkGesture *gesture;
|
GtkClipboard *clipboard;
|
||||||
|
|
||||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||||
gtk_window_set_display (GTK_WINDOW (window),
|
gtk_window_set_screen (GTK_WINDOW (window),
|
||||||
gtk_widget_get_display (do_widget));
|
gtk_widget_get_screen (do_widget));
|
||||||
gtk_window_set_title (GTK_WINDOW (window), "Clipboard");
|
gtk_window_set_title (GTK_WINDOW (window), "Clipboard demo");
|
||||||
|
|
||||||
g_signal_connect (window, "destroy",
|
g_signal_connect (window, "destroy",
|
||||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||||
|
|
||||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||||
g_object_set (vbox, "margin", 8, NULL);
|
gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
|
||||||
|
|
||||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||||
|
|
||||||
label = gtk_label_new ("\"Copy\" will copy the text\nin the entry to the clipboard");
|
label = gtk_label_new ("\"Copy\" will copy the text\nin the entry to the clipboard");
|
||||||
|
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), label);
|
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
|
||||||
|
|
||||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
|
||||||
g_object_set (hbox, "margin", 8, NULL);
|
gtk_container_set_border_width (GTK_CONTAINER (hbox), 8);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), hbox);
|
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||||
|
|
||||||
/* Create the first entry */
|
/* Create the first entry */
|
||||||
entry = gtk_entry_new ();
|
entry = gtk_entry_new ();
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), entry);
|
gtk_box_pack_start (GTK_BOX (hbox), entry, TRUE, TRUE, 0);
|
||||||
|
|
||||||
/* Create the button */
|
/* Create the button */
|
||||||
button = gtk_button_new_with_mnemonic (_("_Copy"));
|
button = gtk_button_new_from_stock (GTK_STOCK_COPY);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), button);
|
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
|
||||||
g_signal_connect (button, "clicked",
|
g_signal_connect (button, "clicked",
|
||||||
G_CALLBACK (copy_button_clicked), entry);
|
G_CALLBACK (copy_button_clicked), entry);
|
||||||
|
|
||||||
label = gtk_label_new ("\"Paste\" will paste the text from the clipboard to the entry");
|
label = gtk_label_new ("\"Paste\" will paste the text from the clipboard to the entry");
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), label);
|
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
|
||||||
|
|
||||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
|
||||||
g_object_set (hbox, "margin", 8, NULL);
|
gtk_container_set_border_width (GTK_CONTAINER (hbox), 8);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), hbox);
|
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||||
|
|
||||||
/* Create the second entry */
|
/* Create the second entry */
|
||||||
entry = gtk_entry_new ();
|
entry = gtk_entry_new ();
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), entry);
|
gtk_box_pack_start (GTK_BOX (hbox), entry, TRUE, TRUE, 0);
|
||||||
|
|
||||||
/* Create the button */
|
/* Create the button */
|
||||||
button = gtk_button_new_with_mnemonic (_("_Paste"));
|
button = gtk_button_new_from_stock (GTK_STOCK_PASTE);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), button);
|
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
|
||||||
g_signal_connect (button, "clicked",
|
g_signal_connect (button, "clicked",
|
||||||
G_CALLBACK (paste_button_clicked), entry);
|
G_CALLBACK (paste_button_clicked), entry);
|
||||||
|
|
||||||
label = gtk_label_new ("Images can be transferred via the clipboard, too");
|
label = gtk_label_new ("Images can be transferred via the clipboard, too");
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), label);
|
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
|
||||||
|
|
||||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
|
||||||
g_object_set (hbox, "margin", 8, NULL);
|
gtk_container_set_border_width (GTK_CONTAINER (hbox), 8);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), hbox);
|
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||||
|
|
||||||
/* Create the first image */
|
/* Create the first image */
|
||||||
image = gtk_image_new_from_icon_name ("dialog-warning");
|
image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_WARNING,
|
||||||
gtk_container_add (GTK_CONTAINER (hbox), image);
|
GTK_ICON_SIZE_BUTTON);
|
||||||
|
ebox = gtk_event_box_new ();
|
||||||
|
gtk_container_add (GTK_CONTAINER (ebox), image);
|
||||||
|
gtk_container_add (GTK_CONTAINER (hbox), ebox);
|
||||||
|
|
||||||
/* make image a drag source */
|
/* make ebox a drag source */
|
||||||
gtk_drag_source_set (image, GDK_BUTTON1_MASK, NULL, GDK_ACTION_COPY);
|
gtk_drag_source_set (ebox, GDK_BUTTON1_MASK, NULL, 0, GDK_ACTION_COPY);
|
||||||
gtk_drag_source_add_image_targets (image);
|
gtk_drag_source_add_image_targets (ebox);
|
||||||
g_signal_connect (image, "drag-begin",
|
g_signal_connect (ebox, "drag-begin",
|
||||||
G_CALLBACK (drag_begin), image);
|
G_CALLBACK (drag_begin), image);
|
||||||
g_signal_connect (image, "drag-data-get",
|
g_signal_connect (ebox, "drag-data-get",
|
||||||
G_CALLBACK (drag_data_get), image);
|
G_CALLBACK (drag_data_get), image);
|
||||||
|
|
||||||
/* accept drops on image */
|
/* accept drops on ebox */
|
||||||
gtk_drag_dest_set (image, GTK_DEST_DEFAULT_ALL,
|
gtk_drag_dest_set (ebox, GTK_DEST_DEFAULT_ALL,
|
||||||
NULL, GDK_ACTION_COPY);
|
NULL, 0, GDK_ACTION_COPY);
|
||||||
gtk_drag_dest_add_image_targets (image);
|
gtk_drag_dest_add_image_targets (ebox);
|
||||||
g_signal_connect (image, "drag-data-received",
|
g_signal_connect (ebox, "drag-data-received",
|
||||||
G_CALLBACK (drag_data_received), image);
|
G_CALLBACK (drag_data_received), image);
|
||||||
|
|
||||||
/* context menu on image */
|
/* context menu on ebox */
|
||||||
gesture = gtk_gesture_multi_press_new ();
|
g_signal_connect (ebox, "button-press-event",
|
||||||
gtk_gesture_single_set_button (GTK_GESTURE_SINGLE (gesture), GDK_BUTTON_SECONDARY);
|
G_CALLBACK (button_press), image);
|
||||||
g_signal_connect (gesture, "pressed", G_CALLBACK (pressed_cb), image);
|
|
||||||
gtk_widget_add_controller (image, GTK_EVENT_CONTROLLER (gesture));
|
|
||||||
|
|
||||||
/* Create the second image */
|
/* Create the second image */
|
||||||
image = gtk_image_new_from_icon_name ("process-stop");
|
image = gtk_image_new_from_stock (GTK_STOCK_STOP,
|
||||||
gtk_container_add (GTK_CONTAINER (hbox), image);
|
GTK_ICON_SIZE_BUTTON);
|
||||||
|
ebox = gtk_event_box_new ();
|
||||||
|
gtk_container_add (GTK_CONTAINER (ebox), image);
|
||||||
|
gtk_container_add (GTK_CONTAINER (hbox), ebox);
|
||||||
|
|
||||||
/* make image a drag source */
|
/* make ebox a drag source */
|
||||||
gtk_drag_source_set (image, GDK_BUTTON1_MASK, NULL, GDK_ACTION_COPY);
|
gtk_drag_source_set (ebox, GDK_BUTTON1_MASK, NULL, 0, GDK_ACTION_COPY);
|
||||||
gtk_drag_source_add_image_targets (image);
|
gtk_drag_source_add_image_targets (ebox);
|
||||||
g_signal_connect (image, "drag-begin",
|
g_signal_connect (ebox, "drag-begin",
|
||||||
G_CALLBACK (drag_begin), image);
|
G_CALLBACK (drag_begin), image);
|
||||||
g_signal_connect (image, "drag-data-get",
|
g_signal_connect (ebox, "drag-data-get",
|
||||||
G_CALLBACK (drag_data_get), image);
|
G_CALLBACK (drag_data_get), image);
|
||||||
|
|
||||||
/* accept drops on image */
|
/* accept drops on ebox */
|
||||||
gtk_drag_dest_set (image, GTK_DEST_DEFAULT_ALL,
|
gtk_drag_dest_set (ebox, GTK_DEST_DEFAULT_ALL,
|
||||||
NULL, GDK_ACTION_COPY);
|
NULL, 0, GDK_ACTION_COPY);
|
||||||
gtk_drag_dest_add_image_targets (image);
|
gtk_drag_dest_add_image_targets (ebox);
|
||||||
g_signal_connect (image, "drag-data-received",
|
g_signal_connect (ebox, "drag-data-received",
|
||||||
G_CALLBACK (drag_data_received), image);
|
G_CALLBACK (drag_data_received), image);
|
||||||
|
|
||||||
/* context menu on image */
|
/* context menu on ebox */
|
||||||
gesture = gtk_gesture_multi_press_new ();
|
g_signal_connect (ebox, "button-press-event",
|
||||||
gtk_gesture_single_set_button (GTK_GESTURE_SINGLE (gesture), GDK_BUTTON_SECONDARY);
|
G_CALLBACK (button_press), image);
|
||||||
g_signal_connect (gesture, "pressed", G_CALLBACK (pressed_cb), image);
|
|
||||||
gtk_widget_add_controller (image, GTK_EVENT_CONTROLLER (gesture));
|
/* 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))
|
if (!gtk_widget_get_visible (window))
|
||||||
gtk_widget_show (window);
|
gtk_widget_show_all (window);
|
||||||
else
|
else
|
||||||
|
{
|
||||||
gtk_widget_destroy (window);
|
gtk_widget_destroy (window);
|
||||||
|
window = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
return window;
|
return window;
|
||||||
}
|
}
|
||||||
|
Before Width: | Height: | Size: 54 KiB |
Before Width: | Height: | Size: 1.4 KiB |
@@ -1,9 +1,8 @@
|
|||||||
/* Color Chooser
|
/* Color Selector
|
||||||
|
*
|
||||||
|
* GtkColorSelection lets the user choose a color. GtkColorSelectionDialog is
|
||||||
|
* a prebuilt dialog containing a GtkColorSelection.
|
||||||
*
|
*
|
||||||
* A GtkColorChooser lets the user choose a color. There are several
|
|
||||||
* implementations of the GtkColorChooser interface in GTK+. The
|
|
||||||
* GtkColorChooserDialog is a prebuilt dialog containing a
|
|
||||||
* GtkColorChooserWidget.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
@@ -15,29 +14,21 @@ static GtkWidget *frame;
|
|||||||
|
|
||||||
/* draw callback for the drawing area
|
/* draw callback for the drawing area
|
||||||
*/
|
*/
|
||||||
static void
|
static gboolean
|
||||||
draw_function (GtkDrawingArea *da,
|
draw_callback (GtkWidget *widget,
|
||||||
cairo_t *cr,
|
cairo_t *cr,
|
||||||
int width,
|
|
||||||
int height,
|
|
||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
gdk_cairo_set_source_rgba (cr, &color);
|
GtkStyleContext *context;
|
||||||
|
GdkRGBA *bg;
|
||||||
|
|
||||||
|
context = gtk_widget_get_style_context (widget);
|
||||||
|
gtk_style_context_get (context, 0, "background-color", &bg, NULL);
|
||||||
|
gdk_cairo_set_source_rgba (cr, bg);
|
||||||
cairo_paint (cr);
|
cairo_paint (cr);
|
||||||
}
|
gdk_rgba_free (bg);
|
||||||
|
|
||||||
static void
|
return TRUE;
|
||||||
response_cb (GtkDialog *dialog,
|
|
||||||
gint response_id,
|
|
||||||
gpointer user_data)
|
|
||||||
{
|
|
||||||
if (response_id == GTK_RESPONSE_OK)
|
|
||||||
{
|
|
||||||
gtk_color_chooser_get_rgba (GTK_COLOR_CHOOSER (dialog), &color);
|
|
||||||
gtk_widget_queue_draw (da);
|
|
||||||
}
|
|
||||||
|
|
||||||
gtk_widget_destroy (GTK_WIDGET (dialog));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -45,15 +36,31 @@ change_color_callback (GtkWidget *button,
|
|||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
GtkWidget *dialog;
|
GtkWidget *dialog;
|
||||||
|
GtkColorSelection *colorsel;
|
||||||
|
GtkColorSelectionDialog *selection_dialog;
|
||||||
|
gint response;
|
||||||
|
|
||||||
dialog = gtk_color_chooser_dialog_new ("Changing color", GTK_WINDOW (window));
|
dialog = gtk_color_selection_dialog_new ("Changing color");
|
||||||
gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
|
|
||||||
gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (dialog), &color);
|
|
||||||
|
|
||||||
g_signal_connect (dialog, "response",
|
gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (window));
|
||||||
G_CALLBACK (response_cb), NULL);
|
|
||||||
|
|
||||||
gtk_widget_show (dialog);
|
selection_dialog = GTK_COLOR_SELECTION_DIALOG (dialog);
|
||||||
|
colorsel = GTK_COLOR_SELECTION (gtk_color_selection_dialog_get_color_selection (selection_dialog));
|
||||||
|
|
||||||
|
gtk_color_selection_set_previous_rgba (colorsel, &color);
|
||||||
|
gtk_color_selection_set_current_rgba (colorsel, &color);
|
||||||
|
gtk_color_selection_set_has_palette (colorsel, TRUE);
|
||||||
|
|
||||||
|
response = gtk_dialog_run (GTK_DIALOG (dialog));
|
||||||
|
|
||||||
|
if (response == GTK_RESPONSE_OK)
|
||||||
|
{
|
||||||
|
gtk_color_selection_get_current_rgba (colorsel, &color);
|
||||||
|
|
||||||
|
gtk_widget_override_background_color (da, 0, &color);
|
||||||
|
}
|
||||||
|
|
||||||
|
gtk_widget_destroy (dialog);
|
||||||
}
|
}
|
||||||
|
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
@@ -61,6 +68,7 @@ do_colorsel (GtkWidget *do_widget)
|
|||||||
{
|
{
|
||||||
GtkWidget *vbox;
|
GtkWidget *vbox;
|
||||||
GtkWidget *button;
|
GtkWidget *button;
|
||||||
|
GtkWidget *alignment;
|
||||||
|
|
||||||
if (!window)
|
if (!window)
|
||||||
{
|
{
|
||||||
@@ -70,47 +78,59 @@ do_colorsel (GtkWidget *do_widget)
|
|||||||
color.alpha = 1;
|
color.alpha = 1;
|
||||||
|
|
||||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||||
gtk_window_set_display (GTK_WINDOW (window),
|
gtk_window_set_screen (GTK_WINDOW (window),
|
||||||
gtk_widget_get_display (do_widget));
|
gtk_widget_get_screen (do_widget));
|
||||||
gtk_window_set_title (GTK_WINDOW (window), "Color Chooser");
|
gtk_window_set_title (GTK_WINDOW (window), "Color Selection");
|
||||||
gtk_window_set_resizable (GTK_WINDOW (window), FALSE);
|
|
||||||
|
|
||||||
g_signal_connect (window, "destroy",
|
g_signal_connect (window, "destroy",
|
||||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||||
|
|
||||||
|
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
|
||||||
|
|
||||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
|
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
|
||||||
g_object_set (vbox, "margin", 12, NULL);
|
gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
|
||||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Create the color swatch area
|
* Create the color swatch area
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
frame = gtk_frame_new (NULL);
|
frame = gtk_frame_new (NULL);
|
||||||
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
|
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), frame);
|
gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE, 0);
|
||||||
|
|
||||||
da = gtk_drawing_area_new ();
|
da = gtk_drawing_area_new ();
|
||||||
gtk_drawing_area_set_content_width (GTK_DRAWING_AREA (da), 200);
|
|
||||||
gtk_drawing_area_set_content_height (GTK_DRAWING_AREA (da), 200);
|
g_signal_connect (da, "draw", G_CALLBACK (draw_callback), NULL);
|
||||||
gtk_drawing_area_set_draw_func (GTK_DRAWING_AREA (da), draw_function, NULL, NULL);
|
|
||||||
|
/* set a minimum size */
|
||||||
|
gtk_widget_set_size_request (da, 200, 200);
|
||||||
|
/* set the color */
|
||||||
|
gtk_widget_override_background_color (da, 0, &color);
|
||||||
|
|
||||||
gtk_container_add (GTK_CONTAINER (frame), da);
|
gtk_container_add (GTK_CONTAINER (frame), da);
|
||||||
|
|
||||||
button = gtk_button_new_with_mnemonic ("_Change the above color");
|
alignment = gtk_alignment_new (1.0, 0.5, 0.0, 0.0);
|
||||||
gtk_widget_set_halign (button, GTK_ALIGN_END);
|
|
||||||
gtk_widget_set_valign (button, GTK_ALIGN_CENTER);
|
|
||||||
|
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), button);
|
button = gtk_button_new_with_mnemonic ("_Change the above color");
|
||||||
|
gtk_container_add (GTK_CONTAINER (alignment), button);
|
||||||
|
|
||||||
|
gtk_box_pack_start (GTK_BOX (vbox), alignment, FALSE, FALSE, 0);
|
||||||
|
|
||||||
g_signal_connect (button, "clicked",
|
g_signal_connect (button, "clicked",
|
||||||
G_CALLBACK (change_color_callback), NULL);
|
G_CALLBACK (change_color_callback), NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!gtk_widget_get_visible (window))
|
if (!gtk_widget_get_visible (window))
|
||||||
gtk_widget_show (window);
|
{
|
||||||
|
gtk_widget_show_all (window);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
gtk_widget_destroy (window);
|
gtk_widget_destroy (window);
|
||||||
|
window = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
return window;
|
return window;
|
||||||
}
|
}
|
||||||
|
@@ -1,67 +1,94 @@
|
|||||||
/* Combo Boxes
|
/* Combo boxes
|
||||||
*
|
*
|
||||||
* The GtkComboBox widget allows to select one option out of a list.
|
* The ComboBox widget allows to select one option out of a list.
|
||||||
* The GtkComboBoxEntry additionally allows the user to enter a value
|
* The ComboBoxEntry additionally allows the user to enter a value
|
||||||
* that is not in the list of options.
|
* that is not in the list of options.
|
||||||
*
|
*
|
||||||
* How the options are displayed is controlled by cell renderers.
|
* How the options are displayed is controlled by cell renderers.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <glib/gi18n.h>
|
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
ICON_NAME_COL,
|
PIXBUF_COL,
|
||||||
TEXT_COL
|
TEXT_COL
|
||||||
};
|
};
|
||||||
|
|
||||||
static GtkTreeModel *
|
static gchar *
|
||||||
create_icon_store (void)
|
strip_underscore (const gchar *text)
|
||||||
{
|
{
|
||||||
const gchar *icon_names[6] = {
|
gchar *p, *q;
|
||||||
"dialog-warning",
|
gchar *result;
|
||||||
"process-stop",
|
|
||||||
"document-new",
|
result = g_strdup (text);
|
||||||
"edit-clear",
|
p = q = result;
|
||||||
|
while (*p)
|
||||||
|
{
|
||||||
|
if (*p != '_')
|
||||||
|
{
|
||||||
|
*q = *p;
|
||||||
|
q++;
|
||||||
|
}
|
||||||
|
p++;
|
||||||
|
}
|
||||||
|
*q = '\0';
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
static GtkTreeModel *
|
||||||
|
create_stock_icon_store (void)
|
||||||
|
{
|
||||||
|
gchar *stock_id[6] = {
|
||||||
|
GTK_STOCK_DIALOG_WARNING,
|
||||||
|
GTK_STOCK_STOP,
|
||||||
|
GTK_STOCK_NEW,
|
||||||
|
GTK_STOCK_CLEAR,
|
||||||
NULL,
|
NULL,
|
||||||
"document-open"
|
GTK_STOCK_OPEN
|
||||||
};
|
|
||||||
const gchar *labels[6] = {
|
|
||||||
N_("Warning"),
|
|
||||||
N_("Stop"),
|
|
||||||
N_("New"),
|
|
||||||
N_("Clear"),
|
|
||||||
NULL,
|
|
||||||
N_("Open")
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
GtkStockItem item;
|
||||||
|
GdkPixbuf *pixbuf;
|
||||||
|
GtkWidget *cellview;
|
||||||
GtkTreeIter iter;
|
GtkTreeIter iter;
|
||||||
GtkListStore *store;
|
GtkListStore *store;
|
||||||
|
gchar *label;
|
||||||
gint i;
|
gint i;
|
||||||
|
|
||||||
store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING);
|
cellview = gtk_cell_view_new ();
|
||||||
|
|
||||||
for (i = 0; i < G_N_ELEMENTS (icon_names); i++)
|
store = gtk_list_store_new (2, GDK_TYPE_PIXBUF, G_TYPE_STRING);
|
||||||
|
|
||||||
|
for (i = 0; i < G_N_ELEMENTS (stock_id); i++)
|
||||||
{
|
{
|
||||||
if (icon_names[i])
|
if (stock_id[i])
|
||||||
{
|
{
|
||||||
|
pixbuf = gtk_widget_render_icon_pixbuf (cellview, stock_id[i],
|
||||||
|
GTK_ICON_SIZE_BUTTON);
|
||||||
|
gtk_stock_lookup (stock_id[i], &item);
|
||||||
|
label = strip_underscore (item.label);
|
||||||
gtk_list_store_append (store, &iter);
|
gtk_list_store_append (store, &iter);
|
||||||
gtk_list_store_set (store, &iter,
|
gtk_list_store_set (store, &iter,
|
||||||
ICON_NAME_COL, icon_names[i],
|
PIXBUF_COL, pixbuf,
|
||||||
TEXT_COL, _(labels[i]),
|
TEXT_COL, label,
|
||||||
-1);
|
-1);
|
||||||
|
g_object_unref (pixbuf);
|
||||||
|
g_free (label);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
gtk_list_store_append (store, &iter);
|
gtk_list_store_append (store, &iter);
|
||||||
gtk_list_store_set (store, &iter,
|
gtk_list_store_set (store, &iter,
|
||||||
ICON_NAME_COL, NULL,
|
PIXBUF_COL, NULL,
|
||||||
TEXT_COL, "separator",
|
TEXT_COL, "separator",
|
||||||
-1);
|
-1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gtk_widget_destroy (cellview);
|
||||||
|
|
||||||
return GTK_TREE_MODEL (store);
|
return GTK_TREE_MODEL (store);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -254,21 +281,18 @@ G_DEFINE_TYPE_WITH_CODE (MaskEntry, mask_entry, GTK_TYPE_ENTRY,
|
|||||||
static void
|
static void
|
||||||
mask_entry_set_background (MaskEntry *entry)
|
mask_entry_set_background (MaskEntry *entry)
|
||||||
{
|
{
|
||||||
|
static const GdkRGBA error_color = { 1.0, 0.9, 0.9, 1.0 };
|
||||||
|
|
||||||
if (entry->mask)
|
if (entry->mask)
|
||||||
{
|
{
|
||||||
if (!g_regex_match_simple (entry->mask, gtk_entry_get_text (GTK_ENTRY (entry)), 0, 0))
|
if (!g_regex_match_simple (entry->mask, gtk_entry_get_text (GTK_ENTRY (entry)), 0, 0))
|
||||||
{
|
{
|
||||||
PangoAttrList *attrs;
|
gtk_widget_override_color (GTK_WIDGET (entry), 0, &error_color);
|
||||||
|
|
||||||
attrs = pango_attr_list_new ();
|
|
||||||
pango_attr_list_insert (attrs, pango_attr_foreground_new (65535, 32767, 32767));
|
|
||||||
gtk_entry_set_attributes (GTK_ENTRY (entry), attrs);
|
|
||||||
pango_attr_list_unref (attrs);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gtk_entry_set_attributes (GTK_ENTRY (entry), NULL);
|
gtk_widget_override_color (GTK_WIDGET (entry), 0, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -311,28 +335,30 @@ do_combobox (GtkWidget *do_widget)
|
|||||||
if (!window)
|
if (!window)
|
||||||
{
|
{
|
||||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||||
gtk_window_set_display (GTK_WINDOW (window),
|
gtk_window_set_screen (GTK_WINDOW (window),
|
||||||
gtk_widget_get_display (do_widget));
|
gtk_widget_get_screen (do_widget));
|
||||||
gtk_window_set_title (GTK_WINDOW (window), "Combo Boxes");
|
gtk_window_set_title (GTK_WINDOW (window), "Combo boxes");
|
||||||
|
|
||||||
g_signal_connect (window, "destroy",
|
g_signal_connect (window, "destroy",
|
||||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
G_CALLBACK (gtk_widget_destroyed),
|
||||||
|
&window);
|
||||||
|
|
||||||
|
gtk_container_set_border_width (GTK_CONTAINER (window), 10);
|
||||||
|
|
||||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
|
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
|
||||||
g_object_set (vbox, "margin", 10, NULL);
|
|
||||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||||
|
|
||||||
/* A combobox demonstrating cell renderers, separators and
|
/* A combobox demonstrating cell renderers, separators and
|
||||||
* insensitive rows
|
* insensitive rows
|
||||||
*/
|
*/
|
||||||
frame = gtk_frame_new ("Items with icons");
|
frame = gtk_frame_new ("Some stock icons");
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), frame);
|
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
|
||||||
|
|
||||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||||
g_object_set (box, "margin", 5, NULL);
|
gtk_container_set_border_width (GTK_CONTAINER (box), 5);
|
||||||
gtk_container_add (GTK_CONTAINER (frame), box);
|
gtk_container_add (GTK_CONTAINER (frame), box);
|
||||||
|
|
||||||
model = create_icon_store ();
|
model = create_stock_icon_store ();
|
||||||
combo = gtk_combo_box_new_with_model (model);
|
combo = gtk_combo_box_new_with_model (model);
|
||||||
g_object_unref (model);
|
g_object_unref (model);
|
||||||
gtk_container_add (GTK_CONTAINER (box), combo);
|
gtk_container_add (GTK_CONTAINER (box), combo);
|
||||||
@@ -340,7 +366,7 @@ do_combobox (GtkWidget *do_widget)
|
|||||||
renderer = gtk_cell_renderer_pixbuf_new ();
|
renderer = gtk_cell_renderer_pixbuf_new ();
|
||||||
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo), renderer, FALSE);
|
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo), renderer, FALSE);
|
||||||
gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combo), renderer,
|
gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combo), renderer,
|
||||||
"icon-name", ICON_NAME_COL,
|
"pixbuf", PIXBUF_COL,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
gtk_cell_layout_set_cell_data_func (GTK_CELL_LAYOUT (combo),
|
gtk_cell_layout_set_cell_data_func (GTK_CELL_LAYOUT (combo),
|
||||||
@@ -367,10 +393,10 @@ do_combobox (GtkWidget *do_widget)
|
|||||||
/* A combobox demonstrating trees.
|
/* A combobox demonstrating trees.
|
||||||
*/
|
*/
|
||||||
frame = gtk_frame_new ("Where are we ?");
|
frame = gtk_frame_new ("Where are we ?");
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), frame);
|
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
|
||||||
|
|
||||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||||
g_object_set (box, "margin", 5, NULL);
|
gtk_container_set_border_width (GTK_CONTAINER (box), 5);
|
||||||
gtk_container_add (GTK_CONTAINER (frame), box);
|
gtk_container_add (GTK_CONTAINER (frame), box);
|
||||||
|
|
||||||
model = create_capital_store ();
|
model = create_capital_store ();
|
||||||
@@ -393,12 +419,13 @@ do_combobox (GtkWidget *do_widget)
|
|||||||
gtk_tree_path_free (path);
|
gtk_tree_path_free (path);
|
||||||
gtk_combo_box_set_active_iter (GTK_COMBO_BOX (combo), &iter);
|
gtk_combo_box_set_active_iter (GTK_COMBO_BOX (combo), &iter);
|
||||||
|
|
||||||
/* A GtkComboBoxEntry with validation */
|
/* A GtkComboBoxEntry with validation.
|
||||||
|
*/
|
||||||
frame = gtk_frame_new ("Editable");
|
frame = gtk_frame_new ("Editable");
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), frame);
|
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
|
||||||
|
|
||||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||||
g_object_set (box, "margin", 5, NULL);
|
gtk_container_set_border_width (GTK_CONTAINER (box), 5);
|
||||||
gtk_container_add (GTK_CONTAINER (frame), box);
|
gtk_container_add (GTK_CONTAINER (frame), box);
|
||||||
|
|
||||||
combo = gtk_combo_box_text_new_with_entry ();
|
combo = gtk_combo_box_text_new_with_entry ();
|
||||||
@@ -413,10 +440,10 @@ do_combobox (GtkWidget *do_widget)
|
|||||||
|
|
||||||
/* A combobox with string IDs */
|
/* A combobox with string IDs */
|
||||||
frame = gtk_frame_new ("String IDs");
|
frame = gtk_frame_new ("String IDs");
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), frame);
|
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
|
||||||
|
|
||||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||||
g_object_set (box, "margin", 5, NULL);
|
gtk_container_set_border_width (GTK_CONTAINER (box), 5);
|
||||||
gtk_container_add (GTK_CONTAINER (frame), box);
|
gtk_container_add (GTK_CONTAINER (frame), box);
|
||||||
|
|
||||||
combo = gtk_combo_box_text_new ();
|
combo = gtk_combo_box_text_new ();
|
||||||
@@ -433,9 +460,14 @@ do_combobox (GtkWidget *do_widget)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!gtk_widget_get_visible (window))
|
if (!gtk_widget_get_visible (window))
|
||||||
gtk_widget_show (window);
|
{
|
||||||
|
gtk_widget_show_all (window);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
gtk_widget_destroy (window);
|
gtk_widget_destroy (window);
|
||||||
|
window = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
return window;
|
return window;
|
||||||
}
|
}
|
||||||
|
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 985 B |