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>
|
2004-03-09 Michael Natterer <mitch@gimp.org>
|
||||||
|
|
||||||
* app/tools/gimpmovetool.c (gimp_move_tool_button_press): redid my
|
* 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,
|
static void file_save_overwrite_callback (GtkWidget *widget,
|
||||||
gboolean overwrite,
|
gboolean overwrite,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
static void file_save_dialog_save_image (GtkWidget *save_dialog,
|
static gboolean file_save_dialog_save_image (GtkWidget *save_dialog,
|
||||||
GimpImage *gimage,
|
GimpImage *gimage,
|
||||||
const gchar *uri,
|
const gchar *uri,
|
||||||
const gchar *raw_filename,
|
const gchar *raw_filename,
|
||||||
|
@ -214,13 +214,16 @@ file_save_dialog_response (GtkWidget *save_dialog,
|
||||||
|
|
||||||
gtk_widget_set_sensitive (save_dialog, FALSE);
|
gtk_widget_set_sensitive (save_dialog, FALSE);
|
||||||
|
|
||||||
file_save_dialog_save_image (save_dialog,
|
if (file_save_dialog_save_image (save_dialog,
|
||||||
dialog->gimage,
|
dialog->gimage,
|
||||||
uri,
|
uri,
|
||||||
raw_filename,
|
raw_filename,
|
||||||
dialog->file_proc,
|
dialog->file_proc,
|
||||||
dialog->set_uri_and_proc,
|
dialog->set_uri_and_proc,
|
||||||
dialog->set_image_clean);
|
dialog->set_image_clean))
|
||||||
|
{
|
||||||
|
file_dialog_hide (save_dialog);
|
||||||
|
}
|
||||||
|
|
||||||
gtk_widget_set_sensitive (save_dialog, TRUE);
|
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);
|
GimpFileDialog *dialog = GIMP_FILE_DIALOG (overwrite_data->save_dialog);
|
||||||
|
|
||||||
file_save_dialog_save_image (overwrite_data->save_dialog,
|
if (file_save_dialog_save_image (overwrite_data->save_dialog,
|
||||||
dialog->gimage,
|
dialog->gimage,
|
||||||
overwrite_data->uri,
|
overwrite_data->uri,
|
||||||
overwrite_data->raw_filename,
|
overwrite_data->raw_filename,
|
||||||
dialog->file_proc,
|
dialog->file_proc,
|
||||||
dialog->set_uri_and_proc,
|
dialog->set_uri_and_proc,
|
||||||
dialog->set_image_clean);
|
dialog->set_image_clean))
|
||||||
|
{
|
||||||
|
file_dialog_hide (overwrite_data->save_dialog);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gtk_widget_set_sensitive (overwrite_data->save_dialog, TRUE);
|
gtk_widget_set_sensitive (overwrite_data->save_dialog, TRUE);
|
||||||
|
@ -306,7 +312,7 @@ file_save_overwrite_callback (GtkWidget *widget,
|
||||||
g_free (overwrite_data);
|
g_free (overwrite_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static gboolean
|
||||||
file_save_dialog_save_image (GtkWidget *save_dialog,
|
file_save_dialog_save_image (GtkWidget *save_dialog,
|
||||||
GimpImage *gimage,
|
GimpImage *gimage,
|
||||||
const gchar *uri,
|
const gchar *uri,
|
||||||
|
@ -337,9 +343,9 @@ file_save_dialog_save_image (GtkWidget *save_dialog,
|
||||||
g_clear_error (&error);
|
g_clear_error (&error);
|
||||||
|
|
||||||
g_free (filename);
|
g_free (filename);
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
return TRUE;
|
||||||
file_dialog_hide (save_dialog);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,7 +59,7 @@ static void file_save_overwrite (GtkWidget *save_dialog,
|
||||||
static void file_save_overwrite_callback (GtkWidget *widget,
|
static void file_save_overwrite_callback (GtkWidget *widget,
|
||||||
gboolean overwrite,
|
gboolean overwrite,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
static void file_save_dialog_save_image (GtkWidget *save_dialog,
|
static gboolean file_save_dialog_save_image (GtkWidget *save_dialog,
|
||||||
GimpImage *gimage,
|
GimpImage *gimage,
|
||||||
const gchar *uri,
|
const gchar *uri,
|
||||||
const gchar *raw_filename,
|
const gchar *raw_filename,
|
||||||
|
@ -214,13 +214,16 @@ file_save_dialog_response (GtkWidget *save_dialog,
|
||||||
|
|
||||||
gtk_widget_set_sensitive (save_dialog, FALSE);
|
gtk_widget_set_sensitive (save_dialog, FALSE);
|
||||||
|
|
||||||
file_save_dialog_save_image (save_dialog,
|
if (file_save_dialog_save_image (save_dialog,
|
||||||
dialog->gimage,
|
dialog->gimage,
|
||||||
uri,
|
uri,
|
||||||
raw_filename,
|
raw_filename,
|
||||||
dialog->file_proc,
|
dialog->file_proc,
|
||||||
dialog->set_uri_and_proc,
|
dialog->set_uri_and_proc,
|
||||||
dialog->set_image_clean);
|
dialog->set_image_clean))
|
||||||
|
{
|
||||||
|
file_dialog_hide (save_dialog);
|
||||||
|
}
|
||||||
|
|
||||||
gtk_widget_set_sensitive (save_dialog, TRUE);
|
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);
|
GimpFileDialog *dialog = GIMP_FILE_DIALOG (overwrite_data->save_dialog);
|
||||||
|
|
||||||
file_save_dialog_save_image (overwrite_data->save_dialog,
|
if (file_save_dialog_save_image (overwrite_data->save_dialog,
|
||||||
dialog->gimage,
|
dialog->gimage,
|
||||||
overwrite_data->uri,
|
overwrite_data->uri,
|
||||||
overwrite_data->raw_filename,
|
overwrite_data->raw_filename,
|
||||||
dialog->file_proc,
|
dialog->file_proc,
|
||||||
dialog->set_uri_and_proc,
|
dialog->set_uri_and_proc,
|
||||||
dialog->set_image_clean);
|
dialog->set_image_clean))
|
||||||
|
{
|
||||||
|
file_dialog_hide (overwrite_data->save_dialog);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gtk_widget_set_sensitive (overwrite_data->save_dialog, TRUE);
|
gtk_widget_set_sensitive (overwrite_data->save_dialog, TRUE);
|
||||||
|
@ -306,7 +312,7 @@ file_save_overwrite_callback (GtkWidget *widget,
|
||||||
g_free (overwrite_data);
|
g_free (overwrite_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static gboolean
|
||||||
file_save_dialog_save_image (GtkWidget *save_dialog,
|
file_save_dialog_save_image (GtkWidget *save_dialog,
|
||||||
GimpImage *gimage,
|
GimpImage *gimage,
|
||||||
const gchar *uri,
|
const gchar *uri,
|
||||||
|
@ -337,9 +343,9 @@ file_save_dialog_save_image (GtkWidget *save_dialog,
|
||||||
g_clear_error (&error);
|
g_clear_error (&error);
|
||||||
|
|
||||||
g_free (filename);
|
g_free (filename);
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
return TRUE;
|
||||||
file_dialog_hide (save_dialog);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue