mirror of https://github.com/GNOME/gimp.git
added boolean return value and don't hide the file dialog on success but
2004-03-10 Michael Natterer <mitch@gimp.org> * app/gui/file-save-dialog.c (file_save_dialog_save_image): added boolean return value and don't hide the file dialog on success but return TRUE. (file_save_dialog_response) (file_save_overwrite_callback): hide the file dialog here instead.
This commit is contained in:
parent
cf8c95aebb
commit
1b88601d04
|
@ -1,3 +1,12 @@
|
|||
2004-03-10 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/gui/file-save-dialog.c (file_save_dialog_save_image): added
|
||||
boolean return value and don't hide the file dialog on success but
|
||||
return TRUE.
|
||||
|
||||
(file_save_dialog_response)
|
||||
(file_save_overwrite_callback): hide the file dialog here instead.
|
||||
|
||||
2004-03-09 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/tools/gimpmovetool.c (gimp_move_tool_button_press): redid my
|
||||
|
|
|
@ -59,7 +59,7 @@ static void file_save_overwrite (GtkWidget *save_dialog,
|
|||
static void file_save_overwrite_callback (GtkWidget *widget,
|
||||
gboolean overwrite,
|
||||
gpointer data);
|
||||
static void file_save_dialog_save_image (GtkWidget *save_dialog,
|
||||
static gboolean file_save_dialog_save_image (GtkWidget *save_dialog,
|
||||
GimpImage *gimage,
|
||||
const gchar *uri,
|
||||
const gchar *raw_filename,
|
||||
|
@ -214,13 +214,16 @@ file_save_dialog_response (GtkWidget *save_dialog,
|
|||
|
||||
gtk_widget_set_sensitive (save_dialog, FALSE);
|
||||
|
||||
file_save_dialog_save_image (save_dialog,
|
||||
dialog->gimage,
|
||||
uri,
|
||||
raw_filename,
|
||||
dialog->file_proc,
|
||||
dialog->set_uri_and_proc,
|
||||
dialog->set_image_clean);
|
||||
if (file_save_dialog_save_image (save_dialog,
|
||||
dialog->gimage,
|
||||
uri,
|
||||
raw_filename,
|
||||
dialog->file_proc,
|
||||
dialog->set_uri_and_proc,
|
||||
dialog->set_image_clean))
|
||||
{
|
||||
file_dialog_hide (save_dialog);
|
||||
}
|
||||
|
||||
gtk_widget_set_sensitive (save_dialog, TRUE);
|
||||
}
|
||||
|
@ -290,13 +293,16 @@ file_save_overwrite_callback (GtkWidget *widget,
|
|||
{
|
||||
GimpFileDialog *dialog = GIMP_FILE_DIALOG (overwrite_data->save_dialog);
|
||||
|
||||
file_save_dialog_save_image (overwrite_data->save_dialog,
|
||||
dialog->gimage,
|
||||
overwrite_data->uri,
|
||||
overwrite_data->raw_filename,
|
||||
dialog->file_proc,
|
||||
dialog->set_uri_and_proc,
|
||||
dialog->set_image_clean);
|
||||
if (file_save_dialog_save_image (overwrite_data->save_dialog,
|
||||
dialog->gimage,
|
||||
overwrite_data->uri,
|
||||
overwrite_data->raw_filename,
|
||||
dialog->file_proc,
|
||||
dialog->set_uri_and_proc,
|
||||
dialog->set_image_clean))
|
||||
{
|
||||
file_dialog_hide (overwrite_data->save_dialog);
|
||||
}
|
||||
}
|
||||
|
||||
gtk_widget_set_sensitive (overwrite_data->save_dialog, TRUE);
|
||||
|
@ -306,7 +312,7 @@ file_save_overwrite_callback (GtkWidget *widget,
|
|||
g_free (overwrite_data);
|
||||
}
|
||||
|
||||
static void
|
||||
static gboolean
|
||||
file_save_dialog_save_image (GtkWidget *save_dialog,
|
||||
GimpImage *gimage,
|
||||
const gchar *uri,
|
||||
|
@ -337,9 +343,9 @@ file_save_dialog_save_image (GtkWidget *save_dialog,
|
|||
g_clear_error (&error);
|
||||
|
||||
g_free (filename);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
file_dialog_hide (save_dialog);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ static void file_save_overwrite (GtkWidget *save_dialog,
|
|||
static void file_save_overwrite_callback (GtkWidget *widget,
|
||||
gboolean overwrite,
|
||||
gpointer data);
|
||||
static void file_save_dialog_save_image (GtkWidget *save_dialog,
|
||||
static gboolean file_save_dialog_save_image (GtkWidget *save_dialog,
|
||||
GimpImage *gimage,
|
||||
const gchar *uri,
|
||||
const gchar *raw_filename,
|
||||
|
@ -214,13 +214,16 @@ file_save_dialog_response (GtkWidget *save_dialog,
|
|||
|
||||
gtk_widget_set_sensitive (save_dialog, FALSE);
|
||||
|
||||
file_save_dialog_save_image (save_dialog,
|
||||
dialog->gimage,
|
||||
uri,
|
||||
raw_filename,
|
||||
dialog->file_proc,
|
||||
dialog->set_uri_and_proc,
|
||||
dialog->set_image_clean);
|
||||
if (file_save_dialog_save_image (save_dialog,
|
||||
dialog->gimage,
|
||||
uri,
|
||||
raw_filename,
|
||||
dialog->file_proc,
|
||||
dialog->set_uri_and_proc,
|
||||
dialog->set_image_clean))
|
||||
{
|
||||
file_dialog_hide (save_dialog);
|
||||
}
|
||||
|
||||
gtk_widget_set_sensitive (save_dialog, TRUE);
|
||||
}
|
||||
|
@ -290,13 +293,16 @@ file_save_overwrite_callback (GtkWidget *widget,
|
|||
{
|
||||
GimpFileDialog *dialog = GIMP_FILE_DIALOG (overwrite_data->save_dialog);
|
||||
|
||||
file_save_dialog_save_image (overwrite_data->save_dialog,
|
||||
dialog->gimage,
|
||||
overwrite_data->uri,
|
||||
overwrite_data->raw_filename,
|
||||
dialog->file_proc,
|
||||
dialog->set_uri_and_proc,
|
||||
dialog->set_image_clean);
|
||||
if (file_save_dialog_save_image (overwrite_data->save_dialog,
|
||||
dialog->gimage,
|
||||
overwrite_data->uri,
|
||||
overwrite_data->raw_filename,
|
||||
dialog->file_proc,
|
||||
dialog->set_uri_and_proc,
|
||||
dialog->set_image_clean))
|
||||
{
|
||||
file_dialog_hide (overwrite_data->save_dialog);
|
||||
}
|
||||
}
|
||||
|
||||
gtk_widget_set_sensitive (overwrite_data->save_dialog, TRUE);
|
||||
|
@ -306,7 +312,7 @@ file_save_overwrite_callback (GtkWidget *widget,
|
|||
g_free (overwrite_data);
|
||||
}
|
||||
|
||||
static void
|
||||
static gboolean
|
||||
file_save_dialog_save_image (GtkWidget *save_dialog,
|
||||
GimpImage *gimage,
|
||||
const gchar *uri,
|
||||
|
@ -337,9 +343,9 @@ file_save_dialog_save_image (GtkWidget *save_dialog,
|
|||
g_clear_error (&error);
|
||||
|
||||
g_free (filename);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
file_dialog_hide (save_dialog);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue