1997-11-25 06:05:25 +08:00
|
|
|
/* The GIMP -- an image manipulation program
|
|
|
|
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
|
|
|
*
|
|
|
|
* 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
|
1998-04-13 13:44:11 +08:00
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
1997-11-25 06:05:25 +08:00
|
|
|
*/
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
2000-03-23 08:39:00 +08:00
|
|
|
#include <gtk/gtkmain.h>
|
2000-02-11 05:54:12 +08:00
|
|
|
|
1997-11-25 06:05:25 +08:00
|
|
|
#include "appenv.h"
|
|
|
|
#include "colormaps.h"
|
|
|
|
#include "cursorutil.h"
|
|
|
|
#include "fileops.h"
|
|
|
|
#include "gdisplay_ops.h"
|
|
|
|
#include "gimage.h"
|
1999-09-28 01:58:10 +08:00
|
|
|
#include "gimpui.h"
|
1997-11-25 06:05:25 +08:00
|
|
|
#include "gximage.h"
|
|
|
|
#include "menus.h"
|
|
|
|
#include "scale.h"
|
|
|
|
#include "gimprc.h"
|
|
|
|
|
2000-02-01 07:59:05 +08:00
|
|
|
#include "config.h"
|
Lots of ii8n stuff here and some additions to the de.po. Applied
Wed Oct 14 17:46:15 EDT 1998 Adrian Likins <adrian@gimp.org>
* app/*, po/de.po, de/POTFILES.in, libgimp/gimpintl.h:
Lots of ii8n stuff here and some additions to the de.po.
Applied gimp-egger-981005-1 ,gimp-egger-981006-1,
gimp-egger-981007-1, gimp-egger-981008-1,
gimp-egger-981009-1.patch, gimp-egger-981010-1.patch
* plug-in/guillotine/guillotine.c: added the coordinates
of the split images from the original image to the title.
ie foo.jpg (0,0) for the image in the topleft.
* plug-in/script-fu/scripts/neon-logo.scm,
perspective-shadow.scm, predator.scm,rendermap.scm,
ripply-anim.scm, select_to_image.scm,swirltile.scm,
xach-effect.scm: updated scripts to use new script-fu stuff
wooo boy! a big un!
in testing this, it looks like some of the po files are busted.
but the code stuff seems okay.
-adrian
1998-10-15 07:23:52 +08:00
|
|
|
#include "libgimp/gimpintl.h"
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2000-02-11 05:54:12 +08:00
|
|
|
static void gdisplay_close_warning_callback (GtkWidget *widget,
|
|
|
|
gboolean close,
|
|
|
|
gpointer data);
|
|
|
|
static void gdisplay_close_warning_dialog (gchar *image_name,
|
|
|
|
GDisplay *gdisp);
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
|
|
static GtkWidget *warning_dialog = NULL;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* This file is for operations on the gdisplay object
|
|
|
|
*/
|
|
|
|
|
|
|
|
gulong
|
|
|
|
gdisplay_white_pixel (GDisplay *gdisp)
|
|
|
|
{
|
|
|
|
return g_white_pixel;
|
|
|
|
}
|
|
|
|
|
|
|
|
gulong
|
|
|
|
gdisplay_gray_pixel (GDisplay *gdisp)
|
|
|
|
{
|
|
|
|
return g_gray_pixel;
|
|
|
|
}
|
|
|
|
|
|
|
|
gulong
|
|
|
|
gdisplay_black_pixel (GDisplay *gdisp)
|
|
|
|
{
|
|
|
|
return g_black_pixel;
|
|
|
|
}
|
|
|
|
|
|
|
|
gulong
|
|
|
|
gdisplay_color_pixel (GDisplay *gdisp)
|
|
|
|
{
|
|
|
|
return g_color_pixel;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
1998-12-06 05:48:37 +08:00
|
|
|
void
|
new ui for the "Layer Offset" dialog.
1999-07-22 Michael Natterer <mitschel@cs.tu-berlin.de>
* app/channel_ops.[ch]: new ui for the "Layer Offset" dialog.
* app/channels_dialog.c
* app/layers_dialog.c: major code cleanup: Folded some callbacks
into common ones, "widget" instead of "w", indentation, ...
* app/commands.c
* app/interface.[ch]
* app/global_edit.c: the query boxes must be shown by the caller
now. There's no need to split up the string for the message box
manually as the Gtk 1.2 label widget handles newlines corectly.
Added the "edge_lock" toggle to the "Shrink Selection" dialog.
Nicer spacings for the query and message boxes.
* app/ink.c: tried to grab the pointer in the blob preview but
failed. Left the code there as a reminder (commented out).
* app/menus.c: reordered <Image>/Select.
I was bored and grep-ed the sources for ancient or deprecated stuff:
* app/about_dialog.[ch]
* app/actionarea.[ch]
* app/app_procs.c
* app/brush_edit.c
* app/brush_select.c
* app/color_select.c
* app/convert.c
* app/devices.c
* app/gdisplay.c
* app/gdisplay_ops.c
* app/histogram_tool.[ch]
* app/info_window.c
* app/install.c
* app/ops_buttons.c
* app/palette.c
* app/palette_select.c
* app/paths_dialog.c
* app/pattern_select.c
* app/resize.c
* app/scale_toolc.c
* app/text_tool.c:
s/container_border_width/container_set_border_width/g,
s/sprintf/g_snprintf/g, replaced some constant string lengths with
strlen(x).
* app/bezier_select.c
* app/blend.c
* app/boundary.c
* app/errors.[ch]
* app/free_select.c
* app/gimpbrushlist.c
* app/gimprc.c
* app/iscissors.c
* app/main.c
* app/patterns.[ch]
* app/text_tool.c: namespace fanaticism: prefixed all gimp error
functions with "gimp_" and formated the messages more uniformly.
* app/gradient.c
* app/gradient_select.c: same stuff as above for the ui
code. There are still some sub-dialogs which need cleanup.
Did some cleanup in most of these files: prototypes, removed tons
of #include's, i18n fixes, s/w/widget/ as above, indentation, ...
1999-07-23 00:21:10 +08:00
|
|
|
gdisplay_xserver_resolution (gdouble *xres,
|
|
|
|
gdouble *yres)
|
1998-12-06 05:48:37 +08:00
|
|
|
{
|
|
|
|
gint width, height;
|
|
|
|
gint widthMM, heightMM;
|
|
|
|
|
|
|
|
width = gdk_screen_width ();
|
|
|
|
height = gdk_screen_height ();
|
|
|
|
|
|
|
|
widthMM = gdk_screen_width_mm ();
|
|
|
|
heightMM = gdk_screen_height_mm ();
|
|
|
|
|
|
|
|
/*
|
|
|
|
* From xdpyinfo.c:
|
|
|
|
*
|
|
|
|
* there are 2.54 centimeters to an inch; so there are 25.4 millimeters.
|
|
|
|
*
|
|
|
|
* dpi = N pixels / (M millimeters / (25.4 millimeters / 1 inch))
|
|
|
|
* = N pixels / (M inch / 25.4)
|
|
|
|
* = N * 25.4 pixels / M inch
|
|
|
|
*/
|
|
|
|
|
1999-05-23 01:56:35 +08:00
|
|
|
*xres = (width * 25.4) / ((gdouble) widthMM);
|
|
|
|
*yres = (height * 25.4) / ((gdouble) heightMM);
|
1998-12-06 05:48:37 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
1997-11-25 06:05:25 +08:00
|
|
|
void
|
|
|
|
gdisplay_new_view (GDisplay *gdisp)
|
|
|
|
{
|
|
|
|
GDisplay *new_gdisp;
|
|
|
|
|
|
|
|
/* make sure the image has been fully loaded... */
|
|
|
|
if (gdisp->gimage)
|
|
|
|
{
|
|
|
|
new_gdisp = gdisplay_new (gdisp->gimage, gdisp->scale);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
gdisplay_close_window (GDisplay *gdisp,
|
2000-02-11 05:54:12 +08:00
|
|
|
gboolean kill_it)
|
1997-11-25 06:05:25 +08:00
|
|
|
{
|
|
|
|
/* If the image has been modified, give the user a chance to save
|
|
|
|
* it before nuking it--this only applies if its the last view
|
2000-01-23 21:44:12 +08:00
|
|
|
* to an image canvas. (a gimage with disp_count = 1)
|
1997-11-25 06:05:25 +08:00
|
|
|
*/
|
2000-02-11 05:54:12 +08:00
|
|
|
if (! kill_it &&
|
|
|
|
(gdisp->gimage->disp_count == 1) &&
|
|
|
|
gdisp->gimage->dirty &&
|
|
|
|
confirm_on_close)
|
1999-06-21 07:29:34 +08:00
|
|
|
{
|
|
|
|
gdisplay_close_warning_dialog
|
|
|
|
(g_basename (gimage_filename (gdisp->gimage)), gdisp);
|
|
|
|
}
|
1997-11-25 06:05:25 +08:00
|
|
|
else
|
|
|
|
{
|
|
|
|
gtk_widget_destroy (gdisp->shell);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
gdisplay_shrink_wrap (GDisplay *gdisp)
|
|
|
|
{
|
2000-03-23 08:39:00 +08:00
|
|
|
/*
|
2000-02-21 00:49:39 +08:00
|
|
|
* I'm pretty sure this assumes that the current size is < display size
|
|
|
|
* Is this a valid assumption?
|
2000-01-20 11:03:24 +08:00
|
|
|
*/
|
1997-11-25 06:05:25 +08:00
|
|
|
gint x, y;
|
|
|
|
gint disp_width, disp_height;
|
|
|
|
gint width, height;
|
|
|
|
gint shell_x, shell_y;
|
|
|
|
gint shell_width, shell_height;
|
|
|
|
gint max_auto_width, max_auto_height;
|
|
|
|
gint border_x, border_y;
|
2000-02-11 05:54:12 +08:00
|
|
|
gint s_width, s_height;
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
|
|
s_width = gdk_screen_width ();
|
|
|
|
s_height = gdk_screen_height ();
|
|
|
|
|
1998-12-06 05:48:37 +08:00
|
|
|
width = SCALEX (gdisp, gdisp->gimage->width);
|
|
|
|
height = SCALEY (gdisp, gdisp->gimage->height);
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
|
|
disp_width = gdisp->disp_width;
|
|
|
|
disp_height = gdisp->disp_height;
|
|
|
|
|
|
|
|
shell_width = gdisp->shell->allocation.width;
|
|
|
|
shell_height = gdisp->shell->allocation.height;
|
|
|
|
|
|
|
|
border_x = shell_width - disp_width;
|
|
|
|
border_y = shell_height - disp_height;
|
|
|
|
|
|
|
|
max_auto_width = (s_width - border_x) * 0.75;
|
|
|
|
max_auto_height = (s_height - border_y) * 0.75;
|
|
|
|
|
2000-02-21 00:49:39 +08:00
|
|
|
/* If one of the display dimensions has changed and one of the
|
|
|
|
* dimensions fits inside the screen
|
1997-11-25 06:05:25 +08:00
|
|
|
*/
|
|
|
|
if (((width + border_x) < s_width || (height + border_y) < s_height) &&
|
|
|
|
(width != disp_width || height != disp_height))
|
|
|
|
{
|
|
|
|
width = ((width + border_x) < s_width) ? width : max_auto_width;
|
|
|
|
height = ((height + border_y) < s_height) ? height : max_auto_height;
|
|
|
|
|
2000-01-25 10:33:20 +08:00
|
|
|
if (width < gdisp->statusarea->requisition.width)
|
|
|
|
{
|
|
|
|
width = gdisp->statusarea->requisition.width;
|
|
|
|
}
|
2000-02-21 00:49:39 +08:00
|
|
|
|
2000-03-23 08:39:00 +08:00
|
|
|
while (gtk_events_pending())
|
|
|
|
gtk_main_iteration();
|
|
|
|
|
2000-01-20 11:03:24 +08:00
|
|
|
gtk_drawing_area_size(GTK_DRAWING_AREA(gdisp->canvas),
|
|
|
|
width, height);
|
2000-02-21 00:49:39 +08:00
|
|
|
#undef RESIZE_DEBUG
|
|
|
|
#ifdef RESIZE_DEBUG
|
|
|
|
printf("1w:%d/%d d:%d/%d s:%d/%d b:%d/%d\n",
|
1998-10-04 04:14:00 +08:00
|
|
|
width, height,
|
|
|
|
disp_width, disp_height,
|
|
|
|
shell_width, shell_height,
|
2000-02-21 00:49:39 +08:00
|
|
|
border_x, border_y);fflush(stdout);
|
|
|
|
#endif /* RESIZE_DEBUG */
|
|
|
|
|
1997-11-25 06:05:25 +08:00
|
|
|
gdk_window_get_origin (gdisp->shell->window, &shell_x, &shell_y);
|
|
|
|
|
2000-02-21 00:49:39 +08:00
|
|
|
gdisp->disp_width = width; /* Should this be shell width? */
|
1997-11-25 06:05:25 +08:00
|
|
|
gdisp->disp_height = height;
|
|
|
|
}
|
2000-02-21 00:49:39 +08:00
|
|
|
/* If the projected dimension is greater than current, but less than
|
1997-11-25 06:05:25 +08:00
|
|
|
* 3/4 of the screen size, expand automagically
|
|
|
|
*/
|
|
|
|
else if ((width > disp_width || height > disp_height) &&
|
|
|
|
(disp_width < max_auto_width || disp_height < max_auto_height))
|
|
|
|
{
|
2000-02-21 00:49:39 +08:00
|
|
|
width = MIN (max_auto_width, width);
|
|
|
|
height = MIN (max_auto_height, height);
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2000-01-25 10:33:20 +08:00
|
|
|
if (width < gdisp->statusarea->requisition.width)
|
|
|
|
{
|
|
|
|
width = gdisp->statusarea->requisition.width;
|
|
|
|
}
|
2000-03-23 08:39:00 +08:00
|
|
|
|
|
|
|
while (gtk_events_pending())
|
|
|
|
gtk_main_iteration();
|
|
|
|
|
2000-01-20 11:03:24 +08:00
|
|
|
gtk_drawing_area_size(GTK_DRAWING_AREA(gdisp->canvas),
|
|
|
|
width, height);
|
2000-02-21 00:49:39 +08:00
|
|
|
#ifdef RESIZE_DEBUG
|
|
|
|
printf("2w:%d/%d d:%d/%d s:%d/%d b:%d/%d\n",
|
1998-10-04 04:14:00 +08:00
|
|
|
width, height,
|
|
|
|
disp_width, disp_height,
|
|
|
|
shell_width, shell_height,
|
2000-02-21 00:49:39 +08:00
|
|
|
border_x, border_y);fflush(stdout);
|
|
|
|
#endif /* RESIZE_DEBUG */
|
1998-10-04 04:14:00 +08:00
|
|
|
|
1997-11-25 06:05:25 +08:00
|
|
|
gdk_window_get_origin (gdisp->shell->window, &shell_x, &shell_y);
|
2000-02-21 00:49:39 +08:00
|
|
|
|
1997-11-25 06:05:25 +08:00
|
|
|
/* Set the new disp_width and disp_height values */
|
2000-02-21 00:49:39 +08:00
|
|
|
gdisp->disp_width = width;
|
|
|
|
gdisp->disp_height = height;
|
1997-11-25 06:05:25 +08:00
|
|
|
}
|
|
|
|
/* Otherwise, reexpose by hand to reflect changes */
|
|
|
|
else
|
|
|
|
gdisplay_expose_full (gdisp);
|
|
|
|
|
|
|
|
/* If the width or height of the display has changed, recalculate
|
|
|
|
* the display offsets...
|
|
|
|
*/
|
|
|
|
if (disp_width != gdisp->disp_width ||
|
|
|
|
disp_height != gdisp->disp_height)
|
|
|
|
{
|
|
|
|
gdisp->offset_x += (disp_width - gdisp->disp_width) / 2;
|
|
|
|
gdisp->offset_y += (disp_height - gdisp->disp_height) / 2;
|
|
|
|
bounds_checking (gdisp);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2000-02-11 05:54:12 +08:00
|
|
|
gint
|
1997-11-25 06:05:25 +08:00
|
|
|
gdisplay_resize_image (GDisplay *gdisp)
|
|
|
|
{
|
2000-02-11 05:54:12 +08:00
|
|
|
gint sx, sy;
|
|
|
|
gint width, height;
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
|
|
/* Calculate the width and height of the new canvas */
|
1998-12-06 05:48:37 +08:00
|
|
|
sx = SCALEX (gdisp, gdisp->gimage->width);
|
|
|
|
sy = SCALEY (gdisp, gdisp->gimage->height);
|
2000-01-26 07:06:12 +08:00
|
|
|
width = MIN (sx, gdisp->disp_width);
|
|
|
|
height = MIN (sy, gdisp->disp_height);
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
|
|
/* if the new dimensions of the ximage are different than the old...resize */
|
|
|
|
if (width != gdisp->disp_width || height != gdisp->disp_height)
|
|
|
|
{
|
|
|
|
/* adjust the gdisplay offsets -- we need to set them so that the
|
|
|
|
* center of our viewport is at the center of the image.
|
|
|
|
*/
|
|
|
|
gdisp->offset_x = (sx / 2) - (width / 2);
|
|
|
|
gdisp->offset_y = (sy / 2) - (height / 2);
|
|
|
|
|
|
|
|
gdisp->disp_width = width;
|
|
|
|
gdisp->disp_height = height;
|
|
|
|
|
2000-03-23 08:39:00 +08:00
|
|
|
while (gtk_events_pending())
|
|
|
|
gtk_main_iteration();
|
|
|
|
|
1997-11-25 06:05:25 +08:00
|
|
|
gtk_widget_set_usize (gdisp->canvas,
|
|
|
|
gdisp->disp_width,
|
|
|
|
gdisp->disp_height);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/********************************************************
|
|
|
|
* Routines to query before closing a dirty image *
|
|
|
|
********************************************************/
|
|
|
|
|
|
|
|
static void
|
new ui for the "Layer Offset" dialog.
1999-07-22 Michael Natterer <mitschel@cs.tu-berlin.de>
* app/channel_ops.[ch]: new ui for the "Layer Offset" dialog.
* app/channels_dialog.c
* app/layers_dialog.c: major code cleanup: Folded some callbacks
into common ones, "widget" instead of "w", indentation, ...
* app/commands.c
* app/interface.[ch]
* app/global_edit.c: the query boxes must be shown by the caller
now. There's no need to split up the string for the message box
manually as the Gtk 1.2 label widget handles newlines corectly.
Added the "edge_lock" toggle to the "Shrink Selection" dialog.
Nicer spacings for the query and message boxes.
* app/ink.c: tried to grab the pointer in the blob preview but
failed. Left the code there as a reminder (commented out).
* app/menus.c: reordered <Image>/Select.
I was bored and grep-ed the sources for ancient or deprecated stuff:
* app/about_dialog.[ch]
* app/actionarea.[ch]
* app/app_procs.c
* app/brush_edit.c
* app/brush_select.c
* app/color_select.c
* app/convert.c
* app/devices.c
* app/gdisplay.c
* app/gdisplay_ops.c
* app/histogram_tool.[ch]
* app/info_window.c
* app/install.c
* app/ops_buttons.c
* app/palette.c
* app/palette_select.c
* app/paths_dialog.c
* app/pattern_select.c
* app/resize.c
* app/scale_toolc.c
* app/text_tool.c:
s/container_border_width/container_set_border_width/g,
s/sprintf/g_snprintf/g, replaced some constant string lengths with
strlen(x).
* app/bezier_select.c
* app/blend.c
* app/boundary.c
* app/errors.[ch]
* app/free_select.c
* app/gimpbrushlist.c
* app/gimprc.c
* app/iscissors.c
* app/main.c
* app/patterns.[ch]
* app/text_tool.c: namespace fanaticism: prefixed all gimp error
functions with "gimp_" and formated the messages more uniformly.
* app/gradient.c
* app/gradient_select.c: same stuff as above for the ui
code. There are still some sub-dialogs which need cleanup.
Did some cleanup in most of these files: prototypes, removed tons
of #include's, i18n fixes, s/w/widget/ as above, indentation, ...
1999-07-23 00:21:10 +08:00
|
|
|
gdisplay_close_warning_callback (GtkWidget *widget,
|
2000-02-11 05:54:12 +08:00
|
|
|
gboolean close,
|
|
|
|
gpointer data)
|
1997-11-25 06:05:25 +08:00
|
|
|
{
|
|
|
|
GDisplay *gdisp;
|
|
|
|
|
2000-02-11 05:54:12 +08:00
|
|
|
gdisp = (GDisplay *) data;
|
1997-11-25 06:05:25 +08:00
|
|
|
|
1999-11-24 03:11:29 +08:00
|
|
|
menus_set_sensitive ("<Image>/File/Close", TRUE);
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2000-02-11 05:54:12 +08:00
|
|
|
if (close)
|
|
|
|
gtk_widget_destroy (gdisp->shell);
|
1997-11-25 06:05:25 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2000-02-11 05:54:12 +08:00
|
|
|
gdisplay_close_warning_dialog (gchar *image_name,
|
1997-11-25 06:05:25 +08:00
|
|
|
GDisplay *gdisp)
|
|
|
|
{
|
1999-07-28 22:01:04 +08:00
|
|
|
GtkWidget *mbox;
|
2000-02-11 05:54:12 +08:00
|
|
|
gchar *warning_buf;
|
1999-07-28 22:01:04 +08:00
|
|
|
|
1997-11-25 06:05:25 +08:00
|
|
|
/* FIXUP this will raise any prexsisting close dialogs, which can be a
|
|
|
|
a bit confusing if you tried to close a new window because you had
|
|
|
|
forgotten the old dialog was still around */
|
|
|
|
/* If a warning dialog already exists raise the window and get out */
|
|
|
|
if (warning_dialog != NULL)
|
|
|
|
{
|
|
|
|
gdk_window_raise (warning_dialog->window);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
1999-11-24 03:11:29 +08:00
|
|
|
menus_set_sensitive ("<Image>/File/Close", FALSE);
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2000-02-11 05:54:12 +08:00
|
|
|
warning_buf =
|
|
|
|
g_strdup_printf (_("Changes were made to %s.\nClose anyway?"), image_name);
|
1999-09-28 01:58:10 +08:00
|
|
|
|
2000-02-11 05:54:12 +08:00
|
|
|
warning_dialog = mbox =
|
|
|
|
gimp_query_boolean_box (image_name,
|
|
|
|
gimp_standard_help_func,
|
|
|
|
"dialogs/really_close.html",
|
2000-02-12 21:07:59 +08:00
|
|
|
FALSE,
|
2000-02-11 05:54:12 +08:00
|
|
|
warning_buf,
|
|
|
|
_("Close"), _("Cancel"),
|
|
|
|
NULL, NULL,
|
|
|
|
gdisplay_close_warning_callback,
|
|
|
|
gdisp);
|
1999-09-28 01:58:10 +08:00
|
|
|
|
2000-02-11 05:54:12 +08:00
|
|
|
g_free (warning_buf);
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
|
|
gtk_signal_connect (GTK_OBJECT (mbox), "destroy",
|
2000-02-11 05:54:12 +08:00
|
|
|
GTK_SIGNAL_FUNC (gtk_widget_destroyed),
|
|
|
|
&warning_dialog);
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
|
|
gtk_widget_show (mbox);
|
|
|
|
}
|