Commit Graph

62 Commits

Author SHA1 Message Date
Matthias Clasen
270b6d3a84 file chooser: Use a multipress gesture
This replaces the use of ::button-press-event. There's two
issues with this commit:
1) We don't have a good way to do the equivalent of
   gdk_event_triggers_context_menu with gestures
2) We have to defer to and idle to avoid ordering
   issues with the treeviews own gestures
2018-01-16 14:14:10 -05:00
Timm Bäder
62ccf8743a filechooser: Manage spinner state
So we don't get an allocate every frame.
2018-01-04 12:20:27 +01:00
Matthias Clasen
c176d0c3d8 Simplify ui files
Run gtk3-builder-tool simplify over all our ui files.
2017-12-26 23:12:37 -05:00
Matthias Clasen
c250dddb00 Use the right gettext domain
Most of our .ui files were still using the gtk30 domain,
despite the library having switched to gtk40. Fix this.
2017-08-05 18:17:29 -04:00
Timm Bäder
3505e0d6e7 filechooserwidget: Add GtkFileChooserErrorStack
Showing all the different errors and warnings when renaming and creating
files/folders without potentially resizing popovers on every keystroke
requires us to know the size of the error messages beforehand, so pack
all of the possible error messages and warnings in labels and those into
a stack. This way we can also neatly crossfade transition between them.

https://bugzilla.gnome.org/show_bug.cgi?id=775636
2017-07-18 15:11:26 -04:00
Timm Bäder
20d47e2a6c filechooserwidget: Let the rename entry hexpand
This makes a difference with other locals where error messages are
longer than the standard width of entry+spacing+button.

https://bugzilla.gnome.org/show_bug.cgi?id=775636
2017-07-18 15:11:26 -04:00
Timm Bäder
fb927d1993 box: Remove center child 2017-04-25 20:30:37 +02:00
Timm Bäder
c92b7d4224 box: Remove fill child property
GtkWidget:halign and GtkWidget:valign are sufficient
2017-04-25 20:30:37 +02:00
Timm Bäder
5729ea7744 box: Remove expand child property
GtkWidget already has hexpand/vexpand properties.
2017-04-25 20:30:37 +02:00
Timm Bäder
806c4f7d2f filechooserwidget: Inherit from GtkWidget 2017-03-31 09:50:38 +02:00
Timm Bäder
56a58655fe Remove unnecessary gtk_widget_show calls 2017-01-22 14:38:21 +01:00
Timm Bäder
3ec15d98fa Fix some widget visibility fallout 2017-01-20 21:37:08 +01:00
Timm Bäder
f4341ee9f7 widget: Remove show-all property
Doesn't make sense anymore now that gtk_widget_show_all is gone.
2017-01-20 21:37:07 +01:00
Timm Bäder
02c2887772 filechooser: adapt to GtkWidget:visible changes 2017-01-20 21:33:37 +01:00
Timm Bäder
01723fa02f filechooser: Use GtkButton's icon-name property 2016-10-31 12:20:41 +01:00
Matthias Clasen
6861a5d0a4 Spacing fixes for builtin dialogs
Replace border-width and padding by margins, in most places.
2016-10-26 20:58:07 -04:00
Benjamin Otte
4df6ddad54 API: container: Remove gtk_container_set_border_width() 2016-10-16 18:18:58 +02:00
Matthias Clasen
cd581c9e81 Simplify our templates
This is applying the new property name simplification.
2016-05-06 16:09:12 -04:00
Carlos Soriano
fdde27ea9c gtkplacessidebar: add new other locations with flags signal
We weren't using the open flags on the other locations signal, which
makes impossible for applications like nautilus to act in the same
way that for any other location where the user can choose between
opening in the current view, in a new window or in a new tab.

Add a new signal with an open flags parameter and deprecate
the other-location signal.

https://bugzilla.gnome.org/show_bug.cgi?id=754743
2016-03-04 20:15:52 -05:00
Matthias Clasen
3a4922a76f file chooser: Add an ID to the box around the pathbar
Having an ID makes it easier to style this appropriately.
2016-02-16 14:37:54 -05:00
Matthias Clasen
a71bc24184 file chooser: Don't use .search-bar for a box
Just use the more general .view class to avoid special-casing
the file chooser in the theme.
2015-11-05 07:40:48 -05:00
Matthias Clasen
b9322433d3 Update all ui files again
Replace translatable="1" by translatable="yes" so
xgettext stays happy and extracts the strings.
2015-09-13 23:26:16 -04:00
Matthias Clasen
a531633660 Run gtk-builder-tool simplify over all templates 2015-09-12 11:24:36 -04:00
Matthias Clasen
49a596aa52 file chooser: Note when searching remote locations
Inform the user that we won't search recursively when searching
in remote locations.
2015-07-27 08:07:39 -04:00
Matthias Clasen
2dfad2b0d1 file chooser: Memory handling fixes
I forgot to clean up the long press gesture, and in additon, creating
the rename popover from the ui template was causing the tree view
to not be disposed when the file chooser goes away. Work around this
by manually unsetting the relative-to widget of the popover in dispose.
2015-07-20 11:12:49 -04:00
Georges Basile Stavracas Neto
79f2400c0d filechooserwidget: use places view to manage fixed devices
Previous patch modified places sidebar widget to stop handling
fixed devices by adding an "Other Locations..." item. Up to now,
however, these changes are isolated from each other since the
bundled file manager widgets ignore the sidebar requests for
external management of fixed devices and networks.

To fix that, make the file chooser widget be aware of the
GtkPlacesSidebar::show-other-locations signal and, when requested,
show places view to manage the fixed devices and networks.

https://bugzilla.gnome.org/show_bug.cgi?id=752034
2015-07-15 23:11:52 -03:00
Matthias Clasen
5bd6013165 file chooser: Refine search progress display
Move the spinner to the search bar, so we can keep it around
until the search is over.
2015-07-15 00:03:09 -04:00
Matthias Clasen
15617a69aa file chooser: Allow renaming files
This has often been requested as a useful feature in save mode.

Based on a patch by John Beard,
https://bugzilla.gnome.org/show_bug.cgi?id=325150
2015-07-04 22:44:30 -04:00
Matthias Clasen
22294a4a0d file chooser: Improve column sizing
Allow the name and location columns to be resized, but arrange
for their sizing to be reset when the column layout changes (either
by the location column appearing/disappearing, or by the time
column changing between mtime and atime. This gives a decent
compromise between good automatic sizing and user control.
2015-07-04 00:29:26 -04:00
Matthias Clasen
17a860cea2 file chooser: Don't show Enter Location in sidebar
Following the file chooser mockups.
2015-07-04 00:29:26 -04:00
Matthias Clasen
c7bc902093 file chooser: Update empty state for search
Follow the mockups more.
2015-07-04 00:29:26 -04:00
Matthias Clasen
191bccebf3 file chooser: Add search progress
Show a spinner if no search reasults have shown up yet and
the search is still going, after 2 seconds.
2015-07-04 00:29:26 -04:00
Matthias Clasen
8974ec7413 file chooser: Improve time and date formatting
Use the same formats as nautilus, and put date and time in
separate cells, so they are neatly aligned.
2015-07-04 00:29:25 -04:00
Matthias Clasen
412e33da16 file chooser: Use access time for recent files
Use access time for sorting the recent files, and show it in
the list instead of mtime.
2015-07-04 00:29:25 -04:00
Matthias Clasen
1883c5fb28 file chooser: Improve keynav
Some internal containers were erroneously taking focus, interrupting
the flow of tab keynav, and using arrow keynav to go from the file
list to the sidebar did not work anymore, after the recent sidebar
rewrite.
2015-07-04 00:29:24 -04:00
Matthias Clasen
6516437353 file chooser: Use icon for create folder button
This follows the latest mockups.
2015-07-04 00:29:24 -04:00
Matthias Clasen
7e45b09c8e file chooser: More search rework
Drop the radio buttons for current location vs everywhere, and
always search in the current location.
2015-07-04 00:29:23 -04:00
Caolán McNamara
b4a88c7287 file chooser: Avoid tall combos
The filter combo box in the file chooser was stretching to match
the height of the extra widgets next to it. Since, stretched combo
boxes are not a pretty sight, make it stick to the top instead.

Patch by Caolán McNamara,

https://bugzilla.gnome.org/show_bug.cgi?id=751227
2015-06-20 10:55:02 -04:00
Matthias Clasen
8612942fe2 file chooser: Drop unused variables 2015-06-17 10:01:04 -04:00
Matthias Clasen
916cf8f61e file chooser: Use a revealer
Use a revealer to manage the visibility of the header area where
we show the pathbar, the location entry or search. This is a bit
smoother, and makes search more similar to a search bar.
2015-06-17 10:01:04 -04:00
Carlos Soriano
43a4843b9c gtkfilechooserwidget: show drop hints on gtkplacessidebar
Now with the API addition on gtkplacessidebar, we can show some
hints for the drop targets.

https://bugzilla.gnome.org/show_bug.cgi?id=747793
2015-06-16 16:19:37 +02:00
Matthias Clasen
a8191e7113 places sidebar: Make 'recent' work on other platforms
Since nautilus merge, we were not showing 'Recent' in the sidebar
if GIO did not support the recent: scheme. But the file chooser
can show recent files independent of gvfs - it loads the recent
files manually. This is relevant on Windows and OS X, where gvfs
is typically not used.

This commit adds a show-recent property which can be used to override
the recent: scheme check. We use it in the file chooser.

https://bugzilla.gnome.org/show_bug.cgi?id=750068
2015-06-06 17:13:22 -04:00
Matthias Clasen
0e267ce7ff GtkFileChooser: Refine 'no matches' page
Use a better icon, and put the text below.
2015-05-11 19:44:30 -04:00
Matthias Clasen
adb58b2c84 file chooser: Set default widget in create folder popover
This is using the new default widget functionality for
popovers to make Enter in the entry activate the Create
button.

https://bugzilla.gnome.org/show_bug.cgi?id=747664
2015-05-02 20:34:28 -04:00
Matthias Clasen
bf9d32b9ee GtkFileChooserWidget: Simplify ui template 2015-05-02 18:02:26 -04:00
Matthias Clasen
354146143e Fix another ordering issue 2015-05-02 02:48:46 -04:00
Matthias Clasen
4336d02e24 GtkFileChooser: Fix an ordering issue
The previous commit removed default-valued properties,
but apparently that has a negative effect for grid
packing properties, so put the explicit value back.
2015-05-02 01:04:01 -04:00
Matthias Clasen
bdf49a7c3a GtkFileChooser: Indicate if search comes up empty
This is a neice touch and helps to understand what
is going on.
2015-05-01 23:09:56 -04:00
Matthias Clasen
d6543bc009 Remove no longer needed in-tree editing 2015-04-10 15:41:56 -04:00
Matthias Clasen
c41ab14730 Use a popover for creating new folders 2015-04-10 15:41:56 -04:00