Commit Graph

11036 Commits

Author SHA1 Message Date
Javier Jardón
743202261a Add deprecation guards for gtk_cell_renderer_get_size() 2010-09-19 17:47:09 +02:00
Matthias Clasen
1dcd209cdd Fix a few dubious return values in return_if_fail calls
These were pointed out in bug 623958.
2010-09-19 01:58:46 -04:00
Matthias Clasen
8e117b6f3a Add a rename-to annotation for gtk_tree_path_get_indices_with_depth
https://bugzilla.gnome.org/show_bug.cgi?id=621590
2010-09-19 01:15:17 -04:00
Matthias Clasen
6b4992d647 Point to the new GtkWidget align and margin properties 2010-09-19 01:01:09 -04:00
Matthias Clasen
35e0ad72e4 Another fix for the initial focus heuristic
We were trying to avoid selecting a label initially, but the code
was sometimes leaving labels selected when the focus eventually
ended up on a button instead.
2010-09-19 00:54:50 -04:00
Matthias Clasen
92411d2c84 Fix an annotation 2010-09-19 00:22:37 -04:00
Matthias Clasen
1243b4861c Use gdk_error_trap_pop_ignore() where appropriate 2010-09-18 23:17:31 -04:00
Johan Dahlin
19cab17c22 Add a couple of missing annotations 2010-09-18 13:43:06 -03:00
Johan Dahlin
60c920f228 [introspection] Do not parse private sources
Private sources include private headers which we may not be able
to parse properly since some of them use unsupported syntax such
as objective-c.
2010-09-18 13:43:00 -03:00
Johan Dahlin
8c3900f420 [introspection] Do not include internal api
GtkTextLayout is internal and unsupported, do not include
it in the gir
2010-09-18 13:28:52 -03:00
Javier Jardón
15a5a231fc Do not use deprecated gtk_cell_renderer_get_size()
Use gtk_cell_size_request_get_size() instead

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=629785
2010-09-17 19:59:56 +02:00
Javier Jardón
efbf04236e Change GtkEditable typedef from GtkEditableClass to GtkEditabeInterface
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=323904
2010-09-17 19:57:09 +02:00
Matthias Clasen
6e9349d858 Fix a trivial typo in a doc comment
https://bugzilla.gnome.org/show_bug.cgi?id=629733
2010-09-17 10:30:37 -04:00
Matthias Clasen
54077d61e2 Add some element-type annotations to gtk apis 2010-09-17 09:26:39 -04:00
Matthias Clasen
2f78aa3024 Rename h/v-align to h/valign
And adjust the getters and setters to match. Also include some
documentation by Havoc Pennington about adjustment of size requests
and allocations.
2010-09-15 20:14:56 -04:00
Matthias Clasen
b9f66d9197 Add docs for new API 2010-09-15 13:52:52 -04:00
Matthias Clasen
3e91238071 Add new api to gtk.symbols 2010-09-15 13:49:00 -04:00
Matthias Clasen
38e09dcbb1 Use gint instead of in for local consistency 2010-09-15 13:22:51 -04:00
Tor Lillqvist
57e0b9a979 Fix build on Windows
No idea of the widget embedding crack has worked in recent versions,
even less now. But at least it now compiles.
2010-09-15 14:19:40 +03:00
Tristan Van Berkom
1110375f24 spinner: Dont inherit from GtkDrawingArea part 2.
Seems commit 7b42d4feda makes
GtkSpinner a direct subclass of GtkWidget but forgets to
update the header file to include gtkwidget.h instead and
declare the instance and class structures properly (assuming
this was just a missed file in the commit).
2010-09-15 16:52:29 +09:00
Javier Jardón
f5a06df3dc spinner: timeout should add/remove in map/unmap, not realize/unrealize.
Otherwise hiding the spinner won't stop it
2010-09-15 04:00:55 +02:00
Javier Jardón
8345760fdb gtkentry: remove unnneded check in map/unmap functions 2010-09-15 03:28:24 +02:00
Javier Jardón
e3a8e29a6c Add deprecation guards for gtk_widget_size_request() 2010-09-15 03:14:34 +02: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
Tristan Van Berkom
8bfb1e0ab8 Fixed GtkSizeGroups to adjust both minimum and natural requisitions
Originally the GtkSizeRequestIface patches left GtkSizeGroup working
only by bumping the minimum sizes - this commit fixes size groups to take
both minimum and natural requests into account.
2010-09-15 04:04:02 +09:00
Javier Jardón
ab4ba69cc8 Add deprecation guards for gtk_cell_view_get_size_of_row() 2010-09-14 20:40:34 +02:00
Benjamin Otte
7b42d4feda spinner: Don't inherit from drawing area
A drawing area is not meant to be subclassed from. It also doesn't
provide any feature a spinner would need either.
2010-09-14 01:28:01 +02:00
Benjamin Otte
032d3f0ada spinner: Implement the size request interface
Doing size requests in expose is broken.
2010-09-14 01:25:07 +02:00
Benjamin Otte
c22b80949d spinner: Move G_DEFINE_TYPE() below function definitions
Also remove redundant double definition.
2010-09-14 01:19:48 +02:00
Benjamin Otte
419e1548ab wrapbox: Lookie, an unused variable 2010-09-14 01:17:17 +02:00
Benjamin Otte
5ba6295a10 spinner: Define desired size at top of file
No magic numbers in the code please
2010-09-14 01:09:53 +02:00
Matthias Clasen
ff29972a48 GtkWrapBox: let GtkContainer handle border width 2010-09-13 18:47:59 -04:00
Matthias Clasen
b64e91adf0 Remove fill options from GtkWrapBox
GtkWidget alignment properties make this unnecessary in new containers.
2010-09-13 18:47:59 -04:00
Matthias Clasen
0e484a83d1 Remove padding from GtkWrapBox
GtkWidget margins make this unnecessary in new containers.
2010-09-13 18:47:58 -04:00
Matthias Clasen
8204fe6036 GtkBox: let GtkContainer handle border width 2010-09-13 18:47:58 -04:00
Javier Jardón
97ffc36540 Add deprecation guards for gtk_widget_get_child_requisition() 2010-09-13 22:37:11 +02:00
Milan Bouchet-Valat
e02252cdd6 bgo#486839 - Fix path bar size group in the file chooser
Since the location button is hidden in save mode, we need to add the
path bar to the size group too. The location button still has to be in
the group though, because it's larger than the path bar (when
shown). Instead of using the recent/search icons, add their hboxes so
that themed widget spacings don't introduce variations.
2010-09-13 14:57:23 -05: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
Tristan Van Berkom
153bfacde0 Fixed GtkWrapBox to allocate variable row AND column heights when in ALIGNED mode
With this new approach at request and allocate time, the average child size
is used to determine a good guess at how many columns will fit the box
width; afterwards extra columns are appended and checked to fit.
Then the row heights are calculated based on height-for-width of each
child in the row which now may have individual widths.
2010-09-14 02:32:36 +09:00
Tristan Van Berkom
a79637f081 Changed GtkWrapBox code to avoid a growing GArray of a known size. 2010-09-14 02:32:36 +09:00
Kristian Rietveld
a79d6676ac Update gtkstyle.c to account for removal of row-ending-details
The detail strings now have more "detail" by default, so gtkstyle.c
needed to be updated to properly handle this.  Tests like testtreeview,
testtreesort now have proper background drawing again.

This strncmp trick was the best I could think of so quickly, if anybody
has an idea to do this in a better way, let me know.
2010-09-13 17:13:21 +02:00
Kristian Rietveld
ecaa37529c Mark declaration of symbol _gtk_text_unknown_char_utf8 as extern
So that the symbol is not re-created each time the header is included.
The symbol is defined in gtktexttypes.c already.
2010-09-13 16:47:14 +02:00
Kristian Rietveld
31cd439385 Use accessor functions to access GtkWidget 2010-09-13 16:39:55 +02:00
Kristian Rietveld
0fc5433753 Update for GDK key name changes 2010-09-13 16:27:08 +02:00
Havoc Pennington
474f80442a Add margin and alignment properties to GtkWidget
h-align = START,END,CENTER,FILL
v-align = START,END,CENTER,FILL
margin-left,right,top,bottom
margin

These should obsolete all such similar properties on
layout containers, GtkMisc, GtkAlignment, GtkContainer::border-width

Margin is outside the size request.
If margin were not outside the set_size_request() it would not work the
same way as container-supplied (child property) padding.

Conceptually set_size_request() forces the value from the subclass
(the original unadjusted request) and then we go on to adjust
the request further by adding the margin.
2010-09-12 21:47:10 -04:00
Havoc Pennington
85735112d7 GtkButton: let GtkContainer handle border width 2010-09-12 21:47:10 -04:00
Havoc Pennington
daebca19da add gtk_container_class_handle_border_width() so subclasses can ignore border_width
A subclass calls gtk_container_class_handle_border_width()
in its class_init

This marks the subclass as expecting GtkContainer to deal with
border width automatically, which GtkContainer then does.
2010-09-12 21:47:10 -04:00
Havoc Pennington
cd2a19a68d GtkWidget: add adjust_size_request adjust_size_allocation virtual funcs
Use these new methods to handle set_size_request (aka aux_info)
inside gtkwidget.c, instead of having external code mess with it.

The virtual functions can be used for other purposes in the
future. For example, GtkContainer::border_width could be
automatically implemented for all container subclasses.
2010-09-12 21:47:10 -04:00
Havoc Pennington
9debfe243f Use _gtk_widget_get_aux_info_or_defaults() when possible in gtkwidget.c
Did not update uses in other files because the plan is to
get rid of those other uses anyhow. So don't want to make
this function available in the header.
2010-09-12 21:47:10 -04:00
Havoc Pennington
cf68c2636a add _gtk_widget_get_aux_info_or_defaults()
This is better than peeking aux info then testing != NULL
in several ways:
- it returns const aux info so if we don't create we can't write
- it ensures that the default we assume if aux_info is NULL is
  the same as the default we set if we've created the aux info
- it avoids typing in != NULL checks
2010-09-12 21:47:10 -04:00