Commit Graph

36085 Commits

Author SHA1 Message Date
Ryan Lortie
2e06ff3d4d GtkMenuTracker: tweak separator logic
Ignacio Casal Quinteiro reported a problem whereby an empty section at
the start of a menu has a separator placed after it.  This was caused by
the implementation of the logic that separators should be inserted at
the top of all non-empty sections that are not the first section.  This
logic is obviously incorrect in the case that the first section is empty
(in which case we would not expect to see a separator at the top of the
second section).

Change the logic so that we only insert separators when we see a
non-zero number of actual items in the menu before us.

https://bugzilla.gnome.org/show_bug.cgi?id=721119
2014-04-14 09:20:34 -04:00
Carlos Garnacho
feb0c89e0b x11: Implement "drag to top to maximize" gesture on emulated window dragging
And the counterpart to unmaximize when dragging a maximized window, if
touch devices aren't going to use EWMH moveresize, having this one at least
makes things feel a bit less awkward.

https://bugzilla.gnome.org/show_bug.cgi?id=709914
2014-04-10 16:29:03 -07:00
Carlos Garnacho
5e43c61fa2 x11: Fallback to emulated window dragging for touch devices
Sadly, EWMH moveresize mechanism can't work with touch devices for two
reasons:

1) As a mutter implementation detail, the device is queried in order
to check whether the dragging button is still pressed. Touch devices
won't report the button 1 being pressed through pointer emulation.
2) Even bypassing that check, on X11 touch events are selected prior
to sequences being started, either through XISelectEvents or
XIGrabTouchBegin, no late registering through active grabs is allowed,
as WMs do on reaction to EWMH moveresize messages.

So for the time being, make touch devices fallback on emulated window
dragging, which at least allows for moving windows.

https://bugzilla.gnome.org/show_bug.cgi?id=709914
2014-04-10 16:28:55 -07:00
Matthias Clasen
dc4b32b091 X11: Support keyboard-initiated move and resize operations
The EWMH defines _NET_WM_MOVERESIZE_SIZE_KEYBOARD and
_NET_WM_MOVERESIZE_MOVE_KEYBOARD for operations that are not
initiated by a button-press event. Allow using these by passing
a button of 0 to gdk_window_begin_move/resize_drag.
2014-04-10 16:28:45 -07:00
Piotr Drąg
9a2accc7a7 Updated POTFILES.skip 2014-04-06 16:04:16 +02:00
Matthias Clasen
18ee393a2a Bump version 2014-04-05 23:56:27 -04:00
Matthias Clasen
2981ac9cf9 3.10.8 3.10.8 2014-04-05 22:25:33 -04:00
Matthias Clasen
9ee757cf05 Fix distcheck 2014-04-05 22:25:32 -04:00
Matthias Clasen
ebf97dfbe4 Fix the documentation build 2014-04-05 17:01:16 -04:00
Matthias Clasen
6d7837885f overlay: deal gracefully with main widget being absent
It can happen that we get a size request when the main widget
is still NULL. Currently we hit a critical in this case, and
stumble on. We can do better.
Opening a new tab in nautilus is hitting this case.
https://bugzilla.gnome.org/show_bug.cgi?id=727643
2014-04-05 17:01:16 -04:00
Michael Natterer
384924790f treeview: remove unused members from GtkTreeView Private 2014-04-05 17:01:15 -04:00
Paolo Borelli
1fbd66ea87 textbufferserialize: do not leak list of tags 2014-04-05 17:01:14 -04:00
Paolo Borelli
16b9dbd2dd stackswitcher: do not leak buttons hash table 2014-04-05 17:01:13 -04:00
Jonas Danielsson
44201cb39d clipboard: Add link to GdkDisplay in doc
https://bugzilla.gnome.org/show_bug.cgi?id=712752
2014-04-05 17:01:13 -04:00
Bastien Nocera
8fdda90a45 treeview: Lower the duration of validation iterations
GTK_TREE_VIEW_TIME_MS_PER_IDLE is currently 30 milliseconds, meaning
that validate_rows will validate rows up until all the validations have
taken over 30 msecs. So it's likely to block redrawing via the clock
frame update mechanism, as that tops at 16.66 milliseconds per frame
(1/60th of a second).

Stop validating rows if we've spent more than 3/5 of our allotted budget
for inter-frame processing, so as to avoid blocking.

In the future, we would probably want to calculate how long we would
have left until the next frame, especially if higher priority idles
and timeouts have already consumed a portion of that allotted time.

https://bugzilla.gnome.org/show_bug.cgi?id=726871
2014-04-05 17:01:12 -04:00
Olivier Brunel
c20721fd20 treemodelfilter: Fix using wrong path on row-deleted
A "typo" led to using a wrong GtkTreePath when converting the path of the
virtual root to check the ancestors, which would lead to either no checks being
performed, or maybe segfaulting when using an invalid path as result.

https://bugzilla.gnome.org/show_bug.cgi?id=722058
Signed-off-by: Olivier Brunel <jjk@jjacky.com>
2014-04-05 17:01:11 -04:00
John Lindgren
81a5243a47 Allow gtk_radio_menu_item_set_group() to be called twice without crashing.
https://bugzilla.gnome.org/show_bug.cgi?id=726859
2014-04-05 17:01:10 -04:00
Joanmarie Diggs
1994fc7ec4 Add missing AtkRelations for labelled containers in the print dialog
These AtkRelation types are added automatically for widgets with a label
specified (e.g. via gtk_label_set_mnemonic_widget, gtk_frame_set_label,
and gtk_frame_set_label_widget). When such specification is absent, the
accessible relationship must be manually set.

https://bugzilla.gnome.org/show_bug.cgi?id=726996
2014-04-05 17:01:10 -04:00
John Lindgren
f92a25d773 Fix typo (GTK_ENABLE_DEBUG vs. G_ENABLE_DEBUG).
https://bugzilla.gnome.org/show_bug.cgi?id=726858
2014-04-05 17:01:09 -04:00
Matthias Clasen
3d626d9094 font chooser: Update font list on font changes
We do get a style-updated emission when new fonts are installed.
Update the font list in this case.

https://bugzilla.gnome.org/show_bug.cgi?id=726476
2014-04-05 17:01:08 -04:00
Benjamin Otte
851b5d3c4c docs: Add more information to gtk_widget_set_realized()
It's important to point out that widgets should only be marked as
realized very late in the process. Even GTK widgets don't get this
right.

https://bugzilla.gnome.org/show_bug.cgi?id=726717
2014-04-05 17:01:07 -04:00
Benjamin Otte
6c9d0e1773 expander: Call set_realized() later
Widgets should only call set_realized() after having created and
registered their GDK windows. In this case, the creation of the style
context (or more exactly: figuring out the scale factor for it) requires
knowing if the widget is already realized. Which it isn't.

https://bugzilla.gnome.org/show_bug.cgi?id=726717
2014-04-05 17:01:07 -04:00
Benjamin Otte
2594f3452c cssprovider: Fix error message
expected a valid semicolon
sounds kinda not so great. Make it say
  expected semicolon

Unless somebody can tell me the difference between valid and invalid
semicolons?
2014-04-05 17:01:06 -04:00
Matthias Clasen
9d8ac6cacf Work around gcc stupidity
With -Wc++-compat, gcc warns about 'and' even in contexts where it
poses absolutely no danger.

https://bugzilla.gnome.org/show_bug.cgi?id=726136
2014-04-05 17:01:05 -04:00
Owen W. Taylor
6d593407d5 gdk_cairo_surface_create_from_pixbuf: Add missing (allow-none) annotation
The window is allowed to be %NULL
2014-04-05 17:01:05 -04:00
Owen W. Taylor
f27ad4df43 Fix font size when gdk_x11_display_set_window_scale() is used
We have a hack in the XSETTINGS code to substitute gtk-xft-dpi
with gdk-unscaled-dpi unless the screen has a fixed window scale,
in which case we just use gtk-xft-dpi.

But if the screen is changed to have a fixed window scale, then
the substituted value of gdk-unscaled-dpi will stick around until
the next (coincidental) change to XSETTINGS. To fix this, force
an immediate reread of the XSETTINGS property when
gdk_x11_display_set_window_scale() is used.

https://bugzilla.gnome.org/show_bug.cgi?id=725754
2014-04-05 17:01:04 -04:00
Carlos Garnacho
2a16425617 entry: Make DnD coordinate calculation compensate for entry icons
This made DnD have effect farther on the left when dragging text over
any entry with icons in it.

https://bugzilla.gnome.org/show_bug.cgi?id=725866
2014-04-05 17:01:03 -04:00
Carlos Garnacho
9341779f4d entry: use priv->dnd_position when rendering the DND cursor
This makes "cursor position" track the DnD point again, looks much
more intuitive than just rendering it on the pre-DnD position.

https://bugzilla.gnome.org/show_bug.cgi?id=725866
2014-04-05 17:01:03 -04:00
Matthias Clasen
e617464d50 Improve GtkStack documentation
As has been pointed out in
https://bugzilla.gnome.org/show_bug.cgi?id=725711
it is a little confusing that we have the concept of
a visible child and of the child being visible itself.
2014-04-05 17:01:03 -04:00
Claudio Saavedra
e43fd6f8c7 gtkentrycompletion: fix a critical warning
There are early returns in this method before the completion timeout
is set later on, so set the source to 0 to avoid trying to remove it
later again.

https://bugzilla.gnome.org/show_bug.cgi?id=725824
2014-04-05 17:01:02 -04:00
Lars Uebernickel
ba003f7f42 gtkmenu: displace popups by their css margin
Without a margin, the pointer is above the first (or last) menu item,
making it easy to accidentally activate that item.

https://bugzilla.gnome.org/show_bug.cgi?id=591258
2014-04-05 17:01:02 -04:00
Marek Kasik
d60a903407 GtkIconViewAccessible: Don't access freed item
Don't get index from deleted GtkIconViewItem.
Remove the item before traversing list of items.

https://bugzilla.gnome.org/show_bug.cgi?id=701884
2014-04-05 17:01:02 -04:00
Benjamin Otte
402776103a broadway: Print a useful error message
.. instead of the generic "failed to open display".
2014-04-05 17:01:01 -04:00
Matthias Clasen
cfeceb17b3 GtkRange: make autoscrolling work for inverted ranges
This problem was discovered in
https://bugzilla.gnome.org/show_bug.cgi?id=725225
2014-04-05 17:01:00 -04:00
Christoph Reiter
e70eebda16 treeselection docs: spelling fix
https://bugzilla.gnome.org/show_bug.cgi?id=725205
2014-04-05 17:00:59 -04:00
Andrés G. Aragoneses
3aae2dad40 trivial: fix typo in docs of gtk_css_provider_to_string 2014-04-05 17:00:59 -04:00
Andrés G. Aragoneses
949c6a15a6 autogen.sh: fail faster/clearer if g-i not found
GOBJECT_INTROSPECTION_CHECK macro can be missing if introspection
is not installed, so this way the following error is prevented:

"gtk/Makefile.am:1324: error: HAVE_INTROSPECTION does not appear
in AM_CONDITIONAL"

https://bugzilla.gnome.org/show_bug.cgi?id=723438
2014-04-05 17:00:58 -04:00
Andrés G. Aragoneses
fbf8089019 trivial: fix typo in docs of gtk_css_provider_to_string 2014-04-05 17:00:57 -04:00
Benjamin Otte
28df43806e reftests: Add a test for a widget stacking regression
GTK 3.10 fails to obey the stacking order when drawing widgets.

https://bugzilla.gnome.org/show_bug.cgi?id=725089
2014-04-05 17:00:56 -04:00
Benjamin Otte
9b5183a9ce fixed: Fix drawing order
Restore the drawing order in GtkFixed to what it was in 3.8. With the
GDK drawing changes this will not be correct in some cases (un-windowed
children can now overlap windowed children and native children overlap
everything), but fixes Eclipse drawing.

https://bugzilla.gnome.org/show_bug.cgi?id=725089
2014-04-05 17:00:56 -04:00
Giovanni Campagna
e4d551766b pixbuf-demo: don't lock the window size
What's the use of an animation demo, if you can interactively
resize it and show off how cool is your window system handling
updates?

https://bugzilla.gnome.org/show_bug.cgi?id=725172
2014-04-05 17:00:55 -04:00
Matthias Clasen
1a2bd60e14 Fix life-cycle handling of treeview columns
gtk_tree_view_remove_column was first removing the column from
its list, then call gtk_tree_view_column_unset_tree_view, which
would then call gtk_container_remove to remove its button from
the treeview. But the treeview remove implementation relied
on the column being still in the list in order to recognize
the button as 'special', so in effect the button was never
properly removed and thus, leaked.

Fix this by callling unset_tree_view before removing the
column from the list.

https://bugzilla.gnome.org/show_bug.cgi?id=724891
2014-04-05 17:00:54 -04:00
Paolo Borelli
16a197c311 Do not leak cairo_region 2014-04-05 17:00:53 -04:00
Matthias Clasen
418573eca8 GtkTooltip: Avoid extra work
When we are hiding the label or icon anyway, no need to change
it right before, causing reallocation overhead.
2014-04-05 17:00:53 -04:00
Matthias Clasen
e881f553c2 Fix a small memory leak
GtkPrintUnixDialog was leaking a GFile.
Spotted by Christian Persch in
https://bugzilla.gnome.org/show_bug.cgi?id=724631
2014-04-05 17:00:52 -04:00
Ignacio Casal Quinteiro
d0f593f5b8 Remove duplicated word "id" from warning message 2014-04-05 17:00:51 -04:00
Matthias Clasen
6e433c08e8 GtkLabel: don't eat too many button release events
We should only eat button release events when the label is
actually selectable, since the comment indicates that we
want to eat the release events belonging to press events
that triggered a selection. This fixes problems with actions
on parent widgets that are triggered by button release,
as seen in this bug:

https://bugzilla.gnome.org/show_bug.cgi?id=724541
2014-04-05 17:00:51 -04:00
Matthias Clasen
dc6edb553d tree view: clean up custom search entry on destroy
Suprisingly, this bug has been there for a very long time.
I'm fixing it now because we now use a custom search entry
in the app chooser dialog, and this is causing the templates
cleanup test to fail.
2014-04-05 17:00:50 -04:00
Ting-Wei Lan
0a6f0dfedd Do not return things from a void function
Reported in https://bugzilla.gnome.org/show_bug.cgi?id=724008
Author:    Ting-Wei Lan <lantw44@gmail.com>
2014-04-05 17:00:49 -04:00
Benjamin Otte
8e7dd6d8ff label: Avoid creating new attribute list
Only create an attribute list for merging if we actually need to merge.

This bug was introduced in 5230cfe805
2014-04-05 17:00:49 -04:00