diff options
author | Federico Mena Quintero <federico@ximian.com> | 2005-07-15 04:55:56 +0000 |
---|---|---|
committer | Federico Mena Quintero <federico@src.gnome.org> | 2005-07-15 04:55:56 +0000 |
commit | fb7d6ac4fdbbc2804f3e3dbd87244e5605d6b9d0 (patch) | |
tree | 768c291ffb7f5bbd98c1d597014597d9a94f9283 /gtk/gtkfilechooserutils.h | |
parent | 7158c558ae285d95d830c0430334484b73ceb97a (diff) | |
download | gdk-pixbuf-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/gtkfilechooserutils.h')
-rw-r--r-- | gtk/gtkfilechooserutils.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gtk/gtkfilechooserutils.h b/gtk/gtkfilechooserutils.h index 41e315854..c5c1aa75a 100644 --- a/gtk/gtkfilechooserutils.h +++ b/gtk/gtkfilechooserutils.h @@ -40,7 +40,8 @@ typedef enum { GTK_FILE_CHOOSER_PROP_EXTRA_WIDGET, GTK_FILE_CHOOSER_PROP_SELECT_MULTIPLE, GTK_FILE_CHOOSER_PROP_SHOW_HIDDEN, - GTK_FILE_CHOOSER_PROP_LAST = GTK_FILE_CHOOSER_PROP_SHOW_HIDDEN + GTK_FILE_CHOOSER_PROP_DO_OVERWRITE_CONFIRMATION, + GTK_FILE_CHOOSER_PROP_LAST = GTK_FILE_CHOOSER_PROP_DO_OVERWRITE_CONFIRMATION } GtkFileChooserProp; void _gtk_file_chooser_install_properties (GObjectClass *klass); |