The file chooser is asynchronous, so doing 'select_file (old_file)' and subsequently querying
the file for updating the labels is not going to work. However, the underlying file chooser
will emit 'selection-changed' as appropriate when it finishes restoring the old file. So,
we only need to update the labels when the file chooser dialog is confirmed, not cancelled.
In particular gtksettings.h and gtkstylecontext.h needed to be included
in lots of places now.
Also, I order the includes alphabetically in a bunch of headers.
The model_cancellables have an extra ref when we get them from gtk_tree_model_get().
So, we need to unref them always. On the other hand, the cancellables that get
passed as arguments to the callbacks in question are memory-managed by
GtkFileSystemModel.
Reported by Morten Welinder <mortenw@gnome.org>
https://bugzilla.gnome.org/show_bug.cgi?id=646460
Deprecate widget flag macros GTK_WIDGET_STATE, GTK_WIDGET_SAVED_STATE,
GTK_WIDGET_FLAGS, GTK_WIDGET_TOPLEVEL, GTK_WIDGET_NO_WINDOW and
GTK_WIDGET_COMPOSITE_CHILD.
Also deprecate the type macros GTK_WIDGET_TYPE, GTK_OBJECT_TYPE_NAME and
GTK_OBJECT_TYPE which have become redundant.
Instances of GTK_WIDGET_TOPLEVEL are replaced with gtk_widget_is_toplevel,
GTK_WIDGET_TYPE is replaced with G_OBJECT_TYPE, GTK_WIDGET_COMPOSITE_CHILD
is replaced with use of the "composite-child" property and uses of
GTK_WIDGET_NO_WINDOW are adjusted to use gtk_widget_get_has_window.
Uses of GTK_WIDGET_SAVED_STATE and GTK_WIDGET_FLAGS inside GtkWidget are
changed to direct flag usage.
Documentation is updated to refer to gtk_widget_set_has_window and
gtk_widget_get_has_window.
Gail and tests are updated as well.
Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=69872
Previously the filename would get re-set on the button if one cleared the selection,
as an async cancellable was not getting canceled in that case.
Signed-off-by: Federico Mena Quintero <federico@novell.com>
* 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
2008-12-10 Matthias Clasen <mclasen@redhat.com>
Bug 563991 – gtk_file_chooser_button_new_with_backend is deprecated
-- but what should be used instead?
* gtk/gtkfilechooserbutton.c: Enhanced deprecation annotation.
svn path=/trunk/; revision=21868
2008-08-12 Michael Natterer <mitch@imendio.com>
* gtk/*.c: consistently chain up using
GTK_FOO_CLASS(parent_class)->bar(instance) instead of
(*GTK_FOO_CLASS(parent_class))->bar(instance).
svn path=/trunk/; revision=21085
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
* gtk/gtkfilechooserbutton.c (update_label_and_image): Unset
the image when the label is set to "(None)". Reported by
Neil Roberts
svn path=/trunk/; revision=20833