Commit 9000f4a9 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

removed the quit dialog code here.

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

	* app/gui/gui.c: removed the quit dialog code here.

	* app/gui/Makefile.am
	* app/gui/quit-dialog.[ch]: added new files that hold the old code
	for now.

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

	* POTFILES.in: updated.
parent dd9cb1c9
2004-07-09 Sven Neumann <sven@gimp.org>
* app/gui/gui.c: removed the quit dialog code here.
* app/gui/Makefile.am
* app/gui/quit-dialog.[ch]: added new files that hold the old code
for now.
2004-07-09 Michael Natterer <mitch@gimp.org>
* app/pdb/procedural_db.c: #include <glib-object.h> instead of
......
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* Copyright (C) 2004 Sven Neumann <sven@gimp.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "config.h"
#include <gtk/gtk.h>
#include "libgimpwidgets/gimpwidgets.h"
#include "gui-types.h"
#include "core/gimp.h"
#include "display/gimpdisplay-foreach.h"
#include "widgets/gimpactiongroup.h"
#include "widgets/gimphelp-ids.h"
#include "quit-dialog.h"
#include "gimp-intl.h"
static void quit_callback (GtkWidget *button,
gboolean quit,
gpointer data);
GtkWidget *
quit_dialog_new (Gimp *gimp)
{
GtkWidget *dialog;
GList *list;
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
for (list = gimp_action_groups_from_name ("file");
list;
list = g_list_next (list))
{
gimp_action_group_set_action_sensitive (list->data, "file-quit", FALSE);
}
dialog = gimp_query_boolean_box (_("Quit The GIMP?"),
NULL,
gimp_standard_help_func,
GIMP_HELP_FILE_QUIT_CONFIRM,
GIMP_STOCK_WILBER_EEK,
_("Some images have unsaved changes.\n\n"
"Really quit The GIMP?"),
GTK_STOCK_QUIT, GTK_STOCK_CANCEL,
NULL, NULL,
quit_callback,
gimp);
return dialog;
}
static void
quit_callback (GtkWidget *button,
gboolean quit,
gpointer data)
{
Gimp *gimp = GIMP (data);
if (quit)
{
gimp_exit (gimp, TRUE);
}
else
{
GList *list;
for (list = gimp_action_groups_from_name ("file");
list;
list = g_list_next (list))
{
gimp_action_group_set_action_sensitive (list->data, "file-quit",
TRUE);
}
}
}
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* Copyright (C) 2004 Sven Neumann
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __QUIT_DIALOG_H__
#define __QUIT_DIALOG_H__
GtkWidget * quit_dialog_new (Gimp *gimp);
#endif /* __QUIT_DIALOG_H__ */
......@@ -37,6 +37,8 @@ dialogs_sources = \
palette-import-dialog.h \
preferences-dialog.c \
preferences-dialog.h \
quit-dialog.c \
quit-dialog.h \
resize-dialog.c \
resize-dialog.h \
resolution-calibrate-dialog.c \
......
......@@ -44,7 +44,6 @@
#include "tools/gimp-tools.h"
#include "widgets/gimpactiongroup.h"
#include "widgets/gimpclipboard.h"
#include "widgets/gimpcontrollers.h"
#include "widgets/gimpdevices.h"
......@@ -67,6 +66,7 @@
#include "dialogs.h"
#include "gui.h"
#include "gui-vtable.h"
#include "quit-dialog.h"
#include "session.h"
#include "splash.h"
#include "themes.h"
......@@ -93,9 +93,6 @@ static gboolean gui_exit_callback (Gimp *gimp,
gboolean force);
static gboolean gui_exit_after_callback (Gimp *gimp,
gboolean force);
static void gui_really_quit_callback (GtkWidget *button,
gboolean quit,
gpointer data);
static void gui_show_tooltips_notify (GimpGuiConfig *gui_config,
GParamSpec *pspec,
......@@ -386,28 +383,7 @@ gui_exit_callback (Gimp *gimp,
if (! force && gimp_displays_dirty (gimp))
{
GtkWidget *dialog;
GList *list;
for (list = gimp_action_groups_from_name ("file");
list;
list = g_list_next (list))
{
gimp_action_group_set_action_sensitive (list->data, "file-quit",
FALSE);
}
dialog = gimp_query_boolean_box (_("Quit The GIMP?"),
NULL,
gimp_standard_help_func,
GIMP_HELP_FILE_QUIT_CONFIRM,
GIMP_STOCK_WILBER_EEK,
_("Some images have unsaved changes.\n\n"
"Really quit The GIMP?"),
GTK_STOCK_QUIT, GTK_STOCK_CANCEL,
NULL, NULL,
gui_really_quit_callback,
gimp);
GtkWidget *dialog = quit_dialog_new (gimp);
gtk_widget_show (dialog);
......@@ -471,31 +447,6 @@ gui_exit_after_callback (Gimp *gimp,
return FALSE; /* continue exiting */
}
static void
gui_really_quit_callback (GtkWidget *button,
gboolean quit,
gpointer data)
{
Gimp *gimp = GIMP (data);
if (quit)
{
gimp_exit (gimp, TRUE);
}
else
{
GList *list;
for (list = gimp_action_groups_from_name ("file");
list;
list = g_list_next (list))
{
gimp_action_group_set_action_sensitive (list->data, "file-quit",
TRUE);
}
}
}
static void
gui_show_tooltips_notify (GimpGuiConfig *gui_config,
GParamSpec *param_spec,
......
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* Copyright (C) 2004 Sven Neumann <sven@gimp.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "config.h"
#include <gtk/gtk.h>
#include "libgimpwidgets/gimpwidgets.h"
#include "gui-types.h"
#include "core/gimp.h"
#include "display/gimpdisplay-foreach.h"
#include "widgets/gimpactiongroup.h"
#include "widgets/gimphelp-ids.h"
#include "quit-dialog.h"
#include "gimp-intl.h"
static void quit_callback (GtkWidget *button,
gboolean quit,
gpointer data);
GtkWidget *
quit_dialog_new (Gimp *gimp)
{
GtkWidget *dialog;
GList *list;
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
for (list = gimp_action_groups_from_name ("file");
list;
list = g_list_next (list))
{
gimp_action_group_set_action_sensitive (list->data, "file-quit", FALSE);
}
dialog = gimp_query_boolean_box (_("Quit The GIMP?"),
NULL,
gimp_standard_help_func,
GIMP_HELP_FILE_QUIT_CONFIRM,
GIMP_STOCK_WILBER_EEK,
_("Some images have unsaved changes.\n\n"
"Really quit The GIMP?"),
GTK_STOCK_QUIT, GTK_STOCK_CANCEL,
NULL, NULL,
quit_callback,
gimp);
return dialog;
}
static void
quit_callback (GtkWidget *button,
gboolean quit,
gpointer data)
{
Gimp *gimp = GIMP (data);
if (quit)
{
gimp_exit (gimp, TRUE);
}
else
{
GList *list;
for (list = gimp_action_groups_from_name ("file");
list;
list = g_list_next (list))
{
gimp_action_group_set_action_sensitive (list->data, "file-quit",
TRUE);
}
}
}
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* Copyright (C) 2004 Sven Neumann
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __QUIT_DIALOG_H__
#define __QUIT_DIALOG_H__
GtkWidget * quit_dialog_new (Gimp *gimp);
#endif /* __QUIT_DIALOG_H__ */
2004-07-09 Sven Neumann <sven@gimp.org>
* POTFILES.in: updated.
2004-07-06 Marco Ciampa <ciampix@libero.it>
* it.po: updated italian translation.
......@@ -15,10 +19,10 @@
* hu.po: Updated Hungarian translation.
2004-06-07 Pablo G. del Campo <pablodc@bigfoot.com>
* es.po: Updated Spanish translation by
Francisco Vila <francisco.vila@hispalinux.es>.
* es.po: Updated Spanish translation by Francisco Vila
<francisco.vila@hispalinux.es>.
2004-06-10 Gustavo Noronha Silva <kov@debian.org>
* pt_BR.po: translation update by
......
......@@ -9,6 +9,7 @@ app/actions/buffers-actions.c
app/actions/channels-actions.c
app/actions/channels-commands.c
app/actions/colormap-editor-actions.c
app/actions/context-actions.c
app/actions/data-commands.c
app/actions/debug-actions.c
app/actions/dialogs-actions.c
......@@ -52,6 +53,7 @@ app/actions/tools-actions.c
app/actions/vectors-actions.c
app/actions/vectors-commands.c
app/actions/view-actions.c
app/actions/view-commands.c
app/base/base-enums.c
app/base/tile-swap.c
......@@ -134,8 +136,6 @@ app/file/file-save.c
app/file/file-utils.c
app/gui/about-dialog.c
app/gui/brush-select.c
app/gui/clipboard.c
app/gui/color-notebook.c
app/gui/convert-dialog.c
app/gui/dialogs-constructors.c
......@@ -143,8 +143,6 @@ app/gui/file-new-dialog.c
app/gui/file-open-dialog.c
app/gui/file-open-location-dialog.c
app/gui/file-save-dialog.c
app/gui/font-select.c
app/gui/gradient-select.c
app/gui/grid-dialog.c
app/gui/gui.c
app/gui/info-dialog.c
......@@ -152,9 +150,8 @@ app/gui/info-window.c
app/gui/module-browser.c
app/gui/offset-dialog.c
app/gui/palette-import-dialog.c
app/gui/palette-select.c
app/gui/pattern-select.c
app/gui/preferences-dialog.c
app/gui/quit-dialog.c
app/gui/resize-dialog.c
app/gui/resolution-calibrate-dialog.c
app/gui/session.c
......@@ -272,13 +269,17 @@ app/vectors/gimpvectors-import.c
app/widgets/gimpactiongroup.c
app/widgets/gimpbrusheditor.c
app/widgets/gimpbrushfactoryview.c
app/widgets/gimpbrushselect.c
app/widgets/gimpchanneltreeview.c
app/widgets/gimpclipboard.c
app/widgets/gimpcolordisplayeditor.c
app/widgets/gimpcoloreditor.c
app/widgets/gimpcolorframe.c
app/widgets/gimpcolormapeditor.c
app/widgets/gimpcontainergridview.c
app/widgets/gimpcontainerpopup.c
app/widgets/gimpcontrollerkeyboard.c
app/widgets/gimpcontrollerwheel.c
app/widgets/gimpdataeditor.c
app/widgets/gimpdevicestatus.c
app/widgets/gimpdnd.c
......@@ -297,7 +298,9 @@ app/widgets/gimpitemfactory.c
app/widgets/gimpitemtreeview.c
app/widgets/gimplayertreeview.c
app/widgets/gimppaletteeditor.c
app/widgets/gimppdbdialog.c
app/widgets/gimppropwidgets.c
app/widgets/gimpselectiondata.c
app/widgets/gimpselectioneditor.c
app/widgets/gimpstrokeeditor.c
app/widgets/gimptemplateeditor.c
......
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