Commit Graph

23204 Commits

Author SHA1 Message Date
Christian Dywan
7a5a5e9c5d Added GtkComboBoxText api
This is a derived class of GtkComboBox to replace the
gtk_combo_box_*_text() convenience API.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=612396

Signed-off-by: Javier Jardón <jjardon@gnome.org>
2010-10-15 16:58:26 -04:00
John Ralls
27ad64dccf Bug 631719 - Restore second, more important, call to set label from the menu item. 2010-10-15 13:14:19 -07:00
Javier Jardón
80d3f1fcda docs: update OSX port project page 2010-10-15 20:55:32 +02:00
Alberto Garcia
8d05e74212 Make gtk_accelerator_get_default_mod_mask() return a GdkModifierType
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=313350
2010-10-15 14:46:22 -04:00
Christian Persch
b5621b3c89 Take cursor hotspot from pixbuf if available
Allow -1 for the hotspot coordinates in gdk_cursor_new_from_pixbuf,
if the pixbuf contains the x_hot/y_hot options with appropriate values.

Bug #632140.
2010-10-15 14:38:21 -04:00
Javier Jardón
cbc358ead8 docs: Document GtkScrolledWindow's signals
Based on a patch by Björn Lindqvist
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=351247
2010-10-15 20:34:07 +02:00
Matthias Clasen
921fc8807c Deprecate gtk_init_add, gtk_remove_add and friends
This functions are going to be removed in GTK+ 3.

https://bugzilla.gnome.org/show_bug.cgi?id=629955
2010-10-15 14:13:32 -04:00
Colin Walters
18578b33c5 Add boxed type and constructor
This allows bindings to sanely construct these.

https://bugzilla.gnome.org/show_bug.cgi?id=632095
2010-10-15 13:54:37 -04:00
Matthias Clasen
f87023d8ee Forgotten file 2010-10-15 13:07:08 -04:00
Matthias Clasen
0ff28d72f6 examples: build examples that are included in the docs
We build the examples that are included in the 'getting started'
chapter of the docs to prevent them from bitrotting. Also
remove the awk scripts used to extract the old examples from
the tutorial, since the tutorial is gone. I'm still leaving
the examples themeselves in place, for possible inclusion in
'getting started' later on.
2010-10-15 13:02:50 -04:00
Matthias Clasen
ef7fddac3b docs: Drop the old tutorial
The tutorial is outdated, essentially stuck at GTK+ 2.0.
At this point, it is more misleading than helpful.
2010-10-15 13:02:50 -04:00
Matthias Clasen
28cb8583c3 docs: move some tutorial content to the reference
We add a "Getting started" chapter that will grow into a
(hopefully) non-outdated, maintained tutorial. For now, it
includes two minimal examples by xincluding them.
2010-10-15 13:02:50 -04:00
Emmanuele Bassi
f085c8b272 docs: Move the introduction of the tutorial in the reference
The tutorial should just go away, but some of its contents can be moved
to the API reference as chapters.

https://bugzilla.gnome.org/show_bug.cgi?id=632059
2010-10-15 13:02:50 -04:00
Benjamin Otte
22d28ef47d x11: Don't set ParentRelative if the parent's visual is different
It's like 82e6e32c, but when a pattern is given as argument.

https://bugzilla.gnome.org/show_bug.cgi?id=632218
2010-10-15 17:10:05 +02:00
Matthias Clasen
56e797397b Improve GtkBox and GtkTable docs a bit
This adds some details gleaned from the tutorial, before its
impending demise.
2010-10-15 10:58:35 -04:00
Emmanuele Bassi
17ffcb0cc6 link-button: Add ::activate-link signal
We cannot use the GtkButton::clicked signal to override the default
behavior of GtkLinkButton (i.e. call gtk_show_uri()), because
GtkButton::clicked is registered as a RUN_FIRST signal, which obviously
prevents any other signal handler connected to it to stop the
propagation before the class handler has a chance to run.

For this reason we can add a GtkLinkButton::activate-link signal, which
will be emitted by the default GtkButton::clicked signal handler; the
::activate-link signal has a boolean return value, which allows simpler
code for stopping the propagation to the next signal handler.

https://bugzilla.gnome.org/show_bug.cgi?id=632150
2010-10-15 10:36:01 +01:00
Tristan Van Berkom
d7c7f010b0 Removed screwy GtkScrolledWindow logic
Removed portion of scrolled-window that observes user-set
size request data (aux_info->width/height) on the child directly
in order to derive it's minimum possible size... if the scrolled
window has (auto/always) scrollbars in a said orientation; only
request enough space for the scrollbars (bug 631976).
2010-10-15 14:14:14 +09:00
Matthias Clasen
479dc131ee Implement get_preferred_width/height in GtkEventBox
And drop size_request.
2010-10-14 23:04:24 -04:00
Matthias Clasen
aaf0f0f5c3 Use gtk_container_handle_border_width() in GtkEventBox 2010-10-14 22:34:39 -04:00
Matthias Clasen
bda1f35585 Inclusion cleanups in sources
Try to do inclusions in the same sequence, more or less.
2010-10-14 22:09:36 -04:00
Matthias Clasen
88ef199ed7 Inclusion cleanups in headers 2010-10-14 22:08:53 -04:00
Matthias Clasen
9d644e9d2d Make gdk.h an include-only header
Move declarations to other headers, and introduce some new ones:
gdkmain.h, gdkrectangle.h, gdkthreads.h.
2010-10-14 22:08:48 -04:00
Matthias Clasen
e613d26448 Drop dead gxid_proto.h header
This header is no longer used.
2010-10-14 22:08:26 -04:00
Matthias Clasen
9ff4f0819f Some GDK documentation fixes 2010-10-14 21:45:56 -04:00
Fridrich Štrba
733f1710c6 Enable the build of MS Windows engine again
The MS Windows engine compiles anew, so enable it so that one can fix remaining issues
2010-10-14 20:56:30 +02:00
Federico Mena Quintero
85e47b5c4e Part of bgo#613728 - [GtkTreeView] Focus the list, not the headers, when Tab-focusing
The idea is that it is way more common to want to manipulate the
actual list, rather than the headers.  Once you Tab into the treeview
(and the list part gets the focus), you can use Shift-Tab to focus
the headers.

This means that some hysteresis is added to the focus chain, but
it makes the treeview a lot more convenient to focus with the keyboard.

Signed-off-by: Federico Mena Quintero <federico@novell.com>
2010-10-14 13:17:46 -05:00
Kristian Rietveld
5cbb309841 Initialize device_cursor hash table before creating impl window 2010-10-14 18:01:51 +02:00
Kristian Rietveld
aeec832f0e Do not call validate_visible_area() from the draw method
Because validate_visible_area() can modify the window size (and thus
the underlying surface), it should not be called from within the draw
method.  Given that the presize handler is run with a higher priority
than redraw, and the presize handler will validate the visible area,
there should not be cases wherein the draw method is called and
validate_visible_area() has not been run yet.

However, one such a case was gdk_window_process_updates(), which would
trigger the draw method at some point.  We now work around this
by factoring this in a new gtk_tree_view_bin_process_updates() function
that will run the presize handler first if needed.

Note: for other platforms, it might still be the case that the draw
method is called and validate_visible_area() has not been run yet.
(For example the Mac backend calls gdk_window_process_updates() from
the drawRect method, and the redraw-in-idle handling thus works
differently).  This does not seem to be a problem now, if
it will be in the future we need to take care of that then.
2010-10-14 17:26:17 +02:00
Kristian Rietveld
4fc31dd87a Add test for bug 163214 2010-10-14 16:47:00 +02:00
Kristian Rietveld
51820d3e34 Add test for bug 111500
This test is constructed in such a way that it breaks when you
(currently!) do not trigger a size-request from validate_visible_area.
Especially row expansion appears to have a need for this currently.
2010-10-14 16:47:00 +02:00
Kristian Rietveld
e774e235d7 Add unit test for bug 93584 2010-10-14 16:47:00 +02:00
Kristian Rietveld
359818d6b7 Also test scrolling to a new row in a mixed height model 2010-10-14 16:47:00 +02:00
Martin Schlemmer
3d31254fd9 Trying to fix MS Windows engine 2010-10-14 14:20:04 +02:00
Matthias Clasen
34b117865a Initialize variables
valgrind was complaining about uninitialized values here, and
sure enough, gdkdevice-xi.c doesn't set device position.
2010-10-14 08:14:33 -04:00
Benjamin Otte
407b73dd80 build: Require cairo-gobject for GDK
With the new signal added, GDK now also requires cairo-gobject.
2010-10-14 13:53:23 +02:00
Michael Natterer
4ca2632d42 gdk: add slots for all GdkWindowObject signals
Also add padding for future extension.
2010-10-14 13:43:08 +02:00
Michael Natterer
9d9742f1e5 Bug 631599 - Allow to use arbitrary surfaces for offscreen windows
Add signal GdkWindow::create-surface which allows to use any
surface type as storage for offscreen windows.

Test the new signal in tests/gdkoffscreenbox.c
2010-10-14 13:25:23 +02:00
Michael Natterer
10c76c1c95 gtk: add cast to fix warning in my last commit 2010-10-14 11:35:30 +02:00
Cody Russell
44cb3bcfed Implement style_set() for GtkWindow to resize window grips when the style changes. 2010-10-13 23:04:11 -05:00
Tristan Van Berkom
9612c64817 Deprecate GtkComboBoxEntry in favor of added properties to GtkComboBox
GtkComboBox now sports a construct-only "has-entry" property which
decides if it uses a GtkEntry to allow additional user input. Also
it has a new "entry-text-column" to fetch strings for the entry
from the model.

This patch deprecates the GtkComboBoxEntry and updates the rest of GTK+
to use the new semantics on GtkComboBox instead.

GtkComboBoxEntry will be removed altogether before GTK+ 3, in a
later commit.
2010-10-13 21:52:27 -04:00
Matthias Clasen
7c8ee80c5a Add new API to docs and symbol list 2010-10-13 11:24:56 -04:00
Matthias Clasen
7791013754 Support GtkWidget expand properties in GtkNotebook
We expand a tab if either tab-expand is set, or the generic widget
expand property in the correct direction is set. And we do not
propagate expand flags from tab labels to the notebook, only
the expand flags from the pages.
2010-10-13 10:49:06 -04:00
Matthias Clasen
48de50df89 Support GtkWidget expand properties in GtkTable
We expand a child when it either has the table-specific expand flag
or the generic expand property set. Override compute_expand so that
it also takes the table-specific expand flags of children into
account.

https://bugzilla.gnome.org/show_bug.cgi?id=628902
2010-10-13 10:49:06 -04:00
Matthias Clasen
29ce9e679a Add a GtkTable testcase 2010-10-13 10:49:06 -04:00
Havoc Pennington
8abb18f910 Support GtkWidget expand properties in GtkBox
This consists of:
* expand a child if either child->expand || gtk_widget_get_expand(child)
* override compute_expand so that child->expand will cause us to
  return TRUE for gtk_widget_get_expand()

https://bugzilla.gnome.org/show_bug.cgi?id=628902
2010-10-13 10:49:06 -04:00
Havoc Pennington
7597a35477 add tests/testexpand.c used to test the expand props on GtkWidget
There are two colored boxes with toggle buttons nested
inside several GtkBox. Toggling these to expand mode
should automatically propagate expansion up through
the several GtkBox such that resizing the window
results in resizing the colored boxes.

https://bugzilla.gnome.org/show_bug.cgi?id=628902
2010-10-13 10:49:04 -04:00
Havoc Pennington
031856eb33 Add horizontal and vertical expand flags, compute_expand() to GtkWidget
GtkWidget now has flags for horizontal and vertical expand, and
a compute_expand() method. compute_expand() is used by containers
to set a default expand flag. (If a widget has expand set explicitly,
it always overrides the results of compute_expand.)

GtkContainer has a default implementation of compute_expand which
simply walks over all child widgets and sets expand=TRUE
if any child is expanding.

The overall effect is that you only have to set expand on
leaf nodes in the widget tree, while previously you had to
set expand all the way up the tree as you packed every
container. Also, now containers need not have their own child
properties for expand.

For old containers which do have "expand" child properties,
they should override compute_expand and include the child
properties in whether the container is expand=TRUE.
Also, the old container should use
"child_prop_expand || gtk_widget_compute_expand()" everywhere
it previously used simply "child_prop_expand"

https://bugzilla.gnome.org/show_bug.cgi?id=628902
2010-10-13 10:40:07 -04:00
Matthias Clasen
7d5a85c3ad Some more resize grip cleanups
Don't recompute hints whenever we determine the drag edge, and
take the drag edge into account when deciding whether to show
the grip.
2010-10-13 10:39:09 -04:00
Matthias Clasen
9e661ed0e9 Unify handling of GtkWindow::resizable property 2010-10-13 10:23:51 -04:00
Matthias Clasen
b36819957f Remove GtkWrapBox from the docs, too 2010-10-13 10:21:04 -04:00