forked from AuroraMiddleware/gtk
Expand the Save example to point out the correct usage of
2005-07-21 Federico Mena Quintero <federico@ximian.com> * gtk/tmpl/gtkfilechooserdialog.sgml (dialog): Expand the Save example to point out the correct usage of _set_current_folder() and _set_current_name(), versus _set_filename() alone.
This commit is contained in:
parent
49e9aef502
commit
66bcd52099
@ -1,3 +1,9 @@
|
|||||||
|
2005-07-21 Federico Mena Quintero <federico@ximian.com>
|
||||||
|
|
||||||
|
* gtk/tmpl/gtkfilechooserdialog.sgml (dialog): Expand the Save
|
||||||
|
example to point out the correct usage of _set_current_folder()
|
||||||
|
and _set_current_name(), versus _set_filename() alone.
|
||||||
|
|
||||||
2005-07-15 Matthias Clasen <mclasen@redhat.com>
|
2005-07-15 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* === Released 2.7.3 ===
|
* === Released 2.7.3 ===
|
||||||
|
@ -65,6 +65,15 @@ dialog = gtk_file_chooser_dialog_new ("Save File",
|
|||||||
NULL);
|
NULL);
|
||||||
gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER (dialog), TRUE);
|
gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER (dialog), TRUE);
|
||||||
|
|
||||||
|
if (user_edited_a_new_document)
|
||||||
|
{
|
||||||
|
gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dialog), default_folder_for_saving);
|
||||||
|
gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (dialog), "Untitled document");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (dialog), filename_for_existing_document);
|
||||||
|
|
||||||
|
|
||||||
if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT)
|
if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT)
|
||||||
{
|
{
|
||||||
char *filename;
|
char *filename;
|
||||||
|
Loading…
Reference in New Issue
Block a user