Commit Graph

18549 Commits

Author SHA1 Message Date
Bastien Nocera
dbbea8b97e Add GtkSearchBar widget
This widget is a toolbar that will popup automatically when
searches should be started, and dismissed when they are finished.

https://bugzilla.gnome.org/show_bug.cgi?id=700787
2013-05-31 17:09:11 +02:00
Benjamin Otte
63eb47577e API: Deprecate gtk_container_resize_children()
It does ad things and is undocumented, so I'll just silently deprecate
it.
2013-05-30 20:02:30 +02:00
Benjamin Otte
299714dd1a container: Don't use to-be-deprecated API
Instead, do what that API does manually.
2013-05-30 20:02:05 +02:00
Benjamin Otte
4e50596b37 window: Call size_allocate() to allocate a size
Don't call gtk_container_resize_children().

https://bugzilla.gnome.org/show_bug.cgi?id=700185
2013-05-30 19:28:54 +02:00
Timothy Arceri
44cd166447 GtkBookmarksManager: Refactor duplicate set error code and localise error strings
https://bugzilla.gnome.org/show_bug.cgi?id=593079
2013-05-30 10:37:58 -05:00
Xavier Claessens
92823b2201 GtkMenuItem: Take padding into account to position submenu arrow
Since commit a69619edbc, it not
possible anymore for the style to add space between the border
and the arrow.

https://bugzilla.gnome.org/show_bug.cgi?id=700779
2013-05-29 14:53:17 +02:00
Benjamin Otte
0bd76a855c cssimage: Add forgotten line
That line was already missing in the initial commit it seems.
2013-05-28 15:24:04 +02:00
Benjamin Otte
f6c746a99d cssanimation: Use property id here 2013-05-28 15:24:04 +02:00
Benjamin Otte
6bf059e36f treeview: Don't cache the height
Instead, use the correct value all the time.
2013-05-28 15:24:03 +02:00
Chun-wei Fan
da31982379 Fix build on C89 compilers
-Avoid defining variables in the middle of the block
-Include fallback-c89.c in gtkrevealer.c in place of math.h as
 fallback-c89.c includes math.h itself, and is needed for round()
2013-05-28 13:36:54 +08:00
Matthias Clasen
fe2260c53d Fix distclean
extract-strings was left behind.
2013-05-27 18:25:31 -04:00
Matthias Clasen
540c665117 Add gtk_test_widget_wait_for_draw to docs 2013-05-27 14:49:43 -04:00
Matthias Clasen
cbe5a3a590 Add a tiled window state
This information is needed to draw client-side decorations
properly in this state.
https://bugzilla.gnome.org/show_bug.cgi?id=696001
2013-05-27 13:31:28 -04:00
Timothy Arceri
84513df5a7 Fix error_selecting_folder_over_existing_file_dialog() never displaying message
https://bugzilla.gnome.org/show_bug.cgi?id=700864
2013-05-26 00:37:23 -04:00
Timothy Arceri
b940122c4a Handle G_IO_ERROR_FILENAME_TOO_LONG errors when saving
https://bugzilla.gnome.org/show_bug.cgi?id=591969
2013-05-26 00:21:41 -04:00
Timothy Arceri
8f668240de Update gtk_file_chooser_set_do_overwrite_confirmation() documentation to reflect what is actually happening
https://bugzilla.gnome.org/show_bug.cgi?id=360131
2013-05-26 00:17:48 -04:00
Alban Browaeys
b08fe39cd8 GtkPlacesSidebar: do not unref mount
Do not unref mount has we grabbed its pointer without taking
a reference.
Otherwise the following call to g_list_free_full on network_mounts
frees it a second time. Segfault in nautilus ensue.

https://bugzilla.gnome.org/show_bug.cgi?id=700979
2013-05-26 00:03:13 -04:00
Matthias Clasen
fc1ff40296 csd: Fix handling of titlebar height
gtk_widget_get_allocated_height returns the adjusted
allocation, so we can't use it as measure for how much
room to leave when drawing the window background.
2013-05-25 21:02:00 -04:00
Matthias Clasen
80513aa2c7 GtkBox: don't propagate the expand child property
The intention of the expand widget flags was to in fact propagate
legacy expand child properties as well. Due to implementation errors,
this was only happening in some cases, but not in others. To avoid
breaking old code assuming traditional expand flag behavior, this
commit removes all attempts to propagate GtkBox::expand.

This was discussed in
https://bugzilla.gnome.org/show_bug.cgi?id=698656 and
https://bugzilla.gnome.org/show_bug.cgi?id=628902

This patch was written by Tristan Van Berkom.
2013-05-25 14:46:09 -04:00
Matthias Clasen
f83af03579 Avoid shadowing a variable
I don't think this broke anything, but it is just inviting
confusion.
2013-05-25 13:17:57 -04:00
Bastien Nocera
536fc22de4 GtkSearchEntry: Don't wait for timeout when emptying
When the text entry gets cleared, emit the "changed" signal
straight away. This avoids a lag when dismissing a search.

https://bugzilla.gnome.org/show_bug.cgi?id=700787
2013-05-23 20:53:30 +02:00
Bastien Nocera
1bfbfbc50c GtkTreeView: Use GtkEntry private function to remove hack
https://bugzilla.gnome.org/show_bug.cgi?id=700787
2013-05-23 20:53:30 +02:00
Bastien Nocera
ffbe7f6eb6 GtkEntry: Focus the entry without selecting the text
Focusing the text entry without selecting all the text is needed in
some places (GtkTreeView, and some uses of GtkSearchEntry) so
create a private helper to avoid replicating the hacks.

https://bugzilla.gnome.org/show_bug.cgi?id=700787
2013-05-23 20:53:30 +02:00
Federico Mena Quintero
e6dca05445 GtkFileChooser: Only allow creating bookmarks for folders, not files
https://bugzilla.gnome.org/show_bug.cgi?id=561221
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-05-22 17:30:49 -05:00
Federico Mena Quintero
dc2f399dd0 GtkPlacesSidebar: Only create bookmarks for folders, not files
https://bugzilla.gnome.org/show_bug.cgi?id=561221
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-05-22 17:22:28 -05:00
John Ralls
ffd538c802 Bug 667759 - gtkdnd-quartz.c is missing annotations for introspection
Work around this by introspecting gtkclipboard.c and gtkdnd.c instead
of the quartz alternatives.

Note that this is temporary: The implementation of GdkSelection
will make the quartz alternatives unnecessary. See bug 571582.
2013-05-20 15:44:18 -07:00
John Ralls
af1499c371 Bug 691921 - GTK+ built on Leopard references [NSMenu removellItems]
Test it with respondsToSelector, and if it isn't available delete the
items one at a time.
2013-05-20 15:17:47 -07:00
Luc Pionchon
b634d8de47 typo
https://bugzilla.gnome.org/show_bug.cgi?id=699289
2013-05-19 21:24:01 -04:00
Luc Pionchon
0e08ff19ba Add doc to set markup and accelerator on a MenuItem.
https://bugzilla.gnome.org/show_bug.cgi?id=699289
2013-05-19 21:24:01 -04:00
Matthias Clasen
58d155d1e6 Fix drawing of treeview grid lines
In the presence of invisible columns, the grid line drawing
code was malfunctioning.

https://bugzilla.gnome.org/show_bug.cgi?id=700578
2013-05-18 19:21:54 -04:00
Bastien Nocera
41b07bdc96 GtkSwitch: Don't handle events from extra mouse buttons
Also use GDK_EVENT_{STOP,PROPAGATE} to make return
values clearer.

https://bugzilla.gnome.org/show_bug.cgi?id=696640
2013-05-18 14:49:55 +02:00
Bastien Nocera
7d54fc14bf GtkButton: Don't suppress unhandled mouse events
Mouse events that we do not handle should bubble up to the parent
widget, so they can be handled there, instead of disappearing inside
the button. Also use GDK_EVENT_{STOP,PROPAGATE} to make return
values clearer.

https://bugzilla.gnome.org/show_bug.cgi?id=696640
2013-05-18 14:49:55 +02:00
Benjamin Otte
b3b1c672ee treeview: Use tick callback
instead of a timer for the presize callback.
2013-05-17 20:49:52 +02:00
Benjamin Otte
6f9dc0ffd7 treeview: Store editable position differently
Instead of storing the rect in the bin window, store the row and column
the editable belongs to and compute the rect lazily. This way, we don't
need to keep the rect up to date.

Fixes /TreeView/scrolling/new-row-mixed/path-500 test.
2013-05-17 20:49:52 +02:00
Benjamin Otte
5c7528c591 treeview: Remove unused function 2013-05-17 20:49:52 +02:00
Benjamin Otte
8616dbbad3 API: Add gtk_test_widget_wait_for_draw ()
See docs and following commits for what it's supposed to do. Let's hope
it fixes the flakiness in tests.
2013-05-17 20:49:52 +02:00
Bastien Nocera
51e238653d GtkSearchEntry: Delay the changed signal by default
Emit the "changed" signal after 150 msecs, so that searching
through big lists, or doing online searches feels more responsive.

This is something already done in various applications to make
search-as-you type more responsive (gnome-shell, gnome-documents,
gnome-control-center, etc.). The 150 msecs is the value currently
used by gnome-shell, so keep it (invisibly) consistent.

https://bugzilla.gnome.org/show_bug.cgi?id=700229
2013-05-17 19:45:46 +02:00
Benjamin Otte
bdfb55c945 build: Move gtk/tests to testsuite/gtk 2013-05-15 15:37:16 +02:00
Benjamin Otte
ac8f7f0703 tests: Include gtk/ directory from toplevel 2013-05-15 15:33:24 +02:00
Benjamin Otte
06a8fac3e9 tests: Use testing API instead of duplicating it 2013-05-15 15:33:24 +02:00
Benjamin Otte
772470fb9d tests: Use absolute paths to unrelated files 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
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