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
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.
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
If you set a geometry widget via gtk_window_set_geometry_hints() it
becomes very hard to compute appropriate toplevel sizes in pixels
to make the window a particular size. Synthesizing strings and passing
them to gtk_window_parse_geometry() is possible, but to avoid
avoid such ugliness, add functions:
gtk_window_set_default_geometry()
gtk_window_resize_to_geometry()
That act like gtk_window_set_default_size() and
gtk_window_resize() but are in terms of the resize increments of the
geometry widget.
https://bugzilla.gnome.org/show_bug.cgi?id=631796
The geometry widget feature of gtk_window_set_geometry_hints() has
never really worked right because the calculation that GTK+ did to
compute the base size of the window only worked when the geometry
widget had a larger minimum size than anything else in the window.
Setup:
* Move the GtkSizeGroup private functions to a new private header
gtksizegroup-private.h
* Add the possibilty to pass flags to _gtk_size_group_queue_resize(),
with the flag GTK_QUEUE_RESIZE_INVALIDATE_ONLY to suppress adding
the widget's toplevel to the resize queue.
* _gtk_container_resize_invalidate() is added to implement that feature
* _gtk_widget_override_size_request()/_gtk_widget_restore_size_request()
allow temporarily forcing a large minimum size on the geometry
widget without creating resize loops.
GtkWindow:
* Compute the extra width/height around the geometry widget
correctly; print a warning if the computation fails.
* Always make the minimum size at least the natural minimum
size of the toplevel; GTK+ now fails badly with underallocation.
* Always set the base size hint; we were failing to set it
properly when the specified minimum size was overriden, but
it's harmless to always set it.
Tests:
* New test 'testgeometry' that replaces the 'gridded geometry' test
from testgtk. The new test is roughly similar but creates a bunch
of windows showing different possibilities.
* The testgtk test is removed. No need to have both.
https://bugzilla.gnome.org/show_bug.cgi?id=68668
When fitting a widget into its allocation, the second dimension
is always dependent on the first, so gtk_widget_get_preferred_size()
cannot be used directly (because we want the natural height for
the allocated width, not the natural height for the natural width,
which is generally a smaller height than the height-for-minimum-width
or height-for-allocated-width).
Added test to testadjustsize to ensure proper behaviour.
It doesn't make sense to keep them separate as GtkSizeRequest requires a
GtkWidget and GtkWidget implements GtkSizeRequest, so you can never have
one without the other.
It also makes the code a lot easier because no casts are required when
calling functions.
Also, the names would translate to gtk_widget_get_width() and people
agreed that this would be a too generic name, so a "preferred" was added
to the names.
So this patch moves the functions:
gtk_size_request_get_request_mode() => gtk_widget_get_request_mode()
gtk_size_request_get_width() => gtk_widget_get_preferred_width()
gtk_size_request_get_height() => gtk_widget_get_preferred_height()
gtk_size_request_get_size() => gtk_widget_get_preferred_size()
gtk_size_request_get_width_for_height() =>
gtk_widget_get_preferred_width_for_height()
gtk_size_request_get_height_for_width() =>
gtk_widget_get_preferred_height_for_width()
... and moves the corresponding vfuncs to the GtkWidgetClass.
The patch also renames the implementations of the vfuncs in widgets to
include the word "preferrred".
gtk_widget_get_snapshot is on its way out.
The test can be added back once we have gtk_widget_draw(), but until
then, there's no way to take snapshots.
Replace gtk_widget_shape_combine_region() with
gtk_widget_shape_combine_mask() and
gtk_widget_input_shape_combine_region() with
gtk_widget_input_shape_combine_mask().
As GdkBitmap is going away, and the region equivalents already exist,
this seems like pretty much the default step to take.
Includes code to fix up the users.
Dealing with bare pointers is problematic for language bindings,
using interned strings is much more straightforward and more than
good enough for what is needed here.
http://bugzilla.gnome.org/show_bug.cgi?id=630521
Now GtkWrapBox has "horizontal-spreading" and "vertical-spreading" options,
before GtkWrapBox never spread out children across the opposing orientation
(i.e. it never grew "lines" larger then their natural width, they would
act as if set to GTK_WRAP_BOX_SPREAD_START, now they are completely configurable).
When an error occurs with nested traps in place, only the innermost
trap should have the error code stored in it; outer traps are
shielded by the inner trap.
https://bugzilla.gnome.org/show_bug.cgi?id=629608
* don't lose track of previous X error handler
if nested traps are pushed
* free any remaining traps when display
is finalized
Test will fail unless bug 630032 is closed so
gdk_display_close() works.
https://bugzilla.gnome.org/show_bug.cgi?id=630033
This was added to the test only for the sake of making it
easier to reproduce a bug with scrolled windows (bug 629778).
Expected behaviour: The vertical scrollbar should dissapear as soon
as the required height for the full allocation width (without any
vertical scrollbar) is small enough to not need a scrollbar.
Rename the gtk_major_version() etc functions I introduced yesterday to
start with gtk_get. Avoids misleading results in client programs whose
developers that don't notice the change or the compiler warnings, and
when recompiling against gtk3 then use the function addresses as the
version numbers.
The keysyms create a lot of potential namespace conflicts for
C, and are especially problematic for introspection, where we take
constants into the namespace, so GDK_Display conflicts with GdkDisplay.
For C application compatiblity, add gdkkeysyms-compat.h which uses
the old names.
Just one user in GTK+ continues to use gdkkeysyms-compat.h, which is
the gtkimcontextsimple.c, since porting that requires porting more
custom Perl code.
Having variables exported from a DLL is slightly painful and
potentially error-prone on Windows, so let's try get rid of them now
when we can. Starting with these.
Made an enum GtkWrapBoxPacking for the expand/fill horizontal/vertical
boolean options... changed xpadding/ypadding to be horizontal-padding
and vertical-padding for a more consistent api and better readablility.
These have been deprecated and removed from master.
GtkWindow:resizable should be used instead.
This completes commit 1a03a65e36
Reported by Benjamin Otte
Also like the GtkExpander, the label widget is allocated the minimum
height for its allocated width and the remaining space is given to
the child, test case included.
Now the expander requests and distributes space naturally,
the expander widget prioritizes the child widget vertically
and only allocates the minimum height for width to the label
widget.
Includes fixing all callers to use the cairo region API instead. This is
usually just replacing the function names, the only difference is
gdk_region_get_rectangles() being replaced by
cairo_region_num_rectangles() and cairo_region_get_rectangle() which
required a bit more work.
https://bugzilla.gnome.org/show_bug.cgi?id=613284
The old version wasn't introspectable as it didn't have a length
return parameter. Also, delete gtk_tree_path_get_indices_with_depth,
since it's no longer needed.
This commit makes a few massive changes to the extended layout
code:
a.) gtkextendedlayout.c --> gtksizerequest.c
b.) _is_height_for_width --> get_request_mode()
c.) get_desired_size(), get_desired_width(), get_desired_height() -->
get_size(), get_width(), get_height()
This is the first partial commit and only effects portions
of the tree that have already been merged in master (in order to
easily cherry pick this commit).
Conflicts:
gtk/Makefile.am
gtk/gtk.h
gtk/gtk.symbols
gtk/gtkextendedlayout.h
The entire api was deprecated since 2.0. This patch detangles
GtkProgress from GtkProgressBar and moves all the pieces into
GtkProgressBar that are required for non-deprecated progressbar
functionality.
Bug #620618
This is a work in progress to stub out an application class. The
primary goal is to provide a mechanism for applications to export
GtkActions, and there is a standard "Quit" action.
This is based on GApplication.
Future work:
* Add a way to say "This is my application menubar", which gets
put into all toplevel windows on non-OS-X, and into the top
on OS X.
* Support session management.
* Support application settings.
https://bugzilla.gnome.org/show_bug.cgi?id=127958
Use ::keynav-failed for arrow navigation in icon views, so that
it is possible to override error handling. Also add API to get the
row/col of an item. With this, it is possible to make arrow keynav
span adjacent icon views, which is desired in the new control-center
shell. testiconview-keynav demonstrates this.
Bring the various 'run uninstalled' hacks in line with the
new way of doing things, and fix make install for module cache
files.
Patch by Tadej Borovsak.
In particular, rename
- libraries to lib*-3.0.so
- pc files to *-3.0.pc
- include paths to /usr/include/gtk-3.0/*
- module paths to /usr/lib/gtk-3.0/*
- rc files names to gtk-3.0/gtkrc
- commandline utilities to *-3.0
- adjust documentation
Also change the install location for unix-print headers to
/usr/include/gtk-3.0/unix-print/gtk.
This test is a collection of builder files which demonstrate the
added features of natural sizes and height-for-width geometry; so
far it only contains 3 cases, more to come...
Deprecate widget flag macros GTK_WIDGET_STATE, GTK_WIDGET_SAVED_STATE,
GTK_WIDGET_FLAGS, GTK_WIDGET_TOPLEVEL, GTK_WIDGET_NO_WINDOW and
GTK_WIDGET_COMPOSITE_CHILD.
Also deprecate the type macros GTK_WIDGET_TYPE, GTK_OBJECT_TYPE_NAME and
GTK_OBJECT_TYPE which have become redundant.
Instances of GTK_WIDGET_TOPLEVEL are replaced with gtk_widget_is_toplevel,
GTK_WIDGET_TYPE is replaced with G_OBJECT_TYPE, GTK_WIDGET_COMPOSITE_CHILD
is replaced with use of the "composite-child" property and uses of
GTK_WIDGET_NO_WINDOW are adjusted to use gtk_widget_get_has_window.
Uses of GTK_WIDGET_SAVED_STATE and GTK_WIDGET_FLAGS inside GtkWidget are
changed to direct flag usage.
Documentation is updated to refer to gtk_widget_set_has_window and
gtk_widget_get_has_window.
Gail and tests are updated as well.
Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=69872
This adds LDFLAGS everywhere where they were previously pulled in via
other libraries. This is however unsupported by modern linkers.
You can trigger these failures by building with gold (or, I'm told, with
very new ld).