summaryrefslogtreecommitdiff
path: root/gtk/gtkfilechooserwidget.c
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@ximian.com>2005-07-15 04:55:56 +0000
committerFederico Mena Quintero <federico@src.gnome.org>2005-07-15 04:55:56 +0000
commitfb7d6ac4fdbbc2804f3e3dbd87244e5605d6b9d0 (patch)
tree768c291ffb7f5bbd98c1d597014597d9a94f9283 /gtk/gtkfilechooserwidget.c
parent7158c558ae285d95d830c0430334484b73ceb97a (diff)
downloadgtk+-fb7d6ac4fdbbc2804f3e3dbd87244e5605d6b9d0.tar.gz
Add overwrite confirmation for SAVE mode. Fixes bug #152850:
2005-07-14 Federico Mena Quintero <federico@ximian.com> Add overwrite confirmation for SAVE mode. Fixes bug #152850: * gtk/gtkfilechooser.h: Add prototypes for gtk_file_chooser_set/get_do_overwrite_confirmation(). (GtkFileChooserConfirmation): New enum for the result of the "confirm-overwrite" signal. * gtk/gtkmarshalers.list: Add ENUM:VOID. * gtk/gtkfilechooser.c (gtk_file_chooser_class_init): Add a "do-overwrite-confirmation" boolean property. (gtk_file_chooser_set_do_overwrite_confirmation): Implement. (gtk_file_chooser_get_do_overwrite_confirmation): Implement. (confirm_overwrite_accumulator): New accumulator for the signal. * gtk/gtkfilechooserutils.h (GtkFileChooserProp): Add GTK_FILE_CHOOSER_PROP_DO_OVERWRITE_CONFIRMATION. * gtk/gtkfilechooserutils.c (_gtk_file_chooser_install_properties): Override the do-overwrite-confirmation property. * gtk/gtkfilechooserprivate.h (struct _GtkFileChooserIface): Add a confirm_overwrite signal to the vtable. * gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_set_property): Handle the new property. (gtk_file_chooser_default_get_property): Likewise. (get_selected_file_info_from_file_list): New helper function; code taken from list_selection_changed(). (list_selection_changed): Use get_selected_file_info_from_file_list(). (should_respond_after_confirm_overwrite): New function. (gtk_file_chooser_default_should_respond): Confirm when necessary.
Diffstat (limited to 'gtk/gtkfilechooserwidget.c')
-rw-r--r--gtk/gtkfilechooserwidget.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c
index 00798080fc..29a0a3a7e5 100644
--- a/gtk/gtkfilechooserwidget.c
+++ b/gtk/gtkfilechooserwidget.c
@@ -161,7 +161,7 @@ gtk_file_chooser_widget_constructor (GType type,
current_folder = g_get_current_dir ();
gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (priv->impl), current_folder);
g_free (current_folder);
-
+
_gtk_file_chooser_set_delegate (GTK_FILE_CHOOSER (object),
GTK_FILE_CHOOSER (priv->impl));