Commit Graph

706 Commits

Author SHA1 Message Date
Federico Mena Quintero
a46976fb79 Merge branch 'origin/master' into places-sidebar 2013-02-27 10:29:35 -06:00
Federico Mena Quintero
2deb41fe63 filechooser: When stopping/clearing BROWSE model, really ensure that we end up in LOAD_EMPTY state
Previously we could end up in a situation where browse_list_model==NULL, and yet load_state==LOAD_FINISHED.
This is not a valid state.  So, when we get rid of the list model, really ensure that we end up
in LOAD_EMPTY so nothing assumes that there is a valid list model around.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-02-20 20:09:08 -06:00
Federico Mena Quintero
039cc929ad filechooser: Tighten up some assertions when actually selecting files in the treeview
The model must be fully loaded, and it must be inserted in the treeview.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-02-20 20:09:02 -06:00
Federico Mena Quintero
936045e82b Merge branch 'master' into places-sidebar
Conflicts:
	docs/reference/gtk/gtk-docs.sgml
	gtk/gtkfilechooserdefault.c
	gtk/org.gtk.Settings.FileChooser.gschema.xml
2013-02-13 20:37:36 -06:00
Federico Mena Quintero
22e5e77232 filechooser: Oops, cancel a file operation that was missing
In addition, remove a list of pending_cancellables that was no longer being used.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-02-13 18:01:39 -06:00
Federico Mena Quintero
7e2c467e64 filechooser: Remove some unused code
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-02-13 18:01:39 -06:00
Cosimo Cecchi
880391cded filechooser: follow the gtk-recent-files-enabled GtkSetting
Avoid showing the Recent files entry if the setting is FALSE.

https://bugzilla.gnome.org/show_bug.cgi?id=693709
2013-02-13 12:06:43 -05:00
Benjamin Otte
e26031e0c7 filechooser: Move saving geometry to where it belongs
Move it from the filechooserwidget to the filechooserdialog unmap
function. It was previously only working for filechooserdialogs, too.
2013-01-26 21:04:55 +01:00
Benjamin Otte
c83a7a13e1 filechooser: Move settings key defines into header
... so we can read/write those keys from different source files.
2013-01-26 21:04:55 +01:00
Federico Mena Quintero
e57de53108 GtkFileChooser: Remove the last remains of the last_folder_uri logic
This is akin to commit cfb09e565460fd463a0822c8c8dbb0521d9fcab9 in the gtk-2-24 branch;
the last_folder_uri is no longer being used for anything meaningful, so we
remove it altogether.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-01-24 18:07:03 -06:00
Benjamin Otte
78d91aaf9b filechooser: Attach GSettings object to GtkSettings
... instead of keeping one per GtkFileChooserDefault. This allows using
it in other places, too.
2013-01-24 14:28:58 +01:00
Benjamin Otte
b112a85395 filechooser: Use macros
Thanks for not letting me catch that place when I was greeping...
2013-01-24 14:28:57 +01:00
Ryan Lortie
dc8b67de92 file chooser: give GSettings schema a path
The code is always instantiating this schema at a fixed location, so why
is it relocatable?

Add a path so that it shows up properly in dconf-editor, and from the
gsettings commandline tool.

https://bugzilla.gnome.org/show_bug.cgi?id=692163
2013-01-23 07:46:05 -05:00
Federico Mena Quintero
7d30e601de GtkFileChooserDefault: Don't use Backspace anymore to to to the parent folder
This is for consistency with Nautilus.

https://bugzilla.gnome.org/show_bug.cgi?id=692188
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-01-21 13:33:43 -06:00
Federico Mena Quintero
da2e081786 Make the set_location()/get_location() API consistent
We used to have set_current_location() and get_selected_location(), with confusing
semantics.  Now they are symmetric, with the exception that if set_location() is
called with a location that is not shown in the sidebar, then it will both clear
the selection in the list and make get_selection() return NULL.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-01-10 18:12:15 -06:00
Federico Mena Quintero
0b4183234b New API, gtk_places_sidebar_set_open_flags()
This lets us handle the 'Open in new tab' and 'Open in new window' menu items
on our own, and allows callers to have less code to deal with each mode.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-01-10 16:19:03 -06:00
Federico Mena Quintero
42d239f6d5 Remove gtk_places_sidebar_set_show_cwd(), implement that in the file chooser
This removes more idiosyncratic API from the sidebar.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-11 15:52:17 -06:00
Federico Mena Quintero
c4f40a92ca Remove the GError from the shortcut-related functions
See https://bugzilla.gnome.org/show_bug.cgi?id=650363#c8 and the next comment; this
argument just makes the API harder to use without real benefit.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-11 15:29:11 -06:00
Federico Mena Quintero
72ce506cfc Rename signal location-selected to open-location
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-11 12:09:13 -06:00
Federico Mena Quintero
9124766d7b Implement the Search keyboard shortcut
We still lack a button to activate Search, like in Nautilus, but that will come later.

And with this, the last REMOVE_FOR_PLACES_SIDEBAR is gone!

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-10 17:26:53 -06:00
Federico Mena Quintero
bd28aad834 Remove unused code 2012-12-10 17:16:36 -06:00
Federico Mena Quintero
c1c1823634 Go back to our machinery for Recent files instead of reading recent:/// as-is
Reading recent:/// as-is is probably fine for OPEN mode.  But for SAVE mode, we want to present
a list of recent directories.  So, we go back to our old machinery for now; in the future
we'll probably just use recent:/// and extract the list of recent directories from there.

This also fixes showing the Recent item as highlighted when the file chooser starts up.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-10 17:14:12 -06:00
Federico Mena Quintero
016dd28a9f Remove an obsolete function 2012-12-10 16:05:18 -06:00
Federico Mena Quintero
c26293eacd Implement the Alt-number quick bookmark shortcuts
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-10 16:00:42 -06:00
Federico Mena Quintero
8b0aea9f3d Implement the Desktop keyboard shortcut
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-10 14:45:18 -06:00
Federico Mena Quintero
e6ba6e7e06 Implement the Home keyboard shortcut
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-10 14:23:06 -06:00
Federico Mena Quintero
f3beff7556 Implement the 'Add to bookmarks' command as before
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-10 14:18:00 -06:00
Federico Mena Quintero
0dca40e851 Remove an obsolete function 2012-12-10 14:09:40 -06:00
Federico Mena Quintero
976672ad4b Implement the application-side shortcuts in GtkFileChooserDefault
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-10 14:06:07 -06:00
Benjamin Otte
1b1f4da5c7 gtk: Query font size directly
... instead of calling gtk_style_context_get_font() and then
pango_font_description_get_size().
2012-12-06 02:57:18 +01:00
Federico Mena Quintero
1681cf9b16 Remove the old shortcuts pane code from GtkFileChooserDefault
Oh, the giant void.
I stare into it
and it makes me afraid
that I've screwed up.

But I know I haven't.
Because any remaining bugs
will be yours to fix.

Not mine.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-05 18:09:44 -06:00
Timothy Arceri
50acce4074 In the file chooser, use a proper apostrophe rather than a prime mark (tick mark)
https://bugzilla.gnome.org/show_bug.cgi?id=689012
2012-11-29 11:34:29 -06:00
Philip Withnall
ceb866dfe6 Bug 595615 — Use proper ellipses
Use ‘…’ instead of ‘...’ in translatable strings.

Closes: https://bugzilla.gnome.org/show_bug.cgi?id=595615
2012-11-26 08:59:27 +00:00
Federico Mena Quintero
b706e1b76b Highlight the currently-viewed location in the places sidebar
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-11-24 10:41:40 -06:00
Federico Mena Quintero
fc6bfcddde Actually switch to recent:/// in its key shortcut handler
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-11-23 13:24:55 -06:00
Federico Mena Quintero
f623329e95 Allow switching to recent:/// even though GIO thinks it is not a native file
That URI is not a native file, and so it would not show up if local_only=TRUE.
Add a special case for it so that recent:/// can always be visited.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-11-23 12:53:41 -06:00
Federico Mena Quintero
e6b9ad404f Switch to Recent Files or $CWD at startup
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-11-21 13:16:43 -06:00
Federico Mena Quintero
043cac11f3 Add a new org.gtk.SettingsFileChooser startup-mode settings key
It has two possible values, 'recent' and 'cwd'.  We will use these to determine
whether to set the default starting mode, if a folder has not been pre-set,
to showing the Recent Files list or the current working directory.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-11-21 13:16:41 -06:00
Federico Mena Quintero
ec9bdc6397 New way to show in the sidebar
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-11-20 20:04:20 -06:00
Jonny Lamb
2f8c2a3244 filechooser: remember sidebar width
https://bugzilla.gnome.org/show_bug.cgi?id=524295

Signed-off-by: Jonny Lamb <jonnylamb@gnome.org>
2012-11-14 20:03:23 -06:00
Timothy Arceri
50a09957a4 Remove bookmark duplicate of shortcut
Application code can set shortcut folders that are already bookmarks.
This code causes the bookmarks to be refreshed after the shortcut is
added removing any possible bookmark duplicates

https://bugzilla.gnome.org/show_bug.cgi?id=577806
2012-11-13 12:54:15 -06:00
Federico Mena Quintero
f39f574914 Remove argument to _gtk_file_system_model_update_file() that should not be part of the internal API
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-10-31 20:54:02 -06:00
Federico Mena Quintero
61a9a46bce Present error dialogs from the places sidebar 2012-10-22 17:52:27 -05:00
Federico Mena Quintero
1dfd0e8c9b Merge master into places-sidebar to keep up with development 2012-10-19 11:35:22 -05:00
Benjamin Otte
48c6b3b4f4 gtk: Add get_type() function declarations for private objects
I'm adding a bunch of fixes for gcc complaining about
-Wmissing-declarations.

This set of patches makes private classes in gtk/*.c that use
G_DEFINE_TYPE() safe by adding definitions for the get_type() function
that can't be made static.
2012-10-02 19:32:38 +02:00
Federico Mena Quintero
86c3274579 Connect to location-selected on the places sidebar, and actually switch folders\!
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-07 14:35:56 -05:00
Federico Mena Quintero
4fe3cd8f1e Create the places sidebar instead of the old custom treeview
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-05 19:48:16 -05:00
Federico Mena Quintero
2e9f9d2dc5 Fix compilation 2012-09-03 21:30:38 -05:00
Federico Mena Quintero
2aec19e907 #if out another bunch of stuff, to make the fucking thing compile 2012-09-03 20:56:18 -05:00
Federico Mena Quintero
c242e88a37 #if out a few things 2012-09-03 20:55:59 -05:00