Commit Graph

13136 Commits

Author SHA1 Message Date
Tristan Van Berkom
c234313a25 Make GtkCheckButton's label left aligned by default.
Since we no longer limit the label's allocation to the minimum, now
we take a saner approach to left aligning the label.
2010-12-29 18:20:32 +09:00
Tristan Van Berkom
a6a97ad442 Fixed unused variable in GtkCheckButton. 2010-12-29 16:30:38 +09:00
Tristan Van Berkom
21aef5b77f Fixed generic height-for-width implementation of GtkBin to consider request adjustments
Since "->adjust_size_request()" was added, it became important for GtkBin's
generic height-for-width implementation to further check the requests
using this vfunc.
2010-12-29 16:26:05 +09:00
Tristan Van Berkom
f519da41cf Make GtkCheckButton allocate all remaining space to it's child instead
of limiting it to it's minimum size.

This fixes height-for-width labels inside a GtkCheckButton, for some
reason GtkCheckButton was limiting the child allocation to the child's
minimum request, probably for the sake of virtual left-alignment of
the child label to be beside the checkmark. This should be done by
other means if nescesarry.
2010-12-29 16:19:48 +09:00
Tristan Van Berkom
2fe4e6a815 Added proper height-for-width implementation to GtkAlignment.
For "padding" cases, it would be ok to fallback on GtkBin class
implementation of height-for-width. However in cases where the
user set's an xscale/yscale the GtkAlignment needs to take care
of properly adjusting the for_size when querying it's child.
2010-12-29 16:18:04 +09:00
Tristan Van Berkom
7fab89d93f Removed checks in gtksizerequest.c
Checks were in place to ensure that widgets never request taller
or wider than screen size. This was there to test a theory about
scrolled window children functioning correctly with dynamic content
however it breaks GtkViewport children which can generally return a
value taller than screen height intentionally, GtkViewport uses this
value to update the adjustments.
2010-12-29 16:12:11 +09:00
Carlos Garnacho
ac00e77e54 Make GtkToolbar use GtkStyleContext 2010-12-28 19:25:49 +01:00
Carlos Garnacho
a3a9c61a5a Make GtkHandleBox use GtkStyleContext 2010-12-28 19:25:49 +01:00
Carlos Garnacho
029fb53ac2 Make GtkSwitch use GtkStyleContext 2010-12-28 19:25:48 +01:00
Carlos Garnacho
18b333bfe7 Make GtkFileChooserEntry make GtkStyleContext 2010-12-28 19:25:48 +01:00
Carlos Garnacho
b2e8992291 Make GtkProgressBar use GtkStyleContext 2010-12-28 19:25:48 +01:00
Carlos Garnacho
e3457a83cf Make GtkScrolledWindow use GtkStyleContext 2010-12-28 19:25:48 +01:00
Carlos Garnacho
53a4feadf0 Make GtkEventBox use GtkStyleContext. 2010-12-28 19:25:47 +01:00
Carlos Garnacho
06462b98a0 Make GtkFrame use GtkStyleContext. 2010-12-28 19:18:57 +01:00
Carlos Garnacho
7a623988e5 Fix leak in GtkStyle. 2010-12-28 19:06:46 +01:00
Tristan Van Berkom
05254766c7 Avoid rendering frames when shadow type argument is GTK_SHADOW_NONE in
gtk_paint_* functions.
2010-12-28 23:15:39 +09:00
Ignacio Casal Quinteiro
9d64a5833d Fix docs. 2010-12-28 11:18:01 +01:00
Benjamin Otte
9746991548 API: gdk: Make gdk_display_get_window_at_device_position() a device API
It's now called gdk_device_get_window_at_position(). It doesn't make
sense to keep device-specific API part of the display.
2010-12-27 18:46:41 +01:00
Benjamin Otte
0c285341a9 API: gdk: gdk_display_get_device_state() => gdk_device_get_position()
The API was not display-specific, but belonged to the device. Also, we
didn't find a user of the modifier mask, so we dropped it.
2010-12-27 18:46:41 +01:00
Matthias Clasen
59ea137fa0 GtkTreeView: Don't use deprecated grab api 2010-12-26 23:40:59 -05:00
Matthias Clasen
51f7e42650 Remove pointless sealing from GtkTextMark 2010-12-26 23:17:10 -05:00
Matthias Clasen
0c4a0dae6d Remove pointless sealing from GtkTextChild 2010-12-26 22:58:57 -05:00
Matthias Clasen
9dee9a84d0 Removed sealed members from GtkMenuItem 2010-12-26 22:58:57 -05:00
Benjamin Otte
45d98d108e tooltip: Don't use deprecated APIs 2010-12-27 01:05:40 +01:00
Benjamin Otte
a5f493bfad notebook: Use nondeprecated API to query coordinates 2010-12-27 00:50:30 +01:00
Benjamin Otte
9bab53f1bd hsv: Fix gcc warnings 2010-12-27 00:45:56 +01:00
Matthias Clasen
bde1d072e5 Don't use gdk_{pointer,keyboard}_grab
Instead use gdk_device_grab.
2010-12-24 20:00:19 -05:00
Matthias Clasen
1d41b98cf8 Add deprecation guards for deprecated GdkAppLaunchContext API
Also adapt the docs to not use deprecated API.
2010-12-24 17:37:00 -05:00
Carlos Garnacho
0f0512aee3 Use gtk_style_context_get_font() in GtkSpinButton 2010-12-24 20:20:40 +01:00
Carlos Garnacho
92102c3bf4 Make GtkSeparator use GtkStyleContext 2010-12-24 19:38:14 +01:00
Carlos Garnacho
7c35994bda Make GtkPaned use GtkStyleContext 2010-12-24 19:38:06 +01:00
Carlos Garnacho
760d6d1e78 Do not set "entry" class in spinbutton buttons.
Also, fix an unpaired gtk_style_context_save() call.
2010-12-24 19:37:56 +01:00
Carlos Garnacho
2bd221d215 Bug 637910 - GtkSpinner - does not animate
Fix widget-to-window coordinates translation in the
style context animation code.
2010-12-24 19:37:49 +01:00
Carlos Garnacho
7f099a9a23 Make GtkArrow use GtkStyleContext 2010-12-24 19:37:41 +01:00
Carlos Garnacho
e5e95934ba Fix color name (as of rgb.txt) parsing in symbolic colors
The end of the substring wasn't being detected properly.
2010-12-24 19:37:30 +01:00
Carlos Garnacho
1cecb10584 Make GtkAccelLabel use GtkStyleContext. 2010-12-24 19:37:20 +01:00
Kristian Rietveld
c659542333 Check for NULL pointer 2010-12-24 14:45:47 +01:00
Matthias Clasen
55ca24d1d4 Drop GtkThemeEngine
It is not used anymore.
2010-12-23 22:16:50 -05:00
Matthias Clasen
ca493cd20d Fix a few warnings 2010-12-23 22:11:50 -05:00
Matthias Clasen
7ff572dfd3 Add some missing includes 2010-12-23 22:11:28 -05:00
Matthias Clasen
1bcf8a0027 Remove sealed members from GtkSettings 2010-12-23 21:56:50 -05:00
Stef Walter
433a22cd11 Remove private header from gtkwindow.h
https://bugzilla.gnome.org/show_bug.cgi?id=637907
2010-12-23 19:23:48 -06:00
Matthias Clasen
7650482e46 Add sufficient API to make gail work
The accessible implementations should really be folded into
gtk proper. Until that happens, we need some more guts exposed...
2010-12-23 20:11:38 -05:00
Matthias Clasen
2ed81aa57c Remove sealed members from GtkMenuShell 2010-12-23 18:21:53 -05:00
Matthias Clasen
c5b020e628 Remove sealed members from GtkMenu 2010-12-23 15:51:20 -05:00
Matthias Clasen
96d1c2c46e Reserve space for a pointer in GtkDrawingArea
It was pointed out that this will let us add a private pointer
without abi break in the future, should we ever need one.
2010-12-23 13:01:21 -05:00
Matthias Clasen
3e08a23237 Drop long-obsolete linux framebuffer APIs
The functions to set frames on windows stopped being interesting
when the linux framebuffer port was dropped, many years ago.

Similar functionality may come back with client-side decorations
in the future.
2010-12-23 12:59:49 -05:00
Kristian Rietveld
9ab2786991 GtkCellRendererText: use PANGO_PIXELS_CEIL for text_width
Usually pango_layout_get_pixel_extents() is used, which uses
PANGO_PIXELS_CEIL on the rectangle's width.  This commit makes the new
function gtk_cell_renderer_text_get_preferred_width() consistent with
this.

This fixes rounding errors on Mac OS X, where we were seeing tree views
with a double height for a single line of text, while the usual single
row height would have been sufficient.
2010-12-23 18:41:23 +01:00
Kristian Rietveld
31536736ea Hide GtkTreeViewColumn buttons when header_window is not visible 2010-12-23 18:19:56 +01:00
Matthias Clasen
3a6800a898 Some small doc corrections 2010-12-23 11:18:50 -05:00
Kristian Rietveld
07110a6170 quartz: we must provide a window on drag begin now 2010-12-23 14:17:42 +01:00
Brian Cameron
f90365d46b Fix spacing. 2010-12-22 21:58:40 -06:00
Brian Cameron
e88a44f4c9 Fix bug #637721, fix function prototype. 2010-12-22 21:57:12 -06:00
Matthias Clasen
d77dcfb9b2 Better fix for keynav dnd
With proper rounding, we can go back to a 'small step' of 1.
2010-12-22 22:33:40 -05:00
Matthias Clasen
7e0a30b752 Abort a drag when a keynav drop has not destination
This was claimed to cause problems for Chromium, see bug 599130.

Also work around apparent rounding errors in XIWarpDevice by
setting the 'small step' for keynav dnd to 2 instead of 1 - I notice
that a warp seems to sometimes warp a little less than I tell it to,
and if I tell it to only move by 1 pixel then moving less means
that you are stuck.
2010-12-22 21:47:14 -05:00
Matthias Clasen
9baf24f87e Add a default handler for drag_failed
And use it in notebook dnd.
2010-12-22 18:46:29 -05:00
Matthias Clasen
e6693ab840 Avoid invariant checking spew in gnome-shell
For normal toplevels, visible is tightly bound to mapped, but for
something like a toplevel that exists within a Clutter stage we
may want to make mapping dependenton external factors, so we shouldn't
actually checked that !mapped toplevels are !visible.

Pointed out by Owen Taylor,

https://bugzilla.gnome.org/show_bug.cgi?id=637834
2010-12-22 16:54:52 -05:00
Kristian Rietveld
4a6c50c298 gtkclipboard-quartz: use accessors and add missing include 2010-12-22 17:47:03 +01:00
Kristian Rietveld
44d9fb2d71 gtkdnd-quartz: use accessors and add missing include 2010-12-22 17:47:03 +01:00
Kristian Rietveld
7979be1430 quartz: gtkquartz.c: add missing include 2010-12-22 17:47:03 +01:00
Tristan Van Berkom
e20503836c Fixed GtkGrid GtkContainerClass->forall() to not use a for loop.
This loop needs to be safe for removing children in a forall loop.
2010-12-22 21:25:53 +09:00
Matthias Clasen
a6b05106a5 GtkAboutDialog: Be slightly more flexible when listing credits
Make sure we render credits ok that are occurring in the wild,
such as "Contact us at:", "<foo@bar>" or "guy1\nguy2\nguy3"

https://bugzilla.gnome.org/show_bug.cgi?id=637763
https://bugzilla.gnome.org/show_bug.cgi?id=637736
2010-12-22 01:03:58 -05:00
Matthias Clasen
4cc76927b1 Show translators properly in the new about dialog
translator-credits is a single string, typically with newline-
separated names.
2010-12-22 00:31:05 -05:00
Robert Ancell
f4419be0d6 Fix DSO link issues 2010-12-22 15:01:50 +11:00
Matthias Clasen
4b10167ce6 Set a default value for rgba style properties 2010-12-21 18:18:34 -05:00
Matthias Clasen
5b6bdcf016 Fix a tag mismatch in the docs 2010-12-21 18:18:34 -05:00
Matthias Clasen
4331d62567 Add gtkselectionprivate.h to Makefile 2010-12-21 17:57:40 -05:00
Matthias Clasen
7b6d759b04 Temporarily disable combo box entry test
This one got broken by the treeview refactoring, I assume.
2010-12-21 14:43:17 -05:00
Owen W. Taylor
a2dddb1da0 Return an appropriate GtkStyle from gtk_rc_get_style_by_paths()
Always returning NULL (no match) from gtk_rc_get_style_by_paths()
means that looking up colors and style properties based on the
GtkStyle will give default values instead of themed values. We can
do better by returning a GtkStyle based on a GtkWidgetPath that we
figure out from the values passed in to get_style_by_paths().

https://bugzilla.gnome.org/show_bug.cgi?id=637520
2010-12-21 14:27:25 -05:00
Matthias Clasen
10a7f49fe7 Check the right library for symbols 2010-12-21 12:41:29 -05:00
Matthias Clasen
ecddaa7a8e Disable the GtkPlug xi2 hack more thoroughly 2010-12-21 12:07:10 -05:00
Benjamin Otte
4db086da4b x11: Rename GdkDisplayX11 to GdkX11Display
Also rename all the macros etc.
2010-12-21 12:07:07 -05:00
Benjamin Otte
85bd61778f API: gdk: GDK_DISPLAY_OBJECT() => GDK_DISPLAY()
GDK_DISPLAY_OBJECT is now deprecated. No need to keep failures from
gtk1 around.
2010-12-21 12:07:07 -05:00
Benjamin Otte
66f7c3a562 API: gdk: gdk_display_warp_device() => gdk_device_warp()
warping devices has nothing to do with displays, so putting it there
seems weird.
2010-12-21 12:07:06 -05:00
Benjamin Otte
8f1f743903 gtk: Use g_object_unref instead of gdk_cursor_unref 2010-12-21 12:07:05 -05:00
Matthias Clasen
572bb20011 Deal with property encoding functions
Move everything dealing with compound text to be X11 specific
Only gdk_text_property_to_utf8_list and gdk_utf8_to_string_target
are kept across backends, so add vfuncs for these.

Also, remove the non-multihead-safe variants of all these.
2010-12-21 12:07:03 -05:00
Matthias Clasen
61104d58ea Avoid unnecessary use of gdk conversion routines
We can use use gtk_selection_data_get_uris, instead of
manually doing the conversion ourselves.
2010-12-21 12:07:03 -05:00
Matthias Clasen
fdabc9585d Drop g[dt]k_set_locale
These functions were essentially just calling setlocale anyway.
The X11 version was also setting a gdk_use_mb variable that
is not used anywhere.
2010-12-21 12:07:02 -05:00
Benjamin Otte
33417c36f1 plug: Comment hack for xinput that used private x11 backend API 2010-12-21 12:07:00 -05:00
Matthias Clasen
25c66c11e2 Remove gdk_spawn functions
These functions were trivial g_spawn wrappers in all backends
except for X11, and they can be easily replaced by
g_app_info_create_for_commandline + GdkAppLaunchContext.
2010-12-21 12:07:00 -05:00
Matthias Clasen
ef85f112da Don't use gdk_spawn
Replace the sole use of gdk_spawn in GTK+ by GAppInfo.
2010-12-21 12:07:00 -05:00
Matthias Clasen
2d7583c0e3 Make gdk_window_{lookup,foreign_new}_for_display backend specific
At the same time, make GDK_IS_DISPLAY_X11 available in gdkx.h, and
add some exemplaric ifdefs to GTK+ code.
2010-12-21 12:06:59 -05:00
Matthias Clasen
3412d7a23a Don't access GdkScreen fields 2010-12-21 12:06:56 -05:00
Matthias Clasen
3c47c8467c Remove some direct access to GdkDragContext members 2010-12-21 12:06:56 -05:00
Matthias Clasen
07d49ee56a Merge libgdk and libgtk
This commit does a number of things:
- remove some dead wchar configury from configure.ac and gdkconfig.h
- repurpose gdkconfig.h as header that contains GDK_WINDOWING_foo
  macros for each included backend, include it in gdk.h and install
  it in $includedir instead of below $libdir
- drop the backend from the library names
- build libgdk-3.0.la as a convenience lib and include it in libgtk-3.0.la
It does not yet enable building multiple backends at the same time.
2010-12-21 12:06:55 -05:00
Tristan Van Berkom
49273f2277 Added "fixed-size" cell property to GtkCellAreaBox
Now a cell can either have a "fixed" size or it can have
an "aligned" starting point or both. "fixed" size cells take
no space when they are invisible.
2010-12-22 00:28:18 +09:00
Tristan Van Berkom
c8ae68c33d Fixed gtk_cell_layout_set_cell_data_func() to pass the correct layout object
Added _gtk_cell_area_set_cell_data_func_with_proxy() to be called by
gtk_cell_layout_set_cell_data_func() when the layouting object itself
is not the underlying cell area.
2010-12-22 00:28:18 +09:00
Carlos Garnacho
ac0353e08a Make gtk_style_context_get_* functions more robust
Even if the default CSS contains values for these, handle non-existing
values as queries might happen on an incomplete style.
2010-12-21 14:44:49 +01:00
Jesse van den Kieboom
e36ba3465b Added out annotations for gtk_icon_size_lookup/_for_settings
https://bugzilla.gnome.org/show_bug.cgi?id=637606
2010-12-21 13:24:12 +01:00
Jesse van den Kieboom
939f68a35e Added out annotations for gtk_accelerator_parse
https://bugzilla.gnome.org/show_bug.cgi?id=637606
2010-12-21 13:24:12 +01:00
Carlos Garnacho
e02b10046d Ensure widgets get a GtkStyle with its backing GtkStyleContext
Since the default style also has a backing context, it wasn't
being replaced after initialization.
2010-12-21 01:33:51 +01:00
Javier Jardón
33fd2104b7 docs: unmap signal will always be emitted when a widget is unmapped
Since commit 9552152dd9
2010-12-20 23:53:53 +00:00
Matthias Clasen
5c2f407935 Fix problems with window handling in GtkCalendar
After the window removal a while ago, the calendar main window
was not properly moved in size_allocate. Also, we ought to hide/show
the windows in map/unmap, not keep them visible at all times.

Bug 634657
2010-12-20 17:12:02 -05:00
Carlos Garcia Campos
0c518a81b8 printing: Set new print operation settings before emitting custom-widget-apply signal
So that custom settings can be added from the custom-widget-apply
callback.

https://bugzilla.gnome.org/show_bug.cgi?id=637069
2010-12-20 21:10:53 +01:00
Havoc Pennington
9552152dd9 Always emit unmap when a widget is unmapped
Previously, for performance reasons we would sometimes
skip invoking the unmap signal (and associated vfunc)
in favor of simply unrealizing. However, widgets then
had no way to clean stuff up when they were hidden
(but still inside a parent which was shown).

This patch also removes _gtk_tooltip_hide() which
was done in both unmap and unrealize in gtkwidget.c,
now can only be in unmap.

There are probably lots of things cleaned up in
unrealize that would now be better to move to unmap.

https://bugzilla.gnome.org/show_bug.cgi?id=629923
2010-12-20 13:04:45 -05:00
Havoc Pennington
b67c5af55b Add invariant that a child is unmapped if parent is unmapped
Requires fixes to GtkContainer and GtkWindow to unmap their
children, rather than just withdrawing or hiding the container
window.

Requires fix to GtkHandleBox to chain up to GtkContainer unmap.

Historically we avoided these unmaps for efficiency reasons,
but these days it's a bigger problem that there's no way
for child widgets to know that one of their ancestors has
become unmapped.
2010-12-20 12:58:04 -05:00
Havoc Pennington
23ce44c9fe Verify GtkWidget invariants if G_ENABLE_DEBUG is defined
These checks are a bit expensive so require --enable-debug=yes.
gtk_widget_verify_invariants() checks invariants mentioned
in docs/widget_system.txt in particular, and can verify
others in the future.

Some of the invariants in docs/widget_system.txt don't
in fact hold right now, so those are #if 0'd in this
patch pending someone fixing either the docs or the code.
2010-12-20 12:46:51 -05:00
Matthias Clasen
28cc7baef0 Make GtkEntry hide completely
When it was converted to no-window, we forgot to make it hide/show
its input window as necessary.
2010-12-20 12:28:05 -05:00
Matthias Clasen
335bfbc8fc Update GtkAboutDialog documentation
Also, remove some dead code, pointed out in bug 637608.
2010-12-20 11:40:39 -05:00
Carlos Garnacho
33cd32f796 Make gtk_style_new() use a backing GtkStyleContext
Fixes a bug in mutter where it would resort to a dummy style
to get iconview rubberband color.

Reported by Mathieu Bridon in
https://bugzilla.gnome.org/show_bug.cgi?id=637520
2010-12-20 17:18:35 +01:00
Matthias Clasen
5b299ce7af Remove reference to GTK2_RC_FILES from the docs
Pointed out in bug 637471.
2010-12-20 10:23:43 -05:00
Cosimo Cecchi
a5fe3fef7b appchooserdialog: use new GLib API to modify positioning
The dialog will always show up with the last selected application.
2010-12-20 16:08:21 +01:00
Matthias Clasen
183bf8ac9d Use g_strtod when converting strings for GtkCellRendererSpin
These strings are likely user-provided values, so we should
respect locale settings.

Reported in bug 637189.
2010-12-20 10:02:00 -05:00
Matthias Clasen
a9753ef5c6 Add a test for basic style properties 2010-12-20 08:19:23 -05:00
Carlos Garnacho
7030492a3b Disable XI2 in gtk_test_init()
gdk_test_simulate_*() uses XSendEvent, which doesn't currently work
with XI2/GenericEvents, so make tests use core events for the time
being. Luckily there's a lot more to test than low-level event
handling in these tests.
2010-12-20 13:55:38 +01:00
Carlos Garnacho
ca7fe1cb73 GtkStyleProperties: Assign default value for the font property
This fixes a failure when running make test, where style queries
happened before there was even an screen.
2010-12-20 13:55:37 +01:00
Matthias Clasen
d4e9cd09ab Fix up symbol lists 2010-12-19 23:45:21 -05:00
Javier Jardón
26a304c54b Move GtkSelectionData to a private header 2010-12-19 20:48:20 +00:00
Javier Jardón
66e7915dc4 gtktreeselection: Move public members to a private structure 2010-12-19 05:01:22 +00:00
Javier Jardón
74a7bc3a77 gtk/gtktreeview.c: Use accessor to access GtkTreeSelection 2010-12-19 04:56:32 +00:00
Javier Jardón
e92da3e166 gtkcombobox.c: Use accessor functions to access GtkTreeSelection 2010-12-19 01:27:41 +00:00
Matthias Clasen
1b67d31bd9 Remove G_SEAL from private headers 2010-12-18 17:46:19 -05:00
Matthias Clasen
8105125369 Remove sealed members from GtkPrintJob
Also add accessors for these members, and use them in print backends.
2010-12-18 17:45:31 -05:00
Matthias Clasen
5ee3a44415 Remove sealed members from GtkSocket 2010-12-18 17:39:41 -05:00
Carlos Garnacho
56c3d4b1be Remove dead Gtk[Rc]Style code
Most code in gtkrc.c has been turned into a no-op, but that one
reverting in public API (gtk_rc_scanner_new() and such). GtStyle
is also more shallow, now fully relies in the backing
GtkStyleContext and all connection to gtkrc.c has been removed.

GtkBinding has been also affected, there is no replacement yet
for custom keybindings in style files, so that piece of code that
hooked into gtkrc has been replaced by a FIXME so in the future
it may be added back.
2010-12-18 12:10:00 +01:00
Carlos Garnacho
d7dc12d301 Adapt gtk_widget_set_name() docs to style context. 2010-12-18 11:43:37 +01:00
Carlos Garnacho
bbc637f7fd GtkWindow: remove deprecated call.
gtk_style_context_reset_widgets() can be used now to reset all widgets
in a screen.
2010-12-18 11:43:37 +01:00
Matthias Clasen
b45e5fa51e Remove sealed members from GtkTreeModelSort 2010-12-17 23:49:27 -05:00
Matthias Clasen
121746605b Add the private struct in class_init 2010-12-17 21:50:18 -05:00
Matthias Clasen
881ea2881d Remove sealed members from GtkTreeStore 2010-12-17 21:45:20 -05:00
Matthias Clasen
60953ae0f4 Avoid accidental exports 2010-12-17 21:43:42 -05:00
Matthias Clasen
841edfe8c3 Remove an unused pointer from GtkDrawingArea
This is part of removing all sealed members from instance structures.
2010-12-17 20:54:13 -05:00
Matthias Clasen
7b665316cf Hide GtkWindowGroup members
In the process of removing all sealed members from headers.
At the same time, add a gtkwindowprivate.h header and move
all internal functions from gtkwindow.h there.
2010-12-17 20:41:16 -05:00
Matthias Clasen
a2dda0c2bb Trivial changes
Whitespace fixes, comment formatting, etc
2010-12-17 19:14:35 -05:00
Matthias Clasen
453bf477ed Don't query the position of keyboards
Turns out that this causes X errors with the XI2 implementation.
2010-12-17 18:41:24 -05:00
Matthias Clasen
8bc4e13c22 No links in title, please 2010-12-17 18:41:24 -05:00
Matthias Clasen
55a0f8700f Another doc format problem 2010-12-17 14:51:53 -05:00
Matthias Clasen
17c7bda6a3 Fix a doc comment format problem
Parameters / enum values come first, then the paragraph.
2010-12-17 14:50:55 -05:00
Matthias Clasen
5627ba161e More parameter name mismatches 2010-12-17 14:49:27 -05:00
Matthias Clasen
9d8682b9ac Fix a few parameter name mismatches 2010-12-17 14:46:18 -05:00
Matthias Clasen
b32f4ae7c4 Add deprecation guards for gtk_icon_set_render_icon 2010-12-17 14:31:44 -05:00
Matthias Clasen
55ffebe505 Avoid a gtk-doc warning 2010-12-17 14:27:48 -05:00
Cosimo Cecchi
b792a31995 widgetpath: allow GTypes non-derived from GTK_TYPE_WIDGET
This makes things like GtkCellRenderer or GtkNumerableIcon more easily
themeable.

https://bugzilla.gnome.org/show_bug.cgi?id=637169
2010-12-17 18:30:57 +01:00
Kristian Rietveld
faf35d708b Fix size allocation for list mode combo box 2010-12-17 16:53:46 +01:00
Kristian Rietveld
21fc66f120 Set cell_view to NULL immediately after unparenting
This way we are sure no invalid pointer will be accessed in between.
2010-12-17 16:53:46 +01:00
Kristian Rietveld
81515f7183 Check if popup_window is mapped, not popup_widget
Before hide_all was used on popup_window, which means popup_widget
was also unmapped.  This is now no longer the case.  This fixes
subsequent pop ups for appears-as-list == 1.
2010-12-17 16:53:46 +01:00
Benjamin Otte
d50c582961 selection: constify GtkSelectionData getters 2010-12-17 16:47:57 +01:00
Carlos Garnacho
2c8c1c6df4 Remove *_set_extension_events() and old API to query devices.
The old functions to get core pointer and devices list are gone as
well. This slice is entirely replaced internally by multidevice
handling and may just go.
2010-12-17 16:25:14 +01:00
Bastien Nocera
23c1d1cbc9 gtk: Add symbolic property for GtkVolumeButton
When the application prefers symbolic icons, avoids
having to reimplement the button in the software itself.

https://bugzilla.gnome.org/show_bug.cgi?id=636969
2010-12-17 13:23:23 +00:00
Tristan Van Berkom
df0d61e50d Fixed gtk_entry_set_icon_tooltip_text & markup to not crash
Setting this property before the icon is actually set was
resulting in a crash (found by way of Glade bug 606103).
2010-12-17 18:15:08 +09:00
Tristan Van Berkom
b11bb46a76 Fixed parameter names in gtkcellarea.h for gtk-doc parsing. 2010-12-17 15:35:21 +09:00
Tristan Van Berkom
941a0e95d7 Fixed documentation of GtkCellLayout <cell-packing>
Mention that it's safe to use <cell-packing> tag for any GtkCellLayout
in GTK+ since they *all* use an underlying GtkCellArea (at least they
will once the other branches land).
2010-12-17 15:26:28 +09:00
Tristan Van Berkom
71e7cd0ec4 Merge branch 'master' into treeview-refactor
Conflicts:
	tests/testtreeedit.c
2010-12-17 15:25:15 +09:00
Kristian Rietveld
735fa8b197 Avoid recursion in do_validate_rows()
I have never really liked the updates done to the adjustments in
do_validate_rows() and other validation functions.  But it is really
required.  I have to come up with a real solution to this one day.
2010-12-16 23:33:42 +01:00
Kristian Rietveld
88f8859f90 Should pass inner_area to cell in gtk_cell_area_activate_cell() 2010-12-16 22:42:10 +01:00
Kristian Rietveld
e3cab18354 Clip focus rectangle to background area 2010-12-16 12:33:00 +01:00
Kristian Rietveld
c01ad6f615 Fix background area calculation in RTL mode 2010-12-16 12:26:18 +01:00
Javier Jardón
e9a77a1535 docs: gtknotebook.c: Use accessor functions to access GtkSelectionData 2010-12-16 00:16:00 +00:00
Javier Jardón
cf9e9ff47f gtk/gtkclipboard.c: Use accessor functions to access GtkSelectionData 2010-12-15 23:58:16 +00:00
Javier Jardón
e5a3b7edbf gtk/gtkcolorbutton.c: Use accessor functions to access GtkSelectionData 2010-12-15 23:58:16 +00:00
Javier Jardón
1a2d9c368e gtk/gtkcolorsel.c: Use accessor functions to access GtkSelectionData 2010-12-15 23:58:16 +00:00
Javier Jardón
a86d1fa7c3 gtk/gtkdnd.c: Use accessor functions to access GtkSelectionData 2010-12-15 23:58:16 +00:00
Javier Jardón
499aa2b3b9 gtk/gtkfilechooserbutton.c: Use accessor functions to access GtkSelectionData 2010-12-15 23:58:16 +00:00
Javier Jardón
c806c0821a gtk/gtkfilechooserdefault.c: Use accessor functions to access GtkSelectionData 2010-12-15 23:58:16 +00:00
Javier Jardón
fbbe9f5191 gtk/gtkiconview.c: Use accessor functions to access GtkSelectionData 2010-12-15 23:58:16 +00:00
Javier Jardón
8537163e20 gtk/gtklinkbutton.c: Use accessor functions to access GtkSelectionData 2010-12-15 23:58:16 +00:00
Javier Jardón
ad4ac2182a gtk/gtknotebook.c: Use accessor functions to access GtkSelectionData 2010-12-15 23:58:15 +00:00
Javier Jardón
1ceddae7da gtk/gtktextbuffer: Use accessor functions to access GtkSelectionData 2010-12-15 23:58:15 +00:00
Javier Jardón
2b7afcdd79 gtk/gtktextview.c: Use accessor functions to access GtkSelectionData 2010-12-15 23:58:15 +00:00
Javier Jardón
7c6012d933 gtk/gtktoolpalette.c: Use accessor functions to access GtkSelectionData 2010-12-15 23:58:15 +00:00
Javier Jardón
640f85e568 gtk/gtktreednd.c: Use accessor functions to access GtkSelectionData 2010-12-15 23:58:15 +00:00
Javier Jardón
1cfd78269e gtk/gtktreeview.c: Use accessor functions to access GtkSelectionData 2010-12-15 23:58:15 +00:00
Kristian Rietveld
a28c11a27f Clip to cell_area when rendering cell content
This fixes a GTK+ 3.0 regression.  In GTK+ 2, the render method
on GtkCellRenderer had a expose_area parameter, typically set to
cell_area.  This parameter was used for clipping cell content to be
rendered to the cell area (and thus clipping to within the focus
rectangle).  During the rendering clean up this parameter was removed
and no clipping put back into place.

Since expose_area was usually equal to cell_area anyway, it does not make
sense to reintroduce the expose_area parameter.  Instead, we do clipping at
two levels:
 - in gtk_cell_renderer_render() we clip to background_area.  We cannot
clip to cell_area here because we want to allow cell renderers to
render in the background area (e.g. background color/effect).
 - cell renderers should clip to clip_area when rendering cell
content individually (as they had to individually clip to expose_region
before).
2010-12-16 00:07:08 +01:00
Kristian Rietveld
c8d130efa7 Revisit "Handle clicks in indentation area"
Check (x, y) is inside background area.  If yes, continue processing
and clamp the coordinates into cell area.  This way we will properly
handle getting a cell (which is only used for setting the focus cell)
for clicks in the indentation area (in LTR and RTL mode) and clicks
in the focus rectangle area in case focus-line-width is large.
2010-12-15 23:55:26 +01:00
Kristian Rietveld
8e98333d8b RTL fix for gtk_tree_view_focus_to_cursor() 2010-12-15 21:31:35 +01:00
Kristian Rietveld
92e145e719 No need to correct direction for rtl, GtkCellArea takes care of that 2010-12-15 21:27:40 +01:00
Kristian Rietveld
be39883de2 Correct calculation of the cell focus rectangle
The cell's focus rectangle is located around the cell's aligned area.
To get to the correct coordinates for this rectangle, we have to subtract
focus_line_width from the found aligned_area.
2010-12-15 21:17:27 +01:00
Benjamin Otte
1b64655eb6 cssprovider: Explode if we fail to parse the default CSS
This can only happen if somebody really messed up with a checkin, and in
that case we want to explode early.
2010-12-15 14:51:26 +01:00
Benjamin Otte
d3ed729643 gtkrc: Remove unused code
Makes gcc happy.
2010-12-15 14:51:26 +01:00
Benjamin Otte
b0b9c9683b dnd-quartz: gtk_widget_render_icon() => gtk_widget_render_icon_pixbuf() 2010-12-15 14:51:25 +01:00
Benjamin Otte
544146b9be size-request: Clamp size requests to screen size
Size requests should only ever need to return the screen's width/height
and max. This way, potentially large widgets (tree view or icon view)
don't need to do so many computations, but can stop when their computed
size has reached the screen size.
2010-12-15 10:41:20 +01:00
Matthias Clasen
b7fd6f1e88 Remove gtk_widget_reset_shapes
See bug 637155.
2010-12-14 22:15:33 -05:00
Carlos Garnacho
f9ed6baeb4 Improve docs for gtk_widget_reset_style().
Document that it may be needed in containers when
children are reordered.
2010-12-15 03:33:01 +01:00
Carlos Garnacho
66800aa212 Make GtkTextView use GtkStyleContext
GtkTextAppearance still uses GdkColors, even though it could
switch to GdkRGBA with little hassle as it seems sheldomly used
out there.
2010-12-15 03:17:58 +01:00
Diego Escalante Urrelo
02f92f29d5 gtkstylecontext: fix typos in annotations
Fixes Bug #637256
2010-12-15 00:46:25 +00:00
Tristan Van Berkom
8ca6bbbfc0 Make GtkCellArea independantly GtkBuildable.
Simply use the GtkCellLayoutIface hooks for this.
2010-12-14 15:52:40 +09:00
William Jon McCann
96a4fc4e5b Update about dialog design to not use a swarm of dialogs
This is a modernization of the GtkAboutDialog look done
by William Jon McCann. The most noteworthy changes are:
- no more subdialogs
- show license short text in the main dialog
- less verbose email link formatting
- the dialog is modal to its transient parent
2010-12-14 00:15:21 -05:00
Carlos Garnacho
ee31a016ec Make GtkInfoBar use GtkStyleContext
All colors are defined now in the default css, and classes have
been added so the bars are fully themeable (as opposed to
gtk_widget_override_*, which require changing the color map itself)
2010-12-14 02:29:57 +01:00
Carlos Garnacho
fbb75b9b5d Add headers/docs changes for gtk_theming_engine_get_font()
Apparently I didn't git add enough...
2010-12-13 22:42:05 +01:00
Carlos Garnacho
afca06b362 Add getter for font description in GtkThemingEngine
This function is analogous to gtk_style_context_get_font().
2010-12-13 22:31:30 +01:00
Carlos Garnacho
a517cf1bed Make GtkExpander use GtkStyleContext 2010-12-13 22:31:30 +01:00
Carlos Garnacho
89e6cad92f GtkSpinButton: Use GtkStyleContext 2010-12-13 22:31:29 +01:00
Carlos Garnacho
c64a1891f8 Port GtkRange widgets to GtkStyleContext 2010-12-13 22:31:29 +01:00
Carlos Garnacho
3306305fe1 GtkNotebook: Use GtkStyleContext. 2010-12-13 22:31:29 +01:00
Carlos Garnacho
8b8eab1c81 GtkEntry: Use GtkStyleContext. 2010-12-13 22:31:28 +01:00
Carlos Garnacho
618b1a8b33 GtkCssProvider: Make selectors applying from the topmost widget rank higher
For example, for an entry within a notebook, previously these 2 rules would
have the same weight:

.entry {}
.notebook {}

Now ".entry" will rank higher than ".notebook" for the GtkEntry, further
specific selectors such as:

.notebook .entry {}

still get a higher score than the previous ones.
2010-12-13 22:31:28 +01:00
Carlos Garnacho
d80868aa68 GtkThemingEngine: Render tabs background in the correct direction.
The cairo context has been already rotated, so using GTK_JUNCTION_BOTTOM
is expected to be used there.
2010-12-13 22:31:28 +01:00
Carlos Garnacho
2371ed8b87 GtkThemingEngine: handle expander transitions to active, and rtl 2010-12-13 22:31:28 +01:00
Carlos Garnacho
1f697f2695 GtkThemingEngine: remove unused variable 2010-12-13 22:31:27 +01:00
Carlos Garnacho
99f59d8266 Fix coalescing of state animation areas for multiple window widgets.
Coordinates needed to be translated relative to the window position
in within the widget.
2010-12-13 22:31:27 +01:00
Paolo Borelli
f285a84bd6 Add convenience function for the font description. 2010-12-13 22:31:27 +01:00
Tristan Van Berkom
e2c8ecba30 Fixed an error in my last commit in gtk_cell_area_box_context_copy(). 2010-12-13 19:13:43 +09:00
Tristan Van Berkom
623abdedf6 Added gtk_entry_completion_new_with_area() 2010-12-13 15:58:07 +09:00
Tristan Van Berkom
96d636a780 Updated some docs and gtk.symbols file for new apis
Added gtk_cell_area_context_get_preferred_height_for_width and
width_for_height & gtk_cell_area_copy_context() to gtk.symbols
and gtk3-sections.txt (also finished up documenting those apis).
2010-12-13 15:43:58 +09:00
Tristan Van Berkom
41cd9d1394 Fixed gtk_cell_area_box_context_copy() to also copy it's allocations. 2010-12-13 15:37:12 +09:00
Kristian Rietveld
d743ecf82e Handle clicks in indentation area
For this case, we want to set focus on the first cell in the column.
2010-12-12 17:32:59 +01:00
Tristan Van Berkom
2e1e97305f Make GtkTreeView explicitly focus the first cell in the first column when grabbing focus
When focus is initially grabbed and there is no focus column, when selecting
the first column for focus, further explicitly focus into the first cell
using gtk_cell_area_focus().
2010-12-12 17:21:28 +01:00
Tristan Van Berkom
31226ebfb2 Fixed GtkTreeView to give focus back to the last focued cell when hitting
the edge.

When focusing left/right or up/down inside GtkCellArea, now we save what
was the last focused cell and if we hit the side (or top or bottom) of
the view we then restore focus to the last focused cell.
2010-12-12 17:21:28 +01:00
Tristan Van Berkom
632f1f3ac4 Modified gtk_tree_view_move_cursor_up_down to move focus inside the cell area
This currently leaves us the problem of maintaining the right cell in
focus for horizontal areas, the solution for that comming in the
next patch.
2010-12-12 17:21:28 +01:00
Tristan Van Berkom
2752fd0f16 Removing gtk_tree_view_move_focus_column() and only calling gtk_cell_area_focus()
This function did alot of nothing, gtk_cell_area_focus() simply returns whether
the focus stays in the area (column) or not, seems not to cause regressions to
just call it directly instead.
2010-12-12 17:21:28 +01:00
Tristan Van Berkom
0431dd67f8 Added apis to GtkCellArea for GtkIconView purposes.
Added a few apis,

  - GtkCellAreaContext get_preferred_height_for_width &
    width for height apis and vfuncs, this lets the icon view
    request the collective (and aligned) height for width for
    a said row.

  - gtk_cell_area_copy_context() this creates a duplicate of
    an already created and requested context, this way the icon
    view uses a global context to request the widths of all rows
    and then makes a copy with all the stored alignments and
    uses a separate copy to calculate the height and alignments
    of each row separately.
2010-12-13 00:29:21 +09:00
Kristian Rietveld
ff39c76bfd Welcome _gtk_tree_view_column_get_cell_at_pos to the second dimension 2010-12-12 15:22:49 +01:00
Kristian Rietveld
cbfc3f5bf0 Make gtk_tree_view_get_cell_area() aware of row separators 2010-12-12 15:09:27 +01:00
Kristian Rietveld
8c743a0363 Add unit test for row separator height 2010-12-12 15:03:33 +01:00
Kristian Rietveld
d142d8bb6c Do not enforce a minimum of expander_size in gtk_tree_view_get_row_height
Instead this is now enforced in gtk_tree_view_get_cell_area_height().
There are rows for which a height in between 0 and expander_size is
allowed, for example separator rows.
2010-12-12 14:34:26 +01:00
Tristan Van Berkom
1c8093b65e Fixed some glitches in GtkCellAreaBox keynav from my last commit. 2010-12-12 20:40:34 +09:00
Tristan Van Berkom
89b3700b78 Make GtkCellAreaBox remember what was the last focus cell so that when
cycling focus from row to row for a horizontal area we can remember
where focus was the last time around.
2010-12-12 20:40:26 +09:00
Tristan Van Berkom
2f4e451075 Added "edit_only" argument to gtk_cell_area_activate()
This argument allows the caller to specify that only an editable
cell should start editing but an activatable cell should not toggle
it's state, this is important for public apis like
gtk_tree_view_set_cursor_on_cell() which are only intended to
programatically bring attention to the editing of a specific
row or cell but not actually change any data.

GtkTreeView & CellAreaScaffold updated for the last minute api change.
2010-12-12 17:15:46 +09:00
Tristan Van Berkom
46c49ee260 Removed the resetting_context flag from GtkTreeViewColumn private data
No longer need to detect if we're currently resetting the context since
the context properly now avoids re-triggering the reset by properly
avoiding to notify properties that dont change as a result of the reset.
2010-12-12 16:43:07 +09:00
Tristan Van Berkom
fa71b24e9a Fixed gtk_cell_area_context_real_reset() to only notify properties if they change. 2010-12-12 16:42:37 +09:00
Milan Bouchet-Valat
029083454b [GtkComboBoxText] Add checks for id-column/entry-text-column >= 0
If the GtkComboBoxText doesn't have id-column or entry-text-column
set for some reason (value -1), better warn and return. Else, unrelated
assertions fail, and warnings from gtk_tree_model_get_column_type()
are printed, which are not really obvious.

https://bugzilla.gnome.org/show_bug.cgi?id=637018
2010-12-11 19:10:51 +01:00
Matthias Clasen
948ab1a168 Don't access GdkVisual fields directly
Use accessors instead.
2010-12-10 02:32:18 -05:00
Matthias Clasen
83204928b9 Don't access GdkDragContext fields directly
Instead use the accessors.
2010-12-10 00:59:07 -05:00
Martyn Russell
bb87eada6b gtksearchenginetracker: Update to work with libtracker-sparql
libtracker-sparql is available in Tracker 0.9/0.10
2010-12-09 23:53:51 +00:00
Benjamin Otte
3070d6e3d5 Revert "docs: Reinstate pixbufs section in GDK docs"
I committed my whole working tee instead of just one file. Ooops.
This reverts commit ded14b2562.
2010-12-09 23:55:33 +01:00
Benjamin Otte
ded14b2562 docs: Reinstate pixbufs section in GDK docs
It was accidentally removed in 0775b0a858
2010-12-09 11:14:21 +01:00
Tristan Van Berkom
95ca1e241c Removed calculation of background area when about to edit a cell (no need to check the background area of the cell in this case). 2010-12-09 13:59:17 +09:00
Tristan Van Berkom
32d9396f00 Changed misleading variable name in gtk_cell_area_real_activate. 2010-12-09 13:59:04 +09:00
Guillaume Desmottes
107cebe546 gtk_css_provider_get_named: don't leak subpath (#636777) 2010-12-08 21:13:03 -05:00
Marek Kasik
da85312097 Mark conflicts when printer has changed
Schedule marking of conflicts when printer has changed.
Map conflict warning immediately. (#635401)
2010-12-08 17:37:27 +01:00
Carlos Garcia Campos
24e832187f GtkCellRendererPixbuf: Use gtk_widget_render_icon_pixbuf()
Instead of gtk_widget_render_icon() which is now deprecated.
2010-12-08 17:16:02 +01:00
Carlos Garcia Campos
e779b8f249 GtkIconFactory: mention gtk_widget_render_icon_pixbuf() in docs
Instead of gtk_widget_render_icon() which is now deprecated.
2010-12-08 17:15:25 +01:00
Carlos Garcia Campos
3a3a4e8f3b GtkStatusIcon: Use gtk_widget_render_icon_pixbuf()
Instead of gtk_widget_render_icon() which is now deprecated.
2010-12-08 17:14:48 +01:00
Carlos Garcia Campos
2dde04140d GtkImage: Use gtk_widget_render_icon_pixbuf()
Instead of gtk_widget_render_icon() which is now deprecated.
2010-12-08 17:13:43 +01:00
Carlos Garcia Campos
e2100b13d0 GtkFileChooser: Use gtk_widget_render_icon_pixbuf()
Instead of gtk_widget_render_icon() which is now deprecated.
2010-12-08 17:12:59 +01:00
Carlos Garcia Campos
a5dba1670e GtkEntry: Use gtk_widget_render_icon_pixbuf()
Instead of gtk_widget_render_icon() which is now deprecated.
2010-12-08 17:12:14 +01:00
Carlos Garcia Campos
8017092977 dnd: Use gtk_widget_render_icon_pixbuf()
Instead of gtk_widget_render_icon() which is now deprecated.
2010-12-08 17:10:34 +01:00
Carlos Garcia Campos
5582bd23fb Add gtk_widget_render_icon_pixbuf() prototype to gtkwidget.h
And move gtk_widget_render_icon() to deprecation guards block
2010-12-08 16:46:57 +01:00
Paolo Borelli
61731c65aa Annotate ColorButton get_color and get_rgba. 2010-12-08 15:30:42 +01:00
Paolo Borelli
f5d7a63aff Fix gtk_builder_add_objects_from_file g-i annotation
Use the same annotation already used for add_objects_from_string
2010-12-08 15:15:50 +01:00
Tristan Van Berkom
f1c26dfdb2 Fixed gtk-docs typo in gtkcellarea.c 2010-12-08 22:31:33 +09:00
Tristan Van Berkom
40e9f91f43 Fixed foreach_alloc call from gtk_cell_area_real_render to pass the real background area. 2010-12-08 21:27:52 +09:00
Tristan Van Berkom
34f4b5c190 Added 'background_area' calculation to GtkCellAreaClass->foreach_alloc vfunc
This allows us to reduce code allocation code paths in subclasses, as
a result GtkCellArea implements the ->render() vfunc and the subclass
only decides the cell area and background area distributions in a single
code path.
2010-12-08 21:18:05 +09:00
Tristan Van Berkom
a47a557fc3 Merge branch 'master' into treeview-refactor 2010-12-08 15:24:49 +09:00
Matthias Clasen
5ac194c2d7 Some doc additions 2010-12-07 09:55:30 -05:00
Tristan Van Berkom
fc5cabba90 Added minimum size parameter to GtkWidgetClass->adjust_size_allocation.
This allows us to add a check before executing
->get_preferred_height_for_width() to ensure we always
request for at least the minimum required size (and lets
us remove the warning in gtkcontainer.c telling implementors
to do this check manually from thier container implementations).
2010-12-07 23:47:40 +09:00
Cosimo Cecchi
503be10148 label: plug a memory leak 2010-12-07 10:13:32 +01:00
Cosimo Cecchi
6f67f5281f app-chooser-widget: plug a memory leak 2010-12-07 10:08:47 +01:00
Tristan Van Berkom
5fef00de2c Adding gtk_tree_view_column_new_with_area to gtk.symbols and gtk3-sections.txt. 2010-12-07 17:04:04 +09:00
Tristan Van Berkom
1b33698384 Revert "Temporary fix to make separator rows request enough space for the expander size."
This reverts commit 515af9ce70.
2010-12-07 14:09:26 +09:00
Tristan Van Berkom
515af9ce70 Temporary fix to make separator rows request enough space for the expander size.
This fix is incorrect, treeviews dont rely on the expander size for drawing
separator rows (added XXX comment in line), need to fix this somewhere else
2010-12-07 13:52:31 +09:00
Tristan Van Berkom
97e060b094 Fixed my mistake in validate_row (), now the height of treeviews in GtkEntryCompletion is correct again. 2010-12-07 13:52:18 +09:00
Matthias Clasen
fae1e74812 More !srcdir fixes for the stylecontext test 2010-12-06 19:05:18 -05:00
Matthias Clasen
26f6b48ccb Update for the removal of gtk_decorated_window_ apis 2010-12-06 17:44:12 -05:00
Matthias Clasen
f2ab9e497d Prepare the stylecontext test to run out-of-srcdir
This is necessary to make distcheck work.
2010-12-06 14:13:07 -05:00
Matthias Clasen
ad80cb6279 Allow + in identifiers
This is necessary since we treat paths as identifiers in
@import rules, and it is common to have a + in there (at least
when distchecking gtk+ ...)
2010-12-06 14:13:07 -05:00
Benjamin Otte
fc711434bc gtk: Remove old DirectFB code for drawing window decorations
I'm not sure it'd even compile.
2010-12-06 18:57:11 +01:00
Murray Cumming
d23fb64d97 Fix a typo to fix the build. 2010-12-06 16:01:55 +01:00
Matthias Clasen
5f75ffc974 Add gtk_widget_path_get_type to the headers
Bug 636591
2010-12-06 09:50:01 -05:00
Tristan Van Berkom
55bbe4a3a5 Adding gtk_tree_view_column_new_with_area().
Creates a treeviewcolumn using a specific GtkCellArea.
This patch also makes GtkEntryCompletion use the new api
instead of g_object_new().
2010-12-06 19:04:51 +09:00
Tristan Van Berkom
f08f1f92aa Fixed some nit-picking bugs in GtkCellArea
- Dont try fetching a cell renderer for an event when the event
    coordinate is outside the cell area allocation (can happen
    on the y axis, not all events are button events).
  - Dont remove focus-line-width (inner area) an extra time from
    GtkCellArea->event
  - Dont remove focus-line-width from the cell area at all for the
    editable widget... use the whole area including the focus line
    (compared with git master behaviour and now it looks right, check
    the multiline editable string in testtreeedit).
2010-12-06 17:27:03 +09:00
Tristan Van Berkom
0d0ec85877 Fixed GtkTreeViewColumn to reset the context when _gtk_tree_view_column_cell_set_dirty is called.
This fixes autosize columns... result can be viewable by checking
tests/testtreeview and setting the second column to autosize and then
expanding/colapsing some rows.
2010-12-06 17:03:53 +09:00
Tristan Van Berkom
bf1aa2ad87 Changed GtkTreeViewColumn->requested_width to ->padding
Now we bookkeep the treeview assigned padding asides from the
requested width stored in the GtkCellAreaContext, this removes
the need for bookkeeping the deepest expanded depth in gtktreeview.c

At allocation time, just remove the padding from the allocated width
of the column and feed the rest to the underlying cell area.
2010-12-06 16:31:07 +09:00
Tristan Van Berkom
9366a345b4 Fix GtkCellAreaBox allocate_cells_manually to handle undersized areas. 2010-12-06 16:29:40 +09:00
Tristan Van Berkom
c6572265cb Fixed gtk-doc statement in GtkCellArea header 2010-12-06 16:29:13 +09:00
Matthias Clasen
f1fafca6ca Make invalid stylesheets fail to parse again
The recent improvements to error reporting caused gtk_css_provider_load...
to always return TRUE and leave the error unset. Error messages were instead
dumped out with g_message, which is not helpful.

This commit changes things back to the way they were before:
If a GError is passed in, parsing will fail at the first error, reporting
it in the given GError. If no GError is passed in, we keep going and
just issue the warning messages. This fixes the parser tests.
2010-12-06 00:47:13 -05:00
Matthias Clasen
94c9eb72ce Don't use g_warning when loading an engine fails
This causes the tests to abort if clearlooks can't be found.
2010-12-06 00:44:01 -05:00
Tristan Van Berkom
2588165bfb Added gtk_cell_area_foreach_alloc() to further simplify GtkCellArea subclasses
gtk_cell_area_foreach_alloc() itterates over an allocated list of cells
and calls a callback with the cell's allocation until the callback returns
TRUE.
  - Removed vfunc get_cell_allocation() and implemented
    gtk_cell_area_get_cell_allocation() using foreach_alloc()
  - Added gtk_cell_area_get_cell_at_position() using foreach_alloc()
  - Removed GtkCellAreaBox ->event() implementation and implemented
    mouse "click" cell activation in GtkCellArea class directly using
    gtk_cell_area_get_cell_at_position().
2010-12-06 14:11:28 +09:00
Tristan Van Berkom
4b065f5389 Changed gtk_cell_area_forall to gtk_cell_area_foreach since thats more widely used semantics.
Also gave a boolean return value to the callback to allow breaking out of the loop.
2010-12-06 12:41:38 +09:00
Benjamin Otte
d378470e87 appchooser: Remove bogus function declaration 2010-12-06 01:30:19 +01:00
Benjamin Otte
6d6ee9a26a style: Remove unused code 2010-12-06 01:02:52 +01:00
Benjamin Otte
645d0ac403 API: gdk: Remove depth argument from gdk_window_get_geometry()
We don't want to expose depth anymore. If you need it, query the visual.
2010-12-06 01:02:52 +01:00
Paolo Borelli
b36cb87df9 Use the new style context API in GtkButton
Mostly replaces gtk_widget_style_get with gtk_style_context_get_style
2010-12-05 23:12:32 +01:00
Paolo Borelli
4a7e746bbc Use the new style context API in GtkLabel. 2010-12-05 22:07:30 +01:00
Paolo Borelli
561346bd40 Remove unused function modify_color_property 2010-12-05 22:07:30 +01:00
Carlos Garnacho
4cca7554b8 GtkStyleContext: warn on meaningless coords in gtk_render_* calls 2010-12-05 20:19:55 +01:00
Carlos Garnacho
5361490db8 Bug 636511 - New style override functions do not work on textview
Emit ::style-set on overrider style changes, this is necessary
in the mean time so widgets not listening yet to ::style-updated
get the style changes.
2010-12-05 20:19:55 +01:00
Kristian Rietveld
d28cbd6e6d Bring back _gtk_tree_view_column_get_cell_at_pos
The function has been re-implemented around GtkCellArea.  This commits
also brings back the invocation of this function in
gtk_tree_view_button_press().  I shouldn't have removed this.
2010-12-05 18:18:36 +01:00
Matthias Clasen
d5df33c75f Fix abi check after recent merges 2010-12-05 12:18:30 -05:00
Kristian Rietveld
2a6550176c Replace FIRST_PIXEL macros with something that's more clear 2010-12-05 18:04:07 +01:00
Kristian Rietveld
7fe950a745 Clean up and clarify row height calculations 2010-12-05 17:56:30 +01:00
Kristian Rietveld
924359c31d Clean up _gtk_tree_view_column_cell_event 2010-12-05 17:12:37 +01:00
Kristian Rietveld
6c73647727 Remove the need for _gtk_tree_view_column_get_focus_area 2010-12-05 17:10:21 +01:00
Kristian Rietveld
64ddd3f40f Clarify start_pos parameter gtk_tree_view_column_cell_get_position
By renaming it to x_offset.
2010-12-05 17:04:52 +01:00
Kristian Rietveld
77d972e436 Remove private accessor for focus column 2010-12-05 15:20:17 +01:00
Kristian Rietveld
0a1982aff3 Move _gtk_tree_view_column_cell_focus to gtktreeview.c 2010-12-05 15:18:13 +01:00
Kristian Rietveld
131783005e Use structure bitfield instead of GtkTreeViewFlags 2010-12-05 15:12:53 +01:00
Kristian Rietveld
73f99eda1d Turn TREE_VIEW_DRAW_EXPANDERS into an inline function 2010-12-05 14:47:51 +01:00
Kristian Rietveld
ebba08a842 Remove unused TREE_VIEW_COLUMN_REQUESTED_WIDTH macro 2010-12-05 14:42:40 +01:00
Kristian Rietveld
43de55d7a9 Turn TREE_VIEW_HEADER_HEIGHT into an inline function 2010-12-05 14:42:08 +01:00
Tristan Van Berkom
3ca2ec5d2d Fixed conflicts from rebasing GtkTreeViewColumn changes from treeview-refactor. 2010-12-05 22:15:19 +09:00
Tristan Van Berkom
78979b2954 Removing hack and fixing gtk_tree_view_column_cell_get_size().
Now consult gtk_cell_area_context_get_preferred_height().

It can be that height-for-widths requested here were too large
when multiple cells are in play because of the alignments stored
in the context... removing the temporary focus-line-width hack.
2010-12-05 22:14:52 +09:00
Tristan Van Berkom
1b28d87253 Added GtkTreeViewColumn:cell-area construct-only property.
Allow feeding treeviewcolumn a custom cell-area (or not a custom one,
but allow sharing the cell-area with say, the combo-box area).

This patch also:

 - Fixes signal connections to the area (now they do eventually get
   disconnected at dispose time, they are handled regardless if a
   treeview is set but execute safely, at least there is only one
   connection/disconnection).

 - Fixes refcounting on the cell_area (GtkCellArea is GInitiallyUnowned).

 - Adds a constructor() in order to build the cell-area if one has
   not been provided by the caller before hand at g_object_new()
   construct time.
2010-12-05 22:14:40 +09:00
Tristan Van Berkom
0baee408f2 Fixed GtkTreeViewColumn allocation to only subtract the depth padding/indentation from the expander column. 2010-12-05 22:14:27 +09:00
Tristan Van Berkom
779125976c Changed GtkTreeView to bookkeep the deepest expanded depth instead of recalculating it at column allocation time. 2010-12-05 22:14:11 +09:00
Tristan Van Berkom
b54c004c6b Allocate proper inner cell area to the GtkTreeViewColumn.
This is a premature patch, it traverses the tree's expanded
rows and fetches the deepest depth every time we allocate a
column. The deepest depth should rather be cached and pushed
when a row expands, then recalculated when the deepest expanded
row collapses.
2010-12-05 22:13:58 +09:00
Tristan Van Berkom
81e1d02de3 Created _gtk_tree_view_column_request_width().
Removed gtk_tree_view_get_real_requested_width_from_column() from
gtktreeview.c in favor of this function in the treeviewcolumn domain
(since this function goes and checks treeviewcolumn internals, settings
and derives the real requested width, seems logical this should be done
by the treeviewcolumn instead).
2010-12-05 22:12:16 +09:00
Tristan Van Berkom
7b36405a94 Use gtk_tree_view_get_real_requested_width_from_column() all around
GtkTreeView duplicated the contents of this function word-for-word
inside gtk_tree_view_update_size().
2010-12-05 22:12:04 +09:00
Tristan Van Berkom
cf8299f098 Changed _gtk_tree_view_column_set_width for _gtk_tree_view_column_allocate
Now the GtkTreeViewColumn takes care of move/resizing its window and
allocating its button (except for the special case of current drag_column
where the column doesnt actually get reallocated).
2010-12-05 22:11:50 +09:00
Tristan Van Berkom
4038cd76b3 Removed GtkTreeViewPrivate from gtktreeprivate.h and added a few more accessors.
This actually much simplifies interaction with GtkTreeSelection
(at least reduces code size where dealing width the treeview anchor path).
2010-12-05 22:11:37 +09:00
Tristan Van Berkom
4b5c80dc0f Removed the private sharing of internal treeview macros from gtktreeprivate.h
Added them directly to gtktreeview.c.
2010-12-05 22:11:21 +09:00
Tristan Van Berkom
9f4f22faf1 Removed all variables from GtkTreeViewColumn and created GtkTreeViewColumnPrivate
Some details:
  - button_request was not needed, consult the minimum request of the button
  - gtk_tree_view_column_get_button() needed to be public as people can set
    tooltips on the button (and libgail accesses the button).
2010-12-05 22:11:08 +09:00
Kristian Rietveld
137f16c4c5 Do not bother starting a draw call if bar_size <= 0 2010-12-05 13:57:04 +01:00
Paolo Borelli
e0efd067e4 Avoid memory corruption in the color_properties hashtable. 2010-12-05 12:30:28 +01:00
Tristan Van Berkom
f24c21f1f0 Added proper handling of right to left layouting of cells to GtkCellAreaBox. 2010-12-05 15:24:19 +09:00
Tristan Van Berkom
7b61cd8257 Merge branch 'master' into treeview-refactor 2010-12-05 13:14:39 +09:00
Javier Jardón
d351b40a0b Add internal accessor for GtkEntry->is_cell_renderer
This fixes commit fb3429e507
2010-12-04 22:06:02 -05:00
Carlos Garnacho
37719380ae Fix call to gtk_widget_override_cursor() 2010-12-04 18:26:34 +01:00
Carlos Garnacho
3d28adf317 Make gtk_widget_override_cursor() take GdkRGBAs
Even though the style properties have the GdkColor type, the other
gtk_widget_override_* API takes RGBA colors, so it is consistent
now.
2010-12-04 17:49:28 +01:00
Tristan Van Berkom
0d786985a3 Merge branch 'master' into treeview-refactor
Conflicts:
	gtk/gtkmarshalers.list
	tests/Makefile.am
2010-12-05 00:36:37 +09:00