Patch by Carlos Garnacho <carlos@imendio.com> - add a local_only
property to GtkFileChooserEntry:
* gtk/gtkfilechooserentry.c (struct _GtkFileChooserEntry): Add a
local_only field.
(_gtk_file_chooser_entry_init): Default to local_only being true.
(start_explicit_completion): Don't allow completion of non-native
files if local_only is turned on.
(start_loading_current_folder): Don't start loading non-native
folders if local_only is turned on.
(_gtk_file_chooser_entry_set_local_only): New function.
(_gtk_file_chooser_entry_get_local_only): New function.
* gtk/gtkfilechooserentry.h (_gtk_file_chooser_entry_set_local_only,
_gtk_file_chooser_entry_get_local_only): New prototypes.
* gtk/gtkfilechooserdefault.c (set_local_only): Set the local_only
property on the entry.
Signed-off-by: Federico Mena Quintero <federico@novell.com>
svn path=/trunk/; revision=22156
* gtk/gtkfilechooserdefault.c (save_dialog_geometry): New function.
(settings_save): Save the dialog's geometry.
(gtk_file_chooser_default_get_default_size): Load the geometry
from the settings. If it was already saved, return that instead
of computing an ad-hoc size.
Signed-off-by: Federico Mena Quintero <federico@novell.com>
svn path=/trunk/; revision=22119
* gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_map):
Don't change the default size in ::map() so we don't flicker...
(gtk_file_chooser_default_realize): ... so do it in ::realize()
instead, when the window is not yet visible. This avoids a
dialog-that-resizes when you first pop up the file chooser.
(emit_default_size_changed): Just emit the signal; don't check for
the widget's state so we can be emitted during the initial
::realize() when we are not mapped yet.
(update_preview_widget_visibility): Only emit default_size_changed
if the widget is not mapped, to avoid resizing the dialog while it
is visible.
Signed-off-by: Federico Mena Quintero <federico@novell.com>
svn path=/trunk/; revision=22117
* gtk/gtkfilechooserdefault.c (update_current_folder_get_info_cb):
Mount the enclosing volume if the folder we're switching to is not
mounted. Patch by Tomas Bzatek, based on work by Carlos Garnacho
svn path=/trunk/; revision=21899
* gtk/gtkfilesystem.[hc] (_gtk_file_info_consider_as_directory):
Privately export this method. It classifies directories and mountables
the same.
* gtk/gtkfilesystem.c (enclosing_volume_mount_cb): Silently drop
G_IO_ERROR_ALREADY_MOUNTED error for gvfs backends without visible
mounts.
* gtk/gtkfilesystemmodel.c:
* gtk/gtkfilechooserbutton.c:
* gtk/gtkfilechooserentry.c:
* gtk/gtkfilechooserdefault.c: Use the new function instead of
direct checks for G_FILE_TYPE_DIRECTORY throughout.
svn path=/trunk/; revision=21898
* gtk/gtkfilechooserdefault.c (update_current_folder_get_info_cb):
Don't show an error dialog when changing to a non-existing folder,
since this is ususally just an annoyance.
svn path=/trunk/; revision=21894
2008-09-26 Matthias Clasen <mclasen@redhat.com>
Bug 553133 – GtkFileChooser won't ask to mount a volume
* gtk/gtkfilechooserdefault.c (shortcuts_activate_volume): Use
a GtkMountOperation when mounting, so that we get a password
dialog when required.
svn path=/trunk/; revision=21523
2008-09-25 Michael Natterer <mitch@imendio.com>
* gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_finalize):
don't unref the file system backend, the newly added
unset_file_system_backend() already does this (bug #553135).
svn path=/trunk/; revision=21514
2008-09-22 Matthias Clasen <mclasen@redhat.com>
Bug 553135 – eog crash: assertion failed. Gtk error:
shortcuts_remove_rows: code should not be reached
* gtk/gtkfilechooserdefault.c: Disconnect from GtkFileSystem
signals when we are destroyed, in order to avoid nasty surprises.
Patch by Claudio Saavedra
svn path=/trunk/; revision=21492
2008-09-22 Emmanuele Bassi <ebassi@linux.intel.com>
Bug 552789 – Show size column in the search and recently used
files modes
* gtk/gtkfilechooserdefault.c: Display the file size column
when in OPERATION_MODE_SEARCH. This removes a stat() call
and simplifies the code a little bit by changing the query
for file informations for each search engine hit.
svn path=/trunk/; revision=21491
2008-09-18 Emmanuele Bassi <ebassi@linux.intel.com>
* gtk/gtkfilechooserdefault.c (settings_save): Save the size column
visibility state with the rest of the FileChooser settings.
svn path=/trunk/; revision=21437
2008-09-18 Emmanuele Bassi <ebassi@linux.intel.com>
Bug 325095 – show a 'size' column
* gtk/gtkfilechooserdefault.c:
* gtk/gtkfilechooserprivate.h: Add a context menu item controlling
the visibility of the file size column. This works only for the
browse mode, and the column is not visible by default.
* gtk/gtkfilechoosersettings.[ch]: Add a ShowSizeColumn key to the
settings file.
svn path=/trunk/; revision=21431
2008-09-07 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkfilechooserdefault.c (search_add_hit): Don't unref the
GFile we just put into the search_model. This adds a new memory
leak...
svn path=/trunk/; revision=21315
2008-09-05 Michael Natterer <mitch@imendio.com>
* gtk/gtkfilechooserdefault.c (file_list_drag_data_received_cb):
stop the emission of the signal also when we bail out early
because we don't accept drops from ourselves. Keeps the code from
running into a warning in gtktreeview.c.
svn path=/trunk/; revision=21302
2008-08-26 Matthias Clasen <mclasen@redhat.com>
Bug 549354 – Crash trying to open a file on a remote folder
* gtk/gtkfilechooserdefault.c (error_message_with_parent): Handle
the fact that parent may be NULL without crashing.
svn path=/trunk/; revision=21206
Only emit default-size-changed if the file chooser widget is mapped.
It only makes sense to do this once we know our final configuration,
which is actually when we are mapped.
Signed-off-by: Federico Mena Quintero <federico@novell.com>
svn path=/trunk/; revision=21164
2008-08-04 Carlos Garnacho <carlos@imendio.com>
* gtk/gtk.symbols:
* gtk/gtkfilechooser.[ch]: Make GFile-oriented API public. Fixes
#545978.
* gtk/gtkfilechooserbutton.c:
* gtk/gtkfilechooserdefault.c:
* gtk/gtkfilechooserutils.c: Update to use public GFile API.
svn path=/trunk/; revision=20971
2008-07-06 Matthias Clasen <mclasen@redhat.com>
Bug 541645 – gtkfilechooserdefault segfaults when bookmark does not
contain ://
* gtk/gtkfilechooserdefault.c (_gtk_file_chooser_label_for_file):
Be more robust. Reported by Jelte van der Hoek
svn path=/trunk/; revision=20787
* gtk/gtkfilechooserdefault.c (browse_files_select_first_row): Don't
select the first row if the folder is empty.
Patch by Olle Bergkvist.
svn path=/trunk/; revision=20751
2008-06-30 Cody Russell <bratsche@gnome.org>
* Practically everything changed.
Change all references of GIMP Toolkit (and variations of it)
to GTK+ Toolkit, showing no mercy at all to our beloved
ancestry. (#540529)
svn path=/trunk/; revision=20709
2008-06-26 Carlos Garnacho <carlos@imendio.com>
* gtk/gtkfilechooserdefault.c
(gtk_file_chooser_default_get_current_folder): current_folder can be
NULL here, do not try to reference it (Bug #540235)
(gtk_file_chooser_default_get_files): Deal better with
gtk_file_chooser_default_get_current_folder() being able to return
NULL.
svn path=/trunk/; revision=20687
2008-06-18 Olle Bergkvist <olle.bergkvist@yahoo.se>
http://bugzilla.gnome.org/show_bug.cgi?id=538784 - Don't change
the filename in the name entry in CREATE_FOLDER mode when changing
folders, so that you can enter a new subfolder name, double-click on a
folder to change to it, and close the dialog.
* gtk/gtkfilechooserdefault.c (update_chooser_entry): Don't change
the filename in the entry in CREATE_FOLDER mode, either.
Signed-off-by: Federico Mena Quintero <federico@novell.com>
svn path=/trunk/; revision=20457
2008-06-18 Olle Bergkvist <olle.bergkvist@yahoo.se>
http://bugzilla.gnome.org/show_bug.cgi?id=419737#c59 - The file
chooser clears the filename entry in SAVE/CREATE_FOLDER modes when
it shouldn't.
* gtk/gtkfilechooserdefault.c (shortcuts_activate_iter): Don't
clear the entry for CREATE_FOLDER either; this needs the same
behavior as SAVE mode.
(update_chooser_entry): Only clear the entry in OPEN/SELECT_FOLDER
modes.
Signed-off-by: Federico Mena Quintero <federico@novell.com>
svn path=/trunk/; revision=20455
2008-06-17 Michael Natterer <mitch@imendio.com>
* gtk/gtkfilechooserdefault.c: remove static integer variables
which hold the number of members in GtkTargetEntry arrays and use
G_N_ELEMENTS() directly instead.
svn path=/trunk/; revision=20421
2008-06-17 Emmanuele Bassi <ebassi@gnome.org>
* gtk/gtkfilechooserdefault.c:
(gtk_file_chooser_default_init),
(gtk_file_chooser_default_constructor),
(gtk_file_chooser_default_screen_changed),
(recent_start_loading): Remove the GtkRecentManager screen
dance, as it has been deprecated since 2.12. Now we get the
GtkRecentManager singleton whewn we create the FileChooserDefault
instance. (Michael Natterer)
svn path=/trunk/; revision=20419