The metacity theme format allows to use colors from the current
GTK+ theme in window decorations. Since GTK+ now gained support
for dark theme variants, window managers using that theme format
(metacity, mutter, compiz via gtk-window-decorator) should be able
to use colors from the correct variant; so in case a variant is
requested, export it in the _GTK_THEME_VARIANT property on
toplevel windows.
https://bugzilla.gnome.org/show_bug.cgi?id=645354
gtk_entry_set_placeholder_text() makes the entry display the given text
when it is empty and unfocused. Based on previous patch by Alberto
Garcia.
https://bugzilla.gnome.org/show_bug.cgi?id=440963
We were ignoring the focus ring padding, and we were incorrectly setting
handle_x to padding.left, while the draw handler already takes padding
into account while redrawing.
https://bugzilla.gnome.org/show_bug.cgi?id=645134
When tabs are not shown, and the notebook is used as a container,
we should not set the notebook style, otherwise the theme has no
way to know whether tabs are shown or not, and which colour to draw
the background.
https://bugzilla.gnome.org/show_bug.cgi?id=640692
Writing onto the passed-in GtkStateData could cause changes that would
propagate to siblings, as the data was not reset again.
By copying the data structure, this is avoided and the proper values are
passed to sibling widgets.
Commit 4bb3d64414 introduced a limitation
to GtkRange style properties; when stepper-spacing is > 0,
trough-under-steppers is automatically set to FALSE; this means that
setting a spacing between the steppers (e.g. the scrollbar buttons) and
the trough (i.e. the area over which the slider is free to move) would
make the buttons always get the full allocation on the !orientation
direction.
The rationale is without this limitation, you would get an area which
seems clickable, but it's actually not.
While this is true, and undesirable, for big stepper spacings, themes
that use trough-under-steppers (which is TRUE by default anyway),
might want to set smaller spacings to avoid drawing a double line between
the button and the slider borders.
To add confusion, the documentation got it flipped, i.e. it stated
setting a positive stepper-spacing would set trough-under-steppers to
TRUE (which would also make the behavior expected by commit
4bb3d64414 impossible).
I don't think hardcoding either of the two limitations is a good thing.
We should let themes handle this instead, and remove this limitation. If
you want the old behavior, you can manually set trough-under-steppers to
FALSE if you set a positive stepper-spacing in your theme.
https://bugzilla.gnome.org/show_bug.cgi?id=644777
This documentation was in direct conflict with the documentation
of gtk_tree_model_row_deleted() docs, the function docs are TRUE,
the signal docs were FALSE, fixed.
parse_value() could fill in a GError, but yet (incorrectly) return G_TOKEN_NONE,
having the GError leaked as a result.
https://bugzilla.gnome.org/show_bug.cgi?id=642604 , Reported by Felix Riemann.
Use lower level methods that just require changing the state in the
GtkStyleContext instead. Fixes a problem where the insensitive state
was being set to the entry becasuse a parent was insensitive, spotted
by Alex Larsson.
The render order for tabs is now
- left to right until the active tab
- right to left until the active tab
- active tab
This allows themes that use non-straight lines for the tab curvature to
draw them not worrying about flipping one side after the active tab.
Let the tab overlap eat the padding, otherwise having tab-overlap >
tab-curvature without cutting the label is impossible.
This way we give the label widget all the allocation possible before
giving up and cutting it if the values for tab-overlap are too extreme
for the given padding.
Previously, the inactive state caused the spinner's solid line to be
drawn to the right. Now it's drawn to the top instead, which makes the
inactive state look more natural.
Previously, for i == 0, we were drawing the translucent line first.
However, people reading the code would always assume the solid line is
indicated by the current step. So make the code do that.
Note that the spinner now rotates in the wrong direction. This will be
fixed in a future commit.
* gtk/gtkmain.c: (gtk_init): Mention that argc and argv can be 0,
using the new text from the g_applicatoin_run() documentation.
There was already introspection annotation about that.
(gtk_init_check, gtk_init_with_args): Use the same text here.
See bug #643649 comment 2.
This is in preparation for making scale marks styling better.
As a side-effect, TOP and LEFT position are treated the same now,
as well as BOTTOM and RIGHT.
Based on a patch by Bastien Nocera,
https://bugzilla.gnome.org/show_bug.cgi?id=643685
GtkWidget now parses custom attributes like
<style>
<class name="dark-label"/>
<class name="big-heading"/>
</style>
to add style classes to widgets.
https://bugzilla.gnome.org/show_bug.cgi?id=643347
Set the Mac key theme when creating a Quartz settings object instead of
having it the default when quartz is enabled.
This keeps compatibility with the GTK2 behavior that the Mac key theme
is not used for the X11 backend, which could now happen for a
multi-backend build.
Previously we were enabling some settings properties only if the X11
backend was enabled. This worked fine with GTK2 where only one backend
was enabled at a time, but now when multiple backends can be enabled,
this does not make sense.
GtkSwitch was listening for Space/Enter keyreleases itself, instead
of providing an 'activate' action signal, like e.g GtkButton. As a
side-effect, this fixes
https://bugzilla.gnome.org/show_bug.cgi?id=643321
In this patch we adress rows_reordered() and row_deleted() callbacks
(since some icon view subclasses manipulate the connected treemodel
from _init()).
We were breaking prematurely out of the loop that goes through
each file that is pending selection; not only does that loop
disable filtering and show hidden files if needed, but it also
selects the files themselves. So we need to walk the whole
list of files.
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
https://bugzilla.gnome.org/show_bug.cgi?id=643170
Adding these cases here to cater to icon view subclasses that want to
access icon view APIs from the instance structure initializer instead
of properly waiting for the super class to initialize and adding renderers
from the ->constructor() vfunc.
This avoids overflow when transforming a large value to a pango unit.
To reproduce the problem:
seq 200000 > test.txt && tets/print-editor test.txt
Then scroll to around line 140.000 to see it (depends on font size of
course).
gtk_tree_model_filter_row_deleted was emitting ::row-deleted while
the internal state of the model was still in disarray, causing
segfaults e.g. when mapping the file chooser with accessibility
turned on. This is just a bandaid fix, and doesn't try address
any of the deeper problems of the filter model code.
I did take the time to reduce rampant variable shadowing in that
function, though.
If a level 1 key maps to a key value passed to
gdk_test_simulate_key(), raise the GDK_SHIFT_MASK flag so the reqested
key value is generated. Also add a regression test for this fix.
which happened when the source widget was hidden or destroyed while a
drag was going on, like when dragging from a popup that got a grab
broken as result of the dnd operation.
At the same time, change the library sonames for -3.0 to just -3.
This is necessary since the 2.99 releases installed libraries like
libgtk-3.0.so.0.9903.0, and we want to prevent the library version
number from jumping back. So 3.0 will have libgtk-3.so.0.0.0.
This was an oversight in the recent accel label improvement.
When we get an untranslated string back from gettext(), it is
not ok to replace '_' by ' ' in-place. Instead, do it while
appending to the GString.
https://bugzilla.gnome.org/show_bug.cgi?id=641912
This operation is potentially expensive, so the code has been
refurbished so avoid the cases it was needed for. Antialiased
cairo_clip() has been also reduced to transitions with surface
patterns involved.
Gdk-3.0 is already included above via --include-uninstalled, so
don't also specify it in INCLUDES. Doing so breaks if it isn't
installed already, since we try to find the gdk-3.0.pc.
It was unclear in the docs what happened if
gtk_style_context_add_provider() and
gtk_style_context_add_provider_for_screen()
were used with the same priority.
Sensitivity changes were not properly propagated down the
hierarchy. There were two issues here:
a) correctly identifying when a state change request affects
sensitivity
b) not filtering out sensitivity in gtk_widget_propagate_state(),
since gtk_widget_set_sensitivity() uses that to do its work
https://bugzilla.gnome.org/show_bug.cgi?id=641431
Optimized GtkSizeGroup code that is invoked for every queued resize
and every request that is not previously cached by trading qdata on
widgets for 3 extra bitfields on the GtkWidgetPrivate structure.
so pull the SELECTED state flag out of the !sensitive branch. Also,
don't make FOCUSED depend on SELECTED here, it's up to the widget to
decide whether or not that is possible.
It is used to get the default providers, without them
the style context can't do much. A check for NULL screen
is done before any sensitive call to
gtk_style_context_set_screen(), in the hope that any widget
will open the display before doing anything related to
styling. Fixes bug #641429, reported by Bastien Nocera.
Before this patch, unsetting the filter manually before disposing
the recent chooser menu (or unsetting the filter twice), would cause
warnings (or invalid memory accesses).
Having default implementations on abstract classes that do nothing
or print errors make life easier for language bindings implementors,
inside GTK+ this makes little or no difference.
Having default implementations on abstract classes that do nothing
or print errors make life easier for language bindings implementors,
inside GTK+ this makes little or no difference.
constructors which take an object of the same class as its first argument are
mis-detected as method call with "self" argument by the GIR scanner. Using the
new (constructor) annotation from bug 561264, mark some of them as proper
constuctors, so that you can call them with NULL as first argument from
bindings; in particular, this fixes gdk_window_new() and the
gtk_radio_button_new_with*() constructors.
b3f6f67c changed the loop from while() to for() in gtk_fixed_forall(),
but that's wrong since the callback can have side-effects on the list,
in case the current child gets removed. And that's the case when the
widget is destroyed.
Patch by Vincent Untz
https://bugzilla.gnome.org/show_bug.cgi?id=641196