Commit Graph

113 Commits

Author SHA1 Message Date
Matthias Clasen
9b18deee1f Add a missing word in the docs 2015-03-08 18:16:11 -04:00
Matthias Clasen
71bd1c7e2c file chooser: Really stop typeahead search popups
GtkTreeView is a bad widget and constantly resets the search-column
behind our back. We need to re-unset it every time a model is set :-(
2015-03-03 18:03:26 -05:00
Carlos Garnacho
5751d4f66e filechooser: Only do search_start_query() while we are in search mode
This signal can be emitted by GtkSearchEntry after search has been
cancelled, and other operation mode is set. It doesn't make sense to
populate the search model in that state anymore, so just avoid doing it.

https://bugzilla.gnome.org/show_bug.cgi?id=745479
2015-03-03 17:57:08 +01:00
Carlos Garnacho
a994f4edfb filechooser: Disconnect signal handlers from search engine before destroying
The search engine might stay alive longer due to extra temporary refs, so
the signal handlers should be removed for the filechooser to ignore these
properly.

https://bugzilla.gnome.org/show_bug.cgi?id=745479
2015-03-03 17:57:08 +01:00
Matthias Clasen
209c5c37f3 file chooser: Avoid animated scrolling for editing
Avoid scrolling animation when scrolling to where we want
to insert the new folder, since adding the entry doesn't
do the right thing if the treeview is still scrolling.

An alternative would be to wait for the animated scrolling
to reach its target before starting the editing, but this
is easier.

https://bugzilla.gnome.org/show_bug.cgi?id=729366
2015-03-02 16:25:30 -05:00
Matthias Clasen
18de5e6547 file chooser: Avoid triggering assertions
cairo surfaces are boxed types, so don't try to set them
with g_value_set_object().
2015-03-02 16:25:30 -05:00
Matthias Clasen
d2fe45ab57 file chooser: Avoid warnings from the location column
Avoid criticals that would come out of this code if file is / or NULL.
2015-03-02 16:25:30 -05:00
Matthias Clasen
f126157bfa file chooser: Don't start search too eagerly
We were trying to start search when the user types anything,
but this is annoying more often than helpful, and interferes
with the location entry. So, stick with explicitly enabled
search (via the search button or Alt-S) for now.
2015-02-28 16:44:21 -05:00
Matthias Clasen
ff87c6516b file chooser: Allow to limit search
Add a button to allow restricting search to the current
folder (and subdirectories). This makes the search more
useful, and makes the file chooser more similar to
nautilus.
2015-02-14 01:03:38 -05:00
Matthias Clasen
2c5ea0dd45 file chooser: Add a location column for search
In search, we show files from differnt locations, and it makes
sense to show where they come from. This makes the file chooser
more similar to nautilus, too.
2015-02-14 01:03:38 -05:00
Matthias Clasen
61012f3efe file chooser: Don't open folders unexpectedly
Folders that show up among search results were unexpectedly
returned even for GTK_FILE_CHOOSER_ACTION_OPEN. Change things
around so that we switch to the folder instead, which is the
behavior we had in GTK+ 2.x.

https://bugzilla.gnome.org/show_bug.cgi?id=744204
2015-02-14 01:03:38 -05:00
Matthias Clasen
b876e036b2 file chooser: Allow opening folders in the file manager
This has been suggested in
https://bugzilla.gnome.org/show_bug.cgi?id=325150#c2
2015-02-11 23:34:04 -05:00
Matthias Clasen
99b17488dd file chooser: Unset sidebar during search
It is a bit misleading to have one of the places in the sidebar
selected while in search mode, since the search is not relative
to any location. So, unset the sidebar selection when we enter
search mode.
2015-01-28 18:26:42 -05:00
Matthias Clasen
e31e88582f file chooser: Unify search mode leaving
Make all ways to get out of search mode go through the same
code path, so we always populate the list.
2015-01-28 18:21:18 -05:00
Matthias Clasen
a385ca1bb7 file chooser: Fix key bindings
Key press handlers must chain up for key bindings to work.
2015-01-28 18:17:51 -05:00
Matthias Clasen
59c04d5184 file chooser: Load a directory when leaving search
Ensure that some folder contents are shown in
the list when we leave search mode.

https://bugzilla.gnome.org/show_bug.cgi?id=743659
2015-01-28 18:15:19 -05:00
Matthias Clasen
696129d83c file chooser: Don't switch too eagerly to search mode
If the search entry doesn't consume the key event, don't
change to search mode. Otherwise, we interfere e.g. with
Ctrl and Shift keys for selection.

https://bugzilla.gnome.org/show_bug.cgi?id=743660
2015-01-28 17:01:30 -05:00
Matthias Clasen
86eefc7609 file chooser: Make Escape go out of search mode
This works in most other places where we have search,
and is the expected behavior.
2015-01-28 16:07:51 -05:00
Matthias Clasen
1d64175c4b file chooser: Simplify search entry callback 2015-01-28 16:07:51 -05:00
Matthias Clasen
d270c5524f file chooser: Drop unused callbacks 2015-01-28 16:07:51 -05:00
Matthias Clasen
de4427304c file chooser: Add a search-mode property
This will be used to control search from the dialog.
2015-01-28 16:07:51 -05:00
Matthias Clasen
76b674f3b6 file chooser: Clean up includes 2015-01-28 16:07:51 -05:00
Christoph Reiter
8fc920144b GtkFileChooserWidget: Fix a crash for when the widget was unrefed right after setting a current folder.
Keep a reference to the widget while the async operation is ongoing.

https://bugzilla.gnome.org/show_bug.cgi?id=725164
2015-01-24 17:28:28 -05:00
Christoph Reiter
c235747847 GtkFileChooserWidget: remove unused fields and cleanup code.
These fields are never set, so we don't need the code to clean them up.

https://bugzilla.gnome.org/show_bug.cgi?id=725164
2015-01-24 17:28:28 -05:00
Matthias Clasen
b3c28e14fe file chooser: search improvements
Make it so that typing switches to search unless we have a better
use for the key events, and stop search if the entry is emptied.
2015-01-24 13:32:31 -05:00
Matthias Clasen
82e324f8ac file chooser: Fix up some focus issues
Better to switch the visible stack child early, since GtkStack
has its own focus handling now.
2015-01-18 19:45:13 -05:00
Matthias Clasen
1a38c4d066 file chooser: Make search work again
The last round of filechooser redesign work had left
search somewhat dysfunctional. This commit fixes things
up enough that search is once again a working feature
of the file chooser.
2015-01-18 18:59:43 -05:00
Matthias Clasen
dcd3d15380 file chooser: Drop the location label
Bringing us close to the new design.
2015-01-18 17:57:12 -05:00
Matthias Clasen
4b47c5a649 file chooser: Don't show 'Enter Location' in save modes
In these modes, the entry is permanently visible anyway.
2015-01-18 17:39:05 -05:00
Matthias Clasen
a8cb7352c5 file chooser: Make Ctrl-L work in recent
Just switch to browse mode when we see Ctrl-L in recent mode.
https://bugzilla.gnome.org/show_bug.cgi?id=660450
2015-01-18 17:35:22 -05:00
Matthias Clasen
8133e7e624 file chooser: Ensure the path bar is initialized
There are some cases where we can end up showing the path
bar without ever setting a file on it. One example is:
1) Open file chooser
2) Hit ~
3) Hit Ctrl-L
While this is a bit of a workaround, at least it makes sure
that we never end up with an empty space where the path bar
is supposed to be.
2015-01-18 17:13:12 -05:00
Matthias Clasen
6a7b549608 trivial refactoring 2015-01-18 16:57:21 -05:00
Matthias Clasen
dfe6399de8 file chooser: Make ~ and / work in recent
Complained about in
https://bugzilla.gnome.org/show_bug.cgi?id=743117
2015-01-18 16:18:12 -05:00
Iain Lane
8c5094c22c gtkfilechooserwidget: When using an extra widget, show or hide the filter combo as appropriate
https://bugzilla.gnome.org/show_bug.cgi?id=742653
2015-01-10 20:37:39 -05:00
Matthias Clasen
2aa3eea781 GtkFileChooser: Add a menuitem for 'sort directories first'
This has been requested repeatedly.
2014-11-03 00:02:13 -05:00
Matthias Clasen
f678e48a08 GtkFileChooser: Make preview update more understandable
Implement Federico's suggestion:
In single-selection mode, just use the selected row,
In multi-selection mode, use the cursor row as long as it is
in the selection.

https://bugzilla.gnome.org/show_bug.cgi?id=154709
2014-10-19 17:54:28 -04:00
Matthias Clasen
faa1909474 GtkFileChooserWidget: Better typography
No double space after .

https://bugzilla.gnome.org/show_bug.cgi?id=735192
2014-09-29 23:05:22 -04:00
Matthias Clasen
683a7f1429 GtkFileChooserWidget: Use ratio in formatted times
This matches what we do in other places now.
2014-08-22 02:04:31 -04:00
Matthias Clasen
31e4ec4632 GtkFileChooserWidget: Remove an errant line
This was leaking a schema object, and looks like a bad merge.
2014-06-28 21:38:47 -04:00
Jasper St. Pierre
9c37b3de74 gtk: Don't use GObjectClass.constructor
Use the newer constructed instead, which has a fast path in GObject.
2014-06-26 19:06:43 -04:00
Matthias Clasen
872fbfacd3 Split GtkWindowGroup into its own file
gtkwindow.c is too big and too messy. This is a small step
towards making it better.
2014-06-04 06:24:05 -04:00
Matthias Clasen
0011c9dae4 Fix filechooser actionbar visibility
The actionbar was always visible, even when there is no filter
and no extra widget to show. Now we only show it when there is
something to show.
2014-05-24 00:00:00 -04:00
Matthias Clasen
fd65b68927 docs: Trivial typo fix 2014-05-19 22:47:59 -04:00
William Jon McCann
384b227e7b file-chooser: make enter location an operation mode
https://bugzilla.gnome.org/show_bug.cgi?id=722211
2014-04-22 22:35:02 -04:00
William Jon McCann
20dfe1dd7f file-chooser: merge path bar mode and location mode
https://bugzilla.gnome.org/show_bug.cgi?id=722211
2014-04-22 22:35:01 -04:00
William Jon McCann
d8ca588e17 file-chooser: remove select a folder info message
https://bugzilla.gnome.org/show_bug.cgi?id=722211
2014-04-22 22:35:01 -04:00
William Jon McCann
d46ed4ec00 file-chooser: don't use an special label for recent
https://bugzilla.gnome.org/show_bug.cgi?id=722211
2014-04-22 22:35:00 -04:00
William Jon McCann
a644b34154 file-chooser: add a search bar instead of using a path bar mode
https://bugzilla.gnome.org/show_bug.cgi?id=722211
2014-04-22 22:35:00 -04:00
William Jon McCann
b05b91c692 file-chooser: style save mode name box as a search bar
So we get a bottom border etc.

https://bugzilla.gnome.org/show_bug.cgi?id=722211
2014-04-22 22:34:59 -04:00
William Jon McCann
22e3552a9d file-chooser: don't show a "save folder:" label
https://bugzilla.gnome.org/show_bug.cgi?id=722211
2014-04-22 22:34:58 -04:00