mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-03 17:33:25 +00:00
Added parent window API to the GimpProgress interface and to the libgimp
2005-09-09 Michael Natterer <mitch@gimp.org> Added parent window API to the GimpProgress interface and to the libgimp progress stuff. Might look strange, but does the right thing in almost all cases (image window, file dialog, script-fu dialog etc). Fixes bug #62988. * app/core/gimpprogress.[ch]: added GimpProgress::get_window() which should return a toplevel window ID if the progress is in a window that wants to be the transient parent of plug-in dialogs. * app/widgets/gimpwidgets-utils.[ch] (gimp_window_get_native): new function which returns the window handle of a GtkWindow's GdkWindow. * app/widgets/gimpfiledialog.c: implement ::get_window(). * app/display/gimpdisplay.[ch]: ditto. Removed window handle API. * app/gui/gui-vtable.c: changed accordingly. * libgimpbase/gimpbaseenums.[ch] (enum GimpProgressCommand): added GIMP_PROGRESS_COMMAND_GET_WINDOW. * app/plug-in/plug-in-progress.[ch] (plug_in_progress_get_window): new function. Also renamed some functions to match the GimpProgress interface, and not the legacy PDB procedure names. * tools/pdbgen/pdb/progress.pdb * app/core/gimppdbprogress.c: implement get_window() on both sides of the wire, keeping backward compatibility (hopefully). * libgimp/gimpprogress.[ch]: deprecated gimp_progress_install() and added gimp_progress_install_vtable() which takes a vtable with padding to be extensible. Added get_window() vtable entry and dispatch it accordingly. Also added pulse() which was implemented in a hackish way before. Everything is of course backward compatible. * libgimp/gimpprogressbar.c: inmplement the get_window() stuff so a plug-in dialog containing a progress can be the transient parent of another dialog in another plug-in. * libgimp/gimpui.[ch] (gimp_ui_get_progress_window): new function which returns a foreign GdkWindow of this plug-ins progress window. Renamed gimp_window_set_transient_for_default_display() to gimp_window_set_transient() and make it use the progress' window handle instead of the display's (which is the right thing to do in almost all cases). * libgimp/gimp.def * libgimp/gimpui.def: add the new functions. * tools/pdbgen/enums.pl * app/pdb/internal_procs.c * app/pdb/progress_cmds.c * libgimp/gimpprogress_pdb.[ch]: regenerated. * libgimp/gimpexport.c * plug-ins/*/*.c: follow API change.
This commit is contained in:
parent
5a81d39e07
commit
b10adabb5e
129 changed files with 1187 additions and 712 deletions
62
ChangeLog
62
ChangeLog
|
@ -1,3 +1,65 @@
|
|||
2005-09-09 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
Added parent window API to the GimpProgress interface and to
|
||||
the libgimp progress stuff. Might look strange, but does
|
||||
the right thing in almost all cases (image window, file dialog,
|
||||
script-fu dialog etc). Fixes bug #62988.
|
||||
|
||||
* app/core/gimpprogress.[ch]: added GimpProgress::get_window()
|
||||
which should return a toplevel window ID if the progress is in a
|
||||
window that wants to be the transient parent of plug-in dialogs.
|
||||
|
||||
* app/widgets/gimpwidgets-utils.[ch] (gimp_window_get_native): new
|
||||
function which returns the window handle of a GtkWindow's GdkWindow.
|
||||
|
||||
* app/widgets/gimpfiledialog.c: implement ::get_window().
|
||||
|
||||
* app/display/gimpdisplay.[ch]: ditto. Removed window handle API.
|
||||
|
||||
* app/gui/gui-vtable.c: changed accordingly.
|
||||
|
||||
* libgimpbase/gimpbaseenums.[ch] (enum GimpProgressCommand):
|
||||
added GIMP_PROGRESS_COMMAND_GET_WINDOW.
|
||||
|
||||
* app/plug-in/plug-in-progress.[ch] (plug_in_progress_get_window):
|
||||
new function. Also renamed some functions to match the
|
||||
GimpProgress interface, and not the legacy PDB procedure names.
|
||||
|
||||
* tools/pdbgen/pdb/progress.pdb
|
||||
* app/core/gimppdbprogress.c: implement get_window() on both
|
||||
sides of the wire, keeping backward compatibility (hopefully).
|
||||
|
||||
* libgimp/gimpprogress.[ch]: deprecated gimp_progress_install()
|
||||
and added gimp_progress_install_vtable() which takes a vtable with
|
||||
padding to be extensible. Added get_window() vtable entry and
|
||||
dispatch it accordingly. Also added pulse() which was implemented
|
||||
in a hackish way before. Everything is of course backward
|
||||
compatible.
|
||||
|
||||
* libgimp/gimpprogressbar.c: inmplement the get_window() stuff
|
||||
so a plug-in dialog containing a progress can be the transient
|
||||
parent of another dialog in another plug-in.
|
||||
|
||||
* libgimp/gimpui.[ch] (gimp_ui_get_progress_window): new function
|
||||
which returns a foreign GdkWindow of this plug-ins progress
|
||||
window.
|
||||
|
||||
Renamed gimp_window_set_transient_for_default_display() to
|
||||
gimp_window_set_transient() and make it use the progress' window
|
||||
handle instead of the display's (which is the right thing to do in
|
||||
almost all cases).
|
||||
|
||||
* libgimp/gimp.def
|
||||
* libgimp/gimpui.def: add the new functions.
|
||||
|
||||
* tools/pdbgen/enums.pl
|
||||
* app/pdb/internal_procs.c
|
||||
* app/pdb/progress_cmds.c
|
||||
* libgimp/gimpprogress_pdb.[ch]: regenerated.
|
||||
|
||||
* libgimp/gimpexport.c
|
||||
* plug-ins/*/*.c: follow API change.
|
||||
|
||||
2005-09-09 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
* gimptool-win32.c.in (get_prefix, maybe_append_exe)
|
||||
|
|
|
@ -60,8 +60,7 @@ static void gimp_pdb_progress_set_property (GObject *object,
|
|||
const GValue *value,
|
||||
GParamSpec *pspec);
|
||||
|
||||
static GimpProgress *
|
||||
gimp_pdb_progress_progress_start (GimpProgress *progress,
|
||||
static GimpProgress * gimp_pdb_progress_progress_start(GimpProgress *progress,
|
||||
const gchar *message,
|
||||
gboolean cancelable);
|
||||
static void gimp_pdb_progress_progress_end (GimpProgress *progress);
|
||||
|
@ -72,6 +71,7 @@ static void gimp_pdb_progress_progress_set_value (GimpProgress *progress,
|
|||
gdouble percentage);
|
||||
static gdouble gimp_pdb_progress_progress_get_value (GimpProgress *progress);
|
||||
static void gimp_pdb_progress_progress_pulse (GimpProgress *progress);
|
||||
static guint32 gimp_pdb_progress_progress_get_window (GimpProgress *progress);
|
||||
|
||||
|
||||
static GObjectClass *parent_class = NULL;
|
||||
|
@ -158,6 +158,7 @@ gimp_pdb_progress_progress_iface_init (GimpProgressInterface *progress_iface)
|
|||
progress_iface->set_value = gimp_pdb_progress_progress_set_value;
|
||||
progress_iface->get_value = gimp_pdb_progress_progress_get_value;
|
||||
progress_iface->pulse = gimp_pdb_progress_progress_pulse;
|
||||
progress_iface->get_window = gimp_pdb_progress_progress_get_window;
|
||||
}
|
||||
|
||||
static GObject *
|
||||
|
@ -233,12 +234,14 @@ gimp_pdb_progress_set_property (GObject *object,
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
static gdouble
|
||||
gimp_pdb_progress_run_callback (GimpPdbProgress *progress,
|
||||
GimpProgressCommand command,
|
||||
const gchar *text,
|
||||
gdouble value)
|
||||
{
|
||||
gdouble retval = 0;
|
||||
|
||||
if (progress->callback_name && ! progress->callback_busy)
|
||||
{
|
||||
Argument *return_vals;
|
||||
|
@ -262,12 +265,18 @@ gimp_pdb_progress_run_callback (GimpPdbProgress *progress,
|
|||
"The corresponding plug-in may have crashed."),
|
||||
g_type_name (G_TYPE_FROM_INSTANCE (progress)));
|
||||
}
|
||||
else if (n_return_vals >= 2 && return_vals[1].arg_type == GIMP_PDB_FLOAT)
|
||||
{
|
||||
retval = return_vals[1].value.pdb_float;
|
||||
}
|
||||
|
||||
if (return_vals)
|
||||
procedural_db_destroy_args (return_vals, n_return_vals);
|
||||
|
||||
progress->callback_busy = FALSE;
|
||||
}
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
static GimpProgress *
|
||||
|
@ -363,6 +372,17 @@ gimp_pdb_progress_progress_pulse (GimpProgress *progress)
|
|||
NULL, 0.0);
|
||||
}
|
||||
|
||||
static guint32
|
||||
gimp_pdb_progress_progress_get_window (GimpProgress *progress)
|
||||
{
|
||||
GimpPdbProgress *pdb_progress = GIMP_PDB_PROGRESS (progress);
|
||||
|
||||
return (guint32)
|
||||
gimp_pdb_progress_run_callback (pdb_progress,
|
||||
GIMP_PROGRESS_COMMAND_GET_WINDOW,
|
||||
NULL, 0.0);
|
||||
}
|
||||
|
||||
GimpPdbProgress *
|
||||
gimp_pdb_progress_get_by_callback (GimpPdbProgressClass *klass,
|
||||
const gchar *callback_name)
|
||||
|
|
|
@ -203,6 +203,21 @@ gimp_progress_pulse (GimpProgress *progress)
|
|||
progress_iface->pulse (progress);
|
||||
}
|
||||
|
||||
guint32
|
||||
gimp_progress_get_window (GimpProgress *progress)
|
||||
{
|
||||
GimpProgressInterface *progress_iface;
|
||||
|
||||
g_return_val_if_fail (GIMP_IS_PROGRESS (progress), 0);
|
||||
|
||||
progress_iface = GIMP_PROGRESS_GET_INTERFACE (progress);
|
||||
|
||||
if (progress_iface->get_window)
|
||||
return progress_iface->get_window (progress);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
gimp_progress_message (GimpProgress *progress,
|
||||
Gimp *gimp,
|
||||
|
|
|
@ -49,6 +49,8 @@ struct _GimpProgressInterface
|
|||
gdouble (* get_value) (GimpProgress *progress);
|
||||
void (* pulse) (GimpProgress *progress);
|
||||
|
||||
guint32 (* get_window) (GimpProgress *progress);
|
||||
|
||||
void (* message) (GimpProgress *progress,
|
||||
Gimp *gimp,
|
||||
const gchar *domain,
|
||||
|
@ -74,6 +76,8 @@ void gimp_progress_set_value (GimpProgress *progress,
|
|||
gdouble gimp_progress_get_value (GimpProgress *progress);
|
||||
void gimp_progress_pulse (GimpProgress *progress);
|
||||
|
||||
guint32 gimp_progress_get_window (GimpProgress *progress);
|
||||
|
||||
void gimp_progress_message (GimpProgress *progress,
|
||||
Gimp *gimp,
|
||||
const gchar *domain,
|
||||
|
|
|
@ -20,14 +20,6 @@
|
|||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#ifdef GDK_WINDOWING_WIN32
|
||||
#include <gdk/gdkwin32.h>
|
||||
#endif
|
||||
|
||||
#ifdef GDK_WINDOWING_X11
|
||||
#include <gdk/gdkx.h>
|
||||
#endif
|
||||
|
||||
#include "display-types.h"
|
||||
#include "tools/tools-types.h"
|
||||
|
||||
|
@ -37,6 +29,8 @@
|
|||
#include "core/gimplist.h"
|
||||
#include "core/gimpprogress.h"
|
||||
|
||||
#include "widgets/gimpwidgets-utils.h"
|
||||
|
||||
#include "tools/gimptool.h"
|
||||
#include "tools/tool_manager.h"
|
||||
|
||||
|
@ -85,6 +79,7 @@ static void gimp_display_progress_set_value (GimpProgress *progress,
|
|||
gdouble percentage);
|
||||
static gdouble gimp_display_progress_get_value (GimpProgress *progress);
|
||||
static void gimp_display_progress_pulse (GimpProgress *progress);
|
||||
static guint32 gimp_display_progress_get_window (GimpProgress *progress);
|
||||
static void gimp_display_progress_canceled (GimpProgress *progress,
|
||||
GimpDisplay *display);
|
||||
|
||||
|
@ -191,6 +186,7 @@ gimp_display_progress_iface_init (GimpProgressInterface *progress_iface)
|
|||
progress_iface->set_value = gimp_display_progress_set_value;
|
||||
progress_iface->get_value = gimp_display_progress_get_value;
|
||||
progress_iface->pulse = gimp_display_progress_pulse;
|
||||
progress_iface->get_window = gimp_display_progress_get_window;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -344,6 +340,17 @@ gimp_display_progress_pulse (GimpProgress *progress)
|
|||
gimp_progress_pulse (GIMP_PROGRESS (shell->statusbar));
|
||||
}
|
||||
|
||||
static guint32
|
||||
gimp_display_progress_get_window (GimpProgress *progress)
|
||||
{
|
||||
GimpDisplay *display = GIMP_DISPLAY (progress);
|
||||
|
||||
if (! display->shell)
|
||||
return 0;
|
||||
|
||||
return (guint32) gimp_window_get_native (GTK_WINDOW (display->shell));
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_display_progress_canceled (GimpProgress *progress,
|
||||
GimpDisplay *display)
|
||||
|
@ -446,46 +453,6 @@ gimp_display_get_ID (GimpDisplay *gdisp)
|
|||
return gdisp->ID;
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_display_get_window:
|
||||
* @display: a #GimpDisplayShell
|
||||
*
|
||||
* This function is used to pass a window handle to plug-ins so that
|
||||
* they can set their dialog windows transient to the image display.
|
||||
*
|
||||
* Return value: a native window handle of the display's shell or 0
|
||||
* if the shell isn't realized yet
|
||||
*/
|
||||
GdkNativeWindow
|
||||
gimp_display_get_window (GimpDisplay *display)
|
||||
{
|
||||
GtkWidget *shell;
|
||||
|
||||
#ifdef GDK_NATIVE_WINDOW_POINTER
|
||||
g_return_val_if_fail (GIMP_IS_DISPLAY (display), NULL);
|
||||
#else
|
||||
g_return_val_if_fail (GIMP_IS_DISPLAY (display), 0);
|
||||
#endif
|
||||
|
||||
shell = display->shell;
|
||||
|
||||
#ifdef GDK_WINDOWING_WIN32
|
||||
if (shell && GTK_WIDGET_REALIZED (shell))
|
||||
return GDK_WINDOW_HWND (shell->window);
|
||||
#endif
|
||||
|
||||
#ifdef GDK_WINDOWING_X11
|
||||
if (shell && GTK_WIDGET_REALIZED (shell))
|
||||
return GDK_WINDOW_XID (shell->window);
|
||||
#endif
|
||||
|
||||
#ifdef GDK_NATIVE_WINDOW_POINTER
|
||||
return NULL;
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
GimpDisplay *
|
||||
gimp_display_get_by_ID (Gimp *gimp,
|
||||
gint ID)
|
||||
|
|
|
@ -64,7 +64,6 @@ GimpDisplay * gimp_display_new (GimpImage *gimage,
|
|||
void gimp_display_delete (GimpDisplay *gdisp);
|
||||
|
||||
gint gimp_display_get_ID (GimpDisplay *gdisp);
|
||||
GdkNativeWindow gimp_display_get_window (GimpDisplay *gdisp);
|
||||
GimpDisplay * gimp_display_get_by_ID (Gimp *gimp,
|
||||
gint ID);
|
||||
|
||||
|
|
|
@ -58,6 +58,7 @@
|
|||
#include "widgets/gimppatternselect.h"
|
||||
#include "widgets/gimpprogressdialog.h"
|
||||
#include "widgets/gimpuimanager.h"
|
||||
#include "widgets/gimpwidgets-utils.h"
|
||||
|
||||
#include "display/gimpdisplay.h"
|
||||
#include "display/gimpdisplay-foreach.h"
|
||||
|
@ -333,14 +334,12 @@ gui_display_get_ID (GimpObject *display)
|
|||
static guint32
|
||||
gui_display_get_window (GimpObject *display)
|
||||
{
|
||||
#ifdef GDK_NATIVE_WINDOW_POINTER
|
||||
#ifdef __GNUC__
|
||||
#warning gui_display_get_window() unimplementable for the target windowing system
|
||||
#endif
|
||||
GimpDisplay *disp = GIMP_DISPLAY (display);
|
||||
|
||||
if (disp->shell)
|
||||
return (guint32) gimp_window_get_native (GTK_WINDOW (disp->shell));
|
||||
|
||||
return 0;
|
||||
#else
|
||||
return (guint32) gimp_display_get_window (GIMP_DISPLAY (display));
|
||||
#endif
|
||||
}
|
||||
|
||||
static GimpObject *
|
||||
|
|
|
@ -75,7 +75,7 @@ void register_undo_procs (Gimp *gimp);
|
|||
void register_unit_procs (Gimp *gimp);
|
||||
void register_vectors_procs (Gimp *gimp);
|
||||
|
||||
/* 474 procedures registered total */
|
||||
/* 475 procedures registered total */
|
||||
|
||||
void
|
||||
internal_procs_init (Gimp *gimp,
|
||||
|
@ -102,13 +102,13 @@ internal_procs_init (Gimp *gimp,
|
|||
(* status_callback) (NULL, _("Context"), 0.12);
|
||||
register_context_procs (gimp);
|
||||
|
||||
(* status_callback) (NULL, _("Convert"), 0.167);
|
||||
(* status_callback) (NULL, _("Convert"), 0.166);
|
||||
register_convert_procs (gimp);
|
||||
|
||||
(* status_callback) (NULL, _("Display procedures"), 0.173);
|
||||
register_display_procs (gimp);
|
||||
|
||||
(* status_callback) (NULL, _("Drawable procedures"), 0.184);
|
||||
(* status_callback) (NULL, _("Drawable procedures"), 0.183);
|
||||
register_drawable_procs (gimp);
|
||||
|
||||
(* status_callback) (NULL, _("Transformation procedures"), 0.257);
|
||||
|
@ -117,82 +117,82 @@ internal_procs_init (Gimp *gimp,
|
|||
(* status_callback) (NULL, _("Edit procedures"), 0.291);
|
||||
register_edit_procs (gimp);
|
||||
|
||||
(* status_callback) (NULL, _("File Operations"), 0.327);
|
||||
(* status_callback) (NULL, _("File Operations"), 0.326);
|
||||
register_fileops_procs (gimp);
|
||||
|
||||
(* status_callback) (NULL, _("Floating selections"), 0.348);
|
||||
(* status_callback) (NULL, _("Floating selections"), 0.347);
|
||||
register_floating_sel_procs (gimp);
|
||||
|
||||
(* status_callback) (NULL, _("Font UI"), 0.361);
|
||||
(* status_callback) (NULL, _("Font UI"), 0.36);
|
||||
register_font_select_procs (gimp);
|
||||
|
||||
(* status_callback) (NULL, _("Fonts"), 0.367);
|
||||
(* status_callback) (NULL, _("Fonts"), 0.366);
|
||||
register_fonts_procs (gimp);
|
||||
|
||||
(* status_callback) (NULL, _("Gimprc procedures"), 0.371);
|
||||
register_gimprc_procs (gimp);
|
||||
|
||||
(* status_callback) (NULL, _("Gradient"), 0.386);
|
||||
(* status_callback) (NULL, _("Gradient"), 0.385);
|
||||
register_gradient_procs (gimp);
|
||||
|
||||
(* status_callback) (NULL, _("Gradient UI"), 0.449);
|
||||
(* status_callback) (NULL, _("Gradient UI"), 0.448);
|
||||
register_gradient_select_procs (gimp);
|
||||
|
||||
(* status_callback) (NULL, _("Gradients"), 0.456);
|
||||
(* status_callback) (NULL, _("Gradients"), 0.455);
|
||||
register_gradients_procs (gimp);
|
||||
|
||||
(* status_callback) (NULL, _("Guide procedures"), 0.466);
|
||||
(* status_callback) (NULL, _("Guide procedures"), 0.465);
|
||||
register_guides_procs (gimp);
|
||||
|
||||
(* status_callback) (NULL, _("Help procedures"), 0.479);
|
||||
(* status_callback) (NULL, _("Help procedures"), 0.478);
|
||||
register_help_procs (gimp);
|
||||
|
||||
(* status_callback) (NULL, _("Image"), 0.481);
|
||||
(* status_callback) (NULL, _("Image"), 0.48);
|
||||
register_image_procs (gimp);
|
||||
|
||||
(* status_callback) (NULL, _("Layer"), 0.614);
|
||||
(* status_callback) (NULL, _("Layer"), 0.613);
|
||||
register_layer_procs (gimp);
|
||||
|
||||
(* status_callback) (NULL, _("Message procedures"), 0.671);
|
||||
(* status_callback) (NULL, _("Message procedures"), 0.669);
|
||||
register_message_procs (gimp);
|
||||
|
||||
(* status_callback) (NULL, _("Miscellaneous"), 0.677);
|
||||
(* status_callback) (NULL, _("Miscellaneous"), 0.676);
|
||||
register_misc_procs (gimp);
|
||||
|
||||
(* status_callback) (NULL, _("Paint Tool procedures"), 0.684);
|
||||
(* status_callback) (NULL, _("Paint Tool procedures"), 0.682);
|
||||
register_paint_tools_procs (gimp);
|
||||
|
||||
(* status_callback) (NULL, _("Palette"), 0.715);
|
||||
(* status_callback) (NULL, _("Palette"), 0.714);
|
||||
register_palette_procs (gimp);
|
||||
|
||||
(* status_callback) (NULL, _("Palette UI"), 0.745);
|
||||
(* status_callback) (NULL, _("Palette UI"), 0.743);
|
||||
register_palette_select_procs (gimp);
|
||||
|
||||
(* status_callback) (NULL, _("Palettes"), 0.751);
|
||||
(* status_callback) (NULL, _("Palettes"), 0.749);
|
||||
register_palettes_procs (gimp);
|
||||
|
||||
(* status_callback) (NULL, _("Parasite procedures"), 0.759);
|
||||
(* status_callback) (NULL, _("Parasite procedures"), 0.758);
|
||||
register_parasite_procs (gimp);
|
||||
|
||||
(* status_callback) (NULL, _("Paths"), 0.785);
|
||||
(* status_callback) (NULL, _("Paths"), 0.783);
|
||||
register_paths_procs (gimp);
|
||||
|
||||
(* status_callback) (NULL, _("Pattern"), 0.819);
|
||||
(* status_callback) (NULL, _("Pattern"), 0.817);
|
||||
register_pattern_procs (gimp);
|
||||
|
||||
(* status_callback) (NULL, _("Pattern UI"), 0.823);
|
||||
(* status_callback) (NULL, _("Pattern UI"), 0.821);
|
||||
register_pattern_select_procs (gimp);
|
||||
|
||||
(* status_callback) (NULL, _("Patterns"), 0.829);
|
||||
(* status_callback) (NULL, _("Patterns"), 0.827);
|
||||
register_patterns_procs (gimp);
|
||||
|
||||
(* status_callback) (NULL, _("Plug-in"), 0.838);
|
||||
(* status_callback) (NULL, _("Plug-in"), 0.836);
|
||||
register_plug_in_procs (gimp);
|
||||
|
||||
(* status_callback) (NULL, _("Procedural database"), 0.85);
|
||||
(* status_callback) (NULL, _("Procedural database"), 0.848);
|
||||
register_procedural_db_procs (gimp);
|
||||
|
||||
(* status_callback) (NULL, _("Progress"), 0.869);
|
||||
(* status_callback) (NULL, _("Progress"), 0.867);
|
||||
register_progress_procs (gimp);
|
||||
|
||||
(* status_callback) (NULL, _("Image mask"), 0.884);
|
||||
|
@ -201,13 +201,13 @@ internal_procs_init (Gimp *gimp,
|
|||
(* status_callback) (NULL, _("Selection Tool procedures"), 0.92);
|
||||
register_selection_tools_procs (gimp);
|
||||
|
||||
(* status_callback) (NULL, _("Text procedures"), 0.93);
|
||||
(* status_callback) (NULL, _("Text procedures"), 0.931);
|
||||
register_text_tool_procs (gimp);
|
||||
|
||||
(* status_callback) (NULL, _("Transform Tool procedures"), 0.939);
|
||||
register_transform_tools_procs (gimp);
|
||||
|
||||
(* status_callback) (NULL, _("Undo"), 0.951);
|
||||
(* status_callback) (NULL, _("Undo"), 0.952);
|
||||
register_undo_procs (gimp);
|
||||
|
||||
(* status_callback) (NULL, _("Units"), 0.966);
|
||||
|
|
|
@ -34,6 +34,7 @@ static ProcRecord progress_init_proc;
|
|||
static ProcRecord progress_update_proc;
|
||||
static ProcRecord progress_pulse_proc;
|
||||
static ProcRecord progress_set_text_proc;
|
||||
static ProcRecord progress_get_window_handle_proc;
|
||||
static ProcRecord progress_install_proc;
|
||||
static ProcRecord progress_uninstall_proc;
|
||||
static ProcRecord progress_cancel_proc;
|
||||
|
@ -45,6 +46,7 @@ register_progress_procs (Gimp *gimp)
|
|||
procedural_db_register (gimp, &progress_update_proc);
|
||||
procedural_db_register (gimp, &progress_pulse_proc);
|
||||
procedural_db_register (gimp, &progress_set_text_proc);
|
||||
procedural_db_register (gimp, &progress_get_window_handle_proc);
|
||||
procedural_db_register (gimp, &progress_install_proc);
|
||||
procedural_db_register (gimp, &progress_uninstall_proc);
|
||||
procedural_db_register (gimp, &progress_cancel_proc);
|
||||
|
@ -126,7 +128,7 @@ progress_update_invoker (Gimp *gimp,
|
|||
if (gimp->current_plug_in && gimp->current_plug_in->open)
|
||||
{
|
||||
if (! gimp->no_interface)
|
||||
plug_in_progress_update (gimp->current_plug_in, percentage);
|
||||
plug_in_progress_set_value (gimp->current_plug_in, percentage);
|
||||
}
|
||||
else
|
||||
success = FALSE;
|
||||
|
@ -250,6 +252,59 @@ static ProcRecord progress_set_text_proc =
|
|||
{ { progress_set_text_invoker } }
|
||||
};
|
||||
|
||||
static Argument *
|
||||
progress_get_window_handle_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
GimpProgress *progress,
|
||||
Argument *args)
|
||||
{
|
||||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
gint32 window = 0;
|
||||
|
||||
if (gimp->current_plug_in && gimp->current_plug_in->open)
|
||||
{
|
||||
if (! gimp->no_interface)
|
||||
window = plug_in_progress_get_window (gimp->current_plug_in);
|
||||
}
|
||||
else
|
||||
success = FALSE;
|
||||
|
||||
return_args = procedural_db_return_args (&progress_get_window_handle_proc, success);
|
||||
|
||||
if (success)
|
||||
return_args[1].value.pdb_int = window;
|
||||
|
||||
return return_args;
|
||||
}
|
||||
|
||||
static ProcArg progress_get_window_handle_outargs[] =
|
||||
{
|
||||
{
|
||||
GIMP_PDB_INT32,
|
||||
"window",
|
||||
"The progress bar's toplevel window"
|
||||
}
|
||||
};
|
||||
|
||||
static ProcRecord progress_get_window_handle_proc =
|
||||
{
|
||||
"gimp-progress-get-window-handle",
|
||||
"gimp-progress-get-window-handle",
|
||||
"Returns the native window ID of the toplevel window this plug-in's progress is displayed in.",
|
||||
"This function returns the native window ID of the toplevel window this plug-in\'s progress is displayed in.",
|
||||
"Michael Natterer <mitch@gimp.org>",
|
||||
"Michael Natterer",
|
||||
"2004",
|
||||
NULL,
|
||||
GIMP_INTERNAL,
|
||||
0,
|
||||
NULL,
|
||||
1,
|
||||
progress_get_window_handle_outargs,
|
||||
{ { progress_get_window_handle_invoker } }
|
||||
};
|
||||
|
||||
static Argument *
|
||||
progress_install_invoker (Gimp *gimp,
|
||||
GimpContext *context,
|
||||
|
|
|
@ -91,7 +91,51 @@ plug_in_progress_start (PlugIn *plug_in,
|
|||
}
|
||||
|
||||
void
|
||||
plug_in_progress_update (PlugIn *plug_in,
|
||||
plug_in_progress_end (PlugIn *plug_in)
|
||||
{
|
||||
PlugInProcFrame *proc_frame;
|
||||
|
||||
g_return_if_fail (plug_in != NULL);
|
||||
|
||||
proc_frame = plug_in_get_proc_frame (plug_in);
|
||||
|
||||
if (proc_frame->progress)
|
||||
{
|
||||
if (proc_frame->progress_cancel_id)
|
||||
{
|
||||
g_signal_handler_disconnect (proc_frame->progress,
|
||||
proc_frame->progress_cancel_id);
|
||||
proc_frame->progress_cancel_id = 0;
|
||||
}
|
||||
|
||||
if (gimp_progress_is_active (proc_frame->progress))
|
||||
gimp_progress_end (proc_frame->progress);
|
||||
|
||||
if (proc_frame->progress_created)
|
||||
{
|
||||
gimp_free_progress (plug_in->gimp, proc_frame->progress);
|
||||
g_object_unref (proc_frame->progress);
|
||||
proc_frame->progress = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
plug_in_progress_set_text (PlugIn *plug_in,
|
||||
const gchar *message)
|
||||
{
|
||||
PlugInProcFrame *proc_frame;
|
||||
|
||||
g_return_if_fail (plug_in != NULL);
|
||||
|
||||
proc_frame = plug_in_get_proc_frame (plug_in);
|
||||
|
||||
if (proc_frame->progress)
|
||||
gimp_progress_set_text (proc_frame->progress, message);
|
||||
}
|
||||
|
||||
void
|
||||
plug_in_progress_set_value (PlugIn *plug_in,
|
||||
gdouble percentage)
|
||||
{
|
||||
PlugInProcFrame *proc_frame;
|
||||
|
@ -131,48 +175,19 @@ plug_in_progress_pulse (PlugIn *plug_in)
|
|||
gimp_progress_pulse (proc_frame->progress);
|
||||
}
|
||||
|
||||
void
|
||||
plug_in_progress_set_text (PlugIn *plug_in,
|
||||
const gchar *message)
|
||||
guint32
|
||||
plug_in_progress_get_window (PlugIn *plug_in)
|
||||
{
|
||||
PlugInProcFrame *proc_frame;
|
||||
|
||||
g_return_if_fail (plug_in != NULL);
|
||||
g_return_val_if_fail (plug_in != NULL, 0);
|
||||
|
||||
proc_frame = plug_in_get_proc_frame (plug_in);
|
||||
|
||||
if (proc_frame->progress)
|
||||
gimp_progress_set_text (proc_frame->progress, message);
|
||||
}
|
||||
return gimp_progress_get_window (proc_frame->progress);
|
||||
|
||||
void
|
||||
plug_in_progress_end (PlugIn *plug_in)
|
||||
{
|
||||
PlugInProcFrame *proc_frame;
|
||||
|
||||
g_return_if_fail (plug_in != NULL);
|
||||
|
||||
proc_frame = plug_in_get_proc_frame (plug_in);
|
||||
|
||||
if (proc_frame->progress)
|
||||
{
|
||||
if (proc_frame->progress_cancel_id)
|
||||
{
|
||||
g_signal_handler_disconnect (proc_frame->progress,
|
||||
proc_frame->progress_cancel_id);
|
||||
proc_frame->progress_cancel_id = 0;
|
||||
}
|
||||
|
||||
if (gimp_progress_is_active (proc_frame->progress))
|
||||
gimp_progress_end (proc_frame->progress);
|
||||
|
||||
if (proc_frame->progress_created)
|
||||
{
|
||||
gimp_free_progress (plug_in->gimp, proc_frame->progress);
|
||||
g_object_unref (proc_frame->progress);
|
||||
proc_frame->progress = NULL;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
gboolean
|
||||
|
|
|
@ -25,12 +25,13 @@
|
|||
void plug_in_progress_start (PlugIn *plug_in,
|
||||
const gchar *message,
|
||||
gint display_ID);
|
||||
void plug_in_progress_update (PlugIn *plug_in,
|
||||
gdouble percentage);
|
||||
void plug_in_progress_pulse (PlugIn *plug_in);
|
||||
void plug_in_progress_end (PlugIn *plug_in);
|
||||
void plug_in_progress_set_text (PlugIn *plug_in,
|
||||
const gchar *message);
|
||||
void plug_in_progress_end (PlugIn *plug_in);
|
||||
void plug_in_progress_set_value (PlugIn *plug_in,
|
||||
gdouble percentage);
|
||||
void plug_in_progress_pulse (PlugIn *plug_in);
|
||||
guint32 plug_in_progress_get_window (PlugIn *plug_in);
|
||||
|
||||
gboolean plug_in_progress_install (PlugIn *plug_in,
|
||||
const gchar *progress_callback);
|
||||
|
|
|
@ -91,7 +91,51 @@ plug_in_progress_start (PlugIn *plug_in,
|
|||
}
|
||||
|
||||
void
|
||||
plug_in_progress_update (PlugIn *plug_in,
|
||||
plug_in_progress_end (PlugIn *plug_in)
|
||||
{
|
||||
PlugInProcFrame *proc_frame;
|
||||
|
||||
g_return_if_fail (plug_in != NULL);
|
||||
|
||||
proc_frame = plug_in_get_proc_frame (plug_in);
|
||||
|
||||
if (proc_frame->progress)
|
||||
{
|
||||
if (proc_frame->progress_cancel_id)
|
||||
{
|
||||
g_signal_handler_disconnect (proc_frame->progress,
|
||||
proc_frame->progress_cancel_id);
|
||||
proc_frame->progress_cancel_id = 0;
|
||||
}
|
||||
|
||||
if (gimp_progress_is_active (proc_frame->progress))
|
||||
gimp_progress_end (proc_frame->progress);
|
||||
|
||||
if (proc_frame->progress_created)
|
||||
{
|
||||
gimp_free_progress (plug_in->gimp, proc_frame->progress);
|
||||
g_object_unref (proc_frame->progress);
|
||||
proc_frame->progress = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
plug_in_progress_set_text (PlugIn *plug_in,
|
||||
const gchar *message)
|
||||
{
|
||||
PlugInProcFrame *proc_frame;
|
||||
|
||||
g_return_if_fail (plug_in != NULL);
|
||||
|
||||
proc_frame = plug_in_get_proc_frame (plug_in);
|
||||
|
||||
if (proc_frame->progress)
|
||||
gimp_progress_set_text (proc_frame->progress, message);
|
||||
}
|
||||
|
||||
void
|
||||
plug_in_progress_set_value (PlugIn *plug_in,
|
||||
gdouble percentage)
|
||||
{
|
||||
PlugInProcFrame *proc_frame;
|
||||
|
@ -131,48 +175,19 @@ plug_in_progress_pulse (PlugIn *plug_in)
|
|||
gimp_progress_pulse (proc_frame->progress);
|
||||
}
|
||||
|
||||
void
|
||||
plug_in_progress_set_text (PlugIn *plug_in,
|
||||
const gchar *message)
|
||||
guint32
|
||||
plug_in_progress_get_window (PlugIn *plug_in)
|
||||
{
|
||||
PlugInProcFrame *proc_frame;
|
||||
|
||||
g_return_if_fail (plug_in != NULL);
|
||||
g_return_val_if_fail (plug_in != NULL, 0);
|
||||
|
||||
proc_frame = plug_in_get_proc_frame (plug_in);
|
||||
|
||||
if (proc_frame->progress)
|
||||
gimp_progress_set_text (proc_frame->progress, message);
|
||||
}
|
||||
return gimp_progress_get_window (proc_frame->progress);
|
||||
|
||||
void
|
||||
plug_in_progress_end (PlugIn *plug_in)
|
||||
{
|
||||
PlugInProcFrame *proc_frame;
|
||||
|
||||
g_return_if_fail (plug_in != NULL);
|
||||
|
||||
proc_frame = plug_in_get_proc_frame (plug_in);
|
||||
|
||||
if (proc_frame->progress)
|
||||
{
|
||||
if (proc_frame->progress_cancel_id)
|
||||
{
|
||||
g_signal_handler_disconnect (proc_frame->progress,
|
||||
proc_frame->progress_cancel_id);
|
||||
proc_frame->progress_cancel_id = 0;
|
||||
}
|
||||
|
||||
if (gimp_progress_is_active (proc_frame->progress))
|
||||
gimp_progress_end (proc_frame->progress);
|
||||
|
||||
if (proc_frame->progress_created)
|
||||
{
|
||||
gimp_free_progress (plug_in->gimp, proc_frame->progress);
|
||||
g_object_unref (proc_frame->progress);
|
||||
proc_frame->progress = NULL;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
gboolean
|
||||
|
|
|
@ -25,12 +25,13 @@
|
|||
void plug_in_progress_start (PlugIn *plug_in,
|
||||
const gchar *message,
|
||||
gint display_ID);
|
||||
void plug_in_progress_update (PlugIn *plug_in,
|
||||
gdouble percentage);
|
||||
void plug_in_progress_pulse (PlugIn *plug_in);
|
||||
void plug_in_progress_end (PlugIn *plug_in);
|
||||
void plug_in_progress_set_text (PlugIn *plug_in,
|
||||
const gchar *message);
|
||||
void plug_in_progress_end (PlugIn *plug_in);
|
||||
void plug_in_progress_set_value (PlugIn *plug_in,
|
||||
gdouble percentage);
|
||||
void plug_in_progress_pulse (PlugIn *plug_in);
|
||||
guint32 plug_in_progress_get_window (PlugIn *plug_in);
|
||||
|
||||
gboolean plug_in_progress_install (PlugIn *plug_in,
|
||||
const gchar *progress_callback);
|
||||
|
|
|
@ -75,6 +75,7 @@ static void gimp_file_dialog_progress_set_value (GimpProgress *progress,
|
|||
gdouble percentage);
|
||||
static gdouble gimp_file_dialog_progress_get_value (GimpProgress *progress);
|
||||
static void gimp_file_dialog_progress_pulse (GimpProgress *progress);
|
||||
static guint32 gimp_file_dialog_progress_get_window(GimpProgress *progress);
|
||||
|
||||
static void gimp_file_dialog_add_preview (GimpFileDialog *dialog,
|
||||
Gimp *gimp);
|
||||
|
@ -162,6 +163,7 @@ gimp_file_dialog_progress_iface_init (GimpProgressInterface *progress_iface)
|
|||
progress_iface->set_value = gimp_file_dialog_progress_set_value;
|
||||
progress_iface->get_value = gimp_file_dialog_progress_get_value;
|
||||
progress_iface->pulse = gimp_file_dialog_progress_pulse;
|
||||
progress_iface->get_window = gimp_file_dialog_progress_get_window;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
@ -294,6 +296,14 @@ gimp_file_dialog_progress_pulse (GimpProgress *progress)
|
|||
}
|
||||
}
|
||||
|
||||
static guint32
|
||||
gimp_file_dialog_progress_get_window (GimpProgress *progress)
|
||||
{
|
||||
GimpFileDialog *dialog = GIMP_FILE_DIALOG (progress);
|
||||
|
||||
return (guint32) gimp_window_get_native (GTK_WINDOW (dialog));
|
||||
}
|
||||
|
||||
|
||||
/* public functions */
|
||||
|
||||
|
|
|
@ -40,6 +40,14 @@
|
|||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#ifdef GDK_WINDOWING_WIN32
|
||||
#include <gdk/gdkwin32.h>
|
||||
#endif
|
||||
|
||||
#ifdef GDK_WINDOWING_X11
|
||||
#include <gdk/gdkx.h>
|
||||
#endif
|
||||
|
||||
#include "libgimpbase/gimpbase.h"
|
||||
#include "libgimpcolor/gimpcolor.h"
|
||||
#include "libgimpwidgets/gimpwidgets.h"
|
||||
|
@ -708,6 +716,40 @@ gimp_window_set_hint (GtkWindow *window,
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_window_get_native:
|
||||
* @window: a #GtkWindow
|
||||
*
|
||||
* This function is used to pass a window handle to plug-ins so that
|
||||
* they can set their dialog windows transient to the parent window.
|
||||
*
|
||||
* Return value: a native window handle of the window's #GdkWindow or 0
|
||||
* if the window isn't realized yet
|
||||
*/
|
||||
GdkNativeWindow
|
||||
gimp_window_get_native (GtkWindow *window)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_WINDOW (window), 0);
|
||||
|
||||
#ifdef GDK_NATIVE_WINDOW_POINTER
|
||||
#ifdef __GNUC__
|
||||
#warning gimp_window_get_native() unimplementable for the target windowing system
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef GDK_WINDOWING_WIN32
|
||||
if (window && GTK_WIDGET_REALIZED (window))
|
||||
return GDK_WINDOW_HWND (GTK_WIDGET (window)->window);
|
||||
#endif
|
||||
|
||||
#ifdef GDK_WINDOWING_X11
|
||||
if (window && GTK_WIDGET_REALIZED (window))
|
||||
return GDK_WINDOW_XID (GTK_WIDGET (window)->window);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
gimp_dialog_set_sensitive (GtkDialog *dialog,
|
||||
gboolean sensitive)
|
||||
|
@ -864,7 +906,7 @@ gimp_toggle_button_set_visible (GtkToggleButton *toggle,
|
|||
}
|
||||
|
||||
#ifdef __GNUC__
|
||||
#warning FIXME: remove this function as soon as bug #141750 is fixed.
|
||||
#warning FIXME: remove this function as soon as we depend on GTK >= 2.8
|
||||
#endif
|
||||
GClosure *
|
||||
gimp_action_get_accel_closure (GtkAction *action)
|
||||
|
|
|
@ -67,6 +67,7 @@ void gimp_rgb_set_gdk_color (GimpRGB *rgb,
|
|||
|
||||
void gimp_window_set_hint (GtkWindow *window,
|
||||
GimpWindowHint hint);
|
||||
GdkNativeWindow gimp_window_get_native (GtkWindow *window);
|
||||
|
||||
void gimp_dialog_set_sensitive (GtkDialog *dialog,
|
||||
gboolean sensitive);
|
||||
|
|
|
@ -500,8 +500,10 @@ EXPORTS
|
|||
gimp_progress_cancel
|
||||
gimp_progress_init
|
||||
gimp_progress_install
|
||||
gimp_progress_install_vtable
|
||||
gimp_progress_pulse
|
||||
gimp_progress_set_text
|
||||
gimp_progress_get_window_handle
|
||||
gimp_progress_uninstall
|
||||
gimp_progress_update
|
||||
gimp_quit
|
||||
|
|
|
@ -393,6 +393,9 @@ confirm_save_dialog (const gchar *message,
|
|||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
|
||||
gimp_window_set_transient (GTK_WINDOW (dialog));
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 12);
|
||||
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), hbox);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 12);
|
||||
|
@ -473,6 +476,7 @@ export_dialog (GSList *actions,
|
|||
-1);
|
||||
|
||||
gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
|
||||
gimp_window_set_transient (GTK_WINDOW (dialog));
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 12);
|
||||
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), hbox);
|
||||
|
|
|
@ -21,6 +21,12 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#include <glib-object.h>
|
||||
|
||||
#undef GIMP_DISABLE_DEPRECATED
|
||||
#include "gimpprogress.h"
|
||||
#define GIMP_DISABLE_DEPRECATED
|
||||
|
||||
#include "gimp.h"
|
||||
|
||||
|
||||
|
@ -29,10 +35,7 @@ typedef struct _GimpProgressData GimpProgressData;
|
|||
struct _GimpProgressData
|
||||
{
|
||||
gchar *progress_callback;
|
||||
GimpProgressStartCallback start_callback;
|
||||
GimpProgressEndCallback end_callback;
|
||||
GimpProgressTextCallback text_callback;
|
||||
GimpProgressValueCallback value_callback;
|
||||
GimpProgressVtable vtable;
|
||||
gpointer data;
|
||||
};
|
||||
|
||||
|
@ -44,9 +47,6 @@ static void gimp_temp_progress_run (const gchar *name,
|
|||
const GimpParam *param,
|
||||
gint *nreturn_vals,
|
||||
GimpParam **return_vals);
|
||||
#if 0
|
||||
static gboolean gimp_temp_progress_run_idle (GimpProgressData *progress_data);
|
||||
#endif
|
||||
|
||||
|
||||
/* private variables */
|
||||
|
@ -79,6 +79,34 @@ gimp_progress_install (GimpProgressStartCallback start_callback,
|
|||
GimpProgressTextCallback text_callback,
|
||||
GimpProgressValueCallback value_callback,
|
||||
gpointer user_data)
|
||||
{
|
||||
GimpProgressVtable vtable = { 0, };
|
||||
|
||||
g_return_val_if_fail (start_callback != NULL, NULL);
|
||||
g_return_val_if_fail (end_callback != NULL, NULL);
|
||||
g_return_val_if_fail (text_callback != NULL, NULL);
|
||||
g_return_val_if_fail (value_callback != NULL, NULL);
|
||||
|
||||
vtable.start = start_callback;
|
||||
vtable.end = end_callback;
|
||||
vtable.set_text = text_callback;
|
||||
vtable.set_value = value_callback;
|
||||
|
||||
return gimp_progress_install_vtable (&vtable, user_data);
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_progress_install_vtable:
|
||||
* @vtable: a pointer to a @GimpProgressVtable.
|
||||
* @user_data: a pointer that is passed as user_data to all vtable functions.
|
||||
*
|
||||
* Return value: the name of the temporary procedure that's been installed
|
||||
*
|
||||
* Since: GIMP 2.4
|
||||
**/
|
||||
const gchar *
|
||||
gimp_progress_install_vtable (const GimpProgressVtable *vtable,
|
||||
gpointer user_data)
|
||||
{
|
||||
static const GimpParamDef args[] =
|
||||
{
|
||||
|
@ -87,12 +115,18 @@ gimp_progress_install (GimpProgressStartCallback start_callback,
|
|||
{ GIMP_PDB_FLOAT, "value", "" }
|
||||
};
|
||||
|
||||
static const GimpParamDef values[] =
|
||||
{
|
||||
{ GIMP_PDB_FLOAT, "value", "" }
|
||||
};
|
||||
|
||||
gchar *progress_callback;
|
||||
|
||||
g_return_val_if_fail (start_callback != NULL, NULL);
|
||||
g_return_val_if_fail (end_callback != NULL, NULL);
|
||||
g_return_val_if_fail (text_callback != NULL, NULL);
|
||||
g_return_val_if_fail (value_callback != NULL, NULL);
|
||||
g_return_val_if_fail (vtable != NULL, NULL);
|
||||
g_return_val_if_fail (vtable->start != NULL, NULL);
|
||||
g_return_val_if_fail (vtable->end != NULL, NULL);
|
||||
g_return_val_if_fail (vtable->set_text != NULL, NULL);
|
||||
g_return_val_if_fail (vtable->set_value != NULL, NULL);
|
||||
|
||||
progress_callback = gimp_procedural_db_temp_name ();
|
||||
|
||||
|
@ -105,8 +139,8 @@ gimp_progress_install (GimpProgressStartCallback start_callback,
|
|||
NULL,
|
||||
"RGB*, GRAY*, INDEXED*",
|
||||
GIMP_TEMPORARY,
|
||||
G_N_ELEMENTS (args), 0,
|
||||
args, NULL,
|
||||
G_N_ELEMENTS (args), G_N_ELEMENTS (values),
|
||||
args, values,
|
||||
gimp_temp_progress_run);
|
||||
|
||||
if (_gimp_progress_install (progress_callback))
|
||||
|
@ -123,10 +157,12 @@ gimp_progress_install (GimpProgressStartCallback start_callback,
|
|||
progress_data = g_new0 (GimpProgressData, 1);
|
||||
|
||||
progress_data->progress_callback = progress_callback;
|
||||
progress_data->start_callback = start_callback;
|
||||
progress_data->end_callback = end_callback;
|
||||
progress_data->text_callback = text_callback;
|
||||
progress_data->value_callback = value_callback;
|
||||
progress_data->vtable.start = vtable->start;
|
||||
progress_data->vtable.end = vtable->end;
|
||||
progress_data->vtable.set_text = vtable->set_text;
|
||||
progress_data->vtable.set_value = vtable->set_value;
|
||||
progress_data->vtable.pulse = vtable->pulse;
|
||||
progress_data->vtable.get_window = vtable->get_window;
|
||||
progress_data->data = user_data;
|
||||
|
||||
g_hash_table_insert (gimp_progress_ht, progress_callback, progress_data);
|
||||
|
@ -224,14 +260,22 @@ gimp_temp_progress_run (const gchar *name,
|
|||
gint *nreturn_vals,
|
||||
GimpParam **return_vals)
|
||||
{
|
||||
static GimpParam values[1];
|
||||
static GimpParam values[2];
|
||||
GimpProgressData *progress_data;
|
||||
|
||||
*nreturn_vals = 1;
|
||||
*return_vals = values;
|
||||
|
||||
values[0].type = GIMP_PDB_STATUS;
|
||||
values[0].data.d_status = GIMP_PDB_SUCCESS;
|
||||
|
||||
progress_data = g_hash_table_lookup (gimp_progress_ht, name);
|
||||
|
||||
if (! progress_data)
|
||||
{
|
||||
g_warning ("Can't find internal progress data");
|
||||
|
||||
values[0].data.d_status = GIMP_PDB_EXECUTION_ERROR;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -240,39 +284,46 @@ gimp_temp_progress_run (const gchar *name,
|
|||
switch (command)
|
||||
{
|
||||
case GIMP_PROGRESS_COMMAND_START:
|
||||
progress_data->start_callback (param[1].data.d_string,
|
||||
progress_data->vtable.start (param[1].data.d_string,
|
||||
param[2].data.d_float != 0.0,
|
||||
progress_data->data);
|
||||
break;
|
||||
|
||||
case GIMP_PROGRESS_COMMAND_END:
|
||||
progress_data->end_callback (progress_data->data);
|
||||
progress_data->vtable.end (progress_data->data);
|
||||
break;
|
||||
|
||||
case GIMP_PROGRESS_COMMAND_SET_TEXT:
|
||||
progress_data->text_callback (param[1].data.d_string,
|
||||
progress_data->vtable.set_text (param[1].data.d_string,
|
||||
progress_data->data);
|
||||
break;
|
||||
|
||||
case GIMP_PROGRESS_COMMAND_SET_VALUE:
|
||||
progress_data->value_callback (param[2].data.d_float,
|
||||
progress_data->vtable.set_value (param[2].data.d_float,
|
||||
progress_data->data);
|
||||
break;
|
||||
|
||||
case GIMP_PROGRESS_COMMAND_PULSE:
|
||||
progress_data->value_callback (-1.0,
|
||||
progress_data->data);
|
||||
if (progress_data->vtable.pulse)
|
||||
progress_data->vtable.pulse (progress_data->data);
|
||||
else
|
||||
progress_data->vtable.set_value (-1, progress_data->data);
|
||||
break;
|
||||
|
||||
case GIMP_PROGRESS_COMMAND_GET_WINDOW:
|
||||
*nreturn_vals = 2;
|
||||
values[1].type = GIMP_PDB_FLOAT;
|
||||
|
||||
if (progress_data->vtable.get_window)
|
||||
values[1].data.d_float =
|
||||
(gdouble) progress_data->vtable.get_window (progress_data->data);
|
||||
else
|
||||
values[1].data.d_float = 0;
|
||||
break;
|
||||
|
||||
default:
|
||||
g_warning ("Unknown command passed to progress callback");
|
||||
values[0].data.d_status = GIMP_PDB_CALLING_ERROR;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
*nreturn_vals = 1;
|
||||
*return_vals = values;
|
||||
|
||||
values[0].type = GIMP_PDB_STATUS;
|
||||
values[0].data.d_status = GIMP_PDB_SUCCESS;
|
||||
}
|
||||
|
|
|
@ -25,6 +25,34 @@
|
|||
G_BEGIN_DECLS
|
||||
|
||||
|
||||
typedef struct _GimpProgressVtable GimpProgressVtable;
|
||||
|
||||
struct _GimpProgressVtable
|
||||
{
|
||||
void (* start) (const gchar *message,
|
||||
gboolean cancelable,
|
||||
gpointer user_data);
|
||||
void (* end) (gpointer user_data);
|
||||
void (* set_text) (const gchar *message,
|
||||
gpointer user_data);
|
||||
void (* set_value) (gdouble percentage,
|
||||
gpointer user_data);
|
||||
void (* pulse) (gpointer user_data);
|
||||
|
||||
guint32 (* get_window) (gpointer user_data);
|
||||
|
||||
/* Padding for future expansion. Must be initialized with NULL! */
|
||||
void (* _gimp_reserved1) (void);
|
||||
void (* _gimp_reserved2) (void);
|
||||
void (* _gimp_reserved3) (void);
|
||||
void (* _gimp_reserved4) (void);
|
||||
void (* _gimp_reserved5) (void);
|
||||
void (* _gimp_reserved6) (void);
|
||||
void (* _gimp_reserved7) (void);
|
||||
void (* _gimp_reserved8) (void);
|
||||
};
|
||||
|
||||
#ifndef GIMP_DISABLE_DEPRECATED
|
||||
typedef void (* GimpProgressStartCallback) (const gchar *message,
|
||||
gboolean cancelable,
|
||||
gpointer user_data);
|
||||
|
@ -40,6 +68,10 @@ const gchar * gimp_progress_install (GimpProgressStartCallback start_callback,
|
|||
GimpProgressTextCallback text_callback,
|
||||
GimpProgressValueCallback value_callback,
|
||||
gpointer user_data);
|
||||
#endif /* GIMP_DISABLE_DEPRECATED */
|
||||
|
||||
const gchar * gimp_progress_install_vtable (const GimpProgressVtable *funcs,
|
||||
gpointer user_data);
|
||||
gpointer gimp_progress_uninstall (const gchar *progress_callback);
|
||||
|
||||
gboolean gimp_progress_set_text (const gchar *format,
|
||||
|
|
|
@ -153,6 +153,38 @@ _gimp_progress_set_text (const gchar *message)
|
|||
return success;
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_progress_get_window_handle:
|
||||
*
|
||||
* Returns the native window ID of the toplevel window this plug-in's
|
||||
* progress is displayed in.
|
||||
*
|
||||
* This function returns the native window ID of the toplevel window
|
||||
* this plug-in\'s progress is displayed in.
|
||||
*
|
||||
* Returns: The progress bar's toplevel window.
|
||||
*
|
||||
* Since: GIMP 2.2
|
||||
*/
|
||||
gint
|
||||
gimp_progress_get_window_handle (void)
|
||||
{
|
||||
GimpParam *return_vals;
|
||||
gint nreturn_vals;
|
||||
gint window = 0;
|
||||
|
||||
return_vals = gimp_run_procedure ("gimp-progress-get-window-handle",
|
||||
&nreturn_vals,
|
||||
GIMP_PDB_END);
|
||||
|
||||
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
|
||||
window = return_vals[1].data.d_int32;
|
||||
|
||||
gimp_destroy_params (return_vals, nreturn_vals);
|
||||
|
||||
return window;
|
||||
}
|
||||
|
||||
/**
|
||||
* _gimp_progress_install:
|
||||
* @progress_callback: The callback PDB proc to call.
|
||||
|
|
|
@ -33,6 +33,7 @@ gboolean gimp_progress_init (const gchar *message);
|
|||
gboolean gimp_progress_update (gdouble percentage);
|
||||
gboolean gimp_progress_pulse (void);
|
||||
gboolean _gimp_progress_set_text (const gchar *message);
|
||||
gint gimp_progress_get_window_handle (void);
|
||||
gboolean _gimp_progress_install (const gchar *progress_callback);
|
||||
gboolean _gimp_progress_uninstall (const gchar *progress_callback);
|
||||
gboolean gimp_progress_cancel (const gchar *progress_callback);
|
||||
|
|
|
@ -24,6 +24,14 @@
|
|||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#ifdef GDK_WINDOWING_WIN32
|
||||
#include <gdk/gdkwin32.h>
|
||||
#endif
|
||||
|
||||
#ifdef GDK_WINDOWING_X11
|
||||
#include <gdk/gdkx.h>
|
||||
#endif
|
||||
|
||||
#include "gimpuitypes.h"
|
||||
|
||||
#include "gimp.h"
|
||||
|
@ -44,6 +52,8 @@ static void gimp_progress_bar_set_text (const gchar *message,
|
|||
gpointer user_data);
|
||||
static void gimp_progress_bar_set_value (gdouble percentage,
|
||||
gpointer user_data);
|
||||
static void gimp_progress_bar_pulse (gpointer user_data);
|
||||
static guint32 gimp_progress_bar_get_window (gpointer user_data);
|
||||
|
||||
|
||||
static GtkProgressBarClass *parent_class = NULL;
|
||||
|
@ -90,13 +100,18 @@ gimp_progress_bar_class_init (GimpProgressBarClass *klass)
|
|||
static void
|
||||
gimp_progress_bar_init (GimpProgressBar *bar)
|
||||
{
|
||||
GimpProgressVtable vtable = { 0, };
|
||||
|
||||
gtk_progress_bar_set_text (GTK_PROGRESS_BAR (bar), " ");
|
||||
|
||||
bar->progress_callback = gimp_progress_install (gimp_progress_bar_start,
|
||||
gimp_progress_bar_end,
|
||||
gimp_progress_bar_set_text,
|
||||
gimp_progress_bar_set_value,
|
||||
bar);
|
||||
vtable.start = gimp_progress_bar_start;
|
||||
vtable.end = gimp_progress_bar_end;
|
||||
vtable.set_text = gimp_progress_bar_set_text;
|
||||
vtable.set_value = gimp_progress_bar_set_value;
|
||||
vtable.pulse = gimp_progress_bar_pulse;
|
||||
vtable.get_window = gimp_progress_bar_get_window;
|
||||
|
||||
bar->progress_callback = gimp_progress_install_vtable (&vtable, bar);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -170,6 +185,56 @@ gimp_progress_bar_set_value (gdouble percentage,
|
|||
g_main_context_iteration (NULL, TRUE);
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_progress_bar_pulse (gpointer user_data)
|
||||
{
|
||||
GimpProgressBar *bar = GIMP_PROGRESS_BAR (user_data);
|
||||
|
||||
gtk_progress_bar_pulse (GTK_PROGRESS_BAR (bar));
|
||||
|
||||
if (GTK_WIDGET_DRAWABLE (bar))
|
||||
while (g_main_context_pending (NULL))
|
||||
g_main_context_iteration (NULL, TRUE);
|
||||
}
|
||||
|
||||
static GdkNativeWindow
|
||||
gimp_window_get_native (GtkWindow *window)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_WINDOW (window), 0);
|
||||
|
||||
#ifdef GDK_NATIVE_WINDOW_POINTER
|
||||
#ifdef __GNUC__
|
||||
#warning gimp_window_get_native() unimplementable for the target windowing system
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef GDK_WINDOWING_WIN32
|
||||
if (window && GTK_WIDGET_REALIZED (window))
|
||||
return GDK_WINDOW_HWND (GTK_WIDGET (window)->window);
|
||||
#endif
|
||||
|
||||
#ifdef GDK_WINDOWING_X11
|
||||
if (window && GTK_WIDGET_REALIZED (window))
|
||||
return GDK_WINDOW_XID (GTK_WIDGET (window)->window);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static guint32
|
||||
gimp_progress_bar_get_window (gpointer user_data)
|
||||
{
|
||||
GimpProgressBar *bar = GIMP_PROGRESS_BAR (user_data);
|
||||
GtkWidget *toplevel;
|
||||
|
||||
toplevel = gtk_widget_get_toplevel (GTK_WIDGET (bar));
|
||||
|
||||
if (GTK_IS_WINDOW (toplevel))
|
||||
return (guint32) gimp_window_get_native (GTK_WINDOW (toplevel));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_progress_bar_new:
|
||||
*
|
||||
|
|
|
@ -39,6 +39,8 @@ static void gimp_ui_help_func (const gchar *help_id,
|
|||
static void gimp_ensure_modules (void);
|
||||
static void gimp_window_transient_realized (GtkWidget *window,
|
||||
GdkWindow *parent);
|
||||
static void gimp_window_set_transient_for (GtkWindow *window,
|
||||
GdkWindow *parent);
|
||||
|
||||
|
||||
static gboolean gimp_ui_initialized = FALSE;
|
||||
|
@ -141,11 +143,11 @@ gimp_ui_init (const gchar *prog_name,
|
|||
GdkWindow *
|
||||
gimp_ui_get_display_window (guint32 gdisp_ID)
|
||||
{
|
||||
#ifndef GDK_NATIVE_WINDOW_POINTER
|
||||
GdkNativeWindow window;
|
||||
|
||||
g_return_val_if_fail (gimp_ui_initialized, NULL);
|
||||
|
||||
#ifndef GDK_NATIVE_WINDOW_POINTER
|
||||
window = gimp_display_get_window_handle (gdisp_ID);
|
||||
if (window)
|
||||
return gdk_window_foreign_new_for_display (gdk_display_get_default (),
|
||||
|
@ -155,6 +157,39 @@ gimp_ui_get_display_window (guint32 gdisp_ID)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_ui_get_progress_window:
|
||||
*
|
||||
* Returns the #GdkWindow of the window this plug-in's progress bar is
|
||||
* shown in. Use it to make plug-in dialogs transient to this window
|
||||
* as explained with gdk_window_set_transient_for().
|
||||
*
|
||||
* You shouldn't have to call this function directly. Use
|
||||
* gimp_window_set_transient() instead.
|
||||
*
|
||||
* Return value: A reference to a #GdkWindow or %NULL. You should
|
||||
* unref the window using g_object_unref() as soon as
|
||||
* you don't need it any longer.
|
||||
*
|
||||
* Since: GIMP 2.4
|
||||
*/
|
||||
GdkWindow *
|
||||
gimp_ui_get_progress_window (void)
|
||||
{
|
||||
#ifndef GDK_NATIVE_WINDOW_POINTER
|
||||
GdkNativeWindow window;
|
||||
|
||||
g_return_val_if_fail (gimp_ui_initialized, NULL);
|
||||
|
||||
window = gimp_progress_get_window_handle ();
|
||||
if (window)
|
||||
return gdk_window_foreign_new_for_display (gdk_display_get_default (),
|
||||
window);
|
||||
#endif
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_window_set_transient_for_display:
|
||||
* @window: the #GtkWindow that should become transient
|
||||
|
@ -165,7 +200,7 @@ gimp_ui_get_display_window (guint32 gdisp_ID)
|
|||
* display ID. See gdk_window_set_transient_for () for more information.
|
||||
*
|
||||
* Most of the time you will want to use the convenience function
|
||||
* gimp_window_set_transient_for_default_display().
|
||||
* gimp_window_set_transient().
|
||||
*
|
||||
* Since: GIMP 2.4
|
||||
*/
|
||||
|
@ -173,48 +208,30 @@ void
|
|||
gimp_window_set_transient_for_display (GtkWindow *window,
|
||||
guint32 gdisp_ID)
|
||||
{
|
||||
GdkWindow *display;
|
||||
|
||||
g_return_if_fail (gimp_ui_initialized);
|
||||
g_return_if_fail (GTK_IS_WINDOW (window));
|
||||
|
||||
gtk_window_set_transient_for (window, NULL);
|
||||
|
||||
g_signal_handlers_disconnect_matched (window, G_SIGNAL_MATCH_FUNC,
|
||||
0, 0, NULL,
|
||||
gimp_window_transient_realized,
|
||||
NULL);
|
||||
|
||||
display = gimp_ui_get_display_window (gdisp_ID);
|
||||
if (! display)
|
||||
return;
|
||||
|
||||
if (GTK_WIDGET_REALIZED (window))
|
||||
gdk_window_set_transient_for (GTK_WIDGET (window)->window, display);
|
||||
|
||||
g_signal_connect_object (window, "realize",
|
||||
G_CALLBACK (gimp_window_transient_realized),
|
||||
display, 0);
|
||||
g_object_unref (display);
|
||||
gimp_window_set_transient_for (window,
|
||||
gimp_ui_get_display_window (gdisp_ID));
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_window_set_transient_for_default_display:
|
||||
* gimp_window_set_transient:
|
||||
* @window: the #GtkWindow that should become transient
|
||||
*
|
||||
* Indicates to the window manager that @window is a transient dialog
|
||||
* associated with the GIMP image window that the plug-in has been
|
||||
* associated with the GIMP window that the plug-in has been
|
||||
* started from. See also gimp_window_set_transient_for_display().
|
||||
*
|
||||
* Since: GIMP 2.4
|
||||
*/
|
||||
void
|
||||
gimp_window_set_transient_for_default_display (GtkWindow *window)
|
||||
gimp_window_set_transient (GtkWindow *window)
|
||||
{
|
||||
g_return_if_fail (gimp_ui_initialized);
|
||||
g_return_if_fail (GTK_IS_WINDOW (window));
|
||||
|
||||
gimp_window_set_transient_for_display (window, gimp_default_display ());
|
||||
gimp_window_set_transient_for (window, gimp_ui_get_progress_window ());
|
||||
}
|
||||
|
||||
|
||||
|
@ -254,3 +271,26 @@ gimp_window_transient_realized (GtkWidget *window,
|
|||
if (GTK_WIDGET_REALIZED (window))
|
||||
gdk_window_set_transient_for (window->window, parent);
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_window_set_transient_for (GtkWindow *window,
|
||||
GdkWindow *parent)
|
||||
{
|
||||
gtk_window_set_transient_for (window, NULL);
|
||||
|
||||
g_signal_handlers_disconnect_matched (window, G_SIGNAL_MATCH_FUNC,
|
||||
0, 0, NULL,
|
||||
gimp_window_transient_realized,
|
||||
NULL);
|
||||
|
||||
if (! parent)
|
||||
return;
|
||||
|
||||
if (GTK_WIDGET_REALIZED (window))
|
||||
gdk_window_set_transient_for (GTK_WIDGET (window)->window, parent);
|
||||
|
||||
g_signal_connect_object (window, "realize",
|
||||
G_CALLBACK (gimp_window_transient_realized),
|
||||
parent, 0);
|
||||
g_object_unref (parent);
|
||||
}
|
||||
|
|
|
@ -45,5 +45,6 @@ EXPORTS
|
|||
gimp_progress_bar_new
|
||||
gimp_ui_init
|
||||
gimp_ui_get_display_window
|
||||
gimp_ui_get_progress_window
|
||||
gimp_window_set_transient
|
||||
gimp_window_set_transient_for_display
|
||||
gimp_window_set_transient_for_default_display
|
||||
|
|
|
@ -53,11 +53,11 @@ void gimp_ui_init (const gchar *prog_name,
|
|||
gboolean preview);
|
||||
|
||||
GdkWindow * gimp_ui_get_display_window (guint32 gdisp_ID);
|
||||
GdkWindow * gimp_ui_get_progress_window (void);
|
||||
|
||||
void gimp_window_set_transient_for_display (GtkWindow *window,
|
||||
guint32 gdisp_ID);
|
||||
void gimp_window_set_transient_for_default_display (GtkWindow *window);
|
||||
|
||||
void gimp_window_set_transient (GtkWindow *window);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
|
|
@ -901,6 +901,7 @@ gimp_progress_command_get_type (void)
|
|||
{ GIMP_PROGRESS_COMMAND_SET_TEXT, "GIMP_PROGRESS_COMMAND_SET_TEXT", "set-text" },
|
||||
{ GIMP_PROGRESS_COMMAND_SET_VALUE, "GIMP_PROGRESS_COMMAND_SET_VALUE", "set-value" },
|
||||
{ GIMP_PROGRESS_COMMAND_PULSE, "GIMP_PROGRESS_COMMAND_PULSE", "pulse" },
|
||||
{ GIMP_PROGRESS_COMMAND_GET_WINDOW, "GIMP_PROGRESS_COMMAND_GET_WINDOW", "get-window" },
|
||||
{ 0, NULL, NULL }
|
||||
};
|
||||
|
||||
|
@ -911,6 +912,7 @@ gimp_progress_command_get_type (void)
|
|||
{ GIMP_PROGRESS_COMMAND_SET_TEXT, "GIMP_PROGRESS_COMMAND_SET_TEXT", NULL },
|
||||
{ GIMP_PROGRESS_COMMAND_SET_VALUE, "GIMP_PROGRESS_COMMAND_SET_VALUE", NULL },
|
||||
{ GIMP_PROGRESS_COMMAND_PULSE, "GIMP_PROGRESS_COMMAND_PULSE", NULL },
|
||||
{ GIMP_PROGRESS_COMMAND_GET_WINDOW, "GIMP_PROGRESS_COMMAND_GET_WINDOW", NULL },
|
||||
{ 0, NULL, NULL }
|
||||
};
|
||||
|
||||
|
|
|
@ -402,7 +402,8 @@ typedef enum
|
|||
GIMP_PROGRESS_COMMAND_END,
|
||||
GIMP_PROGRESS_COMMAND_SET_TEXT,
|
||||
GIMP_PROGRESS_COMMAND_SET_VALUE,
|
||||
GIMP_PROGRESS_COMMAND_PULSE
|
||||
GIMP_PROGRESS_COMMAND_PULSE,
|
||||
GIMP_PROGRESS_COMMAND_GET_WINDOW
|
||||
} GimpProgressCommand;
|
||||
|
||||
|
||||
|
|
|
@ -556,7 +556,7 @@ explorer_dialog (void)
|
|||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dialog));
|
||||
gimp_window_set_transient (GTK_WINDOW (dialog));
|
||||
|
||||
g_signal_connect (dialog, "response",
|
||||
G_CALLBACK (dialog_response),
|
||||
|
|
|
@ -981,7 +981,7 @@ main_dialog (GimpDrawable *drawable)
|
|||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (appwin));
|
||||
gimp_window_set_transient (GTK_WINDOW (appwin));
|
||||
|
||||
main_hbox = gtk_hbox_new (FALSE, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (main_hbox), 12);
|
||||
|
|
|
@ -1381,7 +1381,7 @@ main_dialog (GimpDrawable *drawable)
|
|||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (appwin));
|
||||
gimp_window_set_transient (GTK_WINDOW (appwin));
|
||||
|
||||
main_hbox = gtk_hbox_new (FALSE, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (main_hbox), 12);
|
||||
|
|
|
@ -406,7 +406,7 @@ alienmap2_dialog (void)
|
|||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dialog));
|
||||
gimp_window_set_transient (GTK_WINDOW (dialog));
|
||||
|
||||
main_vbox = gtk_vbox_new (FALSE, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
|
||||
|
|
|
@ -1170,7 +1170,7 @@ logistic_function (CML_PARAM *param,
|
|||
static gint
|
||||
CML_explorer_dialog (void)
|
||||
{
|
||||
GtkWidget *dlg;
|
||||
GtkWidget *dialog;
|
||||
GtkWidget *hbox;
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *frame;
|
||||
|
@ -1181,7 +1181,7 @@ CML_explorer_dialog (void)
|
|||
|
||||
gimp_ui_init (PLUG_IN_BINARY, TRUE);
|
||||
|
||||
dlg = gimp_dialog_new (_("Coupled-Map-Lattice Explorer"), PLUG_IN_BINARY,
|
||||
dialog = gimp_dialog_new (_("Coupled-Map-Lattice Explorer"), PLUG_IN_BINARY,
|
||||
NULL, 0,
|
||||
gimp_standard_help_func, PLUG_IN_PROC,
|
||||
|
||||
|
@ -1190,18 +1190,19 @@ CML_explorer_dialog (void)
|
|||
|
||||
NULL);
|
||||
|
||||
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dlg),
|
||||
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
GTK_RESPONSE_OK,
|
||||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dlg));
|
||||
gimp_window_set_transient (GTK_WINDOW (dialog));
|
||||
|
||||
CML_preview_defer = TRUE;
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 12);
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox), hbox, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), hbox,
|
||||
FALSE, FALSE, 0);
|
||||
gtk_widget_show (hbox);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 12);
|
||||
|
@ -1520,14 +1521,14 @@ CML_explorer_dialog (void)
|
|||
/* Displaying preview might takes a long time. Thus, first, dialog itself
|
||||
* should be shown before making preview in it.
|
||||
*/
|
||||
gtk_widget_show (dlg);
|
||||
gtk_widget_show (dialog);
|
||||
|
||||
CML_preview_defer = FALSE;
|
||||
preview_update ();
|
||||
|
||||
run = (gimp_dialog_run (GIMP_DIALOG (dlg)) == GTK_RESPONSE_OK);
|
||||
run = (gimp_dialog_run (GIMP_DIALOG (dialog)) == GTK_RESPONSE_OK);
|
||||
|
||||
gtk_widget_destroy (dlg);
|
||||
gtk_widget_destroy (dialog);
|
||||
|
||||
return run;
|
||||
}
|
||||
|
@ -1817,11 +1818,11 @@ static void
|
|||
function_graph_new (GtkWidget *widget,
|
||||
gpointer *data)
|
||||
{
|
||||
GtkWidget *dlg;
|
||||
GtkWidget *dialog;
|
||||
GtkWidget *frame;
|
||||
GtkWidget *preview;
|
||||
|
||||
dlg = gimp_dialog_new (_("Graph of the Current Settings"), "cml_explorer",
|
||||
dialog = gimp_dialog_new (_("Graph of the Current Settings"), "cml_explorer",
|
||||
gtk_widget_get_toplevel (widget), 0,
|
||||
gimp_standard_help_func, PLUG_IN_PROC,
|
||||
|
||||
|
@ -1832,7 +1833,8 @@ function_graph_new (GtkWidget *widget,
|
|||
frame = gtk_frame_new (NULL);
|
||||
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (frame), 12);
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox), frame, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), frame,
|
||||
FALSE, FALSE, 0);
|
||||
gtk_widget_show (frame);
|
||||
|
||||
preview = gtk_drawing_area_new ();
|
||||
|
@ -1842,11 +1844,11 @@ function_graph_new (GtkWidget *widget,
|
|||
g_signal_connect (preview, "expose-event",
|
||||
G_CALLBACK (function_graph_expose), data);
|
||||
|
||||
gtk_widget_show (dlg);
|
||||
gtk_widget_show (dialog);
|
||||
|
||||
gimp_dialog_run (GIMP_DIALOG (dlg));
|
||||
gimp_dialog_run (GIMP_DIALOG (dialog));
|
||||
|
||||
gtk_widget_destroy (dlg);
|
||||
gtk_widget_destroy (dialog);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -2078,13 +2080,13 @@ static gboolean
|
|||
force_overwrite (const gchar *filename,
|
||||
GtkWidget *parent)
|
||||
{
|
||||
GtkWidget *dlg;
|
||||
GtkWidget *dialog;
|
||||
GtkWidget *label;
|
||||
GtkWidget *hbox;
|
||||
gchar *buffer;
|
||||
gboolean overwrite;
|
||||
|
||||
dlg = gimp_dialog_new (_("CML Explorer: Overwrite File?"), "cml_explorer",
|
||||
dialog = gimp_dialog_new (_("CML Explorer: Overwrite File?"), "cml_explorer",
|
||||
parent, GTK_DIALOG_MODAL,
|
||||
gimp_standard_help_func, PLUG_IN_PROC,
|
||||
|
||||
|
@ -2094,7 +2096,7 @@ force_overwrite (const gchar *filename,
|
|||
NULL);
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox),
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox),
|
||||
hbox, FALSE, FALSE, 12);
|
||||
gtk_widget_show (hbox);
|
||||
|
||||
|
@ -2107,11 +2109,11 @@ force_overwrite (const gchar *filename,
|
|||
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 12);
|
||||
gtk_widget_show (label);
|
||||
|
||||
gtk_widget_show (dlg);
|
||||
gtk_widget_show (dialog);
|
||||
|
||||
overwrite = (gimp_dialog_run (GIMP_DIALOG (dlg)) == GTK_RESPONSE_OK);
|
||||
overwrite = (gimp_dialog_run (GIMP_DIALOG (dialog)) == GTK_RESPONSE_OK);
|
||||
|
||||
gtk_widget_destroy (dlg);
|
||||
gtk_widget_destroy (dialog);
|
||||
|
||||
return overwrite;
|
||||
}
|
||||
|
|
|
@ -76,6 +76,7 @@ static void align_layers_get_align_offsets (gint32 drawable_id,
|
|||
|
||||
static gint align_layers_dialog (void);
|
||||
|
||||
|
||||
GimpPlugInInfo PLUG_IN_INFO =
|
||||
{
|
||||
NULL, /* init_proc */
|
||||
|
@ -384,7 +385,7 @@ align_layers_get_align_offsets (gint32 drawable_id,
|
|||
static int
|
||||
align_layers_dialog (void)
|
||||
{
|
||||
GtkWidget *dlg;
|
||||
GtkWidget *dialog;
|
||||
GtkWidget *table;
|
||||
GtkWidget *combo;
|
||||
GtkWidget *toggle;
|
||||
|
@ -393,7 +394,7 @@ align_layers_dialog (void)
|
|||
|
||||
gimp_ui_init (PLUG_IN_BINARY, FALSE);
|
||||
|
||||
dlg = gimp_dialog_new (_("Align Visible Layers"), PLUG_IN_BINARY,
|
||||
dialog = gimp_dialog_new (_("Align Visible Layers"), PLUG_IN_BINARY,
|
||||
NULL, 0,
|
||||
gimp_standard_help_func, PLUG_IN_PROC,
|
||||
|
||||
|
@ -402,18 +403,18 @@ align_layers_dialog (void)
|
|||
|
||||
NULL);
|
||||
|
||||
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dlg),
|
||||
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
GTK_RESPONSE_OK,
|
||||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dlg));
|
||||
gimp_window_set_transient (GTK_WINDOW (dialog));
|
||||
|
||||
table = gtk_table_new (7, 3, FALSE);
|
||||
gtk_table_set_col_spacings (GTK_TABLE (table), 6);
|
||||
gtk_table_set_row_spacings (GTK_TABLE (table), 6);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (table), 12);
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox), table,
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), table,
|
||||
FALSE, FALSE, 0);
|
||||
gtk_widget_show (table);
|
||||
|
||||
|
@ -508,11 +509,11 @@ align_layers_dialog (void)
|
|||
G_CALLBACK (gimp_toggle_button_update),
|
||||
&VALS.base_is_bottom_layer);
|
||||
|
||||
gtk_widget_show (dlg);
|
||||
gtk_widget_show (dialog);
|
||||
|
||||
run = (gimp_dialog_run (GIMP_DIALOG (dlg)) == GTK_RESPONSE_OK);
|
||||
run = (gimp_dialog_run (GIMP_DIALOG (dialog)) == GTK_RESPONSE_OK);
|
||||
|
||||
gtk_widget_destroy (dlg);
|
||||
gtk_widget_destroy (dialog);
|
||||
|
||||
return run;
|
||||
}
|
||||
|
|
|
@ -417,7 +417,7 @@ build_dialog (GimpImageBaseType basetype,
|
|||
|
||||
g_free (windowname);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dlg));
|
||||
gimp_window_set_transient (GTK_WINDOW (dlg));
|
||||
|
||||
g_signal_connect (dlg, "response",
|
||||
G_CALLBACK (window_response),
|
||||
|
|
|
@ -405,7 +405,7 @@ lens_dialog (GimpDrawable *drawable)
|
|||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dialog));
|
||||
gimp_window_set_transient (GTK_WINDOW (dialog));
|
||||
|
||||
main_vbox = gtk_vbox_new (FALSE, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
|
||||
|
|
|
@ -241,7 +241,7 @@ blinds_dialog (GimpDrawable *drawable)
|
|||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dialog));
|
||||
gimp_window_set_transient (GTK_WINDOW (dialog));
|
||||
|
||||
main_vbox = gtk_vbox_new (FALSE, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
|
||||
|
|
|
@ -362,7 +362,7 @@ borderaverage_dialog (gint32 image_ID,
|
|||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dialog));
|
||||
gimp_window_set_transient (GTK_WINDOW (dialog));
|
||||
|
||||
main_vbox = gtk_vbox_new (FALSE, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
|
||||
|
|
|
@ -845,7 +845,7 @@ bumpmap_dialog (void)
|
|||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dialog));
|
||||
gimp_window_set_transient (GTK_WINDOW (dialog));
|
||||
|
||||
paned = gtk_hpaned_new ();
|
||||
gtk_container_set_border_width (GTK_CONTAINER (paned), 12);
|
||||
|
|
|
@ -822,7 +822,7 @@ cartoon_dialog (GimpDrawable *drawable)
|
|||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dialog));
|
||||
gimp_window_set_transient (GTK_WINDOW (dialog));
|
||||
|
||||
main_vbox = gtk_vbox_new (FALSE, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
|
||||
|
|
|
@ -365,7 +365,7 @@ doDialog (void)
|
|||
|
||||
NULL);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dialog));
|
||||
gimp_window_set_transient (GTK_WINDOW (dialog));
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 6);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
|
||||
|
|
|
@ -503,7 +503,7 @@ cm_dialog (GimpDrawable *drawable)
|
|||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dialog));
|
||||
gimp_window_set_transient (GTK_WINDOW (dialog));
|
||||
|
||||
main_vbox = gtk_vbox_new (FALSE, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
|
||||
|
|
|
@ -356,7 +356,7 @@ checkerboard_dialog (gint32 image_ID,
|
|||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dialog));
|
||||
gimp_window_set_transient (GTK_WINDOW (dialog));
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
|
||||
|
|
|
@ -269,7 +269,7 @@ colorify_dialog (GimpDrawable *drawable)
|
|||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dialog));
|
||||
gimp_window_set_transient (GTK_WINDOW (dialog));
|
||||
|
||||
main_vbox = gtk_vbox_new (FALSE, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
|
||||
|
|
|
@ -390,7 +390,7 @@ color_to_alpha_dialog (GimpDrawable *drawable)
|
|||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dialog));
|
||||
gimp_window_set_transient (GTK_WINDOW (dialog));
|
||||
|
||||
main_vbox = gtk_vbox_new (FALSE, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
|
||||
|
|
|
@ -1288,7 +1288,7 @@ compose_dialog (const gchar *compose_type,
|
|||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dlg));
|
||||
gimp_window_set_transient (GTK_WINDOW (dlg));
|
||||
|
||||
/* parameter settings */
|
||||
hbox = gtk_hbox_new (FALSE, 12);
|
||||
|
|
|
@ -885,7 +885,7 @@ convmatrix_dialog (GimpDrawable *drawable)
|
|||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dialog));
|
||||
gimp_window_set_transient (GTK_WINDOW (dialog));
|
||||
|
||||
main_vbox = gtk_vbox_new (FALSE, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
|
||||
|
|
|
@ -280,7 +280,7 @@ cubism_dialog (GimpDrawable *drawable)
|
|||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dialog));
|
||||
gimp_window_set_transient (GTK_WINDOW (dialog));
|
||||
|
||||
main_vbox = gtk_vbox_new (FALSE, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
|
||||
|
|
|
@ -1249,7 +1249,7 @@ bender_new_dialog (GimpDrawable *drawable)
|
|||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (cd->shell));
|
||||
gimp_window_set_transient (GTK_WINDOW (cd->shell));
|
||||
|
||||
g_signal_connect (cd->shell, "response",
|
||||
G_CALLBACK (bender_response),
|
||||
|
|
|
@ -1238,7 +1238,7 @@ decompose_dialog (void)
|
|||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dlg));
|
||||
gimp_window_set_transient (GTK_WINDOW (dlg));
|
||||
|
||||
main_vbox = gtk_vbox_new (FALSE, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
|
||||
|
|
|
@ -338,7 +338,7 @@ deinterlace_dialog (GimpDrawable *drawable)
|
|||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dialog));
|
||||
gimp_window_set_transient (GTK_WINDOW (dialog));
|
||||
|
||||
main_vbox = gtk_vbox_new (FALSE, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
|
||||
|
|
|
@ -638,7 +638,7 @@ DepthMerge_dialog (DepthMerge *dm)
|
|||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dialog));
|
||||
gimp_window_set_transient (GTK_WINDOW (dialog));
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
|
||||
|
|
|
@ -404,7 +404,7 @@ despeckle_dialog (void)
|
|||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dialog));
|
||||
gimp_window_set_transient (GTK_WINDOW (dialog));
|
||||
|
||||
main_vbox = gtk_vbox_new (FALSE, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
|
||||
|
|
|
@ -449,7 +449,7 @@ destripe_dialog (GimpDrawable *drawable)
|
|||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dialog));
|
||||
gimp_window_set_transient (GTK_WINDOW (dialog));
|
||||
|
||||
main_vbox = gtk_vbox_new (FALSE, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
|
||||
|
|
|
@ -445,7 +445,7 @@ diffraction_dialog (void)
|
|||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dialog));
|
||||
gimp_window_set_transient (GTK_WINDOW (dialog));
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 12);
|
||||
|
|
|
@ -324,7 +324,7 @@ displace_dialog (GimpDrawable *drawable)
|
|||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dialog));
|
||||
gimp_window_set_transient (GTK_WINDOW (dialog));
|
||||
|
||||
main_vbox = gtk_vbox_new (FALSE, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
|
||||
|
|
|
@ -287,7 +287,7 @@ dog_dialog (gint32 image_ID,
|
|||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dialog));
|
||||
gimp_window_set_transient (GTK_WINDOW (dialog));
|
||||
|
||||
main_vbox = gtk_vbox_new (FALSE, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
|
||||
|
|
|
@ -655,7 +655,7 @@ edge_dialog (GimpDrawable *drawable)
|
|||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dialog));
|
||||
gimp_window_set_transient (GTK_WINDOW (dialog));
|
||||
|
||||
main_vbox = gtk_vbox_new (FALSE, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
|
||||
|
|
|
@ -462,7 +462,7 @@ emboss_dialog (GimpDrawable *drawable)
|
|||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dialog));
|
||||
gimp_window_set_transient (GTK_WINDOW (dialog));
|
||||
|
||||
main_vbox = gtk_vbox_new (FALSE, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
|
||||
|
|
|
@ -222,7 +222,7 @@ engrave_dialog (GimpDrawable *drawable)
|
|||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dialog));
|
||||
gimp_window_set_transient (GTK_WINDOW (dialog));
|
||||
|
||||
main_vbox = gtk_vbox_new (FALSE, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
|
||||
|
|
|
@ -299,7 +299,7 @@ exchange_dialog (GimpDrawable *drawable)
|
|||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dialog));
|
||||
gimp_window_set_transient (GTK_WINDOW (dialog));
|
||||
|
||||
/* do some boxes here */
|
||||
main_vbox = gtk_vbox_new (FALSE, 12);
|
||||
|
|
|
@ -1457,7 +1457,7 @@ film_dialog (gint32 image_ID)
|
|||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dlg));
|
||||
gimp_window_set_transient (GTK_WINDOW (dlg));
|
||||
|
||||
main_vbox = gtk_vbox_new (FALSE, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
|
||||
|
|
|
@ -320,7 +320,7 @@ flare_dialog (GimpDrawable *drawable)
|
|||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dialog));
|
||||
gimp_window_set_transient (GTK_WINDOW (dialog));
|
||||
|
||||
main_vbox = gtk_vbox_new (FALSE, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
|
||||
|
|
|
@ -1193,7 +1193,7 @@ fp_dialog (void)
|
|||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dlg));
|
||||
gimp_window_set_transient (GTK_WINDOW (dlg));
|
||||
|
||||
g_signal_connect (dlg, "response",
|
||||
G_CALLBACK (fp_response),
|
||||
|
|
|
@ -698,7 +698,7 @@ dialog_show (void)
|
|||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dialog));
|
||||
gimp_window_set_transient (GTK_WINDOW (dialog));
|
||||
|
||||
mainbox = gtk_vbox_new (FALSE, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (mainbox), 12);
|
||||
|
|
|
@ -477,7 +477,7 @@ gauss_dialog (gint32 image_ID,
|
|||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dialog));
|
||||
gimp_window_set_transient (GTK_WINDOW (dialog));
|
||||
|
||||
main_vbox = gtk_vbox_new (FALSE, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
|
||||
|
|
|
@ -1193,12 +1193,12 @@ save_image (const gchar *filename,
|
|||
static gboolean
|
||||
badbounds_dialog (void)
|
||||
{
|
||||
GtkWidget *dlg;
|
||||
GtkWidget *dialog;
|
||||
GtkWidget *label;
|
||||
GtkWidget *vbox;
|
||||
gboolean crop;
|
||||
|
||||
dlg = gimp_dialog_new (_("GIF Warning"), "gif_warning",
|
||||
dialog = gimp_dialog_new (_("GIF Warning"), "gif_warning",
|
||||
NULL, 0,
|
||||
gimp_standard_help_func, "file-gif-save",
|
||||
|
||||
|
@ -1207,16 +1207,19 @@ badbounds_dialog (void)
|
|||
|
||||
NULL);
|
||||
|
||||
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dlg),
|
||||
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
GTK_RESPONSE_OK,
|
||||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
|
||||
gimp_window_set_transient (GTK_WINDOW (dialog));
|
||||
|
||||
/* the warning message */
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox), vbox, TRUE, TRUE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), vbox, TRUE, TRUE, 0);
|
||||
gtk_widget_show (vbox);
|
||||
|
||||
label= gtk_label_new (_("The image which you are trying to save as a GIF\n"
|
||||
|
@ -1228,11 +1231,11 @@ badbounds_dialog (void)
|
|||
gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, TRUE, 0);
|
||||
gtk_widget_show (label);
|
||||
|
||||
gtk_widget_show (dlg);
|
||||
gtk_widget_show (dialog);
|
||||
|
||||
crop = (gimp_dialog_run (GIMP_DIALOG (dlg)) == GTK_RESPONSE_OK);
|
||||
crop = (gimp_dialog_run (GIMP_DIALOG (dialog)) == GTK_RESPONSE_OK);
|
||||
|
||||
gtk_widget_destroy (dlg);
|
||||
gtk_widget_destroy (dialog);
|
||||
|
||||
return crop;
|
||||
}
|
||||
|
@ -1241,7 +1244,7 @@ badbounds_dialog (void)
|
|||
static gint
|
||||
save_dialog (gint32 image_ID)
|
||||
{
|
||||
GtkWidget *dlg;
|
||||
GtkWidget *dialog;
|
||||
GtkWidget *main_vbox;
|
||||
GtkWidget *toggle;
|
||||
GtkWidget *label;
|
||||
|
@ -1263,7 +1266,7 @@ save_dialog (gint32 image_ID)
|
|||
|
||||
gimp_image_get_layers (image_ID, &nlayers);
|
||||
|
||||
dlg = gimp_dialog_new (_("Save as GIF"), PLUG_IN_BINARY,
|
||||
dialog = gimp_dialog_new (_("Save as GIF"), PLUG_IN_BINARY,
|
||||
NULL, 0,
|
||||
gimp_standard_help_func, SAVE_PROC,
|
||||
|
||||
|
@ -1272,14 +1275,16 @@ save_dialog (gint32 image_ID)
|
|||
|
||||
NULL);
|
||||
|
||||
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dlg),
|
||||
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
|
||||
GTK_RESPONSE_OK,
|
||||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient (GTK_WINDOW (dialog));
|
||||
|
||||
main_vbox = gtk_vbox_new (FALSE, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
|
||||
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dlg)->vbox), main_vbox);
|
||||
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), main_vbox);
|
||||
gtk_widget_show (main_vbox);
|
||||
|
||||
/* regular gif parameter settings */
|
||||
|
@ -1460,11 +1465,11 @@ save_dialog (gint32 image_ID)
|
|||
gtk_widget_set_sensitive (frame, FALSE);
|
||||
|
||||
gtk_widget_show (frame);
|
||||
gtk_widget_show (dlg);
|
||||
gtk_widget_show (dialog);
|
||||
|
||||
run = (gimp_dialog_run (GIMP_DIALOG (dlg)) == GTK_RESPONSE_OK);
|
||||
run = (gimp_dialog_run (GIMP_DIALOG (dialog)) == GTK_RESPONSE_OK);
|
||||
|
||||
gtk_widget_destroy (dlg);
|
||||
gtk_widget_destroy (dialog);
|
||||
|
||||
return run;
|
||||
}
|
||||
|
|
|
@ -263,7 +263,7 @@ glasstile_dialog (GimpDrawable *drawable)
|
|||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dialog));
|
||||
gimp_window_set_transient (GTK_WINDOW (dialog));
|
||||
|
||||
main_vbox = gtk_vbox_new (FALSE, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
|
||||
|
|
|
@ -800,7 +800,7 @@ dialog_run (void)
|
|||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dialog));
|
||||
gimp_window_set_transient (GTK_WINDOW (dialog));
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
|
||||
|
|
|
@ -646,7 +646,7 @@ dialog (gint32 image_ID,
|
|||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dlg));
|
||||
gimp_window_set_transient (GTK_WINDOW (dlg));
|
||||
|
||||
/* Get the image resolution and unit */
|
||||
gimp_image_get_resolution (image_ID, &xres, &yres);
|
||||
|
|
|
@ -581,7 +581,7 @@ pluginCoreIA (piArgs *argp)
|
|||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dlg));
|
||||
gimp_window_set_transient (GTK_WINDOW (dlg));
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 12);
|
||||
|
|
|
@ -402,7 +402,7 @@ illusion_dialog (GimpDrawable *drawable)
|
|||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dialog));
|
||||
gimp_window_set_transient (GTK_WINDOW (dialog));
|
||||
|
||||
main_vbox = gtk_vbox_new (FALSE, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
|
||||
|
|
|
@ -1164,7 +1164,7 @@ iwarp_dialog (void)
|
|||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dlg));
|
||||
gimp_window_set_transient (GTK_WINDOW (dlg));
|
||||
|
||||
g_signal_connect (dlg, "response",
|
||||
G_CALLBACK (iwarp_response),
|
||||
|
|
|
@ -2432,7 +2432,7 @@ jigsaw_dialog (GimpDrawable *drawable)
|
|||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dialog));
|
||||
gimp_window_set_transient (GTK_WINDOW (dialog));
|
||||
|
||||
main_vbox = gtk_vbox_new (FALSE, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
|
||||
|
|
|
@ -653,7 +653,7 @@ create_main_dialog (void)
|
|||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dialog));
|
||||
gimp_window_set_transient (GTK_WINDOW (dialog));
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
|
||||
|
|
|
@ -519,7 +519,7 @@ save_dialog (void)
|
|||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dlg));
|
||||
gimp_window_set_transient (GTK_WINDOW (dlg));
|
||||
|
||||
main_vbox = gtk_vbox_new (FALSE, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
|
||||
|
|
|
@ -366,7 +366,7 @@ mapcolor_dialog (GimpDrawable *drawable)
|
|||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dialog));
|
||||
gimp_window_set_transient (GTK_WINDOW (dialog));
|
||||
|
||||
main_vbox = gtk_vbox_new (FALSE, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
|
||||
|
|
|
@ -276,7 +276,7 @@ max_rgb_dialog (GimpDrawable *drawable)
|
|||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dialog));
|
||||
gimp_window_set_transient (GTK_WINDOW (dialog));
|
||||
|
||||
main_vbox = gtk_vbox_new (FALSE, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
|
||||
|
|
|
@ -921,7 +921,7 @@ mblur_dialog (gint32 image_ID,
|
|||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dialog));
|
||||
gimp_window_set_transient (GTK_WINDOW (dialog));
|
||||
|
||||
main_vbox = gtk_vbox_new (FALSE, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
|
||||
|
|
|
@ -595,7 +595,7 @@ mosaic_dialog (GimpDrawable *drawable)
|
|||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dialog));
|
||||
gimp_window_set_transient (GTK_WINDOW (dialog));
|
||||
|
||||
main_vbox = gtk_vbox_new (FALSE, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
|
||||
|
|
|
@ -713,7 +713,7 @@ neon_dialog (GimpDrawable *drawable)
|
|||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dialog));
|
||||
gimp_window_set_transient (GTK_WINDOW (dialog));
|
||||
|
||||
main_vbox = gtk_vbox_new (FALSE, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
|
||||
|
|
|
@ -1201,7 +1201,7 @@ newsprint_dialog (GimpDrawable *drawable)
|
|||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dialog));
|
||||
gimp_window_set_transient (GTK_WINDOW (dialog));
|
||||
|
||||
paned = gtk_hpaned_new ();
|
||||
gtk_container_set_border_width (GTK_CONTAINER (paned), 12);
|
||||
|
|
|
@ -1029,7 +1029,7 @@ nlfilter_dialog (GimpDrawable *drawable)
|
|||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dialog));
|
||||
gimp_window_set_transient (GTK_WINDOW (dialog));
|
||||
|
||||
main_vbox = gtk_vbox_new (FALSE, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
|
||||
|
|
|
@ -459,7 +459,7 @@ noisify_dialog (GimpDrawable *drawable,
|
|||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dialog));
|
||||
gimp_window_set_transient (GTK_WINDOW (dialog));
|
||||
|
||||
main_vbox = gtk_vbox_new (FALSE, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
|
||||
|
|
|
@ -316,7 +316,7 @@ nova_dialog (GimpDrawable *drawable)
|
|||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dialog));
|
||||
gimp_window_set_transient (GTK_WINDOW (dialog));
|
||||
|
||||
main_vbox = gtk_vbox_new (FALSE, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
|
||||
|
|
|
@ -486,7 +486,7 @@ oilify_dialog (GimpDrawable *drawable)
|
|||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dialog));
|
||||
gimp_window_set_transient (GTK_WINDOW (dialog));
|
||||
|
||||
main_vbox = gtk_vbox_new (FALSE, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
|
||||
|
|
|
@ -245,7 +245,7 @@ open_dialog (void)
|
|||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dialog));
|
||||
gimp_window_set_transient (GTK_WINDOW (dialog));
|
||||
|
||||
main_hbox = gtk_hbox_new (FALSE, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (main_hbox), 12);
|
||||
|
|
|
@ -851,7 +851,7 @@ photocopy_dialog (GimpDrawable *drawable)
|
|||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dialog));
|
||||
gimp_window_set_transient (GTK_WINDOW (dialog));
|
||||
|
||||
main_vbox = gtk_vbox_new (FALSE, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
|
||||
|
|
|
@ -325,7 +325,7 @@ pixelize_dialog (GimpDrawable *drawable)
|
|||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dialog));
|
||||
gimp_window_set_transient (GTK_WINDOW (dialog));
|
||||
|
||||
main_vbox = gtk_vbox_new (FALSE, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
|
||||
|
|
|
@ -314,7 +314,7 @@ plasma_dialog (GimpDrawable *drawable)
|
|||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dialog));
|
||||
gimp_window_set_transient (GTK_WINDOW (dialog));
|
||||
|
||||
main_vbox = gtk_vbox_new (FALSE, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
|
||||
|
|
|
@ -594,7 +594,7 @@ polarize_dialog (GimpDrawable *drawable)
|
|||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dialog));
|
||||
gimp_window_set_transient (GTK_WINDOW (dialog));
|
||||
|
||||
main_vbox = gtk_vbox_new (FALSE, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
|
||||
|
|
|
@ -735,7 +735,7 @@ randomize_dialog (void)
|
|||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dlg));
|
||||
gimp_window_set_transient (GTK_WINDOW (dlg));
|
||||
|
||||
table = gtk_table_new (3, 3, FALSE);
|
||||
gtk_table_set_col_spacings (GTK_TABLE (table), 6);
|
||||
|
|
|
@ -302,7 +302,7 @@ retinex_dialog (GimpDrawable *drawable)
|
|||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dialog));
|
||||
gimp_window_set_transient (GTK_WINDOW (dialog));
|
||||
|
||||
main_vbox = gtk_vbox_new (FALSE, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
|
||||
|
|
|
@ -484,7 +484,7 @@ ripple_dialog (GimpDrawable *drawable)
|
|||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dialog));
|
||||
gimp_window_set_transient (GTK_WINDOW (dialog));
|
||||
|
||||
/* The main vbox */
|
||||
main_vbox = gtk_vbox_new (FALSE, 12);
|
||||
|
|
|
@ -1330,7 +1330,7 @@ smp_dialog (void)
|
|||
GTK_RESPONSE_CLOSE,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dialog));
|
||||
gimp_window_set_transient (GTK_WINDOW (dialog));
|
||||
|
||||
g_signal_connect (dialog, "response",
|
||||
G_CALLBACK (smp_response_callback),
|
||||
|
|
|
@ -365,7 +365,7 @@ scatter_hsv_dialog (GimpDrawable *drawable)
|
|||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dialog));
|
||||
gimp_window_set_transient (GTK_WINDOW (dialog));
|
||||
|
||||
main_vbox = gtk_vbox_new (FALSE, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
|
||||
|
|
|
@ -237,7 +237,7 @@ sel_gauss_dialog (GimpDrawable *drawable)
|
|||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dialog));
|
||||
gimp_window_set_transient (GTK_WINDOW (dialog));
|
||||
|
||||
main_vbox = gtk_vbox_new (FALSE, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
|
||||
|
|
|
@ -489,7 +489,7 @@ sharpen_dialog (GimpDrawable *drawable)
|
|||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dialog));
|
||||
gimp_window_set_transient (GTK_WINDOW (dialog));
|
||||
|
||||
main_vbox = gtk_vbox_new (FALSE, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
|
||||
|
|
|
@ -368,7 +368,7 @@ shift_dialog (gint32 image_ID,
|
|||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dialog));
|
||||
gimp_window_set_transient (GTK_WINDOW (dialog));
|
||||
|
||||
main_vbox = gtk_vbox_new (FALSE, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
|
||||
|
|
|
@ -659,7 +659,7 @@ sinus_dialog (void)
|
|||
GTK_RESPONSE_CANCEL,
|
||||
-1);
|
||||
|
||||
gimp_window_set_transient_for_default_display (GTK_WINDOW (dlg));
|
||||
gimp_window_set_transient (GTK_WINDOW (dlg));
|
||||
|
||||
main_hbox = gtk_hbox_new (FALSE, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (main_hbox), 12);
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue