Commit Graph

10280 Commits

Author SHA1 Message Date
Christian Dywan
49ec071c59 Remove GtkFileSelection completely 2010-05-03 01:40:41 +02:00
Christian Dywan
2d763d3430 Remove GtkList completely 2010-05-03 01:40:41 +02:00
Christian Dywan
dc21c8ef06 Remove deprecated GtkToolItem functions 2010-05-03 01:40:41 +02:00
Christian Dywan
aa21bd702f Remove deprecated GtkColorSelection functions 2010-05-03 01:40:41 +02:00
Christian Dywan
d974436aec Remove deprecated GtkFontSelection(Dialog) functions 2010-05-03 01:40:41 +02:00
Christian Dywan
d2468351ca Remove deprecated GtkSpinButton function (macro) 2010-05-03 01:40:40 +02:00
Christian Dywan
474529e2c0 Remove GtkItemFactory completely 2010-05-03 01:40:40 +02:00
Christian Dywan
ea36fff086 Remove GtkCombo completely 2010-05-03 01:40:40 +02:00
Christian Dywan
b653f66b05 Remove GtkCList completely 2010-05-03 01:40:40 +02:00
Christian Dywan
f210f816ca Remove GtkCTree completely 2010-05-03 01:40:40 +02:00
Christian Dywan
f3ea5702ab Remove GtkTreeItem completely 2010-05-03 01:40:40 +02:00
Christian Dywan
b0149a9f3f Remove GtkTree completely 2010-05-03 01:40:40 +02:00
Christian Dywan
5c3b5ecfce Remove deprecated/ broken types from the default value test 2010-05-03 01:40:40 +02:00
Christian Dywan
16011da879 Remove some deprecated functions from GtkWidget 2010-05-03 01:40:40 +02:00
Christian Dywan
6513947473 Prefix gtk_selection_clear with an underscore 2010-05-03 01:39:50 +02:00
Christian Dywan
8ac9a0e67f Remove deprecated GtkStyle functions 2010-05-03 01:39:50 +02:00
Christian Dywan
165fd5903f Remove deprecated GtkToolbar functions 2010-05-03 01:39:50 +02:00
Christian Dywan
7d3dbb9532 Remove deprecated GtkMenuBar functions (macros) 2010-05-03 01:39:50 +02:00
Christian Dywan
956a5c47ed Remove deprecated GtkRcStyle functions 2010-05-03 01:39:50 +02:00
Christian Dywan
2e1b3abad3 Remove deprecated GtkRadioMenuItem function (macro) 2010-05-03 01:39:50 +02:00
Christian Dywan
11e97600f0 Remove deprecated GtkTreeView functions 2010-05-03 01:39:50 +02:00
Christian Dywan
b7eed8cbff Remove deprecated GtkMenuToolButton function 2010-05-03 01:39:50 +02:00
Christian Dywan
7e67ec8414 Remove deprecated GtkTreeModel functions (macros) 2010-05-03 01:39:50 +02:00
Christian Dywan
c4b3b13f9d Remove deprecated GtkNotebook functions 2010-05-03 01:39:50 +02:00
Christian Dywan
025eebb49d Remove deprecated GtkMenuItem function 2010-05-03 01:39:49 +02:00
Christian Dywan
2f1a59c0f2 Remove deprecated GtkLayout functions 2010-05-03 01:39:49 +02:00
Christian Dywan
7fd68866fe Remove deprecated GtkImage functions 2010-05-03 01:39:49 +02:00
Christian Dywan
605705fd6b Remove deprecated gtk_drag_set_default_icon 2010-05-03 01:39:49 +02:00
Christian Dywan
2eb26d68f6 Remove deprecated function from GtkDrawingArea 2010-05-03 01:39:49 +02:00
Christian Dywan
304f36b587 Remove deprecated functions from GtkCalendar 2010-05-03 01:39:49 +02:00
Christian Dywan
0d7d1ae8dc Remove deprecated functions from GtkBox 2010-05-03 01:39:49 +02:00
Christian Dywan
de29ee15c6 Remove deprecated gtk_binding_entry functions 2010-05-03 01:39:49 +02:00
Christian Dywan
5a33eb8d67 Remove deprecated functions from GtkAboutDialog 2010-05-03 01:39:49 +02:00
Benjamin Otte
b08a6750dc filechooser: Fix a crash when removing files
The file removal code was not properly clearing the file=>array index
cache, so later lookups into that cache would return invalid array
indexes.

The easiest way to reproduce it is to create a directory with two files
and deleting both of them.

Reported-by: Javier Jardón <jjardon@gnome.org>
2010-05-02 14:34:43 +02:00
Matthias Clasen
1782151092 Doc fixes
Correct some Since tags.
2010-05-01 21:40:43 -04:00
Matthias Clasen
201635a203 Fix doc typos 2010-05-01 21:40:43 -04:00
Matthias Clasen
82647f274c Integrate GtkExtendedLayout docs 2010-05-01 21:40:43 -04:00
Javier Jardón
1cf85176e4 Add gtk_extended_layout_get_desired_size() to gtk.symbols 2010-05-01 16:04:51 +02:00
Javier Jardón
0d85671bc9 Fix some compilation warnings 2010-05-01 03:52:03 +02:00
Matthias Clasen
db76c77b81 Merge branch 'native-layout-incubator'
Conflicts:
	configure.in
	docs/reference/gtk/tmpl/gtkaction.sgml
	docs/reference/gtk/tmpl/gtkbuilder.sgml
	gdk/directfb/gdkkeys-directfb.c
	gdk/gdk.symbols
	gdk/x11/gdkwindow-x11.c
	gtk/gtkalignment.c
	gtk/gtkbox.c
	gtk/gtkbutton.c
	gtk/gtkcelleditable.c
	gtk/gtkfilechooser.c
	gtk/gtkframe.c
	gtk/gtkinvisible.c
	gtk/gtklabel.c
	gtk/gtkscrolledwindow.c
	gtk/gtksearchenginetracker.c
	gtk/gtktextview.c
	gtk/gtktoolbutton.c
	gtk/gtktooltip.c
	gtk/gtkviewport.c
	gtk/gtkwidget.c
	gtk/gtkwindow.c
	po-properties/ca@valencia.po
	po-properties/es.po
	po-properties/kn.po
	po-properties/mr.po
	po/ca.po
	po/ca@valencia.po
	po/el.po
	po/es.po
	po/gl.po
	po/id.po
	po/kn.po
	po/lv.po
	po/mr.po
	po/th.po
2010-04-30 17:56:50 -04:00
Matthias Clasen
fc1450d55d Set an appropriate title on the folder selection dialog for print-to-file 2010-04-29 17:14:14 -04:00
Matthias Clasen
556531b16f Get symbolic colors for statusicons from systray
Uses the X property _NET_SYSTEM_TRAY_COLORS.
2010-04-29 17:01:25 -04:00
Matthias Clasen
1335275548 Add a way to set symbolic colors per-widget
The new function, gtk_widget_modify_symbolic_color() is similar
in spirit to the other gtk_widget_modify_ functions.
2010-04-29 17:01:25 -04:00
Tadej Borovšak
be3a1abc04 Move documentation to inline comments: GtkBuilder
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=611742

Signed-off-by: Javier Jardón <jjardon@gnome.org>
2010-04-28 18:41:34 +02:00
Tadej Borovšak
d6bc1a99dc Move documentation to inline comments: GtkButtonBox
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=612349

Signed-off-by: Javier Jardón <jjardon@gnome.org>
2010-04-28 18:41:34 +02:00
Tadej Borovšak
ef4e7b2473 Move documentation to inline comments: GtkBox
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=611742

Signed-off-by: Javier Jardón <jjardon@gnome.org>
2010-04-28 18:41:33 +02:00
Javier Jardón
fa3bb041eb Fix <ulink> tag in previous commit 2010-04-28 18:41:33 +02:00
Matthias Clasen
3833ef5c35 Fix the build 2010-04-28 11:17:30 -04:00
Matthias Clasen
b3dd3a89d3 Formatting tweaks 2010-04-28 11:15:15 -04:00
Matthias Clasen
5d5d93e624 Make the docs build
Grr
2010-04-28 11:10:34 -04:00
Matthias Clasen
50656c74e3 Some doc and formatting tweaks 2010-04-28 10:04:21 -04:00
Matthias Clasen
6b939d57c7 Support 'symbolic' themed icons
Add gtk_icon_info_load_symbolic() to load symbolic icons, and
theme their background/foreground colours to match the
colours used in the theme.

Adds the gtk_icon_info_load_symbolic() function, explicit
support in GtkImage and GtkCellRendererPixbuf, and test cases
for those 2 widgets.

With help from Bastien Nocera <hadess@hadess.net>

https://bugzilla.gnome.org/show_bug.cgi?id=614711
2010-04-28 12:02:05 +01:00
Matthias Clasen
c8dd9895e4 Add some documentation about width-chars and max-width-chars
Explain how these properties determine the width of ellipsized
and wrapped labels.
2010-04-28 00:48:15 -04:00
Javier Jardón
3cc9575323 Move documentation to inline comments: GtkHBox 2010-04-28 04:29:41 +02:00
Javier Jardón
a6ed128abf Move documentation to inline comments: Testing utilities 2010-04-28 04:20:10 +02:00
Javier Jardón
1e2dabf31d Allow NULL as 'icon_widget' in gtk_tool_button_new()
This completes the patch of
commit b8ec73a52f
2010-04-27 03:26:11 +02:00
Javier Jardón
d3d4cf0e84 Deprecate GTK_WIDGET_*SET_FLAGS() macro
The macro GTK_WIDGET_SET_FLAGS(w, GTK_VISIBLE) should
still be fixed internally.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-04-27 02:45:18 +02:00
Mirsal Ennaime
5eaff47e85 Add accessors for GtkTextView adjustments
GtkTextView is missing accessors for its sealed hadjustment
and vadjustment members.
This patch adds gtk_text_view_get_hadjustment() and
gtk_text_view_get_vadjustment() to GtkTextView

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=616053
2010-04-27 02:23:07 +02:00
Matthias Clasen
538ec4efbb Add a GtkExtendedLayout implementation for GtkFrame 2010-04-26 18:07:42 -04:00
Javier Jardón
41a073263a Don't use GTK_WIDGET_*SET_FLAGS (wid, GTK_HAS_DEFAULT)
Introduce internal _gtk_widget_set_has_default() for this

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=614515
2010-04-26 21:10:15 +02:00
Javier Jardón
45257e31c7 Don't use GTK_WIDGET_*SET_FLAGS (wid, GTK_TOPLEVEL)
Introduce internal _gtk_widget_set_is_toplvel() for this

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=614510
2010-04-26 21:07:20 +02:00
Javier Jardón
560e426f16 Don't use GTK_WIDGET_*SET_FLAGS (wid, GTK_HAS_GRAB)
Introduce internal _gtk_widget_set_has_grab() for this

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=614513
2010-04-26 21:04:51 +02:00
Javier Jardón
b8ec73a52f Only a GtkMisc widget should be passed to gtk_tool_button_new()
Reported by Hernando Torque here:
https://bugzilla.gnome.org/show_bug.cgi?id=616851
2010-04-26 20:23:39 +02:00
Emmanuele Bassi
621b415e5b tree-view: Use gtk_widget_send_focus_change()
Remove the second (and last) internal user of the GTK_HAS_FOCUS flag.

https://bugzilla.gnome.org/show_bug.cgi?id=593671
2010-04-26 18:59:24 +01:00
Emmanuele Bassi
91930f86b2 window: Use gtk_widget_send_focus_change()
Remove the original user of the GTK_HAS_FOCUS flags.

https://bugzilla.gnome.org/show_bug.cgi?id=593671
2010-04-26 18:59:23 +01:00
Emmanuele Bassi
f04a720348 widget: Add send_focus_change()
Currently the only users of the GTK_HAS_FOCUS flag are setting it
before sending a focus change event. This is normally needed by
GtkWindow, but there are widgets that require controlling the focus
of widgets that are semantically their children even though they are
parented to another top-level. Case in point: the quick search entry
for GtkTreeView.

Over the years people have been hacking the focus change out of
gtkwindow.c and gtktreeview.c, thus leaking the direct access of the
GTK_HAS_FOCUS flag.

The simplest way to avoid that is to add a function that sends the
focus change event and controls the setting of the flag, thus removing
the need for external widgets to do the same.

https://bugzilla.gnome.org/show_bug.cgi?id=593671
2010-04-26 18:59:22 +01:00
Matthias Clasen
cd45dfaa1d Tiny documentation tweak 2010-04-26 07:34:01 -04:00
Matthias Clasen
a0b61a5a72 Make testellipsize work for rotating non-ellipsized labels 2010-04-25 20:58:36 -04:00
Matthias Clasen
f285ed1348 Treat h and v boxes the same way
...we've got the money!
2010-04-25 17:12:15 -04:00
Matthias Clasen
bcbd7cce13 Don't add padding to a pointer 2010-04-25 16:45:21 -04:00
Matthias Clasen
ff0eb03201 Fix a regression in RTL flipping
This was only showing up with pack-end packing in horizontal boxes.
The RTL flipping has to be applied after moving the reference point
to the left edge of the child.
2010-04-25 16:23:01 -04:00
Matthias Clasen
148ea63dba Formatting and typo fixes 2010-04-23 21:52:55 -04:00
Tristan Van Berkom
2a5272647d Mega commit backing out everything from the native-layout branch that
is not ready for integration

This commit makes the native-layout branch into a reasonable
patch applicable to git master, it pulls out GtkCellRenderer
support, ComboBox support, the Plug/Socket api is also not ready
and is pulled out.
2010-04-21 03:42:23 -04:00
Tristan Van Berkom
9306a73dfd Added documentation, implemented gtk_extended_layout_is_height_for_width() where needed. 2010-04-21 01:32:55 -04:00
Javier Jardón
95fd5011c2 Move documentation to inline comments: GtkMessageDialog
Also, add a note about GTK_BUTTONS_OK, GTK_BUTTONS_YES_NO
and GTK_BUTTONS_OK_CANCEL are discouraged by the GNOME HIG.

https://bugzilla.gnome.org/show_bug.cgi?id=597865
2010-04-21 05:57:29 +02:00
Tristan Van Berkom
680d7762ba Make sure not to base the minimum size on "max-width-chars", only the natural size. 2010-04-20 20:30:10 -04:00
Tristan Van Berkom
dfd311497d Fixed GtkLabel to wrap correctly and report width-for-height correctly when vertical. 2010-04-20 18:54:50 -04:00
Tristan Van Berkom
d5b31c303c Slightly reduced extended layout cache size, updated authors/copywrite year. 2010-04-20 18:53:54 -04:00
Tristan Van Berkom
17883f3ce6 Fixed GtkLabel to include GtkMisc padding when calculating height-for-width. 2010-04-20 15:23:13 -04:00
Tristan Van Berkom
80428e7745 Restore layout in get_desired_size() after guessing a wrap width
This fixes the label layout in cases where gtk_widget_size_request()
is called on a label without a following size_allocate(), for instance
when a button state changes.
2010-04-20 14:16:13 -04:00
Tristan Van Berkom
4ed5e6d526 Various updates to follow new gtk_extended_layout_get_desired_size added argument. 2010-04-20 01:30:56 -04:00
Tristan Van Berkom
b7a05d1832 Fixed missing return from get_desired_width/height in GtkViewport (causing testgtk to have a small width). 2010-04-20 01:27:32 -04:00
Tristan Van Berkom
c927f5e60d Split up width and height queries so that they make more sense (extended-layout) 2010-04-20 01:26:58 -04:00
Tristan Van Berkom
0330658a7f Added request_natural argument to get_desired_size()
Currently get_desired_size() is more of an emulation of
gtk_widget_size_request() for the minimum size as it bases the
contextual request on the minimum preferred size; this argument
lets you do the request with the natural preferred size as well.
2010-04-20 01:24:51 -04:00
Tristan Van Berkom
3a9ab87489 GtkAlignment now tries to allocate natural size to the child if available and does the height-for-width calculation depending on allocation. 2010-04-20 01:22:31 -04:00
Tristan Van Berkom
0b92348077 Fixed acces of child->requisition; call gtk_widget_get_child_requisition instead.
This fixes squished pathbar issue (as access to ->requisition is really
not supported anymore).
2010-04-20 00:33:20 -04:00
Tristan Van Berkom
b0fc43e958 Reduced natural request padding for rotating ellipsizing labels
After fixing height requests this works much smoother, although in
some places pango seems to ellipsize a rotated label when given
the width it requested.
2010-04-19 21:50:55 -04:00
Tristan Van Berkom
8ae5e01225 Fixed another caching bug in extended layout
Was confusing width/height REQUEST_NEEDED flags, this caused
the volumebutton test to not re-request the height properly
when changing orientations.
2010-04-19 21:37:44 -04:00
Tristan Van Berkom
de4a8f8ddc Unconditionally return the height for the minimum width when doing get_desired_height()
This is the correct support for the opposing orientation for widgets
that support height-for-width, in an interface that was realized as
width-for-height, a height-for-width supporting widget should return
the minimum height for the minimum width when the initial
get_desired_height() is run.
2010-04-19 20:43:19 -04:00
Tristan Van Berkom
ee8db39393 Fixed height-for-width cache
Fixed the cache to be cleared when flagged with WIDTH/HEIGHT_REQUEST_NEEDED.
This error was causing some widgets to not be sized correctly (the stock and
icon browser in the demo for instance).
2010-04-19 20:41:23 -04:00
Tristan Van Berkom
119267d7c8 Removing old comments in gtkbin.c 2010-04-19 20:40:04 -04:00
Tristan Van Berkom
3783a0a54f Fixed computation of sizegroups when no explicit request is set.
My previous commit to GtkSizeGroup made sure that when
gtk_widget_set_size_request() is set on a widget, it will be
taken into account when computing the widget's own request,
this commit fixes the case where there is no explicit size
request.
2010-04-19 14:46:28 -04:00
Tristan Van Berkom
e9e3725ee7 Fixed testellipsize 2010-04-19 14:04:20 -04:00
Tristan Van Berkom
0dff033a64 Fixed GtkSpinner to request 12x12 at init time instead of at expose time.
This should not change the space taken by the spinner when hidden,
and it should only set the minimum size not the actual size (i.e. code
in place was conditionally setting it if not allocated 12x12, which
doesnt really make sense)... This fixes spinners showing at the correct size
in gtk-demo.
2010-04-18 20:46:30 -04:00
Tristan Van Berkom
4c1fa76520 Fixed _gtk_size_group_bump_requisition() to properly handle values specified by gtk_widget_set_size_request() 2010-04-18 20:45:42 -04:00
Tristan Van Berkom
e997ac37a7 Added GTK_DEBUG_EXTENDED_LAYOUT flag and use that for debuggin in gtkextendedlayout.c 2010-04-18 20:14:13 -04:00
Tristan Van Berkom
6dc5cdb981 Implemented GtkExtendedLayout on GtkWindow. 2010-04-18 20:13:46 -04:00
Tristan Van Berkom
fe257d23dd Fixed GtkAssistant to not access ->requisition of children directly.
This was causing a 0 height action-area because a GtkBox does not
generally update ->requisition with anything useful
(call gtk_widget_get_child_requisition() here instead).
2010-04-18 20:11:43 -04:00
Tristan Van Berkom
3cbd9e9313 Further fixed base outputs of GtkLabel desired geometries.
Now (when wrapping), if no "width-chars" was specified for a minimum
width, default to the width guessed by gtk_label_ensure_layout(), small
specified widths will otherwise result in very large height requests.
2010-04-18 18:13:56 -04:00
Tristan Van Berkom
da318411dc Fixed bug in gtk_extended_get_desired_size().
gtk_extended_get_desired_size() was mixing up orientations based
on the preference, considering ditching the preference anyway.
Also slightly enhanced debug prints.
2010-04-18 18:12:30 -04:00
Tristan Van Berkom
35cc52f418 Compute the collective heights for the width of a horizontal box.
Introduce an algorithm to allocate children some virtual widths based on
their base widths returned by ->get_desired_width(), then return the
collective desired heights for each or thier virtually allocated width.

This will only work in the horizontal orientation.
2010-04-18 18:09:40 -04:00
Javier Jardón
508ed4bbab [docs] Move documentation to inline comments: GtkArrow
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=611957

Signed-off-by: Javier Jardón <jjardon@gnome.org>
2010-04-18 17:59:53 +02:00
Steven Harms
c3d5faf6b7 [docs] Move documentation to inline comments: GtkVButtonBox
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=611833

Signed-off-by: Javier Jardón <jjardon@gnome.org>
2010-04-18 08:54:40 +02:00
Tadej Borovšak
5f767e2c48 [docs] Move documentation to inline comments: GtkAssistant
Signed-off-by: Javier Jardón <jjardon@gnome.org>
2010-04-18 08:02:03 +02:00
Tadej Borovšak
51e32fe67a [docs] Move documentation to inline comments: GtkBuildable
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=611741

Signed-off-by: Javier Jardón <jjardon@gnome.org>
2010-04-18 05:27:22 +02:00
Tadej Borovšak
8e8d302d10 [docs] Move documentation to inline comments: GtkBin
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=612351

Signed-off-by: Javier Jardón <jjardon@gnome.org>
2010-04-18 05:19:21 +02:00
Tadej Borovšak
4c0cf04688 [docs] Move documentation to inline comments: GtkAspectFrame
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=611958

Signed-off-by: Javier Jardón <jjardon@gnome.org>
2010-04-18 05:08:36 +02:00
Tristan Van Berkom
e8a365ce36 Restore functionality where ellipsizing label *minimum* size grows to "max-char-width". 2010-04-17 23:06:24 -04:00
Tadej Borovšak
b802be45b3 [docs] Move documentation to inline comments: GtkAlignment.
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=611956

Signed-off-by: Javier Jardón <jjardon@gnome.org>
2010-04-18 04:55:27 +02:00
Tristan Van Berkom
64e23c42bd Fixed GtkLabel reported minimum and natural sizes
This commit makes GtkLabel use "max-width-chars" to determine the
desired natural width for wrapping labels as well as all around refactoring
the initially reported values in get_desired_width/height. this also
addresses some issues with rotating ellipsizing text.
2010-04-17 22:54:29 -04:00
Tristan Van Berkom
8b57ad94c0 Now gtk_extended_layout_get_desired_size() returns a minimum for minimum in the minimum requisition and a natural for minimum in the natural. 2010-04-17 22:52:27 -04:00
Tristan Van Berkom
b30445c927 Make GtkWindow use the generic smallest size for the requisition again 2010-04-17 22:51:35 -04:00
Tadej Borovšak
b6a6142556 [docs] Move documentation to inline comments: GtkAction
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=611952

Signed-off-by: Javier Jardón <jjardon@gnome.org>
2010-04-18 04:49:51 +02:00
Steven Harms
6cdeb370a1 [docs] Move documentation to inline comments: GtkVRuler
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=611656

Signed-off-by: Javier Jardón <jjardon@gnome.org>
2010-04-18 03:55:22 +02:00
Steven Harms
25b6994cba [docs] Move documentation to inline comments: GtkVolumeButton
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=611827

Signed-off-by: Javier Jardón <jjardon@gnome.org>
2010-04-18 03:48:26 +02:00
Steven Harms
7693026e44 [docs] Move documentation to inline comments: GtkViewport
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=611829x

Signed-off-by: Javier Jardón <jjardon@gnome.org>
2010-04-18 03:29:16 +02:00
Steven Harms
75ffa7983a [docs] Move documentation to inline comments: GtkVPaned
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=611634

Signed-off-by: Javier Jardón <jjardon@gnome.org>
2010-04-18 02:57:30 +02:00
Patrick Bernaud
6a9b72525a [docs] Move documentation to inline comments: GtkSocket
https://bugzilla.gnome.org/show_bug.cgi?id=611707
2010-04-18 02:36:04 +02:00
Tristan Van Berkom
9247bc8d6d Fixed GtkExtendedLayout interaction with sizegroups plus cleanups
Fixed GtkExtendedLayout to interact with sizegroups, "size-requsts"
and caching the values all in the same code segment.

Migrated the cache code to be internal to gtkextendedlayout.c
2010-04-17 01:51:10 -04:00
Tristan Van Berkom
46fe9c3f00 Disabling natural sizes of labels.
Since GtkLabel is returning invalid natural sizes for now,
in order to test regressions well with the new width-for-height
api, I've temporarily disabled the natural values.
2010-04-17 01:49:35 -04:00
Tristan Van Berkom
caba7992b8 Refactored GtkSizeGroup for GtkExtendedLayout
Removed _gtk_size_group_compute_requisition and
_gtk_size_group_get_child_requisition in favor of
_gtk_size_group_bump_requisition() which does an orientation
contextual computation of the size group and returns the
collective value in one pass.
2010-04-17 01:46:59 -04:00
Stefan Kost
d4a159d488 [docs] improve docs for gtk_accelerator_parse().
Link to gdk_keyval_from_name() and give example for non obvious accelerator
strings.
2010-04-16 21:30:47 +03:00
Javier Jardón
edfcc3dd41 [docs] Fix GtkWidget and GtkFileChooser documentation
gtk-doc version >= 1.14 is more strict, It produces valid xml
if the source is valid.
2010-04-15 22:58:39 +02:00
Javier Jardón
06f66c185a Fix compilation warning: set a default case in switchs 2010-04-15 21:10:32 +02:00
Javier Jardón
8cde95bc5f Fix compilation warning: remove unused variable 2010-04-15 16:19:42 +02:00
Michael Natterer
ece97b2359 Bug 615162 - Fix tooltips on offscreen widgets
Fix the "widget under pointer" logic and keyboard tooltip positioning
to do the right thing on offscreen widgets.
2010-04-15 13:03:43 +02:00
Michael Natterer
fdf936b5ad gtk: fixes for offscreen widgets
Fix gtk_widget_translate_coordinates() and
_gtk_widget_synthesize_crossing() so they work in hierarchies with
offscreen widgets.
2010-04-15 13:02:04 +02:00
Tristan Van Berkom
8432f54c51 Added _gtk_size_group_bump_requisition()
Added a function to update sizegroups in multiple passes, this
way the width and height can be updated in the sizegroups after
querying the extended layout implementor for these.

Implemented this in GtkExtendedLayout, sizegroups should be working reasonably now.
2010-04-14 18:07:27 -04:00
Vincent Untz
9b34203cb6 No accessor for GtkAccessible.widget
Add gtk_accessible_get_widget().

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=612509
2010-04-14 03:49:26 +02:00
Martyn Russell
100ecea239 Fixed build failure for gtkorientable 2010-04-13 11:22:45 +01:00
Martyn Russell
72c51a5a6a tracker-search-engine: Fixed whitespace issues and copyright/authors 2010-04-13 11:13:58 +01:00
Martyn Russell
f5781b42cf tracker-search-engine: Improve search query to order by rank and title 2010-04-13 11:13:58 +01:00
Martyn Russell
f6c1d54b3f tracker-search-engine: Fixed 0.7/0.8 issues and add 0.9 cases 2010-04-13 11:13:58 +01:00
Javier Jardón
af0a7aea5f Use G_DEFINE_INTERFACE macro in gtkbuildable
https://bugzilla.gnome.org/show_bug.cgi?id=605186
2010-04-13 07:44:12 +02:00
Javier Jardón
9f6e03f231 Use G_DEFINE_INTERFACE macro in gtkorientable
https://bugzilla.gnome.org/show_bug.cgi?id=605186
2010-04-13 07:43:51 +02:00
Javier Jardón
e534897216 Use G_DEFINE_INTERFACE macro in gtkcelleditable
https://bugzilla.gnome.org/show_bug.cgi?id=605186
2010-04-13 07:42:34 +02:00
Tristan Van Berkom
d2c35ec62a Mega commit to change ->get_desired_size() for ->get_desired_width/height().
This commit changes gtk_extended_layout_get_desired_size() for
per dimension variants. Furthermore this commit reverts the actions
done in size-groups for now as it needs a different approach.

The natural width/height parameters added to aux_info have been changed
for a per width cache for heights and a per height cache for widths.

gtk-demo is still working, currently sizegroups are not taken
into account as mentioned above - size groups need to be alerted both
when the widths and heights are updated independantly and then that
information needs to repropagate also to other extended layout implementors.
2010-04-12 22:21:46 -04:00
Javier Jardón
5bcf3ba72a Fix compilation warning: move function to proper location
Move _count_nodes() auxiliar function inside the
G_ENABLE_DEBUG define, where other auxiliar functions are.
2010-04-12 22:10:38 +02:00
Javier Jardón
3e5d49f52b Fix compilation warning: Use G_ENABLE_DEBUG to enable the var 2010-04-12 22:10:34 +02:00
Tor Lillqvist
e544602065 Add Visual Studio 2008 project files
Similar setup as in GLib and Pango. Also here we use a build/win32/vs9
subfolder, even if there is nothing else in build or build/win32.
2010-04-12 12:45:40 +03:00
Tristan Van Berkom
1b2be80f10 Constrain the window to the minimum width for the natural height
GtkWindow now requests the minimum width for the natural height
of its child, or the opposite; depending on ->get_height_for_width.
Currently its not done for GTK_WINDOW_POPUP windows as the menushells
aren't working right yet.
2010-04-10 22:48:13 -04:00
Tristan Van Berkom
6b89f05a99 Implemented gtk_extended_layout_is_height_for_width() and added another guess algorithm
This patch adds another commented algorythm to find the collective
minimum and natural height for a said width of a horizontally oriented
box (or the opposite). The algorithm works quite well and can be optimized
a bit more - currently its commented because GtkLabel cannot effectively
do width-for-height calculations (doh).

Further, this patch returns an is_height_for_width() preference depending
on the boxes orientation (vertical boxes are width-for-height).
2010-04-10 22:39:11 -04:00
Tristan Van Berkom
639e396147 Fixed gtkbin.c:parent_extended_layout_iface to be static. 2010-04-10 22:38:47 -04:00
Tristan Van Berkom
24950ec144 Added gtk_extended_layout_is_height_for_width()
Added an indicator telling whether a widget prefers to be allocated
as height-for-width or width-for-height. Usually this depends on the
orientation of a container or the nature of a content widget like GtkLabel.

This indicator is only used in the seldom case where a parent is allocating
free space to the child and the child can flow in either direction, GtkWindow
and GtkScrolledWindow are users of this api.
2010-04-10 22:32:55 -04:00
Tristan Van Berkom
629bb5a265 Fixed warnings due to missing GTK_WIDGET (cellview) casting. 2010-04-10 22:31:52 -04:00
Tristan Van Berkom
c0e950f17b Fixed wrapping labels to show up correctly aligned inside their allocations. 2010-04-10 22:30:42 -04:00
Tristan Van Berkom
1041a186c7 Added get_height_for_width/get_width_for_height implementation to GtkBox.
In order for natural size information to cascade correctly up through
the ancestry GtkBox needs to report height-for-width and width-for-height,
this patch includes an implementation for both in both orientations, one
of them is commented for now as its much too cpu intensive to actually use.
2010-04-09 21:50:33 -04:00
Tristan Van Berkom
35e2dfce08 Fixing height-for-width wrapping of GtkLabel
Merged in fixes from the old branch in a patch prepared by Matthias Clasen,
added some fixes of my own to make sure that label wrapping follows allocation
and not requisition at show time (allocate time).
2010-04-09 21:47:25 -04:00
Tristan Van Berkom
73056e92d8 Reimplemented GtkExtendedLayout on GtkBin
Instead of implementing ->get_desired_size() on GtkBin, which
cant really be done because border widths are in the domain of
the concrete subclasses; here we implement only the get_height_for_width
and get_width_for_height apis - GtkBin subclasses whom might have a
variable border width depending on allocations need to write their
own height-for-width implementations.
2010-04-09 00:19:42 -04:00
Tristan Van Berkom
b3303727ad Fixed regression in GtkImage size requests
Fixed gtksizegroup.c:do_size_request() to never force an initial requisition
as some widgets expect it to remain unchanged across resizes (GtkImage
with pixbufs/filenames assigned is one of these cases).
2010-04-08 22:05:36 -04:00
Tristan Van Berkom
7304e4227f Fixed gtk_box_size_allocate() for homogeneous boxes
gtk_box_size_allocate() was forgetting to fetch the minimum
size for children when allocating in homogeneous mode and then
accessing the uninitialized allocated values in that case, fixed.
2010-04-08 21:45:07 -04:00
Tristan Van Berkom
ffffa7361c Implemented GtkExtendedLayout on GtkComboBox.
With this commit it is possible to use ellipsizing text
in the combobox's cell renderers and have them desire to
expand to natural size when placed in a GtkBox.
2010-04-08 18:54:47 -04:00
Tristan Van Berkom
531b449580 Deprecated gtk_widget_size_request and gtk_widget_get_child_requisition()
Ever since size groups gtk_widget_size_request() can be used in place
of gtk_widget_get_child_requisition(), deprecating both now in favor
of gtk_extended_layout_get_desired_size().
2010-04-08 18:53:23 -04:00
Tristan Van Berkom
99425f15f5 Added assertions
Added assersions that gtk_extended_layout_get_height_for_width()
methods return minimum sizes lesser than the natural size.
2010-04-08 18:52:12 -04:00
Tristan Van Berkom
1706608de3 Simplified code in GtkSizeGroup, fixes minimum natural size.
collapse get_fast_child_requisition && get_fast_natural_size into
a single get_fast_size() function which uses the possibly hard coded
minimum request as a minimum value for the returned desired size
(this fixes cases where widgets unwarily return height-for-width
with minimum size > natural size).
2010-04-08 18:49:34 -04:00
Tristan Van Berkom
36ef655061 Added gtk_cell_view_get_size_of_row() to gtk.symbols 2010-04-08 18:48:42 -04:00
Tristan Van Berkom
143660eff6 GtkCellView refactoring for extended layout
Added gtk_cell_view_get_desired_size_of_row() to report full
extended layout information for a said row, this obsoletes
gtk_cell_view_get_size_of_row(). Also make GtkCellView queue
a resize on itself when cell renderers are added/removed.
2010-04-08 18:46:19 -04:00
Tomas Bzatek
faf0beede0 FileChooser: Initialize search engines on demand
We postpone initialization of the search engines until
it's really needed. See bug 614971 for reference.
2010-04-07 15:07:05 +02:00
Tomas Bzatek
a812fcb305 Support for tracker 0.8 stable release 2010-04-07 15:02:18 +02:00
Tristan Van Berkom
b10f2fc001 Some extended layout fixes for GtkCellView
Fixed GtkCellView to use the new GtkExtendedCell interface to get
natural size from cells and factored out the old size_request() method.
2010-04-07 01:27:15 -04:00
Tristan Van Berkom
51ffd59884 Implement GtkExtendedLayout on GtkButton
GtkButton as a content type of widget needs to forward natural size information
to parent containers in order to be resized naturally.
2010-04-06 20:48:41 -04:00
Tristan Van Berkom
85a55b2921 Implement GtkExtendedLayout on Alignment
GtkAlignment is already using the height for width api to align
the child in the cases where space is available, but also needed
to implement the extended layout in order to reflect natural sizes
to parent widgets.
2010-04-06 20:47:15 -04:00
Tristan Van Berkom
388ad4090c Implemented GtkExtendedLayout on GtkViewport 2010-04-06 17:15:50 -04:00
Tristan Van Berkom
b9516e70f5 Add notes to GtkBuilder docs about the possible error domains, closed bgo #560147 2010-04-06 16:27:40 -04:00
Tristan Van Berkom
d92ee6dc68 Fixed gtk_builder_value_from_string_type() to always assign the GError
when returning FALSE, fixes bgo #615000.
2010-04-06 16:25:43 -04:00
Tristan Van Berkom
a17e12c87d Implement GtkExtendedCell on GtkCellRendererText 2010-04-06 03:05:52 -04:00
Tristan Van Berkom
59dafa77dc Use new gtk_tree_view_column_get_desired_size() 2010-04-06 03:05:20 -04:00
Tristan Van Berkom
3128bd0937 Added gtk_tree_view_column_get_desired_size() as its a corner case
that does not fall under the two categories.
2010-04-06 03:03:55 -04:00
Tristan Van Berkom
bb86e61171 Added GtkExtendedCell interface (last commit) 2010-04-06 03:03:03 -04:00
Tristan Van Berkom
7beb83cea4 Add new GtkExtendedCell interface
Added a new interface to extend layout information of GtkCellRenderers,
GtkCellRenderer is a prerequisite of GtkExtendedCellIface and provides
a base implementation of ->get_desired_size() with ->get_size().

Note that the api for GtkExtendedCell differs from GtkExtendedLayout
since the cells need to be passed an additional widget to calculate
sizes contextual to the widget/screen (fonts etc).
2010-04-06 02:59:21 -04:00
Tristan Van Berkom
8263633478 Remove gtk_widget_get_desired_size() 2010-04-06 02:56:20 -04:00
Tristan Van Berkom
68c38e0ffd Fixed classes to call gtk_extended_layout_get_desired_size_again()
The previous patch removes the ambiguous gtk_widget_get_desired_size().
2010-04-06 02:55:07 -04:00
Tristan Van Berkom
ef32192329 Call the ->get_desired_size() method directly on the vtable
This commit is a mistake, it should have been included with the last
commit.
2010-04-06 02:53:51 -04:00
Tristan Van Berkom
92309019e5 Make GtkWidget a prerequisite of extended layout
As it is not allowed to called gtk_extended_layout_get_desired_size()
on a GtkWidget directly; gtk_widget_get_desired_size() was really an
ambiguous api. This patch removes the added GtkWidget api, calls
the appropriate sizegroup code which in turn envokes the interface
vtable, this patch also accordingly makes GtkWidget a prerequisite
of GtkExtendedLayout (the api doesnt work for cell renderers anyway,
patch comming...).
2010-04-06 02:47:20 -04:00
Tristan Van Berkom
52eabce3c4 Revert "Implement extended layout for GtkBin"
This reverts commit 5e8045b14d.

Conflicts:

	gtk/gtkbin.c
2010-04-05 18:10:41 -04:00
Tristan Van Berkom
24ed2f8aa1 Fixed 2 bugs in gtk_box_size_allocate()
This commit fixes the loop to take into consideration the
child->padding that will be allocated to the child while calculating
full available size. Additionally it fixes the initial positioning
of child widgets when packed at the end (a special case because the
x position used starts from the end of the box).
2010-04-05 18:01:56 -04:00
Tristan Van Berkom
eb537a6773 Fixed do_size_request() to start with a 0 base requisition instead of -1 2010-04-05 17:57:06 -04:00
Cody Russell
b6d9bb6e1e Fix for bug #557689 and bug #402349, where opening a file chooser in
folder browse mode would require the user to click on something
before clicking "Open".
2010-04-05 12:57:33 -05:00
Tristan Van Berkom
4b1315cedc Changed initial values for requisition from -1 to 0.
When doing size-requests and get_natural_size() calls, use 0 as
the base value instead of -1, because size_request code assumes
that widget->requesition is initialized at 0.
2010-04-04 16:38:36 -04:00
Tristan Van Berkom
75b8f7d3ae Fixed GtkBox to not call get_desired_size() on a child when no child is present. 2010-04-04 16:37:06 -04:00
Tristan Van Berkom
1212f263c3 Making function private in gtktreeviewcolumn to pass the abi test. 2010-04-03 21:37:42 -04:00
Tristan Van Berkom
ae2c0b02c3 Refixed merge conflicts for GTK_WIDGET_MAPPED/GTK_WIDGET_VISIBLE 2010-04-03 21:35:18 -04:00
Tristan Van Berkom
5d83f5eba5 Fixed internal native layout algorythm wrt size-request singals/implementations.
Because "size-request" signal can be handled by signal connections as well
as by third party derived classes it is necessary to always fire the
"size-request" signal for every recalculation of the widget requisition,
now gtksizegroup.c:do_size_request() fires the signal first and allows it
to overflow the minimum/natural sizes returned by extended layout
implementations.

GtkWidget->get_natural_size() is now left assigning default -1 values to
ensure they both get overridden by the size-request handling.
2010-04-03 20:59:28 -04:00
Tristan Van Berkom
a33053db74 Fixed extended layout implementors to not call ->get_desired_size() directly
Getting the desired size of a GtkWidget must always be done with
gtk_widget_get_desired_size() and never with
gtk_extended_layout_get_desired_size() directly as the former passes
through size group logic and updates the widget->requisition cache.
2010-04-03 20:59:28 -04:00
Tristan Van Berkom
8413f22d90 Removed casing of GTK_IS_EXTENDED_LAYOUT() from GtkViewport. 2010-04-03 20:59:28 -04:00
Tristan Van Berkom
61fab15139 Fixed invalid pointer access in gtk_tree_view_column_get_desired_size() 2010-04-03 20:59:28 -04:00
Tristan Van Berkom
22de1a7c65 Partially fixed GtkTreeview for extended layout
Removed the size_request() handling on the class and calculate
minimum size from get_desired_size(); base the natural width on
either the minimum of column headers, or a greater natural request
of the columns renderers.
2010-04-03 20:59:28 -04:00
Tristan Van Berkom
a18af0b980 Applied Jan Arne Petersen's patch for GtkScrolledWindow
Applied patch to add height-for-width/width-for-height suppot
to GtkScrolledWindow plus modifications to use gtk_widget_get_desired_size()
to query children sized instead of directly calling the layout api, plus
removed the ->size_request() implementation interfering with the mess.
2010-04-03 20:59:28 -04:00
Tristan Van Berkom
894e887370 Fixed GtkCellRendererText invalid pointer access.
Fixed get_desired_size() to not access parameters when NULL and
also not to access priv->object if it hasnt yet been assigned.
2010-04-03 20:59:27 -04:00
Jan Arne Petersen
0fbdb3c73f Take extended layout into account in viewport
Make sure the right height is used in GtkViewPort.
2010-04-03 20:59:27 -04:00
Tristan Van Berkom
523283bb36 Fixed possible devision by zero in size negotiations
Fixed GtkToolItemGroup to avoid deviding by zero when all children
are invisible or there are no children. bgo #613974.
2010-04-03 20:59:26 -04:00
Tristan Van Berkom
9fe9898045 Added missing default events in realize() implementations
Added gtk_widget_get_events() to the event masks declared by
GtkToolPalette & GtkToolItemGroup.
2010-04-03 20:59:26 -04:00
Tristan Van Berkom
96793999df Added missing break statement to mutator: gtk_tool_item_group_set_property() 2010-04-03 20:59:26 -04:00
Benjamin Otte
80efec2a8c Fix error case in filesystem model
We should not unref the model here, it might not even exist anymore.
Instead check if it exists and only use it if it does.
The unref was leftover from a previous fix in
ba9f53397f.

Spotted by Matthias Clasen in
https://bugzilla.gnome.org/show_bug.cgi?id=614099
2010-04-03 20:59:25 -04:00
Christian Dywan
69b241c66d Fix a misspelling in gtk_cell_view_new_with_markup
This fixes bug 613887.
2010-04-03 20:59:25 -04:00
Hiroyuki Ikezoe
61a73b3df6 Use g_value_take_string to avoid redundant invoking g_free. 2010-04-03 20:59:24 -04:00
Javier Jardón
7ef003f7d4 Fix compilation warning: Use GtkWidget instead GtkMenuItem 2010-04-03 20:59:23 -04:00
Sjoerd Simons
177973bdfc Prevent the destruction of the menu label on page removal
In certain cases the menu label of a notebook page will be reused after the
page was removed from the notebook, for instance when a page is dragged from
one notebook to another. For such cases make sure that the menu label isn't
destroyed as part of destroying the menu item it was in.
2010-04-03 20:59:19 -04:00
Matthias Clasen
b1ca3163a6 Add a dependency for Gtk-2.0.gir on Gdk-2.0.gir
Another parallel build fix, see bug 610946.
2010-04-03 20:59:19 -04:00
Matthias Clasen
fe34ee4ff3 Avoid spurious notifications from GtkEntry
Using gtk_entry_set_buffer() in dispose() causes problematic
notifications, so just get rid of the buffer manually. See bug 613241.
2010-04-03 20:59:17 -04:00