Matthias Clasen
f572a4670d
GtkPanedPrivate: Improve struct packing
2011-04-12 12:37:55 -04:00
Matthias Clasen
fdac246ed2
GtkNumerableIconPrivate: Improve struct packing
2011-04-12 12:35:17 -04:00
Matthias Clasen
f3865a2011
GtkMenuItemPrivate: Improve struct packing
2011-04-12 12:34:53 -04:00
Matthias Clasen
24a07deece
GtkListStorePrivate: Improve struct packing
2011-04-12 12:34:29 -04:00
Matthias Clasen
8377ecd694
GtkLabelPrivate: Improve struct packing
2011-04-12 12:34:11 -04:00
Matthias Clasen
a65e25df83
GtkImagePrivate: Improve struct packing
2011-04-12 12:33:45 -04:00
Matthias Clasen
6c9f20e58d
GtkIconViewPrivate: Improve struct packing
2011-04-12 12:33:24 -04:00
Matthias Clasen
800fff748b
GtkIconThemePrivate: Improve struct packing
2011-04-12 12:33:04 -04:00
Matthias Clasen
b3ca94a44e
GtkEntryBufferPrivate: Improve struct packing
2011-04-12 12:32:29 -04:00
Matthias Clasen
a4e52ece33
GtkCellViewPrivate: Improve struct packing
2011-04-12 12:32:04 -04:00
Matthias Clasen
a6db55b774
GtkCellRendererTextPrivate: Improve struct packing
2011-04-12 12:31:28 -04:00
Matthias Clasen
ea936d4237
GtkCellRendererPixbufPrivate: Improve struct packing
2011-04-12 12:30:36 -04:00
Matthias Clasen
92f1f0c118
GtkCellRendererAccelPrivate: Improve struct packing
2011-04-12 12:30:04 -04:00
Matthias Clasen
a2f005d9a0
GtkCellAreaBoxPrivate: Improve struct packing
2011-04-12 12:25:53 -04:00
Matthias Clasen
9a5d2a52d3
GtkButtonPrivate: Improve struct packing
2011-04-12 12:25:25 -04:00
Matthias Clasen
6ca6691966
GtkBoxPrivate: Improve struct packing
2011-04-12 12:24:56 -04:00
Matthias Clasen
b756743cdf
GtkAppChooserWidgetPrivate: Improve struct packing
2011-04-12 12:24:34 -04:00
Matthias Clasen
39af7107b4
GtkAppChooserButtonPrivate: Improve struct packing
2011-04-12 12:24:05 -04:00
Matthias Clasen
2610e00de9
GtkAccelLabel: Improve struct packing
2011-04-12 12:23:35 -04:00
Kristian Høgsberg
c7514e8f0d
Merge branch 'gdk-backend-wayland'
...
Conflicts:
Makefile.am
configure.ac
gdk/Makefile.am
gtk/gtksettings.c
gtk/gtkwindow.c
2011-04-12 09:52:44 -04:00
Matthias Clasen
3fbfd82e9e
GtkWindow: rearrange private struct to fill some holes
2011-04-11 18:33:43 -04:00
Paolo Borelli
7fe3764f4d
Small cleanup in statusbar
...
Factor out msg_create/free and use g_slist_free_full as appropriate.
https://bugzilla.gnome.org/show_bug.cgi?id=647278
2011-04-11 18:11:36 -04:00
Javier Jardón
518d030220
Move documentation to inline comments: GtkTearoffMenuItem
2011-04-11 23:07:41 +01:00
Javier Jardón
4a7400db99
Move documentation to inline comments: GtkCellRendererPixbuf
2011-04-11 23:07:41 +01:00
Javier Jardón
3990af227f
Move documentation to inline comments: GtkCellRendererCombo
2011-04-11 23:07:41 +01:00
Javier Jardón
1f50a4d011
Move documentation to inline comments: GtkHSeparator
2011-04-11 22:33:38 +01:00
Javier Jardón
1f9f5e8890
Move documentation to online comments: GtkCellRendererSpin
2011-04-11 22:14:35 +01:00
Javier Jardón
ebda721f4e
Move documentation to inline comments: GtkFileChooserWidget
2011-04-11 03:27:08 +01:00
Javier Jardón
62c878b0cd
Move documentation to inline comments: GtkHScale
2011-04-11 03:27:08 +01:00
Javier Jardón
610d46d12e
Move documentation to inline comments: GtkCellRendererAccel
2011-04-11 03:27:08 +01:00
Javier Jardón
de210bd2ae
Move documentation to inline comments: GtkHScrollbar
2011-04-11 02:54:53 +01:00
Javier Jardón
9dc0e7460e
Move documentation to inline comments: GtkFontButton
2011-04-11 02:47:43 +01:00
Javier Jardón
fc0e045d92
Move documentation to inline comments: GtkCellRendererToggle
2011-04-11 02:42:54 +01:00
Javier Jardón
f7f7d4eee4
Move documentation to inline comments: GtkHPaned
2011-04-11 02:36:23 +01:00
Javier Jardón
735f3a23a4
Move documentation to inline comments: GtkInvisible
2011-04-11 02:31:56 +01:00
Javier Jardón
ca8d880a20
Move documentation to inline comments: GtkCellRendererProgress
2011-04-11 02:18:13 +01:00
Javier Jardón
3662744eaa
Move documentation to inline comments: GtkMisc
2011-04-11 02:14:08 +01:00
Javier Jardón
f2fd3ee1d5
Move documentation to inline comments: GtkImageMenuItem
2011-04-11 02:13:02 +01:00
Matthias Clasen
32358a58f4
Avoid a warning out of the print dialog
...
Reported in https://bugzilla.gnome.org/show_bug.cgi?id=647152
2011-04-08 20:49:29 -04:00
Cosimo Cecchi
6261b8434f
themingengine: don't set a line width before saving the cairo context
...
https://bugzilla.gnome.org/show_bug.cgi?id=647086
2011-04-08 20:34:00 -04:00
Cosimo Cecchi
35479be43e
separator: call gtk_style_context_restore() after drawing
...
https://bugzilla.gnome.org/show_bug.cgi?id=647086
2011-04-08 20:33:59 -04:00
Cosimo Cecchi
b52394adca
calendar: make sure to call gtk_style_context_restore()
...
https://bugzilla.gnome.org/show_bug.cgi?id=647086
2011-04-08 20:33:58 -04:00
Paolo Borelli
c4e17bb148
Do not leak list when drawing notebook.
...
When we construct the list in the other order we must free it.
https://bugzilla.gnome.org/show_bug.cgi?id=646886
2011-04-08 20:21:22 -04:00
Alexander Larsson
9db4accf9c
Make gtkclipboard.c:clipboard_get_timestamp multi-backend safe
...
We can't just check for the backend defines, we have to do runtime checks too.
2011-04-07 20:19:30 +02:00
Matthias Clasen
e32728fb5c
GtkColorButton: Don't leak references
...
https://bugzilla.gnome.org/show_bug.cgi?id=646815
2011-04-06 00:57:47 -04:00
Tristan Van Berkom
d4021d7a1b
Fixed bug in GtkSizeRequest code where the cache is not reset properly
...
Fixes this bug https://bugzilla.gnome.org/show_bug.cgi?id=646500
2011-04-04 13:58:05 +09:00
Tristan Van Berkom
0b8a1dcac2
Fixed warning catch in gtk_window_compute_hints().
2011-04-03 18:10:27 +09:00
Carlos Garnacho
e8c78edeb2
theme: Fix prelight on selected rows' expanders
...
There was no prelight effect on selected rows' expanders with the
builtin theme, noticed by Kris Rietveld.
2011-04-03 12:32:20 +02:00
Matthias Clasen
b112d882ef
GtkAppChooserButton: avoid some leaks
...
gtk_tree_model_get() returns a reference for objects.
https://bugzilla.gnome.org/show_bug.cgi?id=646462
2011-04-01 23:53:58 -04:00
Matthias Clasen
315bb30220
Fix some refcounting issues in the print dialog
...
gtk_tree_model_get returns a reference for objects, but the
printers in the model can be NULL,
https://bugzilla.gnome.org/show_bug.cgi?id=646446
2011-04-01 22:05:02 -04:00
Federico Mena Quintero
eb02dacb37
[filechooser] Free things which got duplicated or reffed by gtk_tree_model_get()
...
We had forgotten to do that in a few places; this is a systematic search for those.
https://bugzilla.gnome.org/show_bug.cgi?id=646461
2011-04-01 17:00:17 -06:00
Federico Mena Quintero
58609cfdaf
[filechooser] Unref cancellables we got from the model, not the ones that come into the callback
...
The model_cancellables have an extra ref when we get them from gtk_tree_model_get().
So, we need to unref them always. On the other hand, the cancellables that get
passed as arguments to the callbacks in question are memory-managed by
GtkFileSystemModel.
Reported by Morten Welinder <mortenw@gnome.org>
https://bugzilla.gnome.org/show_bug.cgi?id=646460
2011-04-01 17:00:17 -06:00
Federico Mena Quintero
a24f61fb37
[filechooser] Don't leak a GFile
...
Reported by Morten Welinder <mortenw@gnome.org>
https://bugzilla.gnome.org/show_bug.cgi?id=646458
2011-04-01 17:00:17 -06:00
Federico Mena Quintero
2aad7a5151
[filechooser] Don't add extra ref to file, as it it comes from gtk_tree_model_get()
...
Leak kindly reported by leak finder extraordinaire Morten Welinder <mortenw@gnome.org>
https://bugzilla.gnome.org/show_bug.cgi?id=646457
2011-04-01 17:00:16 -06:00
Juan Pablo Ugarte
a77e6b1593
Added GtkEntry:completion property
2011-04-01 19:35:32 -03:00
Juan Pablo Ugarte
d80d834be8
* gtk/gtktreeselection.c:
...
Added missing GtkTreeSelection:mode property.
Closes bug #645960 "GtkTreeSelection has no property to set mode"
2011-03-31 19:17:17 -03:00
Benjamin Otte
0bfc95faa3
widget: Propagate the right states to the widget when setting the parent
2011-03-30 16:40:06 +02:00
Benjamin Otte
1e43965350
widget: Get rid of parent_sensitive flag
...
Instead rely on state_flags & GTK_STATE_FLAG_INSENSITIVE to tell us if a
widget is sensitive.
This has the huge benefit that the way the widget is actually rendered
corresponds to the return value of gtk_widget_is_sensitive().
As a side effect, we do not ever allow unsetting the
GTK_STATE_FLAG_INSENSITIVE for a widget the is set to not be sensitive
(via gtk_widget_set_sensitive()). This way we stop propagation of making
stuff sensitive at insensitive widgets.
https://bugzilla.gnome.org/show_bug.cgi?id=642918
2011-03-30 16:40:06 +02:00
Matthias Clasen
b2f872112a
Make GtkWidget::halign RTL-save
...
This commit makes GTK_ALIGN_START/_END pay attention to
the text direction when used in horizontal context.
This is how similar parameters in GtkMisc and GtkAlignment work,
and is generally expected of GTK+ positioning parameters. And this
is new GTK+ 3 api, so it is basically still unused at this point.
If explicit right/left turn out to be needed at some point, we
can expand the enumeration with new values.
2011-03-30 10:34:02 -04:00
Matthias Clasen
7a65db0402
GtkGrid: Add forgotten RTL flipping
...
How did we manage to add a non-RTL savy container in GTK+ 3.0 ?
2011-03-30 08:19:30 -04:00
Benjamin Otte
93b0cecd7e
label: Remove dead code
...
This code has been useless for a while, and now it's breaking things.
Moving the paned in tests/testheightforwidth's wrapping label shows that
bug.
Broken since 9992efdb0e
2011-03-30 13:17:01 +02:00
Ryan Lortie
ae6032b2ea
GtkStatusIcon: support fixed-sized icons
...
Use the _NET_SYSTEM_TRAY_ICON_SIZE property set by the tray mananger as
a hint that we should use a specific icon size. This allows the tray to
instruct us that it expects 16x16 icons, for example.
Bug #645232
2011-03-30 00:26:27 +05:30
Carlos Garnacho
ae22476931
theming: Implement non-uniform border-width in the theming engine.
...
The border-width CSS parameter takes up to 4 values, but it was
being ignored by the theming engine until now.
2011-03-29 19:39:34 +02:00
Carlos Garnacho
6834bace95
theming: Avoid boxed struct copies throughout the default engine
2011-03-29 19:39:22 +02:00
Benjamin Otte
21f117c695
label: Add another special case for measuring
2011-03-29 15:33:27 +02:00
Benjamin Otte
9992efdb0e
label: Don't create the layout in size_allocate() if not needed
...
Just update its size if it already exists.
2011-03-29 15:33:27 +02:00
Benjamin Otte
c94dca36ca
label: Move ellipsized layout width computation
...
... from size_allocate() to update_layout_width().
2011-03-29 15:33:27 +02:00
Benjamin Otte
bd3e947485
label: Factor out layout size measuring into its own function
...
Instead of doing half of it in get_preferred_size() and the other half
in get_label_width(), put it all in one place.
2011-03-29 15:33:27 +02:00
Benjamin Otte
e824bb4aab
label: Move function to a better location
...
This patch does not change anything, it just moves the get_label_width
function.
2011-03-29 15:33:27 +02:00
Benjamin Otte
5e80c06d41
label: Factor out layout size setting into a separate function
2011-03-29 15:33:27 +02:00
Benjamin Otte
0930de9446
label: Only get font metrics if we have to
...
Getting these metrics is expensive, so avoid it if possible.
2011-03-29 15:33:27 +02:00
Benjamin Otte
6ba3ef5d82
label: Add optimization for a common special case
...
Oftentimes we want to measure a layout that is as wide or wider than the
current layout's maximal width. In that case we can safely reuse the
current layout.
2011-03-29 15:33:27 +02:00
Benjamin Otte
20b90cb793
label: Remove unused boolean argument from ensure_layout()
...
It's always FALSE.
Note that this patch changes the layout for allocations that are
smaller than 1px, but that's just the default layout that is never
rendered.
2011-03-29 15:33:27 +02:00
Benjamin Otte
db474e82c4
label: Don't recreate the layout just for measuring
...
Instead, create a custom one.
2011-03-29 15:33:27 +02:00
Benjamin Otte
d579166a63
label: Add internal gtk_label_get_measuring_layout() and use it
...
Avoids useless pango_layout_copy() calls and invalidations of an
existing layout when measuring sizes for a given label.
2011-03-29 15:33:27 +02:00
Benjamin Otte
8343831c39
progressbar: remove needless is_drawable() check before queue_resize()
2011-03-29 15:33:27 +02:00
Benjamin Otte
b7cd3d6b06
tracker: Include gdk.h
2011-03-29 15:33:27 +02:00
Benjamin Otte
c6ddbe675a
docs: Fixes for icon renaming
...
Fixes up breakage from 39d4207ab7
2011-03-29 00:09:39 +02:00
Alexander Larsson
e274dbbdce
Ensure we always grab the gdk lock in async callbacks
...
Async callbacks are delivered in idles, so we need to make sure
we get the gdk lock before calling any gdk/gtk stuff. This was
missing in a few places.
2011-03-28 12:49:17 +02:00
Michael Natterer
abe63e8aa1
gtk: add "Since: 3.2" to gtk_widget_path_to_string()
2011-03-27 15:43:31 +02:00
Benjamin Otte
179cec87c8
widget: Only reemit style-set signal after gtk_widget_get_style()
...
If the widget does not care about the compat code, just ignore it.
2011-03-27 03:44:19 +02:00
Benjamin Otte
9d3465412e
widget: Don't invalidate style context in its invalidate callback
2011-03-27 03:39:43 +02:00
Benjamin Otte
bb879b6954
widget: Update path unconditionally in gtk_widget_reset_style()
...
Also, don't set the new path twice on the style context.
2011-03-27 01:53:04 +01:00
Benjamin Otte
d7ca207133
widget: Don't duplicate style context updates
...
The screen changes are done in do_screen_change(), the widget path is
updated in gtk_widget_reset_style().
2011-03-27 01:52:16 +01:00
Benjamin Otte
fb65806c8c
widget: Call the non-deprecated function
...
Both functions are identical, just that one isn't deprecated.
2011-03-27 01:51:20 +01:00
Benjamin Otte
8b4b3cf090
API: Add gtk_widget_path_to_string()
...
Dumps the widget path into a string representation. It tries to match the CSS
style as closely as possible (Note that there might be paths that cannot be
represented in CSS).
The main use of this code is for debugging purposes, so that you can
g_print() the path or dump it in a gdb session.
2011-03-27 01:47:17 +01:00
Benjamin Otte
fafee4e276
widget: Emit initial style-set signal in the same situations as GTK2
...
This ensures that widgets that aren't ported and rely on the style-set
signal being emitted work as well as before. They should not rely on
style-set being emitted however.
Note that this function is a no-op if the initial style has been set
already and is very cheap if it has not been set yet. It only becomes
relevant if the resulting style actually gets used.
https://bugzilla.gnome.org/show_bug.cgi?id=639584
2011-03-27 00:48:26 +01:00
Benjamin Otte
af8a6a7abd
widget: Create the widget's style lazily
...
That way we don't have to update the style's colors all the time on
theme changes when the widget is not actually using GtkStyle.
2011-03-27 00:48:26 +01:00
Benjamin Otte
1891b790b3
widget: Don't call gtk_style_attach() and gtk_style_detach() anymore
2011-03-27 00:48:26 +01:00
Benjamin Otte
080ae55e87
docs: Make clear that gtk_widget_set_style() does not do anything
2011-03-27 00:48:26 +01:00
Benjamin Otte
29444cc30e
widget: Use a priv variable
2011-03-27 00:48:26 +01:00
Benjamin Otte
2bb64c868c
widget: Widgets always have a style, so no need to check for NULL
2011-03-27 00:48:26 +01:00
Benjamin Otte
f2441c08f1
combobox: Don't set the menu's name twice
2011-03-27 00:48:25 +01:00
Benjamin Otte
ea928e4212
notebook: Only reset style on tab labels when it actually changes
2011-03-27 00:48:25 +01:00
Benjamin Otte
963c0905f2
widget: Reshuffle code for style context getter
...
The intention of this patch is to make the code clearer, shorter and
most of all to avoid recreating the widget path and setting it path
twice on the style context when the style context was recreated.
2011-03-27 00:48:25 +01:00
Benjamin Otte
757087e9b4
widget: Don't create the style context if not necessary
...
If all we want to do is update the context's screen, we don't need to
create it if it doesn't exist yet.
2011-03-27 00:48:25 +01:00
Benjamin Otte
0cdebc8bd5
Revert "Ensure GtkWidget::style-updated is emitted before first size negociation"
...
This reverts commit b7f772eb93
.
The commit just poked around things and added lots of workarounds
instead of actually fixing the bug it set out to fix.
See https://bugzilla.gnome.org/show_bug.cgi?id=639584 for details.
2011-03-26 23:52:28 +01:00
Benjamin Otte
8ce533265e
gtk: Reset children styles when changing name
...
Changing the name of a widget does not just change the current widget's
path, but also the path of all its children.
2011-03-26 23:51:51 +01:00
Benjamin Otte
06f590456f
widgetpath: Sanitize pos argument for iters correctly
...
The comparison done was off by one and would have caused invalid
reads or writes.
2011-03-26 23:51:28 +01:00
Benjamin Otte
8a16876fc7
dnd: Use G_N_ELEMENTS()
...
Now that we have wesome macros in glib 2.0, we can use them. Woohoo, GTK
2.0 will be so awesome in the future.
(Did anybody touch dnd code this millenium?)
2011-03-26 23:48:42 +01:00