Commit Graph

34916 Commits

Author SHA1 Message Date
Benjamin Otte
12d22dc811 quartz: Fix Makefile typo 2013-05-15 15:33:24 +02:00
Alexander Larsson
c3973e8468 GtkContainer: Propagate draws in GdkWindow order
Now that we're not drawing the GdkWindows by themeselves we need to
propagate into children in the same order as the windows were painted
otherwise apps can't rely on stacking order to overlay children.

This is still not 100% the same as the old behaviour, because we're
treating all windows that are part of a window at the same time (to allow
e.g. opacity groups), and we're only looking at order for the main
windows of a widget. However, this fixes at least the ordering
of the gnome-boxes fullscreen overlay toolbar.

https://bugzilla.gnome.org/show_bug.cgi?id=699970
2013-05-15 12:47:05 +02:00
Alexander Larsson
a60ccd3672 GdkWindow: Fix shape handling for native windows
We don't track the full clip for each window anymore, as this
is not useful when no windows are opaque. However, we still
need the full clip for the shape, so its calculated manually.

However, it was previously only recalculated when the clip changes
which doesn't correctly handle the case of a sibling geometry changing.

So, instead of doing this directly when geometry changes we just
set a bit in the toplevel whenever some window geometry changes, and
we then handle this in process_updates, updating the shape for all
native windows. This should be ok performance-wise because we don't
expect a lot of native children.
2013-05-15 11:08:35 +02:00
Alexander Larsson
85645e4852 GdkWindow: Fix debug function print_region 2013-05-15 11:08:35 +02:00
Alexander Larsson
8306d26714 GdkWindow: Track all native windows of native windows
We keep a list of all native children of a native window. This means
we don't have to recurse over the entire hierarchy to find any
native children.
2013-05-15 11:08:35 +02:00
Matthias Clasen
3a414e0ace Install gdk tests 2013-05-15 00:14:18 -04:00
Matthias Clasen
c4f0ff9d77 Install the other a11y tests as well 2013-05-14 23:51:37 -04:00
Matthias Clasen
53b3d068cb Install the accessibility-dump tests 2013-05-14 23:21:18 -04:00
Matthias Clasen
a631056808 Add a --directory option to accessibility-dump
This will be used to tell it where its test data resides
when running the a11y tests installed.
2013-05-14 23:21:18 -04:00
Matthias Clasen
af7771a3be Update expected test output for some a11y tests 2013-05-14 23:21:17 -04:00
Thomas Wood
9cb197abc2 wayland: ensure the clip region is updated after the window size is updated
https://bugzilla.gnome.org/show_bug.cgi?id=700301
2013-05-14 16:33:25 +01:00
Jasper St. Pierre
7793f21d2a gtkmenutrackeritem: Simplify the submenu opening API
Instead of making clients inspect the submenu action and decide what
to do based upon that, always request the submenu open and let the
tracker decide what to do.
2013-05-13 16:33:43 -04:00
Jasper St. Pierre
2024384e0a Add some usage docs for the new private copy/paste APIs 2013-05-13 16:33:43 -04:00
Ryan Lortie
a4276a6c79 add GtkMenuTrackerItem
Add a new class, GtkMenuTrackerItem that represents a menu item, to be
used with GtkMenuTracker.

GtkMenuTracker's insert callback now works in terms of this new type
(instead of passing reference to the model and an index to the item).

GtkMenuShell now handles all of the binding tasks internally, mostly
through the use of property bindings.  Having bindings for the label and
visibility attributes, in partiular, will help with supporting upcoming
extensions to GMenuModel.

GtkModelMenu has been reduced to a helper class that has nothing to do
with GMenuModel.  It represents something closer to an "ideal" API for
GtkMenuItem if we didn't have compatibility concerns (eg: not emitting
"activate" when setting toggle state, no separate subclasses per menu
item type, supporting icons, etc.) Improvements to GtkMenuItem could
eventually shrink the size of this class or remove the need for it
entirely.

Some GtkActionHelper functionality has been duplicated in
GtkMenuTracker, which is suboptimal.  The duplication exists so that
other codebases (such as Unity and gnome-shell) can reuse the
GtkMenuTracker code, whereas GtkActionHelper is very much tied to
GtkWidget.  Supporting binding arbitrary GtkWidgets to actions vs.
supporting the full range of GMenuModel features for menu items turns
out to be two overlapping but not entirely similar problems.  Some of
the duplication (such as roles) can be removed from GtkActionHelper once
Gtk's internal Mac OS menubar support is ported to GtkMenuTracker.

The intent to reuse the code outside of Gtk is also the reason for the
unusual treatment of the enum type introduced in this comment.

This adds no new "public" API to the Gtk library, other than types that
we cannot make private due to GType limitations.
2013-05-13 16:33:43 -04:00
Ryan Lortie
03235bf027 action stuff: Change include style
The shell wants to transplant our GtkActionObserver/GtkActionObservable
code now as well, so change to ""-style #includes there.
2013-05-13 16:33:42 -04:00
Jasper St. Pierre
6030ba4803 action stuff: Introspection fixes 2013-05-13 16:33:42 -04:00
Jasper St. Pierre
8ad384f3dc action stuff: Remove G_GNUC_INTERNAL 2013-05-13 16:33:42 -04:00
Ryan Lortie
6c49cd0ea6 action stuff: stop abusing GLib's namespace
Rename our internal GActionMuxer, GActionObserver and GActionObservable
classes and interfaces to have names in our own namespace.

These classes were originally intended for GIO but turned out to be too
special-purpose to be useful there, so we never made them public API but
have just been copying them around (without bothering to properly rename
them).  Now that other people will be copying them out of Gtk, it's even
more important to prevent this namespace abuse from spreading further.
2013-05-13 16:33:42 -04:00
Ryan Lortie
58481ffabf tests: make GtkMenu test more flexible
We were using gtk_menu_item_get_label() from a testcase to determine the
label associated with a menu item.  Future changes to GtkModelMenuItem
will cause this to stop working, so try a bit harder to find a label
inside of the item.
2013-05-13 16:33:42 -04:00
Matthias Clasen
0e40afd5b0 Revert "Fix .ui.h -> .ui naming of files."
This reverts commit 99c7091abe.

Please, no more touching of POTFILES.in without asking first.
These .ui.h files are really meant to be there.
2013-05-13 15:45:47 -04:00
Hib Eris
914099dce1 Build extract-strings tool for build system
This fixes cross compiling where build system != host system.

https://bugzilla.gnome.org/show_bug.cgi?id=699690
2013-05-13 17:07:46 +02:00
Kjartan Maraas
7d5a90b7b9 Updated Norwegian bokmål translation 2013-05-13 14:44:20 +02:00
Kjartan Maraas
99c7091abe Fix .ui.h -> .ui naming of files. 2013-05-13 14:44:20 +02:00
Matthias Clasen
1b99a016a3 Add a test for dialog placement with csd
Taken from
https://bugzilla.gnome.org/show_bug.cgi?id=700056
2013-05-13 06:06:10 -04:00
Joe Pea
67c8ebc5d5 GtkPlacesSidebar: Fixed tooltip capitalization
Use sentence capitalization for the tooltip on the file system disk under Devices.
https://bugzilla.gnome.org/show_bug.cgi?id=698933
2013-05-13 05:47:05 -04:00
Bastien Nocera
98d33803fb Fix accels added after the window was shown not working
GtkApplicationWindow would only update its list of captured accels
when realizing the window. This meant that keyboard shortcuts added
after the window was realised (for example, added by plugins) would
be non-functional.

Solve this by updating our accels every time the accel map changes,
not only when realizing the window.

https://bugzilla.gnome.org/show_bug.cgi?id=700079
2013-05-13 08:57:06 +02:00
Matthias Clasen
9289156889 Improve wording of filechooser context menu
Use header captialization, and shorten the labels a bit.
https://bugzilla.gnome.org/show_bug.cgi?id=698361
2013-05-12 22:25:54 -04:00
Matthias Clasen
c6fec489ac Improve sensitivity handling in filechooser context menu
Items that act on the selection should not be sensitive if the
selection is empty. This was already the case for the 'Copy file
location' item, but not for the 'Add bookmark' and 'Visit file'
items.
https://bugzilla.gnome.org/show_bug.cgi?id=699104
2013-05-12 22:17:15 -04:00
Carlos Garnacho
a33f0ff839 Find tooltip/dnd widget running through container children in inverse order
Usually, educated GtkContainers' forall() implementation returns children
in an order that's safe for the default draw() implementation in GtkContainer.
So for widgets with some stacking notions (eg. GtkOverlay),
_gtk_widget_find_at_coords() needs to recurse within containers in reverse
order so it finds the topmost widget.

As this function is used in both tooltips and DnD code, this improves behavior
of "floating" widgets wrt those two. This could for example be seen in the
"Transparent" GTK+ demo, where dropping text on the entry results on the text
going to the textview.

https://bugzilla.gnome.org/show_bug.cgi?id=699239
2013-05-12 21:17:01 -04:00
Matthias Clasen
8fcfbc179c Test a few more titlebar things
Add tests for fullscreening and disposing with custom titlebar
to testheaderbar.
2013-05-12 21:01:59 -04:00
Matthias Clasen
7052d4071c csd: Properly dispose custom titlebars
gtk_bin_remove can't handle internal children, so we have
to unset the titlebar widget before chaining up in dispose.

https://bugzilla.gnome.org/show_bug.cgi?id=700054
2013-05-12 21:01:59 -04:00
Matthias Clasen
d31391b0c7 csd: Ignore titlebars when hidden
We were not drawing the content background in the titlebar
area when fullscreen, and were still treating clicks there
as if they were on the titlebar.
2013-05-12 21:01:59 -04:00
Matthias Clasen
759f223396 csd: Manage visibility of custom titlebars
We should hide custom titlebars when in fullscreen mode, just
as we do for non-custom titlebars.
https://bugzilla.gnome.org/show_bug.cgi?id=700053
2013-05-12 21:01:59 -04:00
Sébastien Wilmet
6b50045f90 Doc: various small fixes
https://bugzilla.gnome.org/show_bug.cgi?id=700007
2013-05-12 18:09:28 +02:00
Sébastien Wilmet
fcc3f973d3 gtktextchild: replace hard-coded values by a macro
The macro already exists, so it's better to use it.

https://bugzilla.gnome.org/show_bug.cgi?id=700007
2013-05-12 18:09:11 +02:00
Tristan Van Berkom
11be64d3fe GtkComboBoxText: Improved GtkBuildable documentation.
Also removed a bogus FIXME comment which might have been true
a long time ago. Clarification: the "domain" attribute specified
in the builder script overrides any domain previously set with
gtk_builder_set_translation_domain(), so the translation of items
here is perfectly correct and does not need to be fixed.
2013-05-12 21:56:40 +09:00
Yuri Myasoedov
b3f1e0cc36 Updated Russian translation 2013-05-12 12:46:16 +04:00
Matthias Clasen
42ee21e34c Make gtk_window_resize work again
This hunk of code was lost by accident in the previous commit.
2013-05-11 19:44:57 -04:00
Matthias Clasen
fc10ee8d4a GtkWindow: default size is only for initial map
Bring back need_default_size. We need it to preserve this
documented behavior:

The default size of a window only affects the first time a window is
shown; if a window is hidden and re-shown, it will remember the size
it had prior to hiding, rather than using the default size.

With this patch, all of the window sizing tests in
gtk/tests/window pass again.
2013-05-11 18:49:51 -04:00
Benjamin Otte
689905c1b4 widget: make gtk_widget_compute_size_for_orientation() static
It's not used anywhere outside of gtksizerequest.c anymore.
2013-05-11 15:11:53 +02:00
Benjamin Otte
bd4d00918e API: Don't export gtk_widget_preferred_size_and_baseline()
gtk_widget_preferred_size() is only useful if you want to quickly port a
widget from GTK2 sizing code to GTK3 but does not properly work with
height-for-width as used in GTK. So we don't want to encourage people to
use it. In particular we want people to convert to height-for-width
before adding baseline support to their widgets.
2013-05-11 14:48:01 +02:00
Benjamin Otte
205c16df32 quartz: Remove unused variable 2013-05-11 14:47:48 +02:00
John Ralls
e148be0d32 Fix typo in 6115961175 2013-05-10 17:25:58 -07:00
John Ralls
b75aa67bbe Remove framework initialization code
This is left over from an old effort to bundle gtk and its dependencies
into a Mac OS X Framework. The effort was more or less successful but
proved difficult to maintain and impractical to use because gtk programs
don't use the special Framework include syntax.
2013-05-10 17:25:58 -07:00
Matthias Clasen
31fd014c93 Add more window-size related tests 2013-05-10 13:55:00 -04:00
Colin Walters
33f6730249 GtkBookmarksManager: Only save if we have data to save
Otherwise we write an empty file, which is lame.
2013-05-09 16:48:38 -04:00
Colin Walters
4f01c0b159 GtkBookmarksManager: Ensure parent directory exists when saving
Otherwise we fail when the user doesn't have ~/.config yet.
2013-05-09 16:48:03 -04:00
Benjamin Otte
20e8675106 widget: Remove unused variable 2013-05-09 19:09:50 +02:00
Benjamin Otte
ecaf09c918 build: remove --disable-rebuilds
It's unused and was only useful when perl wasn't installed. But perl is
a dependency of glib these days, so it's useless.
2013-05-09 19:09:50 +02:00
Colin Walters
a8da29b8db Add --enable-installed-tests, use it for reftests
See https://live.gnome.org/GnomeGoals/InstalledTests

https://bugzilla.gnome.org/show_bug.cgi?id=699601
2013-05-09 19:09:49 +02:00