Commit d6c48300 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann
Browse files

app/dialogs/dialogs-constructors.[ch] app/dialogs/dialogs.c let the dialog

2004-09-14  Sven Neumann  <sven@gimp.org>

	* app/dialogs/dialogs-constructors.[ch]
	* app/dialogs/dialogs.c
	* app/gui/gui.c: let the dialog factory handle the quit dialog
	as singleton. Fixes bug #151914.

	* app/dialogs/quit-dialog.c: added a warning here. We need a
	container of dirty images for the above change to work correctly.
parent e2d8f7e4
2004-09-14 Sven Neumann <sven@gimp.org>
* app/dialogs/dialogs-constructors.[ch]
* app/dialogs/dialogs.c
* app/gui/gui.c: let the dialog factory handle the quit dialog
as singleton. Fixes bug #151914.
* app/dialogs/quit-dialog.c: added a warning here. We need a
container of dirty images for the above change to work correctly.
2004-09-13 Sven Neumann <sven@gimp.org>
* plug-ins/common/jpeg.c (save_dialog): make the "Save EXIF data"
......
......@@ -86,6 +86,7 @@
#include "image-new-dialog.h"
#include "module-dialog.h"
#include "preferences-dialog.h"
#include "quit-dialog.h"
#include "tips-dialog.h"
#include "gimp-intl.h"
......@@ -180,6 +181,14 @@ dialogs_error_get (GimpDialogFactory *factory,
return gimp_error_dialog_new (_("GIMP Message"), GIMP_STOCK_WARNING);
}
GtkWidget *
dialogs_quit_get (GimpDialogFactory *factory,
GimpContext *context,
gint preview_size)
{
return quit_dialog_new (context->gimp);
}
/***********/
/* docks */
/***********/
......
......@@ -49,6 +49,9 @@ GtkWidget * dialogs_about_get (GimpDialogFactory *factory,
GtkWidget * dialogs_error_get (GimpDialogFactory *factory,
GimpContext *context,
gint preview_size);
GtkWidget * dialogs_quit_get (GimpDialogFactory *factory,
GimpContext *context,
gint preview_size);
/* docks */
......
......@@ -104,6 +104,8 @@ static const GimpDialogFactoryEntry toplevel_entries[] =
{ "gimp-about-dialog", dialogs_about_get,
0, TRUE, FALSE, FALSE, FALSE },
{ "gimp-error-dialog", dialogs_error_get,
0, TRUE, FALSE, FALSE, FALSE },
{ "gimp-quit-dialog", dialogs_quit_get,
0, TRUE, FALSE, FALSE, FALSE }
};
......
......@@ -65,6 +65,10 @@ quit_dialog_new (Gimp *gimp)
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
#ifdef __GNUC__
#warning FIXME: need container of dirty images
#endif
images = gimp_displays_get_dirty_images (gimp);
g_return_val_if_fail (images != NULL, NULL);
......
......@@ -65,7 +65,6 @@
#include "menus/menus.h"
#include "dialogs/dialogs.h"
#include "dialogs/quit-dialog.h"
#include "color-history.h"
#include "gui.h"
......@@ -459,9 +458,9 @@ gui_exit_callback (Gimp *gimp,
if (! force && gimp_displays_dirty (gimp))
{
GtkWidget *dialog = quit_dialog_new (gimp);
gtk_widget_show (dialog);
gimp_dialog_factory_dialog_raise (global_dialog_factory,
gdk_screen_get_default (),
"gimp-quit-dialog", -1);
return TRUE; /* stop exit for now */
}
......
Supports Markdown
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