Commit 509b48a4 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

unset the filename if gtk_file_chooser_set_uri() failed.

2004-08-23  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimpfiledialog.c (gimp_file_dialog_set_image): unset
	the filename if gtk_file_chooser_set_uri() failed.

	* app/actions/file-commands.c
	* app/gui/file-save-dialog.c: trivial cleanups.

	* app/widgets/gimpwidgets-utils.c: removed an unused extern
	variable declaration.
parent f672ae91
2004-08-23 Sven Neumann <sven@gimp.org>
* app/widgets/gimpfiledialog.c (gimp_file_dialog_set_image): unset
the filename if gtk_file_chooser_set_uri() failed.
* app/actions/file-commands.c
* app/gui/file-save-dialog.c: trivial cleanups.
* app/widgets/gimpwidgets-utils.c: removed an unused extern
variable declaration.
2004-08-23 DindinX <david@dindinx.org>
* app/tools/tools-utils.c: fixed a typo that broke the build.
......
......@@ -165,9 +165,7 @@ file_save_cmd_callback (GtkAction *action,
if (gdisp->gimage->dirty ||
! GIMP_GUI_CONFIG (gdisp->gimage->gimp->config)->trust_dirty_flag)
{
const gchar *uri;
uri = gimp_object_get_name (GIMP_OBJECT (gdisp->gimage));
const gchar *uri = gimp_object_get_name (GIMP_OBJECT (gdisp->gimage));
if (! uri)
{
......
......@@ -97,8 +97,7 @@ file_save_dialog_show (GimpImage *gimage,
gtk_window_set_title (GTK_WINDOW (filesave), _("Save Image"));
gimp_file_dialog_set_image (GIMP_FILE_DIALOG (filesave),
gimage, TRUE, TRUE);
gimp_file_dialog_set_image (GIMP_FILE_DIALOG (filesave), gimage, TRUE, TRUE);
file_dialog_show (filesave, parent);
}
......
......@@ -97,8 +97,7 @@ file_save_dialog_show (GimpImage *gimage,
gtk_window_set_title (GTK_WINDOW (filesave), _("Save Image"));
gimp_file_dialog_set_image (GIMP_FILE_DIALOG (filesave),
gimage, TRUE, TRUE);
gimp_file_dialog_set_image (GIMP_FILE_DIALOG (filesave), gimage, TRUE, TRUE);
file_dialog_show (filesave, parent);
}
......
......@@ -424,6 +424,7 @@ gimp_file_dialog_set_image (GimpFileDialog *dialog,
gboolean set_image_clean)
{
const gchar *uri;
gboolean uri_set = FALSE;
g_return_if_fail (GIMP_IS_FILE_DIALOG (dialog));
g_return_if_fail (GIMP_IS_IMAGE (gimage));
......@@ -435,8 +436,9 @@ gimp_file_dialog_set_image (GimpFileDialog *dialog,
uri = gimp_object_get_name (GIMP_OBJECT (gimage));
if (uri)
gtk_file_chooser_set_uri (GTK_FILE_CHOOSER (dialog), uri);
else
uri_set = gtk_file_chooser_set_uri (GTK_FILE_CHOOSER (dialog), uri);
if (! uri_set)
gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (dialog), "");
gimp_file_dialog_set_file_proc (dialog, NULL);
......
......@@ -65,8 +65,6 @@ static void gimp_message_box_response (GtkWidget *widget,
MessageBox *msg_box);
extern gchar *prog_name;
static GList *message_boxes = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment