Commit Graph

23071 Commits

Author SHA1 Message Date
Matthias Clasen
82712a150a Some documentation updates 2010-10-12 00:33:38 -04:00
Matthias Clasen
e0c2a4e10f Inspect geometry when setting resize grip cursors
We want to use the same cursor as metacity when the window is only
resizable in one dimension.
2010-10-11 23:26:58 -04:00
Owen W. Taylor
a4a7a611f2 GtkWindow: Allow setting size from geometry
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
2010-10-11 14:06:16 -04:00
Owen W. Taylor
519d758711 Warn when calling gtk_window_parse_geometry() on an empty window
gtk_window_parse_geometry() gets the size of the window in order
to interpret the position of the window; calling it before, say,
calling gtk_widget_show_all() on a window is a subtle trap, so
add a warning in the case we can easily detect.

https://bugzilla.gnome.org/show_bug.cgi?id=631794
2010-10-11 14:06:03 -04:00
Owen W. Taylor
88cf547029 Fix handling of the geometry widget
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
2010-10-11 14:05:29 -04:00
Tristan Van Berkom
c250a7e673 Added documentation to GtkContainer about implementing containers using height-for-width apis. 2010-10-12 00:47:43 +09:00
Vincent Untz
4490aeddf7 build: Distribute README.multipress
https://bugzilla.gnome.org/show_bug.cgi?id=631872
2010-10-11 15:21:56 +02:00
Fran Diéguez
70228649ee Updated Galician translations 2010-10-11 10:22:04 +02:00
Ivar Smolin
4588408268 [l10n] Updated Estonian translation 2010-10-11 09:40:35 +03:00
Javier Jardón
c2ab54a31f docs: Move documentation do inline comments: GtkContainer 2010-10-11 05:13:45 +02:00
Javier Jardón
cabc386252 docs: Improve reference crossing in GtkWidget docs 2010-10-11 05:04:20 +02:00
Xan Lopez
71b4d83144 Plug memory leak in GtkWindow
1,936 (112 direct, 1,824 indirect) bytes in 4 blocks are definitely lost in loss record 13,453 of 13,673
    at 0x4005BDC: malloc (vg_replace_malloc.c:195)
    by 0x69615A1: cairo_region_create (cairo-region.c:196)
    by 0x683BFBF: gdk_cairo_region_create_from_surface (gdkcairo.c:455)
    by 0x670C882: set_grip_shape (gtkwindow.c:5020)
    by 0x670CFBF: resize_grip_create_window (gtkwindow.c:5271)
    by 0x670C466: gtk_window_realize (gtkwindow.c:4902)

Signed-off-by: Benjamin Otte <otte@redhat.com>
2010-10-11 02:33:25 +02:00
Xan Lopez
3f3d33ee6c Plug leak in gdkcairo.c
1,968 (1,236 direct, 732 indirect) bytes in 1 blocks are definitely lost in loss record 11,816 of 11,947
   at 0x4025BDC: malloc (vg_replace_malloc.c:195)
   by 0x6950676: _context_get (cairo.c:250)
   by 0x6950940: cairo_create (cairo.c:370)
   by 0x685CD1E: _gdk_cairo_surface_extents (gdkcairo.c:381)
   by 0x685CEDA: gdk_cairo_region_create_from_surface (gdkcairo.c:433)

Signed-off-by: Benjamin Otte <otte@redhat.com>
2010-10-11 02:33:09 +02:00
Javier Jardón
ee58c6c37d docs: Move documentation to inline comments: GtkScrolledWindow 2010-10-11 02:17:08 +02:00
Javier Jardón
9009683247 docs: Region returned by gdk_cairo_region_create_from_surface() should be freed 2010-10-11 02:17:08 +02:00
Gil Forcada
0afd8be7ef Updated Catalan translation 2010-10-10 23:22:40 +02:00
Simos Xenitellis
120a1006da l10n: Updated Greek translation for gtk+ properties 2010-10-10 21:18:39 +03:00
Jorge González
6c258b863d Updated Spanish translation 2010-10-09 14:26:20 +02:00
A S Alam
ff2476152b updating translation for Punjabi 2010-10-09 08:27:32 +05:30
Matthias Clasen
9d750ad13e Fix a problem with 'resize grip avoidance' in scrollbars
We need to be a little more careful when determining the overlap
between the new allocation and the grip area. This was causing
vertical scrollbars in evince to overlap with the grip.
2010-10-08 22:04:33 -04:00
Matthias Clasen
2f8f0d8eab Check for grip_window != NULL in gtk_window_draw
This is safer, since GtkWindow subclasses may override realize
and end up with has_resize_grip == TRUE, but grip_window still
being NULL - as is the case with GtkPlug.
2010-10-08 20:19:24 -04:00
William Jon McCann
de3e703444 gail: GtkTreeViewColumn doesn't have a destroy signal anymore
Replace with g_object_set_qdata_full usage.
2010-10-08 19:57:06 -04:00
William Jon McCann
f8b573766d Don't assume widgets are containers when walking the focus tree
This causes problems for links in labels.
2010-10-08 19:27:35 -04:00
Colin Walters
6c537bd0bf autogen: Explicitly allow libtool > 2.2
Apparently 2.4 is out, I'm not aware of a reason we shouldn't
allow it.
2010-10-08 16:46:50 -04:00
Matthias Clasen
31a45c957c Fix grip window positioning
We need to position the grip window in size_allocate after all,
otherwise the grip ends up in the wrong place when the window
is realized early.

Also, avoid shadowing a variable.
2010-10-08 14:21:11 -04:00
Matthias Clasen
0ebf090d9e Don't show resize grips on override-redirect window 2010-10-08 14:01:46 -04:00
Matthias Clasen
9b9ccb56b1 Make GtkPaned use gtk_container_class_handle_border_width 2010-10-08 11:11:33 -04:00
Matthias Clasen
f7418b1652 Make GtkPaned use gtk_container_class_handle_border_width 2010-10-08 10:45:24 -04:00
Matthias Clasen
c113b8e229 Make GtkPathBar use gtk_container_class_handle_border_width 2010-10-08 10:27:00 -04:00
Tristan Van Berkom
5a7cfa7fb9 Migrated old GtkSizeRequestIface documentation to GtkWidget and added notes to gtk_widget_get_preferred_size(). 2010-10-08 23:18:05 +09:00
Christian Dywan
e9a7a2104b Use and print note for key only if there are credentials
Otherwise key might be printed uninitialized.
2010-10-08 16:03:49 +02:00
Tristan Van Berkom
3267cd08e9 Removed call to get_preferred_size (widget, NULL, NULL);
This was another case of making sure size-request was called
before other code was doing get_child_requisition(), now caching
is done via the same api so no need for that line.
2010-10-08 22:33:21 +09:00
Tristan Van Berkom
480b9f6b11 Removed needless initial size request of children
Old code was probably doing size-request on all children initially,
and then calling get_child_requisition() in other passes, now these
are cached after the first request anyway.
2010-10-08 22:33:21 +09:00
Tristan Van Berkom
c1e9f4a798 Removed needless size-requesting of children (child sizes are ignored at request time). 2010-10-08 22:33:21 +09:00
Matthias Clasen
2e98e37fe4 Make GtkTable use gtk_container_handle_border_width 2010-10-08 09:28:00 -04:00
Matthias Clasen
f8490e425f Add a migration guide section about resize grips 2010-10-08 02:18:15 -04:00
Matthias Clasen
8ed725bad8 Get scrollbars out of the way of the window's resize grip
If there are both horizontal and vertical scrollbars, there is
an unused 'corner' into which the resize grip fits. Individual
scrollbars need to be shortened and moved to make room for the
resize grip.
2010-10-08 02:14:19 -04:00
Matthias Clasen
b04bceb47e Remove resize grip handling from GtkStatusbar
We remove the resize grip from GtkStatusbar, but keep the code
that makes the content avoid the grip, and adapt it to GtkWindow
grips.

The gtk_status_bar_set/get_has_resize_grip() functions and related
properties are removed.
2010-10-08 02:14:19 -04:00
Cody Russell
fe9a45c413 Remove uses of gtk_statusbar_set_has_resize_grip()
This function is going away.
2010-10-08 02:14:19 -04:00
Matthias Clasen
f9265ea3b8 Fix resize grip drawing in GtkAssistant
Chain up in the draw() implementation of GtkAssistant to let
GtkWindow draw the resize grip. This avoids black resize grips
in GtkAssistant windows.
2010-10-08 02:14:19 -04:00
Matthias Clasen
f6347baf64 Add resize grips to GtkWindow
Allow any window to display a resize grip, in the south-east or
south-west corner, depending on text direction. This is implemented
as a shaped window that gets overlayed on top of whatever content
is there. We add api that allows widgets to avoid the resize grip,
if desired.

The ::has-resize-grip property controls if a window may display
a resize grip. It will only be displayed if the window is resizable
and not maximized.

The size and visual appearance of the resize grip is under theme
control, using the resize-grip-width/height style properties and
the paint_resize_grip style function.
2010-10-08 02:14:10 -04:00
Matthias Clasen
368f0d0843 Fix export of a few (currently unused) configure variables
Turns out that autoconf eats all the m4_define magic before
AC_INIT.
2010-10-07 07:50:30 -04:00
William Jon McCann
cadbdd32ba gail: don't try to get stock id from images that aren't stock
Fixes assertion caused by 41d2a4d059
2010-10-07 02:52:35 -04:00
Tor Lillqvist
bbf189ca0d Gail needs _gtk_cell_renderer_calc_offset 2010-10-07 01:28:48 +03:00
Tor Lillqvist
3c4d1cc856 Bypass the ms-windows engine for now
It requires massive changes to build again. I started, but gave
up. More insight is needed.
2010-10-07 01:28:47 +03:00
Tor Lillqvist
e346d26f70 Make it compile again for Windows 2010-10-07 01:28:47 +03:00
Stef Walter
4196f56de9 Remove reference to hooks in gtk_about_dialog_set_website() docs.
Signed-off-by: Javier Jardón <jjardon@gnome.org>
2010-10-06 23:54:35 +02:00
Federico Mena Quintero
e17b9ae8ba Filechooser - In OPEN or SAVE mode, typing a plain folder name should switch to it
If you type 'subfolder/' and hit Enter, the file chooser will switch you to
it.  But if you type just 'subfolder' without the trailing slash, apps would
receive *that* filename (e.g. file:///foo/bar/subfolder) as the response, and
they would likely print an error that they can't open that file (as it is
a folder).  So, we change the file chooser's current folder to that subfolder
in this case.

Signed-off-by: Federico Mena Quintero <federico@novell.com>
2010-10-06 13:10:16 -05:00
Benjamin Otte
e3e243688a widget: Fix GtkWidget::draw docs
width and height have been gone for a while...
2010-10-06 12:53:33 +02:00
Tristan Van Berkom
e1b00b52d2 Enhanced documentation description for GtkWrapBox (text by Murray Cumming). 2010-10-06 17:00:43 +09:00