Commit Graph

187 Commits

Author SHA1 Message Date
Rui Matos
052c6e0681 scrolledwindow: Render the background so that it can be styled 2012-01-09 16:45:44 +00:00
Benjamin Otte
b526375e8f gtk: Fix compiler warnings from include fixes 2011-11-16 04:31:06 +01:00
Alexander Larsson
06a20d207a Fix build by adding include
build failed with a GTK_IS_VIEWPORT link error
2011-11-10 17:40:46 +01:00
Javier Jardón
b0a7db76fb Replace some references to the GtkTable, use GtkGrid instead 2011-09-29 12:38:49 +01:00
Matthias Clasen
53c90cebb2 Convert GailScrolledWindow to GtkScrolledWindowAccessible 2011-07-05 16:08:54 -04:00
Matthias Clasen
b9a59c2ad6 Clean up more includes
Mainly removing unused h/v includes, but also adding some that
will be necessary as replacements.
2011-06-07 20:54:23 -04:00
Matthias Clasen
fa1b967d4a GtkScrolledWindowPrivate: Improve struct packing 2011-04-12 12:42:37 -04:00
Matthias Clasen
d9fcc4c630 Silence new gcc warnings
gcc 4.6.0 has started to warn about set-but-unused variables.
So don't do that, then.
2011-01-23 21:51:38 -05:00
Pavel Holejsovsky
2fb1c06402 [GI] Add missing (out) and (array) annotations 2011-01-20 13:57:20 +01:00
Tristan Van Berkom
1ff8df1e18 Adding missing gtk-doc annotations.
GtkProgressBar:show-text, GtkScrolledWindow:min-content-width/height
are new properties in 3.0.
2011-01-08 18:46:46 +09:00
Benjamin Otte
f5a3af9b02 scrolledwindow: Update adjustment usage for sealing 2011-01-05 23:50:21 +01:00
Matthias Clasen
98440ad031 Remove gtktypeutils altogether
Based on patches by Javier Jardón.

https://bugzilla.gnome.org/show_bug.cgi?id=629955
2011-01-04 14:51:19 -05:00
Matthias Clasen
b5c6904c2f Drop explicit includes of gdkkeysyms.h
These are no longer needed. At the same time, port gtkimcontextsimpleseqs.h
to use the new GDK_KEY_ symbols.
2011-01-04 12:21:41 -05:00
Matthias Clasen
16877b4d7b Reduce includes of gtktypeutils.h to a minimum 2011-01-04 12:05:05 -05:00
Carlos Garnacho
e3457a83cf Make GtkScrolledWindow use GtkStyleContext 2010-12-28 19:25:48 +01:00
Tristan Van Berkom
c03a3ca601 Fixing GtkScrolledWindow inconsistent scrollbar visibility.
Also removing the hack to prevent hangs which is properly fixed by
the preceeding commit.
2010-11-19 00:53:19 +09:00
Chun-wei Fan
76dc9e6b53 gtk: fix C99-style variable declarations in various sources 2010-11-10 10:08:14 +08:00
Matthias Clasen
6929db78a3 fix up accidental exports 2010-11-09 13:51:55 -05:00
Matthias Clasen
185bb2837b Another attempt at scrolledwindow size allocation
Patches taken from bug 633278.
2010-11-09 13:19:42 -05:00
Tristan Van Berkom
ae71cf7209 Fixed hangs in TextView and ToolPalette
Fixed the hangs by adding a ->inside_allocation flag and avoiding to
queue resizes while inside the allocation loop. The extra queue'd resizes
were causing the scrolled window size_allocate() to perform the guess
again and again thus causing an infinite loop.
2010-10-30 23:10:43 +09:00
Tristan Van Berkom
338001ae48 Fixing typo in scrolled window
Seems with GtkScrollable interface we were setting the hadjustment as
the vadjustment, thanks to Cosimo Cecchi who debugged this and finally
found the typo.
2010-10-30 23:09:14 +09:00
Javier Jardón
570b90e218 Use gtk_scrollbar_new() instead gtk_[v|h]scrollbar_new() 2010-10-30 02:26:24 +02:00
Tristan Van Berkom
3fe0fb4ed9 Added GtkScrollablePolicy property to scrollable interface
This patch adds the GtkScrollablePolicy type property to GtkScrollable
and implements it in all subclasses. GtkScrolledWindow observes this
property to make a good guess about when to show/hide scrollbars for
height-for-width content.

Most scrollable children do not do height-for-width *yet* but
most certainly will (toolpalette, treeview, iconview, textview
widgets all TODO), for scrollable widgets that do have a minimum
and natural size, it's important for them to observe the state
of this property in order to properly drive the scroll adjustments
according to the desired GtkScrollablePolicy. This patch makes
GtkViewport do this.

Patch also adds tests/testscrolledwindow.c to display the effects
of this property.
2010-10-26 10:15:56 +09:00
Matthias Clasen
520a6aeb8f Fix up docs 2010-10-23 23:41:08 +02:00
Matthias Clasen
09ec50af90 Remove GtkScrollablePolicy again
This was a miscommunication, the properties need to live elsewhere.
2010-10-22 19:24:03 +02:00
Matthias Clasen
0d9ebb501d Move min-display-width/height to GtkScrolledWindow
It is just too annoying to have to implement these properties in
every scrollable. Instead, we now have ::min-content-height/width
in GtkScrolledWindow.

We also add GtkScrollablePolicy to determine how to size the
scrollable content.
2010-10-22 19:21:17 +02:00
Tadej Borovšak
55196a705f Add GtkScrollable interface
The GtkScrollable interface provides "hadjustment" and "vadjustment"
properties that are used by GtkScrolledWindow. It replaces
the ::set_scroll_adjustment signal. The scrollable interface
also has ::min-display-width/height properties that can be
used to control the minimally visible part inside a scrolled window.
2010-10-22 11:03:45 +02:00
Emmanuele Bassi
9f9edb662e settings: Move setting property registration in gtksettings.c
Some GtkSettings property are registered by other classes. This leads
to the "interesting" issue that setting GtkSettings:gtk-button-images
requires that the GtkButton class is referenced first - or that a
GtkButton is created.

https://bugzilla.gnome.org/show_bug.cgi?id=632538
2010-10-20 10:34:25 +01: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
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
Tristan Van Berkom
e85dad38e2 Added logic to GtkScrolledWindow when allocating height-for-width children.
This patch makes the scrolled window reconsider allocating the child
the full width or height (depending on the child's request mode) without
a scrollbar. For instance when the child is height-for-width; the child
will first be tested if the content's height for full allocated width
(without a vscrollbar) will allow the contents height for that width
to fit the allocated height.

Patch is a simplified version of code inspected in st-scroll-view.c.
Note that this patch assumes children will begin to scroll only after
reaching their minimum size; adding a property to the future
GtkScrollableIface to decide whether to scroll-to-minimum or scroll-to-natural
will effect this code (it should then reconsider whether the child
will scroll below the natural size instead of the minimum).

Patch addresses bug 629778.
2010-10-12 17:16:32 +09:00
Tristan Van Berkom
0e0d938cc3 Make GtkScrolledWindow offload border-width calculations to GtkContainerClass. 2010-10-12 17:10:55 +09:00
Javier Jardón
ee58c6c37d docs: Move documentation to inline comments: GtkScrolledWindow 2010-10-11 02:17:08 +02:00
Matthias Clasen
f53ad33994 Remove GtkObject completely 2010-09-26 22:18:19 -04:00
Javier Jardón
eac1959d2c Move destroy signal to GtkWidget
Also make GtkWidget derive from GInitiallyUnowned
2010-09-26 22:18:18 -04:00
Benjamin Otte
d9c9259861 Move GtkSizeRequest into GtkWidget
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".
2010-09-26 15:11:45 +02:00
Benjamin Otte
1d3f6b30b0 API: Rename gtk_cairo_paint_*() to gtk_paint_*()
Large patch, but just renaming.
Indentation should still mostly be correct because I took care of
keeping the indentation for this function name.
2010-09-26 15:11:42 +02:00
Benjamin Otte
ce2d6cc015 scrolledwindow: Port to draw vfunc 2010-09-26 15:11:38 +02:00
Benjamin Otte
5eabd8c6fa scrolledwindow: Move paint function into expose handler
Also remove the is_drawable() check. It will not be needed once we have
the draw vfunc.
2010-09-26 15:11:38 +02:00
Matthias Clasen
0f88b6808c GtkScrolledWindow: change default policy to 'automatic'
This change was proposed in bug 468672.
2010-09-21 20:14:46 -04:00
Matthias Clasen
e0aa12eb0a Tons of transfer annotations 2010-09-21 00:18:11 -04:00
Javier Jardón
b140884fec Use gtk_size_request_get_size() instead deprecated gtk_widget_size_request()
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=629598

Signed-off-by: Javier Jardón <jjardon@gnome.org>
Signed-off-by: Tristan Van Berkom <tristanvb@openismus.com>
2010-09-15 03:02:58 +02:00
Javier Jardón
9e81022bf6 Use gtk_size_request_get_size() instead deprecated gtk_widget_get_child_requisition()
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=629177
2010-09-13 21:26:01 +02:00
Colin Walters
913cdf3be7 GDK: Prefix key names with KEY_
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.
2010-09-08 18:51:44 -04:00
Javier Jardón
cc06f3dde6 GtkScrolledWindow: move public members to private structure 2010-08-31 01:34:02 +02:00
Javier Jardón
ff445e2b79 Use accessor functions to access GtkRange 2010-08-23 20:47:52 +02:00
Javier Jardón
482637a41e gtk/gtkscrolledwindow.c: use accessor functions to access GtkWidget 2010-08-22 21:25:25 +02:00
Javier Jardón
63d3b197c2 Add _gtk_bin_set_widget() internal function 2010-07-13 19:40:47 +02:00
Javier Jardón
4427760bcc Use GtkBin accessors 2010-07-13 19:40:47 +02:00
Javier Jardón
3a10216dd0 Use accessor functions to acces GtkContainer 2010-07-13 19:40:46 +02:00